Vue3 + ts 项目中,template 报错:类型“never”上不存在属性“xxx”
错误复现:
const state = reactive({
xList: [],
});
return {
...toRefs(state),
};
解决办法
const state = reactive({
xdrList: [] as any[],
});
补充:报错
const state = reactive({
detail: null,
});
修改为:
const state = reactive({
detail: null as any,
});
所有评论(0)