Commit 319f5f866f0f11f380abc05d8afee9f1f041ce2f
1 parent
ef090131
fixed #554
Showing
3 changed files
with
13 additions
and
6 deletions
Show diff stats
examples/routers/input.vue
1 | 1 | <template> |
2 | - <div> | |
3 | - <Input v-model="value" placeholder="请输入..." style="width: 150px" icon="ios-clock-outline"></Input> | |
2 | + <div style="width: 300px;"> | |
3 | + <i-input v-model="value11" icon="ios-clock-outline"> | |
4 | + <span slot="prepend">http://</span> | |
5 | + </i-input> | |
4 | 6 | </div> |
5 | 7 | </template> |
6 | 8 | <script> |
7 | 9 | export default { |
8 | 10 | data () { |
9 | 11 | return { |
10 | - value: '' | |
12 | + value11: '', | |
13 | + value12: '', | |
14 | + value13: '', | |
15 | + select1: 'http', | |
16 | + select2: 'com', | |
17 | + select3: 'day' | |
11 | 18 | } |
12 | 19 | } |
13 | 20 | } | ... | ... |
src/components/input/input.vue
1 | 1 | <template> |
2 | 2 | <div :class="wrapClasses"> |
3 | 3 | <template v-if="type !== 'textarea'"> |
4 | - <div :class="[prefixCls + '-group-prepend']" v-if="prepend" v-show="slotReady" ref="prepend"><slot name="prepend"></slot></div> | |
4 | + <div :class="[prefixCls + '-group-prepend']" v-if="prepend" v-show="slotReady"><slot name="prepend"></slot></div> | |
5 | 5 | <i class="ivu-icon" :class="['ivu-icon-' + icon, prefixCls + '-icon', prefixCls + '-icon-normal']" v-if="icon" @click="handleIconClick"></i> |
6 | 6 | <transition name="fade"> |
7 | 7 | <i class="ivu-icon ivu-icon-load-c ivu-load-loop" :class="[prefixCls + '-icon', prefixCls + '-icon-validate']" v-if="!icon"></i> |
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 | @blur="handleBlur" |
22 | 22 | @input="handleInput" |
23 | 23 | @change="handleChange"> |
24 | - <div :class="[prefixCls + '-group-append']" v-if="append" v-show="slotReady" ref="append"><slot name="append"></slot></div> | |
24 | + <div :class="[prefixCls + '-group-append']" v-if="append" v-show="slotReady"><slot name="append"></slot></div> | |
25 | 25 | </template> |
26 | 26 | <textarea |
27 | 27 | v-else | ... | ... |