File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Expand file tree Collapse file tree 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
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 >
2933import { ContainerQuery } from ' ./'
34+
3035const query = {
3136 ' width-between-400-and-599' : {
3237 minWidth: 400 ,
@@ -38,10 +43,12 @@ const query = {
3843}
3944
4045export 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 >
7380import { createContainerQueryMixin } from ' ./'
81+
7482const query = {
7583 ' width-between-400-and-599' : {
7684 minWidth: 400 ,
@@ -82,13 +90,9 @@ const query = {
8290}
8391
8492export default {
85- name: ' app' ,
8693 mixins: [
8794 createContainerQueryMixin (query)
88- ],
89- data () {
90- return { query, params: {} }
91- }
95+ ]
9296}
9397 </script >
9498```
Original file line number Diff line number Diff line change 66
77<script >
88import { ContainerQuery } from ' ./'
9+
910const query = {
1011 ' width-between-400-and-599' : {
1112 minWidth: 400 ,
Original file line number Diff line number Diff line change 44
55<script >
66import { createContainerQueryMixin } from ' ./'
7+
78const 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 >
You can’t perform that action at this time.
0 commit comments