mali-applet-ui 1.0.142 → 1.0.144

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.
@@ -97,6 +97,7 @@ export default {
97
97
  },
98
98
  clearEvent () {
99
99
  this.$emit('search')
100
+ this.$emit('query')
100
101
  },
101
102
  searchEvent () {
102
103
  this.$emit('search')
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-table" :class="className || ''">
2
+ <view class="ml-table" :class="[className || '', {'is-border': border, 'is-ellipsis' : showOverflow}]">
3
3
  <view v-if="$slots.top" class="ml-table-top-warpper">
4
4
  <slot name="top"></slot>
5
5
  </view>
@@ -93,6 +93,7 @@ export default {
93
93
  props: {
94
94
  loading: Boolean,
95
95
  className: String,
96
+ border: Boolean,
96
97
  height: [Number, String],
97
98
  headerData: Array,
98
99
  data: Array,
@@ -101,11 +102,15 @@ export default {
101
102
  loadStatus: String,
102
103
  rowConfig: {
103
104
  type: Object,
104
- defaule: () => ({})
105
+ default: () => ({})
105
106
  },
106
107
  sortConfig: {
107
108
  type: Object,
108
- defaule: () => ({})
109
+ default: () => ({})
110
+ },
111
+ showOverflow: {
112
+ type: Boolean,
113
+ default: true
109
114
  },
110
115
  headerCellClass: [String, Function],
111
116
  headerCellFormat: Function,
@@ -140,7 +145,7 @@ export default {
140
145
  return Math.max(20, XEUtils.floor(100 / this.tableColumn.length, 2))
141
146
  },
142
147
  tdHeight () {
143
- return this.rowOpts.height ? `${this.rowOpts.height};` : '84rpx'
148
+ return this.rowOpts.height ? `${this.rowOpts.height};` : (this.showOverflow ? '84rpx' : '')
144
149
  }
145
150
  },
146
151
  watch: {
@@ -198,13 +203,18 @@ export default {
198
203
  getCellClass (params) {
199
204
  const { row, column } = params
200
205
  const cellValue = row[column.field]
206
+ const clss = []
207
+ if (this.showOverflow) {
208
+ clss.push('is-ellipsis')
209
+ }
201
210
  if (this.cellClass) {
202
211
  if (XEUtils.isFunction(this.cellClass)) {
203
- return this.cellClass.call(this.currVM, { ...params, cellValue })
212
+ clss.push(this.cellClass.call(this.currVM, { ...params, cellValue }))
213
+ } else {
214
+ clss.push(`${this.cellClass}`)
204
215
  }
205
- return `${this.cellClass}`
206
216
  }
207
- return ''
217
+ return clss.join(' ')
208
218
  },
209
219
  getCellValue (params) {
210
220
  const { row, column } = params
@@ -289,6 +299,15 @@ export default {
289
299
  font-size: $ml-base-font-size;
290
300
  box-shadow: 0rpx 0rpx 10rpx -3rpx rgba(0, 0, 0, 0.2);
291
301
  background: #fff;
302
+ &.is-border {
303
+ .table-th,
304
+ .table-td {
305
+ border-right: 1px solid rgba(126, 134, 142, 0.16);
306
+ &:last-child {
307
+ border-right: 0;
308
+ }
309
+ }
310
+ }
292
311
  .ml-table-warpper {
293
312
  overflow: auto;
294
313
  }
@@ -338,6 +357,7 @@ export default {
338
357
  }
339
358
  .table-th {
340
359
  position: relative;
360
+ font-size: 28rpx;
341
361
  .th-sort {
342
362
  position: absolute;
343
363
  top: 50%;
@@ -363,11 +383,17 @@ export default {
363
383
  color: rgba(39, 42, 48, 0.65);
364
384
  border-bottom: 1px solid rgba(126, 134, 142, 0.16);
365
385
  box-sizing: border-box;
386
+ font-size: 24rpx;
387
+ min-height: 84rpx;
366
388
  }
367
389
  .table-cell {
368
- overflow: hidden;
369
- text-overflow: ellipsis;
370
- white-space: nowrap;
390
+ white-space: normal;
391
+ word-break: break-all;
392
+ &.is-ellipsis {
393
+ overflow: hidden;
394
+ text-overflow: ellipsis;
395
+ white-space: nowrap;
396
+ }
371
397
  &.align-left {
372
398
  text-align: left;
373
399
  }
@@ -383,6 +409,7 @@ export default {
383
409
  flex-direction: column;
384
410
  min-height: 70rpx;
385
411
  justify-content: center;
412
+ border-top: 1px solid rgba(126, 134, 142, 0.16);
386
413
  }
387
414
  }
388
415
  </style>
@@ -505,6 +505,7 @@ export default {
505
505
  ).then(res => {
506
506
  return {
507
507
  ...res,
508
+ isNew: true,
508
509
  [this.nameField]: res[this.nameField] || file.name,
509
510
  [this.typeField]: res[this.typeField] || fileSuffix,
510
511
  tempPath: file.path
@@ -512,6 +513,7 @@ export default {
512
513
  })
513
514
  }
514
515
  return {
516
+ isNew: true,
515
517
  [this.nameField]: file.name,
516
518
  [this.typeField]: file.extname,
517
519
  [this.urlField]: file.path,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.142",
3
+ "version": "1.0.144",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",