This commit is contained in:
Physton
2023-10-17 10:22:55 +08:00
parent c07aab2fa2
commit f26be1f7e4
2 changed files with 7 additions and 1 deletions

View File

@@ -327,7 +327,7 @@
</div>
<div class="btn-tag-extend"
v-animate="'fadeIn'"
:style="{display: (tag.type === 'text' || !tag.type) && (showExtendId === tag.id) ? 'flex' : 'none'}"
:style="{display: (tag.type === 'text' || !tag.type) && (showExtendId === tag.id) && !this.editing[tag.id] ? 'flex' : 'none'}"
@click.stop=""
@mousedown.stop=""
@mousemove.stop=""
@@ -723,6 +723,7 @@ export default {
droping: false,
loading: {},
editing: {},
isEditing: false,
}
},
computed: {
@@ -1136,6 +1137,7 @@ export default {
})
}
this.editing = {}
this.isEditing = false
this.droping = true
},
onUnchoose: (env) => {

View File

@@ -244,6 +244,7 @@ export default {
}
},
onTagMouseEnter(id) {
if (this.isEditing) return false
let tag = this.tags.find(tag => tag.id === id)
if (!tag) return false
tag.isFavorite = this.isFavorite(tag.id)
@@ -313,6 +314,7 @@ export default {
if (!tag) return false
this.editing = {}
this.editing[tag.id] = true
this.isEditing = true
this.$forceUpdate()
this.$nextTick(() => {
const input = this.$refs['promptTagEdit-' + tag.id][0]
@@ -335,12 +337,14 @@ export default {
let tag = this.tags.find(tag => tag.id === id)
if (!tag) return false
this.editing[tag.id] = false
this.isEditing = false
},
onTagInputKeyDown(id, e) {
if (e.keyCode === 13) {
let tag = this.tags.find(tag => tag.id === id)
if (!tag) return false
this.editing[tag.id] = false
this.isEditing = false
if (tag.value !== e.target.value) {
tag.value = e.target.value
this._setTag(tag)