| | |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | :span-method="spanMethod" |
| | | stripe |
| | | :stripe="stripe" |
| | | style="width: 100%" |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | |
| | | <!-- 可点击的文字 --> |
| | | <div |
| | | v-else-if="item.dataType == 'link'" |
| | | class="cell link" |
| | | class="cell" |
| | | style="width: 100%" |
| | | @click="goLink(scope.row, item.linkMethod)" |
| | | @click="goLink(scope.row, item.linkEvent)" |
| | | > |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span class="link" v-if="!item.formatData"> |
| | | {{ scope.row[item.prop] }} |
| | | </span> |
| | | </div> |
| | | <!-- 默认纯展示数据 --> |
| | | <div v-else class="cell" style="width: 100%"> |
| | |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | stripe: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | headerCellStyle: { |
| | | type: Object, |
| | | default: () => { |
| | |
| | | return (this.page.current - 1) * this.page.size + index + 1; |
| | | }, |
| | | // 点击单元格link事件 |
| | | goLink(row, linkMethod) { |
| | | if (!linkMethod) { |
| | | goLink(row, linkEvent) { |
| | | if (!linkEvent) { |
| | | return this.$message.warning("请配置lingk事件"); |
| | | } |
| | | this.$parent[linkMethod](row); |
| | | linkEvent.vueComponent[linkEvent.method](row); |
| | | }, |
| | | // 合并单元格 |
| | | calculateSpanInfo() { |