[fix]修復UnoCSS的HMR樣式失效問題

This commit is contained in:
Dubi906w 2024-04-27 16:41:33 +08:00
parent 3f1696cb7e
commit 626a0bea81
3 changed files with 6 additions and 10 deletions

View File

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

View File

@ -16,6 +16,8 @@ export default defineConfig({
'@renderer': resolve('src/renderer/src')
}
},
plugins: [solid(),UnoCSS(),]
plugins: [solid(),UnoCSS({
mode: "per-module"
}),]
}
})

View File

@ -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"},