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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gyyg-components",
3
- "version": "0.3.09",
3
+ "version": "0.3.10",
4
4
  "private": false,
5
5
  "main": "lib/gyyg-components.umd.js",
6
6
  "scripts": {
@@ -29,6 +29,7 @@
29
29
  v-model="item.value"
30
30
  :value.sync="item.value"
31
31
  :otherValue.sync="item.otherValue"
32
+ :delIdList.sync="item.delIdList"
32
33
  v-bind="item"
33
34
  v-on="item.componentListeners"
34
35
  ></component>
@@ -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 {
@@ -35,6 +35,7 @@ export default {
35
35
  }
36
36
  /deep/ .el-button {
37
37
  cursor: text;
38
+ font-weight: normal;
38
39
  &.is-plain:focus, &.is-plain:hover {
39
40
  background: #FFF;
40
41
  border: 1px solid #DCDFE6;