v-multi-selector
v1.0.1
Published
A v-multi-selector component by vue.
Downloads
3
Readme
v-multi-selector
A v-multi-selector component by vue.
Install
# install
npm install v-multi-selector --save
预览
##use
<template>
<div id="app">
<v-multi-selector :SingleFilter="SingleList" :MultiFilter="MultiList" @ConfirmSelect="ConfirmSelect"></v-multi-selector>
<span>SingleSelect: {{SingleSelect}}<br></span>
<span>MultiSelect: <br></span>
<span v-for="(item, index) in MultiSelect" :key="index">{{item}}<br></span>
</div>
</template>
<script>
import vMultiSelector from './myPlugin/vMultiSelector'; // 引入
import {SingleList, MultiList} from './data'; // 引入
export default {
name: 'app',
components: {
vMultiSelector
},
data () {
return {
SingleFilter: SingleList,
MultiFilter: MultiList,
SingleSelect: "",
MultiSelect: null
}
},
methods: {
ConfirmSelect(obj) {
this.SingleSelect = obj.single
this.MultiSelect = obj.multi
}
}
}
</script>