![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
typescript
一只会飞的汪汪
海阔凭鱼跃 天高任鸟飞
展开
-
vue+typescript,三种组件传值方式
Vue 2.0 typescript 写法传值方式:随着 typescript 越来越受到前端框架的关注,最近使用 vue + typescript 做了一个项目。发现写法与 vue + js 完全不一样。但是原理相同。接下来给大家介绍 Vue 开发中常用的传值方式。Vue 常用的三种传值方式有:父传子子传父非父子传值引用官网的一句话:父子组件的关系可以总结为 prop 向下传递...原创 2019-01-30 18:56:01 · 10596 阅读 · 6 评论 -
vuejs+typescrpt this[key] 使用变量获取this属性报错解决办法Element implicitly has an 'any' type because
1.在使用vue+typescript 构建项目的时候,使用变量动态获取属性值的时候,ts解析器会报一个错误。** var key = 'name'; this[key] = 123; // 这里会提示一个语法错误 **Element implicitly has an 'any' type because type 'About' has no index signatu...原创 2019-01-30 20:21:40 · 34225 阅读 · 2 评论