Browse Source

support append prepend slot (#1709)

baiyaaaaa 8 năm trước cách đây
mục cha
commit
36261b6534
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      packages/input-number/src/input-number.vue

+ 6 - 0
packages/input-number/src/input-number.vue

@@ -17,6 +17,12 @@
       :class="{
         'is-active': inputActive
       }">
+        <template slot="prepend" v-if="$slots.prepend">
+          <slot name="prepend"></slot>
+        </template>
+        <template slot="append" v-if="$slots.append">
+          <slot name="append"></slot>
+        </template> 
     </el-input>
     <span
       v-if="controls"