@94ai/nf-search-form 3.3.10 → 3.3.11

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.
@@ -7312,21 +7312,6 @@ __sfc_main.setup = (__props, __ctx) => {
7312
7312
  }
7313
7313
  }
7314
7314
  };
7315
- const onResize = async (params = {}) => {
7316
- var _a2;
7317
- const {
7318
- width
7319
- } = ((_a2 = params == null ? void 0 : params[0]) == null ? void 0 : _a2.contentRect) || {};
7320
- if (width && domWidth.value && width === domWidth.value) {
7321
- return;
7322
- }
7323
- if (domWidth.value) {
7324
- await vueDemi.nextTick();
7325
- domWidth.value = topDom.value.offsetWidth;
7326
- }
7327
- refreshLabel();
7328
- calcColumns();
7329
- };
7330
7315
  const calcColumns = () => {
7331
7316
  if (props.columns) {
7332
7317
  newColumns.value = props.columns;
@@ -7348,10 +7333,26 @@ __sfc_main.setup = (__props, __ctx) => {
7348
7333
  }, 0);
7349
7334
  newColumns.value = count;
7350
7335
  };
7336
+ const throttleCalcColumns = lodashEs.throttle(calcColumns, 100);
7337
+ const onResize = async (params = {}) => {
7338
+ var _a2;
7339
+ const {
7340
+ width
7341
+ } = ((_a2 = params == null ? void 0 : params[0]) == null ? void 0 : _a2.contentRect) || {};
7342
+ if (width && domWidth.value && width === domWidth.value) {
7343
+ return;
7344
+ }
7345
+ if (domWidth.value) {
7346
+ await vueDemi.nextTick();
7347
+ domWidth.value = topDom.value.offsetWidth;
7348
+ }
7349
+ refreshLabel();
7350
+ throttleCalcColumns();
7351
+ };
7351
7352
  const observer = vueDemi.ref();
7352
7353
  vueDemi.onMounted(async () => {
7353
7354
  await vueDemi.nextTick();
7354
- observer.value = new ResizeObserver(lodashEs.throttle(onResize, 100));
7355
+ observer.value = new ResizeObserver(onResize);
7355
7356
  observer.value.observe(topDom.value, {
7356
7357
  box: "border-box"
7357
7358
  });
@@ -7310,21 +7310,6 @@ __sfc_main.setup = (__props, __ctx) => {
7310
7310
  }
7311
7311
  }
7312
7312
  };
7313
- const onResize = async (params = {}) => {
7314
- var _a2;
7315
- const {
7316
- width
7317
- } = ((_a2 = params == null ? void 0 : params[0]) == null ? void 0 : _a2.contentRect) || {};
7318
- if (width && domWidth.value && width === domWidth.value) {
7319
- return;
7320
- }
7321
- if (domWidth.value) {
7322
- await nextTick();
7323
- domWidth.value = topDom.value.offsetWidth;
7324
- }
7325
- refreshLabel();
7326
- calcColumns();
7327
- };
7328
7313
  const calcColumns = () => {
7329
7314
  if (props.columns) {
7330
7315
  newColumns.value = props.columns;
@@ -7346,10 +7331,26 @@ __sfc_main.setup = (__props, __ctx) => {
7346
7331
  }, 0);
7347
7332
  newColumns.value = count;
7348
7333
  };
7334
+ const throttleCalcColumns = throttle$1(calcColumns, 100);
7335
+ const onResize = async (params = {}) => {
7336
+ var _a2;
7337
+ const {
7338
+ width
7339
+ } = ((_a2 = params == null ? void 0 : params[0]) == null ? void 0 : _a2.contentRect) || {};
7340
+ if (width && domWidth.value && width === domWidth.value) {
7341
+ return;
7342
+ }
7343
+ if (domWidth.value) {
7344
+ await nextTick();
7345
+ domWidth.value = topDom.value.offsetWidth;
7346
+ }
7347
+ refreshLabel();
7348
+ throttleCalcColumns();
7349
+ };
7349
7350
  const observer = ref();
7350
7351
  onMounted(async () => {
7351
7352
  await nextTick();
7352
- observer.value = new ResizeObserver(throttle$1(onResize, 100));
7353
+ observer.value = new ResizeObserver(onResize);
7353
7354
  observer.value.observe(topDom.value, {
7354
7355
  box: "border-box"
7355
7356
  });
@@ -915,21 +915,6 @@ const refreshLabel = () => {
915
915
  }
916
916
  }
917
917
  }
918
- const onResize = async (params: Record<string, any> = {}) => {
919
- const {
920
- width
921
- } = (params?.[0]?.contentRect) || {}
922
- if (width && domWidth.value && width === domWidth.value) {
923
- return
924
- }
925
- if (domWidth.value) {
926
- await nextTick()
927
- domWidth.value = topDom.value.offsetWidth
928
- }
929
- refreshLabel()
930
- calcColumns()
931
- }
932
-
933
918
  const calcColumns = () => {
934
919
  if (props.columns) {
935
920
  newColumns.value = props.columns
@@ -951,10 +936,27 @@ const calcColumns = () => {
951
936
  newColumns.value = count
952
937
  }
953
938
 
939
+ const throttleCalcColumns = throttle(calcColumns, 100)
940
+
941
+ const onResize = async (params: Record<string, any> = {}) => {
942
+ const {
943
+ width
944
+ } = (params?.[0]?.contentRect) || {}
945
+ if (width && domWidth.value && width === domWidth.value) {
946
+ return
947
+ }
948
+ if (domWidth.value) {
949
+ await nextTick()
950
+ domWidth.value = topDom.value.offsetWidth
951
+ }
952
+ refreshLabel()
953
+ throttleCalcColumns()
954
+ }
955
+
954
956
  const observer = ref()
955
957
  onMounted(async () => {
956
958
  await nextTick()
957
- observer.value = new ResizeObserver(throttle(onResize, 100))
959
+ observer.value = new ResizeObserver(onResize)
958
960
  observer.value.observe(topDom.value, { box: 'border-box' })
959
961
  })
960
962
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "3.3.10",
3
+ "version": "3.3.11",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,22 +14,22 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/common-utils": "^3.3.10",
18
- "@94ai/nf-button": "^3.3.10",
19
- "@94ai/nf-double-half-year": "^3.3.10",
20
- "@94ai/nf-double-quarter": "^3.3.10",
21
- "@94ai/nf-double-week": "^3.3.10",
22
- "@94ai/nf-double-year": "^3.3.10",
23
- "@94ai/nf-drawer": "^3.3.10",
24
- "@94ai/nf-form": "^3.3.10",
25
- "@94ai/nf-form-item": "^3.3.10",
26
- "@94ai/nf-half-year-picker": "^3.3.10",
27
- "@94ai/nf-lazy-select": "^3.3.10",
28
- "@94ai/nf-message": "^3.3.10",
29
- "@94ai/nf-quarter-picker": "^3.3.10",
30
- "@94ai/nf-theme-chalk": "^3.3.10",
31
- "@94ai/nf-transfer-select": "^3.3.10",
32
- "@94ai/nf-virtual-select": "^3.3.10",
17
+ "@94ai/common-utils": "^3.3.11",
18
+ "@94ai/nf-button": "^3.3.11",
19
+ "@94ai/nf-double-half-year": "^3.3.11",
20
+ "@94ai/nf-double-quarter": "^3.3.11",
21
+ "@94ai/nf-double-week": "^3.3.11",
22
+ "@94ai/nf-double-year": "^3.3.11",
23
+ "@94ai/nf-drawer": "^3.3.11",
24
+ "@94ai/nf-form": "^3.3.11",
25
+ "@94ai/nf-form-item": "^3.3.11",
26
+ "@94ai/nf-half-year-picker": "^3.3.11",
27
+ "@94ai/nf-lazy-select": "^3.3.11",
28
+ "@94ai/nf-message": "^3.3.11",
29
+ "@94ai/nf-quarter-picker": "^3.3.11",
30
+ "@94ai/nf-theme-chalk": "^3.3.11",
31
+ "@94ai/nf-transfer-select": "^3.3.11",
32
+ "@94ai/nf-virtual-select": "^3.3.11",
33
33
  "idb-keyval": "^6.2.1",
34
34
  "resize-observer-polyfill": "^1.5.1",
35
35
  "vue-demi": "^0.14.5",
@@ -48,5 +48,5 @@
48
48
  "types": "lib/index.d.ts",
49
49
  "main": "lib/nf-search-form.cjs.js",
50
50
  "module": "lib/nf-search-form.esm-bundler.js",
51
- "gitHead": "167d2cc9b9da08f267ff55ba260378bd4c317c1f"
51
+ "gitHead": "1a2bb91c93b255d1036d88a5a58e6e785e4131e2"
52
52
  }