diff --git a/packages/form/docs/qa.en-US.md b/packages/form/docs/qa.en-US.md index 3151704e6c..bb4149755c 100644 --- a/packages/form/docs/qa.en-US.md +++ b/packages/form/docs/qa.en-US.md @@ -129,3 +129,10 @@ const alainConfig: AlainConfig = { } }; ``` + +## How to toggle show or hide an element + +```ts +this.sf.getProperty('/mobile')?.setVisible(status).widget.detectChanges(); +``` + diff --git a/packages/form/docs/qa.zh-CN.md b/packages/form/docs/qa.zh-CN.md index a981e09a4a..4f82526c83 100644 --- a/packages/form/docs/qa.zh-CN.md +++ b/packages/form/docs/qa.zh-CN.md @@ -133,5 +133,5 @@ const alainConfig: AlainConfig = { ## 如何切换显示或隐藏某元素 ```ts -this.sf.getProperty('/mobile')?.setVisible(status)?.widget?.detectChanges(); +this.sf.getProperty('/mobile')?.setVisible(status).widget.detectChanges(); ``` diff --git a/packages/form/src/widgets/radio/radio.widget.ts b/packages/form/src/widgets/radio/radio.widget.ts index 610cda7bb4..6f9f94e918 100644 --- a/packages/form/src/widgets/radio/radio.widget.ts +++ b/packages/form/src/widgets/radio/radio.widget.ts @@ -19,10 +19,7 @@ export class RadioWidget extends ControlUIWidget { reset(value: SFValue): void { this.styleType = (this.ui.styleType || 'default') === 'default'; getData(this.schema, this.ui, value).subscribe(list => { - this.data = list.map(i => { - i.label = this.dom.bypassSecurityTrustHtml(i.label); - return i; - }); + this.data = list; this.detectChanges(); }); }