@deot/vc-components 1.0.32 → 1.0.34

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
@@ -8267,6 +8267,12 @@ const useScroller = (expose) => {
8267
8267
  content,
8268
8268
  scrollTo,
8269
8269
  refresh,
8270
+ scrollLeft: scrollX,
8271
+ scrollTop: scrollY,
8272
+ clientWidth: wrapperW,
8273
+ clientHeight: wrapperH,
8274
+ scrollHeight: contentH,
8275
+ scrollWidth: contentW,
8270
8276
  setScrollTop: (value) => {
8271
8277
  scrollTo({ y: value });
8272
8278
  },
@@ -10490,7 +10496,7 @@ const COMPONENT_NAME$N = "vc-resizer";
10490
10496
  const Resizer = vue.defineComponent({
10491
10497
  name: COMPONENT_NAME$N,
10492
10498
  props: props$A,
10493
- emit: ["resize", "change"],
10499
+ emits: ["resize"],
10494
10500
  setup(props, { emit, slots, expose }) {
10495
10501
  const width = vue.ref(0);
10496
10502
  const height = vue.ref(0);
@@ -10519,8 +10525,10 @@ const Resizer = vue.defineComponent({
10519
10525
  heightChanged && (height.value = height$);
10520
10526
  widthChanged && (width.value = width$);
10521
10527
  if (heightChanged || widthChanged) {
10522
- hasInitial && emit("resize", currentExposed.value);
10523
- emit("change", currentExposed.value);
10528
+ emit("resize", {
10529
+ ...currentExposed.value,
10530
+ inited: hasInitial
10531
+ });
10524
10532
  }
10525
10533
  hasInitial = true;
10526
10534
  };
@@ -13790,8 +13798,8 @@ const RecycleList = /* @__PURE__ */ vue.defineComponent({
13790
13798
  };
13791
13799
 
13792
13800
  // 图片撑开时,会影响布局, 节流结束后调用
13793
- const handleResize = Utils.throttle(async () => {
13794
- if (!wrapper.value) return;
13801
+ const handleResize = Utils.throttle(async e => {
13802
+ if (!wrapper.value || e && e.inited === false) return;
13795
13803
  const isNeedRefreshLayout = rebuildData.value.some(i => !i.isPlaceholder);
13796
13804
  if (isNeedRefreshLayout) {
13797
13805
  const oldFirstItemIndex = firstItemIndex.value;
@@ -15383,7 +15391,7 @@ const NormalList = /* @__PURE__ */ vue.defineComponent({
15383
15391
  return vue.createVNode(Resizer, {
15384
15392
  "key": mergeData.id,
15385
15393
  "fill": false,
15386
- "onChange": e => handleResize(e, index)
15394
+ "onResize": e => handleResize(e, index)
15387
15395
  }, {
15388
15396
  default: () => [slots.default?.({
15389
15397
  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>;
@@ -13573,6 +13573,12 @@ var VcComponents = (function (exports, vue) {
13573
13573
  content,
13574
13574
  scrollTo,
13575
13575
  refresh,
13576
+ scrollLeft: scrollX,
13577
+ scrollTop: scrollY,
13578
+ clientWidth: wrapperW,
13579
+ clientHeight: wrapperH,
13580
+ scrollHeight: contentH,
13581
+ scrollWidth: contentW,
13576
13582
  setScrollTop: (value) => {
13577
13583
  scrollTo({ y: value });
13578
13584
  },
@@ -19196,7 +19202,7 @@ var VcComponents = (function (exports, vue) {
19196
19202
  const Resizer = vue.defineComponent({
19197
19203
  name: COMPONENT_NAME$N,
19198
19204
  props: props$A,
19199
- emit: ["resize", "change"],
19205
+ emits: ["resize"],
19200
19206
  setup(props, { emit, slots, expose }) {
19201
19207
  const width = vue.ref(0);
19202
19208
  const height = vue.ref(0);
@@ -19225,8 +19231,10 @@ var VcComponents = (function (exports, vue) {
19225
19231
  heightChanged && (height.value = height$);
19226
19232
  widthChanged && (width.value = width$);
19227
19233
  if (heightChanged || widthChanged) {
19228
- hasInitial && emit("resize", currentExposed.value);
19229
- emit("change", currentExposed.value);
19234
+ emit("resize", {
19235
+ ...currentExposed.value,
19236
+ inited: hasInitial
19237
+ });
19230
19238
  }
19231
19239
  hasInitial = true;
19232
19240
  };
@@ -22610,8 +22618,8 @@ var VcComponents = (function (exports, vue) {
22610
22618
  };
22611
22619
 
22612
22620
  // 图片撑开时,会影响布局, 节流结束后调用
22613
- const handleResize = throttle$1(async () => {
22614
- if (!wrapper.value) return;
22621
+ const handleResize = throttle$1(async e => {
22622
+ if (!wrapper.value || e && e.inited === false) return;
22615
22623
  const isNeedRefreshLayout = rebuildData.value.some(i => !i.isPlaceholder);
22616
22624
  if (isNeedRefreshLayout) {
22617
22625
  const oldFirstItemIndex = firstItemIndex.value;
@@ -41414,7 +41422,7 @@ var VcComponents = (function (exports, vue) {
41414
41422
  return vue.createVNode(Resizer, {
41415
41423
  "key": mergeData.id,
41416
41424
  "fill": false,
41417
- "onChange": e => handleResize(e, index)
41425
+ "onResize": e => handleResize(e, index)
41418
41426
  }, {
41419
41427
  default: () => [slots.default?.({
41420
41428
  row: mergeData,
package/dist/index.js CHANGED
@@ -8245,6 +8245,12 @@ const useScroller = (expose) => {
8245
8245
  content,
8246
8246
  scrollTo,
8247
8247
  refresh,
8248
+ scrollLeft: scrollX,
8249
+ scrollTop: scrollY,
8250
+ clientWidth: wrapperW,
8251
+ clientHeight: wrapperH,
8252
+ scrollHeight: contentH,
8253
+ scrollWidth: contentW,
8248
8254
  setScrollTop: (value) => {
8249
8255
  scrollTo({ y: value });
8250
8256
  },
@@ -10468,7 +10474,7 @@ const COMPONENT_NAME$N = "vc-resizer";
10468
10474
  const Resizer = defineComponent({
10469
10475
  name: COMPONENT_NAME$N,
10470
10476
  props: props$A,
10471
- emit: ["resize", "change"],
10477
+ emits: ["resize"],
10472
10478
  setup(props, { emit, slots, expose }) {
10473
10479
  const width = ref(0);
10474
10480
  const height = ref(0);
@@ -10497,8 +10503,10 @@ const Resizer = defineComponent({
10497
10503
  heightChanged && (height.value = height$);
10498
10504
  widthChanged && (width.value = width$);
10499
10505
  if (heightChanged || widthChanged) {
10500
- hasInitial && emit("resize", currentExposed.value);
10501
- emit("change", currentExposed.value);
10506
+ emit("resize", {
10507
+ ...currentExposed.value,
10508
+ inited: hasInitial
10509
+ });
10502
10510
  }
10503
10511
  hasInitial = true;
10504
10512
  };
@@ -13768,8 +13776,8 @@ const RecycleList = /* @__PURE__ */ defineComponent({
13768
13776
  };
13769
13777
 
13770
13778
  // 图片撑开时,会影响布局, 节流结束后调用
13771
- const handleResize = throttle$1(async () => {
13772
- if (!wrapper.value) return;
13779
+ const handleResize = throttle$1(async e => {
13780
+ if (!wrapper.value || e && e.inited === false) return;
13773
13781
  const isNeedRefreshLayout = rebuildData.value.some(i => !i.isPlaceholder);
13774
13782
  if (isNeedRefreshLayout) {
13775
13783
  const oldFirstItemIndex = firstItemIndex.value;
@@ -15361,7 +15369,7 @@ const NormalList = /* @__PURE__ */ defineComponent({
15361
15369
  return createVNode(Resizer, {
15362
15370
  "key": mergeData.id,
15363
15371
  "fill": false,
15364
- "onChange": e => handleResize(e, index)
15372
+ "onResize": e => handleResize(e, index)
15365
15373
  }, {
15366
15374
  default: () => [slots.default?.({
15367
15375
  row: mergeData,
@@ -13576,6 +13576,12 @@
13576
13576
  content,
13577
13577
  scrollTo,
13578
13578
  refresh,
13579
+ scrollLeft: scrollX,
13580
+ scrollTop: scrollY,
13581
+ clientWidth: wrapperW,
13582
+ clientHeight: wrapperH,
13583
+ scrollHeight: contentH,
13584
+ scrollWidth: contentW,
13579
13585
  setScrollTop: (value) => {
13580
13586
  scrollTo({ y: value });
13581
13587
  },
@@ -19199,7 +19205,7 @@
19199
19205
  const Resizer = vue.defineComponent({
19200
19206
  name: COMPONENT_NAME$N,
19201
19207
  props: props$A,
19202
- emit: ["resize", "change"],
19208
+ emits: ["resize"],
19203
19209
  setup(props, { emit, slots, expose }) {
19204
19210
  const width = vue.ref(0);
19205
19211
  const height = vue.ref(0);
@@ -19228,8 +19234,10 @@
19228
19234
  heightChanged && (height.value = height$);
19229
19235
  widthChanged && (width.value = width$);
19230
19236
  if (heightChanged || widthChanged) {
19231
- hasInitial && emit("resize", currentExposed.value);
19232
- emit("change", currentExposed.value);
19237
+ emit("resize", {
19238
+ ...currentExposed.value,
19239
+ inited: hasInitial
19240
+ });
19233
19241
  }
19234
19242
  hasInitial = true;
19235
19243
  };
@@ -22613,8 +22621,8 @@
22613
22621
  };
22614
22622
 
22615
22623
  // 图片撑开时,会影响布局, 节流结束后调用
22616
- const handleResize = throttle$1(async () => {
22617
- if (!wrapper.value) return;
22624
+ const handleResize = throttle$1(async e => {
22625
+ if (!wrapper.value || e && e.inited === false) return;
22618
22626
  const isNeedRefreshLayout = rebuildData.value.some(i => !i.isPlaceholder);
22619
22627
  if (isNeedRefreshLayout) {
22620
22628
  const oldFirstItemIndex = firstItemIndex.value;
@@ -41417,7 +41425,7 @@
41417
41425
  return vue.createVNode(Resizer, {
41418
41426
  "key": mergeData.id,
41419
41427
  "fill": false,
41420
- "onChange": e => handleResize(e, index)
41428
+ "onResize": e => handleResize(e, index)
41421
41429
  }, {
41422
41430
  default: () => [slots.default?.({
41423
41431
  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.34",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",