edit
This commit is contained in:
@ -4,6 +4,5 @@
|
|||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button nz-button type="button" (click)="close()">{{ isDisabled ? '关闭' : '取消' }}</button>
|
<button nz-button type="button" (click)="close()">{{ isDisabled ? '关闭' : '取消' }}</button>
|
||||||
<button nz-button type="button" nzType="primary" (click)="sure()" *ngIf="!isDisabled"
|
<button nz-button type="button" nzType="primary" (click)="sure()" *ngIf="!isDisabled">确定</button>
|
||||||
[disabled]="!sf?.valid">确定</button>
|
|
||||||
</div>
|
</div>
|
||||||
@ -76,7 +76,6 @@ export class MenuModalComponent implements OnInit {
|
|||||||
title: '菜单路由',
|
title: '菜单路由',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: this.formData.link,
|
default: this.formData.link,
|
||||||
maxLength: 20,
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: this.isDisabled ? 'text' : 'string',
|
widget: this.isDisabled ? 'text' : 'string',
|
||||||
placeholder: '请输入菜单路由'
|
placeholder: '请输入菜单路由'
|
||||||
@ -125,6 +124,10 @@ export class MenuModalComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sure() {
|
sure() {
|
||||||
|
if (!this.sf.valid) {
|
||||||
|
this.service.msgSrv.warning('表单验证错误');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
...this.params,
|
...this.params,
|
||||||
|
|||||||
Reference in New Issue
Block a user