Merge pull request #11660 from dataease/pr@dev-v2@fix_url_field

Pr@dev v2@fix url field
This commit is contained in:
wisonic-s 2024-08-20 18:25:20 +08:00 committed by GitHub
commit 8da780eec3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 4 deletions

View File

@ -127,7 +127,7 @@ export class TableInfo extends S2ChartView<TableSheet> {
const style = this.configStyle(chart)
// 自适应列宽模式下URL 字段的宽度固定为 120
if (customAttr.basicStyle.tableColumnMode === 'adapt') {
const urlFields = fields.filter(field => axisMap[field.dataeaseName]?.deType === 7)
const urlFields = fields.filter(field => field.deType === 7)
style.colCfg.widthByFieldValue = urlFields?.reduce((p, n) => {
p[n.chartShowName ?? n.name] = 120
return p
@ -162,8 +162,8 @@ export class TableInfo extends S2ChartView<TableSheet> {
}
}
s2Options.dataCell = viewMeta => {
const deType = axisMap[viewMeta.valueField]?.deType
if (deType === 7 && chart.showPosition !== 'dialog') {
const field = fields.filter(f => f.dataeaseName === viewMeta.valueField)?.[0]
if (field?.deType === 7 && chart.showPosition !== 'dialog') {
return new ImageCell(viewMeta, viewMeta?.spreadsheet)
}
if (viewMeta.colIndex === 0 && s2Options.showSeriesNumber) {

View File

@ -81,7 +81,9 @@ const loadThemeStyle = () => {
class="drill-item"
@click="drillJump(index + 1)"
>
<span :style="{ color: textColor }">{{ filter.value[0] }}</span>
<span class="item-name" :style="{ color: textColor }" :title="filter.value[0]">{{
filter.value[0]
}}</span>
</el-breadcrumb-item>
</el-breadcrumb>
</div>
@ -96,6 +98,13 @@ const loadThemeStyle = () => {
}
.drill-item {
cursor: pointer;
.item-name {
max-width: 200px;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
.drill {
z-index: 1;