更改viewtype方式

This commit is contained in:
李志鹏
2025-12-29 14:48:54 +08:00
parent 59c864fef3
commit 8cb77593f8
15 changed files with 14 additions and 68 deletions

View File

@@ -12,7 +12,6 @@
import { useRouter } from 'vue-router'
import MyEvent from '@/utils/myEvent'
const router = useRouter()
const emit = defineEmits(['view-type'])
const query = computed(() => router.currentRoute.value.query)
const visitRecordId = computed(() => query.value.visitRecordId) // 访问记录ID
import { useGenerateStore, useHGenerateStore } from '@/stores'
@@ -22,9 +21,6 @@
// 是否单选模式
isChooseOne: { type: Boolean, default: false }
})
onMounted(() => {
emit('view-type', 1)
})
const list = reactive([])
const size = ref(10)
const page = computed(() => Math.ceil(list.length / size.value) + 1)

View File

@@ -7,16 +7,8 @@
const router = useRouter()
const route = useRoute()
const styleUrl = computed(() => router.currentRoute.value.query.styleUrl)
const emit = defineEmits(['view-type'])
watch(
() => router.currentRoute.value,
() => emit('view-type', 1)
)
const isChooseOne = computed(() => route.query.flowType === FlowType.HISTORY)
onMounted(() => {
emit('view-type', 1)
})
</script>
<template>