admin-panel: upgrade to ant-design-vue 4.2.6
- Bump ant-design-vue 3.2.20 -> 4.2.6, @ant-design/icons-vue 6.1.0 -> 7.0.1. - ADV4 removed LESS theming (modifyVars) for CSS-in-JS design tokens: drop the vite.config.ts modifyVars block and the antd.less import; move the three tokens ant actually consumed (primary/link/border-radius) to App.vue's <a-config-provider :theme>. - Delete src/assets/styles/ant.less (426 lines of hand-written RTL flips): ADV4 renders RTL natively via CSS logical properties given direction="rtl", which App.vue already sets. Preserve only the small residue ADV4 doesn't cover natively (upload filename LTR, select dropdown z-index, tabs nav direction) in a new rtl-overrides.css. - Clean up the stale --primary/--accent token comment in utilities.less now that ant.less is gone. - Verified: pnpm build (vue-tsc -b && vite build) passes with zero errors; the codebase already used v-model:open everywhere (no ADV3 visible prop usage to migrate). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
8fac6a3f36
commit
7e30701570
@@ -15,15 +15,21 @@
|
||||
// ─────────────────────────────────────────────────────────────────────────
|
||||
|
||||
// ── Design tokens ────────────────────────────────────────────────────
|
||||
// Legacy themeConfig.js + vue.config.js modifyVars. These are also fed to the
|
||||
// ant LESS build in vite.config.ts; declaring them here as custom properties
|
||||
// makes them reachable from plain CSS too (App.vue:65 reads --primary-color).
|
||||
// Legacy themeConfig.js + vue.config.js modifyVars. `--primary-color` is also
|
||||
// fed to ant itself via App.vue's <a-config-provider :theme> (ant-design-vue 4
|
||||
// replaced LESS modifyVars with CSS-in-JS design tokens); declaring it here as
|
||||
// a custom property keeps it reachable from plain CSS too (App.vue reads it).
|
||||
//
|
||||
// NOTE ant.less:5-7 declares `--primary: #41b883` / `--accent: #35495e` —
|
||||
// `--secondary-color` / `--third-color` were never real ant LESS variables
|
||||
// (confirmed dead in the old build — ant never consumed them), so they exist
|
||||
// only here for application code to use directly; they are not passed to
|
||||
// ConfigProvider.
|
||||
//
|
||||
// The old ant.less also declared `--primary: #41b883` / `--accent: #35495e` —
|
||||
// ant-design-pro boilerplate in Vue's own palette, inherited verbatim from
|
||||
// legacy. `--accent` drives @border-color-base, i.e. EVERY ant border. It is
|
||||
// left alone here (changing it is a visual decision, not a bug fix), but the
|
||||
// Henza tokens below are what application code should use.
|
||||
// legacy and used as `@border-color-base`. That file is deleted (ADV4 has no
|
||||
// LESS build to feed); nothing in the app should reference `--primary`/
|
||||
// `--accent` any more — use the Henza tokens below instead.
|
||||
:root {
|
||||
--primary-color: #1c2d56;
|
||||
--secondary-color: #836447;
|
||||
|
||||
Reference in New Issue
Block a user