watch和computed 记录

    // 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;
    //     }
    //   }
    // }

 

posted @ 2021-09-09 11:27  熊大大001(前端开发)  阅读(30)  评论(0)    收藏  举报