@deot/vc 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.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>;
@@ -33926,6 +33926,12 @@ var Vc = (function (exports, vue) {
33926
33926
  content,
33927
33927
  scrollTo,
33928
33928
  refresh,
33929
+ scrollLeft: scrollX,
33930
+ scrollTop: scrollY,
33931
+ clientWidth: wrapperW,
33932
+ clientHeight: wrapperH,
33933
+ scrollHeight: contentH,
33934
+ scrollWidth: contentW,
33929
33935
  setScrollTop: (value) => {
33930
33936
  scrollTo({ y: value });
33931
33937
  },
@@ -35991,7 +35997,7 @@ var Vc = (function (exports, vue) {
35991
35997
  const Resizer = vue.defineComponent({
35992
35998
  name: COMPONENT_NAME$N,
35993
35999
  props: props$A,
35994
- emit: ["resize", "change"],
36000
+ emits: ["resize"],
35995
36001
  setup(props2, { emit, slots, expose }) {
35996
36002
  const width = vue.ref(0);
35997
36003
  const height = vue.ref(0);
@@ -36020,8 +36026,10 @@ var Vc = (function (exports, vue) {
36020
36026
  heightChanged && (height.value = height$);
36021
36027
  widthChanged && (width.value = width$);
36022
36028
  if (heightChanged || widthChanged) {
36023
- hasInitial && emit("resize", currentExposed.value);
36024
- emit("change", currentExposed.value);
36029
+ emit("resize", {
36030
+ ...currentExposed.value,
36031
+ inited: hasInitial
36032
+ });
36025
36033
  }
36026
36034
  hasInitial = true;
36027
36035
  };
@@ -39059,8 +39067,8 @@ var Vc = (function (exports, vue) {
39059
39067
  });
39060
39068
  await refreshLayout(0, rebuildData.value.length);
39061
39069
  };
39062
- const handleResize = throttle$1(async () => {
39063
- if (!wrapper.value) return;
39070
+ const handleResize = throttle$1(async (e) => {
39071
+ if (!wrapper.value || e && e.inited === false) return;
39064
39072
  const isNeedRefreshLayout = rebuildData.value.some((i) => !i.isPlaceholder);
39065
39073
  if (isNeedRefreshLayout) {
39066
39074
  const oldFirstItemIndex = firstItemIndex.value;
@@ -40607,7 +40615,7 @@ var Vc = (function (exports, vue) {
40607
40615
  return vue.createVNode(Resizer, {
40608
40616
  "key": mergeData.id,
40609
40617
  "fill": false,
40610
- "onChange": (e) => handleResize(e, index)
40618
+ "onResize": (e) => handleResize(e, index)
40611
40619
  }, {
40612
40620
  default: () => [slots.default?.({
40613
40621
  row: mergeData,
@@ -33929,6 +33929,12 @@
33929
33929
  content,
33930
33930
  scrollTo,
33931
33931
  refresh,
33932
+ scrollLeft: scrollX,
33933
+ scrollTop: scrollY,
33934
+ clientWidth: wrapperW,
33935
+ clientHeight: wrapperH,
33936
+ scrollHeight: contentH,
33937
+ scrollWidth: contentW,
33932
33938
  setScrollTop: (value) => {
33933
33939
  scrollTo({ y: value });
33934
33940
  },
@@ -35994,7 +36000,7 @@
35994
36000
  const Resizer = vue.defineComponent({
35995
36001
  name: COMPONENT_NAME$N,
35996
36002
  props: props$A,
35997
- emit: ["resize", "change"],
36003
+ emits: ["resize"],
35998
36004
  setup(props2, { emit, slots, expose }) {
35999
36005
  const width = vue.ref(0);
36000
36006
  const height = vue.ref(0);
@@ -36023,8 +36029,10 @@
36023
36029
  heightChanged && (height.value = height$);
36024
36030
  widthChanged && (width.value = width$);
36025
36031
  if (heightChanged || widthChanged) {
36026
- hasInitial && emit("resize", currentExposed.value);
36027
- emit("change", currentExposed.value);
36032
+ emit("resize", {
36033
+ ...currentExposed.value,
36034
+ inited: hasInitial
36035
+ });
36028
36036
  }
36029
36037
  hasInitial = true;
36030
36038
  };
@@ -39062,8 +39070,8 @@
39062
39070
  });
39063
39071
  await refreshLayout(0, rebuildData.value.length);
39064
39072
  };
39065
- const handleResize = throttle$1(async () => {
39066
- if (!wrapper.value) return;
39073
+ const handleResize = throttle$1(async (e) => {
39074
+ if (!wrapper.value || e && e.inited === false) return;
39067
39075
  const isNeedRefreshLayout = rebuildData.value.some((i) => !i.isPlaceholder);
39068
39076
  if (isNeedRefreshLayout) {
39069
39077
  const oldFirstItemIndex = firstItemIndex.value;
@@ -40610,7 +40618,7 @@
40610
40618
  return vue.createVNode(Resizer, {
40611
40619
  "key": mergeData.id,
40612
40620
  "fill": false,
40613
- "onChange": (e) => handleResize(e, index)
40621
+ "onResize": (e) => handleResize(e, index)
40614
40622
  }, {
40615
40623
  default: () => [slots.default?.({
40616
40624
  row: mergeData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/vc",
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",
@@ -19,9 +19,9 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@deot/vc-components": "^1.0.32",
23
- "@deot/vc-hooks": "^1.0.32",
24
- "@deot/vc-shared": "^1.0.32"
22
+ "@deot/vc-components": "^1.0.34",
23
+ "@deot/vc-hooks": "^1.0.34",
24
+ "@deot/vc-shared": "^1.0.34"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "vue": "*"