watch和computed 记录

时间:2021-09-09 20:26:25   收藏:0   阅读:24
    // watch: {
    //   ‘form.timeScopes‘: function (val) {
    //     console.log("进入吗?");
    //     console.log(val);
    //   }
    // },
    // computed: {
    //   lossMinutes: function () {
    //     if (
    //       this.form.timeScopes &&
    //       this.form.timeScopes.length == 2 &&
    //       this.form.timeScopes[0] &&
    //       this.form.timeScopes[1] &&
    //       this.form.timeScopes[0].length > 0 &&
    //       this.form.timeScopes[1].length > 0
    //     ) {
    //       return parseInt(
    //         Math.abs(
    //           new Date(this.form.timeScopes[0]) -
    //           new Date(this.form.timeScopes[1])
    //         ) /
    //         1000 /
    //         60
    //       );
    //     } else {
    //       return 0;
    //     }
    //   }
    // }

 

原文:https://www.cnblogs.com/foreXdd/p/15246276.html

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