@sprlab/wccompiler 0.16.1 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/codegen.js +5 -0
- package/package.json +1 -1
package/lib/codegen.js
CHANGED
|
@@ -1548,6 +1548,11 @@ export function generateComponent(parseResult, options = {}) {
|
|
|
1548
1548
|
lines.push(` __val ? this.${ab.varName}.classList.add(__k) : this.${ab.varName}.classList.remove(__k);`);
|
|
1549
1549
|
lines.push(' }');
|
|
1550
1550
|
lines.push(' }));');
|
|
1551
|
+
} else if (ab.expression.trimStart().startsWith('[')) {
|
|
1552
|
+
// Array expression: join with spaces
|
|
1553
|
+
lines.push(' this.__disposers.push(__effect(() => {');
|
|
1554
|
+
lines.push(` this.${ab.varName}.className = (${expr}).join(' ');`);
|
|
1555
|
+
lines.push(' }));');
|
|
1551
1556
|
} else {
|
|
1552
1557
|
// String expression: set className
|
|
1553
1558
|
lines.push(' this.__disposers.push(__effect(() => {');
|
package/package.json
CHANGED