This commit is contained in:
dap 2025-02-04 18:40:47 +08:00
commit 00c4501d13
8 changed files with 86 additions and 74 deletions

View File

@ -58,7 +58,7 @@ const dashboardMenus = [
title: 'page.dashboard.title', title: 'page.dashboard.title',
}, },
name: 'Dashboard', name: 'Dashboard',
path: '/', path: '/dashboard',
redirect: '/analytics', redirect: '/analytics',
children: [ children: [
{ {

View File

@ -231,19 +231,17 @@ function createRequestClient(baseURL: string) {
}, },
}); });
// response数据解构 // 处理返回的响应数据格式。会根据responseReturn指定的类型返回对应的数据
client.addResponseInterceptor<HttpResponse>({ client.addResponseInterceptor(
fulfilled: (response) => { defaultResponseInterceptor({
const { data: responseData, status } = response; // 指定接口返回的数据中的 code 字段名
codeField: 'code',
const { code, data } = responseData; // 指定接口返回的数据中装载了主要数据的字段名
dataField: 'data',
if (status >= 200 && status < 400 && code === 0) { // 请求成功的 code 值,如果接口返回的 code 等于 successCode 则会认为是成功的请求
return data; successCode: 0,
} }),
throw Object.assign({}, response, { response }); );
},
});
// token过期的处理 // token过期的处理
client.addResponseInterceptor( client.addResponseInterceptor(

View File

@ -296,7 +296,7 @@ const { hasAccessByRoles } = useAccess();
#### 指令方式 #### 指令方式
> 指令支持绑定单个或多个权限码。单个时可以直接传入字符串或数组中包含一个权限码,多个权限码则传入数组。 > 指令支持绑定单个或多个角色。单个时可以直接传入字符串或数组中包含一个角色,多个角色均可访问则传入数组。
```vue ```vue
<template> <template>

View File

@ -95,7 +95,7 @@
"node": ">=20.10.0", "node": ">=20.10.0",
"pnpm": ">=9.12.0" "pnpm": ">=9.12.0"
}, },
"packageManager": "pnpm@9.15.3", "packageManager": "pnpm@9.15.5",
"pnpm": { "pnpm": {
"peerDependencyRules": { "peerDependencyRules": {
"allowedVersions": { "allowedVersions": {

View File

@ -329,10 +329,14 @@ function autofocus() {
v-bind="createComponentProps(slotProps)" v-bind="createComponentProps(slotProps)"
:disabled="shouldDisabled" :disabled="shouldDisabled"
> >
<template v-for="name in renderContentKey" :key="name" #[name]> <template
v-for="name in renderContentKey"
:key="name"
#[name]="renderSlotProps"
>
<VbenRenderContent <VbenRenderContent
:content="customContentRender[name]" :content="customContentRender[name]"
v-bind="slotProps" v-bind="{ ...renderSlotProps, $formContext: slotProps }"
/> />
</template> </template>
<!-- <slot></slot> --> <!-- <slot></slot> -->

View File

@ -13,15 +13,25 @@
} }
/* * 修复按钮添加图标时的位置问题 */ /* * 修复按钮添加图标时的位置问题 */
svg { > svg {
display: inline-block; display: inline-block;
} }
svg + span { > svg + span {
margin-inline-start: 6px; margin-inline-start: 6px;
} }
} }
.ant-tag {
> svg {
display: inline-block;
}
> svg + span {
margin-inline-start: 4px;
}
}
.ant-message-notice-content, .ant-message-notice-content,
.ant-notification-notice { .ant-notification-notice {
@apply dark:border-border/60 dark:border; @apply dark:border-border/60 dark:border;

View File

@ -254,7 +254,7 @@ function goDoc() {
<p class="mb-4"> <p class="mb-4">
指令形式使用比较简洁直接在需要展示tooltip的组件上用v-tippy传递配置适用于固定内容的工具提示 指令形式使用比较简洁直接在需要展示tooltip的组件上用v-tippy传递配置适用于固定内容的工具提示
</p> </p>
<Flex warp="warp" gap="20"> <Flex warp="warp" gap="20" align="center">
<Button v-tippy="'这是一个提示,使用了默认的配置'">默认配置</Button> <Button v-tippy="'这是一个提示,使用了默认的配置'">默认配置</Button>
<Button <Button

View File

@ -15,43 +15,43 @@ packages:
catalog: catalog:
'@ast-grep/napi': ^0.32.3 '@ast-grep/napi': ^0.32.3
'@changesets/changelog-github': ^0.5.0 '@changesets/changelog-github': ^0.5.0
'@changesets/cli': ^2.27.11 '@changesets/cli': ^2.27.12
'@changesets/git': ^3.0.2 '@changesets/git': ^3.0.2
'@clack/prompts': ^0.9.1 '@clack/prompts': ^0.9.1
'@commitlint/cli': ^19.6.1 '@commitlint/cli': ^19.7.1
'@commitlint/config-conventional': ^19.6.0 '@commitlint/config-conventional': ^19.7.1
'@ctrl/tinycolor': ^4.1.0 '@ctrl/tinycolor': ^4.1.0
'@eslint/js': ^9.17.0 '@eslint/js': ^9.19.0
'@faker-js/faker': ^9.3.0 '@faker-js/faker': ^9.4.0
'@iconify/json': ^2.2.293 '@iconify/json': ^2.2.302
'@iconify/tailwind': ^1.2.0 '@iconify/tailwind': ^1.2.0
'@iconify/vue': ^4.3.0 '@iconify/vue': ^4.3.0
'@intlify/core-base': ^11.0.1 '@intlify/core-base': ^11.1.0
'@intlify/unplugin-vue-i18n': ^6.0.3 '@intlify/unplugin-vue-i18n': ^6.0.3
'@jspm/generator': ^2.4.2 '@jspm/generator': ^2.4.2
'@manypkg/get-packages': ^2.2.2 '@manypkg/get-packages': ^2.2.2
'@nolebase/vitepress-plugin-git-changelog': ^2.12.0 '@nolebase/vitepress-plugin-git-changelog': ^2.12.1
'@playwright/test': ^1.49.1 '@playwright/test': ^1.50.1
'@pnpm/workspace.read-manifest': ^1000.0.1 '@pnpm/workspace.read-manifest': ^1000.0.2
'@stylistic/stylelint-plugin': ^3.1.1 '@stylistic/stylelint-plugin': ^3.1.1
'@tailwindcss/nesting': 0.0.0-insiders.565cd3e '@tailwindcss/nesting': 0.0.0-insiders.565cd3e
'@tailwindcss/typography': ^0.5.16 '@tailwindcss/typography': ^0.5.16
'@tanstack/vue-query': ^5.62.16 '@tanstack/vue-query': ^5.65.0
'@tanstack/vue-store': ^0.7.0 '@tanstack/vue-store': ^0.7.0
'@types/archiver': ^6.0.3 '@types/archiver': ^6.0.3
'@types/eslint': ^9.6.1 '@types/eslint': ^9.6.1
'@types/html-minifier-terser': ^7.0.2 '@types/html-minifier-terser': ^7.0.2
'@types/jsonwebtoken': ^9.0.7 '@types/jsonwebtoken': ^9.0.8
'@types/lodash.clonedeep': ^4.5.9 '@types/lodash.clonedeep': ^4.5.9
'@types/lodash.get': ^4.4.9 '@types/lodash.get': ^4.4.9
'@types/lodash.isequal': ^4.5.8 '@types/lodash.isequal': ^4.5.8
'@types/node': ^22.10.5 '@types/node': ^22.13.1
'@types/nprogress': ^0.2.3 '@types/nprogress': ^0.2.3
'@types/postcss-import': ^14.0.3 '@types/postcss-import': ^14.0.3
'@types/qrcode': ^1.5.5 '@types/qrcode': ^1.5.5
'@types/sortablejs': ^1.15.8 '@types/sortablejs': ^1.15.8
'@typescript-eslint/eslint-plugin': ^8.19.1 '@typescript-eslint/eslint-plugin': ^8.23.0
'@typescript-eslint/parser': ^8.19.1 '@typescript-eslint/parser': ^8.23.0
'@vee-validate/zod': ^4.15.0 '@vee-validate/zod': ^4.15.0
'@vite-pwa/vitepress': ^0.5.3 '@vite-pwa/vitepress': ^0.5.3
'@vitejs/plugin-vue': ^5.2.1 '@vitejs/plugin-vue': ^5.2.1
@ -59,8 +59,8 @@ catalog:
'@vue/reactivity': ^3.5.13 '@vue/reactivity': ^3.5.13
'@vue/shared': ^3.5.13 '@vue/shared': ^3.5.13
'@vue/test-utils': ^2.4.6 '@vue/test-utils': ^2.4.6
'@vueuse/core': ^12.3.0 '@vueuse/core': ^12.5.0
'@vueuse/integrations': ^12.3.0 '@vueuse/integrations': ^12.5.0
ant-design-vue: ^4.2.6 ant-design-vue: ^4.2.6
archiver: ^7.0.1 archiver: ^7.0.1
autoprefixer: ^10.4.20 autoprefixer: ^10.4.20
@ -73,9 +73,9 @@ catalog:
class-variance-authority: ^0.7.1 class-variance-authority: ^0.7.1
clsx: ^2.1.1 clsx: ^2.1.1
commitlint-plugin-function-rules: ^4.0.1 commitlint-plugin-function-rules: ^4.0.1
consola: ^3.3.3 consola: ^3.4.0
cross-env: ^7.0.3 cross-env: ^7.0.3
cspell: ^8.17.1 cspell: ^8.17.3
cssnano: ^7.0.6 cssnano: ^7.0.6
cz-git: ^1.11.0 cz-git: ^1.11.0
czg: ^1.11.0 czg: ^1.11.0
@ -84,18 +84,18 @@ catalog:
depcheck: ^1.4.7 depcheck: ^1.4.7
dotenv: ^16.4.7 dotenv: ^16.4.7
echarts: ^5.6.0 echarts: ^5.6.0
element-plus: ^2.9.2 element-plus: ^2.9.3
eslint: ^9.17.0 eslint: ^9.19.0
eslint-config-turbo: ^2.3.3 eslint-config-turbo: ^2.4.0
eslint-plugin-command: ^0.2.7 eslint-plugin-command: ^0.2.7
eslint-plugin-eslint-comments: ^3.2.0 eslint-plugin-eslint-comments: ^3.2.0
eslint-plugin-import-x: ^4.6.1 eslint-plugin-import-x: ^4.6.1
eslint-plugin-jsdoc: ^50.6.1 eslint-plugin-jsdoc: ^50.6.3
eslint-plugin-jsonc: ^2.18.2 eslint-plugin-jsonc: ^2.19.1
eslint-plugin-n: ^17.15.1 eslint-plugin-n: ^17.15.1
eslint-plugin-no-only-tests: ^3.3.0 eslint-plugin-no-only-tests: ^3.3.0
eslint-plugin-perfectionist: ^4.6.0 eslint-plugin-perfectionist: ^4.8.0
eslint-plugin-prettier: ^5.2.1 eslint-plugin-prettier: ^5.2.3
eslint-plugin-regexp: ^2.7.0 eslint-plugin-regexp: ^2.7.0
eslint-plugin-unicorn: ^56.0.1 eslint-plugin-unicorn: ^56.0.1
eslint-plugin-unused-imports: ^4.1.4 eslint-plugin-unused-imports: ^4.1.4
@ -105,14 +105,14 @@ catalog:
find-up: ^7.0.0 find-up: ^7.0.0
get-port: ^7.1.0 get-port: ^7.1.0
globals: ^15.14.0 globals: ^15.14.0
h3: ^1.13.0 h3: ^1.14.0
happy-dom: ^16.5.3 happy-dom: ^16.8.1
html-minifier-terser: ^7.2.0 html-minifier-terser: ^7.2.0
husky: ^9.1.7 husky: ^9.1.7
is-ci: ^4.1.0 is-ci: ^4.1.0
jsonc-eslint-parser: ^2.4.0 jsonc-eslint-parser: ^2.4.0
jsonwebtoken: ^9.0.2 jsonwebtoken: ^9.0.2
lint-staged: ^15.3.0 lint-staged: ^15.4.3
lodash.clonedeep: ^4.5.0 lodash.clonedeep: ^4.5.0
lodash.get: ^4.4.2 lodash.get: ^4.4.2
lodash.isequal: ^4.5.0 lodash.isequal: ^4.5.0
@ -121,64 +121,64 @@ catalog:
naive-ui: ^2.41.0 naive-ui: ^2.41.0
nitropack: ^2.10.4 nitropack: ^2.10.4
nprogress: ^0.2.0 nprogress: ^0.2.0
ora: ^8.1.1 ora: ^8.2.0
pinia: ^2.3.0 pinia: ^2.3.1
pinia-plugin-persistedstate: ^4.2.0 pinia-plugin-persistedstate: ^4.2.0
pkg-types: ^1.3.0 pkg-types: ^1.3.1
playwright: ^1.49.1 playwright: ^1.50.1
postcss: ^8.4.49 postcss: ^8.5.1
postcss-antd-fixes: ^0.2.0 postcss-antd-fixes: ^0.2.0
postcss-html: ^1.7.0 postcss-html: ^1.8.0
postcss-import: ^16.1.0 postcss-import: ^16.1.0
postcss-preset-env: ^10.1.3 postcss-preset-env: ^10.1.3
postcss-scss: ^4.0.9 postcss-scss: ^4.0.9
prettier: ^3.4.2 prettier: ^3.4.2
prettier-plugin-tailwindcss: ^0.6.9 prettier-plugin-tailwindcss: ^0.6.11
publint: ^0.2.12 publint: ^0.2.12
qrcode: ^1.5.4 qrcode: ^1.5.4
radix-vue: ^1.9.12 radix-vue: ^1.9.13
resolve.exports: ^2.0.3 resolve.exports: ^2.0.3
rimraf: ^6.0.1 rimraf: ^6.0.1
rollup: ^4.30.1 rollup: ^4.34.2
rollup-plugin-visualizer: ^5.14.0 rollup-plugin-visualizer: ^5.14.0
sass: ^1.83.1 sass: ^1.83.4
sortablejs: ^1.15.6 sortablejs: ^1.15.6
stylelint: ^16.12.0 stylelint: ^16.14.1
stylelint-config-recess-order: ^5.1.1 stylelint-config-recess-order: ^5.1.1
stylelint-config-recommended: ^14.0.1 stylelint-config-recommended: ^14.0.1
stylelint-config-recommended-scss: ^14.1.0 stylelint-config-recommended-scss: ^14.1.0
stylelint-config-recommended-vue: ^1.5.0 stylelint-config-recommended-vue: ^1.6.0
stylelint-config-standard: ^36.0.1 stylelint-config-standard: ^36.0.1
stylelint-order: ^6.0.4 stylelint-order: ^6.0.4
stylelint-prettier: ^5.0.2 stylelint-prettier: ^5.0.3
stylelint-scss: ^6.10.0 stylelint-scss: ^6.11.0
tailwind-merge: ^2.6.0 tailwind-merge: ^2.6.0
tailwindcss: ^3.4.17 tailwindcss: ^3.4.17
tailwindcss-animate: ^1.0.7 tailwindcss-animate: ^1.0.7
theme-colors: ^0.1.0 theme-colors: ^0.1.0
tippy.js: ^6.2.5 tippy.js: ^6.2.5
turbo: ^2.3.3 turbo: ^2.4.0
typescript: ^5.7.3 typescript: ^5.7.3
unbuild: ^3.2.0 unbuild: ^3.3.1
unplugin-element-plus: ^0.9.0 unplugin-element-plus: ^0.9.0
vee-validate: ^4.15.0 vee-validate: ^4.15.0
vite: ^6.0.7 vite: ^6.0.11
vite-plugin-compression: ^0.5.1 vite-plugin-compression: ^0.5.1
vite-plugin-dts: ^4.4.0 vite-plugin-dts: ^4.5.0
vite-plugin-html: ^3.2.2 vite-plugin-html: ^3.2.2
vite-plugin-lazy-import: ^1.0.7 vite-plugin-lazy-import: ^1.0.7
vite-plugin-pwa: ^0.21.1 vite-plugin-pwa: ^0.21.1
vite-plugin-vue-devtools: ^7.7.0 vite-plugin-vue-devtools: ^7.7.1
vitepress: ^1.5.0 vitepress: ^1.6.3
vitepress-plugin-group-icons: ^1.3.3 vitepress-plugin-group-icons: ^1.3.5
vitest: ^2.1.8 vitest: ^2.1.9
vue: ^3.5.13 vue: ^3.5.13
vue-eslint-parser: ^9.4.3 vue-eslint-parser: ^9.4.3
vue-i18n: ^11.0.1 vue-i18n: ^11.1.0
vue-router: ^4.5.0 vue-router: ^4.5.0
vue-tippy: ^6.6.0 vue-tippy: ^6.6.0
vue-tsc: 2.1.10 vue-tsc: 2.1.10
vxe-pc-ui: ^4.3.4 vxe-pc-ui: ^4.3.79
vxe-table: 4.10.0 vxe-table: 4.10.0
watermark-js-plus: ^1.5.7 watermark-js-plus: ^1.5.7
zod: ^3.24.1 zod: ^3.24.1