gyyg-components 0.2.23 → 0.2.25
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 +90 -90
- package/lib/gyyg-components.umd.js +90 -90
- package/lib/gyyg-components.umd.min.js +90 -90
- package/package.json +1 -1
- package/src/components/MECDescriptions/MECDescriptions.vue +57 -8
- package/src/components/MecTable/MecTable.vue +1 -0
- package/src/otherComponents/styleText.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<el-descriptions
|
|
3
|
+
<el-descriptions
|
|
4
|
+
:column="column"
|
|
5
|
+
:title="title"
|
|
6
|
+
:extra="extra"
|
|
7
|
+
:direction="direction"
|
|
8
|
+
:border="border"
|
|
9
|
+
:class="!title ? 'no-title' : ''"
|
|
10
|
+
>
|
|
4
11
|
<template #title>
|
|
5
12
|
<div class="title">{{ title }}</div>
|
|
6
13
|
<div class="top-content">
|
|
@@ -9,21 +16,48 @@
|
|
|
9
16
|
</div>
|
|
10
17
|
</template>
|
|
11
18
|
|
|
12
|
-
<el-descriptions-item
|
|
19
|
+
<el-descriptions-item
|
|
20
|
+
v-for="(item, index) in detailsData"
|
|
21
|
+
:key="index"
|
|
22
|
+
:label="item.label"
|
|
23
|
+
:span="item.span || 1"
|
|
24
|
+
:contentClassName="item.contentClassName || ''"
|
|
25
|
+
:labelStyle="{width:labelWidth + 'px', textAlign: 'right'}"
|
|
26
|
+
:contentStyle="item.contentStyle || {}"
|
|
27
|
+
:labelClassName="item.labelClassName || ''"
|
|
28
|
+
|
|
29
|
+
>
|
|
13
30
|
<div v-if="item.type === 'img'">
|
|
14
|
-
<el-image
|
|
31
|
+
<el-image
|
|
15
32
|
v-for="(url, index) in item.value"
|
|
16
33
|
:key="index"
|
|
17
34
|
style="width: 100px; height: 100px; margin-right: 10px;"
|
|
18
|
-
:src="url"
|
|
19
|
-
:preview-src-list="item.value"
|
|
35
|
+
:src="url"
|
|
36
|
+
:preview-src-list="item.value"
|
|
37
|
+
>
|
|
20
38
|
</el-image>
|
|
21
39
|
</div>
|
|
22
40
|
<div v-else-if="item.type === 'voice'">
|
|
23
|
-
<audio
|
|
24
|
-
|
|
41
|
+
<audio
|
|
42
|
+
controls="controls"
|
|
43
|
+
style="width: 240px; height: 40px;"
|
|
44
|
+
v-for="item in item.value"
|
|
45
|
+
:key="item.id"
|
|
46
|
+
>
|
|
47
|
+
<source
|
|
48
|
+
:src="item"
|
|
49
|
+
type="audio/mp3"
|
|
50
|
+
>
|
|
25
51
|
</audio>
|
|
26
52
|
</div>
|
|
53
|
+
<div v-else-if="item.type === 'custom'">
|
|
54
|
+
<component
|
|
55
|
+
:is="item.componentName"
|
|
56
|
+
v-model="item.value"
|
|
57
|
+
v-bind="typeof item.componentProps === 'function' ? item.componentProps(item) : item.componentProps"
|
|
58
|
+
v-on="typeof item.componentListeners === 'function' ? item.componentListeners(item) : item.componentListeners || {}"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
27
61
|
<span v-else>{{ item.value }}</span>
|
|
28
62
|
</el-descriptions-item>
|
|
29
63
|
</el-descriptions>
|
|
@@ -67,7 +101,12 @@ export default {
|
|
|
67
101
|
border: {
|
|
68
102
|
type: Boolean,
|
|
69
103
|
default: false
|
|
70
|
-
}
|
|
104
|
+
},
|
|
105
|
+
labelWidth: {
|
|
106
|
+
type: [Number, String],
|
|
107
|
+
default: 100
|
|
108
|
+
},
|
|
109
|
+
|
|
71
110
|
},
|
|
72
111
|
}
|
|
73
112
|
</script>
|
|
@@ -75,6 +114,13 @@ export default {
|
|
|
75
114
|
/deep/ .el-descriptions__header {
|
|
76
115
|
display: block;
|
|
77
116
|
}
|
|
117
|
+
|
|
118
|
+
.no-title {
|
|
119
|
+
/deep/ .el-descriptions__header {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
78
124
|
.title {
|
|
79
125
|
padding-left: 10px;
|
|
80
126
|
height: 30px;
|
|
@@ -85,14 +131,17 @@ export default {
|
|
|
85
131
|
color: #606266;
|
|
86
132
|
font-size: 14px;
|
|
87
133
|
}
|
|
134
|
+
|
|
88
135
|
.top-content {
|
|
89
136
|
color: #606266;
|
|
90
137
|
font-size: 14px;
|
|
91
138
|
font-weight: normal;
|
|
92
139
|
}
|
|
140
|
+
|
|
93
141
|
/deep/ .el-descriptions-item__label {
|
|
94
142
|
white-space: nowrap;
|
|
95
143
|
}
|
|
144
|
+
|
|
96
145
|
/deep/ .el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
|
|
97
146
|
white-space: pre-wrap;
|
|
98
147
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<span class="default-text" :style="[statusStyle]" v-if="tableData.columnType == 'text'"
|
|
4
4
|
:class="tableData.getClass ? tableData.getClass(scope.row) : ''">{{ getText(tableData.bind) }}</span>
|
|
5
|
-
<el-button v-if="tableData.columnType == 'button'" size="mini" plain round :type="tableData.setType(this.scope.row)">{{ getText(tableData.bind) }}</el-button>
|
|
5
|
+
<el-button v-if="tableData.columnType == 'button' && getText(tableData.bind)" size="mini" plain round :type="tableData.setType(this.scope.row)">{{ getText(tableData.bind) }}</el-button>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
<script>
|