mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-15 04:42:23 +08:00
fix(select): tag should not be deleted when input is not empty
This commit is contained in:
parent
03a03ab13a
commit
c989b7051a
@ -50,7 +50,7 @@
|
||||
ref="inputTagInput"
|
||||
v-model="pattern"
|
||||
class="n-select-input-tag__input"
|
||||
@keyup.delete="handlePatternInputDelete"
|
||||
@keydown.delete="handlePatternInputDelete"
|
||||
@input="handlePatternInput"
|
||||
>
|
||||
<span
|
||||
@ -362,7 +362,7 @@ export default {
|
||||
this.$refs.inputTagInput.style.width = textWidth + 'px'
|
||||
})
|
||||
},
|
||||
handlePatternInputDelete () {
|
||||
handlePatternInputDelete (e) {
|
||||
if (!this.pattern.length) {
|
||||
const newValue = this.value
|
||||
if (Array.isArray(newValue)) {
|
||||
|
Loading…
Reference in New Issue
Block a user