https://github.com/lpreterite/vue-select2
select2基于vue的组件
https://github.com/lpreterite/vue-select2
Last synced: 3 months ago
JSON representation
select2基于vue的组件
- Host: GitHub
- URL: https://github.com/lpreterite/vue-select2
- Owner: lpreterite
- License: mit
- Created: 2015-11-05T16:01:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-05T16:05:26.000Z (over 9 years ago)
- Last Synced: 2025-01-13T10:11:28.489Z (4 months ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#vue-select2
select2基于vue的组件##使用方法
```module.exports = {
data: function(){
return {
currentTags: [1,2],
tags: [
{id: 1, title: 'CSS3'},
{id: 2, title: 'JS'},
{id: 3, title: '数据库'},
{id: 4, title: 'PHP'},
{id: 5, title: 'HTML5'}
]
};
}
...
components: {
tags: require('vue-select2');
}
...
}
```
##属性说明
`model` *必须传入,为已选择的值,数据为id的数组
`data` *必须传入,为数据源,结构如:`{id: 1, title: 'CSS3'}`
`tags` 是否已标签显示,默认是`true`
`split` 分隔符,默认是`[',', ' ','#']`
`invariant` 不变值,数据为id数组
`placeholder` 输入提示