后端覆盖reactive 对向3种方式
1.覆盖 数组 reactive([])
const optionList = reactive({optionData:[]})
2.覆盖对象reactive({})
const pageInfo = reactive({pageData:{
page:1,
pageSize:10,
total:33
}})
3.给后端传值 ,不需要返回数据
const queryForm = reactive({
username:'',
pid:''
})
//查询条件表单
const queryForm = reactive({
username:'', 有问题的,设置默认值,若跟menuname。
menuname:''
pid:''
拼写错误,在发送请求时会多发送个,username字段,
})
<el-input v-model="queryForm.menuname" placeholder="menuame" />
</el-form-item>
<el-form-item style="width: 240px" label="上级编号" prop="pid">
<!-- <el-input v-model="queryForm.pid" placeholder="pid" clearable /> -->
<el-select
v-model="queryForm.pid"
placeholder="请选择上级菜单"
>