Merge pull request #19 from vbenjs/feature/type-check-0705
fix: Typecheck and loop dependency problem repairpull/48/MERGE
commit
ad6ae1d21d
|
@ -16,13 +16,10 @@ categories:
|
||||||
- "enhancement"
|
- "enhancement"
|
||||||
- title: "🐞 Bug Fixes"
|
- title: "🐞 Bug Fixes"
|
||||||
labels:
|
labels:
|
||||||
- "fix"
|
|
||||||
- "bugfix"
|
|
||||||
- "bug"
|
- "bug"
|
||||||
- title: 📝 Documentation updates
|
- title: 📝 Documentation updates
|
||||||
labels:
|
labels:
|
||||||
- "documentation"
|
- "documentation"
|
||||||
- "docs"
|
|
||||||
- title: 👻 Maintenance
|
- title: 👻 Maintenance
|
||||||
labels:
|
labels:
|
||||||
- "chore"
|
- "chore"
|
||||||
|
@ -30,7 +27,6 @@ categories:
|
||||||
collapse-after: 5
|
collapse-after: 5
|
||||||
- title: 🚦 Tests
|
- title: 🚦 Tests
|
||||||
labels:
|
labels:
|
||||||
- "test"
|
|
||||||
- "tests"
|
- "tests"
|
||||||
- title: "Breaking"
|
- title: "Breaking"
|
||||||
label: "breaking"
|
label: "breaking"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"exclude": ["zx", "eslint"]
|
"exclude": ["zx", "eslint", "eslint-plugin-unused-imports"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"eslint-plugin-regexp": "^2.6.0",
|
"eslint-plugin-regexp": "^2.6.0",
|
||||||
"eslint-plugin-unicorn": "^54.0.0",
|
"eslint-plugin-unicorn": "^54.0.0",
|
||||||
"eslint-plugin-unused-imports": "^4.0.0",
|
"eslint-plugin-unused-imports": "^3.2.0",
|
||||||
"eslint-plugin-vitest": "^0.5.4",
|
"eslint-plugin-vitest": "^0.5.4",
|
||||||
"eslint-plugin-vue": "^9.27.0",
|
"eslint-plugin-vue": "^9.27.0",
|
||||||
"globals": "^15.8.0",
|
"globals": "^15.8.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "vben-admin",
|
"name": "vben-admin-pro",
|
||||||
"version": "5.0.0-alpha.1",
|
"version": "5.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"monorepo",
|
"monorepo",
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
const isMenuOpen = ref(false);
|
|
||||||
const menuItems = ref(['1', '2', '3', '4']);
|
|
||||||
|
|
||||||
const toggleMenu = () => {
|
|
||||||
isMenuOpen.value = !isMenuOpen.value;
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleMenuItemClick = (_item: any) => {
|
|
||||||
// console.log(111, item);
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="fixed bottom-5 right-5 flex flex-col-reverse items-center gap-2">
|
|
||||||
<button
|
|
||||||
:class="{ 'rotate-45': isMenuOpen }"
|
|
||||||
class="flex h-12 w-12 items-center justify-center rounded-full bg-blue-500 text-xl text-white transition-transform duration-300"
|
|
||||||
@click="toggleMenu"
|
|
||||||
>
|
|
||||||
✖
|
|
||||||
</button>
|
|
||||||
<div
|
|
||||||
:class="{
|
|
||||||
'visible translate-y-0 opacity-100': isMenuOpen,
|
|
||||||
'invisible translate-y-2 opacity-0': !isMenuOpen,
|
|
||||||
}"
|
|
||||||
class="absolute bottom-16 right-0 flex flex-col-reverse gap-2 transition-all duration-300"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
v-for="(item, index) in menuItems"
|
|
||||||
:key="index"
|
|
||||||
class="flex h-12 w-12 items-center justify-center rounded-full bg-blue-500 text-xl text-white"
|
|
||||||
@click="handleMenuItemClick(item)"
|
|
||||||
>
|
|
||||||
{{ item }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
/* 可以在这里添加任何需要的额外样式 */
|
|
||||||
</style>
|
|
|
@ -1 +0,0 @@
|
||||||
export { default as VbenFloatingButtonGroup } from './floating-button-group.vue';
|
|
|
@ -8,7 +8,6 @@ export * from './checkbox';
|
||||||
export * from './context-menu';
|
export * from './context-menu';
|
||||||
export * from './count-to-animator';
|
export * from './count-to-animator';
|
||||||
export * from './dropdown-menu';
|
export * from './dropdown-menu';
|
||||||
export * from './floating-button-group';
|
|
||||||
export * from './full-screen';
|
export * from './full-screen';
|
||||||
export * from './hover-card';
|
export * from './hover-card';
|
||||||
export * from './icon';
|
export * from './icon';
|
||||||
|
|
|
@ -12,7 +12,8 @@ import {
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from 'radix-vue';
|
} from 'radix-vue';
|
||||||
|
|
||||||
import { SelectScrollDownButton, SelectScrollUpButton } from '.';
|
import SelectScrollDownButton from './SelectScrollDownButton.vue';
|
||||||
|
import SelectScrollUpButton from './SelectScrollUpButton.vue';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { mapTree } from '@vben-core/toolkit';
|
||||||
async function generateRoutesByBackend(
|
async function generateRoutesByBackend(
|
||||||
options: GeneratorMenuAndRoutesOptions,
|
options: GeneratorMenuAndRoutesOptions,
|
||||||
): Promise<RouteRecordRaw[]> {
|
): Promise<RouteRecordRaw[]> {
|
||||||
const { fetchMenuListAsync, layoutMap, pageMap } = options;
|
const { fetchMenuListAsync, layoutMap = {}, pageMap = {} } = options;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const menuRoutes = await fetchMenuListAsync?.();
|
const menuRoutes = await fetchMenuListAsync?.();
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
"@vben-core/stores": "workspace:*",
|
"@vben-core/stores": "workspace:*",
|
||||||
"@vben-core/tabs-ui": "workspace:*",
|
"@vben-core/tabs-ui": "workspace:*",
|
||||||
"@vben-core/toolkit": "workspace:*",
|
"@vben-core/toolkit": "workspace:*",
|
||||||
"@vben/constants": "workspace:*",
|
|
||||||
"@vben/locales": "workspace:*",
|
"@vben/locales": "workspace:*",
|
||||||
"@vben/widgets": "workspace:*",
|
"@vben/widgets": "workspace:*",
|
||||||
"vue": "^3.4.31",
|
"vue": "^3.4.31",
|
||||||
|
|
|
@ -152,7 +152,6 @@ function toggleSidebar() {
|
||||||
|
|
||||||
<template #floating-groups>
|
<template #floating-groups>
|
||||||
<VbenBackTop />
|
<VbenBackTop />
|
||||||
<!-- <VbenFloatingButtonGroup /> -->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- logo -->
|
<!-- logo -->
|
||||||
|
|
|
@ -2,7 +2,7 @@ import type { IContextMenuItem } from '@vben-core/tabs-ui';
|
||||||
import type { TabItem } from '@vben-core/typings';
|
import type { TabItem } from '@vben-core/typings';
|
||||||
import type {
|
import type {
|
||||||
RouteLocationNormalized,
|
RouteLocationNormalized,
|
||||||
RouteRecordNormalized,
|
RouteLocationNormalizedGeneric,
|
||||||
} from 'vue-router';
|
} from 'vue-router';
|
||||||
|
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
@ -34,8 +34,7 @@ function useTabs() {
|
||||||
});
|
});
|
||||||
|
|
||||||
const { locale } = useI18n();
|
const { locale } = useI18n();
|
||||||
const currentTabs =
|
const currentTabs = ref<RouteLocationNormalizedGeneric[]>();
|
||||||
ref<(RouteLocationNormalized | RouteRecordNormalized)[]>();
|
|
||||||
watch([() => tabsStore.getTabs, () => locale.value], ([tabs, _]) => {
|
watch([() => tabsStore.getTabs, () => locale.value], ([tabs, _]) => {
|
||||||
currentTabs.value = tabs.map((item) => wrapperTabLocale(item));
|
currentTabs.value = tabs.map((item) => wrapperTabLocale(item));
|
||||||
});
|
});
|
||||||
|
@ -60,9 +59,7 @@ function useTabs() {
|
||||||
await tabsStore.closeTabByKey(key, router);
|
await tabsStore.closeTabByKey(key, router);
|
||||||
};
|
};
|
||||||
|
|
||||||
function wrapperTabLocale(
|
function wrapperTabLocale(tab: RouteLocationNormalizedGeneric) {
|
||||||
tab: RouteLocationNormalized | RouteRecordNormalized,
|
|
||||||
) {
|
|
||||||
return {
|
return {
|
||||||
...tab,
|
...tab,
|
||||||
meta: {
|
meta: {
|
||||||
|
|
|
@ -42,9 +42,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vben-core/design": "workspace:*",
|
"@vben-core/design": "workspace:*",
|
||||||
"@vben-core/iconify": "workspace:*",
|
"@vben-core/iconify": "workspace:*",
|
||||||
"@vben-core/preferences": "workspace:*",
|
|
||||||
"@vben-core/shadcn-ui": "workspace:*",
|
"@vben-core/shadcn-ui": "workspace:*",
|
||||||
"@vben/chart-ui": "workspace:*",
|
|
||||||
"@vben/locales": "workspace:*",
|
"@vben/locales": "workspace:*",
|
||||||
"@vben/types": "workspace:*",
|
"@vben/types": "workspace:*",
|
||||||
"@vueuse/integrations": "^10.11.0",
|
"@vueuse/integrations": "^10.11.0",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"extends": "@vben/tsconfig/web.json",
|
"extends": "@vben/tsconfig/web.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"types": ["@vben/types/window"]
|
"types": ["@vben/types/global"]
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
|
|
|
@ -46,11 +46,8 @@
|
||||||
"@vben-core/preferences": "workspace:*",
|
"@vben-core/preferences": "workspace:*",
|
||||||
"@vben-core/shadcn-ui": "workspace:*",
|
"@vben-core/shadcn-ui": "workspace:*",
|
||||||
"@vben-core/toolkit": "workspace:*",
|
"@vben-core/toolkit": "workspace:*",
|
||||||
"@vben/chart-ui": "workspace:*",
|
|
||||||
"@vben/locales": "workspace:*",
|
"@vben/locales": "workspace:*",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"@vueuse/integrations": "^10.11.0",
|
|
||||||
"qrcode": "^1.5.3",
|
|
||||||
"vue": "^3.4.31",
|
"vue": "^3.4.31",
|
||||||
"vue-router": "^4.4.0"
|
"vue-router": "^4.4.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,12 +37,15 @@ const disableItem = computed(() => {
|
||||||
<SwitchItem v-model="breadcrumbHideOnlyOne" :disabled="disableItem">
|
<SwitchItem v-model="breadcrumbHideOnlyOne" :disabled="disableItem">
|
||||||
{{ $t('preferences.breadcrumb.hide-only-one') }}
|
{{ $t('preferences.breadcrumb.hide-only-one') }}
|
||||||
</SwitchItem>
|
</SwitchItem>
|
||||||
<SwitchItem v-model="breadcrumbShowHome" :disabled="disableItem">
|
|
||||||
{{ $t('preferences.breadcrumb.home') }}
|
|
||||||
</SwitchItem>
|
|
||||||
<SwitchItem v-model="breadcrumbShowIcon" :disabled="disableItem">
|
<SwitchItem v-model="breadcrumbShowIcon" :disabled="disableItem">
|
||||||
{{ $t('preferences.breadcrumb.icon') }}
|
{{ $t('preferences.breadcrumb.icon') }}
|
||||||
</SwitchItem>
|
</SwitchItem>
|
||||||
|
<SwitchItem
|
||||||
|
v-model="breadcrumbShowHome"
|
||||||
|
:disabled="disableItem || !breadcrumbShowIcon"
|
||||||
|
>
|
||||||
|
{{ $t('preferences.breadcrumb.home') }}
|
||||||
|
</SwitchItem>
|
||||||
<ToggleItem
|
<ToggleItem
|
||||||
v-model="breadcrumbStyleType"
|
v-model="breadcrumbStyleType"
|
||||||
:disabled="disableItem"
|
:disabled="disableItem"
|
||||||
|
|
|
@ -5,3 +5,21 @@ import 'vue-router';
|
||||||
declare module 'vue-router' {
|
declare module 'vue-router' {
|
||||||
interface RouteMeta extends IRouteMeta {}
|
interface RouteMeta extends IRouteMeta {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
// interface Window {
|
||||||
|
const __VBEN_ADMIN_METADATA__: {
|
||||||
|
authorEmail: string;
|
||||||
|
authorName: string;
|
||||||
|
authorUrl: string;
|
||||||
|
buildTime: string;
|
||||||
|
dependencies: Record<string, string>;
|
||||||
|
description: string;
|
||||||
|
devDependencies: Record<string, string>;
|
||||||
|
homepage: string;
|
||||||
|
license: string;
|
||||||
|
repositoryUrl: string;
|
||||||
|
version: string;
|
||||||
|
};
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
},
|
},
|
||||||
"./global": {
|
"./global": {
|
||||||
"types": "./global.d.ts"
|
"types": "./global.d.ts"
|
||||||
},
|
|
||||||
"./window": {
|
|
||||||
"types": "./window.d.ts"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
export {};
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
// interface Window {
|
|
||||||
const __VBEN_ADMIN_METADATA__: {
|
|
||||||
authorEmail: string;
|
|
||||||
authorName: string;
|
|
||||||
authorUrl: string;
|
|
||||||
buildTime: string;
|
|
||||||
dependencies: Record<string, string>;
|
|
||||||
description: string;
|
|
||||||
devDependencies: Record<string, string>;
|
|
||||||
homepage: string;
|
|
||||||
license: string;
|
|
||||||
repositoryUrl: string;
|
|
||||||
version: string;
|
|
||||||
};
|
|
||||||
// }
|
|
||||||
}
|
|
1076
pnpm-lock.yaml
1076
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -13,8 +13,8 @@ const IGNORE_DIR = [
|
||||||
'.cache',
|
'.cache',
|
||||||
'scripts',
|
'scripts',
|
||||||
'internal',
|
'internal',
|
||||||
// 'packages/@vben-core/shared/shadcn-ui/',
|
'packages/@core/forward/request/src/',
|
||||||
'packages/@vben-core/ui-kit/menu-ui/src/',
|
'packages/@core/ui-kit/menu-ui/src/',
|
||||||
].join(',');
|
].join(',');
|
||||||
|
|
||||||
const IGNORE = [`**/{${IGNORE_DIR}}/**`];
|
const IGNORE = [`**/{${IGNORE_DIR}}/**`];
|
||||||
|
|
Loading…
Reference in New Issue