File tree Expand file tree Collapse file tree 4 files changed +72
-6
lines changed
Expand file tree Collapse file tree 4 files changed +72
-6
lines changed Original file line number Diff line number Diff line change 11<template >
22 <main >
33 <div class =" title" >
4- <img
5- alt =" Vue Framework"
6- src =" https://vuejs.org/images/logo.png"
7- width =" 200"
8- />
4+ <img alt =" Vue Framework" src =" https://vuejs.org/images/logo.png" width =" 200" />
95 <h1 >Vue Grid Responsive</h1 >
106 </div >
117 <br />
Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ import 'vue-code-highlight/themes/duotone-sea.css';
22
33import Vue from 'vue' ;
44import { component as VueCodeHighlight } from 'vue-code-highlight' ;
5- import { Row , Column } from '../src' ;
5+ import { Row , Column , Hidden } from '../src' ;
66import App from './App.vue' ;
77
88Vue . component ( 'row' , Row ) ;
99Vue . component ( 'column' , Column ) ;
10+ Vue . component ( 'hidden' , Hidden ) ;
1011Vue . component ( 'code-highlight' , VueCodeHighlight ) ;
1112
1213new Vue ( {
Original file line number Diff line number Diff line change 1+ <template >
2+ <div :class =" classGeneral" >
3+ <slot />
4+ </div >
5+ </template >
6+
7+ <script >
8+ export default {
9+ name: ' Hidden' ,
10+ data () {
11+ return {
12+ classGeneral: ` ${ this .createClassSize ()} `
13+ };
14+ },
15+ props: {
16+ xs: Boolean ,
17+ sm: Boolean ,
18+ md: Boolean ,
19+ lg: Boolean ,
20+ xl: Boolean
21+ },
22+ methods: {
23+ createClassSize () {
24+ let newClass = ' ' ;
25+
26+ newClass += this .xs ? ' hiddenVGR-xs ' : ' ' ;
27+ newClass += this .sm ? ' hiddenVGR-sm ' : ' ' ;
28+ newClass += this .md ? ' hiddenVGR-md ' : ' ' ;
29+ newClass += this .lg ? ' hiddenVGR-lg ' : ' ' ;
30+ newClass += this .xl ? ' hiddenVGR-xl ' : ' ' ;
31+
32+ return newClass;
33+ }
34+ }
35+ };
36+ </script >
37+
38+ <style scoped>
39+ @media (max-width : 575px ) {
40+ .hiddenVGR-xs {
41+ display : none ;
42+ }
43+ }
44+
45+ @media (min-width : 576px ) and (max-width : 767px ) {
46+ .hiddenVGR-sm {
47+ display : none ;
48+ }
49+ }
50+
51+ @media (min-width : 768px ) and (max-width : 991px ) {
52+ .hiddenVGR-md {
53+ display : none ;
54+ }
55+ }
56+
57+ @media (min-width : 992px ) and (max-width : 1199px ) {
58+ .hiddenVGR-lg {
59+ display : none ;
60+ }
61+ }
62+
63+ @media (min-width : 1200px ) {
64+ .hiddenVGR-xl {
65+ display : none ;
66+ }
67+ }
68+ </style >
Original file line number Diff line number Diff line change 11export { default as Row } from './Row.vue' ;
22export { default as Column } from './Column.vue' ;
3+ export { default as Hidden } from './Hidden.vue' ;
You can’t perform that action at this time.
0 commit comments