Phase 007: migrate every remaining view from naive-ui to Arco Design Vue
The project now has exactly one UI library. Every naive-ui component in
packages/client/src is replaced by its Arco equivalent across 24 views and
roughly 80 components, and naive-ui is dropped from package.json along with
its transitive vueuc / @css-render / vdirs / seemly dependencies.
The migration is rendering-layer only. No store logic, no API contract, and
no /chat-run payload was touched.
Three classes of leftover were invisible to `grep naive-ui` and are now
covered by tests/client/no-naive-ui.test.ts, which asserts all three:
- dead .n-* class names in style blocks
- dead --n-* custom properties
- naive-ui in package.json
Notable behavioural traps handled along the way, recorded in
docs/arco-migration-rules.md:
- a-input-password defaults to masked; passing default-visibility="false"
would have exposed API keys in clear text
- a-upload fires a real XHR unless auto-upload is false
- nested Trigger components fight over the first element child, so the
group-chat settings dropdown was flattened
- Arco renders tooltip default-slot text inline, which was silently
collapsing the chat and group-chat toolbars
This commit is contained in:
+6
-4
@@ -68,12 +68,14 @@ export default defineConfig({
|
||||
return 'xterm'
|
||||
}
|
||||
if (id.includes('node_modules')) {
|
||||
// Arco 必须排在 vue 之前:它的 scope 名是 @arco-design/web-vue,
|
||||
// 含 "vue" 子串,放在后面会被 vue-vendor 先吃掉。
|
||||
if (id.includes('@arco-design')) {
|
||||
return 'ui-vendor'
|
||||
}
|
||||
if (id.includes('vue') || id.includes('pinia') || id.includes('vue-router')) {
|
||||
return 'vue-vendor'
|
||||
}
|
||||
if (id.includes('naive-ui')) {
|
||||
return 'ui-vendor'
|
||||
}
|
||||
return 'vendor'
|
||||
}
|
||||
},
|
||||
@@ -92,7 +94,7 @@ export default defineConfig({
|
||||
'vue',
|
||||
'vue-router',
|
||||
'pinia',
|
||||
'naive-ui',
|
||||
'@arco-design/web-vue',
|
||||
],
|
||||
},
|
||||
server: {
|
||||
|
||||
Reference in New Issue
Block a user