优化index.vue.vm模板,!=1修改为严格不等;undefined修改为null
正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
| @@ -286,7 +286,7 @@ export default { | @@ -286,7 +286,7 @@ export default { | ||
| 286 | pageSize: 10, | 286 | pageSize: 10, |
| 287 | #foreach ($column in $columns) | 287 | #foreach ($column in $columns) |
| 288 | #if($column.query) | 288 | #if($column.query) |
| 289 | - $column.javaField: undefined#if($velocityCount != $columns.size()),#end | 289 | + $column.javaField: null#if($velocityCount != $columns.size()),#end |
| 290 | 290 | ||
| 291 | #end | 291 | #end |
| 292 | #end | 292 | #end |
| @@ -363,7 +363,7 @@ export default { | @@ -363,7 +363,7 @@ export default { | ||
| 363 | $column.javaField: []#if($velocityCount != $columns.size()),#end | 363 | $column.javaField: []#if($velocityCount != $columns.size()),#end |
| 364 | 364 | ||
| 365 | #else | 365 | #else |
| 366 | - $column.javaField: undefined#if($velocityCount != $columns.size()),#end | 366 | + $column.javaField: null#if($velocityCount != $columns.size()),#end |
| 367 | 367 | ||
| 368 | #end | 368 | #end |
| 369 | #end | 369 | #end |
| @@ -383,7 +383,7 @@ export default { | @@ -383,7 +383,7 @@ export default { | ||
| 383 | // 多选框选中数据 | 383 | // 多选框选中数据 |
| 384 | handleSelectionChange(selection) { | 384 | handleSelectionChange(selection) { |
| 385 | this.ids = selection.map(item => item.${pkColumn.javaField}) | 385 | this.ids = selection.map(item => item.${pkColumn.javaField}) |
| 386 | - this.single = selection.length!=1 | 386 | + this.single = selection.length!==1 |
| 387 | this.multiple = !selection.length | 387 | this.multiple = !selection.length |
| 388 | }, | 388 | }, |
| 389 | /** 新增按钮操作 */ | 389 | /** 新增按钮操作 */ |
| @@ -408,7 +408,7 @@ export default { | @@ -408,7 +408,7 @@ export default { | ||
| 408 | }); | 408 | }); |
| 409 | }, | 409 | }, |
| 410 | /** 提交按钮 */ | 410 | /** 提交按钮 */ |
| 411 | - submitForm: function() { | 411 | + submitForm() { |
| 412 | this.#[[$]]#refs["form"].validate(valid => { | 412 | this.#[[$]]#refs["form"].validate(valid => { |
| 413 | if (valid) { | 413 | if (valid) { |
| 414 | #foreach ($column in $columns) | 414 | #foreach ($column in $columns) |
| @@ -416,7 +416,7 @@ export default { | @@ -416,7 +416,7 @@ export default { | ||
| 416 | this.form.$column.javaField = this.form.${column.javaField}.join(","); | 416 | this.form.$column.javaField = this.form.${column.javaField}.join(","); |
| 417 | #end | 417 | #end |
| 418 | #end | 418 | #end |
| 419 | - if (this.form.${pkColumn.javaField} != undefined) { | 419 | + if (this.form.${pkColumn.javaField} != null) { |
| 420 | update${BusinessName}(this.form).then(response => { | 420 | update${BusinessName}(this.form).then(response => { |
| 421 | if (response.code === 200) { | 421 | if (response.code === 200) { |
| 422 | this.msgSuccess("修改成功"); | 422 | this.msgSuccess("修改成功"); |
-
请 注册 或 登录 后发表评论