@deot/vc-components 1.0.32 → 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.cjs CHANGED
@@ -10490,7 +10490,7 @@ const COMPONENT_NAME$N = "vc-resizer";
10490
10490
  const Resizer = vue.defineComponent({
10491
10491
  name: COMPONENT_NAME$N,
10492
10492
  props: props$A,
10493
- emit: ["resize", "change"],
10493
+ emits: ["resize"],
10494
10494
  setup(props, { emit, slots, expose }) {
10495
10495
  const width = vue.ref(0);
10496
10496
  const height = vue.ref(0);
@@ -10519,8 +10519,10 @@ const Resizer = vue.defineComponent({
10519
10519
  heightChanged && (height.value = height$);
10520
10520
  widthChanged && (width.value = width$);
10521
10521
  if (heightChanged || widthChanged) {
10522
- hasInitial && emit("resize", currentExposed.value);
10523
- emit("change", currentExposed.value);
10522
+ emit("resize", {
10523
+ ...currentExposed.value,
10524
+ inited: hasInitial
10525
+ });
10524
10526
  }
10525
10527
  hasInitial = true;
10526
10528
  };
@@ -13790,8 +13792,8 @@ const RecycleList = /* @__PURE__ */ vue.defineComponent({
13790
13792
  };
13791
13793
 
13792
13794
  // 图片撑开时,会影响布局, 节流结束后调用
13793
- const handleResize = Utils.throttle(async () => {
13794
- if (!wrapper.value) return;
13795
+ const handleResize = Utils.throttle(async e => {
13796
+ if (!wrapper.value || e && e.inited === false) return;
13795
13797
  const isNeedRefreshLayout = rebuildData.value.some(i => !i.isPlaceholder);
13796
13798
  if (isNeedRefreshLayout) {
13797
13799
  const oldFirstItemIndex = firstItemIndex.value;
@@ -15383,7 +15385,7 @@ const NormalList = /* @__PURE__ */ vue.defineComponent({
15383
15385
  return vue.createVNode(Resizer, {
15384
15386
  "key": mergeData.id,
15385
15387
  "fill": false,
15386
- "onChange": e => handleResize(e, index)
15388
+ "onResize": e => handleResize(e, index)
15387
15389
  }, {
15388
15390
  default: () => [slots.default?.({
15389
15391
  row: mergeData,
package/dist/index.d.ts CHANGED
@@ -6948,7 +6948,7 @@ default: boolean;
6948
6948
  };
6949
6949
  }>, () => VNode<RendererNode, RendererElement, {
6950
6950
  [key: string]: any;
6951
- }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
6951
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "resize"[], "resize", PublicProps, Readonly<ExtractPropTypes< {
6952
6952
  tag: {
6953
6953
  type: StringConstructor;
6954
6954
  default: string;
@@ -6957,7 +6957,9 @@ fill: {
6957
6957
  type: BooleanConstructor;
6958
6958
  default: boolean;
6959
6959
  };
6960
- }>> & Readonly<{}>, {
6960
+ }>> & Readonly<{
6961
+ onResize?: ((...args: any[]) => any) | undefined;
6962
+ }>, {
6961
6963
  tag: string;
6962
6964
  fill: boolean;
6963
6965
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -10805,7 +10807,7 @@ default: boolean;
10805
10807
  };
10806
10808
  }>, () => VNode<RendererNode, RendererElement, {
10807
10809
  [key: string]: any;
10808
- }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
10810
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "resize"[], "resize", PublicProps, Readonly<ExtractPropTypes< {
10809
10811
  tag: {
10810
10812
  type: StringConstructor;
10811
10813
  default: string;
@@ -10814,7 +10816,9 @@ fill: {
10814
10816
  type: BooleanConstructor;
10815
10817
  default: boolean;
10816
10818
  };
10817
- }>> & Readonly<{}>, {
10819
+ }>> & Readonly<{
10820
+ onResize?: ((...args: any[]) => any) | undefined;
10821
+ }>, {
10818
10822
  tag: string;
10819
10823
  fill: boolean;
10820
10824
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -19196,7 +19196,7 @@ var VcComponents = (function (exports, vue) {
19196
19196
  const Resizer = vue.defineComponent({
19197
19197
  name: COMPONENT_NAME$N,
19198
19198
  props: props$A,
19199
- emit: ["resize", "change"],
19199
+ emits: ["resize"],
19200
19200
  setup(props, { emit, slots, expose }) {
19201
19201
  const width = vue.ref(0);
19202
19202
  const height = vue.ref(0);
@@ -19225,8 +19225,10 @@ var VcComponents = (function (exports, vue) {
19225
19225
  heightChanged && (height.value = height$);
19226
19226
  widthChanged && (width.value = width$);
19227
19227
  if (heightChanged || widthChanged) {
19228
- hasInitial && emit("resize", currentExposed.value);
19229
- emit("change", currentExposed.value);
19228
+ emit("resize", {
19229
+ ...currentExposed.value,
19230
+ inited: hasInitial
19231
+ });
19230
19232
  }
19231
19233
  hasInitial = true;
19232
19234
  };
@@ -22610,8 +22612,8 @@ var VcComponents = (function (exports, vue) {
22610
22612
  };
22611
22613
 
22612
22614
  // 图片撑开时,会影响布局, 节流结束后调用
22613
- const handleResize = throttle$1(async () => {
22614
- if (!wrapper.value) return;
22615
+ const handleResize = throttle$1(async e => {
22616
+ if (!wrapper.value || e && e.inited === false) return;
22615
22617
  const isNeedRefreshLayout = rebuildData.value.some(i => !i.isPlaceholder);
22616
22618
  if (isNeedRefreshLayout) {
22617
22619
  const oldFirstItemIndex = firstItemIndex.value;
@@ -41414,7 +41416,7 @@ var VcComponents = (function (exports, vue) {
41414
41416
  return vue.createVNode(Resizer, {
41415
41417
  "key": mergeData.id,
41416
41418
  "fill": false,
41417
- "onChange": e => handleResize(e, index)
41419
+ "onResize": e => handleResize(e, index)
41418
41420
  }, {
41419
41421
  default: () => [slots.default?.({
41420
41422
  row: mergeData,
package/dist/index.js CHANGED
@@ -10468,7 +10468,7 @@ const COMPONENT_NAME$N = "vc-resizer";
10468
10468
  const Resizer = defineComponent({
10469
10469
  name: COMPONENT_NAME$N,
10470
10470
  props: props$A,
10471
- emit: ["resize", "change"],
10471
+ emits: ["resize"],
10472
10472
  setup(props, { emit, slots, expose }) {
10473
10473
  const width = ref(0);
10474
10474
  const height = ref(0);
@@ -10497,8 +10497,10 @@ const Resizer = defineComponent({
10497
10497
  heightChanged && (height.value = height$);
10498
10498
  widthChanged && (width.value = width$);
10499
10499
  if (heightChanged || widthChanged) {
10500
- hasInitial && emit("resize", currentExposed.value);
10501
- emit("change", currentExposed.value);
10500
+ emit("resize", {
10501
+ ...currentExposed.value,
10502
+ inited: hasInitial
10503
+ });
10502
10504
  }
10503
10505
  hasInitial = true;
10504
10506
  };
@@ -13768,8 +13770,8 @@ const RecycleList = /* @__PURE__ */ defineComponent({
13768
13770
  };
13769
13771
 
13770
13772
  // 图片撑开时,会影响布局, 节流结束后调用
13771
- const handleResize = throttle$1(async () => {
13772
- if (!wrapper.value) return;
13773
+ const handleResize = throttle$1(async e => {
13774
+ if (!wrapper.value || e && e.inited === false) return;
13773
13775
  const isNeedRefreshLayout = rebuildData.value.some(i => !i.isPlaceholder);
13774
13776
  if (isNeedRefreshLayout) {
13775
13777
  const oldFirstItemIndex = firstItemIndex.value;
@@ -15361,7 +15363,7 @@ const NormalList = /* @__PURE__ */ defineComponent({
15361
15363
  return createVNode(Resizer, {
15362
15364
  "key": mergeData.id,
15363
15365
  "fill": false,
15364
- "onChange": e => handleResize(e, index)
15366
+ "onResize": e => handleResize(e, index)
15365
15367
  }, {
15366
15368
  default: () => [slots.default?.({
15367
15369
  row: mergeData,
@@ -19199,7 +19199,7 @@
19199
19199
  const Resizer = vue.defineComponent({
19200
19200
  name: COMPONENT_NAME$N,
19201
19201
  props: props$A,
19202
- emit: ["resize", "change"],
19202
+ emits: ["resize"],
19203
19203
  setup(props, { emit, slots, expose }) {
19204
19204
  const width = vue.ref(0);
19205
19205
  const height = vue.ref(0);
@@ -19228,8 +19228,10 @@
19228
19228
  heightChanged && (height.value = height$);
19229
19229
  widthChanged && (width.value = width$);
19230
19230
  if (heightChanged || widthChanged) {
19231
- hasInitial && emit("resize", currentExposed.value);
19232
- emit("change", currentExposed.value);
19231
+ emit("resize", {
19232
+ ...currentExposed.value,
19233
+ inited: hasInitial
19234
+ });
19233
19235
  }
19234
19236
  hasInitial = true;
19235
19237
  };
@@ -22613,8 +22615,8 @@
22613
22615
  };
22614
22616
 
22615
22617
  // 图片撑开时,会影响布局, 节流结束后调用
22616
- const handleResize = throttle$1(async () => {
22617
- if (!wrapper.value) return;
22618
+ const handleResize = throttle$1(async e => {
22619
+ if (!wrapper.value || e && e.inited === false) return;
22618
22620
  const isNeedRefreshLayout = rebuildData.value.some(i => !i.isPlaceholder);
22619
22621
  if (isNeedRefreshLayout) {
22620
22622
  const oldFirstItemIndex = firstItemIndex.value;
@@ -41417,7 +41419,7 @@
41417
41419
  return vue.createVNode(Resizer, {
41418
41420
  "key": mergeData.id,
41419
41421
  "fill": false,
41420
- "onChange": e => handleResize(e, index)
41422
+ "onResize": e => handleResize(e, index)
41421
41423
  }, {
41422
41424
  default: () => [slots.default?.({
41423
41425
  row: mergeData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/vc-components",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",