mali-applet-ui 0.0.89 → 0.0.90

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.
@@ -25,8 +25,25 @@ export default {
25
25
  .ml-card {
26
26
  margin-bottom: 20rpx;
27
27
  background: #fff;
28
- .ml-card-body {
29
- padding: 20rpx;
28
+ .ml-card-header {
29
+ display: flex;
30
+ flex-direction: row;
31
+ align-items: center;
32
+ min-height: 80rpx;
33
+ padding: 0 10rpx;
34
+ .ml-card-title {
35
+ position: relative;
36
+ padding-left: 20rpx;
37
+ &:before {
38
+ content: "";
39
+ position: absolute;
40
+ top: 0;
41
+ left: 0;
42
+ width: 8rpx;
43
+ height: 30rpx;
44
+ background: $uni-color-primary;
45
+ }
46
+ }
30
47
  }
31
48
  }
32
49
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-table" :class="className">
2
+ <view class="ml-table" :class="className || ''">
3
3
  <view v-if="$slots.top" class="ml-table-top-warpper">
4
4
  <slot name="top"></slot>
5
5
  </view>
@@ -8,7 +8,7 @@
8
8
  <view class="table-column-header">
9
9
  <view class="table-tr">
10
10
  <view v-for="(column, columnIndex) in tableColumn" :key="columnIndex" class="table-th" :class="{'is-sort': !!column.sortable}" :style="{width: getColWidth(column)}" @click="chickThEvent({ column, columnIndex })">
11
- <view class="th-title">{{column.title}}</view>
11
+ <view class="th-title">{{ column.title }}</view>
12
12
  <view class="th-sort" v-if="column.sortable">
13
13
  <view class="asc-btn" :class="{active: column.order === 'asc'}" @click.stop="sortEvent({column, columnIndex}, 'asc')">
14
14
  <ml-icon name="arrow-up-filling"></ml-icon>
@@ -36,7 +36,7 @@
36
36
  <view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="{width: getColWidth(column)}" @click="cellTdClick({ type: 'body', row, rowIndex, column, columnIndex })">
37
37
  <view :class="['table-cell', column.align ? `align-${column.align}` : '', getCellClass({ type: 'body', row, rowIndex, column, columnIndex })]">
38
38
  <text v-if="column.type === 'seq'">{{ rowIndex + 1 }}</text>
39
- <text v-else-if="column.cellRender && column.cellRender.name === 'Underline'" class="underline">{{ getCellValue({ type: 'body', row, rowIndex, column, columnIndex }) }}</text>
39
+ <text v-else-if="column.cellRender && column.cellRender.name === 'Underline'" class="is-underline">{{ getCellValue({ type: 'body', row, rowIndex, column, columnIndex }) }}</text>
40
40
  <ml-amount-text v-else-if="column.cellRender && column.cellRender.name === 'MlAmountText'" :value="row[column.field]" :simplify="column.cellRender.props ? column.cellRender.props.simplify : false"></ml-amount-text>
41
41
  <ml-progress-bar
42
42
  v-else-if="column.cellRender && column.cellRender.name === 'MlProgressBar'"
@@ -107,6 +107,9 @@ export default {
107
107
  },
108
108
  tableStyle () {
109
109
  return `height:${this.height ? (isNaN(this.height) ? this.height : `${this.height}rpx`) : ''}`
110
+ },
111
+ colMinWidth () {
112
+ return Math.max(20, XEUtils.floor(100 / this.tableColumn.length, 2))
110
113
  }
111
114
  },
112
115
  watch: {
@@ -177,7 +180,7 @@ export default {
177
180
  }
178
181
  return `${column.width}rpx`
179
182
  }
180
- return '30vw'
183
+ return `${this.colMinWidth}vw`
181
184
  },
182
185
  getTableHeight () {
183
186
  if (this.height) {
@@ -240,23 +243,18 @@ export default {
240
243
 
241
244
  <style lang="scss">
242
245
  .ml-table {
243
- margin-top: 20rpx;
244
246
  width: 100%;
245
247
  font-size: 26rpx;
246
248
  box-shadow: 0rpx 0rpx 10rpx -3rpx rgba(0, 0, 0, 0.2);
247
249
  background: #fff;
248
-
249
250
  .ml-table-warpper {
250
251
  overflow: auto;
251
252
  }
252
-
253
- // height: 90vh;
254
253
  .table-header {
255
254
  position: sticky;
256
255
  top: 0;
257
256
  z-index: 10;
258
257
  }
259
-
260
258
  .table-th {
261
259
  display: inline-block;
262
260
  height: 70rpx;
@@ -281,13 +279,11 @@ export default {
281
279
  white-space: nowrap;
282
280
  }
283
281
  }
284
-
285
282
  .table-tr {
286
283
  display: block;
287
284
  white-space: nowrap;
288
285
  width: 100%;
289
286
  }
290
-
291
287
  .table-th {
292
288
  position: relative;
293
289
  .th-sort {
@@ -306,7 +302,6 @@ export default {
306
302
  }
307
303
  }
308
304
  }
309
-
310
305
  .table-td {
311
306
  display: inline-block;
312
307
  padding: 20rpx 10rpx;
@@ -315,7 +310,6 @@ export default {
315
310
  border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
316
311
  box-sizing: border-box;
317
312
  }
318
-
319
313
  .table-cell {
320
314
  overflow: hidden;
321
315
  text-overflow: ellipsis;
@@ -327,10 +321,9 @@ export default {
327
321
  text-align: right;
328
322
  }
329
323
  }
330
- .underline {
324
+ .is-underline {
331
325
  text-decoration: underline;
332
326
  }
333
-
334
327
  .ml-table-bottom-warpper {
335
328
  display: flex;
336
329
  flex-direction: column;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-tabs" :class="className">
2
+ <view class="ml-tabs" :class="[className || '']">
3
3
  <view class="ml-tabs-header">
4
4
  <scroll-view scroll-x>
5
5
  <view class="ml-tabs-navs">
@@ -54,6 +54,10 @@ export default {
54
54
  .ml-tabs-navs {
55
55
  white-space: nowrap;
56
56
  }
57
+ .ml-tabs-header {
58
+ background: #fff;
59
+ margin-bottom: 20rpx;
60
+ }
57
61
  .ml-tabs-nav-item {
58
62
  position: relative;
59
63
  display: inline-block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",