refactor(project): re-adjust the overall folder

This commit is contained in:
vince
2024-07-23 00:03:59 +08:00
parent a1a566cb2f
commit 14538f7ed5
281 changed files with 1365 additions and 1659 deletions

View File

@@ -1,10 +1,10 @@
<script lang="ts" setup>
import type { RouteLocationNormalizedLoaded } from 'vue-router';
import { useContentHeight } from '@vben-core/hooks';
import { preferences, usePreferences } from '@vben-core/preferences';
import { useContentHeight } from '@vben/hooks';
import { preferences, usePreferences } from '@vben/preferences';
import { storeToRefs, useCoreTabbarStore } from '@vben/stores';
import { Spinner } from '@vben-core/shadcn-ui';
import { storeToRefs, useCoreTabbarStore } from '@vben-core/stores';
import { IFrameRouterView } from '../../iframe';
import { useContentSpinner } from './use-content-spinner';

View File

@@ -1,7 +1,7 @@
import { computed, ref } from 'vue';
import { useRouter } from 'vue-router';
import { preferences } from '@vben-core/preferences';
import { preferences } from '@vben/preferences';
function useContentSpinner() {
const spinning = ref(false);

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { preferences, usePreferences } from '@vben-core/preferences';
import { preferences, usePreferences } from '@vben/preferences';
import { useCoreAccessStore } from '@vben/stores';
import { VbenFullScreen } from '@vben-core/shadcn-ui';
import { useCoreAccessStore } from '@vben-core/stores';
import { GlobalSearch, LanguageToggle, ThemeToggle } from '../../widgets';

View File

@@ -1,16 +1,17 @@
<script lang="ts" setup>
import { computed } from 'vue';
import { VbenAdminLayout } from '@vben-core/layout-ui';
import { $t } from '@vben-core/locales';
import { $t } from '@vben/locales';
import {
preferences,
updatePreferences,
usePreferences,
} from '@vben-core/preferences';
} from '@vben/preferences';
import { useCoreLockStore } from '@vben/stores';
import { MenuRecordRaw } from '@vben/types';
import { mapTree } from '@vben/utils';
import { VbenAdminLayout } from '@vben-core/layout-ui';
import { VbenBackTop, VbenLogo } from '@vben-core/shadcn-ui';
import { mapTree } from '@vben-core/toolkit';
import { MenuRecordRaw } from '@vben-core/typings';
import { Breadcrumb, CozeAssistant, Preferences } from '../widgets';
import { LayoutContent } from './content';
@@ -39,6 +40,7 @@ const {
layout,
sidebarCollapsed,
} = usePreferences();
const coreLockStore = useCoreLockStore();
const headerMenuTheme = computed(() => {
return isDark.value ? 'dark' : 'light';
@@ -293,7 +295,7 @@ function clearPreferencesAndLogout() {
<template #extra>
<slot name="extra"></slot>
<Transition v-if="preferences.widget.lockScreen" name="slide-up">
<slot name="lock-screen"></slot>
<slot v-if="coreLockStore.isLockScreen" name="lock-screen"></slot>
</Transition>
</template>
</VbenAdminLayout>

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { MenuRecordRaw } from '@vben-core/typings';
import type { MenuRecordRaw } from '@vben/types';
import { useRoute } from 'vue-router';

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { MenuRecordRaw } from '@vben-core/typings';
import type { MenuRecordRaw } from '@vben/types';
import { Menu, MenuProps } from '@vben-core/menu-ui';

View File

@@ -1,11 +1,11 @@
<script lang="ts" setup>
import type { MenuRecordRaw } from '@vben/types';
import type { NormalMenuProps } from '@vben-core/menu-ui';
import type { MenuRecordRaw } from '@vben-core/typings';
import { onBeforeMount } from 'vue';
import { useRoute } from 'vue-router';
import { findMenuByPath } from '@vben-core/helpers';
import { findMenuByPath } from '@vben/utils';
import { NormalMenu } from '@vben-core/menu-ui';
interface Props extends NormalMenuProps {}

View File

@@ -1,11 +1,11 @@
import type { MenuRecordRaw } from '@vben-core/typings';
import type { MenuRecordRaw } from '@vben/types';
import { computed, ref, watch } from 'vue';
import { useRoute } from 'vue-router';
import { findRootMenuByPath } from '@vben-core/helpers';
import { preferences } from '@vben-core/preferences';
import { useCoreAccessStore } from '@vben-core/stores';
import { preferences } from '@vben/preferences';
import { useCoreAccessStore } from '@vben/stores';
import { findRootMenuByPath } from '@vben/utils';
import { useNavigation } from './use-navigation';

View File

@@ -1,11 +1,11 @@
import type { MenuRecordRaw } from '@vben-core/typings';
import type { MenuRecordRaw } from '@vben/types';
import { computed, onBeforeMount, ref, watch } from 'vue';
import { useRoute } from 'vue-router';
import { findRootMenuByPath } from '@vben-core/helpers';
import { preferences, usePreferences } from '@vben-core/preferences';
import { useCoreAccessStore } from '@vben-core/stores';
import { preferences, usePreferences } from '@vben/preferences';
import { useCoreAccessStore } from '@vben/stores';
import { findRootMenuByPath } from '@vben/utils';
import { useNavigation } from './use-navigation';

View File

@@ -1,6 +1,6 @@
import { useRouter } from 'vue-router';
import { isHttpUrl, openWindow } from '@vben-core/toolkit';
import { isHttpUrl, openWindow } from '@vben/utils';
function useNavigation() {
const router = useRouter();

View File

@@ -2,9 +2,9 @@
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { useContentMaximize, useTabs } from '@vben-core/hooks';
import { preferences } from '@vben-core/preferences';
import { useCoreTabbarStore } from '@vben-core/stores';
import { useContentMaximize, useTabs } from '@vben/hooks';
import { preferences } from '@vben/preferences';
import { useCoreTabbarStore } from '@vben/stores';
import { TabsToolMore, TabsToolScreen, TabsView } from '@vben-core/tabs-ui';
import { useTabbar } from './use-tabbar';

View File

@@ -1,5 +1,5 @@
import type { TabDefinition } from '@vben/types';
import type { IContextMenuItem } from '@vben-core/tabs-ui';
import type { TabDefinition } from '@vben-core/typings';
import type {
RouteLocationNormalized,
RouteLocationNormalizedGeneric,
@@ -8,7 +8,7 @@ import type {
import { computed, ref, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useContentMaximize, useTabs } from '@vben-core/hooks';
import { useContentMaximize, useTabs } from '@vben/hooks';
import {
ArrowLeftToLine,
ArrowRightLeft,
@@ -21,14 +21,14 @@ import {
Minimize2,
RotateCw,
X,
} from '@vben-core/icons';
import { $t, useI18n } from '@vben-core/locales';
} from '@vben/icons';
import { $t, useI18n } from '@vben/locales';
import {
storeToRefs,
useCoreAccessStore,
useCoreTabbarStore,
} from '@vben-core/stores';
import { filterTree } from '@vben-core/toolkit';
} from '@vben/stores';
import { filterTree } from '@vben/utils';
export function useTabbar() {
const router = useRouter();