@lx-frontend/wrap-element-ui 1.0.7-beta.2 → 1.0.7-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lx-frontend/wrap-element-ui",
3
- "version": "1.0.7-beta.2",
3
+ "version": "1.0.7-beta.3",
4
4
  "description": "wrap-element-ui",
5
5
  "author": "",
6
6
  "main": "src/components/index.ts",
@@ -166,7 +166,7 @@ export function useColumnHeaderOperation({ props, tableDomRef, sortFilterPopover
166
166
  if (!tempSearchValue.value[v.prop]) tempSearchValue.value[v.prop] = ''
167
167
  if (!validate) return
168
168
  if (v.validator) {
169
- const result = v.validator(tempSearchValue.value[v.prop]);
169
+ const result = v.validator(tempSearchValue.value[v.prop]?.trim());
170
170
  if (validate && !result) validate = false;
171
171
  }
172
172
  })
@@ -194,7 +194,10 @@ export function useColumnHeaderOperation({ props, tableDomRef, sortFilterPopover
194
194
  }
195
195
 
196
196
  filteredValue.value = { ...tempFilteredValue.value };
197
- searchValue.value = { ...tempSearchValue.value };
197
+ searchValue.value = Object.keys(tempSearchValue.value).reduce((pre, key) => {
198
+ pre[key] = tempSearchValue.value[key]?.trim() ?? '';
199
+ return pre;
200
+ }, {});
198
201
 
199
202
  emitSearch();
200
203
 
@@ -88,7 +88,7 @@
88
88
  style="display: flex;flex-direction: column;gap: 12px;"
89
89
  >
90
90
  <el-date-picker
91
- @input="val => emit('update:tempSearchValue', column.doubleDatePicker.props[0], val)"
91
+ @input="val => emit('update:tempSearchValue', column.doubleDatePicker.props[0], val || '')"
92
92
  :value="tempSearchValue[column.doubleDatePicker.props[0]]"
93
93
  value-format="yyyy-MM-dd"
94
94
  format="yyyy-MM-dd"
@@ -97,7 +97,7 @@
97
97
  placeholder="开始日期"
98
98
  />
99
99
  <el-date-picker
100
- @input="val => emit('update:tempSearchValue', column.doubleDatePicker.props[1], val)"
100
+ @input="val => emit('update:tempSearchValue', column.doubleDatePicker.props[1], val || '')"
101
101
  :value="tempSearchValue[column.doubleDatePicker.props[1]]"
102
102
  value-format="yyyy-MM-dd"
103
103
  format="yyyy-MM-dd"
@@ -514,7 +514,7 @@ const {
514
514
  tempSortType,
515
515
  sortingColumn,
516
516
  isColumnFiltering,
517
- // searchValue,
517
+ searchValue,
518
518
  inSorting,
519
519
  } = useColumnHeaderOperation({
520
520
  tableDomRef,
@@ -561,7 +561,7 @@ const doTableLayout = async () => {
561
561
  // 过滤出自定义属性,将其它属性全部透传给 el-table-column
562
562
  const getColumnBindProps = (column: IColumnConfig) => {
563
563
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
564
- const { editAble, editType, slotName, inputType, options, filters, ...rest } = column;
564
+ const { editType, slotName, inputType, options, filters, ...rest } = column;
565
565
  return rest;
566
566
  };
567
567
 
@@ -54,7 +54,7 @@
54
54
  />
55
55
  <el-option
56
56
  v-for="({name, value, code, id}) in candidate"
57
- :key="id || name"
57
+ :key="value || code || id"
58
58
  :value="value || code || id"
59
59
  :label="name"
60
60
  />