@deot/vc 1.0.31 → 1.0.33

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.d.ts CHANGED
@@ -7402,7 +7402,7 @@ export declare const Components: {
7402
7402
  };
7403
7403
  }>, () => VNode<RendererNode, RendererElement, {
7404
7404
  [key: string]: any;
7405
- }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
7405
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "resize"[], "resize", PublicProps, Readonly<ExtractPropTypes< {
7406
7406
  tag: {
7407
7407
  type: StringConstructor;
7408
7408
  default: string;
@@ -7411,7 +7411,9 @@ export declare const Components: {
7411
7411
  type: BooleanConstructor;
7412
7412
  default: boolean;
7413
7413
  };
7414
- }>> & Readonly<{}>, {
7414
+ }>> & Readonly<{
7415
+ onResize?: ((...args: any[]) => any) | undefined;
7416
+ }>, {
7415
7417
  fill: boolean;
7416
7418
  tag: string;
7417
7419
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -7426,7 +7428,7 @@ export declare const Components: {
7426
7428
  };
7427
7429
  }>, () => VNode<RendererNode, RendererElement, {
7428
7430
  [key: string]: any;
7429
- }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
7431
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "resize"[], "resize", PublicProps, Readonly<ExtractPropTypes< {
7430
7432
  tag: {
7431
7433
  type: StringConstructor;
7432
7434
  default: string;
@@ -7435,7 +7437,9 @@ export declare const Components: {
7435
7437
  type: BooleanConstructor;
7436
7438
  default: boolean;
7437
7439
  };
7438
- }>> & Readonly<{}>, {
7440
+ }>> & Readonly<{
7441
+ onResize?: ((...args: any[]) => any) | undefined;
7442
+ }>, {
7439
7443
  fill: boolean;
7440
7444
  tag: string;
7441
7445
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -34849,6 +34849,7 @@ var Vc = (function (exports, vue) {
34849
34849
  o[k] = v !== null && v !== void 0 ? v : Array.isArray(fieldValue.value) ? [].concat(initialValue) : initialValue;
34850
34850
  };
34851
34851
  const validate = async (trigger) => {
34852
+ await vue.nextTick();
34852
34853
  if (!props2.prop) return;
34853
34854
  let rules = currentRules.value.filter((rule) => !rule.trigger || rule.trigger.includes(trigger));
34854
34855
  if (!rules.length) {
@@ -35990,7 +35991,7 @@ var Vc = (function (exports, vue) {
35990
35991
  const Resizer = vue.defineComponent({
35991
35992
  name: COMPONENT_NAME$N,
35992
35993
  props: props$A,
35993
- emit: ["resize", "change"],
35994
+ emits: ["resize"],
35994
35995
  setup(props2, { emit, slots, expose }) {
35995
35996
  const width = vue.ref(0);
35996
35997
  const height = vue.ref(0);
@@ -36019,8 +36020,10 @@ var Vc = (function (exports, vue) {
36019
36020
  heightChanged && (height.value = height$);
36020
36021
  widthChanged && (width.value = width$);
36021
36022
  if (heightChanged || widthChanged) {
36022
- hasInitial && emit("resize", currentExposed.value);
36023
- emit("change", currentExposed.value);
36023
+ emit("resize", {
36024
+ ...currentExposed.value,
36025
+ inited: hasInitial
36026
+ });
36024
36027
  }
36025
36028
  hasInitial = true;
36026
36029
  };
@@ -39058,8 +39061,8 @@ var Vc = (function (exports, vue) {
39058
39061
  });
39059
39062
  await refreshLayout(0, rebuildData.value.length);
39060
39063
  };
39061
- const handleResize = throttle$1(async () => {
39062
- if (!wrapper.value) return;
39064
+ const handleResize = throttle$1(async (e) => {
39065
+ if (!wrapper.value || e && e.inited === false) return;
39063
39066
  const isNeedRefreshLayout = rebuildData.value.some((i) => !i.isPlaceholder);
39064
39067
  if (isNeedRefreshLayout) {
39065
39068
  const oldFirstItemIndex = firstItemIndex.value;
@@ -40606,7 +40609,7 @@ var Vc = (function (exports, vue) {
40606
40609
  return vue.createVNode(Resizer, {
40607
40610
  "key": mergeData.id,
40608
40611
  "fill": false,
40609
- "onChange": (e) => handleResize(e, index)
40612
+ "onResize": (e) => handleResize(e, index)
40610
40613
  }, {
40611
40614
  default: () => [slots.default?.({
40612
40615
  row: mergeData,
@@ -34852,6 +34852,7 @@
34852
34852
  o[k] = v !== null && v !== void 0 ? v : Array.isArray(fieldValue.value) ? [].concat(initialValue) : initialValue;
34853
34853
  };
34854
34854
  const validate = async (trigger) => {
34855
+ await vue.nextTick();
34855
34856
  if (!props2.prop) return;
34856
34857
  let rules = currentRules.value.filter((rule) => !rule.trigger || rule.trigger.includes(trigger));
34857
34858
  if (!rules.length) {
@@ -35993,7 +35994,7 @@
35993
35994
  const Resizer = vue.defineComponent({
35994
35995
  name: COMPONENT_NAME$N,
35995
35996
  props: props$A,
35996
- emit: ["resize", "change"],
35997
+ emits: ["resize"],
35997
35998
  setup(props2, { emit, slots, expose }) {
35998
35999
  const width = vue.ref(0);
35999
36000
  const height = vue.ref(0);
@@ -36022,8 +36023,10 @@
36022
36023
  heightChanged && (height.value = height$);
36023
36024
  widthChanged && (width.value = width$);
36024
36025
  if (heightChanged || widthChanged) {
36025
- hasInitial && emit("resize", currentExposed.value);
36026
- emit("change", currentExposed.value);
36026
+ emit("resize", {
36027
+ ...currentExposed.value,
36028
+ inited: hasInitial
36029
+ });
36027
36030
  }
36028
36031
  hasInitial = true;
36029
36032
  };
@@ -39061,8 +39064,8 @@
39061
39064
  });
39062
39065
  await refreshLayout(0, rebuildData.value.length);
39063
39066
  };
39064
- const handleResize = throttle$1(async () => {
39065
- if (!wrapper.value) return;
39067
+ const handleResize = throttle$1(async (e) => {
39068
+ if (!wrapper.value || e && e.inited === false) return;
39066
39069
  const isNeedRefreshLayout = rebuildData.value.some((i) => !i.isPlaceholder);
39067
39070
  if (isNeedRefreshLayout) {
39068
39071
  const oldFirstItemIndex = firstItemIndex.value;
@@ -40609,7 +40612,7 @@
40609
40612
  return vue.createVNode(Resizer, {
40610
40613
  "key": mergeData.id,
40611
40614
  "fill": false,
40612
- "onChange": (e) => handleResize(e, index)
40615
+ "onResize": (e) => handleResize(e, index)
40613
40616
  }, {
40614
40617
  default: () => [slots.default?.({
40615
40618
  row: mergeData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/vc",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,9 +19,9 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@deot/vc-components": "^1.0.31",
23
- "@deot/vc-hooks": "^1.0.31",
24
- "@deot/vc-shared": "^1.0.31"
22
+ "@deot/vc-components": "^1.0.33",
23
+ "@deot/vc-hooks": "^1.0.33",
24
+ "@deot/vc-shared": "^1.0.33"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "vue": "*"