Select add prefix prop and slot. close #5477

This commit is contained in:
梁灏 2019-04-08 15:47:07 +08:00
parent 707898f2ad
commit 2739fc29cc
4 changed files with 73 additions and 8 deletions

View file

@ -1,12 +1,46 @@
<template>
<div style="margin: 200px;">
<Select size="small" v-model="model10" multiple style="width:260px">
<div style="margin: 100px;">
<Select v-model="model1" style="width:200px" prefix="ios-albums">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<Select v-model="model10" multiple style="width:260px">
<Select v-model="model10" multiple style="width:260px" prefix="ios-albums">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<Select size="large" v-model="model10" multiple style="width:260px">
<br><br>
<Select v-model="model1" style="width:200px">
<Icon type="ios-alarm" slot="prefix" color="red" />
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<Select v-model="model1" style="width:200px">
<Avatar src="https://dev-file.iviewui.com/userinfoPDvn9gKWYihR24SpgC319vXY8qniCqj4/avatar" slot="prefix" size="small" />
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<Select v-model="model10" multiple style="width:260px" prefix="ios-albums">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<br><br>
<Select size="small" v-model="model1" style="width:200px" prefix="ios-albums">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<Select size="small" v-model="model10" multiple style="width:260px" prefix="ios-albums">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<br><br>
<Select size="large" v-model="model1" style="width:200px" prefix="ios-albums">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
<Select size="large" v-model="model10" multiple style="width:260px" prefix="ios-albums">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
</div>
@ -22,7 +56,7 @@
},
{
value: 'London',
label: 'LondonLondonLondonLondonLondonLondonLondonLondonLondonLondonLondonLondonLondonLondonLondonLondonLondonLondon'
label: 'London'
},
{
value: 'Sydney',
@ -41,7 +75,8 @@
label: 'Canberra'
}
],
model10: ['New York', 'London']
model1: '',
model10: []
}
}
}