mali-applet-ui 1.0.120 → 1.0.122
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.
|
@@ -193,7 +193,7 @@ export default {
|
|
|
193
193
|
const flowHandlers = this.flowItems.map(item => {
|
|
194
194
|
|
|
195
195
|
return {
|
|
196
|
-
copierList: mergeMemberIdsByRoleId(item.copyUsers || []),
|
|
196
|
+
copierList: this.mergeMemberIdsByRoleId(item.copyUsers || []),
|
|
197
197
|
flowItemSettingId: item.id,
|
|
198
198
|
userList: this.mergeMemberIdsByRoleId(item.users || [])
|
|
199
199
|
}
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
},
|
|
59
59
|
computed: {
|
|
60
60
|
percNum () {
|
|
61
|
-
return Math.ceil(XEUtils.toNumber(this.value) / (XEUtils.toNumber(this.max) / 100))
|
|
61
|
+
return Math.ceil(XEUtils.toNumber(this.value) / (Math.max(1, XEUtils.toNumber(this.max)) / 100))
|
|
62
62
|
},
|
|
63
63
|
barOpts () {
|
|
64
64
|
return Object.assign({}, this.barStyle)
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</view>
|
|
23
23
|
<view v-if="headerData && headerData.length" class="table-body-top">
|
|
24
24
|
<view class="table-tr" v-for="(row, rowIndex) in headerData" :key="rowIndex">
|
|
25
|
-
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="
|
|
25
|
+
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="{width: getColWidth(column)}" @click="cellHeaderTdClick({ type: 'header', row, rowIndex, column, columnIndex })">
|
|
26
26
|
<view :class="['table-cell', column.align ? `align-${column.align}` : '', getHeaderCellClass({ type: 'header', row, rowIndex, column, columnIndex })]">
|
|
27
27
|
<ml-amount-text v-if="column.cellRender && column.cellRender.name === 'MlAmountText'" :value="row[column.field]" :simplify="column.cellRender.props ? column.cellRender.props.simplify : false"></ml-amount-text>
|
|
28
28
|
<text v-else>{{ getHeaderCellValue({ type: 'header', row, rowIndex, column, columnIndex }) }}</text>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</view>
|
|
34
34
|
<view class="table-body-contnet">
|
|
35
35
|
<view class="table-tr" v-for="(row, rowIndex) in tableData" :key="rowIndex">
|
|
36
|
-
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="
|
|
36
|
+
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="{width: getColWidth(column), height: tdHeight}" @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
39
|
<text v-else-if="column.cellRender && column.cellRender.name === 'Underline'" class="is-underline">{{ getCellValue({ type: 'body', row, rowIndex, column, columnIndex }) }}</text>
|
|
@@ -123,6 +123,9 @@ export default {
|
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
computed: {
|
|
126
|
+
rowOpts () {
|
|
127
|
+
return this.rowConfig ? { ...this.rowConfig } : {}
|
|
128
|
+
},
|
|
126
129
|
sortOpts () {
|
|
127
130
|
return this.sortConfig ? { ...this.sortConfig } : {}
|
|
128
131
|
},
|
|
@@ -131,6 +134,9 @@ export default {
|
|
|
131
134
|
},
|
|
132
135
|
colMinWidth () {
|
|
133
136
|
return Math.max(20, XEUtils.floor(100 / this.tableColumn.length, 2))
|
|
137
|
+
},
|
|
138
|
+
tdHeight () {
|
|
139
|
+
return this.rowOpts.height ? `${this.rowOpts.height};` : '84rpx'
|
|
134
140
|
}
|
|
135
141
|
},
|
|
136
142
|
watch: {
|
|
@@ -222,14 +228,6 @@ export default {
|
|
|
222
228
|
}
|
|
223
229
|
return ''
|
|
224
230
|
},
|
|
225
|
-
getColTdStyles (column) {
|
|
226
|
-
const wSty = `width: ${this.getColWidth(column)};`
|
|
227
|
-
let hSty = ''
|
|
228
|
-
if (this.rowConfig && this.rowConfig.height) {
|
|
229
|
-
hSty = `height: ${this.rowConfig.height};`
|
|
230
|
-
}
|
|
231
|
-
return `${wSty || ''}${hSty || ''}`
|
|
232
|
-
},
|
|
233
231
|
sort (fieldOrColumn, order) {
|
|
234
232
|
const column = fieldOrColumn ? this.tableColumn.find(item => item.colid === fieldOrColumn.colid || item.field === fieldOrColumn) : null
|
|
235
233
|
if (column) {
|
|
@@ -284,7 +282,7 @@ export default {
|
|
|
284
282
|
.ml-table {
|
|
285
283
|
display: block;
|
|
286
284
|
width: 100%;
|
|
287
|
-
font-size:
|
|
285
|
+
font-size: $ml-base-font-size;
|
|
288
286
|
box-shadow: 0rpx 0rpx 10rpx -3rpx rgba(0, 0, 0, 0.2);
|
|
289
287
|
background: #fff;
|
|
290
288
|
.ml-table-warpper {
|
|
@@ -297,11 +295,15 @@ export default {
|
|
|
297
295
|
}
|
|
298
296
|
.table-body-top {
|
|
299
297
|
background: #fff;
|
|
298
|
+
.table-td {
|
|
299
|
+
height: 84rpx;
|
|
300
|
+
line-height: 84rpx;
|
|
301
|
+
}
|
|
300
302
|
}
|
|
301
303
|
.table-th {
|
|
302
304
|
display: inline-flex;
|
|
303
|
-
height:
|
|
304
|
-
line-height:
|
|
305
|
+
height: 88rpx;
|
|
306
|
+
line-height: 88rpx;
|
|
305
307
|
color: #000000;
|
|
306
308
|
text-align: center;
|
|
307
309
|
overflow: hidden;
|
|
@@ -316,13 +318,16 @@ export default {
|
|
|
316
318
|
}
|
|
317
319
|
}
|
|
318
320
|
.th-title {
|
|
321
|
+
display: block;
|
|
322
|
+
width: 100%;
|
|
323
|
+
padding: 0 8rpx;
|
|
319
324
|
overflow: hidden;
|
|
320
325
|
text-overflow: ellipsis;
|
|
321
326
|
white-space: nowrap;
|
|
322
327
|
}
|
|
323
328
|
}
|
|
324
329
|
.table-tr {
|
|
325
|
-
display:
|
|
330
|
+
display: inline-flex;
|
|
326
331
|
white-space: nowrap;
|
|
327
332
|
width: 100%;
|
|
328
333
|
}
|
|
@@ -345,7 +350,9 @@ export default {
|
|
|
345
350
|
}
|
|
346
351
|
.table-td {
|
|
347
352
|
display: inline-flex;
|
|
348
|
-
|
|
353
|
+
flex-direction: row;
|
|
354
|
+
align-items: center;
|
|
355
|
+
padding: 0 10rpx;
|
|
349
356
|
text-align: center;
|
|
350
357
|
color: rgba(39, 42, 48, 0.65);
|
|
351
358
|
border-bottom: 1px solid rgba(126, 134, 142, 0.16);
|