sone-ui-component-3.2.4 2.1.18 → 2.1.20

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": "sone-ui-component-3.2.4",
3
- "version": "2.1.18",
3
+ "version": "2.1.20",
4
4
  "private": false,
5
5
  "main": "lib/sone-ui.common.js",
6
6
  "files": [
@@ -11,21 +11,19 @@
11
11
  <div class="table-menu-right" v-if="showMenuRight">
12
12
  <slot name="menuRight"></slot>
13
13
  <el-dropdown :hide-on-click="false" v-if="showColumnHandleBtn" @visible-change="onColumnVisibleMenu">
14
- <icon-button
14
+ <IconButton
15
15
  :iconfont="false"
16
16
  :tooltipDisabled="tooltipDisabled"
17
17
  class="sort-btn"
18
18
  content="列展示"
19
- icon="el-icon-s-operation"
20
- ></icon-button>
19
+ icon="el-icon-s-operation" />
21
20
  <ColumnTransfer
22
21
  ref="column-transfer"
23
22
  :columns.sync="internalColumns"
24
23
  @dropdownList="dropdownList"
25
24
  @handleCheckedColumnChange="handleCheckedColumnChange"
26
25
  @selectFixed="selectFixed"
27
- @resetColumnTransfer="$emit('resetColumnTransfer')"
28
- ></ColumnTransfer>
26
+ @resetColumnTransfer="$emit('resetColumnTransfer')" />
29
27
  </el-dropdown>
30
28
  <slot name="transferRight"></slot>
31
29
  </div>
@@ -112,16 +110,16 @@
112
110
  </template>
113
111
  </el-table-column>
114
112
  <el-table-column
115
- :width="option.indexWidth||50"
113
+ v-if="option.index"
116
114
  fixed
117
- :label="option.indexLabel ? option.indexLabel : '序号'"
118
115
  type="index"
116
+ :width="option.indexWidth||50"
117
+ :label="option.indexLabel ? option.indexLabel : '序号'"
119
118
  :index="indexMethod"
120
- :resizable="option.hasOwnProperty('indexResizable') ? option.indexResizable : true"
121
- v-if="option.index"
122
119
  ></el-table-column>
123
120
  <el-table-column
124
- v-if="option.hasOwnProperty('selection') ? option.selection : false"
121
+ v-if="option.selection"
122
+ fixed
125
123
  type="selection"
126
124
  :width="option.selectionWidth || 45">
127
125
  </el-table-column>
@@ -212,9 +210,10 @@
212
210
  <script>
213
211
  import { deepClone } from 'sone-ui-component/src/utils/util'
214
212
  import ColumnTransfer from './columnTransfer.vue'
213
+ import IconButton from "sone-ui-component/packages/IconButton/index.vue";
215
214
  export default {
216
215
  name: "SoneNormalTable",
217
- components: { ColumnTransfer },
216
+ components: { ColumnTransfer, IconButton },
218
217
  props: {
219
218
  showMenuLeft: {
220
219
  type: Boolean,
@@ -260,7 +259,7 @@
260
259
  indexWidth: 70,
261
260
  height: 'auto',
262
261
  maxHeight: 'auto',
263
-
262
+ showSummary: false,
264
263
  }
265
264
  }
266
265
  },
@@ -437,8 +436,8 @@
437
436
  let _columns = deepClone(this.internalColumns);
438
437
  const sums = [];
439
438
  // 固定列会导致窜行 待改
440
- if ( !!this.operation ) sums.push(this.option.sumText || '合计')
441
- if ( this.option.indexCheck || this.option.index ) {
439
+ if (!!this.operation ) sums.push(this.option.sumText || '合计')
440
+ if (this.option.selection) {
442
441
  !!this.operation ? sums.push('') : sums.push('合计')
443
442
  }
444
443
  _columns.forEach((column, index) => {
@@ -476,14 +475,9 @@
476
475
 
477
476
  // class
478
477
  tableRowClassName({ row, rowIndex }) {
479
- let rowClass = ''
480
478
  if (this.option.rowClassName) {
481
- rowClass = this.option.rowClassName({ row, rowIndex })
482
- }
483
- if(this.option.indexCheck === true && row.checked === true && !this.option['clickRowNoCheck']){
484
- return `current-row ${rowClass}`;
485
- }
486
- return rowClass;
479
+ return this.option.rowClassName({ row, rowIndex })
480
+ }else return ''
487
481
  },
488
482
  handButton(functionName, scope, id) {
489
483
  this.$emit(functionName, scope, id)
package/src/index.js CHANGED
@@ -57,7 +57,7 @@ if (typeof window !== 'undefined' && window.Vue) {
57
57
  }
58
58
 
59
59
  export default {
60
- version: '2.1.18',
60
+ version: '2.1.20',
61
61
  locale: locale.use,
62
62
  i18n: locale.i18n,
63
63
  install,
@@ -26,12 +26,6 @@
26
26
  .el-table th{
27
27
  position:relative;
28
28
  }
29
- .el-table th > .cell{
30
- // border-right: 1px solid #D9D9D9!important;
31
- }
32
- .el-table__header-wrapper tr th:nth-last-of-type(2) .cell{
33
- // border-right: none !important;
34
- }
35
29
  .el-table .sort-caret.descending{
36
30
  bottom: -1px!important;
37
31
  }
@@ -49,9 +43,9 @@
49
43
  }
50
44
  .el-table-column--selection{
51
45
  .cell{
52
- display: flex;
53
- justify-content: center;
54
- align-items: center;
46
+ display: flex !important;
47
+ justify-content: center !important;
48
+ align-items: center !important;
55
49
  }
56
50
  }
57
51
 
@@ -76,7 +70,6 @@
76
70
  }
77
71
  .table-menu-left {
78
72
  width:50%;
79
- // height: 48px;
80
73
  float: left;
81
74
  }
82
75
  .table-menu-right {
@@ -125,9 +118,7 @@
125
118
  position: absolute;
126
119
  left: -7px;
127
120
  font-size: 14px;
128
- /*color: #CCCCCC;*/
129
121
  &:hover {
130
- /*font-weight: bold;*/
131
122
  opacity: 0.8;
132
123
  }
133
124
  &.el-icon-caret-top {
@@ -322,14 +313,12 @@
322
313
  }
323
314
  }
324
315
 
325
-
326
316
  // 调整表格超出样式
327
317
  .over_title{
328
318
  overflow: hidden;
329
319
  white-space: nowrap;
330
320
  text-overflow: ellipsis;
331
321
  }
332
-
333
322
  .over_popper{
334
323
  max-width:150px;
335
324
  }