vue输入标签 vue-tags-input

vue TagsInput

  • 输入标签

  • 安装

    npm install @johmun/vue-tags-input
    
  • 用法

    <template>
      <div>
        <vue-tags-input
          v-model="tag"
          :tags="tags"
          @tags-changed="newTags => tags = newTags"
        />
      </div>
    </template>
    
    <script>
    import VueTagsInput from '@johmun/vue-tags-input';
    
    export default {
      components: {
        VueTagsInput,
      },
      data() {
        return {
          tag:'',
          tags: [],
        };
      },
    };
    </script>
    
posted @ 2020-08-22 14:06  巫小诗  阅读(3514)  评论(0编辑  收藏  举报