@94ai/nf-search-form 3.2.44 → 3.2.45

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/lib/index.d.ts CHANGED
@@ -1385,7 +1385,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1385
1385
  columnCheckDrawer: import("vue-demi").Ref<any>;
1386
1386
  configNfSearchItemVisibleDialog: import("vue-demi").Ref<boolean>;
1387
1387
  syncCookiesToSearchFormItemOptions: (readCached?: boolean) => void;
1388
- onResize: (params?: Record<string, any>) => void;
1388
+ onResize: (params?: Record<string, any>) => Promise<void>;
1389
1389
  visibleChange: () => void;
1390
1390
  }> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{
1391
1391
  storageKey: {
@@ -2264,7 +2264,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
2264
2264
  columnCheckDrawer: import("vue-demi").Ref<any>;
2265
2265
  configNfSearchItemVisibleDialog: import("vue-demi").Ref<boolean>;
2266
2266
  syncCookiesToSearchFormItemOptions: (readCached?: boolean) => void;
2267
- onResize: (params?: Record<string, any>) => void;
2267
+ onResize: (params?: Record<string, any>) => Promise<void>;
2268
2268
  visibleChange: () => void;
2269
2269
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
2270
2270
  onChange: (event: Record<string, any>) => void;
@@ -7712,13 +7712,18 @@ __sfc_main.setup = (__props, __ctx) => {
7712
7712
  }
7713
7713
  }
7714
7714
  };
7715
- const onResize = (params = {}) => {
7715
+ const onResize = async (params = {}) => {
7716
+ var _a2;
7716
7717
  const {
7717
7718
  width
7718
- } = (params == null ? void 0 : params[0].contentRect) || {};
7719
+ } = ((_a2 = params == null ? void 0 : params[0]) == null ? void 0 : _a2.contentRect) || {};
7719
7720
  if (width && domWidth.value && width === domWidth.value) {
7720
7721
  return;
7721
7722
  }
7723
+ if (domWidth.value) {
7724
+ await vueDemi.nextTick();
7725
+ domWidth.value = topDom.value.offsetWidth;
7726
+ }
7722
7727
  refreshLabel();
7723
7728
  };
7724
7729
  const calcColumns = () => {
@@ -7748,7 +7753,6 @@ __sfc_main.setup = (__props, __ctx) => {
7748
7753
  observer.value.observe(topDom.value, {
7749
7754
  box: "border-box"
7750
7755
  });
7751
- domWidth.value = topDom.value.offsetWidth;
7752
7756
  });
7753
7757
  vueDemi.onBeforeUnmount(() => {
7754
7758
  var _a2;
@@ -7710,13 +7710,18 @@ __sfc_main.setup = (__props, __ctx) => {
7710
7710
  }
7711
7711
  }
7712
7712
  };
7713
- const onResize = (params = {}) => {
7713
+ const onResize = async (params = {}) => {
7714
+ var _a2;
7714
7715
  const {
7715
7716
  width
7716
- } = (params == null ? void 0 : params[0].contentRect) || {};
7717
+ } = ((_a2 = params == null ? void 0 : params[0]) == null ? void 0 : _a2.contentRect) || {};
7717
7718
  if (width && domWidth.value && width === domWidth.value) {
7718
7719
  return;
7719
7720
  }
7721
+ if (domWidth.value) {
7722
+ await nextTick();
7723
+ domWidth.value = topDom.value.offsetWidth;
7724
+ }
7720
7725
  refreshLabel();
7721
7726
  };
7722
7727
  const calcColumns = () => {
@@ -7746,7 +7751,6 @@ __sfc_main.setup = (__props, __ctx) => {
7746
7751
  observer.value.observe(topDom.value, {
7747
7752
  box: "border-box"
7748
7753
  });
7749
- domWidth.value = topDom.value.offsetWidth;
7750
7754
  });
7751
7755
  onBeforeUnmount(() => {
7752
7756
  var _a2;
@@ -472,7 +472,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
472
472
  columnCheckDrawer: import("vue-demi").Ref<any>;
473
473
  configNfSearchItemVisibleDialog: import("vue-demi").Ref<boolean>;
474
474
  syncCookiesToSearchFormItemOptions: (readCached?: boolean) => void;
475
- onResize: (params?: Record<string, any>) => void;
475
+ onResize: (params?: Record<string, any>) => Promise<void>;
476
476
  visibleChange: () => void;
477
477
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
478
478
  onChange: (event: Record<string, any>) => void;
@@ -830,12 +830,18 @@ const refreshLabel = () => {
830
830
  }
831
831
  }
832
832
  }
833
- const onResize = (params: Record<string, any> = {}) => {
834
- const { width } = (params?.[0].contentRect || {})
833
+ const onResize = async (params: Record<string, any> = {}) => {
834
+ const {
835
+ width
836
+ } = (params?.[0]?.contentRect) || {};
835
837
  if (width && domWidth.value && width === domWidth.value) {
836
- return
838
+ return;
837
839
  }
838
- refreshLabel()
840
+ if (domWidth.value) {
841
+ await nextTick();
842
+ domWidth.value = topDom.value.offsetWidth;
843
+ }
844
+ refreshLabel();
839
845
  }
840
846
 
841
847
  const calcColumns = () => {
@@ -863,7 +869,6 @@ onMounted(async () => {
863
869
  await nextTick()
864
870
  observer.value = new ResizeObserver(onResize)
865
871
  observer.value.observe(topDom.value, { box: "border-box" });
866
- domWidth.value = topDom.value.offsetWidth;
867
872
  })
868
873
 
869
874
  onBeforeUnmount(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "3.2.44",
3
+ "version": "3.2.45",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,20 +14,20 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-action": "^3.2.44",
18
- "@94ai/nf-double-half-year": "^3.2.44",
19
- "@94ai/nf-double-quarter": "^3.2.44",
20
- "@94ai/nf-double-week": "^3.2.44",
21
- "@94ai/nf-double-year": "^3.2.44",
22
- "@94ai/nf-drawer": "^3.2.44",
23
- "@94ai/nf-form": "^3.2.44",
24
- "@94ai/nf-form-item": "^3.2.44",
25
- "@94ai/nf-half-year-picker": "^3.2.44",
26
- "@94ai/nf-message": "^3.2.44",
27
- "@94ai/nf-quarter-picker": "^3.2.44",
28
- "@94ai/nf-select-transfer": "^3.2.44",
29
- "@94ai/nf-theme-chalk": "^3.2.44",
30
- "@94ai/nf-virtual-select": "^3.2.44",
17
+ "@94ai/nf-action": "^3.2.45",
18
+ "@94ai/nf-double-half-year": "^3.2.45",
19
+ "@94ai/nf-double-quarter": "^3.2.45",
20
+ "@94ai/nf-double-week": "^3.2.45",
21
+ "@94ai/nf-double-year": "^3.2.45",
22
+ "@94ai/nf-drawer": "^3.2.45",
23
+ "@94ai/nf-form": "^3.2.45",
24
+ "@94ai/nf-form-item": "^3.2.45",
25
+ "@94ai/nf-half-year-picker": "^3.2.45",
26
+ "@94ai/nf-message": "^3.2.45",
27
+ "@94ai/nf-quarter-picker": "^3.2.45",
28
+ "@94ai/nf-select-transfer": "^3.2.45",
29
+ "@94ai/nf-theme-chalk": "^3.2.45",
30
+ "@94ai/nf-virtual-select": "^3.2.45",
31
31
  "resize-observer-polyfill": "^1.5.1",
32
32
  "vue-cookies": "^1.8.3",
33
33
  "vue-demi": "^0.14.5",
@@ -46,5 +46,5 @@
46
46
  "types": "lib/index.d.ts",
47
47
  "main": "lib/nf-search-form.cjs.js",
48
48
  "module": "lib/nf-search-form.esm-bundler.js",
49
- "gitHead": "baed79e5f2059e6d9f8151a0e62c63d92e3d0ef0"
49
+ "gitHead": "914d60b4c55cf392326228138bf051eda117ac38"
50
50
  }