优化提示查找逻辑

This commit is contained in:
lyswhut
2020-09-29 14:41:41 +08:00
parent 1b561bbf4c
commit 3a630edaa5
2 changed files with 7 additions and 24 deletions
+2 -17
View File
@@ -1,6 +1,6 @@
<template lang="pug">
input(:class="$style.input" :type="type" :placeholder="placeholder" v-model.trim="text" :disabled="disabled"
@focus="$emit('focus', $event)" @blur="$emit('blur', $event)" @input="$emit('input', text)" @change="$emit('change', text)"
input(:class="$style.input" :type="type" :placeholder="placeholder" :value="value" :disabled="disabled"
@focus="$emit('focus', $event)" @blur="$emit('blur', $event)" @input="$emit('input', $event.trim())" @change="$emit('change', text)"
@keyup.enter="$emit('submit', text)")
</template>
@@ -24,21 +24,6 @@ export default {
default: 'text',
},
},
data() {
return {
text: '',
}
},
watch: {
value(n) {
this.text = n
},
},
methods: {
handleInput() {
},
},
}
</script>