diff --git a/public/platform-config.json b/public/platform-config.json index fade967c96..cb70cc7e5b 100644 --- a/public/platform-config.json +++ b/public/platform-config.json @@ -18,7 +18,7 @@ "SidebarStatus": true, "EpThemeColor": "#409EFF", "ShowLogo": true, - "ShowModel": "smart", + "TagsStyle": "chrome", "MenuArrowIconNoTransition": false, "CachingAsyncRoutes": false, "TooltipEffect": "light", diff --git a/src/layout/components/lay-content/index.vue b/src/layout/components/lay-content/index.vue index 5810d665b7..a83167a1d3 100644 --- a/src/layout/components/lay-content/index.vue +++ b/src/layout/components/lay-content/index.vue @@ -13,7 +13,7 @@ const props = defineProps({ }); const { t } = useI18n(); -const { showModel } = useTags(); +const { tagsStyle } = useTags(); const { $storage, $config } = useGlobal(); const isKeepAlive = computed(() => { @@ -54,13 +54,13 @@ const getSectionStyle = computed(() => { return [ hideTabs.value && layout ? "padding-top: 48px;" : "", !hideTabs.value && layout - ? showModel.value == "chrome" + ? tagsStyle.value == "chrome" ? "padding-top: 85px;" : "padding-top: 81px;" : "", hideTabs.value && !layout.value ? "padding-top: 48px;" : "", !hideTabs.value && !layout.value - ? showModel.value == "chrome" + ? tagsStyle.value == "chrome" ? "padding-top: 85px;" : "padding-top: 81px;" : "", diff --git a/src/layout/components/lay-setting/index.vue b/src/layout/components/lay-setting/index.vue index 0ae2b2a2ba..189a84dcda 100644 --- a/src/layout/components/lay-setting/index.vue +++ b/src/layout/components/lay-setting/index.vue @@ -53,8 +53,8 @@ if (unref(layoutTheme)) { setMenuLayout(layout); } -/** 默认灵动模式 */ -const markValue = ref($storage.configure?.showModel ?? "smart"); +/** 页签风格默认为谷歌风格 */ +const tagsStyleValue = ref($storage.configure?.tagsStyle ?? "chrome"); const logoVal = ref($storage.configure?.showLogo ?? true); @@ -63,7 +63,7 @@ const settings = reactive({ weakVal: $storage.configure.weak, tabsVal: $storage.configure.hideTabs, showLogo: $storage.configure.showLogo, - showModel: $storage.configure.showModel, + tagsStyle: $storage.configure.tagsStyle, hideFooter: $storage.configure.hideFooter, multiTagsCache: $storage.configure.multiTagsCache, stretch: $storage.configure.stretch @@ -124,9 +124,9 @@ const multiTagsCacheChange = () => { function onChange({ option }) { const { value } = option; - markValue.value = value; - storageConfigureChange("showModel", value); - emitter.emit("tagViewsShowModel", value); + tagsStyleValue.value = value; + storageConfigureChange("tagsStyle", value); + emitter.emit("tagViewsTagsStyle", value); } /** 侧边栏Logo */ @@ -442,7 +442,9 @@ onUnmounted(() => removeMatchMedia); diff --git a/src/layout/components/lay-tag/index.vue b/src/layout/components/lay-tag/index.vue index 9409fb4279..00be17fa3a 100644 --- a/src/layout/components/lay-tag/index.vue +++ b/src/layout/components/lay-tag/index.vue @@ -32,11 +32,11 @@ const { visible, showTags, instance, + tagsStyle, multiTags, tagsViews, buttonTop, buttonLeft, - showModel, translateX, isFixedTag, pureSetting, @@ -542,8 +542,8 @@ onMounted(() => { }); // 改变标签风格 - emitter.on("tagViewsShowModel", key => { - showModel.value = key; + emitter.on("tagViewsTagsStyle", key => { + tagsStyle.value = key; }); // 接收侧边栏切换传递过来的参数 @@ -559,9 +559,9 @@ onMounted(() => { }); onBeforeUnmount(() => { - // 解绑`tagViewsChange`、`tagViewsShowModel`、`changLayoutRoute`公共事件,防止多次触发 + // 解绑`tagViewsChange`、`tagViewsTagsStyle`、`changLayoutRoute`公共事件,防止多次触发 emitter.off("tagViewsChange"); - emitter.off("tagViewsShowModel"); + emitter.off("tagViewsTagsStyle"); emitter.off("changLayoutRoute"); }); @@ -574,7 +574,7 @@ onBeforeUnmount(() => {
@@ -585,7 +585,7 @@ onBeforeUnmount(() => { :class="[ 'scroll-item is-closable', linkIsActive(item), - showModel === 'chrome' && 'chrome-item', + tagsStyle === 'chrome' && 'chrome-item', isFixedTag(item) && 'fixed-tag' ]" @contextmenu.prevent="openMenu(item, $event)" @@ -593,7 +593,7 @@ onBeforeUnmount(() => { @mouseleave.prevent="onMouseleave(index)" @click="tagOnClick(item)" > -