refactor(图表): 视图详情表格关闭滚动

This commit is contained in:
wisonic-s 2024-07-03 14:40:18 +08:00
parent 1b2ff16419
commit 0b8442613f

View File

@ -142,12 +142,13 @@ const { dvInfo, editMode } = storeToRefs(dvMainStore)
const exportLoading = ref(false) const exportLoading = ref(false)
const sourceViewType = ref() const sourceViewType = ref()
const activeName = ref('left') const activeName = ref('left')
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = { const DETAIL_CHART_ATTR: DeepPartial<ChartObj> = {
render: 'antv', render: 'antv',
type: 'table-info', type: 'table-info',
customAttr: { customAttr: {
basicStyle: { basicStyle: {
tableColumnMode: 'dialog' tableColumnMode: 'dialog',
tablePageMode: 'pull'
}, },
tableHeader: { tableHeader: {
tableHeaderBgColor: '#F8F8F9', tableHeaderBgColor: '#F8F8F9',
@ -161,6 +162,18 @@ const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
tooltip: { tooltip: {
show: false show: false
} }
},
senior: {
scrollCfg: {
open: false
}
}
}
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
senior: {
scrollCfg: {
open: false
}
} }
} }
@ -226,6 +239,8 @@ const dialogInit = (canvasStyle, view, item, opt) => {
canvasStyleData.value = canvasStyle canvasStyleData.value = canvasStyle
if (opt === 'details') { if (opt === 'details') {
if (!viewInfo.value.type?.includes('table')) { if (!viewInfo.value.type?.includes('table')) {
assign(viewInfo.value, DETAIL_CHART_ATTR)
} else {
assign(viewInfo.value, DETAIL_TABLE_ATTR) assign(viewInfo.value, DETAIL_TABLE_ATTR)
} }
dataDetailsOpt() dataDetailsOpt()