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

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.
@@ -5,6 +5,7 @@ const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
5
5
  const commonUtils = require("@94ai/common-utils");
6
6
  const ResizeObserver = require("resize-observer-polyfill");
7
7
  const vue = require("vue");
8
+ const lodashEs = require("lodash-es");
8
9
  const NfMessage = require("@94ai/nf-message");
9
10
  const __sfc_main$5 = vueDemi.defineComponent({
10
11
  name: "NfNumberRange"
@@ -7324,6 +7325,7 @@ __sfc_main.setup = (__props, __ctx) => {
7324
7325
  domWidth.value = topDom.value.offsetWidth;
7325
7326
  }
7326
7327
  refreshLabel();
7328
+ calcColumns();
7327
7329
  };
7328
7330
  const calcColumns = () => {
7329
7331
  if (props.columns) {
@@ -7349,7 +7351,7 @@ __sfc_main.setup = (__props, __ctx) => {
7349
7351
  const observer = vueDemi.ref();
7350
7352
  vueDemi.onMounted(async () => {
7351
7353
  await vueDemi.nextTick();
7352
- observer.value = new ResizeObserver(onResize);
7354
+ observer.value = new ResizeObserver(lodashEs.throttle(onResize, 100));
7353
7355
  observer.value.observe(topDom.value, {
7354
7356
  box: "border-box"
7355
7357
  });
@@ -7704,9 +7706,11 @@ var _sfc_render = function render6() {
7704
7706
  "content": _vm.columnDisplayBtnText,
7705
7707
  "placement": "top"
7706
7708
  }
7709
+ }, [_c("span", {
7710
+ staticClass: "icon-wrap"
7707
7711
  }, [_c("i", {
7708
7712
  staticClass: "iconfont icon-shaixuan1 nf-fs12"
7709
- })])], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
7713
+ })])])], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
7710
7714
  staticClass: "nf-flex nf-flex-align-items nf-mt10"
7711
7715
  }, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm.btnItems.includes("search") ? _c("nf-button", {
7712
7716
  class: (_vm.queryBtnClass || "") + " nf-btn-search",
@@ -7774,9 +7778,11 @@ var _sfc_render = function render6() {
7774
7778
  "content": _vm.columnDisplayBtnText,
7775
7779
  "placement": "top"
7776
7780
  }
7781
+ }, [_c("span", {
7782
+ staticClass: "icon-wrap"
7777
7783
  }, [_c("i", {
7778
7784
  staticClass: "iconfont icon-shaixuan1 nf-fs12"
7779
- })]) : _vm._e()], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2) : _vm._e(), _vm.columnEdit && _vm.configNfSearchItemVisibleDialog && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7785
+ })])]) : _vm._e()], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2) : _vm._e(), _vm.columnEdit && _vm.configNfSearchItemVisibleDialog && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7780
7786
  ref: "columnCheckDialog",
7781
7787
  attrs: {
7782
7788
  "title": _vm.moreDialogTitle,
@@ -3,6 +3,7 @@ import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
3
3
  import { createUniqueString, CachedManager, deepClone } from "@94ai/common-utils";
4
4
  import ResizeObserver from "resize-observer-polyfill";
5
5
  import { set } from "vue";
6
+ import { throttle as throttle$1 } from "lodash-es";
6
7
  import NfMessage from "@94ai/nf-message";
7
8
  const __sfc_main$5 = defineComponent({
8
9
  name: "NfNumberRange"
@@ -7322,6 +7323,7 @@ __sfc_main.setup = (__props, __ctx) => {
7322
7323
  domWidth.value = topDom.value.offsetWidth;
7323
7324
  }
7324
7325
  refreshLabel();
7326
+ calcColumns();
7325
7327
  };
7326
7328
  const calcColumns = () => {
7327
7329
  if (props.columns) {
@@ -7347,7 +7349,7 @@ __sfc_main.setup = (__props, __ctx) => {
7347
7349
  const observer = ref();
7348
7350
  onMounted(async () => {
7349
7351
  await nextTick();
7350
- observer.value = new ResizeObserver(onResize);
7352
+ observer.value = new ResizeObserver(throttle$1(onResize, 100));
7351
7353
  observer.value.observe(topDom.value, {
7352
7354
  box: "border-box"
7353
7355
  });
@@ -7702,9 +7704,11 @@ var _sfc_render = function render6() {
7702
7704
  "content": _vm.columnDisplayBtnText,
7703
7705
  "placement": "top"
7704
7706
  }
7707
+ }, [_c("span", {
7708
+ staticClass: "icon-wrap"
7705
7709
  }, [_c("i", {
7706
7710
  staticClass: "iconfont icon-shaixuan1 nf-fs12"
7707
- })])], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
7711
+ })])])], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
7708
7712
  staticClass: "nf-flex nf-flex-align-items nf-mt10"
7709
7713
  }, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm.btnItems.includes("search") ? _c("nf-button", {
7710
7714
  class: (_vm.queryBtnClass || "") + " nf-btn-search",
@@ -7772,9 +7776,11 @@ var _sfc_render = function render6() {
7772
7776
  "content": _vm.columnDisplayBtnText,
7773
7777
  "placement": "top"
7774
7778
  }
7779
+ }, [_c("span", {
7780
+ staticClass: "icon-wrap"
7775
7781
  }, [_c("i", {
7776
7782
  staticClass: "iconfont icon-shaixuan1 nf-fs12"
7777
- })]) : _vm._e()], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2) : _vm._e(), _vm.columnEdit && _vm.configNfSearchItemVisibleDialog && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7783
+ })])]) : _vm._e()], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2) : _vm._e(), _vm.columnEdit && _vm.configNfSearchItemVisibleDialog && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7778
7784
  ref: "columnCheckDialog",
7779
7785
  attrs: {
7780
7786
  "title": _vm.moreDialogTitle,
@@ -132,7 +132,7 @@
132
132
  @click="configNfSearchItemVisibleDialog = true"
133
133
  >
134
134
  <el-tooltip :content="columnDisplayBtnText" placement="top">
135
- <i class="iconfont icon-shaixuan1 nf-fs12"></i>
135
+ <span class="icon-wrap"><i class="iconfont icon-shaixuan1 nf-fs12"></i></span>
136
136
  </el-tooltip>
137
137
  </nf-button>
138
138
  <slot v-if="isShowBtnBoxSlot && reverseBtnSlot" name="btnBox" />
@@ -195,7 +195,7 @@
195
195
  :class="(checkBtnClass || '') + ' nf-btn-check'"
196
196
  >
197
197
  <el-tooltip :content="columnDisplayBtnText" placement="top" v-if="columnEdit">
198
- <i class="iconfont icon-shaixuan1 nf-fs12"></i>
198
+ <span class="icon-wrap"><i class="iconfont icon-shaixuan1 nf-fs12"></i></span>
199
199
  </el-tooltip>
200
200
  </nf-button>
201
201
  <slot v-if="isShowBtnBoxSlot && reverseBtnSlot" name="btnBox" />
@@ -305,6 +305,9 @@ import { set } from 'vue'
305
305
  import {
306
306
  CachedManager,
307
307
  } from '@94ai/common-utils'
308
+ import {
309
+ throttle
310
+ } from 'lodash-es'
308
311
 
309
312
 
310
313
  const props = withDefaults(defineProps<{
@@ -924,6 +927,7 @@ const onResize = async (params: Record<string, any> = {}) => {
924
927
  domWidth.value = topDom.value.offsetWidth
925
928
  }
926
929
  refreshLabel()
930
+ calcColumns()
927
931
  }
928
932
 
929
933
  const calcColumns = () => {
@@ -950,7 +954,7 @@ const calcColumns = () => {
950
954
  const observer = ref()
951
955
  onMounted(async () => {
952
956
  await nextTick()
953
- observer.value = new ResizeObserver(onResize)
957
+ observer.value = new ResizeObserver(throttle(onResize, 100))
954
958
  observer.value.observe(topDom.value, { box: 'border-box' })
955
959
  })
956
960
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "3.3.2",
3
+ "version": "3.3.10",
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.2",
18
- "@94ai/nf-button": "^3.3.2",
19
- "@94ai/nf-double-half-year": "^3.3.2",
20
- "@94ai/nf-double-quarter": "^3.3.2",
21
- "@94ai/nf-double-week": "^3.3.2",
22
- "@94ai/nf-double-year": "^3.3.2",
23
- "@94ai/nf-drawer": "^3.3.2",
24
- "@94ai/nf-form": "^3.3.2",
25
- "@94ai/nf-form-item": "^3.3.2",
26
- "@94ai/nf-half-year-picker": "^3.3.2",
27
- "@94ai/nf-lazy-select": "^3.3.2",
28
- "@94ai/nf-message": "^3.3.2",
29
- "@94ai/nf-quarter-picker": "^3.3.2",
30
- "@94ai/nf-theme-chalk": "^3.3.2",
31
- "@94ai/nf-transfer-select": "^3.3.2",
32
- "@94ai/nf-virtual-select": "^3.3.2",
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",
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": "452ef85be9233a97e8514ea86cdf20c1fac1c9e5"
51
+ "gitHead": "167d2cc9b9da08f267ff55ba260378bd4c317c1f"
52
52
  }