mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
feat(数据集): 数据集预览表格,当某个字段的内容过多时,单行显示,后面跟 ... ,点开时显示完整内容 #12802
This commit is contained in:
parent
7448dd06d5
commit
14cffed8c8
@ -411,6 +411,15 @@ const exportData = () => {
|
||||
useEmitt().emitter.emit('data-export-center', { activeName: 'IN_PROGRESS' })
|
||||
}
|
||||
|
||||
const rowClick = (_, __, event) => {
|
||||
const element = event.target.parentNode.parentNode
|
||||
if ([...element.classList].includes('no-hide')) {
|
||||
element.classList.remove('no-hide')
|
||||
return
|
||||
}
|
||||
element.classList.add('no-hide')
|
||||
}
|
||||
|
||||
const openMessageLoading = cb => {
|
||||
const iconClass = `el-icon-loading`
|
||||
const customClass = `de-message-loading de-message-export`
|
||||
@ -1017,8 +1026,10 @@ const getMenuList = (val: boolean) => {
|
||||
<template v-if="activeName === 'dataPreview'">
|
||||
<el-table
|
||||
v-loading="dataPreviewLoading"
|
||||
class="dataset-preview_table"
|
||||
header-class="header-cell"
|
||||
:data="tableData"
|
||||
@row-click="rowClick"
|
||||
key="dataPreview"
|
||||
border
|
||||
style="width: 100%; height: 100%"
|
||||
@ -1126,6 +1137,16 @@ const getMenuList = (val: boolean) => {
|
||||
<style lang="less" scoped>
|
||||
@import '@/style/mixin.less';
|
||||
|
||||
:deep(.dataset-preview_table) {
|
||||
.ed-table__body {
|
||||
.ed-table__row:not(.no-hide) {
|
||||
.cell {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ed-table {
|
||||
--ed-table-header-bg-color: #f5f6f7;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user