npm 地址:https://www.npmjs.com/package/mentioneditor
yarn add mentioneditor
<template>
<div>
<mention-editor :topics="list1"></mention-editor>
</div>
</template>
<script>
import mentionEditor from 'mentioneditor'
export default {
components:{
'mention-editor':mentionEditor
},
data(){
return {
list1:[
{
id:'001',
text:'话题1'
},
{
id:'002',
text:'话题2'
}
]
}
}
}
</script>
when we need @sb,we just v-bind:sb-list="xxxList"
when we need mention #some topic,we just v-bind:topics is ok
you can also paste the img that copy from local or other net page's .