gyyg-components 0.3.8 → 0.3.10
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 +97 -97
- package/lib/gyyg-components.umd.js +97 -97
- package/lib/gyyg-components.umd.min.js +97 -97
- package/package.json +1 -1
- package/src/components/MecForm/MecForm.vue +1 -0
- package/src/components/MecSearchForm/MecSearchForm.vue +12 -4
- package/src/components/MecTable/MecTable.vue +10 -0
- package/src/components/MecTags/MecTags.vue +6 -2
- package/src/otherComponents/iconButton.vue +5 -0
- package/src/otherComponents/styleText.vue +1 -0
package/package.json
CHANGED
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
</el-form-item>
|
|
20
20
|
</template>
|
|
21
21
|
<slot name="custom" :formGroups="formGroups"></slot>
|
|
22
|
-
<el-form-item>
|
|
23
|
-
<el-button type="primary" size="small" @click="search">查询</el-button>
|
|
22
|
+
<el-form-item v-if="showButton">
|
|
23
|
+
<el-button type="primary" size="small" @click="search" :icon="searchIcon">查询</el-button>
|
|
24
24
|
<el-button type="primary" v-if="isSeniorBtn" size="small" @click="seniorSearch" style="margin-left: 5px;">高级搜索</el-button>
|
|
25
|
-
<el-button size="small" icon="el-icon-refresh" @click="refresh" style="margin-left: 5px;"></el-button>
|
|
25
|
+
<el-button plain size="small" icon="el-icon-refresh" @click="refresh" style="margin-left: 5px;"></el-button>
|
|
26
26
|
</el-form-item>
|
|
27
27
|
</el-form>
|
|
28
28
|
</div>
|
|
@@ -35,7 +35,15 @@ export default {
|
|
|
35
35
|
isSeniorBtn: {
|
|
36
36
|
type: Boolean,
|
|
37
37
|
default: false
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
|
+
showButton: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
searchIcon: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ''
|
|
46
|
+
},
|
|
39
47
|
},
|
|
40
48
|
methods: {
|
|
41
49
|
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
:reserve-selection="reserveSelection"
|
|
32
32
|
v-if="selection"
|
|
33
33
|
></el-table-column>
|
|
34
|
+
<!-- 序号 -->
|
|
35
|
+
<el-table-column
|
|
36
|
+
v-if="showIndex"
|
|
37
|
+
type="index"
|
|
38
|
+
width="50">
|
|
39
|
+
</el-table-column>
|
|
34
40
|
<template v-for="(col, index) in column">
|
|
35
41
|
<el-table-column
|
|
36
42
|
v-if="!col['type'] && (!col.headerList || col.headerList.length === 0)"
|
|
@@ -255,6 +261,10 @@ export default {
|
|
|
255
261
|
cellStyle: {
|
|
256
262
|
|
|
257
263
|
},
|
|
264
|
+
showIndex: {
|
|
265
|
+
type: Boolean,
|
|
266
|
+
default: false
|
|
267
|
+
}
|
|
258
268
|
|
|
259
269
|
},
|
|
260
270
|
data() {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
class="mec-tags"
|
|
4
4
|
:style="{ width: `calc(100% - ${btnWidth}px)` }"
|
|
5
5
|
ref="tagsContainer"
|
|
6
|
+
v-if="tagsData.length > 0"
|
|
6
7
|
>
|
|
7
8
|
<el-button
|
|
8
9
|
icon="el-icon-arrow-left"
|
|
@@ -67,6 +68,9 @@ export default {
|
|
|
67
68
|
}
|
|
68
69
|
},
|
|
69
70
|
mounted() {
|
|
71
|
+
this.$nextTick(() => {
|
|
72
|
+
this.updateTagsContainerWidth();
|
|
73
|
+
})
|
|
70
74
|
this.updateTagsContainerWidth();
|
|
71
75
|
window.addEventListener('resize', this.updateTagsContainerWidth);
|
|
72
76
|
},
|
|
@@ -94,8 +98,8 @@ export default {
|
|
|
94
98
|
},
|
|
95
99
|
|
|
96
100
|
updateTagsContainerWidth() {
|
|
97
|
-
this.tagsContainerWidth = this.$refs.tagsContainer.offsetWidth;
|
|
98
|
-
const boxWidth = this.$refs.tagsBox.scrollWidth;
|
|
101
|
+
this.tagsContainerWidth = this.$refs.tagsContainer && this.$refs.tagsContainer.offsetWidth;
|
|
102
|
+
const boxWidth = this.$refs.tagsBox && this.$refs.tagsBox.scrollWidth;
|
|
99
103
|
if (boxWidth > this.tagsContainerWidth) {
|
|
100
104
|
this.showArrow = true;
|
|
101
105
|
} else {
|
|
@@ -80,6 +80,10 @@ export default {
|
|
|
80
80
|
.icon-btn {
|
|
81
81
|
display: flex;
|
|
82
82
|
align-items: center;
|
|
83
|
+
i {
|
|
84
|
+
font-size: 18px;
|
|
85
|
+
color: #1890ff;
|
|
86
|
+
}
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
.icon-btn /deep/.icon {
|
|
@@ -87,6 +91,7 @@ export default {
|
|
|
87
91
|
align-items: center;
|
|
88
92
|
user-select: none;
|
|
89
93
|
cursor: pointer;
|
|
94
|
+
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
.view-btn {
|