gyyg-components 0.3.3 → 0.3.5
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/lib/gyyg-components.common.js +167 -95
- package/lib/gyyg-components.umd.js +167 -95
- package/lib/gyyg-components.umd.min.js +167 -95
- package/package.json +1 -1
- package/src/components/MECDescriptions/MECDescriptions.vue +75 -7
- package/src/components/MecButtonGroup/MecButtonGroup.vue +5 -0
- package/src/components/MecDialog/MecDialog.vue +9 -1
- package/src/components/MecTable/MecTable.vue +9 -1
- package/src/components/MecTags/MecTags.js +6 -0
- package/src/components/MecTags/MecTags.vue +9 -0
- package/src/otherComponents/iconButton.vue +27 -9
- package/src/otherComponents/styleText.vue +3 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div :class="isCard ? 'card' : ''">
|
|
3
3
|
<el-descriptions
|
|
4
4
|
:column="column"
|
|
5
5
|
:title="title"
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
:class="!title ? 'no-title' : ''"
|
|
10
10
|
>
|
|
11
11
|
<template #title>
|
|
12
|
-
<div class="title">
|
|
12
|
+
<div class="title">
|
|
13
|
+
<el-icon :class="titleIcon"></el-icon><span>{{ title }}</span>
|
|
14
|
+
</div>
|
|
13
15
|
<div class="top-content">
|
|
14
16
|
<slot name="topContent"></slot>
|
|
15
17
|
</div>
|
|
@@ -20,11 +22,10 @@
|
|
|
20
22
|
:key="index"
|
|
21
23
|
:label="item.label"
|
|
22
24
|
:span="item.span || 1"
|
|
23
|
-
:contentClassName="item.contentClassName || ''"
|
|
24
|
-
:labelStyle="{width:labelWidth + 'px', textAlign: 'right'}"
|
|
25
|
+
:contentClassName="direction == 'vertical' ? 'vertical-content' : item.contentClassName || ''"
|
|
26
|
+
:labelStyle="direction == 'horizontal' ? { width: labelWidth + 'px', textAlign: 'right' } : {}"
|
|
25
27
|
:contentStyle="item.contentStyle || {}"
|
|
26
|
-
:labelClassName="item.labelClassName || ''"
|
|
27
|
-
|
|
28
|
+
:labelClassName="direction == 'vertical' ? 'vertical-label' : item.labelClassName || ''"
|
|
28
29
|
>
|
|
29
30
|
<div v-if="item.type === 'img'">
|
|
30
31
|
<el-image
|
|
@@ -53,16 +54,23 @@
|
|
|
53
54
|
<component
|
|
54
55
|
:is="item.componentName"
|
|
55
56
|
v-model="item.value"
|
|
57
|
+
:tableData="item"
|
|
56
58
|
v-bind="typeof item.componentProps === 'function' ? item.componentProps(item) : item.componentProps"
|
|
57
59
|
v-on="typeof item.componentListeners === 'function' ? item.componentListeners(item) : item.componentListeners || {}"
|
|
58
60
|
/>
|
|
59
61
|
</div>
|
|
60
|
-
<span
|
|
62
|
+
<span
|
|
63
|
+
v-else
|
|
64
|
+
:style="!item.value ? 'color: #C0C4CC; font-style: italic;' : ''"
|
|
65
|
+
>{{ item.value || '未填写' }}</span>
|
|
61
66
|
</el-descriptions-item>
|
|
62
67
|
</el-descriptions>
|
|
63
68
|
</div>
|
|
69
|
+
|
|
70
|
+
|
|
64
71
|
</template>
|
|
65
72
|
<script>
|
|
73
|
+
import styleText from '@/otherComponents/styleText.vue'
|
|
66
74
|
export default {
|
|
67
75
|
name: 'mec-descriptions',
|
|
68
76
|
props: {
|
|
@@ -105,8 +113,20 @@ export default {
|
|
|
105
113
|
type: [Number, String],
|
|
106
114
|
default: 100
|
|
107
115
|
},
|
|
116
|
+
isCard: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false
|
|
119
|
+
},
|
|
120
|
+
titleIcon: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: ''
|
|
123
|
+
},
|
|
108
124
|
|
|
109
125
|
},
|
|
126
|
+
components: {
|
|
127
|
+
styleText
|
|
128
|
+
},
|
|
129
|
+
|
|
110
130
|
}
|
|
111
131
|
</script>
|
|
112
132
|
<style lang="less" scoped>
|
|
@@ -144,7 +164,55 @@ export default {
|
|
|
144
164
|
/deep/ .el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
|
|
145
165
|
white-space: pre-wrap;
|
|
146
166
|
}
|
|
167
|
+
|
|
147
168
|
/deep/ .el-progress-bar {
|
|
148
169
|
width: 200px
|
|
149
170
|
}
|
|
171
|
+
|
|
172
|
+
/deep/ .el-descriptions-item__content {
|
|
173
|
+
color: #000;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.card {
|
|
177
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
|
178
|
+
margin-bottom: 20px;
|
|
179
|
+
border-radius: 8px;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
|
|
182
|
+
/deep/ .el-descriptions {
|
|
183
|
+
.el-descriptions__body {
|
|
184
|
+
padding: 0 10px;
|
|
185
|
+
|
|
186
|
+
.vertical-content {
|
|
187
|
+
padding-bottom: 20px;
|
|
188
|
+
color: #000;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.vertical-label {
|
|
192
|
+
padding-bottom: 0;
|
|
193
|
+
color: #606266;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.title {
|
|
198
|
+
background-color: #fff;
|
|
199
|
+
margin-bottom: 0;
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.el-descriptions__title {
|
|
205
|
+
padding: 10px 0;
|
|
206
|
+
border-bottom: 1px solid #ebeef5;
|
|
207
|
+
|
|
208
|
+
i {
|
|
209
|
+
font-size: 20px;
|
|
210
|
+
color: #1890ff;
|
|
211
|
+
margin-right: 5px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
}
|
|
217
|
+
}
|
|
150
218
|
</style>
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
:destroy-on-close="destroyOnClose"
|
|
20
20
|
:modal='modal'
|
|
21
21
|
>
|
|
22
|
+
<div slot="title" style="font-size: 16px; color: #303133;">
|
|
23
|
+
<el-icon :class="titleIcon" style="color: #1890ff; font-size: 18px;margin-right: 5px;"></el-icon>
|
|
24
|
+
<span>{{ title }}</span>
|
|
25
|
+
</div>
|
|
22
26
|
<slot name="body" />
|
|
23
27
|
<div v-if="footer" slot="footer">
|
|
24
28
|
<slot name="footer" />
|
|
@@ -84,7 +88,11 @@ export default {
|
|
|
84
88
|
dialogClass: {
|
|
85
89
|
type: String,
|
|
86
90
|
default: ""
|
|
87
|
-
}
|
|
91
|
+
},
|
|
92
|
+
titleIcon: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
88
96
|
},
|
|
89
97
|
data() {
|
|
90
98
|
return {
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
@row-click="rowClickHandel"
|
|
21
21
|
@row-dblclick="rowDblclickHandel"
|
|
22
22
|
:border="border"
|
|
23
|
+
:cell-class-name="cellClassName"
|
|
24
|
+
:cell-style="cellStyle"
|
|
23
25
|
>
|
|
24
26
|
<!-- 多选框 -->
|
|
25
27
|
<el-table-column
|
|
@@ -246,7 +248,13 @@ export default {
|
|
|
246
248
|
totalTextColor: {
|
|
247
249
|
type: String,
|
|
248
250
|
default: ''
|
|
249
|
-
}
|
|
251
|
+
},
|
|
252
|
+
cellClassName: {
|
|
253
|
+
|
|
254
|
+
},
|
|
255
|
+
cellStyle: {
|
|
256
|
+
|
|
257
|
+
},
|
|
250
258
|
|
|
251
259
|
},
|
|
252
260
|
data() {
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="icon-btn">
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
<div
|
|
5
5
|
v-for="item in iconlist"
|
|
6
6
|
:key="item.id"
|
|
7
7
|
@click="item.callback ? item.callback(scope.row) : null"
|
|
8
8
|
class="icon"
|
|
9
9
|
>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
<div>{{ typeof item.showNumber !== 'function' ? item.showNumber : item.showNumber(scope.row) }}</div>
|
|
11
|
+
<el-tooltip
|
|
12
|
+
class="item"
|
|
13
|
+
effect="dark"
|
|
14
|
+
:content="item.tooltipText"
|
|
15
|
+
placement="right"
|
|
16
|
+
v-if="item.isTooltip"
|
|
17
|
+
popper-class="icon-tooltip"
|
|
18
|
+
>
|
|
19
|
+
<el-icon
|
|
20
|
+
:class="item.isHover ? item.class + ' view-btn' : item.class"
|
|
21
|
+
:style="[item.style ? setStyle(item.style) : {}]"
|
|
22
|
+
></el-icon>
|
|
23
|
+
</el-tooltip>
|
|
24
|
+
<el-icon
|
|
25
|
+
v-else
|
|
26
|
+
:class="item.isHover ? item.class + ' view-btn' : item.class"
|
|
27
|
+
:style="[item.style ? setStyle(item.style) : {}]"
|
|
28
|
+
></el-icon>
|
|
15
29
|
</div>
|
|
16
30
|
</div>
|
|
17
31
|
</template>
|
|
@@ -67,15 +81,19 @@ export default {
|
|
|
67
81
|
display: flex;
|
|
68
82
|
align-items: center;
|
|
69
83
|
}
|
|
84
|
+
|
|
70
85
|
.icon-btn /deep/.icon {
|
|
71
86
|
display: flex;
|
|
72
87
|
align-items: center;
|
|
73
88
|
user-select: none;
|
|
74
89
|
cursor: pointer;
|
|
75
90
|
}
|
|
91
|
+
|
|
76
92
|
.view-btn {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
93
|
+
&:hover {
|
|
94
|
+
color: #409eff !important;
|
|
95
|
+
}
|
|
80
96
|
}
|
|
97
|
+
|
|
98
|
+
|
|
81
99
|
</style>
|