fix(测试计划): 测试计划脑图环境/资源节点下拉菜单修复

--bug=1046852 --user=白奇 测试规划-点击环境/资源池标签后点击其它模块节点-也展示环境/资源池下拉框 https://www.tapd.cn/55049933/s/1582607
This commit is contained in:
baiqi 2024-09-20 17:18:26 +08:00 committed by Craftsman
parent eb30fc20b0
commit 30b29ca6cb
2 changed files with 12 additions and 8 deletions

View File

@ -306,6 +306,13 @@
() => props.status !== 'ARCHIVED' && hasAnyPermission(['PROJECT_TEST_PLAN:READ+UPDATE']) () => props.status !== 'ARCHIVED' && hasAnyPermission(['PROJECT_TEST_PLAN:READ+UPDATE'])
); );
/**
* 是否可以显示下拉菜单
*/
const canShowDropdown = ref(false);
const dropdownList = ref<MinderDropdownListItem[]>([]);
const checkedVal = ref<string>();
/** /**
* 检测节点可展示的菜单项 * 检测节点可展示的菜单项
* @param node 选中节点 * @param node 选中节点
@ -752,18 +759,12 @@
} }
); );
/**
* 是否可以显示下拉菜单
*/
const canShowDropdown = ref(false);
const dropdownList = ref<MinderDropdownListItem[]>([]);
const checkedVal = ref<string>();
/** /**
* 处理节点选中 * 处理节点选中
* @param node 节点 * @param node 节点
*/ */
function handleNodeSelect(node: PlanMinderNode) { function handleNodeSelect(node: PlanMinderNode) {
canShowDropdown.value = false;
if (checkConfigFormUnsaved()) { if (checkConfigFormUnsaved()) {
return; return;
} }

View File

@ -17,7 +17,9 @@
:class="props.checkedVal === item.value ? 'ms-minder-node-dropdown-item--active' : ''" :class="props.checkedVal === item.value ? 'ms-minder-node-dropdown-item--active' : ''"
@click="item.onClick && item.onClick()" @click="item.onClick && item.onClick()"
> >
<div>{{ item.label }}</div> <a-tooltip :content="item.label" :mouse-enter-delay="500">
<div class="one-line-text">{{ item.label }}</div>
</a-tooltip>
</a-doption> </a-doption>
</template> </template>
</a-dropdown> </a-dropdown>
@ -45,6 +47,7 @@
<style lang="less"> <style lang="less">
.ms-minder-node-dropdown { .ms-minder-node-dropdown {
max-width: 350px;
max-height: 350px; max-height: 350px;
.ms-minder-node-dropdown-item--active { .ms-minder-node-dropdown-item--active {
color: rgb(var(--primary-5)) !important; color: rgb(var(--primary-5)) !important;