Skip to content

Commit 412a504

Browse files
committed
feat(app): 添加 shadcn-vue 配置并更新依赖项
新增 `components.json` 文件以配置 shadcn-vue 组件库,包括样式、TypeScript、Tailwind CSS 和图标库等设置。同时在 `package.json` 中添加相关依赖和脚本命令,并引入 `resolveUnref` 到 ESLint 自动导入配置中。此外,移除了旧版 SidebarMenu 组件。
1 parent 3118021 commit 412a504

File tree

11 files changed

+782
-130
lines changed

11 files changed

+782
-130
lines changed

app/.eslintrc-auto-import.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@
310310
"watchThrottled": true,
311311
"watchTriggerable": true,
312312
"watchWithFilter": true,
313-
"whenever": true
313+
"whenever": true,
314+
"resolveUnref": true
314315
}
315316
}

app/components.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://shadcn-vue.com/schema.json",
3+
"style": "new-york",
4+
"typescript": true,
5+
"tailwind": {
6+
"config": "",
7+
"css": "src/style.css",
8+
"baseColor": "neutral",
9+
"cssVariables": true,
10+
"prefix": ""
11+
},
12+
"iconLibrary": "lucide",
13+
"aliases": {
14+
"components": "@/shadcn/components",
15+
"utils": "@/shadcn/lib/utils",
16+
"ui": "@/shadcn/components/ui",
17+
"lib": "@/shadcn/lib",
18+
"composables": "@/shadcn/composables"
19+
},
20+
"registries": {}
21+
}

app/components/SidebarMenu.vue

Lines changed: 0 additions & 93 deletions
This file was deleted.

app/package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,33 @@
1717
"scripts": {
1818
"dev": "vite",
1919
"build": "vue-tsc --noEmit && NODE_OPTIONS=--max_old_space_size=4096 vite build",
20-
"preview": "vite preview --port 5050"
20+
"preview": "vite preview --port 5050",
21+
"shadcn-vue": "pnpm dlx shadcn-vue@latest add button"
2122
},
2223
"dependencies": {
2324
"@tabler/icons-vue": "^3.28.1",
25+
"@tailwindcss/vite": "^4.1.17",
2426
"@vicons/material": "^0.13.0",
2527
"@vicons/tabler": "^0.13.0",
2628
"@vueuse/core": "^14.1.0",
2729
"@vueuse/head": "^2.0.0",
2830
"@vueuse/router": "^14.1.0",
2931
"axios": "^1.13.2",
3032
"change-case": "^4.1.2",
33+
"class-variance-authority": "^0.7.1",
34+
"clsx": "^2.1.1",
3135
"colord": "^2.9.3",
3236
"cronstrue": "^2.52.0",
3337
"date-fns": "^4.1.0",
3438
"figue": "^1.2.0",
3539
"fuse.js": "^6.6.2",
3640
"lodash": "^4.17.21",
41+
"lucide-vue-next": "^0.556.0",
3742
"naive-ui": "^2.43.2",
3843
"pinia": "^3.0.4",
44+
"reka-ui": "^2.6.1",
45+
"tailwind-merge": "^3.4.0",
46+
"tailwindcss": "^4.1.17",
3947
"unplugin-auto-import": "^20.3.0",
4048
"vue": "^3.5.25",
4149
"vue-router": "^4.5.0",
@@ -50,7 +58,7 @@
5058
"@types/lodash": "^4.17.14",
5159
"@types/mime-types": "^2.1.4",
5260
"@types/netmask": "^2.0.5",
53-
"@types/node": "^18.19.70",
61+
"@types/node": "^18.19.130",
5462
"@unocss/eslint-config": "^0.57.7",
5563
"@vitejs/plugin-vue": "^4.6.2",
5664
"@vitejs/plugin-vue-jsx": "^3.1.0",
@@ -62,6 +70,7 @@
6270
"iconv-lite": "^0.6.3",
6371
"less": "^4.2.1",
6472
"prettier": "^3.4.2",
73+
"tw-animate-css": "^1.4.0",
6574
"typescript": "~5.2.2",
6675
"unocss": "^0.65.4",
6776
"unocss-preset-scrollbar": "^0.2.1",

0 commit comments

Comments
 (0)