From 626a0bea81ca7a42d3e91bea919b369e9aa10195 Mon Sep 17 00:00:00 2001 From: kriastans Date: Sat, 27 Apr 2024 16:41:33 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E4=BF=AE=E5=BE=A9UnoCSS=E7=9A=84HMR?= =?UTF-8?q?=E6=A8=A3=E5=BC=8F=E5=A4=B1=E6=95=88=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/inspectionProfiles/Project_Default.xml | 6 ------ electron.vite.config.mjs | 4 +++- src/renderer/src/App.jsx | 6 +++--- 3 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 .idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 03d9549..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs index 46abe7d..85f185b 100644 --- a/electron.vite.config.mjs +++ b/electron.vite.config.mjs @@ -16,6 +16,8 @@ export default defineConfig({ '@renderer': resolve('src/renderer/src') } }, - plugins: [solid(),UnoCSS(),] + plugins: [solid(),UnoCSS({ + mode: "per-module" + }),] } }) diff --git a/src/renderer/src/App.jsx b/src/renderer/src/App.jsx index 9d9dc74..902bb64 100644 --- a/src/renderer/src/App.jsx +++ b/src/renderer/src/App.jsx @@ -114,11 +114,11 @@ function App() { const [toolbarItems, setToolbarItems] = createSignal([ {type: 'button', icon: iconCursor, solidIcon: iconSolidCursor, name: "鼠標模式", action: "mouse"}, {type: 'button', icon: iconPen, solidIcon: iconSolidPen, name: "批註模式", action: "pen"}, - {type: 'button', icon: iconEraser, name: "橡皮擦模式"}, - {type: 'button', icon: iconTrash, name: "清空畫布"}, + {type: 'button', icon: iconEraser, name: "橡皮擦模式", action: "eraser"}, + {type: 'button', icon: iconTrash, name: "清空畫布", action: "clear"}, {type: "separator"}, {type: "button", icon: iconBlackBoard, name: "小黑板"}, - {type: "button", icon: iconShapes, name: "形狀與幾何工具"}, + {type: "button", icon: iconShapes, name: "形狀與幾何工具" , action: "geo"}, {type: "button", icon: iconUndo, name: "撤銷操作"}, {type: "button", icon: iconRedo, name: "重做操作"}, {type: "separator"},