@94ai/nf-search-form 3.1.44 → 3.1.46

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.
@@ -308,9 +308,6 @@ __sfc_main$2.setup = (__props, __ctx) => {
308
308
  return props.itemOptions.slot || "";
309
309
  });
310
310
  const width = vueDemi.computed(() => {
311
- if (isDatePickerDateRange.value) {
312
- return props.itemWidth * 2 + props.labelWidth + 10 + "px";
313
- }
314
311
  return props.itemWidth + "px";
315
312
  });
316
313
  const currentVal = vueDemi.computed({
@@ -639,7 +636,6 @@ var _sfc_render$2 = function render3() {
639
636
  }
640
637
  }, "nf-double-half-year", _vm.bindProps, false), _vm.bindEvents)) : _vm._e(), _vm.isHalfYearPicker ? _c("nf-half-year-picker", _vm._g(_vm._b({
641
638
  attrs: {
642
- "placeholder": "请选择半年",
643
639
  "placeholder": _vm.itemOptions.placeholder || "请选择半年"
644
640
  },
645
641
  model: {
@@ -1173,7 +1169,7 @@ __sfc_main.props = {
1173
1169
  key: "itemWidth",
1174
1170
  required: false,
1175
1171
  type: Number,
1176
- default: 190
1172
+ default: 227
1177
1173
  },
1178
1174
  btnItems: {
1179
1175
  key: "btnItems",
@@ -1209,7 +1205,7 @@ __sfc_main.props = {
1209
1205
  key: "checkBtnType",
1210
1206
  required: false,
1211
1207
  type: String,
1212
- default: "primary"
1208
+ default: ""
1213
1209
  },
1214
1210
  checkBtnPlain: {
1215
1211
  key: "checkBtnPlain",
@@ -1335,7 +1331,7 @@ __sfc_main.props = {
1335
1331
  key: "queryBtnPlain",
1336
1332
  required: false,
1337
1333
  type: Boolean,
1338
- default: true
1334
+ default: false
1339
1335
  },
1340
1336
  queryBtnSize: {
1341
1337
  key: "queryBtnSize",
@@ -1621,9 +1617,10 @@ __sfc_main.setup = (__props, __ctx) => {
1621
1617
  }
1622
1618
  };
1623
1619
  const debounceResize = debounce(onResize, 100, false);
1624
- vueDemi.onMounted(() => {
1625
- onResize();
1620
+ vueDemi.onMounted(async () => {
1626
1621
  window.addEventListener("resize", debounceResize);
1622
+ await vueDemi.nextTick();
1623
+ onResize();
1627
1624
  });
1628
1625
  vueDemi.onUnmounted(() => {
1629
1626
  window.removeEventListener("resize", debounceResize);
@@ -1765,7 +1762,7 @@ var _sfc_render = function render5() {
1765
1762
  attrs: {
1766
1763
  "hidden": !!item.hidden,
1767
1764
  "prop": item.prop,
1768
- "label": item.label ? !item.isShowColon ? item.label + ":" : item.label + " " : "",
1765
+ "label": item.label ? item.isShowColon ? item.label + ":" : item.label : "",
1769
1766
  "rules": item.rules,
1770
1767
  "show-message": item.showMessage,
1771
1768
  "size": item.size,
@@ -1853,11 +1850,17 @@ var _sfc_render = function render5() {
1853
1850
  on: {
1854
1851
  "click": _vm.resetNfSearchFormModel
1855
1852
  }
1856
- }, [_vm._v(_vm._s(_vm.resetBtnText) + " ")]) : _vm._e(), _vm.isShowAdd ? _c("el-button", {
1853
+ }, [_vm._v(_vm._s(_vm.resetBtnText) + " ")]) : _vm._e(), _c("el-tooltip", {
1854
+ staticClass: "item",
1855
+ attrs: {
1856
+ "effect": "dark",
1857
+ "content": "添加筛选条件",
1858
+ "placement": "bottom"
1859
+ }
1860
+ }, [_vm.isShowAdd ? _c("el-button", {
1857
1861
  class: (_vm.checkBtnClass || "") + " nf-btn-check",
1858
1862
  attrs: {
1859
1863
  "type": _vm.checkBtnType,
1860
- "icon": _vm.checkBtnIcon,
1861
1864
  "plain": _vm.checkBtnPlain,
1862
1865
  "size": _vm.checkBtnSize,
1863
1866
  "round": _vm.checkBtnRound,
@@ -1871,7 +1874,9 @@ var _sfc_render = function render5() {
1871
1874
  _vm.configNfSearchItemVisibleDialog = true;
1872
1875
  }
1873
1876
  }
1874
- }, [_vm._v(" " + _vm._s(_vm.checkBtnText) + " ")]) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
1877
+ }, [_c("i", {
1878
+ staticClass: "iconfont icon-shaixuan1 nf-fs12"
1879
+ })]) : _vm._e()], 1), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
1875
1880
  staticClass: "nf-flex nf-flex-align-items nf-mt10"
1876
1881
  }, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm.btnItems.includes("search") ? _c("el-button", {
1877
1882
  class: (_vm.queryBtnClass || "") + " nf-btn-search",
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, getCurrentInstance, computed, watch, onMounted, onBeforeMount, onUnmounted, nextTick } from "vue-demi";
1
+ import { defineComponent, ref, getCurrentInstance, computed, watch, onMounted, onBeforeMount, nextTick, onUnmounted } from "vue-demi";
2
2
  import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
3
3
  const __sfc_main$4 = defineComponent({
4
4
  name: "NfNumberRange"
@@ -306,9 +306,6 @@ __sfc_main$2.setup = (__props, __ctx) => {
306
306
  return props.itemOptions.slot || "";
307
307
  });
308
308
  const width = computed(() => {
309
- if (isDatePickerDateRange.value) {
310
- return props.itemWidth * 2 + props.labelWidth + 10 + "px";
311
- }
312
309
  return props.itemWidth + "px";
313
310
  });
314
311
  const currentVal = computed({
@@ -637,7 +634,6 @@ var _sfc_render$2 = function render3() {
637
634
  }
638
635
  }, "nf-double-half-year", _vm.bindProps, false), _vm.bindEvents)) : _vm._e(), _vm.isHalfYearPicker ? _c("nf-half-year-picker", _vm._g(_vm._b({
639
636
  attrs: {
640
- "placeholder": "请选择半年",
641
637
  "placeholder": _vm.itemOptions.placeholder || "请选择半年"
642
638
  },
643
639
  model: {
@@ -1171,7 +1167,7 @@ __sfc_main.props = {
1171
1167
  key: "itemWidth",
1172
1168
  required: false,
1173
1169
  type: Number,
1174
- default: 190
1170
+ default: 227
1175
1171
  },
1176
1172
  btnItems: {
1177
1173
  key: "btnItems",
@@ -1207,7 +1203,7 @@ __sfc_main.props = {
1207
1203
  key: "checkBtnType",
1208
1204
  required: false,
1209
1205
  type: String,
1210
- default: "primary"
1206
+ default: ""
1211
1207
  },
1212
1208
  checkBtnPlain: {
1213
1209
  key: "checkBtnPlain",
@@ -1333,7 +1329,7 @@ __sfc_main.props = {
1333
1329
  key: "queryBtnPlain",
1334
1330
  required: false,
1335
1331
  type: Boolean,
1336
- default: true
1332
+ default: false
1337
1333
  },
1338
1334
  queryBtnSize: {
1339
1335
  key: "queryBtnSize",
@@ -1619,9 +1615,10 @@ __sfc_main.setup = (__props, __ctx) => {
1619
1615
  }
1620
1616
  };
1621
1617
  const debounceResize = debounce(onResize, 100, false);
1622
- onMounted(() => {
1623
- onResize();
1618
+ onMounted(async () => {
1624
1619
  window.addEventListener("resize", debounceResize);
1620
+ await nextTick();
1621
+ onResize();
1625
1622
  });
1626
1623
  onUnmounted(() => {
1627
1624
  window.removeEventListener("resize", debounceResize);
@@ -1763,7 +1760,7 @@ var _sfc_render = function render5() {
1763
1760
  attrs: {
1764
1761
  "hidden": !!item.hidden,
1765
1762
  "prop": item.prop,
1766
- "label": item.label ? !item.isShowColon ? item.label + ":" : item.label + " " : "",
1763
+ "label": item.label ? item.isShowColon ? item.label + ":" : item.label : "",
1767
1764
  "rules": item.rules,
1768
1765
  "show-message": item.showMessage,
1769
1766
  "size": item.size,
@@ -1851,11 +1848,17 @@ var _sfc_render = function render5() {
1851
1848
  on: {
1852
1849
  "click": _vm.resetNfSearchFormModel
1853
1850
  }
1854
- }, [_vm._v(_vm._s(_vm.resetBtnText) + " ")]) : _vm._e(), _vm.isShowAdd ? _c("el-button", {
1851
+ }, [_vm._v(_vm._s(_vm.resetBtnText) + " ")]) : _vm._e(), _c("el-tooltip", {
1852
+ staticClass: "item",
1853
+ attrs: {
1854
+ "effect": "dark",
1855
+ "content": "添加筛选条件",
1856
+ "placement": "bottom"
1857
+ }
1858
+ }, [_vm.isShowAdd ? _c("el-button", {
1855
1859
  class: (_vm.checkBtnClass || "") + " nf-btn-check",
1856
1860
  attrs: {
1857
1861
  "type": _vm.checkBtnType,
1858
- "icon": _vm.checkBtnIcon,
1859
1862
  "plain": _vm.checkBtnPlain,
1860
1863
  "size": _vm.checkBtnSize,
1861
1864
  "round": _vm.checkBtnRound,
@@ -1869,7 +1872,9 @@ var _sfc_render = function render5() {
1869
1872
  _vm.configNfSearchItemVisibleDialog = true;
1870
1873
  }
1871
1874
  }
1872
- }, [_vm._v(" " + _vm._s(_vm.checkBtnText) + " ")]) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
1875
+ }, [_c("i", {
1876
+ staticClass: "iconfont icon-shaixuan1 nf-fs12"
1877
+ })]) : _vm._e()], 1), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
1873
1878
  staticClass: "nf-flex nf-flex-align-items nf-mt10"
1874
1879
  }, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm.btnItems.includes("search") ? _c("el-button", {
1875
1880
  class: (_vm.queryBtnClass || "") + " nf-btn-search",
@@ -104,7 +104,6 @@
104
104
  v-model="currentVal"
105
105
  v-bind="bindProps"
106
106
  v-on="bindEvents"
107
- placeholder="请选择半年"
108
107
  :placeholder="itemOptions.placeholder || '请选择半年'"
109
108
  />
110
109
  <nf-quarter-picker
@@ -212,9 +211,6 @@ const slotName = computed(() => {
212
211
  })
213
212
 
214
213
  const width = computed(() => {
215
- if (isDatePickerDateRange.value) {
216
- return props.itemWidth * 2 + props.labelWidth + 10 + 'px'
217
- }
218
214
  return props.itemWidth + 'px'
219
215
  })
220
216
 
@@ -29,7 +29,7 @@
29
29
  :hidden="!!item.hidden"
30
30
  :key="newKeys[index]"
31
31
  :prop="item.prop"
32
- :label="item.label ? (!item.isShowColon?item.label + ':':item.label+' ') : ''"
32
+ :label="item.label ? (item.isShowColon?item.label + ':':item.label) : ''"
33
33
  :rules="item.rules"
34
34
  :show-message="item.showMessage"
35
35
  :size="item.size"
@@ -97,20 +97,21 @@
97
97
  @click="resetNfSearchFormModel"
98
98
  >{{ resetBtnText }}
99
99
  </el-button>
100
- <el-button v-if="isShowAdd"
101
- :type="checkBtnType"
102
- :icon="checkBtnIcon"
103
- :plain="checkBtnPlain"
104
- :size="checkBtnSize"
105
- :round="checkBtnRound"
106
- :circle="checkBtnCircle"
107
- :loading="checkBtnLoading"
108
- :disabled="checkBtnDisabled"
109
- :class="(checkBtnClass || '') + ' nf-btn-check'"
110
- @click.stop="configNfSearchItemVisibleDialog = true"
111
- >
112
- {{ checkBtnText }}
113
- </el-button>
100
+ <el-tooltip class="item" effect="dark" content="添加筛选条件" placement="bottom">
101
+ <el-button v-if="isShowAdd"
102
+ :type="checkBtnType"
103
+ :plain="checkBtnPlain"
104
+ :size="checkBtnSize"
105
+ :round="checkBtnRound"
106
+ :circle="checkBtnCircle"
107
+ :loading="checkBtnLoading"
108
+ :disabled="checkBtnDisabled"
109
+ :class="(checkBtnClass || '') + ' nf-btn-check'"
110
+ @click.stop="configNfSearchItemVisibleDialog = true"
111
+ >
112
+ <i class="iconfont icon-shaixuan1 nf-fs12"></i>
113
+ </el-button>
114
+ </el-tooltip>
114
115
  <slot v-if="isShowBtnBoxSlot && reverseBtnSlot" name="btnBox" />
115
116
  </div>
116
117
  </nf-form-item>
@@ -390,7 +391,7 @@ const props = withDefaults(defineProps<{
390
391
  formOptions: () => [],
391
392
  showItems:() => [],
392
393
  closable: false,
393
- itemWidth: 190,
394
+ itemWidth: 227,
394
395
  btnItems: () => '',
395
396
 
396
397
  isShowAdd: true,
@@ -399,7 +400,7 @@ const props = withDefaults(defineProps<{
399
400
 
400
401
  checkBtnIcon: 'el-icon-plus',
401
402
  checkBtnPlain: true,
402
- checkBtnType: 'primary',
403
+ checkBtnType: '',
403
404
  checkBtnSize: 'mini',
404
405
  checkBtnRound: false,
405
406
  checkBtnCircle: false,
@@ -409,7 +410,7 @@ const props = withDefaults(defineProps<{
409
410
  checkBtnClass: '',
410
411
 
411
412
  queryBtnIcon: '',
412
- queryBtnPlain: true,
413
+ queryBtnPlain: false,
413
414
  queryBtnType: 'primary',
414
415
  queryBtnSize: 'mini',
415
416
  queryBtnRound: false,
@@ -622,9 +623,10 @@ const onResize = () => {
622
623
 
623
624
  const debounceResize = debounce(onResize, 100, false)
624
625
 
625
- onMounted(() => {
626
- onResize()
626
+ onMounted(async () => {
627
627
  window.addEventListener('resize', debounceResize)
628
+ await nextTick()
629
+ onResize()
628
630
  })
629
631
 
630
632
  onUnmounted(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "3.1.44",
3
+ "version": "3.1.46",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,18 +14,18 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-action": "^3.1.44",
18
- "@94ai/nf-double-half-year": "^3.1.44",
19
- "@94ai/nf-double-quarter": "^3.1.44",
20
- "@94ai/nf-double-week": "^3.1.44",
21
- "@94ai/nf-double-year": "^3.1.44",
22
- "@94ai/nf-form": "^3.1.44",
23
- "@94ai/nf-form-item": "^3.1.44",
24
- "@94ai/nf-half-year-picker": "^3.1.44",
25
- "@94ai/nf-quarter-picker": "^3.1.44",
26
- "@94ai/nf-select-transfer": "^3.1.44",
27
- "@94ai/nf-theme-chalk": "^3.1.44",
28
- "@94ai/nf-virtual-select": "^3.1.44",
17
+ "@94ai/nf-action": "^3.1.46",
18
+ "@94ai/nf-double-half-year": "^3.1.46",
19
+ "@94ai/nf-double-quarter": "^3.1.46",
20
+ "@94ai/nf-double-week": "^3.1.46",
21
+ "@94ai/nf-double-year": "^3.1.46",
22
+ "@94ai/nf-form": "^3.1.46",
23
+ "@94ai/nf-form-item": "^3.1.46",
24
+ "@94ai/nf-half-year-picker": "^3.1.46",
25
+ "@94ai/nf-quarter-picker": "^3.1.46",
26
+ "@94ai/nf-select-transfer": "^3.1.46",
27
+ "@94ai/nf-theme-chalk": "^3.1.46",
28
+ "@94ai/nf-virtual-select": "^3.1.46",
29
29
  "vue-demi": "^0.14.5"
30
30
  },
31
31
  "peerDependenciesMeta": {
@@ -41,5 +41,5 @@
41
41
  "types": "lib/index.d.ts",
42
42
  "main": "lib/nf-search-form.cjs.js",
43
43
  "module": "lib/nf-search-form.esm-bundler.js",
44
- "gitHead": "5248a62b4d86306b5e1de04357452a1a591ebaee"
44
+ "gitHead": "d6e9dac7a59a6d36471bbdc688120a1d7fb2f654"
45
45
  }