@lx-frontend/wrap-element-ui 1.0.16-beta.3 → 1.0.17-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.
- package/package.json +13 -14
- package/src/components/EditableTable/features/bizEditCell.vue +2 -0
- package/src/components/EditableTable/features/bizTableHeaderPopover/BizCheckboxFilter.vue +1 -6
- package/src/components/EditableTable/features/bizTableHeaderPopover/BizRadioFilter.vue +1 -6
- package/src/components/EditableTable/features/bizTableHeaderPopover/index.vue +9 -12
- package/src/components/EditableTable/features/bizTableOperatePopover.vue +2 -1
- package/src/components/EditableTable/index.vue +12 -20
- package/src/components/EditableTable/types/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lx-frontend/wrap-element-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17-beta.0",
|
|
4
4
|
"description": "wrap-element-ui",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "src/components/index.ts",
|
|
7
7
|
"private": false,
|
|
8
|
-
"scripts": {
|
|
9
|
-
"clean": "rimraf dist",
|
|
10
|
-
"dev": "cross-env MODE=development storybook dev -p 6006",
|
|
11
|
-
"dist": "cross-env MODE=production pnpm build:lib && storybook dev -p 6006",
|
|
12
|
-
"build:lib": "pnpm clean && vite build",
|
|
13
|
-
"build:sb": "cross-env MODE=production rimraf storybook-static && pnpm build:lib && storybook build",
|
|
14
|
-
"preview": "serve ./storybook-static",
|
|
15
|
-
"publish:dev": "npm publish --access public --tag beta",
|
|
16
|
-
"publish:prod": "npm publish --access public",
|
|
17
|
-
"cdn": "gulp oss",
|
|
18
|
-
"lint": "eslint src"
|
|
19
|
-
},
|
|
20
8
|
"files": [
|
|
21
9
|
"README.md",
|
|
22
10
|
"package.json",
|
|
@@ -52,7 +40,6 @@
|
|
|
52
40
|
"ali-oss": "^6.20.0",
|
|
53
41
|
"autoprefixer": "^10.4.19",
|
|
54
42
|
"cross-env": "^7.0.3",
|
|
55
|
-
"dayjs": "^1.11.13",
|
|
56
43
|
"eslint": "^8.57.0",
|
|
57
44
|
"eslint-plugin-vue": "^9.27.0",
|
|
58
45
|
"gulp": "^4.0.2",
|
|
@@ -70,5 +57,17 @@
|
|
|
70
57
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
71
58
|
"vite-tsconfig-paths": "^4.3.2",
|
|
72
59
|
"vue-template-compiler": "^2.6.10"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"clean": "rimraf dist",
|
|
63
|
+
"dev": "cross-env MODE=development storybook dev -p 6006",
|
|
64
|
+
"dist": "cross-env MODE=production pnpm build:lib && storybook dev -p 6006",
|
|
65
|
+
"build:lib": "pnpm clean && vite build",
|
|
66
|
+
"build:sb": "cross-env MODE=production rimraf storybook-static && pnpm build:lib && storybook build",
|
|
67
|
+
"preview": "serve ./storybook-static",
|
|
68
|
+
"publish:dev": "npm publish --access public --tag beta",
|
|
69
|
+
"publish:prod": "npm publish --access public",
|
|
70
|
+
"cdn": "gulp oss",
|
|
71
|
+
"lint": "eslint src"
|
|
73
72
|
}
|
|
74
73
|
}
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script setup lang="ts">
|
|
34
|
+
import { defineEmits, defineProps } from 'vue';
|
|
34
35
|
import { IColumnConfig } from '../types'
|
|
35
36
|
|
|
36
37
|
defineProps<{
|
|
@@ -38,6 +39,7 @@ defineProps<{
|
|
|
38
39
|
value: any;
|
|
39
40
|
}>()
|
|
40
41
|
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
41
43
|
const emit = defineEmits<{
|
|
42
44
|
(e: 'input', value: any): void;
|
|
43
45
|
}>()
|
|
@@ -9,18 +9,15 @@
|
|
|
9
9
|
@show="() => emit('popover-show')"
|
|
10
10
|
>
|
|
11
11
|
<template slot="reference">
|
|
12
|
-
<slot
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
>
|
|
21
|
-
{{ column.label }}
|
|
22
|
-
<div :class="['editable-table__sort-icon', headActive && 'editable-table__sort-icon--active']" />
|
|
23
|
-
</span>
|
|
12
|
+
<slot name="custom">
|
|
13
|
+
<!-- 筛选中,或排序中,高亮 -->
|
|
14
|
+
<span
|
|
15
|
+
:class="['editable-table__sort-reference', headActive && 'editable-table__sort-reference--active']"
|
|
16
|
+
>
|
|
17
|
+
{{ column.label }}
|
|
18
|
+
<div :class="['editable-table__sort-icon', headActive && 'editable-table__sort-icon--active']" />
|
|
19
|
+
</span>
|
|
20
|
+
</slot>
|
|
24
21
|
</template>
|
|
25
22
|
<div class="editable-table-sort-filter">
|
|
26
23
|
<div class="editable-table-sort-filter__column-title">
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script setup lang="ts">
|
|
44
|
-
import { ref } from 'vue';
|
|
44
|
+
import { defineEmits, defineExpose, defineProps, ref } from 'vue';
|
|
45
45
|
import { IDefaultOperationType } from '../types';
|
|
46
46
|
|
|
47
47
|
defineProps<{
|
|
@@ -53,6 +53,7 @@ defineProps<{
|
|
|
53
53
|
scope: any
|
|
54
54
|
}>()
|
|
55
55
|
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
56
57
|
const emit = defineEmits<{
|
|
57
58
|
(e: 'edit'): void
|
|
58
59
|
(e: 'delete'): void
|
|
@@ -124,14 +124,6 @@
|
|
|
124
124
|
<template #custom>
|
|
125
125
|
<div class="editable-table__color-icon" />
|
|
126
126
|
</template>
|
|
127
|
-
<template #filter-item="item">
|
|
128
|
-
<slot
|
|
129
|
-
:name="colorFilterConfig.prop + '-filter-item'"
|
|
130
|
-
v-bind="item"
|
|
131
|
-
>
|
|
132
|
-
{{ item.text }}
|
|
133
|
-
</slot>
|
|
134
|
-
</template>
|
|
135
127
|
</biz-table-header-popover>
|
|
136
128
|
<div
|
|
137
129
|
v-else
|
|
@@ -174,14 +166,6 @@
|
|
|
174
166
|
@reset="() => handleHeaderOperationReset(column)"
|
|
175
167
|
@confirm="() => handleHeaderOperationConfirm(column)"
|
|
176
168
|
>
|
|
177
|
-
<template #filter-item="item">
|
|
178
|
-
<slot
|
|
179
|
-
:name="column.prop + '-filter-item'"
|
|
180
|
-
v-bind="item"
|
|
181
|
-
>
|
|
182
|
-
{{ item.text }}
|
|
183
|
-
</slot>
|
|
184
|
-
</template>
|
|
185
169
|
<template #summay-item>
|
|
186
170
|
<slot
|
|
187
171
|
:name="column.prop + '-summay-item'"
|
|
@@ -331,8 +315,9 @@ import BizTableHeaderPopover from './features/bizTableHeaderPopover/index.vue'
|
|
|
331
315
|
import BizEditCell from './features/bizEditCell.vue'
|
|
332
316
|
import BizTableOperatePopover from './features/bizTableOperatePopover.vue'
|
|
333
317
|
|
|
334
|
-
import { computed, nextTick, ref, watch } from 'vue';
|
|
318
|
+
import { computed, defineExpose, nextTick, ref, watch } from 'vue';
|
|
335
319
|
import { Message } from 'element-ui';
|
|
320
|
+
import omit from 'lodash/omit';
|
|
336
321
|
|
|
337
322
|
import {
|
|
338
323
|
usePagination,
|
|
@@ -573,6 +558,8 @@ const beforeDragStart = () => {
|
|
|
573
558
|
return true;
|
|
574
559
|
};
|
|
575
560
|
|
|
561
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
562
|
+
// @ts-ignore
|
|
576
563
|
useDragSort({
|
|
577
564
|
emit,
|
|
578
565
|
props,
|
|
@@ -590,9 +577,14 @@ const doTableLayout = async () => {
|
|
|
590
577
|
|
|
591
578
|
// 过滤出自定义属性,将其它属性全部透传给 el-table-column
|
|
592
579
|
const getColumnBindProps = (column: IColumnConfig) => {
|
|
593
|
-
//
|
|
594
|
-
|
|
595
|
-
|
|
580
|
+
// 过滤掉自定义属性,只保留 el-table-column 支持的属性
|
|
581
|
+
return omit(column, [
|
|
582
|
+
'editType',
|
|
583
|
+
'slotName',
|
|
584
|
+
'inputType',
|
|
585
|
+
'options',
|
|
586
|
+
'filters'
|
|
587
|
+
]);
|
|
596
588
|
};
|
|
597
589
|
|
|
598
590
|
const setRowClassName = (scope) => {
|
|
@@ -88,6 +88,7 @@ type _IColumnConfigRequired = {
|
|
|
88
88
|
/** 自定义颜色表头label */
|
|
89
89
|
customColorLabel?: boolean;
|
|
90
90
|
filters?: FilterListType;
|
|
91
|
+
selectOptions?: { label: string; value: string }[];
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
export type IColumnConfigRequired = _IColumnConfigRequired & Partial<Omit<TableColumn, keyof _IColumnConfigRequired>>
|