zova-jsx 1.1.34 → 1.1.36
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 +4 -8
- 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
|
|
|
@@ -164,7 +163,7 @@ class ZovaJsx extends BeanSimple {
|
|
|
164
163
|
const vIf = this.evaluateExpression(actionChild.props?.['v-if'], celScope);
|
|
165
164
|
if (vIf === false) return next(undefined);
|
|
166
165
|
// action
|
|
167
|
-
if (actionChild.type === '
|
|
166
|
+
if (actionChild.type === 'ZovaCommands') {
|
|
168
167
|
// nested action
|
|
169
168
|
eventRes[index] = [];
|
|
170
169
|
return this.renderEventDirect(actionChild, objectAssignReactive({}, celScope), renderContext, eventRes[index], next);
|
|
@@ -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