diff --git a/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts b/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts index ea80d563..00a68bbe 100644 --- a/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts +++ b/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts @@ -53,7 +53,7 @@ export class SmsTemplateComponent implements OnInit { templateCode: { type: 'string', title: '模板编码', - readOnly: this.isEdit ? true : false, + readOnly: this.isEdit, ui: { placeholder: '请输入模板编码', } }, templateContent: { @@ -103,6 +103,8 @@ export class SmsTemplateComponent implements OnInit { edit(item: any) { // console.log(item); this.isEdit = true; + this.editSchema!.properties!.templateCode.readOnly = true; + this.sfEdit?.refreshSchema(); this.tempData = item; this.isVisible = true; } @@ -122,6 +124,8 @@ export class SmsTemplateComponent implements OnInit { add() { this.isEdit = false; + this.editSchema!.properties!.templateCode.readOnly = false; + this.sfEdit?.refreshSchema(); this.tempData = {}; this.isVisible = true; }