zova-jsx 1.1.34 → 1.1.35
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/dist/index.js +3 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { compose } from '@cabloy/compose';
|
|
2
2
|
import { celEnvBase, getProperty, evaluateExpressions, isEmptyObject, isNil, isPromise } from '@cabloy/utils';
|
|
3
3
|
import { toUpperCaseFirstChar } from '@cabloy/word-utils';
|
|
4
|
-
import { classes } from 'typestyle';
|
|
5
4
|
import { h, createTextVNode } from 'vue';
|
|
6
5
|
import { BeanSimple, objectAssignReactive, cast, BeanControllerIdentifier } from 'zova-core';
|
|
7
6
|
|
|
@@ -267,9 +266,9 @@ class ZovaJsx extends BeanSimple {
|
|
|
267
266
|
// props
|
|
268
267
|
this.renderJsxProps(componentJsx.props, props, celScope, renderContext);
|
|
269
268
|
// style
|
|
270
|
-
if (
|
|
269
|
+
if (cast(props).class || cast(props).style) {
|
|
271
270
|
const controller = this.ctx.bean._getBeanSyncOnly(BeanControllerIdentifier);
|
|
272
|
-
cast(props).class =
|
|
271
|
+
cast(props).class = controller.$cssMerge(cast(props).class, controller.$style(cast(props).style));
|
|
273
272
|
delete cast(props).style;
|
|
274
273
|
}
|
|
275
274
|
// children
|
|
@@ -312,11 +311,8 @@ class ZovaJsx extends BeanSimple {
|
|
|
312
311
|
const keys = Object.keys(jsxProps).filter(item => !renderFieldJsxPropsSystem.includes(item));
|
|
313
312
|
if (keys.length === 0) return props;
|
|
314
313
|
for (const key of keys) {
|
|
315
|
-
|
|
314
|
+
const keyValue = this.renderJsxOrCel(jsxProps[key], undefined, celScope, renderContext);
|
|
316
315
|
const propName = normalizePropName(key);
|
|
317
|
-
if (propName === 'class') {
|
|
318
|
-
keyValue = classes(props[propName], keyValue);
|
|
319
|
-
}
|
|
320
316
|
props[propName] = keyValue;
|
|
321
317
|
}
|
|
322
318
|
return props;
|
package/package.json
CHANGED