gyyg-components 0.3.9 → 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 +95 -95
- package/lib/gyyg-components.umd.js +95 -95
- package/lib/gyyg-components.umd.min.js +95 -95
- package/package.json +1 -1
- package/src/components/MecForm/MecForm.vue +1 -0
- package/src/components/MecTable/MecTable.vue +10 -0
- package/src/components/MecTags/MecTags.vue +5 -2
- package/src/otherComponents/styleText.vue +1 -0
package/package.json
CHANGED
|
@@ -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() {
|
|
@@ -68,6 +68,9 @@ export default {
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
mounted() {
|
|
71
|
+
this.$nextTick(() => {
|
|
72
|
+
this.updateTagsContainerWidth();
|
|
73
|
+
})
|
|
71
74
|
this.updateTagsContainerWidth();
|
|
72
75
|
window.addEventListener('resize', this.updateTagsContainerWidth);
|
|
73
76
|
},
|
|
@@ -95,8 +98,8 @@ export default {
|
|
|
95
98
|
},
|
|
96
99
|
|
|
97
100
|
updateTagsContainerWidth() {
|
|
98
|
-
this.tagsContainerWidth = this.$refs.tagsContainer.offsetWidth;
|
|
99
|
-
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;
|
|
100
103
|
if (boxWidth > this.tagsContainerWidth) {
|
|
101
104
|
this.showArrow = true;
|
|
102
105
|
} else {
|