@lx-frontend/wrap-element-ui 1.0.1-beta.3 → 1.0.1-beta.4
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/README.md +45 -45
- package/package.json +14 -14
- package/src/components/AddMembers/index.vue +157 -157
- package/src/components/AuditSteps/index.vue +140 -140
- package/src/components/DemoComponent/index.vue +20 -20
- package/src/components/EditableTable/README.md +147 -147
- package/src/components/EditableTable/index.less +724 -724
- package/src/components/EditableTable/index.vue +914 -914
- package/src/components/EditableTable/types.ts +116 -116
- package/src/components/EditableTable/useCellHover.ts +71 -71
- package/src/components/EditableTable/useColumnHeaderOperation.ts +325 -325
- package/src/components/EditableTable/useDefaultOperation.ts +95 -95
- package/src/components/EditableTable/useDragSort.ts +290 -290
- package/src/components/EditableTable/usePagination.ts +30 -30
- package/src/components/EditableTable/useRowBgColor.ts +50 -50
- package/src/components/EditableTable/useViewSetting.ts +119 -119
- package/src/components/Ellipsis/MultilineEllipsis.vue +141 -141
- package/src/components/Ellipsis/index.vue +119 -119
- package/src/components/LxTable/index.vue +296 -296
- package/src/components/PopoverForm/index.vue +66 -66
- package/src/components/SearchForm/index.vue +243 -243
- package/src/components/SearchSelect/index.vue +153 -153
- package/src/components/index.ts +24 -24
- package/src/components/singleMessage/index.ts +44 -44
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="ellipsis-popover">
|
|
3
|
-
<ElPopover
|
|
4
|
-
:disabled="showPopover === 'off' || (showPopover !== 'always' && !isOverflow)"
|
|
5
|
-
:popper-class="popoverName"
|
|
6
|
-
placement="top-start"
|
|
7
|
-
trigger="hover"
|
|
8
|
-
>
|
|
9
|
-
<div class="popover-content">
|
|
10
|
-
<slot name="popover">
|
|
11
|
-
<div v-for="(item, index) in contentArr" :key="getKey(item, index)">{{ item }}</div>
|
|
12
|
-
</slot>
|
|
13
|
-
</div>
|
|
14
|
-
<div slot="reference">
|
|
15
|
-
<div v-for="(item, index) in contentArr" :key="getKey(item, index)">
|
|
16
|
-
<MultilineEllipsis
|
|
17
|
-
:content="item"
|
|
18
|
-
:fontSize="fontSize"
|
|
19
|
-
:color="color"
|
|
20
|
-
:lineCount="lineCount"
|
|
21
|
-
:iconName="iconName"
|
|
22
|
-
:showIconObj="{
|
|
23
|
-
isShowIcon: showIconObj.isShowIcon,
|
|
24
|
-
length: showIconObj.length,
|
|
25
|
-
}"
|
|
26
|
-
:overCountTip="{
|
|
27
|
-
index: index + 1,
|
|
28
|
-
length: contentArr.length,
|
|
29
|
-
}"
|
|
30
|
-
:isOverflow.sync="overflowArr[index]">
|
|
31
|
-
</MultilineEllipsis>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</ElPopover>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<script>
|
|
39
|
-
import MultilineEllipsis from './MultilineEllipsis.vue'
|
|
40
|
-
|
|
41
|
-
export default {
|
|
42
|
-
name: 'Ellipsis',
|
|
43
|
-
components: {
|
|
44
|
-
MultilineEllipsis
|
|
45
|
-
},
|
|
46
|
-
props: {
|
|
47
|
-
fontSize: {
|
|
48
|
-
type: Number,
|
|
49
|
-
default: 12
|
|
50
|
-
},
|
|
51
|
-
color: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: '#000000'
|
|
54
|
-
},
|
|
55
|
-
lineCount: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: 1
|
|
58
|
-
},
|
|
59
|
-
iconName: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: 'el-icon-arrow-down'
|
|
62
|
-
},
|
|
63
|
-
overCountTip: {
|
|
64
|
-
type: Object
|
|
65
|
-
},
|
|
66
|
-
showIconObj: {
|
|
67
|
-
type: Object,
|
|
68
|
-
default: () => {
|
|
69
|
-
return {
|
|
70
|
-
isShowIcon: false,
|
|
71
|
-
length: 0
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
content: {
|
|
76
|
-
type: [String, Array],
|
|
77
|
-
default: ''
|
|
78
|
-
},
|
|
79
|
-
popoverName: String,
|
|
80
|
-
showPopover: {
|
|
81
|
-
type: String,
|
|
82
|
-
default: 'auto' // 可选值 auto, always, off
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
data () {
|
|
86
|
-
return {
|
|
87
|
-
overflowArr: []
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
computed: {
|
|
91
|
-
contentArr () {
|
|
92
|
-
return typeof (this.content) === 'string' ? [this.content] : [...this.content]
|
|
93
|
-
},
|
|
94
|
-
isOverflow () {
|
|
95
|
-
return this.overflowArr.includes(true)
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
watch: {
|
|
99
|
-
contentArr (val) {
|
|
100
|
-
this.overflowArr.length = val.length
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
methods: {
|
|
104
|
-
getKey (item, index) {
|
|
105
|
-
return btoa(escape(`${item}_${index}`))
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
</script>
|
|
110
|
-
|
|
111
|
-
<style lang="less">
|
|
112
|
-
.ellipsis-popover {
|
|
113
|
-
width: 100%;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.popover-content {
|
|
117
|
-
padding: 18px 20px;
|
|
118
|
-
}
|
|
119
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ellipsis-popover">
|
|
3
|
+
<ElPopover
|
|
4
|
+
:disabled="showPopover === 'off' || (showPopover !== 'always' && !isOverflow)"
|
|
5
|
+
:popper-class="popoverName"
|
|
6
|
+
placement="top-start"
|
|
7
|
+
trigger="hover"
|
|
8
|
+
>
|
|
9
|
+
<div class="popover-content">
|
|
10
|
+
<slot name="popover">
|
|
11
|
+
<div v-for="(item, index) in contentArr" :key="getKey(item, index)">{{ item }}</div>
|
|
12
|
+
</slot>
|
|
13
|
+
</div>
|
|
14
|
+
<div slot="reference">
|
|
15
|
+
<div v-for="(item, index) in contentArr" :key="getKey(item, index)">
|
|
16
|
+
<MultilineEllipsis
|
|
17
|
+
:content="item"
|
|
18
|
+
:fontSize="fontSize"
|
|
19
|
+
:color="color"
|
|
20
|
+
:lineCount="lineCount"
|
|
21
|
+
:iconName="iconName"
|
|
22
|
+
:showIconObj="{
|
|
23
|
+
isShowIcon: showIconObj.isShowIcon,
|
|
24
|
+
length: showIconObj.length,
|
|
25
|
+
}"
|
|
26
|
+
:overCountTip="{
|
|
27
|
+
index: index + 1,
|
|
28
|
+
length: contentArr.length,
|
|
29
|
+
}"
|
|
30
|
+
:isOverflow.sync="overflowArr[index]">
|
|
31
|
+
</MultilineEllipsis>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</ElPopover>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
import MultilineEllipsis from './MultilineEllipsis.vue'
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
name: 'Ellipsis',
|
|
43
|
+
components: {
|
|
44
|
+
MultilineEllipsis
|
|
45
|
+
},
|
|
46
|
+
props: {
|
|
47
|
+
fontSize: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 12
|
|
50
|
+
},
|
|
51
|
+
color: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: '#000000'
|
|
54
|
+
},
|
|
55
|
+
lineCount: {
|
|
56
|
+
type: Number,
|
|
57
|
+
default: 1
|
|
58
|
+
},
|
|
59
|
+
iconName: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'el-icon-arrow-down'
|
|
62
|
+
},
|
|
63
|
+
overCountTip: {
|
|
64
|
+
type: Object
|
|
65
|
+
},
|
|
66
|
+
showIconObj: {
|
|
67
|
+
type: Object,
|
|
68
|
+
default: () => {
|
|
69
|
+
return {
|
|
70
|
+
isShowIcon: false,
|
|
71
|
+
length: 0
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
content: {
|
|
76
|
+
type: [String, Array],
|
|
77
|
+
default: ''
|
|
78
|
+
},
|
|
79
|
+
popoverName: String,
|
|
80
|
+
showPopover: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: 'auto' // 可选值 auto, always, off
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
data () {
|
|
86
|
+
return {
|
|
87
|
+
overflowArr: []
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
computed: {
|
|
91
|
+
contentArr () {
|
|
92
|
+
return typeof (this.content) === 'string' ? [this.content] : [...this.content]
|
|
93
|
+
},
|
|
94
|
+
isOverflow () {
|
|
95
|
+
return this.overflowArr.includes(true)
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
watch: {
|
|
99
|
+
contentArr (val) {
|
|
100
|
+
this.overflowArr.length = val.length
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
getKey (item, index) {
|
|
105
|
+
return btoa(escape(`${item}_${index}`))
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style lang="less">
|
|
112
|
+
.ellipsis-popover {
|
|
113
|
+
width: 100%;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.popover-content {
|
|
117
|
+
padding: 18px 20px;
|
|
118
|
+
}
|
|
119
|
+
</style>
|