<select class="ui search dropdown" v-model="pid"
v-on:click="changeCategory()"
v-on:change="changeCategory()">
<option
v-for="vo in categorylist"
v-bind:value="vo.goodscategory_id"
:key="vo.goodscategory_id">
{{vo.goodscategory_name}}
</option>
</select>
Why the data has changed, but the interface has not changed the select drop-down
var app = new Vue({
el: "-sharpapp",
data: {
categorylist:[],//
pid:0,//id
secondcategorylist:[],//
cid:0,//
autoparts_brandlist:[],//
autopartsbrand:0,
modeiswrite:0,// 0 1 2
},
computed:{
},
methods:{
//
changeCategory:function(){
//
axios.get("__MODULE__/Goods/bypidGetsecondid", {params: {pid:app.pid}
}).then(function (response) {
app.secondcategorylist=[];//
app.secondcategorylist= response.data;
app.cid=response.data[0].goodscategory_id;
// app.modeiswrite=response.data[0].goodscategory_modeiswrite;
//
axios.get("__MODULE__/Goods/byCategoryidGetAutoPartsBrandId", {params: {categoryid:app.cid}
}).then(function (response1) {
app.autoparts_brandlist= response1.data;
app.autopartsbrand=response1.data[0].autopartsbrand_id;
});
});
},
},
created: function () {
}
})