Skip to content

Commit

Permalink
perf: 提升 unocss 样式优先级
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Dec 9, 2024
1 parent 170269e commit e05e94f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { router } from "@/router"
import { installPlugins } from "@/plugins"
import App from "@/App.vue"
// css
import "uno.css"
import "normalize.css"
import "nprogress/nprogress.css"
import "element-plus/theme-chalk/dark/css-vars.css"
import "vxe-table/lib/style.css"
import "@@/assets/styles/index.scss"
import "uno.css"

// 创建应用实例
const app = createApp(App)
Expand Down
4 changes: 3 additions & 1 deletion unocss.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export default defineConfig({
// 属性化模式 & 无值的属性模式
presetAttributify(),
// 默认预设
presetUno()
presetUno({
important: true
})
],
// 自定义规则
rules: [["uno-padding-20", { padding: "20px" }]],
Expand Down

0 comments on commit e05e94f

Please sign in to comment.