mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-05-01 03:31:41 +00:00
fix bug #255
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user