@94ai/nf-search-form 3.2.20 → 3.2.21

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.
@@ -18,10 +18,10 @@ __sfc_main$5.setup = (__props, __ctx) => {
18
18
  const minNumber = ref();
19
19
  const maxNumber = ref();
20
20
  const limitError = ref(false);
21
- const instance2 = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
21
+ const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
22
22
  const emit = __ctx.emit;
23
23
  const inputlistens = computed(() => {
24
- const list = Object.assign({}, (instance2 == null ? void 0 : instance2.$listeners) || {}, {
24
+ const list = Object.assign({}, (instance == null ? void 0 : instance.$listeners) || {}, {
25
25
  change: function() {
26
26
  emit("change", [minNumber.value, maxNumber.value]);
27
27
  }
@@ -31,25 +31,25 @@ __sfc_main$5.setup = (__props, __ctx) => {
31
31
  });
32
32
  const limitRange = computed(() => {
33
33
  var _a2;
34
- return ((_a2 = instance2 == null ? void 0 : instance2.$attrs) == null ? void 0 : _a2.limitRange) || [-Infinity, Infinity];
34
+ return ((_a2 = instance == null ? void 0 : instance.$attrs) == null ? void 0 : _a2.limitRange) || [-Infinity, Infinity];
35
35
  });
36
36
  const step = computed(() => {
37
37
  var _a2;
38
- return ((_a2 = instance2 == null ? void 0 : instance2.$attrs) == null ? void 0 : _a2.step) ? Number(instance2.$attrs.step) : 0;
38
+ return ((_a2 = instance == null ? void 0 : instance.$attrs) == null ? void 0 : _a2.step) ? Number(instance.$attrs.step) : 0;
39
39
  });
40
40
  const stepStrictly = computed(() => {
41
41
  var _a2;
42
- return !!((_a2 = instance2 == null ? void 0 : instance2.$attrs) == null ? void 0 : _a2.stepStrictly) || false;
42
+ return !!((_a2 = instance == null ? void 0 : instance.$attrs) == null ? void 0 : _a2.stepStrictly) || false;
43
43
  });
44
44
  const inputAttr = computed(() => {
45
45
  return {
46
46
  controls: false,
47
- ...instance2 == null ? void 0 : instance2.$attrs
47
+ ...instance == null ? void 0 : instance.$attrs
48
48
  };
49
49
  });
50
50
  const customePlaceholder = computed(() => {
51
51
  var _a2, _b, _c;
52
- return ((_a2 = instance2 == null ? void 0 : instance2.$attrs) == null ? void 0 : _a2.customePlaceholder) || [(_b = instance2 == null ? void 0 : instance2.$attrs) == null ? void 0 : _b.placeholder, (_c = instance2 == null ? void 0 : instance2.$attrs) == null ? void 0 : _c.placeholder];
52
+ return ((_a2 = instance == null ? void 0 : instance.$attrs) == null ? void 0 : _a2.customePlaceholder) || [(_b = instance == null ? void 0 : instance.$attrs) == null ? void 0 : _b.placeholder, (_c = instance == null ? void 0 : instance.$attrs) == null ? void 0 : _c.placeholder];
53
53
  });
54
54
  watch(() => {
55
55
  return props.value;
@@ -292,12 +292,6 @@ __sfc_main$3.props = {
292
292
  required: false,
293
293
  type: Number,
294
294
  default: 170
295
- },
296
- labelWidth: {
297
- key: "labelWidth",
298
- required: false,
299
- type: Number,
300
- default: 70
301
295
  }
302
296
  };
303
297
  __sfc_main$3.setup = (__props, __ctx) => {
@@ -320,7 +314,6 @@ __sfc_main$3.setup = (__props, __ctx) => {
320
314
  });
321
315
  const bindProps = computed(() => {
322
316
  let obj = {
323
- size: "mini",
324
317
  clearable: true,
325
318
  ...props.itemOptions
326
319
  };
@@ -492,7 +485,6 @@ var _sfc_render$3 = function render3() {
492
485
  }
493
486
  }, [_vm.slotName ? [_vm._t(_vm.slotName)] : [_vm.isInput ? _c("el-input", _vm._g(_vm._b({
494
487
  attrs: {
495
- "size": "mini",
496
488
  "placeholder": _vm.itemOptions.placeholder
497
489
  },
498
490
  on: {
@@ -740,6 +732,12 @@ const __sfc_main$2 = defineComponent({
740
732
  name: "NfColumnCheckDialog"
741
733
  });
742
734
  __sfc_main$2.props = {
735
+ storageKey: {
736
+ key: "storageKey",
737
+ required: false,
738
+ type: String,
739
+ default: "nf-table-columns-cached-key"
740
+ },
743
741
  show: {
744
742
  key: "show",
745
743
  required: false,
@@ -862,6 +860,7 @@ __sfc_main$2.props = {
862
860
  }
863
861
  };
864
862
  __sfc_main$2.setup = (__props, __ctx) => {
863
+ var _a;
865
864
  const props = __props;
866
865
  const tableData = ref({});
867
866
  const emit = __ctx.emit;
@@ -894,8 +893,9 @@ __sfc_main$2.setup = (__props, __ctx) => {
894
893
  onMounted(() => {
895
894
  addInitValue();
896
895
  });
896
+ const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
897
897
  const submit = () => {
898
- var _a;
898
+ var _a2;
899
899
  visible.value = false;
900
900
  const columnState = {};
901
901
  props.tableColumns.map((i, index2) => {
@@ -905,14 +905,14 @@ __sfc_main$2.setup = (__props, __ctx) => {
905
905
  index: index2
906
906
  };
907
907
  });
908
- (_a = instance == null ? void 0 : instance.$cookies) == null ? void 0 : _a.set(props.storageKey, JSON.stringify(columnState), -1);
908
+ (_a2 = instance == null ? void 0 : instance.$cookies) == null ? void 0 : _a2.set(props.storageKey, JSON.stringify(columnState), -1);
909
909
  emit("save", tableData.value);
910
910
  };
911
911
  const addInitValue = () => {
912
912
  const obj = {};
913
913
  props.tableColumns.forEach((v) => {
914
- var _a;
915
- obj[v.prop] = ((_a = props.showColumns) == null ? void 0 : _a.length) ? props.showColumns.includes(v.prop) : true;
914
+ var _a2;
915
+ obj[v.prop] = ((_a2 = props.showColumns) == null ? void 0 : _a2.length) ? props.showColumns.includes(v.prop) : true;
916
916
  });
917
917
  tableData.value = obj;
918
918
  };
@@ -6054,7 +6054,7 @@ __sfc_main$1.props = {
6054
6054
  };
6055
6055
  __sfc_main$1.setup = (__props, __ctx) => {
6056
6056
  var _a;
6057
- const instance2 = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
6057
+ const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
6058
6058
  const props = __props;
6059
6059
  const currentTable = ref([]);
6060
6060
  const showColumn = ref([]);
@@ -6165,7 +6165,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
6165
6165
  var _a2;
6166
6166
  const newTableColumns = [...fixedColumn.value, ...unFixedColumn.value];
6167
6167
  if (newTableColumns.filter((item) => !item.initHidden).length === 0) {
6168
- instance2 == null ? void 0 : instance2.$openMessage.warning({
6168
+ instance == null ? void 0 : instance.$openMessage.warning({
6169
6169
  message: props.selectEmptyWarningTips,
6170
6170
  duration: 2e3
6171
6171
  });
@@ -6183,7 +6183,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
6183
6183
  };
6184
6184
  obj[i.prop] = !columnState[i.prop].initHidden;
6185
6185
  });
6186
- (_a2 = instance2 == null ? void 0 : instance2.$cookies) == null ? void 0 : _a2.set(props.storageKey, JSON.stringify(columnState), -1);
6186
+ (_a2 = instance == null ? void 0 : instance.$cookies) == null ? void 0 : _a2.set(props.storageKey, JSON.stringify(columnState), -1);
6187
6187
  return obj;
6188
6188
  };
6189
6189
  const drag = ref(false);
@@ -6454,6 +6454,52 @@ __sfc_main.props = {
6454
6454
  type: Boolean,
6455
6455
  default: false
6456
6456
  },
6457
+ expandBtnType: {
6458
+ key: "expandBtnType",
6459
+ required: false,
6460
+ type: String,
6461
+ default: "default"
6462
+ },
6463
+ expandBtnIcon: {
6464
+ key: "expandBtnIcon",
6465
+ required: false,
6466
+ type: String
6467
+ },
6468
+ expandBtnPlain: {
6469
+ key: "expandBtnPlain",
6470
+ required: false,
6471
+ type: Boolean,
6472
+ default: false
6473
+ },
6474
+ expandBtnSize: {
6475
+ key: "expandBtnSize",
6476
+ required: false,
6477
+ type: String
6478
+ },
6479
+ expandBtnRound: {
6480
+ key: "expandBtnRound",
6481
+ required: false,
6482
+ type: Boolean,
6483
+ default: false
6484
+ },
6485
+ expandBtnCircle: {
6486
+ key: "expandBtnCircle",
6487
+ required: false,
6488
+ type: Boolean,
6489
+ default: false
6490
+ },
6491
+ expandBtnLoading: {
6492
+ key: "expandBtnLoading",
6493
+ required: false,
6494
+ type: Boolean,
6495
+ default: false
6496
+ },
6497
+ expandBtnDisabled: {
6498
+ key: "expandBtnDisabled",
6499
+ required: false,
6500
+ type: Boolean,
6501
+ default: false
6502
+ },
6457
6503
  rules: {
6458
6504
  key: "rules",
6459
6505
  required: false,
@@ -6500,7 +6546,7 @@ __sfc_main.props = {
6500
6546
  key: "size",
6501
6547
  required: false,
6502
6548
  type: String,
6503
- default: void 0
6549
+ default: "mini"
6504
6550
  },
6505
6551
  disabled: {
6506
6552
  key: "disabled",
@@ -6619,8 +6665,7 @@ __sfc_main.props = {
6619
6665
  checkBtnSize: {
6620
6666
  key: "checkBtnSize",
6621
6667
  required: false,
6622
- type: String,
6623
- default: "mini"
6668
+ type: String
6624
6669
  },
6625
6670
  checkBtnRound: {
6626
6671
  key: "checkBtnRound",
@@ -6833,8 +6878,7 @@ __sfc_main.props = {
6833
6878
  exportBtnSize: {
6834
6879
  key: "exportBtnSize",
6835
6880
  required: false,
6836
- type: String,
6837
- default: "mini"
6881
+ type: String
6838
6882
  },
6839
6883
  exportBtnRound: {
6840
6884
  key: "exportBtnRound",
@@ -6893,8 +6937,7 @@ __sfc_main.props = {
6893
6937
  queryBtnSize: {
6894
6938
  key: "queryBtnSize",
6895
6939
  required: false,
6896
- type: String,
6897
- default: "mini"
6940
+ type: String
6898
6941
  },
6899
6942
  queryBtnRound: {
6900
6943
  key: "queryBtnRound",
@@ -6953,8 +6996,7 @@ __sfc_main.props = {
6953
6996
  resetBtnSize: {
6954
6997
  key: "resetBtnSize",
6955
6998
  required: false,
6956
- type: String,
6957
- default: "mini"
6999
+ type: String
6958
7000
  },
6959
7001
  resetBtnRound: {
6960
7002
  key: "resetBtnRound",
@@ -6997,7 +7039,7 @@ __sfc_main.setup = (__props, __ctx) => {
6997
7039
  var _a, _b, _c, _d;
6998
7040
  const props = __props;
6999
7041
  const emit = __ctx.emit;
7000
- const instance2 = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
7042
+ const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
7001
7043
  const defaultButtonSlot = ref();
7002
7044
  const nfSearchFormRef = ref();
7003
7045
  const columnCheckNfDrawer = ref();
@@ -7005,13 +7047,17 @@ __sfc_main.setup = (__props, __ctx) => {
7005
7047
  const columnCheckDialog = ref();
7006
7048
  const nfSearchFormModel = ref({});
7007
7049
  const initLocalShow = () => {
7008
- return props.formOptions.filter((item) => {
7050
+ const result = props.formOptions.filter((item) => {
7009
7051
  var _a2;
7010
7052
  if ((_a2 = props.showItems) == null ? void 0 : _a2.includes(item.prop)) {
7011
7053
  item.initHidden = true;
7012
7054
  }
7013
7055
  return item.initHidden;
7014
7056
  }).map((item) => item.prop);
7057
+ if (result.length) {
7058
+ return result;
7059
+ }
7060
+ return props.formOptions.map((item) => item.prop);
7015
7061
  };
7016
7062
  const localShowItems = ref(initLocalShow());
7017
7063
  watch(() => {
@@ -7034,13 +7080,13 @@ __sfc_main.setup = (__props, __ctx) => {
7034
7080
  index: index2
7035
7081
  };
7036
7082
  });
7037
- (_a2 = instance2 == null ? void 0 : instance2.$cookies) == null ? void 0 : _a2.set(props.storageKey, JSON.stringify(columnState), -1);
7083
+ (_a2 = instance == null ? void 0 : instance.$cookies) == null ? void 0 : _a2.set(props.storageKey, JSON.stringify(columnState), -1);
7038
7084
  }
7039
7085
  };
7040
7086
  const syncCookiesToLocalShowColumn = () => {
7041
7087
  var _a2;
7042
7088
  if (props.columnEdit) {
7043
- let columnState = (_a2 = instance2 == null ? void 0 : instance2.$cookies) == null ? void 0 : _a2.get(props.storageKey);
7089
+ let columnState = (_a2 = instance == null ? void 0 : instance.$cookies) == null ? void 0 : _a2.get(props.storageKey);
7044
7090
  if (columnState) {
7045
7091
  if (typeof columnState === "string") {
7046
7092
  columnState = JSON.parse(columnState);
@@ -7067,7 +7113,7 @@ __sfc_main.setup = (__props, __ctx) => {
7067
7113
  });
7068
7114
  };
7069
7115
  if (props.columnEdit) {
7070
- const cached = (_b = instance2 == null ? void 0 : instance2.$cookies) == null ? void 0 : _b.get(props.storageKey);
7116
+ const cached = (_b = instance == null ? void 0 : instance.$cookies) == null ? void 0 : _b.get(props.storageKey);
7071
7117
  const cachedPriority = props.priority === "cached";
7072
7118
  if (cachedPriority ? cached : (_c = localShowItems.value) == null ? void 0 : _c.length) {
7073
7119
  cachedPriority ? syncCookiesToLocalShowColumn() : syncLocalShowColumnToCookies();
@@ -7078,7 +7124,7 @@ __sfc_main.setup = (__props, __ctx) => {
7078
7124
  const configNfSearchItemVisibleDialog = ref(false);
7079
7125
  const newColumns = ref(3);
7080
7126
  const isShowBtnBoxSlot = computed(() => {
7081
- return instance2 == null ? void 0 : instance2.$slots.btnBox;
7127
+ return instance == null ? void 0 : instance.$slots.btnBox;
7082
7128
  });
7083
7129
  const renderSearchFormItemOptions = ref([]);
7084
7130
  const syncCookiesToSearchFormItemOptions = (readCached = true) => {
@@ -7090,7 +7136,7 @@ __sfc_main.setup = (__props, __ctx) => {
7090
7136
  return item;
7091
7137
  });
7092
7138
  if (readCached && props.columnEdit) {
7093
- let columnState = (_a2 = instance2 == null ? void 0 : instance2.$cookies) == null ? void 0 : _a2.get(props.storageKey);
7139
+ let columnState = (_a2 = instance == null ? void 0 : instance.$cookies) == null ? void 0 : _a2.get(props.storageKey);
7094
7140
  if (columnState) {
7095
7141
  if (typeof columnState === "string") {
7096
7142
  columnState = JSON.parse(columnState);
@@ -7389,6 +7435,14 @@ var _sfc_render = function render6() {
7389
7435
  "size": _vm.size,
7390
7436
  "disabled": _vm.disabled,
7391
7437
  "label-width": _vm.labelWidth + "px",
7438
+ "expand-btn-type": _vm.expandBtnType,
7439
+ "expand-btn-icon": _vm.expandBtnIcon,
7440
+ "expand-btn-plain": _vm.expandBtnPlain,
7441
+ "expand-btn-size": _vm.expandBtnSize,
7442
+ "expand-btn-round": _vm.expandBtnRound,
7443
+ "expand-btn-circle": _vm.expandBtnCircle,
7444
+ "expand-btn-loading": _vm.expandBtnLoading,
7445
+ "expand-btn-disabled": _vm.expandBtnDisabled,
7392
7446
  "columns": _vm.inline ? _vm.newColumns : _vm.columns,
7393
7447
  "up-icon": _vm.upIcon,
7394
7448
  "down-icon": _vm.downIcon,
@@ -7416,7 +7470,6 @@ var _sfc_render = function render6() {
7416
7470
  }, [_c("search-form-item", {
7417
7471
  attrs: {
7418
7472
  "item-width": _vm.itemWidth,
7419
- "label-width": _vm.labelWidth,
7420
7473
  "item-options": item
7421
7474
  },
7422
7475
  model: {
@@ -7426,11 +7479,11 @@ var _sfc_render = function render6() {
7426
7479
  },
7427
7480
  expression: "nfSearchFormModel[item.prop]"
7428
7481
  }
7429
- }, [item.tooltip ? _c("template", {
7430
- slot: item.tooltip.slot
7431
- }, [_vm._t(item.tooltip.slot)], 2) : _vm._e(), item.slot ? _c("template", {
7432
- slot: item.slot
7433
- }, [_vm._t(item.slot)], 2) : _vm._e()], 2), _vm.closable ? _c("div", {
7482
+ }, [item.tooltip ? _vm._t(item.tooltip.slot, null, {
7483
+ "slot": item.tooltip.slot
7484
+ }) : _vm._e(), item.slot ? _vm._t(item.slot, null, {
7485
+ "slot": item.slot
7486
+ }) : _vm._e()], 2), _vm.closable ? _c("div", {
7434
7487
  staticClass: "nf-search-form-nf-form-item-close-icon"
7435
7488
  }, [_c("i", {
7436
7489
  staticClass: "el-icon-error",
@@ -7525,7 +7578,7 @@ var _sfc_render = function render6() {
7525
7578
  "type": _vm.queryBtnType,
7526
7579
  "icon": _vm.queryBtnIcon,
7527
7580
  "plain": _vm.queryBtnPlain,
7528
- "size": _vm.queryBtnSize,
7581
+ "size": _vm.queryBtnSize || _vm.size,
7529
7582
  "round": _vm.queryBtnRound,
7530
7583
  "circle": _vm.queryBtnCircle,
7531
7584
  "loading": _vm.queryBtnLoading,
@@ -7540,7 +7593,7 @@ var _sfc_render = function render6() {
7540
7593
  "type": _vm.exportBtnType,
7541
7594
  "icon": _vm.exportBtnIcon,
7542
7595
  "plain": _vm.exportBtnPlain,
7543
- "size": _vm.exportBtnSize,
7596
+ "size": _vm.exportBtnSize || _vm.size,
7544
7597
  "round": _vm.exportBtnRound,
7545
7598
  "circle": _vm.exportBtnCircle,
7546
7599
  "loading": _vm.exportBtnLoading,
@@ -7555,7 +7608,7 @@ var _sfc_render = function render6() {
7555
7608
  "type": _vm.resetBtnType,
7556
7609
  "icon": _vm.resetBtnIcon,
7557
7610
  "plain": _vm.resetBtnPlain,
7558
- "size": _vm.resetBtnSize,
7611
+ "size": _vm.resetBtnSize || _vm.size,
7559
7612
  "round": _vm.resetBtnRound,
7560
7613
  "circle": _vm.resetBtnCircle,
7561
7614
  "loading": _vm.resetBtnLoading,
@@ -7569,7 +7622,7 @@ var _sfc_render = function render6() {
7569
7622
  attrs: {
7570
7623
  "type": _vm.checkBtnType,
7571
7624
  "plain": _vm.checkBtnPlain,
7572
- "size": _vm.checkBtnSize,
7625
+ "size": _vm.checkBtnSize || _vm.size,
7573
7626
  "round": _vm.checkBtnRound,
7574
7627
  "circle": _vm.checkBtnCircle,
7575
7628
  "loading": _vm.checkBtnLoading,