Commit 319f5f866f0f11f380abc05d8afee9f1f041ce2f

Authored by 梁灏
1 parent ef090131

fixed #554

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
... ...
src/styles/components/input.less
... ... @@ -17,7 +17,7 @@
17 17 color: @subsidiary-color;
18 18 position: absolute;
19 19 right: 0;
20   - z-index: 1;
  20 + z-index: 3;
21 21 }
22 22 &-icon-validate{
23 23 display: none;
... ...