@sola-air-ui/compiler 1.5.0 → 1.5.1
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/package.json +1 -1
- package/src/index.js +5 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1587,7 +1587,11 @@ export function compile(source, options = {}) {
|
|
|
1587
1587
|
domCode += ` ${id}.addEventListener('input', (e) => { set_${bound}(e.target.value); });\n`;
|
|
1588
1588
|
domCode += ` createEffect(() => { ${id}.value = ${bound}() ?? ''; });\n`;
|
|
1589
1589
|
} else if (prop === 'this') {
|
|
1590
|
-
|
|
1590
|
+
if (stateVars.has(bound)) {
|
|
1591
|
+
domCode += ` set_${bound}(${id});\n`;
|
|
1592
|
+
} else {
|
|
1593
|
+
domCode += ` ${bound} = ${id};\n`;
|
|
1594
|
+
}
|
|
1591
1595
|
}
|
|
1592
1596
|
} else if (key === 'class' || key === 'className') {
|
|
1593
1597
|
// Static values: emit as a plain string literal. A template literal here
|