0.1.7 • Published 5 years ago

vm-select v0.1.7

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

vm-select

vm-select

安装

npm install -D vm-select 

全局引入

import vmSelect from 'vm-select'
Vue.use(vmSelect)

or组件内引入

import vmSelect from 'vm-select'

export default {
  ...
  components: {
    vmSelect
  }
  ...
}

使用方式

<template>
  <div id="app">
    <vm-select :options="option" v-model="models"></vm-select>
  </div>
</template>

<script>
export default {
  data () {
    return {
      option: [1, 2, 3, 4, 5],
      model: 1
    }
  }
}
</script>

API

select props

属性说明类型默认值
value可以使用 v-model 双向绑定数据Array, String, Number
options数据集合Array
multiple是否多选Booleanfalse
search是否开启筛选Booleanfalse
labeloption 项显示属性String
labelKeyoption 返回项String
disabled是否禁用Booleanfalse
customDisabled是否禁用option项Function
placeholderplaceholder 为空提示文案String请输入
maxRender最大Number50

select events

事件名称说明返回值
on-changeoption 被点击时触发value,option(当前项)
0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.0

5 years ago

0.1.1

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago