refactor(数据大屏、仪表板): 优化Tab标题点击事件,点击标题不计入批量选择

This commit is contained in:
wangjiahao 2024-08-27 11:43:26 +08:00
parent 8bbe53f608
commit 1245c4cf4a

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"