Select add transfer prop
This commit is contained in:
梁灏 2017-07-20 10:37:12 +08:00
parent 835b37ff9f
commit 595cfa72fe
4 changed files with 55 additions and 17 deletions

View file

@ -1,12 +1,20 @@
<template>
<div>
<i-button @click="modal=true">show modal</i-button>
<Modal v-model="modal" @on-ok="resetForm" @on-cancel="resetForm" title="表单">
<div>
<i-select ref="formSelect" filterable remote clearable :remote-method="remoteMethod" :loading="loading">
<i-option v-for="option in options" :value="option.value" :key="option.value">{{option.label}}</i-option>
</i-select>
</div>
<i-button @click="showModal = true">Modal有Tabs</i-button>
<i-button @click="showModal2 = true">Modal无Tabs</i-button>
<Modal v-model="showModal" title="弹窗">
<Tabs>
<Tab-pane label="演示" style="height: 80px;">
<i-select transfer>
<i-option v-for="item in options" :value="item.value" :key="item.value">{{ item.label }}</i-option>
</i-select>
</Tab-pane>
</Tabs>
</Modal>
<Modal v-model="showModal2" title="弹窗">
<i-select>
<i-option v-for="item in options" :value="item.value" :key="item.value">{{ item.label }}</i-option>
</i-select>
</Modal>
</div>
</template>
@ -14,17 +22,32 @@
export default {
data () {
return {
modal: false,
loading: false,
options: [],
cityList: [
showModal: false,
showModal2: false,
options: [
{
value: "beijing",
label: "北京市"
value: 'beijing',
label: '北京市'
},
{
value: "shanghai",
label: "上海市"
value: 'shanghai',
label: '上海市'
},
{
value: 'shenzhen',
label: '深圳市'
},
{
value: 'hangzhou',
label: '杭州市'
},
{
value: 'nanjing',
label: '南京市'
},
{
value: 'chongqing',
label: '重庆市'
}
]
}