Skip to content

Commit ba6609f

Browse files
committed
docs: update
1 parent d9ce2f6 commit ba6609f

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

README.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,18 @@ npm i -D vue-container-query
2020

2121
```html
2222
<template>
23-
<container-query :query="query" v-model="params">
23+
<container-query
24+
:query="query"
25+
v-model="params"
26+
@change="handleChange"
27+
>
2428
<pre class="app">{{ params }}</pre>
2529
</container-query>
2630
</template>
2731

2832
<script>
2933
import { ContainerQuery } from './'
34+
3035
const query = {
3136
'width-between-400-and-599': {
3237
minWidth: 400,
@@ -38,10 +43,12 @@ const query = {
3843
}
3944
4045
export default {
41-
name: 'app',
4246
components: { ContainerQuery },
4347
data () {
4448
return { query, params: {} }
49+
},
50+
methods: {
51+
handleChange () {}
4552
}
4653
}
4754
</script>
@@ -71,6 +78,7 @@ export default {
7178

7279
<script>
7380
import { createContainerQueryMixin } from './'
81+
7482
const query = {
7583
'width-between-400-and-599': {
7684
minWidth: 400,
@@ -82,13 +90,9 @@ const query = {
8290
}
8391
8492
export default {
85-
name: 'app',
8693
mixins: [
8794
createContainerQueryMixin(query)
88-
],
89-
data () {
90-
return { query, params: {} }
91-
}
95+
]
9296
}
9397
</script>
9498
```

src/App.vue

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<script>
88
import { ContainerQuery } from './'
9+
910
const query = {
1011
'width-between-400-and-599': {
1112
minWidth: 400,

src/AppMixin.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<script>
66
import { createContainerQueryMixin } from './'
7+
78
const query = {
89
'width-between-400-and-599': {
910
minWidth: 400,
@@ -18,9 +19,6 @@ export default {
1819
name: 'app2',
1920
mixins: [
2021
createContainerQueryMixin(query)
21-
],
22-
data () {
23-
return { query, params: {} }
24-
}
22+
]
2523
}
2624
</script>

0 commit comments

Comments
 (0)