fixed #211
This commit is contained in:
梁灏 2017-01-16 16:47:23 +08:00
parent 6831b361ca
commit 54a83aa565
2 changed files with 16 additions and 59 deletions

View file

@ -58,7 +58,7 @@
this.hidden = !new RegExp(val, 'i').test(this.searchLabel); this.hidden = !new RegExp(val, 'i').test(this.searchLabel);
} }
}, },
ready () { compiled () {
this.searchLabel = this.$el.innerHTML; this.searchLabel = this.$el.innerHTML;
}, },
events: { events: {

View file

@ -1,67 +1,24 @@
<template> <template>
<i-button type="primary" @click="modal1 = true">i-selelct加入width样式</i-button> <i-select :model.sync="model9" style="width:200px">
<i-button type="primary" @click="modal2 = true">i-selelct没有加入width样式</i-button> <i-option value="beijing" label="北京市">
<span>北京</span>
<Modal <span style="float:right;color:#ccc">Beiing</span>
:visible.sync="modal1" </i-option>
title="普通的Modal对话框标题"> <i-option value="shanghai" label="上海市">
<i-select :model.sync="model1" :style="modalStyle"> <span>上海</span>
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option> <span style="float:right;color:#ccc">ShangHai</span>
</i-select> </i-option>
</Modal> <i-option value="shenzhen" label="深圳市">
<span>深圳</span>
<Modal <span style="float:right;color:#ccc">ShenZhen</span>
:visible.sync="modal2" </i-option>
title="普通的Modal对话框标题"> </i-select>
<i-select :model.sync="model1" :style="modalStyle">
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
</i-select>
</Modal>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
modal1: false, model9: 'shanghai'
modal2: false,
modalStyle: '',
cityList: [
{
value: 'beijing',
label: '北京市'
},
{
value: 'shanghai',
label: '上海市'
},
{
value: 'shenzhen',
label: '深圳市'
},
{
value: 'hangzhou',
label: '杭州市'
},
{
value: 'nanjing',
label: '南京市'
},
{
value: 'chongqing',
label: '重庆市'
}
],
model1: ''
}
},
computed: {
modalStyle: function(){
let s = ""
if (this.modal1)
s = "width: 200px"
if (this.modal2)
s = ""
return s
} }
} }
} }