@lx-frontend/wrap-element-ui 1.0.28-beta.3 → 2.0.0-beta.1
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 +21 -12
- package/src/components/AddMembers/index.vue +100 -89
- package/src/components/AuditSteps/index.vue +107 -74
- package/src/components/DemoComponent/index.vue +8 -5
- package/src/components/EditableTable/bizHooks/useColumnHeaderOperation.ts +5 -4
- package/src/components/EditableTable/bizHooks/useDefaultOperation.ts +12 -4
- package/src/components/EditableTable/bizHooks/useDragSort.ts +6 -2
- package/src/components/EditableTable/bizHooks/useRowBgColor.ts +6 -2
- package/src/components/EditableTable/bizHooks/useViewSetting.ts +2 -1
- package/src/components/EditableTable/features/bizColorSelect.vue +4 -3
- package/src/components/EditableTable/features/bizEditCell.vue +6 -6
- package/src/components/EditableTable/features/bizTableHeaderPopover/BizCheckboxFilter.vue +3 -3
- package/src/components/EditableTable/features/bizTableHeaderPopover/BizColorRadioFilter.vue +3 -4
- package/src/components/EditableTable/features/bizTableHeaderPopover/BizDoubleDatePickerFilter.vue +8 -8
- package/src/components/EditableTable/features/bizTableHeaderPopover/BizInputFilter.vue +2 -2
- package/src/components/EditableTable/features/bizTableHeaderPopover/BizMonthDayPicker.vue +2 -2
- package/src/components/EditableTable/features/bizTableHeaderPopover/BizRadioFilter.vue +3 -4
- package/src/components/EditableTable/features/bizTableHeaderPopover/index.vue +28 -19
- package/src/components/EditableTable/features/bizTableOperatePopover.vue +11 -9
- package/src/components/EditableTable/features/bizViewSettingDialog.vue +10 -6
- package/src/components/EditableTable/index.less +189 -186
- package/src/components/EditableTable/index.vue +25 -15
- package/src/components/EditableTable/types/index.ts +4 -4
- package/src/components/Ellipsis/MultilineEllipsis.vue +96 -109
- package/src/components/Ellipsis/index.vue +114 -89
- package/src/components/LxTable/index.vue +98 -143
- package/src/components/PopoverForm/index.vue +52 -47
- package/src/components/SearchForm/index.vue +128 -138
- package/src/components/SearchForm/types/index.ts +4 -4
- package/src/components/SearchSelect/index.vue +83 -67
- package/src/components/index.ts +1 -1
- package/src/components/singleMessage/index.ts +15 -44
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<el-input
|
|
4
4
|
v-if="column.editType === 'input'"
|
|
5
5
|
clearable
|
|
6
|
-
:value="value"
|
|
7
|
-
@
|
|
6
|
+
:model-value="value"
|
|
7
|
+
@update:modelValue="val => emit('input', val)"
|
|
8
8
|
/>
|
|
9
9
|
|
|
10
10
|
<el-select
|
|
11
11
|
v-if="column.editType === 'select'"
|
|
12
|
-
:value="value"
|
|
13
|
-
@
|
|
12
|
+
:model-value="value"
|
|
13
|
+
@update:modelValue="val => emit('input', val)"
|
|
14
14
|
>
|
|
15
15
|
<el-option
|
|
16
16
|
v-for="item in column.selectOptions"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
v-if="column.editType === 'date'"
|
|
25
25
|
type="date"
|
|
26
26
|
placeholder="选择日期"
|
|
27
|
-
:value="value"
|
|
28
|
-
@
|
|
27
|
+
:model-value="value"
|
|
28
|
+
@update:modelValue="val => emit('input', val)"
|
|
29
29
|
/>
|
|
30
30
|
</div>
|
|
31
31
|
</template>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
<el-checkbox-group
|
|
8
8
|
class="editable-table-sort-filter__filter-checkbox-group"
|
|
9
|
-
:value="tempFilteredValue[config.prop]"
|
|
10
|
-
@
|
|
9
|
+
:model-value="tempFilteredValue[config.prop]"
|
|
10
|
+
@update:modelValue="val => emit('update:tempFilteredValue', config.prop, val)"
|
|
11
11
|
>
|
|
12
12
|
<el-checkbox
|
|
13
13
|
v-for="item in config.options"
|
|
14
14
|
:key="item.value"
|
|
15
|
-
:
|
|
15
|
+
:value="item.value"
|
|
16
16
|
:title="item.text"
|
|
17
17
|
class="editable-table-sort-filter__filter-checkbox"
|
|
18
18
|
>
|
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
{{ config.label || '筛选' }}
|
|
6
6
|
</div>
|
|
7
7
|
<el-radio-group
|
|
8
|
-
|
|
9
|
-
:
|
|
10
|
-
@input="val => emit('update:tempFilteredValue', config.prop, val)"
|
|
8
|
+
:model-value="tempFilteredValue[config.prop]"
|
|
9
|
+
@update:modelValue="val => emit('update:tempFilteredValue', config.prop, val)"
|
|
11
10
|
>
|
|
12
11
|
<el-radio
|
|
13
12
|
v-for="item in config.options"
|
|
14
13
|
:key="item.value"
|
|
15
|
-
:
|
|
14
|
+
:value="item.value"
|
|
16
15
|
:title="item.text"
|
|
17
16
|
>
|
|
18
17
|
<span class="color-option">
|
package/src/components/EditableTable/features/bizTableHeaderPopover/BizDoubleDatePickerFilter.vue
CHANGED
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
<el-date-picker
|
|
9
9
|
v-bind="datePickerCommonProps"
|
|
10
10
|
placeholder="开始日期"
|
|
11
|
-
:value="tempFilteredValue[config.prop[0]]"
|
|
12
|
-
:
|
|
13
|
-
@
|
|
11
|
+
:model-value="tempFilteredValue[config.prop[0]]"
|
|
12
|
+
:disabled-date="(pickerStartOptions as any)?.disabledDate"
|
|
13
|
+
@update:modelValue="handleStartDateChange"
|
|
14
14
|
/>
|
|
15
15
|
<el-date-picker
|
|
16
16
|
v-bind="datePickerCommonProps"
|
|
17
17
|
placeholder="结束日期"
|
|
18
|
-
:value="tempFilteredValue[config.prop[1]]"
|
|
19
|
-
:
|
|
20
|
-
@
|
|
18
|
+
:model-value="tempFilteredValue[config.prop[1]]"
|
|
19
|
+
:disabled-date="(pickerEndOptions as any)?.disabledDate"
|
|
20
|
+
@update:modelValue="handleEndDateChange"
|
|
21
21
|
/>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
@@ -44,8 +44,8 @@ const emit = defineEmits<{
|
|
|
44
44
|
|
|
45
45
|
/** 日期选择器通用配置 */
|
|
46
46
|
const datePickerCommonProps = {
|
|
47
|
-
valueFormat: '
|
|
48
|
-
format: '
|
|
47
|
+
valueFormat: 'YYYY-MM-DD',
|
|
48
|
+
format: 'YYYY-MM-DD',
|
|
49
49
|
type: 'date',
|
|
50
50
|
size: 'small',
|
|
51
51
|
editable: false,
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<el-input
|
|
7
7
|
class="editable-table-sort-filter__search-input"
|
|
8
8
|
:placeholder="config.placeholder || '请输入内容'"
|
|
9
|
-
:value="tempFilteredValue[config.prop]"
|
|
10
|
-
@
|
|
9
|
+
:model-value="tempFilteredValue[config.prop]"
|
|
10
|
+
@update:modelValue="val => emit('update:tempFilteredValue', config.prop, val)"
|
|
11
11
|
/>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div class="editable-table-sort-filter__date-picker-content">
|
|
8
8
|
<el-cascader
|
|
9
9
|
clearable
|
|
10
|
-
:value="startDate"
|
|
10
|
+
:model-value="startDate"
|
|
11
11
|
separator=""
|
|
12
12
|
size="small"
|
|
13
13
|
placeholder="开始日期"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
/>
|
|
18
18
|
<el-cascader
|
|
19
19
|
clearable
|
|
20
|
-
:value="endDate"
|
|
20
|
+
:model-value="endDate"
|
|
21
21
|
separator=""
|
|
22
22
|
size="small"
|
|
23
23
|
placeholder="结束日期"
|
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
{{ config.label || '筛选' }}
|
|
6
6
|
</div>
|
|
7
7
|
<el-radio-group
|
|
8
|
-
|
|
9
|
-
:
|
|
10
|
-
@input="val => emit('update:tempFilteredValue', config.prop, val)"
|
|
8
|
+
:model-value="tempFilteredValue[config.prop]"
|
|
9
|
+
@update:modelValue="val => emit('update:tempFilteredValue', config.prop, val)"
|
|
11
10
|
>
|
|
12
11
|
<el-radio
|
|
13
12
|
v-for="item in config.options"
|
|
14
13
|
:key="item.value"
|
|
15
|
-
:
|
|
14
|
+
:value="item.value"
|
|
16
15
|
:title="item.text"
|
|
17
16
|
>
|
|
18
17
|
{{ item.text }}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-popover
|
|
3
3
|
ref="popoverRef"
|
|
4
|
+
v-model:visible="visible"
|
|
4
5
|
placement="bottom"
|
|
5
6
|
trigger="click"
|
|
6
7
|
popper-class="editable-table-sort-filter"
|
|
7
|
-
data-popper-name="editable-table-sort-filter"
|
|
8
|
-
:data-prop="column.prop"
|
|
9
8
|
@show="() => emit('popover-show')"
|
|
10
9
|
>
|
|
11
|
-
<template
|
|
10
|
+
<template #reference>
|
|
12
11
|
<slot name="custom">
|
|
13
12
|
<!-- 筛选中,或排序中,高亮 -->
|
|
14
13
|
<span
|
|
@@ -63,11 +62,11 @@
|
|
|
63
62
|
</div>
|
|
64
63
|
<el-checkbox-group
|
|
65
64
|
class="editable-table-sort-filter__filter-checkbox-group"
|
|
66
|
-
:value="tempSummaryList"
|
|
67
|
-
@
|
|
65
|
+
:model-value="tempSummaryList"
|
|
66
|
+
@update:modelValue="val => emit('update:tempSummaryList', val)"
|
|
68
67
|
>
|
|
69
68
|
<el-checkbox
|
|
70
|
-
:
|
|
69
|
+
:value="column.prop"
|
|
71
70
|
class="editable-table-sort-filter__filter-checkbox"
|
|
72
71
|
>
|
|
73
72
|
<slot
|
|
@@ -80,17 +79,17 @@
|
|
|
80
79
|
</el-checkbox-group>
|
|
81
80
|
</div>
|
|
82
81
|
|
|
83
|
-
<div class="editable-table-sort-filter__footer">
|
|
82
|
+
<div class="editable-table-sort-filter__footer" @click.stop>
|
|
84
83
|
<el-button
|
|
85
84
|
class="editable-table-sort-filter__reset-btn"
|
|
86
|
-
@click="
|
|
85
|
+
@click.stop="handleReset"
|
|
87
86
|
>
|
|
88
87
|
重置
|
|
89
88
|
</el-button>
|
|
90
89
|
<el-button
|
|
91
90
|
class="editable-table-sort-filter__confirm-btn"
|
|
92
91
|
type="primary"
|
|
93
|
-
@click="
|
|
92
|
+
@click.stop="handleConfirm"
|
|
94
93
|
>
|
|
95
94
|
确定
|
|
96
95
|
</el-button>
|
|
@@ -100,7 +99,7 @@
|
|
|
100
99
|
</template>
|
|
101
100
|
|
|
102
101
|
<script setup lang="ts">
|
|
103
|
-
import { ref } from 'vue'
|
|
102
|
+
import { ref, markRaw } from 'vue'
|
|
104
103
|
|
|
105
104
|
import BizCheckboxFilter from './BizCheckboxFilter.vue';
|
|
106
105
|
import BizColorRadioFilter from './BizColorRadioFilter.vue';
|
|
@@ -129,32 +128,42 @@ const emit = defineEmits<{
|
|
|
129
128
|
(e: 'confirm'): void
|
|
130
129
|
}>()
|
|
131
130
|
|
|
132
|
-
// 把 filterItem.type
|
|
131
|
+
// 把 filterItem.type 映射到组件(markRaw 防止 Vue 响应式代理包装组件定义)
|
|
133
132
|
const componentMap: Record<Exclude<FilterItem['type'], 'slot'>, any> = {
|
|
134
133
|
/** 输入框 */
|
|
135
|
-
input: BizInputFilter,
|
|
134
|
+
input: markRaw(BizInputFilter),
|
|
136
135
|
/** 日期范围 */
|
|
137
|
-
doubleDatePicker: BizDoubleDatePickerFilter,
|
|
136
|
+
doubleDatePicker: markRaw(BizDoubleDatePickerFilter),
|
|
138
137
|
/** 单选框 */
|
|
139
|
-
radio: BizRadioFilter,
|
|
138
|
+
radio: markRaw(BizRadioFilter),
|
|
140
139
|
/** 复选框 */
|
|
141
|
-
checkbox: BizCheckboxFilter,
|
|
140
|
+
checkbox: markRaw(BizCheckboxFilter),
|
|
142
141
|
/** 月日选择器 */
|
|
143
|
-
monthDayPicker: BizMonthDayPicker,
|
|
142
|
+
monthDayPicker: markRaw(BizMonthDayPicker),
|
|
144
143
|
/** 颜色选择器 */
|
|
145
|
-
colorRadio: BizColorRadioFilter,
|
|
144
|
+
colorRadio: markRaw(BizColorRadioFilter),
|
|
146
145
|
}
|
|
147
146
|
|
|
148
|
-
const
|
|
147
|
+
const visible = ref(false)
|
|
149
148
|
|
|
150
149
|
// 统一的事件派发
|
|
151
150
|
function onUpdate(key: string, val: any) {
|
|
152
151
|
emit('update:tempFilteredValue', key, val)
|
|
153
152
|
}
|
|
154
153
|
|
|
154
|
+
function handleReset() {
|
|
155
|
+
emit('reset')
|
|
156
|
+
visible.value = false
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function handleConfirm() {
|
|
160
|
+
emit('confirm')
|
|
161
|
+
visible.value = false
|
|
162
|
+
}
|
|
163
|
+
|
|
155
164
|
defineExpose({
|
|
156
165
|
close: () => {
|
|
157
|
-
|
|
166
|
+
visible.value = false
|
|
158
167
|
}
|
|
159
168
|
})
|
|
160
169
|
</script>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-popover
|
|
3
3
|
ref="operationPopoverRef"
|
|
4
|
+
:width="'auto'"
|
|
4
5
|
placement="bottom"
|
|
5
6
|
trigger="click"
|
|
6
7
|
popper-class="editable-table-operation-popover"
|
|
7
8
|
>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
<template #reference>
|
|
10
|
+
<div
|
|
11
|
+
class="editable-table-operation-popover__operation-reference btn-pointer"
|
|
12
|
+
>
|
|
13
|
+
<el-button class="editable-table-operation-popover__operation-btn">
|
|
14
|
+
操作
|
|
15
|
+
</el-button>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
16
18
|
<div class="editable-table-operation-popover__operation">
|
|
17
19
|
<div
|
|
18
20
|
v-if="defaultOperations.includes('delete')"
|
|
@@ -62,6 +64,6 @@ const emit = defineEmits<{
|
|
|
62
64
|
const operationPopoverRef = ref(null as any)
|
|
63
65
|
|
|
64
66
|
defineExpose({
|
|
65
|
-
doClose: () => operationPopoverRef.value?.
|
|
67
|
+
doClose: () => operationPopoverRef.value?.hide?.()
|
|
66
68
|
})
|
|
67
69
|
</script>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-dialog
|
|
3
3
|
title="显示设置"
|
|
4
|
-
|
|
4
|
+
v-model="viewSettingVisible"
|
|
5
5
|
width="750px"
|
|
6
6
|
top="12vh"
|
|
7
7
|
:close-on-click-modal="false"
|
|
8
8
|
append-to-body
|
|
9
|
-
|
|
9
|
+
class="editable-table-view-setting__dialog"
|
|
10
|
+
header-class="editable-table-view-setting__header"
|
|
11
|
+
body-class="editable-table-view-setting__body"
|
|
12
|
+
footer-class="editable-table-view-setting__footer"
|
|
10
13
|
>
|
|
11
14
|
<div class="editable-table-view-setting__content">
|
|
12
15
|
<div class="editable-table-view-setting__content-left">
|
|
@@ -15,7 +18,7 @@
|
|
|
15
18
|
<el-checkbox
|
|
16
19
|
v-for="item in props.columnConfig"
|
|
17
20
|
:key="item.label"
|
|
18
|
-
:
|
|
21
|
+
:value="item.prop"
|
|
19
22
|
:disabled="item.isAlwaysShow"
|
|
20
23
|
>
|
|
21
24
|
<div class="editable-table-view-setting__content-left-item">
|
|
@@ -36,8 +39,8 @@
|
|
|
36
39
|
冻结前
|
|
37
40
|
<el-input
|
|
38
41
|
class="editable-table-view-setting__content-right-input"
|
|
39
|
-
:value="tempLeftFixedColumnCount"
|
|
40
|
-
@
|
|
42
|
+
:model-value="tempLeftFixedColumnCount"
|
|
43
|
+
@update:modelValue="handleInputTempLeftFixedColumnCount"
|
|
41
44
|
/>
|
|
42
45
|
列
|
|
43
46
|
</div>
|
|
@@ -65,7 +68,7 @@
|
|
|
65
68
|
:class="['editable-table-view-setting__selected-item-close', item.isAlwaysShow ? 'editable-table-view-setting__selected-item-close--disabled' : '']"
|
|
66
69
|
@click="handleColumnClose(item)"
|
|
67
70
|
>
|
|
68
|
-
<
|
|
71
|
+
<el-icon><Close /></el-icon>
|
|
69
72
|
</div>
|
|
70
73
|
</div>
|
|
71
74
|
</div>
|
|
@@ -86,6 +89,7 @@
|
|
|
86
89
|
</template>
|
|
87
90
|
|
|
88
91
|
<script setup lang="ts">
|
|
92
|
+
import { Close } from '@element-plus/icons-vue';
|
|
89
93
|
import { toRefs } from 'vue';
|
|
90
94
|
import { useViewSetting } from '../bizHooks'
|
|
91
95
|
import { IColumnConfig, IProps } from '../types';
|