Authored by htoooth

fix

<template>
<div>
<Form :model="formItem" :label-width="100">
<FormItem label="推荐商品池ID">
<Input v-model="formItem.input1" ></Input>
</FormItem>
<FormItem label="热销商品池ID">
<Input v-model="formItem.input2" ></Input>
<Form :label-width="100">
<FormItem :label="i.poolName" v-for="i in formItem" :key="i.id">
<Input :value="i.poolId" @input="onUpdate"/>
</FormItem>
</Form>
</div>
... ... @@ -13,17 +10,26 @@
<script>
export default {
props: ['data'],
props: {
list: {
type: Array,
default() {
return []
}
}
},
data() {
return {
formItem: {
input1: '',
input2: ''
}
formItem: this.list
}
},
methods: {
onUpdate(i) {
console.log(i)
}
},
mounted() {
}
}
... ...
... ... @@ -5,7 +5,7 @@
</select-comp>
<Modal v-model="show" title="商品池资源位">
<tab-editor></tab-editor>
<tab-editor :list.sync="data"></tab-editor>
</Modal>
</div>
</template>
... ... @@ -21,6 +21,9 @@ export default {
show: false
}
},
mounted() {
console.log(this.data);
},
methods: {
onClick() {
this.show = true;
... ...