摘要: computed 类型声明需要用泛型 ###错误写法 const a: Xx[] = computed(()=>{}) ###正确写法 const a = computed<Xx[]>(()=>{}) 直接使用时需要加上 .value 例如 a.value HTML 中可直接使用 :xx="a" 阅读全文
posted @ 2020-10-17 20:05 Leophen 阅读(813) 评论(0) 推荐(0) 编辑