@lx-frontend/wrap-element-ui 1.0.14-beta.8 → 1.0.15-beta.0

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.
@@ -1,62 +0,0 @@
1
- <template>
2
- <div class="editable-table-sort-filter__filter">
3
- <div class="editable-table-sort-filter__filter-title">
4
- 筛选
5
- </div>
6
- <el-checkbox-group
7
- v-if="column.filters && (Array.isArray(column.filters) || column.filters.type === 'checkbox')"
8
- class="editable-table-sort-filter__filter-checkbox-group"
9
- :value="tempFilteredValue[column.filters.prop || column.prop]"
10
- @input="val => emit('update:tempFilteredValue', column.filters?.prop || column.prop, val)"
11
- >
12
- <el-checkbox
13
- v-for="item in (Array.isArray(column.filters) ? column.filters : column.filters.options)"
14
- :key="item.value"
15
- :label="item.value"
16
- :title="item.text"
17
- class="editable-table-sort-filter__filter-checkbox"
18
- >
19
- <slot
20
- name="filter-item"
21
- v-bind="item"
22
- >
23
- {{ item.text }}
24
- </slot>
25
- </el-checkbox>
26
- </el-checkbox-group>
27
-
28
- <el-radio-group
29
- v-if="column.filters && !Array.isArray(column.filters) && column.filters.type === 'radio'"
30
- style="display: flex;flex-direction: column;gap: 6px;"
31
- :value="tempFilteredValue[column.filters.prop || column.prop]"
32
- @input="val => emit('update:tempFilteredValue', column.filters?.prop || column.prop, val)"
33
- >
34
- <el-radio
35
- v-for="item in column.filters.options"
36
- :key="item.value"
37
- :label="item.value"
38
- :title="item.text"
39
- >
40
- <slot
41
- name="filter-item"
42
- v-bind="item"
43
- >
44
- {{ item.text }}
45
- </slot>
46
- </el-radio>
47
- </el-radio-group>
48
- </div>
49
- </template>
50
-
51
- <script setup lang="ts">
52
- import { IColumnConfig } from '../../types';
53
-
54
- defineProps<{
55
- column: IColumnConfig
56
- tempFilteredValue: Record<string, string | number | number[] | string[]>
57
- }>()
58
-
59
- const emit = defineEmits<{
60
- (e: 'update:tempFilteredValue', key: string, value: string): void
61
- }>()
62
- </script>
@@ -1,74 +0,0 @@
1
- <template>
2
- <div
3
- class="editable-table-sort-filter__search"
4
- style="display: flex;flex-direction: column;gap: 12px;"
5
- >
6
- <div
7
- v-for="item in searchConfigs"
8
- :key="item.label"
9
- >
10
- <div class="editable-table-sort-filter__search-title">
11
- {{ item.label }}
12
- </div>
13
- <template v-if="!('type' in item) || item.type === 'input'">
14
- <el-input
15
- class="editable-table-sort-filter__search-input"
16
- placeholder="请输入内容"
17
- :value="tempSearchValue[item.prop]"
18
- @input="val => emit('update:tempSearchValue', item.prop, val)"
19
- />
20
- </template>
21
- <template v-if="item.type === 'doubleDatePicker'">
22
- <div class="editable-table-sort-filter__search__date-range">
23
- <el-date-picker
24
- @input="val => emit('update:tempSearchValue', item.prop[0], val || '')"
25
- :value="tempSearchValue[item.prop[0]]"
26
- value-format="yyyy-MM-dd"
27
- format="yyyy-MM-dd"
28
- type="date"
29
- size="small"
30
- placeholder="开始日期"
31
- :picker-options="item.pickerOptions ?? {}"
32
- />
33
- <el-date-picker
34
- @input="val => emit('update:tempSearchValue', item.prop[1], val || '')"
35
- :value="tempSearchValue[item.prop[1]]"
36
- value-format="yyyy-MM-dd"
37
- format="yyyy-MM-dd"
38
- size="small"
39
- type="date"
40
- placeholder="结束日期"
41
- :picker-options="item.pickerOptions ?? {}"
42
- />
43
- </div>
44
- </template>
45
- <template v-if="item.type === 'slot'">
46
- <slot
47
- :name="item.slotName"
48
- :data="tempSearchValue"
49
- :set="(key, value) => emit('update:tempSearchValue', key, value)"
50
- />
51
- </template>
52
- </div>
53
- </div>
54
- </template>
55
-
56
- <script setup lang="ts">
57
- import { computed } from 'vue';
58
- import { IColumnConfig } from '../../types';
59
-
60
-
61
- const props = defineProps<{
62
- column: IColumnConfig
63
- tempSearchValue: Record<string, string>
64
- }>()
65
-
66
- const emit = defineEmits<{
67
- (e: 'update:tempSearchValue', key: string, value: string): void
68
- }>()
69
-
70
- const searchConfigs = computed(() => {
71
- if (Array.isArray(props.column.search)) return props.column.search
72
- return [{ prop: props.column.prop, label: '搜索' }]
73
- })
74
- </script>