处理360极速浏览器不支持前端 ?. 判断写法

This commit is contained in:
pushuo 2022-10-21 09:33:39 +08:00 committed by Edward Yang
parent 1768a7fb77
commit ad0376c077
1 changed files with 5 additions and 1 deletions

View File

@ -221,7 +221,7 @@
</table>
</div>
</div>
<input class="form-control d-none" :value="form.skus[0]?.variants?.length || ''" required>
<input class="form-control d-none" :value="skuIsEmpty" required>
<div class="invalid-feedback" style="font-size: 16px"><i class="bi bi-exclamation-circle-fill"></i> {{ __('admin/product.add_variable') }}</div>
</div>
</div>
@ -349,6 +349,10 @@
repeats.push(1);
return repeats;
},
skuIsEmpty() {
return (this.form.skus.length && this.form.skus[0].variants.length) || ''
}
},
watch: {
'source.variables': {