chore(h5): 移除主题设置页及路由配置

This commit is contained in:
bootx
2026-06-24 09:56:29 +08:00
parent 221db036b8
commit 7789c8a981
2 changed files with 1 additions and 106 deletions

View File

@@ -2,7 +2,7 @@ import type { RouteRecordRaw } from 'vue-router'
const Layout = () => import('@/layout/index.vue')
// 业务路由模块(等待业务开发,当前仅保留占位首页与主题设置页
// 业务路由模块(等待业务开发,当前仅保留占位首页)
const routeModuleList: Array<RouteRecordRaw> = [
{
path: '/home',
@@ -24,16 +24,6 @@ const routeModuleList: Array<RouteRecordRaw> = [
},
],
},
// 主题设置页内页Dark Mode / 系统主题色 / 页面动画)
{
path: '/themeSetting',
name: 'ThemeSetting',
meta: {
title: '主题设置',
innerPage: true,
},
component: () => import('@/views/my/ThemeSetting.vue'),
},
]
export default routeModuleList

View File

@@ -1,95 +0,0 @@
<script setup lang="ts">
import { animates as animateOptions } from '@/settings/animateSetting'
import { useDesignSettingStore } from '@/store/modules/designSetting'
defineOptions({ name: 'ThemeSetting' })
const designStore = useDesignSettingStore()
function togTheme(color: string) {
designStore.appTheme = color
}
const findCurrentAnimateType = animateOptions.find(
item => item.value === designStore.pageAnimateType,
)
const animateState = reactive({
text: findCurrentAnimateType?.text,
value: [designStore.pageAnimateType],
showPicker: false,
})
function openAnimatePick() {
if (designStore.isPageAnimate) {
animateState.showPicker = true
}
}
function handleSaveAnimateType({ selectedOptions }) {
animateState.text = selectedOptions[0].text
designStore.setPageAnimateType(selectedOptions[0].value)
animateState.showPicker = false
}
</script>
<template>
<div>
<van-divider>系统主题色</van-divider>
<div flex="~" justify="center">
<div grid="~ cols-8 gap-2">
<span
v-for="(item, index) in designStore.appThemeList"
:key="index"
h="8"
w="8"
items-center
border="2 rounded-md"
flex="~"
justify="center"
:style="{ 'background-color': item }"
@click="togTheme(item)"
>
<i
v-show="item === designStore.appTheme"
class="i-ic:sharp-check" text-2xl text-white
/>
</span>
</div>
</div>
<van-divider>页面切换动画</van-divider>
<van-cell-group inset>
<van-cell center title="开启动画">
<template #right-icon>
<van-switch v-model="designStore.isPageAnimate" size="22" />
</template>
</van-cell>
<van-cell center title="动画类型">
<van-field
v-model="animateState.text"
readonly
class="!p-0"
:disabled="!designStore.isPageAnimate"
is-link
label-class="font-bold"
input-align="right"
:center="true"
:border="false"
@click="openAnimatePick"
/>
</van-cell>
</van-cell-group>
<van-popup v-model:show="animateState.showPicker" position="bottom" round>
<van-picker
v-model="animateState.value"
:columns="animateOptions"
@confirm="handleSaveAnimateType"
@cancel="animateState.showPicker = false"
/>
</van-popup>
</div>
</template>
<style scoped lang="less"></style>