问题解析:
是引发了vue3 attributes透传的问题。
解决方法:
使用props接收路由传递的参数。
修改前:
const params = getCurrentInstance().attrs.__pageQuery
const Title = ref(params.Title)
const Type = ref(params.Type)
修改后:
const props = defineProps({
Title: {
type: String,
default: '',
required: true
},
Type: {
type: String,
default: '1',
required: true
}
})