iov-design 2.15.43 → 2.15.45

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.
@@ -118,11 +118,12 @@ export const cellForced = {
118
118
 
119
119
  export function defaultRenderCell(h, { row, column, $index }) {
120
120
  const property = column.property;
121
+ const emptyValuePlaceholder = column.emptyValuePlaceholder;
121
122
  const value = property && getPropByPath(row, property).v;
122
123
  if (column && column.formatter) {
123
124
  return column.formatter(row, column, value, $index);
124
125
  }
125
- return value;
126
+ return emptyValuePlaceholder && ['', undefined, null].includes(value) ? emptyValuePlaceholder : value;
126
127
  }
127
128
 
128
129
  export function treeCellPrefix(h, { row, treeNode, store }) {
@@ -56,7 +56,8 @@ export default {
56
56
  validator(val) {
57
57
  return val.every(order => ['ascending', 'descending', null].indexOf(order) > -1);
58
58
  }
59
- }
59
+ },
60
+ emptyValuePlaceholder: String
60
61
  },
61
62
 
62
63
  data() {
@@ -275,7 +276,8 @@ export default {
275
276
  // sort 相关属性
276
277
  sortable: sortable,
277
278
  // index 列
278
- index: this.index
279
+ index: this.index,
280
+ emptyValuePlaceholder: this.emptyValuePlaceholder || ''
279
281
  };
280
282
 
281
283
  const basicProps = ['columnKey', 'label', 'className', 'labelClassName', 'type', 'renderHeader', 'formatter', 'fixed', 'resizable'];
@@ -85,14 +85,14 @@
85
85
  transition: 0.3s width ease-in-out, 0.3s padding-left ease-in-out, 0.3s padding-right ease-in-out;
86
86
  }
87
87
 
88
- .el-list-enter-active,
89
- .el-list-leave-active {
90
- transition: all 1s;
91
- }
92
- .el-list-enter, .el-list-leave-active {
93
- opacity: 0;
94
- transform: translateY(-30px);
95
- }
88
+ // .el-list-enter-active,
89
+ // .el-list-leave-active {
90
+ // transition: all 1s;
91
+ // }
92
+ // .el-list-enter, .el-list-leave-active {
93
+ // opacity: 0;
94
+ // transform: translateY(-30px);
95
+ // }
96
96
 
97
97
  .el-opacity-transition {
98
98
  transition: opacity .3s cubic-bezier(.55,0,.1,1);
@@ -212,6 +212,7 @@
212
212
  padding-left: 16px;
213
213
  padding-right: 16px;
214
214
  width: 100%;
215
+ font-weight: 500;
215
216
 
216
217
  &.highlight {
217
218
  color: $--color-primary;
package/src/index.js CHANGED
@@ -212,7 +212,7 @@ if (typeof window !== 'undefined' && window.Vue) {
212
212
  }
213
213
 
214
214
  export default {
215
- version: '2.15.43',
215
+ version: '2.15.45',
216
216
  locale: locale.use,
217
217
  i18n: locale.i18n,
218
218
  install,