修改设备重命名展示方式为click,避免为hover时输入中文焦点消失

This commit is contained in:
抠脚本人 2024-03-11 21:32:37 +08:00 committed by viarotel
parent 5365622ca3
commit dcfc76ebda
2 changed files with 12 additions and 3 deletions

1
.gitignore vendored
View File

@ -21,6 +21,7 @@ lerna-debug.log*
# User # User
node_modules node_modules
pnpm-lock.yaml pnpm-lock.yaml
yarn.lock
*.local *.local
dist dist
dist-ssr dist-ssr

View File

@ -1,9 +1,17 @@
<!--
* @Author: 抠脚本人
* @QQ: 742374184
* @Date: 2024-03-11 19:53:05
* @LastEditTime: 2024-03-11 21:18:46
* @Description:
* 灵感来之不易,积累创造奇迹
-->
<template> <template>
<el-popover <el-popover
placement="bottom-start" placement="bottom-start"
:width="250" :width="250"
trigger="hover" trigger="click"
@show="handleFocus" @show="handleClick"
> >
<template #reference> <template #reference>
<el-tag effect="light" class="cursor-pointer"> <el-tag effect="light" class="cursor-pointer">
@ -44,7 +52,7 @@ export default {
// console.log('onChange', value) // console.log('onChange', value)
this.$store.device.setRemark(this.device.id, value) this.$store.device.setRemark(this.device.id, value)
}, },
async handleFocus() { async handleClick() {
this.$refs.elInput.focus() this.$refs.elInput.focus()
}, },
}, },