Merge pull request #11259 from dataease/pr@dev-v2_st

fix(查询组件): 编辑查询条件时,关联图表的名称过长时无法查看完整名称
This commit is contained in:
dataeaseShu 2024-07-30 14:18:40 +08:00 committed by GitHub
commit a6e29b44af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 13 deletions

View File

@ -512,6 +512,19 @@ const labelStyle = computed(() => {
}
return style
})
const paddingTop = computed<CSSProperties>(() => {
return {
paddingTop: customStyle.layout !== 'horizontal' ? customStyle.nameboxSpacing + 22 + 'px' : '0'
}
})
const marginRight = computed<CSSProperties>(() => {
return {
marginRight: customStyle.layout === 'horizontal' ? customStyle.nameboxSpacing + 'px' : '8px'
}
})
const autoStyle = computed(() => {
return {
position: 'absolute',
@ -558,8 +571,8 @@ const autoStyle = computed(() => {
:key="ele.id"
v-for="(ele, index) in listVisible"
>
<div class="query-field">
<div class="label" :style="{ marginRight: `${customStyle.nameboxSpacing}px` }">
<div class="query-field" :style="paddingTop">
<div class="label" :style="marginRight">
<div class="label-wrapper" v-show="customStyle.labelShow">
<div class="label-wrapper-text" :style="labelStyle">
<el-tooltip effect="dark" :content="ele.name" placement="top">

View File

@ -1383,7 +1383,7 @@ defineExpose({
canvasViewInfo[field.componentId].title
}}</span></el-checkbox
>
<span class="dataset ellipsis">{{ field.name }}</span>
<span :title="field.name" class="dataset ellipsis">{{ field.name }}</span>
<el-select
@change="setParameters"
@focus="handleDialogClick"

View File

@ -177,9 +177,7 @@ import { nextTick, reactive, watch, onMounted, ref, computed } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { ElMessage } from 'element-plus-secondary'
import { useCache } from '@/hooks/web/useCache'
import router from '@/router'
import MarketPreviewV2 from '@/views/template-market/component/MarketPreviewV2.vue'
import { parseUrl } from '@/utils/ParseUrl'
import { imgUrlTrans } from '@/utils/imgUtils'
import CategoryTemplateV2 from '@/views/template-market/component/CategoryTemplateV2.vue'
import { interactiveStoreWithOut } from '@/store/modules/interactive'
@ -201,8 +199,7 @@ const close = () => {
}
const title = computed(() => (state.curPosition === 'branch' ? '模板中心' : '使用模板新建'))
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
const isIframe = computed(() => appStore.getIsIframe)
const isEmbedded = computed(() => appStore.getIsDataEaseBi || appStore.getIsIframe)
const state = reactive({
initReady: true,
curPosition: 'branch',
@ -472,7 +469,7 @@ const apply = template => {
'&templateParams=' +
encodeURIComponent(Base64.encode(JSON.stringify(templateTemplate)))
let newWindow = null
if (isDataEaseBi.value) {
if (isEmbedded.value) {
embeddedStore.clearState()
embeddedStore.setCreateType('template')
embeddedStore.setTemplateParams(
@ -491,11 +488,6 @@ const apply = template => {
)
return
}
if (isIframe.value) {
router.push(parseUrl(state.pid ? baseUrl + `&pid=${state.pid}` : baseUrl))
return
}
if (state.pid) {
newWindow = window.open(baseUrl + `&pid=${state.pid}`, '_blank')
} else {