Merge pull request #11778 from dataease/pr@dev-v2@fix_tab-title

refactor(数据大屏、仪表板): 优化Tab标题点击事件,点击标题不计入批量选择
This commit is contained in:
王嘉豪 2024-08-27 13:04:48 +08:00 committed by GitHub
commit 3fce7a308f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,32 +23,34 @@
:name="tabItem.name"
>
<template #label>
<span :style="titleStyle(tabItem.name)">{{ tabItem.title }}</span>
<el-dropdown
v-if="isEditMode"
:effect="curThemes"
style="line-height: 4 !important"
trigger="click"
@command="handleCommand"
>
<span class="el-dropdown-link">
<el-icon v-if="isEdit"><ArrowDown /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item :command="beforeHandleCommand('editTitle', tabItem)">
编辑标题
</el-dropdown-item>
<div @mousedown.stop>
<span :style="titleStyle(tabItem.name)">{{ tabItem.title }}</span>
<el-dropdown
v-if="isEditMode"
:effect="curThemes"
style="line-height: 4 !important"
trigger="click"
@command="handleCommand"
>
<span class="el-dropdown-link">
<el-icon v-if="isEdit"><ArrowDown /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item :command="beforeHandleCommand('editTitle', tabItem)">
编辑标题
</el-dropdown-item>
<el-dropdown-item
v-if="element.propValue.length > 1"
:command="beforeHandleCommand('deleteCur', tabItem)"
>
删除
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-dropdown-item
v-if="element.propValue.length > 1"
:command="beforeHandleCommand('deleteCur', tabItem)"
>
删除
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</template>
<de-canvas
v-if="isEdit && !mobileInPc"