会员
周边
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Leophen
首页
新随笔
联系
管理
2020年10月17日
Vue computed 声明类型时踩坑记录
摘要: 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)
编辑
公告