Commit 0100133266fe8dcaa0521c6f5ca5a1e8f146861c
1 parent
ff3d2a2e
添加inputNumber组件placeholder的示例代码
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
examples/routers/input-number.vue
... | ... | @@ -50,6 +50,8 @@ |
50 | 50 | <InputNumber v-model="valueNull" @on-change="change" :formatter="formatter" :parser="parser" style="width: 200px"></InputNumber> |
51 | 51 | |
52 | 52 | <InputNumber v-model="value2" @on-focus="focus" style="width: 200px"></InputNumber> |
53 | + | |
54 | + <InputNumber v-model="value3" style="width: 200px" placeholder="Enter something..."></InputNumber> | |
53 | 55 | </div> |
54 | 56 | </template> |
55 | 57 | <script> |
... | ... | @@ -58,6 +60,7 @@ |
58 | 60 | return { |
59 | 61 | value1: 1800000, |
60 | 62 | value2: 55, |
63 | + value3: 100, | |
61 | 64 | valueNull:null, |
62 | 65 | formatter: (value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ','), |
63 | 66 | parser: (value) => value.replace(/\$\s?|(,*)/g, ''), | ... | ... |