n20-common-lib 3.0.24 → 3.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "3.0.24",
3
+ "version": "3.0.25",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -24,7 +24,6 @@ function flattenObject(obj, prefix = '', result = {}) {
24
24
  }
25
25
  return result
26
26
  }
27
- console.log(vxeTable, 'vxeTable')
28
27
 
29
28
  vxeTable.setConfig({
30
29
  size: 'small',
@@ -70,6 +70,33 @@
70
70
  :title="item.label"
71
71
  :field="item.prop"
72
72
  >
73
+ <template #header="{ column }">
74
+ <div
75
+ class="flex-box flex-v flex-c"
76
+ @mouseenter="hoverHeaderProp = item.prop"
77
+ @mouseleave="hoverHeaderProp = null"
78
+ >
79
+ <slot name="header" :column="column">{{ column.title }}</slot>
80
+ <i
81
+ v-if="item.tooltip"
82
+ class="n20-icon-xinxitishi vxe-table--column__icon m-l-ss"
83
+ v-title="item.tooltip"
84
+ ></i>
85
+ <!-- 已固定列(fixed='left'):hover 时显示 lock 图标,点击取消固定 -->
86
+ <i
87
+ v-if="item.fixed === 'left'"
88
+ class="iconfont icon-lock vxe-table--column__icon m-l-ss pointer color-primary"
89
+ @click.stop="unlockColumn(item)"
90
+ ></i>
91
+ <!-- 未固定列(且非静态列):hover 时显示 unlock 图标,点击设为固定 -->
92
+ <i
93
+ v-if="!item.fixed && !item.static"
94
+ v-show="hoverHeaderProp === item.prop"
95
+ class="iconfont icon-unlock vxe-table--column__icon m-l-ss pointer"
96
+ @click.stop="lockColumn(item)"
97
+ ></i>
98
+ </div>
99
+ </template>
73
100
  <template slot-scope="scope">
74
101
  <renderer :render-content="item.render" :scope="scope" />
75
102
  </template>
@@ -308,7 +335,7 @@ export default {
308
335
  },
309
336
  showColumn: {
310
337
  type: Boolean,
311
- default: true
338
+ default: false
312
339
  },
313
340
  // 数据更新时是否自动清空已选
314
341
  clearSelect: {