fix(Text): 兼容 label 写法——LLM 生成 .ui 常用 label,此前静默渲染空文本致界面空白
This commit is contained in:
parent
4cf2c1a57e
commit
093b849bf1
@ -431,6 +431,9 @@ bricks.TextBase = class extends bricks.JsWidget {
|
|||||||
set_attrs(){
|
set_attrs(){
|
||||||
if (this.opts.hasOwnProperty('text')){
|
if (this.opts.hasOwnProperty('text')){
|
||||||
this.text = this.opts.text;
|
this.text = this.opts.text;
|
||||||
|
} else if (this.opts.hasOwnProperty('label')){
|
||||||
|
// 兼容 label 写法(LLM 生成 .ui 常用 label;此前静默渲染空文本)
|
||||||
|
this.text = this.opts.label;
|
||||||
}
|
}
|
||||||
if (this.opts.hasOwnProperty('otext')){
|
if (this.opts.hasOwnProperty('otext')){
|
||||||
this.otext = this.opts.otext;
|
this.otext = this.opts.otext;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user