Navigation Menu

Skip to content

Commit

Permalink
feat(Select): select add top and bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
vvpvvp committed Jan 14, 2019
1 parent 1534b8e commit 9d445f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/components/demos/dataplugins/select7.vue
Expand Up @@ -3,7 +3,9 @@
<p>选中值:{{select}}</p>
<div v-width="300">
<Select v-model="select" :datas="param">
<template slot-scope="{item}" slot="top"><div class="text-center">自定义头部</div></template>
<template slot-scope="{item}" slot="item"><div>标题:{{item.title}}<span style="float:right" class='gray1-color'>{{item.key}}</span></div><div class='gray1-color'>描述:{{item.title}}</div></template>
<template slot-scope="{item}" slot="bottom"><div class="text-center link">加载更多</div></template>
</Select>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/components/select/select.vue
Expand Up @@ -41,6 +41,7 @@
<div class="h-select-group-container" v-if="isShow">
<!-- <Search v-if="filterable" class="h-select-search-input" :placeholder="showSearchPlaceHolder" trigger-type="input" @onsearch="search" position="front"></Search> -->
<div class="h-select-list">
<slot name="top" :results="filterOptions"></slot>
<ul class="h-select-ul">
<template v-for="(option, index) of filterOptions">
<li v-if="!option.hidden"
Expand All @@ -57,6 +58,7 @@
</template>
<li v-if="filterOptions.length==0" class="h-select-ul-empty">{{showEmptyContent}}</li>
</ul>
<slot name="bottom" :results="filterOptions"></slot>
</div>
</div>
</div>
Expand Down

0 comments on commit 9d445f8

Please sign in to comment.