Skip to content

Commit

Permalink
fix(select): 修复 select 组件中参数 no-data-text 在没有 option-group 时不显示的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CherryJie committed May 15, 2018
1 parent e2029a8 commit db7357f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/routers/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<h1>simple select</h1>
<br><hr><br>
<dao-select v-model="simple" placeholder="一个简单下拉框" no-data-text="无选项">
<dao-select v-model="simple" placeholder="一个简单下拉框" no-data-text="无选项">
<dao-option v-for="item in items" :key="item.value" :value="item.value" :label="item.text"></dao-option>
</dao-select>
<br>
Expand Down
10 changes: 5 additions & 5 deletions src/components/dao-select/dao-option-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ $select-default-color: #9ba3af;
height: 20px;
line-height: 20px;
}
.dao-select-noOption {
padding: 10px 20px 5px 20px;
color: $select-default-color;
}
}
}
.dao-select-noOption {
padding: 5px 20px 5px 20px;
color: $select-default-color;
}
4 changes: 3 additions & 1 deletion src/components/dao-select/dao-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
<input class="dao-control search" type="text" :placeholder="searchPlaceholder" v-model="filter" required>
</div>
<div class="option-list">
<slot></slot>
<slot>
<div class="dao-select-noOption">{{ noDataText }}</div>
</slot>
</div>
</div>
</div>
Expand Down

0 comments on commit db7357f

Please sign in to comment.