diff --git a/ZR.Admin.WebApi/Template/VueTemplate.txt b/ZR.Admin.WebApi/Template/VueTemplate.txt index cd4562f..4cac4e1 100644 --- a/ZR.Admin.WebApi/Template/VueTemplate.txt +++ b/ZR.Admin.WebApi/Template/VueTemplate.txt @@ -107,6 +107,7 @@ export default { // this.getDicts("sys_normal_disable").then((response) => { // this.statusOptions = response.data; // }); + {MountedMethod} }, methods: { // 查询数据 @@ -166,10 +167,11 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - del{ModelTypeName}(row.{primaryKey}).then((res) => { - this.msgSuccess("删除成功"); - this.handleQuery(); - }); + const ${primaryKey}s = row.${primaryKey} || this.ids; + del{ModelTypeName}(${primaryKey}s).then((res) => { + this.msgSuccess("删除成功"); + this.handleQuery(); + }); }, /** 修改按钮操作 */ handleUpdate(row) { @@ -184,7 +186,6 @@ export default { }); }, beforeFileUpload(file) { }, - //文件上传成功方法 {vueJsMethod} /** 提交按钮 */ submitForm: function () {