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