Skip to content

Commit 0bd7845

Browse files
Merge pull request #1 from Inventory-Shield/vue3
Vue 3 Support
2 parents 4c43dc4 + 0572a17 commit 0bd7845

File tree

8 files changed

+4928
-50
lines changed

8 files changed

+4928
-50
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"presets": [
3-
"env"
3+
"@babel/env"
44
],
55
"plugins": [
6-
"transform-runtime"
6+
"@babel/plugin-transform-runtime"
77
]
88
}

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ Check out **[demo and styling examples](http://mariomka.github.io/vue-checkbox-r
1818
**Checkbox**
1919

2020
```html
21-
<checkbox name="terms" value="1">
21+
<checkbox name="terms" model-value="1">
2222
I agree to the <a href="#">terms of service</a>
2323
</checkbox>
2424
```
2525

2626
**Radio**
2727

2828
```html
29-
<radio name="robot" value="1">
29+
<radio name="robot" model-value="1">
3030
I'm a robot
3131
</radio>
32-
<radio name="robot" value="0">
32+
<radio name="robot" model-value="0">
3333
I'm not a robot
3434
</radio>
3535
```
@@ -56,16 +56,16 @@ Register the plugin.
5656
```js
5757
import CheckboxRadio from 'vue-checkbox-radio';
5858

59-
Vue.use(CheckboxRadio);
59+
app.use(CheckboxRadio);
6060
```
6161

6262
Or register components manually.
6363

6464
```js
6565
import {Checkbox, Radio} from 'vue-checkbox-radio';
6666

67-
Vue.component('checkbox', Checkbox);
68-
Vue.component('radio', Radio);
67+
app.component('checkbox', Checkbox);
68+
app.component('radio', Radio);
6969
```
7070

7171
## Params
@@ -78,7 +78,7 @@ id | `string` | checkbox-id-(element uid)
7878
class-name | `string` | `null`
7979
name | `string` | `null`
8080
v-model | `string`, `boolean` or `array` | `undefined`
81-
value | `string` or `boolean` | `null`
81+
model-value | `string` or `boolean` | `null`
8282
checked | `boolean` | `false`
8383
required | `boolean` | `false`
8484
disabled | `boolean` | `false`
@@ -91,14 +91,14 @@ id | `string` | radio-id-(element uid)
9191
class-name | `string` | `null`
9292
name | `string` | `null`
9393
v-model | `string` or `boolean` | `undefined`
94-
value | `string` or `boolean` | `null`
94+
model-value | `string` or `boolean` | `null`
9595
checked | `boolean` | `false`
9696
required | `boolean` | `false`
9797
disabled | `boolean` | `false`
9898

9999
## Events
100100

101-
Both components emit the `input` event to work with `v-model`.
101+
Both components emit the `update:modelValue` event to work with `v-model`.
102102

103103
## Full example
104104

0 commit comments

Comments
 (0)