add remove hotkey button

This commit is contained in:
layyback 2022-04-15 11:15:26 +08:00
parent 173a3a93ba
commit ef563717a3

View File

@ -102,14 +102,11 @@
<div <div
class="value" class="value"
tabIndex="2" tabIndex="2"
@mouseover="item.showDelete = true"
@mouseout="item.showDelete = false"
@keyup="e => changeGlobalKey(e, index)" @keyup="e => changeGlobalKey(e, index)"
> >
{{ item.key }} {{ item.key }}
<MinusCircleOutlined <MinusCircleOutlined
@click.stop="deleteGlobalKey(e, index)" @click.stop="deleteGlobalKey(e, index)"
v-show="item.showDelete"
/> />
</div> </div>
</a-tooltip> </a-tooltip>
@ -122,6 +119,7 @@
:value="item.value" :value="item.value"
v-for="(item, index) in global" v-for="(item, index) in global"
class="value" class="value"
allowClear
:disabled="!item.key" :disabled="!item.key"
@change="e => changeGlobalValue(index, e.target.value)" @change="e => changeGlobalValue(index, e.target.value)"
/> />
@ -335,8 +333,14 @@ const { shortCut, common, local, global } = toRefs(state);
font-weight: lighter; font-weight: lighter;
margin-top: 10px; margin-top: 10px;
position: relative; position: relative;
&:hover {
.anticon {
display: block;
}
}
.anticon { .anticon {
position: absolute; position: absolute;
display: none;
right: 4px; right: 4px;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);