This commit is contained in:
Qiuxia Fan 2022-05-12 15:16:05 +08:00
parent 076896169c
commit 9b38ea2f1d

View File

@ -43,16 +43,13 @@ limitations under the License. -->
<el-dropdown <el-dropdown
ref="dropdownTag" ref="dropdownTag"
trigger="contextmenu" trigger="contextmenu"
:hide-on-click="false"
style="margin: 20px 0 0 -130px" style="margin: 20px 0 0 -130px"
> >
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item <el-dropdown-item v-for="(item, index) in tagArr" :key="index">
v-for="(item, index) in tagArr" <span @click="selectTag(item)" class="tag-item">
:key="index"
@click="selectTag(item)"
>
<span class="tag-item">
{{ item }} {{ item }}
</span> </span>
</el-dropdown-item> </el-dropdown-item>
@ -162,12 +159,12 @@ function selectTag(item: string) {
if (tags.value.includes("=")) { if (tags.value.includes("=")) {
tags.value += item; tags.value += item;
addLabels(); addLabels();
tagArr.value = tagKeys.value;
dropdownTag.value.handleClose();
return; return;
} }
tags.value = item + "="; tags.value = item + "=";
tagArr.value = tagKeys.value;
fetchTagValues(); fetchTagValues();
dropdownTag.value.handleOpen();
} }
function showClick() { function showClick() {