mali-applet-ui 1.0.144 → 1.0.145
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.
|
@@ -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="{width: getColWidth(column), height:
|
|
36
|
+
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="{width: getColWidth(column), height: getColHeight(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
39
|
<text v-else-if="column.cellRender && column.cellRender.name === 'Underline'" class="is-underline">{{ getCellValue({ type: 'body', row, rowIndex, column, columnIndex }) }}</text>
|
|
@@ -143,9 +143,6 @@ export default {
|
|
|
143
143
|
},
|
|
144
144
|
colMinWidth () {
|
|
145
145
|
return Math.max(20, XEUtils.floor(100 / this.tableColumn.length, 2))
|
|
146
|
-
},
|
|
147
|
-
tdHeight () {
|
|
148
|
-
return this.rowOpts.height ? `${this.rowOpts.height};` : (this.showOverflow ? '84rpx' : '')
|
|
149
146
|
}
|
|
150
147
|
},
|
|
151
148
|
watch: {
|
|
@@ -204,7 +201,8 @@ export default {
|
|
|
204
201
|
const { row, column } = params
|
|
205
202
|
const cellValue = row[column.field]
|
|
206
203
|
const clss = []
|
|
207
|
-
|
|
204
|
+
const showOverflow = XEUtils.isBoolean(column.showOverflow) ? column.showOverflow : this.showOverflow
|
|
205
|
+
if (showOverflow) {
|
|
208
206
|
clss.push('is-ellipsis')
|
|
209
207
|
}
|
|
210
208
|
if (this.cellClass) {
|
|
@@ -224,6 +222,10 @@ export default {
|
|
|
224
222
|
}
|
|
225
223
|
return XEUtils.eqNull(cellValue) ? '' : cellValue
|
|
226
224
|
},
|
|
225
|
+
getColHeight (column) {
|
|
226
|
+
const showOverflow = XEUtils.isBoolean(column.showOverflow) ? column.showOverflow : this.showOverflow
|
|
227
|
+
return this.rowOpts.height ? `${this.rowOpts.height};` : (showOverflow ? '84rpx' : '')
|
|
228
|
+
},
|
|
227
229
|
getColWidth (column) {
|
|
228
230
|
if (column.width) {
|
|
229
231
|
if (isNaN(column.width)) {
|