路由->vue的el标签->Api->call方法里calljs的api接口->数据声明const xxxData->
编辑按钮:点击跳出页面并把这一行的数据给到表单formDataba2
保存按钮:formDataba2改过的数据->xxApi发送->查询Api
跳转仓库:把tableData.value数据清空->callXxxApi
<el-tab-pane label="User" name="1">User</el-tab-pane> 中间的内容不要了,写在el-table里,用的时候只是改一下数据源
call方法里calljs的api接口
不用res.value,const warehouseData = ref<any>([]),不用写属性目前.
const callwarehouseApi = ()=>{warehouseApi.select.call().then((res:any)=>{warehouseData.value = resconsole.log(warehouseData)})
}
编辑按钮
const edit = (row: any) => {formData2.name = row.nameformData2.brief = row.briefformData2.seq = row.seqformData2.id = row.iddialogFormVisible.value = true
}
保存按钮
const save = () => {shelfApi.update.call(formData2).then((res: any) => {callshelfApi()dialogFormVisible.value = falseconsole.log(res);})
}