文件路徑:src/views/freight/shippingTemplates/index.vue
加上上圖圈住的代碼
<templatesFrom ref="templateForm" :tempId="id" :componentKey="componentKey" @getList="getList"templatesFrom>
import templatesFrom from "@/components/templatesFrom";
components: { templatesFrom },
把add方法改成下面這樣
onEdit方法也改下
add() {
this.$refs.templateForm.dialogVisible = true;
this.$refs.templateForm.resetData();
},
onEdit(id) {
this.id = id;
this.$refs.templateForm.dialogVisible = true;
this.$refs.templateForm.getInfo(id)
},
再去官網下載最新的包把components/templatesFrom/index.vue文件替換下