enhanced interaction for SpiderList

This commit is contained in:
Marvin Zhang
2019-08-05 20:01:47 +08:00
parent 7ac30ce392
commit 5bc7085edb

View File

@@ -145,7 +145,9 @@
<el-table :data="filteredTableData"
class="table"
:header-cell-style="{background:'rgb(48, 65, 86)',color:'white'}"
border>
border
@row-click="onRowClick"
>
<template v-for="col in columns">
<el-table-column v-if="col.name === 'type'"
:key="col.name"
@@ -494,6 +496,11 @@ export default {
getTime (str) {
if (!str || str.match('^0001')) return 'NA'
return dayjs(str).format('YYYY-MM-DD HH:mm:ss')
},
onRowClick (row, event, column) {
if (column.label !== this.$t('Action')) {
this.onView(row)
}
}
},
created () {
@@ -584,3 +591,9 @@ export default {
}
</style>
<style scoped>
.el-table >>> tr {
cursor: pointer;
}
</style>