fix(工作台): 名称过长导致超出显示范围 (#17087)

* fix(工作台): 名称过长导致超出显示范围

* fix(查询组件): 移动端查询组件异常 #17074
This commit is contained in:
dataeaseShu
2025-09-28 15:43:33 +08:00
committed by GitHub
parent 9317d48ef1
commit d38172cff1
4 changed files with 52 additions and 4 deletions

View File

@@ -10,11 +10,13 @@ import {
nextTick,
computed,
inject,
onBeforeUnmount,
onUnmounted,
Ref
} from 'vue'
import { enumValueObj, type EnumValue, getEnumValue } from '@/api/dataset'
import { cloneDeep, debounce } from 'lodash-es'
import eventBus from '@/utils/eventBus'
import { useEmitt } from '@/hooks/web/useEmitt'
import { useI18n } from '@/hooks/web/useI18n'
import colorFunctions from 'less/lib/less/functions/color.js'
@@ -725,6 +727,18 @@ const tagTextWidth = computed(() => {
return (getCustomWidth() - 65) / 2 - 20 + 'px'
})
const componentClick = () => {
mult.value?.blur()
single.value?.blur()
}
onMounted(() => {
eventBus.on('componentClick', componentClick)
})
onBeforeUnmount(() => {
eventBus.off('componentClick', componentClick)
})
defineExpose({
displayTypeChange,
mult,

View File

@@ -1,6 +1,18 @@
<script lang="ts" setup>
import { toRefs, onBeforeMount, type PropType, type Ref, inject, computed, nextTick } from 'vue'
import {
toRefs,
onBeforeMount,
ref,
onMounted,
onBeforeUnmount,
type PropType,
type Ref,
inject,
computed,
nextTick
} from 'vue'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import eventBus from '@/utils/eventBus'
import { storeToRefs } from 'pinia'
import { useI18n } from '@/hooks/web/useI18n'
interface SelectConfig {
@@ -119,6 +131,20 @@ const handleKeyEnter = ($event: any = {}) => {
const handleInnerMouseDown = e => {
e.stopPropagation()
}
const pre = ref()
const next = ref()
const componentClick = () => {
pre.value?.blur()
next.value?.blur()
}
onMounted(() => {
eventBus.on('componentClick', componentClick)
})
onBeforeUnmount(() => {
eventBus.off('componentClick', componentClick)
})
</script>
<template>
@@ -143,6 +169,7 @@ const handleInnerMouseDown = e => {
:style="selectStyle"
:placeholder="placeholderText"
@blur="handleValueChange"
ref="pre"
@keydown.enter.exact.prevent="($event: any) => handleKeyEnter($event)"
class="condition-value-input"
v-model="config.conditionValueF"
@@ -167,6 +194,7 @@ const handleInnerMouseDown = e => {
<el-input
:style="selectStyle"
@blur="handleValueChange"
ref="next"
:placeholder="placeholderText"
@keydown.enter.exact.prevent="($event: any) => handleKeyEnter($event)"
class="condition-value-input"

View File

@@ -182,8 +182,12 @@ defineExpose({
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="resetForm(dingtalkForm)">{{ t('common.cancel') }}</el-button>
<el-button :disabled="!state.form.id || !state.form.domain" @click="validateHandlerOnly">
<el-button secondary @click="resetForm(dingtalkForm)">{{ t('common.cancel') }}</el-button>
<el-button
secondary
:disabled="!state.form.id || !state.form.domain"
@click="validateHandlerOnly"
>
{{ t('commons.validate') }}
</el-button>
<el-button type="primary" @click="submitForm(dingtalkForm)">

View File

@@ -311,7 +311,9 @@ loadShareBase()
</el-icon>
<div class="info">
<div class="name-role flex-align-center">
<span class="name">{{ userStore.getName }}</span>
<span :title="userStore.getName" style="max-width: 200px" class="name ellipsis">{{
userStore.getName
}}</span>
<span class="role main-btn" />
</div>
<span v-if="userStore.getUid" class="id"> {{ `ID: ${userStore.getUid}` }} </span>