File tree 3 files changed +14
-11
lines changed
3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,18 @@ npm i -D vue-container-query
20
20
21
21
``` html
22
22
<template >
23
- <container-query :query =" query" v-model =" params" >
23
+ <container-query
24
+ :query =" query"
25
+ v-model =" params"
26
+ @change =" handleChange"
27
+ >
24
28
<pre class =" app" >{{ params }}</pre >
25
29
</container-query >
26
30
</template >
27
31
28
32
<script >
29
33
import { ContainerQuery } from ' ./'
34
+
30
35
const query = {
31
36
' width-between-400-and-599' : {
32
37
minWidth: 400 ,
@@ -38,10 +43,12 @@ const query = {
38
43
}
39
44
40
45
export default {
41
- name: ' app' ,
42
46
components: { ContainerQuery },
43
47
data () {
44
48
return { query, params: {} }
49
+ },
50
+ methods: {
51
+ handleChange () {}
45
52
}
46
53
}
47
54
</script >
@@ -71,6 +78,7 @@ export default {
71
78
72
79
<script >
73
80
import { createContainerQueryMixin } from ' ./'
81
+
74
82
const query = {
75
83
' width-between-400-and-599' : {
76
84
minWidth: 400 ,
@@ -82,13 +90,9 @@ const query = {
82
90
}
83
91
84
92
export default {
85
- name: ' app' ,
86
93
mixins: [
87
94
createContainerQueryMixin (query)
88
- ],
89
- data () {
90
- return { query, params: {} }
91
- }
95
+ ]
92
96
}
93
97
</script >
94
98
```
Original file line number Diff line number Diff line change 6
6
7
7
<script >
8
8
import { ContainerQuery } from ' ./'
9
+
9
10
const query = {
10
11
' width-between-400-and-599' : {
11
12
minWidth: 400 ,
Original file line number Diff line number Diff line change 4
4
5
5
<script >
6
6
import { createContainerQueryMixin } from ' ./'
7
+
7
8
const query = {
8
9
' width-between-400-and-599' : {
9
10
minWidth: 400 ,
@@ -18,9 +19,6 @@ export default {
18
19
name: ' app2' ,
19
20
mixins: [
20
21
createContainerQueryMixin (query)
21
- ],
22
- data () {
23
- return { query, params: {} }
24
- }
22
+ ]
25
23
}
26
24
</script >
You can’t perform that action at this time.
0 commit comments