diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100644 index 000000000..83fa775d5 --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,3 @@ +# 每次 git pull 之后, 安装依赖 + +pnpm install diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index 684f7b5bb..220e6e741 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -13,7 +13,7 @@ import { preferences } from '@vben-core/preferences'; import { $t } from '#/locales'; import { resetRoutes } from '#/router'; -import { useAppStore } from '#/store'; +import { useAccessStore, useAppStore } from '#/store'; const notifications = ref([ { @@ -81,6 +81,7 @@ const menus = computed(() => [ ]); const appStore = useAppStore(); +const { userInfo } = useAccessStore(); const router = useRouter(); async function handleLogout() { @@ -102,11 +103,11 @@ function handleMakeAll() { diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index e2bcaf988..9925e482c 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -27,12 +27,12 @@ export default defineConfig({ icons: [ { sizes: '192x192', - src: 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.1/source/pwa-icon-192.png', + src: 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.3/source/pwa-icon-192.png', type: 'image/png', }, { sizes: '512x512', - src: 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.1/source/pwa-icon-512.png', + src: 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.3/source/pwa-icon-512.png', type: 'image/png', }, ], diff --git a/internal/lint-configs/eslint-config/src/custom-config.ts b/internal/lint-configs/eslint-config/src/custom-config.ts index 11683fd26..8abe50f85 100644 --- a/internal/lint-configs/eslint-config/src/custom-config.ts +++ b/internal/lint-configs/eslint-config/src/custom-config.ts @@ -7,7 +7,7 @@ const restrictedImportIgnores = [ ]; const customConfig: Linter.FlatConfig[] = [ - // shadcn-ui 内部组件是自动生成的,这里忽略 + // shadcn-ui 内部组件是自动生成的,不做太多限制 { files: ['packages/@core/ui-kit/shadcn-ui/**/**'], rules: { @@ -61,7 +61,6 @@ const customConfig: Linter.FlatConfig[] = [ 'no-restricted-imports': [ 'error', { - // 如果需要,可以指定禁止特定的子路径 patterns: [ { group: ['@vben/*'], @@ -81,7 +80,6 @@ const customConfig: Linter.FlatConfig[] = [ 'no-restricted-imports': [ 'error', { - // 如果需要,可以指定禁止特定的子路径 patterns: [ { group: ['@vben/*', '@vben-core/*'], @@ -107,7 +105,6 @@ const customConfig: Linter.FlatConfig[] = [ 'no-restricted-imports': [ 'error', { - // 如果需要,可以指定禁止特定的子路径 patterns: [ { group: ['@vben/*'], diff --git a/packages/@core/forward/preferences/src/config.ts b/packages/@core/forward/preferences/src/config.ts index a0b58da55..e6bcd10fe 100644 --- a/packages/@core/forward/preferences/src/config.ts +++ b/packages/@core/forward/preferences/src/config.ts @@ -10,7 +10,7 @@ const defaultPreferences: Preferences = { compact: false, contentCompact: 'wide', defaultAvatar: - 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.0/source/avatar-v1.webp', + 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.3/source/avatar-v1.webp', dynamicTitle: true, enablePreferences: true, isMobile: false, @@ -46,7 +46,7 @@ const defaultPreferences: Preferences = { logo: { enable: true, source: - 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.0/source/logo-v1.webp', + 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.3/source/logo-v1.webp', }, navigation: { accordion: true, diff --git a/packages/@core/shared/iconify/build.config.ts b/packages/@core/shared/iconify/build.config.ts new file mode 100644 index 000000000..97e572c56 --- /dev/null +++ b/packages/@core/shared/iconify/build.config.ts @@ -0,0 +1,7 @@ +import { defineBuildConfig } from 'unbuild'; + +export default defineBuildConfig({ + clean: true, + declaration: true, + entries: ['src/index'], +}); diff --git a/packages/@core/shared/iconify/package.json b/packages/@core/shared/iconify/package.json index 9717f9ed9..2d607a3cc 100644 --- a/packages/@core/shared/iconify/package.json +++ b/packages/@core/shared/iconify/package.json @@ -10,14 +10,28 @@ }, "license": "MIT", "type": "module", + "scripts": { + "build": "pnpm unbuild", + "stub": "pnpm unbuild --stub" + }, "files": [ "dist" ], - "main": "./src/index.ts", - "module": "./src/index.ts", + "main": "./dist/index.mjs", + "module": "./dist/index.mjs", "exports": { ".": { - "default": "./src/index.ts" + "types": "./src/index.ts", + "development": "./src/index.ts", + "default": "./dist/index.mjs" + } + }, + "publishConfig": { + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.mjs" + } } }, "dependencies": { diff --git a/packages/business/widgets/src/preferences/blocks/layout/copyright.vue b/packages/business/widgets/src/preferences/blocks/layout/copyright.vue index cf4e292ad..35c3c6b1f 100644 --- a/packages/business/widgets/src/preferences/blocks/layout/copyright.vue +++ b/packages/business/widgets/src/preferences/blocks/layout/copyright.vue @@ -1,4 +1,6 @@ diff --git a/packages/business/widgets/src/preferences/preferences.vue b/packages/business/widgets/src/preferences/preferences.vue index 4958f4443..11d57f4ae 100644 --- a/packages/business/widgets/src/preferences/preferences.vue +++ b/packages/business/widgets/src/preferences/preferences.vue @@ -351,6 +351,7 @@ async function handleReset() { v-model:copyright-enable="copyrightEnable" v-model:copyright-icp="copyrightIcp" v-model:copyright-icp-link="copyrightIcpLink" + :disabled="!footerEnable" /> diff --git a/packages/constants/src/vben.ts b/packages/constants/src/vben.ts index 3ddc128b4..b642f3bfa 100644 --- a/packages/constants/src/vben.ts +++ b/packages/constants/src/vben.ts @@ -7,5 +7,5 @@ const VBEN_GITHUB_URL = 'https://github.com/vbenjs/vue-vben-admin'; * @zh_CN Vben Logo */ const VBEN_LOGO = - 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.1/source/logo-v1.webp'; + 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.3/source/logo-v1.webp'; export { VBEN_GITHUB_URL, VBEN_LOGO }; diff --git a/website/.vitepress/config.mts b/website/.vitepress/config.mts index 07fb20589..23afc7751 100644 --- a/website/.vitepress/config.mts +++ b/website/.vitepress/config.mts @@ -1,15 +1,35 @@ import { defineConfigWithTheme } from 'vitepress'; export default defineConfigWithTheme({ - description: 'Vben Admin Pro Doc', + description: 'Vben Admin Pro & 企业级管理系统框架', lang: 'zh-CN', + + locales: { + en: { + label: 'English', + lang: 'en', + link: '/en/index', + }, + root: { + label: '简体中文', + lang: 'zh-CN', + }, + }, srcDir: 'src', themeConfig: { + editLink: { + pattern: 'https://github.com/vbenjs/vue-vben-admin/edit/main/docs/:path', + text: 'Edit this page on GitHub', + }, + footer: { + copyright: 'Copyright © 2024-present Vben Admin Pro', + }, + i18nRouting: true, + logo: 'https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.3/source/logo-v1.webp', nav: [ { link: '/', text: 'Home' }, { link: '/markdown-examples', text: 'Examples' }, ], - sidebar: [ { text: 'Examples', @@ -19,12 +39,11 @@ export default defineConfigWithTheme({ ], }, ], - + siteTitle: 'Vben Admin Pro', socialLinks: [ - { icon: 'github', link: 'https://github.com/vuejs/vitepress' }, + { icon: 'github', link: 'https://github.com/vbenjs/vue-vben-admin' }, ], }, - title: 'Vben Admin Pro', vite: { build: { chunkSizeWarningLimit: Infinity, diff --git a/website/src/en/index.md b/website/src/en/index.md new file mode 100644 index 000000000..e7e437ee9 --- /dev/null +++ b/website/src/en/index.md @@ -0,0 +1,28 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home +sidebar: false + +hero: + name: 'Vben Admin Pro' + text: '企业级管理系统框架 - EN' + tagline: 开箱即用,简单高效 + image: + src: https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.3/source/logo-v1.webp + alt: Vben Admin Pro + actions: + - theme: brand + text: 开始 + link: /guide/ + - theme: alt + text: 在 GitHub 查看 + link: https://github.com/vbenjs/vue-vben-admin + +features: + - title: Feature A + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature B + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature C + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit +--- diff --git a/website/src/index.md b/website/src/index.md index dc471ced4..50a5474bb 100644 --- a/website/src/index.md +++ b/website/src/index.md @@ -1,18 +1,22 @@ --- # https://vitepress.dev/reference/default-theme-home-page layout: home +sidebar: false hero: - name: 'My Awesome Project' - text: 'A VitePress Site' - tagline: My great project tagline + name: 'Vben Admin Pro' + text: '企业级管理系统框架' + tagline: 开箱即用,简单高效 + image: + src: https://cdn.jsdelivr.net/npm/@vbenjs/static-source@0.1.3/source/logo-v1.webp + alt: Vben Admin Pro actions: - theme: brand - text: Markdown Examples - link: /markdown-examples + text: 开始 + link: /guide/ - theme: alt - text: API Examples - link: /api-examples + text: 在 GitHub 查看 + link: https://github.com/vbenjs/vue-vben-admin features: - title: Feature A