zova-jsx 1.1.21 → 1.1.22

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { compose } from '@cabloy/compose';
2
- import { celEnvBase, getProperty, evaluateExpressions, isPromise } from '@cabloy/utils';
2
+ import { celEnvBase, getProperty, evaluateExpressions, isEmptyObject, isNil, isPromise } from '@cabloy/utils';
3
3
  import { toUpperCaseFirstChar } from '@cabloy/word-utils';
4
4
  import { classes } from 'typestyle';
5
5
  import { h, createTextVNode } from 'vue';
6
- import { BeanSimple, objectAssignReactive, cast, beanFullNameFromOnionName, deepExtend } from 'zova-core';
6
+ import { BeanSimple, objectAssignReactive, cast, beanFullNameFromOnionName } from 'zova-core';
7
7
 
8
8
  const renderFieldJsxPropsSystem = ['children', 'v-slot', 'v-slot-scope', 'v-if', 'v-for', 'v-each', 'key'];
9
9
 
@@ -207,8 +207,9 @@ class ZovaJsx extends BeanSimple {
207
207
  const onionOptions = beanInstance.$onionOptions;
208
208
  // props
209
209
  let props = this.renderJsxProps(actionChild.props, {}, celScope, renderContext);
210
- if (onionOptions) {
211
- props = deepExtend({}, onionOptions, props);
210
+ if (!isEmptyObject(onionOptions)) {
211
+ // not use deepExtend, maybe: Maximum call stack size exceeded
212
+ props = Object.assign({}, onionOptions, props);
212
213
  }
213
214
  if (!renderContext) throw new Error('should provide renderContext');
214
215
  return beanInstance.execute(props, renderContext, next);
@@ -372,6 +373,16 @@ class ZovaJsx extends BeanSimple {
372
373
  const props = this.renderJsxProps(jsxChild.props, {}, celScope, renderContext);
373
374
  celScope[cast(props).name] = cast(props).value;
374
375
  child = undefined;
376
+ } else if (jsxChild.type === 'log') {
377
+ const props = this.renderJsxProps(jsxChild.props, {}, celScope, renderContext);
378
+ const name = cast(props).name;
379
+ const message = cast(props).message;
380
+ if (isNil(name)) {
381
+ console.log(message);
382
+ } else {
383
+ console.log(name, message);
384
+ }
385
+ child = undefined;
375
386
  } else {
376
387
  child = this.render(jsxChild, undefined, celScope, renderContext);
377
388
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-jsx",
3
- "version": "1.1.21",
4
- "gitHead": "a1a434bfa0b460fb1ade6cc796fa7457a79db9a2",
3
+ "version": "1.1.22",
4
+ "gitHead": "8d42f31a8ee23be4564814a901d770307635c849",
5
5
  "description": "Zova JSX",
6
6
  "keywords": [
7
7
  "ioc",
@@ -41,10 +41,10 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@cabloy/compose": "^2.1.4",
44
- "@cabloy/utils": "^2.1.6",
44
+ "@cabloy/utils": "^2.1.9",
45
45
  "@cabloy/word-utils": "^2.1.8",
46
46
  "typestyle": "^2.4.0",
47
47
  "vue": "^3.5.32",
48
- "zova-core": "^5.1.20"
48
+ "zova-core": "^5.1.21"
49
49
  }
50
50
  }