fix(mobile): ChipBar css拼接前导空格致classList.add('')抛SyntaxError——widgetBuild中断内容区空白(浏览器实测根因)(2026-09-08)
This commit is contained in:
parent
af9d81929d
commit
dc534768ea
@ -194,7 +194,9 @@ bricks.Factory.register('TabBar', bricks.TabBar);
|
|||||||
*/
|
*/
|
||||||
bricks.ChipBar = class extends bricks.HScrollPanel {
|
bricks.ChipBar = class extends bricks.HScrollPanel {
|
||||||
constructor(opts){
|
constructor(opts){
|
||||||
opts.css = (opts.css || '') + ' chipbar';
|
// css 未传时 (opts.css||'')+... 会产生前导空格 → set_css split 出空 token
|
||||||
|
// → classList.add('') 抛 SyntaxError(浏览器实测)—— 必须 trim
|
||||||
|
opts.css = ((opts.css || '') + ' chipbar').trim();
|
||||||
super(opts);
|
super(opts);
|
||||||
// HScrollPanel 构造强制 height:'100%';胶囊条是内容高度(auto),恢复之
|
// HScrollPanel 构造强制 height:'100%';胶囊条是内容高度(auto),恢复之
|
||||||
this.set_style('height', 'auto');
|
this.set_style('height', 'auto');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user