Browse Source

组件绑定太深导致不能刷新

master
xuwenbo 4 years ago
parent
commit
a3832c1a1f
  1. 14
      src/views/activity/combination/form.vue
  2. 11
      src/views/activity/seckill/form.vue
  3. 5
      src/views/components/good/index.vue

14
src/views/activity/combination/form.vue

@ -6,22 +6,22 @@
<!-- 商品信息-->
<el-col :span="24">
<el-form-item label="选择商品:" prop="good">
<cgood v-model="form1.good":disabled="true" ></cgood>
<cgood v-model="form1.good" ></cgood>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="拼团名称" prop="title">
<el-input v-model="formValidate.title" style="width: 500px;" placeholder="请输入拼团名称"/>
<el-input v-model="formValidate.title" @input="onInput()" style="width: 500px;" placeholder="请输入拼团名称"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="拼团简介" prop="info">
<el-input v-model="formValidate.info" style="width: 500px;" placeholder="请输入拼团简介"/>
<el-input v-model="formValidate.info" @input="onInput()" style="width: 500px;" placeholder="请输入拼团简介"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="单位" prop="unitName">
<el-input v-model="formValidate.unitName" style="width: 500px;" placeholder="请输入单位"/>
<el-input v-model="formValidate.unitName" @input="onInput()" style="width: 500px;" placeholder="请输入单位"/>
</el-form-item>
</el-col>
<el-col :span="24">
@ -382,7 +382,8 @@ export default {
},
'form1.good': {
handler(val,oldVal){
this.getInfoChooseGood (val.cform.id)
console.log(val)
this.getInfoChooseGood (val.productId)
},
},
},
@ -390,6 +391,9 @@ export default {
this.getInfo();
},
methods: {
onInput(){
this.$forceUpdate();
},
confirm () {
let that = this;
that.createBnt = true;

11
src/views/activity/seckill/form.vue

@ -6,22 +6,22 @@
<!-- 商品信息-->
<el-col :span="24">
<el-form-item label="选择商品:" prop="good">
<cgood v-model="form1.good":disabled="true" ></cgood>
<cgood v-model="form1.good" ></cgood>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="秒杀名称">
<el-input v-model="formValidate.title" style="width: 500px;" />
<el-input v-model="formValidate.title" @input="onInput()" style="width: 500px;" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="秒杀简介">
<el-input v-model="formValidate.info" style="width: 500px;" />
<el-input v-model="formValidate.info" @input="onInput()" style="width: 500px;" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="单位">
<el-input v-model="formValidate.unitName" style="width: 500px;" />
<el-input v-model="formValidate.unitName" @input="onInput()" style="width: 500px;" />
</el-form-item>
</el-col>
<el-col :span="24">
@ -394,6 +394,9 @@ export default {
})
},
methods: {
onInput(){
this.$forceUpdate();
},
confirm () {
let that = this;
that.createBnt = true;

5
src/views/components/good/index.vue

@ -116,8 +116,9 @@ export default {
that.$set(that.value,"productId", null)
that.$set(that.value,"storeName", null)
that.$set(that.value,"image", null)
this.$set(this.value,"otPrice", null)
this.$set(this.value,"price", null)
that.$set(that.value,"otPrice", null)
that.$set(that.value,"price", null)
that.$set(that.value,"cform",null)
})
},
doSelect(data) {

Loading…
Cancel
Save