forked from github/dataease
Merge pull request #7202 from dataease/pr@dev-v2@fix_tab
fix: 修复预览时Tab组件也可修改标题问题
This commit is contained in:
commit
c5ed39bbba
@ -214,6 +214,7 @@ const deepScale = computed(() => scale.value / 100)
|
||||
:search-count="searchCount"
|
||||
:scale="deepScale"
|
||||
:disabled="true"
|
||||
:is-edit="false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<de-custom-tab
|
||||
v-model="editableTabsValue"
|
||||
@tab-add="addTab"
|
||||
:addable="isEdit"
|
||||
:addable="isEditMode"
|
||||
:font-color="fontColor"
|
||||
:active-color="activeColor"
|
||||
:border-color="noBorderColor"
|
||||
@ -25,7 +25,7 @@
|
||||
<template #label>
|
||||
<span :style="titleStyle(tabItem.name)">{{ tabItem.title }}</span>
|
||||
<el-dropdown
|
||||
v-if="dropdownShow"
|
||||
v-if="isEditMode"
|
||||
style="line-height: 4 !important"
|
||||
trigger="click"
|
||||
@command="handleCommand"
|
||||
@ -118,7 +118,7 @@ import DeCustomTab from '@/custom-component/de-tabs/DeCustomTab.vue'
|
||||
import DePreview from '@/components/data-visualization/canvas/DePreview.vue'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { tabMoveInActiveId, bashMatrixInfo } = storeToRefs(dvMainStore)
|
||||
const { tabMoveInActiveId, bashMatrixInfo, editMode } = storeToRefs(dvMainStore)
|
||||
const tabComponentRef = ref(null)
|
||||
|
||||
const props = defineProps({
|
||||
@ -168,6 +168,8 @@ const editableTabsValue = ref(null)
|
||||
const noBorderColor = ref('none')
|
||||
let currentInstance
|
||||
|
||||
const isEditMode = computed(() => editMode.value === 'edit' && isEdit.value)
|
||||
|
||||
const calcTabLength = () => {
|
||||
setTimeout(() => {
|
||||
if (element.value.propValue.length > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user