需求:
当选中下拉列表框的选项时,把选中的值作为请求参数,发送给后台。再根据收到的参数赋值给下一个下拉框
<
el-select
v-model="
TemplateType"
placeholder=
"请选择发送模版类别"
style=
"width: 217px;"
>
<
el-option
v-for="
item
in
TemplateTypeList" :
key="
item.
CODE" :
label="
item.
NAME" :
value="
item.
CODE"
>
</
el-option
>
</el-select>
watch: {
TemplateType
:
function(
val) {
var
req = {
TemplateTypeCode :
val
};
this.
Template=
'';
let
thisObj =
this;
this.
postData2Server(
'queryTemplateList1.do',
req,
function (
data) {
thisObj.
TemplateList =
data.
TemplateList;
});
},