Coder Social home page Coder Social logo

star-input-tag's Introduction

star-input-tag

基于elementui Tag标签,增加了原有标签的编辑功能

  1. 引入组件 import starInputTag from '...'
  2. 注册组件
components: {
      starInputTag
}
  1. 使用组件 <star-input-tag />
  • v-model 标签内容,数组或者字符串,字符串每个标签以逗号隔开
  • theme 新增按钮名称
  • created(){ 字符串转数组,定义在父组件 if(typeof this.tagList =='string'){ this.tagList = this.tagList.split(','); } },

###示例: <star-input-tag v-model="tagList" theme="添加新标签" />

data() {
     return {
          //tagList: ['自定义标签一','自定义标签二','自定义标签三'],
          tagList: "自定义标签一,自定义标签二,自定义标签三"
          }
 }

如果需要穿字符串:

created(){
      if(typeof this.tagList =='string'){
         this.tagList = this.tagList.split(',');
      }
},

star-input-tag's People

Contributors

cong1223 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.