You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ npm install autonumeric --save
39
39
You'll then be able to use the vue-autonumeric component:
40
40
```js
41
41
importAutoNumericfrom'AutoNumeric';
42
-
importVueAutoNumericfrom'vue-autonumeric';
42
+
importVueAutonumericfrom'vue-autonumeric';
43
43
```
44
44
45
45
### How to use?
@@ -48,7 +48,7 @@ The AutoNumeric component can be instantiated the same way `AutoNumeric` can.
48
48
49
49
With an option object:
50
50
```html
51
-
<autonumeric
51
+
<vue-autonumeric
52
52
v-model="myValue"
53
53
:options="{
54
54
digitGroupSeparator: '.',
@@ -59,34 +59,34 @@ With an option object:
59
59
roundingMethod: 'U',
60
60
minimumValue: '0'
61
61
}"
62
-
/>
62
+
></vue-autonumeric>
63
63
```
64
64
65
65
With a predefined option name:
66
66
```html
67
-
<autonumeric
67
+
<vue-autonumeric
68
68
v-model="myValue"
69
69
:options="'French'"
70
-
/>
70
+
></vue-autonumeric>
71
71
```
72
72
73
73
With multiple option objects/predefined options:
74
74
```html
75
-
<autonumeric
75
+
<vue-autonumeric
76
76
v-model="myValue"
77
77
:options="['euro', { minimumValue: '0' }]"
78
-
/>
78
+
></vue-autonumeric>
79
79
```
80
80
81
81
#### Other props
82
82
83
83
You can define the input placeholder using:
84
84
```html
85
-
<autonumeric
85
+
<vue-autonumeric
86
86
v-model="myValue"
87
87
:options="'euro'"
88
88
:placeholder="'Enter your value here'"
89
-
/>
89
+
></vue-autonumeric>
90
90
```
91
91
92
92
*In the future, you'll be able to define the type of element tag (`<p>`, `<div>`, etc.) you want that component to generate.<br>This will allow you to create any supported tag with the `contenteditable` attribute set to `true`, instead of `<input>` one as it is for now.*
@@ -100,21 +100,21 @@ The `paste`, `drop` and `wheel` events are supported as well.
100
100
101
101
### Caveats
102
102
103
-
Please note that directly setting a `:value='42'` on the `<autonumeric>` component **will break it** (really!).<br>
103
+
Please note that directly setting a `:value='42'` on the `<vue-autonumeric>` component **will break it** (really!).<br>
104
104
Do **NOT** do that:
105
105
```html
106
-
<autonumeric
106
+
<vue-autonumeric
107
107
v-model="myValue"
108
108
:options="{ minimumValue: '0' }"
109
109
:value="42042.69" <!--Thisfails-->
110
-
/>
110
+
></vue-autonumeric>
111
111
```
112
112
113
113
### Demo
114
114
115
115
The official AutoNumeric [documentation](https://autonumeric.github.io/guide)~~is~~ will soon be using this component extensively :)<br>
116
116
<br>
117
-
An editable live example is available [on Codepen](https://codepen.io/AnotherLinuxUser/pen/pWgOrZ).
117
+
An editable live example is available [on Codepen](https://codepen.io/AnotherLinuxUser/pen/pWgOrZ?editors=1010).
0 commit comments