v-on:click="changeCategory()"
v-on:change="changeCategory()">
v-for="vo in categorylist"
v-bind:value="vo.goodscategory_id"
:key="vo.goodscategory_id">
{{vo.goodscategory_name}}
为什么数据已经改变,但是界面并未改变select下拉
var app = new Vue({
el: '#app',
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 () {
}
})