Open meatfound opened 3 years ago
I also encountered this problem, but after the at name, add a space to get the integrity.
hi @fistSea @meatfound , is this live demo working for both of you? https://coldemo.js.org/#/playground/vue-at.js
try to add handleAt like
let App = {
components: { At: VueAt },
template: `
<div class="container">
<h1>Vue At</h1>
<a target="_blank" href="https://github.com/fritx/vue-at">
https://github.com/fritx/vue-at
</a>
<at :members="members" v-model="input" @at="handleAt">
<div class="editor" contenteditable></div>
</at>
</div>
`,
data() {
return {
members: [
'fritx', 'linguokang', 'huangruichang'
],
input: '@fritx @huangruichang '
}
},
methods: {
handleAt(chunk) { console.log([chunk]) }
}
}
vue 2.6.11
vue-at 2.5.0-beta.2
I'm trying to search member dynamically, but I can't getting a full text that I was inputted. (lost last word..)
here is my code,
and my script code,
I was entered text '테스트' , but @at returned '테스'.
is it related an IME ? (https://vuejs.org/v2/guide/forms.html#vmodel-ime-tip) is it Ok with use 中文 or japanese? 谢谢.