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 | <template> | 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 | </div> | 6 | </div> |
5 | </template> | 7 | </template> |
6 | <script> | 8 | <script> |
7 | export default { | 9 | export default { |
8 | data () { | 10 | data () { |
9 | return { | 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 | <template> | 1 | <template> |
2 | <div :class="wrapClasses"> | 2 | <div :class="wrapClasses"> |
3 | <template v-if="type !== 'textarea'"> | 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 | <i class="ivu-icon" :class="['ivu-icon-' + icon, prefixCls + '-icon', prefixCls + '-icon-normal']" v-if="icon" @click="handleIconClick"></i> | 5 | <i class="ivu-icon" :class="['ivu-icon-' + icon, prefixCls + '-icon', prefixCls + '-icon-normal']" v-if="icon" @click="handleIconClick"></i> |
6 | <transition name="fade"> | 6 | <transition name="fade"> |
7 | <i class="ivu-icon ivu-icon-load-c ivu-load-loop" :class="[prefixCls + '-icon', prefixCls + '-icon-validate']" v-if="!icon"></i> | 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,7 +21,7 @@ | ||
21 | @blur="handleBlur" | 21 | @blur="handleBlur" |
22 | @input="handleInput" | 22 | @input="handleInput" |
23 | @change="handleChange"> | 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 | </template> | 25 | </template> |
26 | <textarea | 26 | <textarea |
27 | v-else | 27 | v-else |
src/styles/components/input.less