Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
commit
acb365f9af
9
.github/release-drafter.yml
vendored
9
.github/release-drafter.yml
vendored
@ -17,11 +17,12 @@ categories:
|
||||
- title: "🐞 Bug Fixes"
|
||||
labels:
|
||||
- "bug"
|
||||
- title: 📝 Documentation updates
|
||||
- title: 📝 Documentation
|
||||
labels:
|
||||
- "documentation"
|
||||
- title: 👻 Maintenance
|
||||
labels:
|
||||
- "perf"
|
||||
- "chore"
|
||||
- "dependencies"
|
||||
collapse-after: 5
|
||||
@ -34,12 +35,16 @@ categories:
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- "major"
|
||||
- "breaking"
|
||||
minor:
|
||||
labels:
|
||||
- "feature"
|
||||
- "minor"
|
||||
# - "feature"
|
||||
patch:
|
||||
labels:
|
||||
- "patch"
|
||||
- "feature"
|
||||
- "bug"
|
||||
- "maintenance"
|
||||
- "docs"
|
||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -183,7 +183,7 @@
|
||||
"*.env": "$(capture).env.*",
|
||||
"README.md": "README*,CHANGELOG*,LICENSE,CNAME",
|
||||
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,.gitattributes,.gitignore,.gitpod.yml,.npmrc,.browserslistrc,.node-version,.git*,.tazerc.json",
|
||||
"Dockerfile": "Dockerfile,.docker*,docker-entrypoint.sh,build-local-docker*",
|
||||
"Dockerfile": "Dockerfile,.docker*,docker-entrypoint.sh,build-local-docker*,nginx.conf",
|
||||
"eslint.config.mjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,stylelint.config.*,.lintstagedrc.mjs,.ls-lint*,cspell.json",
|
||||
"tailwind.config.mjs": "postcss.*"
|
||||
},
|
||||
|
@ -23,7 +23,7 @@ FROM nginx:stable-alpine as production
|
||||
RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf
|
||||
COPY --from=builder /app/apps/web-antd/dist /usr/share/nginx/html
|
||||
|
||||
COPY ./deploy/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
"@vben/utils": "workspace:*",
|
||||
"@vueuse/core": "^10.11.1",
|
||||
"dayjs": "^1.11.12",
|
||||
"element-plus": "^2.7.8",
|
||||
"element-plus": "^2.8.0",
|
||||
"pinia": "2.2.1",
|
||||
"vue": "^3.4.37",
|
||||
"vue-router": "^4.4.3"
|
||||
|
@ -23,6 +23,6 @@ function registerAnalytics() {
|
||||
|
||||
export function initHmPlugin() {
|
||||
if (inBrowser && import.meta.env.PROD) {
|
||||
registerAnalytics(SITE_ID);
|
||||
registerAnalytics();
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,13 @@ const customConfig: Linter.Config[] = [
|
||||
'vue/require-default-prop': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['packages/effects/**/**', 'packages/types/**/**'],
|
||||
ignores: restrictedImportIgnores,
|
||||
rules: {
|
||||
'perfectionist/sort-interfaces': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
// apps内部的一些基础规则
|
||||
files: ['apps/**/**'],
|
||||
@ -50,6 +57,7 @@ const customConfig: Linter.Config[] = [
|
||||
],
|
||||
},
|
||||
],
|
||||
'perfectionist/sort-interfaces': 'off',
|
||||
'regexp/no-unused-capturing-group': 'off',
|
||||
},
|
||||
},
|
||||
|
@ -23,6 +23,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-tailwindcss": "^0.6.5"
|
||||
"prettier-plugin-tailwindcss": "^0.6.6"
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@
|
||||
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
|
||||
"@tailwindcss/typography": "^0.5.14",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"cssnano": "^7.0.4",
|
||||
"cssnano": "^7.0.5",
|
||||
"postcss": "^8.4.41",
|
||||
"postcss-antd-fixes": "^0.2.0",
|
||||
"postcss-import": "^16.1.0",
|
||||
|
@ -29,7 +29,7 @@
|
||||
"dependencies": {
|
||||
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
||||
"@jspm/generator": "^2.1.3",
|
||||
"cheerio": "1.0.0-rc.12",
|
||||
"cheerio": "1.0.0",
|
||||
"get-port": "^7.1.0",
|
||||
"html-minifier-terser": "^7.2.0",
|
||||
"nitropack": "^2.9.7",
|
||||
@ -50,7 +50,7 @@
|
||||
"sass": "^1.77.8",
|
||||
"vite": "^5.4.0",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-dts": "4.0.1",
|
||||
"vite-plugin-dts": "4.0.2",
|
||||
"vite-plugin-html": "^3.2.2"
|
||||
}
|
||||
}
|
||||
|
@ -73,15 +73,3 @@ http {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# stream { # stream 模块配置和 http 模块在相同级别
|
||||
# upstream redis {
|
||||
# server 127.0.0.1:6379 max_fails=3 fail_timeout=30s;
|
||||
# }
|
||||
# server {
|
||||
# listen 16379;
|
||||
# proxy_connect_timeout 1s;
|
||||
# proxy_timeout 3s;
|
||||
# proxy_pass redis;
|
||||
# }
|
||||
# }
|
@ -59,7 +59,7 @@
|
||||
"@changesets/cli": "^2.27.7",
|
||||
"@ls-lint/ls-lint": "^2.2.3",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^22.1.0",
|
||||
"@types/node": "^22.2.0",
|
||||
"@vben/commitlint-config": "workspace:*",
|
||||
"@vben/eslint-config": "workspace:*",
|
||||
"@vben/prettier-config": "workspace:*",
|
||||
|
@ -35,7 +35,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/vue": "^4.1.2",
|
||||
"lucide-vue-next": "^0.426.0",
|
||||
"lucide-vue-next": "^0.427.0",
|
||||
"vue": "^3.4.37"
|
||||
}
|
||||
}
|
||||
|
@ -9,4 +9,4 @@ export * from './tree';
|
||||
export * from './unique';
|
||||
export * from './update-css-variables';
|
||||
export * from './window';
|
||||
export { default as cloneDepp } from 'lodash.clonedeep';
|
||||
export { default as cloneDeep } from 'lodash.clonedeep';
|
||||
|
@ -48,7 +48,7 @@
|
||||
"@vben-core/typings": "workspace:*",
|
||||
"@vueuse/core": "^10.11.1",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"lucide-vue-next": "^0.426.0",
|
||||
"lucide-vue-next": "^0.427.0",
|
||||
"radix-vue": "^1.9.3",
|
||||
"vue": "^3.4.37"
|
||||
}
|
||||
|
@ -33,7 +33,8 @@ function handleClick(path?: string) {
|
||||
<a href="javascript:void 0" @click.stop="handleClick(item.path)">
|
||||
<span class="flex-center z-10 h-full">
|
||||
<VbenIcon
|
||||
v-if="item.icon && showIcon"
|
||||
v-if="showIcon"
|
||||
:fallback="showIcon"
|
||||
:icon="item.icon"
|
||||
class="mr-1 size-4 flex-shrink-0"
|
||||
/>
|
||||
|
@ -51,7 +51,8 @@ function handleClick(path?: string) {
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger class="flex items-center gap-1">
|
||||
<VbenIcon
|
||||
v-if="item.icon && showIcon"
|
||||
v-if="showIcon"
|
||||
:fallback="showIcon"
|
||||
:icon="item.icon"
|
||||
class="size-5"
|
||||
/>
|
||||
@ -77,8 +78,9 @@ function handleClick(path?: string) {
|
||||
>
|
||||
<div class="flex-center">
|
||||
<VbenIcon
|
||||
v-if="item.icon && showIcon"
|
||||
v-if="showIcon"
|
||||
:class="{ 'size-5': item.isHome }"
|
||||
:fallback="showIcon"
|
||||
:icon="item.icon"
|
||||
class="mr-1 size-4"
|
||||
/>
|
||||
@ -88,8 +90,9 @@ function handleClick(path?: string) {
|
||||
<BreadcrumbPage v-else>
|
||||
<div class="flex-center">
|
||||
<VbenIcon
|
||||
v-if="item.icon && showIcon"
|
||||
v-if="showIcon"
|
||||
:class="{ 'size-5': item.isHome }"
|
||||
:fallback="showIcon"
|
||||
:icon="item.icon"
|
||||
class="mr-1 size-4"
|
||||
/>
|
||||
|
@ -5,7 +5,7 @@ import type {
|
||||
} from '@vben/types';
|
||||
|
||||
import {
|
||||
cloneDepp,
|
||||
cloneDeep,
|
||||
generateMenus,
|
||||
generateRoutesByBackend,
|
||||
generateRoutesByFrontend,
|
||||
@ -18,7 +18,7 @@ async function generateAccessible(
|
||||
) {
|
||||
const { router } = options;
|
||||
|
||||
options.routes = cloneDepp(options.routes);
|
||||
options.routes = cloneDeep(options.routes);
|
||||
// 生成路由
|
||||
const accessibleRoutes = await generateRoutes(mode, options);
|
||||
|
||||
|
@ -56,7 +56,9 @@ export function useAntdDesignTokens() {
|
||||
|
||||
tokens.colorBgBase = getCssVariableValue('--background');
|
||||
|
||||
tokens.borderRadius = getCssVariableValue('--radius', false);
|
||||
const radius = Number.parseFloat(getCssVariableValue('--radius', false));
|
||||
// 1rem = 16px
|
||||
tokens.borderRadius = radius * 16;
|
||||
|
||||
tokens.colorBgLayout = getCssVariableValue('--background-deep');
|
||||
tokens.colorBgMask = getCssVariableValue('--overlay');
|
||||
|
@ -1,9 +1,6 @@
|
||||
import type { TabDefinition } from '@vben/types';
|
||||
import type { IContextMenuItem } from '@vben-core/tabs-ui';
|
||||
import type {
|
||||
RouteLocationNormalized,
|
||||
RouteLocationNormalizedGeneric,
|
||||
} from 'vue-router';
|
||||
import type { RouteLocationNormalizedGeneric } from 'vue-router';
|
||||
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
@ -103,7 +100,14 @@ export function useTabbar() {
|
||||
watch(
|
||||
() => route.path,
|
||||
() => {
|
||||
tabbarStore.addTab(route as RouteLocationNormalized);
|
||||
// 这里不能用route,用route时,vue-router会自动将父级meta进行合并
|
||||
const routes = router.getRoutes();
|
||||
const currentRoute = routes.find((item) => item.path === route.path);
|
||||
if (currentRoute) {
|
||||
tabbarStore.addTab(
|
||||
currentRoute as unknown as RouteLocationNormalizedGeneric,
|
||||
);
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
|
398
pnpm-lock.yaml
398
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user