整合了部分代码,处理了昨天重构代码的小bug,修改了布局状态的保持

This commit is contained in:
xlmessage 2025-02-14 11:03:46 +08:00
parent a59059b8ee
commit b561ed6f0a
5 changed files with 20 additions and 37 deletions

@ -6,8 +6,8 @@ const router = createRouter({
{
path: '/',
name: 'root',
redirect: '/thenew', // 默认重定向到 /thenew
component: () => import('@/views/TheNewView.vue'), // 顶级路由组件
redirect: '/thenew',
component: () => import('@/views/TheNewView.vue'),
children: [
{
path: 'thenew',
@ -18,37 +18,37 @@ const router = createRouter({
{
path: 'hour-line',
name: 'hour-line',
component: () => import('@/end/NewDesign.vue') // 嵌套子路由
component: () => import('@/end/NewDesign.vue')
},
{
path: 'hour-line2',
name: 'hour-line2',
component: () => import('@/endnew/NewStyleDesign.vue') // 嵌套子路由
component: () => import('@/endnew/NewStyleDesign.vue')
},
{
path: 'day-line',
name: 'day-line',
component: () => import('@/end/NodataView.vue') // 嵌套子路由
component: () => import('@/end/NodataView.vue')
},
{
path: 'week-line',
name: 'week-line',
component: () => import('@/end/NodataView.vue') // 嵌套子路由
component: () => import('@/end/NodataView.vue')
},
{
path: 'month-line',
name: 'month-line',
component: () => import('@/end/NodataView.vue') // 嵌套子路由
component: () => import('@/end/NodataView.vue')
},
{
path: 'year-line',
name: 'year-line',
component: () => import('@/end/NodataView.vue') // 嵌套子路由
component: () => import('@/end/NodataView.vue')
},
{
path: 'nodata',
name: 'nodata',
component: () => import('@/end/NodataView.vue') // 嵌套子路由
component: () => import('@/end/NodataView.vue')
}
]
}

@ -1,5 +0,0 @@
import { createPinia } from "pinia";
const pinia = createPinia()
export default pinia

@ -1,30 +1,12 @@
import { defineStore } from 'pinia'
//数组处理
const useTheme = defineStore("Theme", {
state: () => ({
theme: false,
fontcolor:'#fff',
style:'vertical'
}),
actions: {
toggleFontcolor(){
if(this.theme){
this.fontcolor = '#000'
}else{
this.fontcolor = '#fff'
}
},
toggleDarkTheme(){
this.theme = false
},
optionConfigData () {
}
}
actions: { }
})
export default useTheme

@ -55,7 +55,13 @@ const gridFunc = () => {
onMounted(() => {
watch(() => props.message, (news,old) => {
routerViewKey.value = routerViewKey.value + 1
router.push(`/thenew/hour-line`)
if(style.value === 'vertical'){
router.push(`/thenew/hour-line`)
}
if(style.value === 'grid'){
router.push(`/thenew/hour-line2`)
}
activeIndex.value = 0
})
})

@ -516,9 +516,9 @@ const clickTypeState = (val: CollapseModelValue) => {
}
// URL
const stockUrls = {
ganggu: 'http://127.0.0.1:8012/akshare/ganggudataK',
meigu: 'http://127.0.0.1:8012/akshare/meigudataK',
hushen: 'http://127.0.0.1:8012/akshare/hushendataK'
'港股': 'http://127.0.0.1:8012/akshare/ganggudataK',
'美股': 'http://127.0.0.1:8012/akshare/meigudataK',
'沪深': 'http://127.0.0.1:8012/akshare/hushendataK'
} as any;
//