diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 8a41045e..c9342d9a 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -43,7 +43,7 @@ "@vben/utils": "workspace:*", "@vueuse/core": "^10.11.0", "ant-design-vue": "^4.2.3", - "dayjs": "^1.11.11", + "dayjs": "^1.11.12", "pinia": "2.1.7", "vue": "^3.4.32", "vue-router": "^4.4.0" diff --git a/apps/web-antd/src/locales/langs/en-US.json b/apps/web-antd/src/locales/langs/en-US.json index d04c4323..4bac56fd 100644 --- a/apps/web-antd/src/locales/langs/en-US.json +++ b/apps/web-antd/src/locales/langs/en-US.json @@ -27,6 +27,12 @@ "embedded": "Embedded", "externalLink": "External Link" }, + "badge": { + "title": "Menu Badge", + "dot": "Dot Badge", + "text": "Text Badge", + "color": "Badge Color" + }, "fallback": { "title": "Fallback Page" }, "features": { "title": "Features", diff --git a/apps/web-antd/src/locales/langs/zh-CN.json b/apps/web-antd/src/locales/langs/zh-CN.json index 040d467d..b91679d1 100644 --- a/apps/web-antd/src/locales/langs/zh-CN.json +++ b/apps/web-antd/src/locales/langs/zh-CN.json @@ -27,6 +27,12 @@ "embedded": "内嵌", "externalLink": "外链" }, + "badge": { + "title": "菜单徽标", + "dot": "点徽标", + "text": "文本徽标", + "color": "徽标颜色" + }, "fallback": { "title": "缺省页" }, diff --git a/apps/web-antd/src/router/routes/modules/demos.ts b/apps/web-antd/src/router/routes/modules/demos.ts index c46f050d..66ad37d9 100644 --- a/apps/web-antd/src/router/routes/modules/demos.ts +++ b/apps/web-antd/src/router/routes/modules/demos.ts @@ -177,6 +177,48 @@ const routes: RouteRecordRaw[] = [ }, ], }, + { + meta: { + icon: 'lucide:circle-dot', + title: $t('page.demos.badge.title'), + }, + name: 'BadgeDemo', + path: 'badge', + redirect: '/demos/badge/dot', + children: [ + { + name: 'BadgeDotDemo', + component: () => import('#/views/demos/badge/index.vue'), + path: 'dot', + meta: { + badgeType: 'dot', + icon: 'lucide:square-dot', + title: $t('page.demos.badge.dot'), + }, + }, + { + name: 'BadgeTextDemo', + component: () => import('#/views/demos/badge/index.vue'), + path: 'text', + meta: { + badge: 'New', + icon: 'lucide:square-dot', + title: $t('page.demos.badge.text'), + }, + }, + { + name: 'BadgeColorDemo', + component: () => import('#/views/demos/badge/index.vue'), + path: 'color', + meta: { + badge: 'Hot', + badgeVariants: 'destructive', + icon: 'lucide:square-dot', + title: $t('page.demos.badge.color'), + }, + }, + ], + }, { meta: { icon: 'ic:round-settings-input-composite', diff --git a/apps/web-antd/src/views/demos/badge/index.vue b/apps/web-antd/src/views/demos/badge/index.vue new file mode 100644 index 00000000..b5e19c24 --- /dev/null +++ b/apps/web-antd/src/views/demos/badge/index.vue @@ -0,0 +1,9 @@ + + + diff --git a/internal/node-utils/package.json b/internal/node-utils/package.json index 5cce0161..4625bab2 100644 --- a/internal/node-utils/package.json +++ b/internal/node-utils/package.json @@ -31,7 +31,7 @@ "@changesets/git": "^3.0.0", "@manypkg/get-packages": "^2.2.2", "consola": "^3.2.3", - "dayjs": "^1.11.11", + "dayjs": "^1.11.12", "find-up": "^7.0.0", "nanoid": "^5.0.7", "pkg-types": "^1.1.3", diff --git a/internal/tailwind-config/package.json b/internal/tailwind-config/package.json index a13c7ee5..a6959f26 100644 --- a/internal/tailwind-config/package.json +++ b/internal/tailwind-config/package.json @@ -47,7 +47,7 @@ "tailwindcss": "^3.4.3" }, "dependencies": { - "@iconify/json": "^2.2.228", + "@iconify/json": "^2.2.229", "@iconify/tailwind": "^1.1.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/nesting": "0.0.0-insiders.565cd3e", diff --git a/internal/tailwind-config/src/index.ts b/internal/tailwind-config/src/index.ts index 0cbe5745..9c5eeab8 100644 --- a/internal/tailwind-config/src/index.ts +++ b/internal/tailwind-config/src/index.ts @@ -32,7 +32,7 @@ const shadcnUiColors = { }, background: { DEFAULT: 'hsl(var(--background))', - content: 'hsl(var(--background-content))', + deep: 'hsl(var(--background-deep))', }, border: { DEFAULT: 'hsl(var(--border))', diff --git a/internal/vite-config/package.json b/internal/vite-config/package.json index 9bd1ca09..f2b672a7 100644 --- a/internal/vite-config/package.json +++ b/internal/vite-config/package.json @@ -41,7 +41,7 @@ "@vben/node-utils": "workspace:*", "@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue-jsx": "^4.0.0", - "dayjs": "^1.11.11", + "dayjs": "^1.11.12", "dotenv": "^16.4.5", "rollup": "^4.18.1", "rollup-plugin-visualizer": "^5.12.0", diff --git a/package.json b/package.json index b685ec8a..c56113eb 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@vue/test-utils": "^2.4.6", "cross-env": "^7.0.3", "cspell": "^8.11.0", - "husky": "^9.1.0", + "husky": "^9.1.1", "is-ci": "^3.0.1", "jsdom": "^24.1.0", "rimraf": "^6.0.1", diff --git a/packages/@core/forward/preferences/src/config.ts b/packages/@core/forward/preferences/src/config.ts index 99243679..926511a4 100644 --- a/packages/@core/forward/preferences/src/config.ts +++ b/packages/@core/forward/preferences/src/config.ts @@ -61,7 +61,7 @@ const defaultPreferences: Preferences = { }, sidebar: { collapsed: false, - collapsedShowTitle: true, + collapsedShowTitle: false, enable: true, expandOnHover: true, extraCollapse: true, diff --git a/packages/@core/forward/preferences/src/use-preferences.ts b/packages/@core/forward/preferences/src/use-preferences.ts index e3b6e9cc..e8a80f05 100644 --- a/packages/@core/forward/preferences/src/use-preferences.ts +++ b/packages/@core/forward/preferences/src/use-preferences.ts @@ -84,6 +84,10 @@ function usePreferences() { return isMixedNav.value || isSideMixedNav.value || isSideNav.value; }); + const sidebarCollapsed = computed(() => { + return preferences.sidebar.collapsed; + }); + /** * @zh_CN 是否开启keep-alive * 在tabs可见以及开启keep-alive的情况下才开启 @@ -172,6 +176,7 @@ function usePreferences() { isSideNav, keepAlive, layout, + sidebarCollapsed, theme, }; } diff --git a/packages/@core/shared/design/src/css/global.css b/packages/@core/shared/design/src/css/global.css index a03a5f93..a99ff671 100644 --- a/packages/@core/shared/design/src/css/global.css +++ b/packages/@core/shared/design/src/css/global.css @@ -23,14 +23,14 @@ scroll-behavior: smooth; text-rendering: optimizelegibility; -webkit-tap-highlight-color: transparent; - } - html.invert-mode { - @apply invert; - } + &.invert-mode { + @apply invert; + } - html.grayscale-mode { - @apply grayscale; + &.grayscale-mode { + @apply grayscale; + } } #app, @@ -41,7 +41,8 @@ body { min-height: 100vh; - overflow: overlay; + + /* overflow: overlay; */ -webkit-font-smoothing: antialiased; } diff --git a/packages/@core/shared/design/src/design-tokens/dark/index.css b/packages/@core/shared/design/src/design-tokens/dark/index.css index 79f84b4e..3283e234 100644 --- a/packages/@core/shared/design/src/design-tokens/dark/index.css +++ b/packages/@core/shared/design/src/design-tokens/dark/index.css @@ -5,7 +5,7 @@ --background: 222.34deg 10.43% 12.27%; /* 主体区域背景色 */ - --background-content: 220deg 13.06% 9%; + --background-deep: 220deg 13.06% 9%; --foreground: 220 13% 91%; /* Background color for */ @@ -95,7 +95,7 @@ .dark[data-theme='violet'], [data-theme='violet'] .dark { --background: 224 71.4% 4.1%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 210 20% 98%; --card: 224 71.4% 4.1%; --card-foreground: 210 20% 98%; @@ -120,7 +120,7 @@ .dark[data-theme='pink'], [data-theme='pink'] .dark { --background: 20 14.3% 4.1%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 0 0% 95%; --card: 24 9.8% 10%; --card-foreground: 0 0% 95%; @@ -145,7 +145,7 @@ .dark[data-theme='rose'], [data-theme='rose'] .dark { --background: 0 0% 3.9%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 0 0% 98%; --card: 0 0% 3.9%; --card-foreground: 0 0% 98%; @@ -170,7 +170,7 @@ .dark[data-theme='sky-blue'], [data-theme='sky-blue'] .dark { --background: 222.2 84% 4.9%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 210 40% 98%; --card: 222.2 84% 4.9%; --card-foreground: 210 40% 98%; @@ -195,7 +195,7 @@ .dark[data-theme='deep-blue'], [data-theme='deep-blue'] .dark { --background: 222.2 84% 4.9%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 210 40% 98%; --card: 222.2 84% 4.9%; --card-foreground: 210 40% 98%; @@ -220,7 +220,7 @@ .dark[data-theme='green'], [data-theme='green'] .dark { --background: 20 14.3% 4.1%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 0 0% 95%; --card: 24 9.8% 10%; --card-foreground: 0 0% 95%; @@ -245,7 +245,7 @@ .dark[data-theme='deep-green'], [data-theme='deep-green'] .dark { --background: 20 14.3% 4.1%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 0 0% 95%; --card: 24 9.8% 10%; --card-foreground: 0 0% 95%; @@ -270,7 +270,7 @@ .dark[data-theme='orange'], [data-theme='orange'] .dark { --background: 20 14.3% 4.1%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 60 9.1% 97.8%; --card: 20 14.3% 4.1%; --card-foreground: 60 9.1% 97.8%; @@ -295,7 +295,7 @@ .dark[data-theme='yellow'], [data-theme='yellow'] .dark { --background: 20 14.3% 4.1%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 60 9.1% 97.8%; --card: 20 14.3% 4.1%; --card-foreground: 60 9.1% 97.8%; @@ -320,7 +320,7 @@ .dark[data-theme='zinc'], [data-theme='zinc'] .dark { --background: 240 10% 3.9%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 0 0% 98%; --card: 240 10% 3.9%; --card-foreground: 0 0% 98%; @@ -345,7 +345,7 @@ .dark[data-theme='neutral'], [data-theme='neutral'] .dark { --background: 0 0% 3.9%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 0 0% 98%; --card: 0 0% 3.9%; --card-foreground: 0 0% 98%; @@ -370,7 +370,7 @@ .dark[data-theme='slate'], [data-theme='slate'] .dark { --background: 222.2 84% 4.9%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 210 40% 98%; --card: 222.2 84% 4.9%; --card-foreground: 210 40% 98%; @@ -395,7 +395,7 @@ .dark[data-theme='gray'], [data-theme='gray'] .dark { --background: 224 71.4% 4.1%; - --background-content: var(--background); + --background-deep: var(--background); --foreground: 210 20% 98%; --card: 224 71.4% 4.1%; --card-foreground: 210 20% 98%; diff --git a/packages/@core/shared/design/src/design-tokens/default/index.css b/packages/@core/shared/design/src/design-tokens/default/index.css index 485dafd0..01e832b6 100644 --- a/packages/@core/shared/design/src/design-tokens/default/index.css +++ b/packages/@core/shared/design/src/design-tokens/default/index.css @@ -8,7 +8,7 @@ --background: 0 0 100%; /* 主体区域背景色 */ - --background-content: 210 11.11% 96.47%; + --background-deep: 210 11.11% 96.47%; --foreground: 210 6% 21%; /* Background color for */ @@ -74,7 +74,7 @@ /* ============= custom ============= */ /* 遮罩颜色 */ - --overlay: 0deg 0% 0% / 40%; + --overlay: 0deg 0% 0% / 30%; /* 基本文字大小 */ --font-size-base: 16px; diff --git a/packages/@core/ui-kit/layout-ui/src/components/layout-content.vue b/packages/@core/ui-kit/layout-ui/src/components/layout-content.vue index a107613f..7f00d6de 100644 --- a/packages/@core/ui-kit/layout-ui/src/components/layout-content.vue +++ b/packages/@core/ui-kit/layout-ui/src/components/layout-content.vue @@ -9,50 +9,20 @@ import { useContentHeightListener } from '@vben-core/hooks'; interface Props { /** * 内容区域定宽 - * @default 'wide' */ - contentCompact?: ContentCompactType; + contentCompact: ContentCompactType; /** * 定宽布局宽度 - * @default 1200 */ - contentCompactWidth?: number; - /** - * padding - * @default 16 - */ - padding?: number; - /** - * paddingBottom - * @default 16 - */ - paddingBottom?: number; - /** - * paddingLeft - * @default 16 - */ - paddingLeft?: number; - /** - * paddingRight - * @default 16 - */ - paddingRight?: number; - /** - * paddingTop - * @default 16 - */ - paddingTop?: number; + contentCompactWidth: number; + padding: number; + paddingBottom: number; + paddingLeft: number; + paddingRight: number; + paddingTop: number; } -const props = withDefaults(defineProps(), { - contentCompact: 'wide', - contentCompactWidth: 1200, - padding: 16, - paddingBottom: 16, - paddingLeft: 16, - paddingRight: 16, - paddingTop: 16, -}); +const props = withDefaults(defineProps(), {}); const { contentElement } = useContentHeightListener(); @@ -83,7 +53,7 @@ const style = computed((): CSSProperties => { diff --git a/packages/@core/ui-kit/layout-ui/src/components/layout-footer.vue b/packages/@core/ui-kit/layout-ui/src/components/layout-footer.vue index a788ab6d..d4fb16f3 100644 --- a/packages/@core/ui-kit/layout-ui/src/components/layout-footer.vue +++ b/packages/@core/ui-kit/layout-ui/src/components/layout-footer.vue @@ -4,38 +4,21 @@ import { computed } from 'vue'; interface Props { /** - * 是否固定在顶部 - * @default true + * 是否固定在底部 */ fixed?: boolean; - /** - * 高度 - * @default 32 - */ - height?: number; + height: number; /** * 是否显示 * @default true */ show?: boolean; - /** - * 高度 - * @default 100% - */ - width?: string; - /** - * zIndex - * @default 0 - */ - zIndex?: number; + width: string; + zIndex: number; } const props = withDefaults(defineProps(), { - fixed: true, - height: 32, show: true, - width: '100%', - zIndex: 0, }); const style = computed((): CSSProperties => { @@ -53,7 +36,7 @@ const style = computed((): CSSProperties => {