参考:https://www.jianshu.com/p/70b2e2e0aa11
this.$set(Array, index, newValue)
<wButton text="保存" type="primary" class="primary" @click.native="savePath"></wButton>
wButton 是我的一个自定义组件,估计换成button影响不大。注意用 @click.native="savePath"
本文介绍了在Vue中使用this.$set更新数组元素及在自定义组件中使用@click.native绑定原生点击事件的方法。示例中展示了如何在自定义wButton组件上绑定保存路径的点击事件。
参考:https://www.jianshu.com/p/70b2e2e0aa11
this.$set(Array, index, newValue)
<wButton text="保存" type="primary" class="primary" @click.native="savePath"></wButton>
wButton 是我的一个自定义组件,估计换成button影响不大。注意用 @click.native="savePath"
3394
2309
1947

被折叠的 条评论
为什么被折叠?