diff --git a/.vscode/settings.json b/.vscode/settings.json index 2dffb99..4fde8c5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,5 +14,6 @@ "i18n-ally.enabledParsers": ["ts"], "i18n-ally.sourceLanguage": "en", "i18n-ally.displayLanguage": "zh-CN", - "i18n-ally.enabledFrameworks": ["vue", "react"] + "i18n-ally.enabledFrameworks": ["vue", "react"], + "god.tsconfig": "./tsconfig.json" } diff --git a/src/App.vue b/src/App.vue index 9a798f4..0cf6419 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,7 +6,9 @@ import { isDark } from '@/utils/is' const appStore = useAppStore() -const size = computed(() => appStore.size) +const currentSize = computed(() => appStore.getCurrentSize) + +const greyMode = computed(() => appStore.getGreyMode) const initDark = () => { const isDarkTheme = isDark() @@ -17,12 +19,14 @@ initDark() diff --git a/src/components/Breadcrumb/src/Breadcrumb.vue b/src/components/Breadcrumb/src/Breadcrumb.vue index 031721e..1ddf751 100644 --- a/src/components/Breadcrumb/src/Breadcrumb.vue +++ b/src/components/Breadcrumb/src/Breadcrumb.vue @@ -2,13 +2,18 @@ import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus' import { ref, watch, computed, unref, defineComponent, TransitionGroup } from 'vue' import { useRouter } from 'vue-router' -// import { compile } from 'path-to-regexp' import { usePermissionStore } from '@/store/modules/permission' import { filterBreadcrumb } from './helper' import { filter, treeToList } from '@/utils/tree' import type { RouteLocationNormalizedLoaded, RouteMeta } from 'vue-router' import { useI18n } from '@/hooks/web/useI18n' import { Icon } from '@/components/Icon' +import { useAppStore } from '@/store/modules/app' + +const appStore = useAppStore() + +// 面包屑图标 +const breadcrumbIcon = computed(() => appStore.getBreadcrumbIcon) export default defineComponent({ name: 'Breadcrumb', @@ -41,7 +46,7 @@ export default defineComponent({ const meta = v.meta as RouteMeta return ( - {meta?.icon ? ( + {meta?.icon && breadcrumbIcon.value ? ( <> {t(v?.meta?.title)} diff --git a/src/components/ColorRadioPicker/index.ts b/src/components/ColorRadioPicker/index.ts new file mode 100644 index 0000000..6e3a7f2 --- /dev/null +++ b/src/components/ColorRadioPicker/index.ts @@ -0,0 +1,3 @@ +import ColorRadioPicker from './src/ColorRadioPicker.vue' + +export { ColorRadioPicker } diff --git a/src/components/ColorRadioPicker/src/ColorRadioPicker.vue b/src/components/ColorRadioPicker/src/ColorRadioPicker.vue new file mode 100644 index 0000000..639289c --- /dev/null +++ b/src/components/ColorRadioPicker/src/ColorRadioPicker.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/components/ConfigGlobal/src/ConfigGlobal.vue b/src/components/ConfigGlobal/src/ConfigGlobal.vue index 50d7aa9..8ca4875 100644 --- a/src/components/ConfigGlobal/src/ConfigGlobal.vue +++ b/src/components/ConfigGlobal/src/ConfigGlobal.vue @@ -1,5 +1,5 @@ diff --git a/src/components/LocaleDropdown/src/LocaleDropdown.vue b/src/components/LocaleDropdown/src/LocaleDropdown.vue index 7090d3f..159bd93 100644 --- a/src/components/LocaleDropdown/src/LocaleDropdown.vue +++ b/src/components/LocaleDropdown/src/LocaleDropdown.vue @@ -8,13 +8,13 @@ const localeStore = useLocaleStore() const langMap = computed(() => localeStore.getLocaleMap) -const currentLang = computed(() => localeStore.getLocale) +const currentLang = computed(() => localeStore.getCurrentLocale) const setLang = (lang: LocaleType) => { if (lang === unref(currentLang).lang) return // 需要重新加载页面让整个语言多初始化 window.location.reload() - localeStore.setLocale({ + localeStore.setCurrentLocale({ lang }) const { changeLocale } = useLocale() diff --git a/src/components/Logo/src/Logo.vue b/src/components/Logo/src/Logo.vue index f3a0393..e4dc57d 100644 --- a/src/components/Logo/src/Logo.vue +++ b/src/components/Logo/src/Logo.vue @@ -1,5 +1,5 @@