vsyswin-ui 0.3.22 → 0.3.23

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": "vsyswin-ui",
3
- "version": "0.3.22",
3
+ "version": "0.3.23",
4
4
  "main": "lib/vsyswin-ui.umd.min.js",
5
5
  "private": false,
6
6
  "description": "Vue2.x的应用组件库.",
@@ -3,10 +3,11 @@
3
3
  <!--筛选下拉-->
4
4
  <drag-set v-if="showDragSet" :listConf='columnList' @save="dragChange" />
5
5
  <el-table border stripe class="cusTable" :row-key="rowKey" :show-summary="showSummary" size="medium"
6
+ :row-class-name="headerClass"
6
7
  :summary-method="customSum ? getSummaries : getSummariesNum" ref="cusTable" height='100%' :indent="indent"
7
8
  :lazy="lazy" :load="load" :tree-props="treeProps" v-bind="attrs" :default-expand-all="defaultExpandAll"
8
9
  :expand-row-keys="expandRowKeys" @sort-change="handleSortChange" @selection-change="handleSelectionChange"
9
- @select-all="handleSelectAll" @select="handleSelect" @expand-change="handleExpandChange"
10
+ @select-all="handleSelectAll" @row-click="handleRowClick" @select="handleSelect" @expand-change="handleExpandChange"
10
11
  @header-dragend="handleHeaderDragend">
11
12
  <slot name="start"></slot>
12
13
  <el-table-column v-for="(item, index) in columnData" :key="item.prop + index" :prop="item.prop" :label="item.label"
@@ -143,6 +144,10 @@ export default {
143
144
  },
144
145
  // 列表高度
145
146
  height: {},
147
+ handleClassName: {
148
+ type: Function,
149
+ default: () => { }
150
+ },
146
151
  // 列表内容转换的方法
147
152
  transContent: {
148
153
  type: Function,
@@ -376,6 +381,13 @@ export default {
376
381
  this.selection = selection;
377
382
  this.$emit('selection-change', selection);
378
383
  },
384
+ headerClass ({ row, rowIndex }) {
385
+ return this.handleClassName(row, rowIndex);
386
+ },
387
+ // 当某个单元格被点击时会触发该事件
388
+ handleRowClick (row, column, cell, event) {
389
+ this.$emit('row-click', row, column, cell, event);
390
+ },
379
391
  // 当用户手动勾选全选 Checkbox 时触发的事件
380
392
  handleSelectAll(selection) {
381
393
  this.$emit('select-all', selection);