Commit 96c0c8ae9799fa4e15d8790819fb443944410754
1 parent
bb49347b
fixed #2803
Showing
2 changed files
with
8 additions
and
1 deletions
Show diff stats
examples/routers/auto-complete.vue
1 | 1 | <template> |
2 | 2 | <div style="margin: 100px;width: 200px;"> |
3 | - <AutoComplete transfer v-model="value" icon="ios-search" :data="data" @on-search="handleSearch" @on-change="hc" :filter-method="fm"> | |
3 | + <AutoComplete placement="top" transfer v-model="value" icon="ios-search" :data="data" @on-search="handleSearch" @on-change="hc" :filter-method="fm"> | |
4 | 4 | <!--<Option v-for="item in data" :value="item" :label="item" :key="item">--> |
5 | 5 | <!--<span style="color: red">{{ item }}</span>--> |
6 | 6 | <!--</Option>--> | ... | ... |
src/components/auto-complete/auto-complete.vue
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | :clearable="clearable" |
8 | 8 | :placeholder="placeholder" |
9 | 9 | :size="size" |
10 | + :placement="placement" | |
10 | 11 | filterable |
11 | 12 | remote |
12 | 13 | auto-complete |
... | ... | @@ -80,6 +81,12 @@ |
80 | 81 | type: [Function, Boolean], |
81 | 82 | default: false |
82 | 83 | }, |
84 | + placement: { | |
85 | + validator (value) { | |
86 | + return oneOf(value, ['top', 'bottom']); | |
87 | + }, | |
88 | + default: 'bottom' | |
89 | + }, | |
83 | 90 | transfer: { |
84 | 91 | type: Boolean, |
85 | 92 | default: false | ... | ... |