watch: { //fun-one检查【存货编码】输入是否为空 'funOneData.cinvcode': function (val) { if (this.activeTab === 'tab1') { this.funOneEmptyErr1 = (val === '') ? '存货编码不能为空' : null; } }, //fun-one检查【花色面料】输入是否为空 'funOneData.fabric': function (val) { if (this.activeTab === 'tab1') { this.funOneEmptyErr2 = (val === '') ? '花色面料不能为空' : null; } }, //fun-two检查【规格】输入是否为空 'funTwoData.custom': function (val) { if (this.activeTab === 'tab2') { this.funTwoEmptyErr = (val === '') ? '规格不能为空' : null; } }, //(单独花色面料添加 功能带启用)fun-three检查【花色面料】输入是否为空 'funThreeData.fabric': function (val) { if (this.fun_three === true) { this.funThreeEmptyErr = (val === '') ? 'fun-three花色面料不能为空' : null; } }, },
watch的使用
最新推荐文章于 2024-05-19 12:36:27 发布