@lx-frontend/wrap-element-ui 1.0.1-beta.5 → 1.0.1-beta.7

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.
Files changed (29) hide show
  1. package/README.md +45 -45
  2. package/package.json +14 -14
  3. package/src/components/AddMembers/index.vue +157 -157
  4. package/src/components/AuditSteps/index.vue +140 -140
  5. package/src/components/DemoComponent/index.vue +20 -20
  6. package/src/components/EditableTable/README.md +147 -147
  7. package/src/components/EditableTable/bizHooks/index.ts +17 -0
  8. package/src/components/EditableTable/{useCellHover.ts → bizHooks/useCellHover.ts} +71 -71
  9. package/src/components/EditableTable/{useColumnHeaderOperation.ts → bizHooks/useColumnHeaderOperation.ts} +326 -325
  10. package/src/components/EditableTable/{useDefaultOperation.ts → bizHooks/useDefaultOperation.ts} +95 -95
  11. package/src/components/EditableTable/{useDragSort.ts → bizHooks/useDragSort.ts} +290 -290
  12. package/src/components/EditableTable/{usePagination.ts → bizHooks/usePagination.ts} +30 -30
  13. package/src/components/EditableTable/{useRowBgColor.ts → bizHooks/useRowBgColor.ts} +43 -50
  14. package/src/components/EditableTable/{useViewSetting.ts → bizHooks/useViewSetting.ts} +118 -119
  15. package/src/components/EditableTable/features/bizColorSelect.vue +65 -0
  16. package/src/components/EditableTable/features/bizEditCell.vue +44 -0
  17. package/src/components/EditableTable/features/bizTableHeaderPopover.vue +202 -0
  18. package/src/components/EditableTable/features/bizViewSettingDialog.vue +137 -0
  19. package/src/components/EditableTable/index.less +733 -724
  20. package/src/components/EditableTable/index.vue +630 -914
  21. package/src/components/Ellipsis/MultilineEllipsis.vue +141 -141
  22. package/src/components/Ellipsis/index.vue +119 -119
  23. package/src/components/LxTable/index.vue +296 -296
  24. package/src/components/PopoverForm/index.vue +66 -66
  25. package/src/components/SearchForm/index.vue +243 -243
  26. package/src/components/SearchSelect/index.vue +153 -153
  27. package/src/components/index.ts +24 -24
  28. package/src/components/singleMessage/index.ts +44 -44
  29. /package/src/components/EditableTable/{types.ts → types/index.ts} +0 -0
@@ -0,0 +1,137 @@
1
+ <template>
2
+ <el-dialog
3
+ title="显示设置"
4
+ :visible.sync="viewSettingVisible"
5
+ width="750px"
6
+ top="12vh"
7
+ :close-on-click-modal="false"
8
+ append-to-body
9
+ custom-class="view-setting__dialog"
10
+ >
11
+ <div class="view-setting__content">
12
+ <div class="view-setting__content-left">
13
+ <div class="view-setting__checkbox-wrapper">
14
+ <el-checkbox-group v-model="columnsToBeShown">
15
+ <el-checkbox
16
+ v-for="item in props.columnConfig"
17
+ :key="item.label"
18
+ :label="item.prop"
19
+ :disabled="item.isAlwaysShow"
20
+ >
21
+ <div class="view-setting__content-left-item">
22
+ {{ item.label }}
23
+ </div>
24
+ </el-checkbox>
25
+ </el-checkbox-group>
26
+ </div>
27
+ </div>
28
+ <div class="view-setting__content-right">
29
+ <div class="view-setting__content-right-title">
30
+ 已选择
31
+ <div class="view-setting__selected-count">
32
+ {{ columnsToBeShown.length }}
33
+ </div>
34
+ </div>
35
+ <div class="view-setting__content-right-frize">
36
+ 冻结前
37
+ <el-input
38
+ class="view-setting__content-right-input"
39
+ :value="tempLeftFixedColumnCount"
40
+ @input="handleInputTempLeftFixedColumnCount"
41
+ />
42
+
43
+ </div>
44
+ <div class="view-setting__content-right-selected">
45
+ <div
46
+ v-for="(item, index) in viewSettingDragSortOptions"
47
+ :key="item.prop"
48
+ class="view-setting__selected-item view-setting-draggable-item"
49
+ >
50
+ <div class="view-setting__selected-item-left">
51
+ <div
52
+ class="view-setting-drag-target view-setting__icon-wrapper"
53
+ :data-index="index"
54
+ >
55
+ <div
56
+ class="view-setting-drag-target editable-table-drag-icon"
57
+ :data-index="index"
58
+ />
59
+ </div>
60
+ <div class="view-setting__selected-item-name">
61
+ {{ item.label }}
62
+ </div>
63
+ </div>
64
+ <div
65
+ :class="['view-setting__selected-item-close', item.isAlwaysShow ? 'view-setting__selected-item-close--disabled' : '']"
66
+ @click="handleColumnClose(item)"
67
+ >
68
+ <i class="el-icon-close" />
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ <template #footer>
75
+ <el-button @click="handleViewSettingClose">
76
+ 取消
77
+ </el-button>
78
+ <el-button
79
+ type="primary"
80
+ @click="handleViewSettingConfirm"
81
+ >
82
+ 确认
83
+ </el-button>
84
+ </template>
85
+ </el-dialog>
86
+ </template>
87
+
88
+ <script setup lang="ts">
89
+ import { toRefs } from 'vue';
90
+ import { useViewSetting } from '../bizHooks'
91
+ import { IColumnConfig, IProps } from '../types';
92
+
93
+ const emit = defineEmits<{
94
+ (e: 'update:leftFixedColumnCount', val: number): void
95
+ (e: 'update:showingColumns', val: string[]): void
96
+ (e: 'update:viewSettingDragSortOptions', val: IColumnConfig[]): void
97
+ (e: 'tableDoLayout'): void
98
+ }>()
99
+
100
+ const _props = defineProps<{
101
+ actualColumns: IColumnConfig[]
102
+ viewSettingDragSortOptions: IColumnConfig[]
103
+ showingColumns: string[]
104
+ props: IProps
105
+ }>()
106
+
107
+ const {
108
+ actualColumns,
109
+ showingColumns,
110
+ viewSettingDragSortOptions,
111
+ } = toRefs(_props)
112
+
113
+ const {
114
+ columnsToBeShown,
115
+ viewSettingVisible,
116
+ tempLeftFixedColumnCount,
117
+ handleInputTempLeftFixedColumnCount,
118
+ handleViewSettingShow,
119
+ handleViewSettingClose,
120
+ handleViewSettingConfirm
121
+ } = useViewSetting({
122
+ showingColumns,
123
+ actualColumns,
124
+ viewSettingDragSortOptions,
125
+ props: _props.props,
126
+ emit,
127
+ });
128
+
129
+ const handleColumnClose = (item) => {
130
+ if (item.isAlwaysShow) return;
131
+ columnsToBeShown.value = columnsToBeShown.value.filter(c => c !== item.prop);
132
+ };
133
+
134
+ defineExpose({
135
+ open: handleViewSettingShow
136
+ })
137
+ </script>