@94ai/nf-search-form 3.3.10 → 3.3.12
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/nf-search-form.cjs.js +16 -16
- package/lib/nf-search-form.esm-bundler.js +16 -16
- package/package/nf-search-form.vue +17 -16
- package/package.json +18 -18
|
@@ -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,25 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7348
7333
|
}, 0);
|
|
7349
7334
|
newColumns.value = count;
|
|
7350
7335
|
};
|
|
7336
|
+
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
|
+
};
|
|
7351
7351
|
const observer = vueDemi.ref();
|
|
7352
7352
|
vueDemi.onMounted(async () => {
|
|
7353
7353
|
await vueDemi.nextTick();
|
|
7354
|
-
observer.value = new ResizeObserver(
|
|
7354
|
+
observer.value = new ResizeObserver(onResize);
|
|
7355
7355
|
observer.value.observe(topDom.value, {
|
|
7356
7356
|
box: "border-box"
|
|
7357
7357
|
});
|
|
@@ -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,25 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7346
7331
|
}, 0);
|
|
7347
7332
|
newColumns.value = count;
|
|
7348
7333
|
};
|
|
7334
|
+
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
|
+
};
|
|
7349
7349
|
const observer = ref();
|
|
7350
7350
|
onMounted(async () => {
|
|
7351
7351
|
await nextTick();
|
|
7352
|
-
observer.value = new ResizeObserver(
|
|
7352
|
+
observer.value = new ResizeObserver(onResize);
|
|
7353
7353
|
observer.value.observe(topDom.value, {
|
|
7354
7354
|
box: "border-box"
|
|
7355
7355
|
});
|
|
@@ -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,26 @@ 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
|
+
}
|
|
954
|
+
|
|
954
955
|
const observer = ref()
|
|
955
956
|
onMounted(async () => {
|
|
956
957
|
await nextTick()
|
|
957
|
-
observer.value = new ResizeObserver(
|
|
958
|
+
observer.value = new ResizeObserver(onResize)
|
|
958
959
|
observer.value.observe(topDom.value, { box: 'border-box' })
|
|
959
960
|
})
|
|
960
961
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-search-form",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.12",
|
|
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.
|
|
18
|
-
"@94ai/nf-button": "^3.3.
|
|
19
|
-
"@94ai/nf-double-half-year": "^3.3.
|
|
20
|
-
"@94ai/nf-double-quarter": "^3.3.
|
|
21
|
-
"@94ai/nf-double-week": "^3.3.
|
|
22
|
-
"@94ai/nf-double-year": "^3.3.
|
|
23
|
-
"@94ai/nf-drawer": "^3.3.
|
|
24
|
-
"@94ai/nf-form": "^3.3.
|
|
25
|
-
"@94ai/nf-form-item": "^3.3.
|
|
26
|
-
"@94ai/nf-half-year-picker": "^3.3.
|
|
27
|
-
"@94ai/nf-lazy-select": "^3.3.
|
|
28
|
-
"@94ai/nf-message": "^3.3.
|
|
29
|
-
"@94ai/nf-quarter-picker": "^3.3.
|
|
30
|
-
"@94ai/nf-theme-chalk": "^3.3.
|
|
31
|
-
"@94ai/nf-transfer-select": "^3.3.
|
|
32
|
-
"@94ai/nf-virtual-select": "^3.3.
|
|
17
|
+
"@94ai/common-utils": "^3.3.12",
|
|
18
|
+
"@94ai/nf-button": "^3.3.12",
|
|
19
|
+
"@94ai/nf-double-half-year": "^3.3.12",
|
|
20
|
+
"@94ai/nf-double-quarter": "^3.3.12",
|
|
21
|
+
"@94ai/nf-double-week": "^3.3.12",
|
|
22
|
+
"@94ai/nf-double-year": "^3.3.12",
|
|
23
|
+
"@94ai/nf-drawer": "^3.3.12",
|
|
24
|
+
"@94ai/nf-form": "^3.3.12",
|
|
25
|
+
"@94ai/nf-form-item": "^3.3.12",
|
|
26
|
+
"@94ai/nf-half-year-picker": "^3.3.12",
|
|
27
|
+
"@94ai/nf-lazy-select": "^3.3.12",
|
|
28
|
+
"@94ai/nf-message": "^3.3.12",
|
|
29
|
+
"@94ai/nf-quarter-picker": "^3.3.12",
|
|
30
|
+
"@94ai/nf-theme-chalk": "^3.3.12",
|
|
31
|
+
"@94ai/nf-transfer-select": "^3.3.12",
|
|
32
|
+
"@94ai/nf-virtual-select": "^3.3.12",
|
|
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": "
|
|
51
|
+
"gitHead": "a74067abae87718ee9b256da9d9fd6771cd09ca6"
|
|
52
52
|
}
|