Commit 76e2a8e0 by 李伟康

提交

1 parent 17ca749d
...@@ -773,8 +773,9 @@ export default { ...@@ -773,8 +773,9 @@ export default {
watch: { watch: {
'formObj.tencentcloudMediaId': { 'formObj.tencentcloudMediaId': {
handler (nVal, oVal) { handler (nVal, oVal) {
const _target = this.formData.find(item => item.name == 'commerceDescribe') const { goodsSource } = this.formObj,
_target.isHide = !nVal _target = this.formData.find(item => item.name == 'commerceDescribe')
_target.isHide = goodsSource == 3 ? true : !nVal
if (!nVal) this.formObj.commerceDescribe = '' if (!nVal) this.formObj.commerceDescribe = ''
}, },
deep: true deep: true
...@@ -782,10 +783,9 @@ export default { ...@@ -782,10 +783,9 @@ export default {
'formObj.goodsSource' (n) { 'formObj.goodsSource' (n) {
const hideList = ['propagateCover', 'productVideo', 'tencentcloudMediaId', 'commerceDescribe'] const hideList = ['propagateCover', 'productVideo', 'tencentcloudMediaId', 'commerceDescribe']
this.formData.forEach(e => { this.formData.forEach(e => {
if (hideList.includes(e.name)) { if (hideList.includes(e.name)) e.isHide = n == 3
e.isHide = n == 3
}
}) })
console.log(this.formData)
this.myRule.deliveryType[0].required = n != 3 this.myRule.deliveryType[0].required = n != 3
this.myRule.expressFee[0].required = n != 3 this.myRule.expressFee[0].required = n != 3
this.$refs.baseInfoRef.$refs.formRef.clearValidate() this.$refs.baseInfoRef.$refs.formRef.clearValidate()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!