vue 计算属性传参的方法

时间:2020-01-08 13:08:24   收藏:0   阅读:204

计算属性传递参数

    html代码:
    <p>{{ getNewIndex(data) }}</p>
    js:
    computed: {
      getNewIndex() {
        // data是使用的时候的参数
        retun (data) => {
            return data.index;
        }
      },
    }

原文:https://www.cnblogs.com/lxk0301/p/12165723.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!