Commit b72aa7b268e13b36c08ad1be6f0480476691cf88

Authored by YunaiV
1 parent 38ac5270

v3.8.0 新增通用方法简化模态/缓存使用

yudao-module-tool/yudao-module-tool-impl/src/main/resources/codegen/vue/views/index.vue.vm
@@ -347,7 +347,7 @@ export default { @@ -347,7 +347,7 @@ export default {
347 // 修改的提交 347 // 修改的提交
348 if (this.form.${primaryColumn.javaField} != null) { 348 if (this.form.${primaryColumn.javaField} != null) {
349 update${simpleClassName}(this.form).then(response => { 349 update${simpleClassName}(this.form).then(response => {
350 - this.$modal.msgSuccess("修改成功"); 350 + this.#[[$modal]]#.msgSuccess("修改成功");
351 this.open = false; 351 this.open = false;
352 this.getList(); 352 this.getList();
353 }); 353 });
@@ -355,7 +355,7 @@ export default { @@ -355,7 +355,7 @@ export default {
355 } 355 }
356 // 添加的提交 356 // 添加的提交
357 create${simpleClassName}(this.form).then(response => { 357 create${simpleClassName}(this.form).then(response => {
358 - this.$modal.msgSuccess("新增成功"); 358 + this.#[[$modal]]#.msgSuccess("新增成功");
359 this.open = false; 359 this.open = false;
360 this.getList(); 360 this.getList();
361 }); 361 });
@@ -364,11 +364,11 @@ export default { @@ -364,11 +364,11 @@ export default {
364 /** 删除按钮操作 */ 364 /** 删除按钮操作 */
365 handleDelete(row) { 365 handleDelete(row) {
366 const ${primaryColumn.javaField} = row.${primaryColumn.javaField}; 366 const ${primaryColumn.javaField} = row.${primaryColumn.javaField};
367 - this.$model.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?').then(function() { 367 + this.#[[$modal]]#.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?').then(function() {
368 return delete${simpleClassName}(${primaryColumn.javaField}); 368 return delete${simpleClassName}(${primaryColumn.javaField});
369 }).then(() => { 369 }).then(() => {
370 this.getList(); 370 this.getList();
371 - this.$modal.msgSuccess("删除成功"); 371 + this.#[[$modal]]#.msgSuccess("删除成功");
372 }).catch(() => {}); 372 }).catch(() => {});
373 }, 373 },
374 /** 导出按钮操作 */ 374 /** 导出按钮操作 */
@@ -386,7 +386,7 @@ export default { @@ -386,7 +386,7 @@ export default {
386 #end 386 #end
387 #end 387 #end
388 // 执行导出 388 // 执行导出
389 - this.$model.confirm('是否确认导出所有${table.classComment}数据项?').then(() => { 389 + this.#[[$modal]]#.confirm('是否确认导出所有${table.classComment}数据项?').then(() => {
390 this.exportLoading = true; 390 this.exportLoading = true;
391 return export${simpleClassName}Excel(params); 391 return export${simpleClassName}Excel(params);
392 }).then(response => { 392 }).then(response => {