File tree 3 files changed +72
-13
lines changed
3 files changed +72
-13
lines changed Original file line number Diff line number Diff line change
1
+ [ ![ Build Status] ( https://travis-ci.org/manico/vue-grid.svg?branch=master )] ( https://travis-ci.org/manico/vue-grid ) [ ![ codecov] ( https://codecov.io/gh/manico/vue-grid/branch/master/graph/badge.svg )] ( https://codecov.io/gh/manico/vue-grid )
2
+
1
3
# vue-grid
2
4
3
5
> Vue implementation of css grid layout
4
6
5
- ## Build Setup
7
+ ## Installation
8
+
9
+ ``` bash
10
+ # npm
11
+ npm install vue-grid
12
+ ```
13
+
14
+ ## Using
15
+
16
+ ### Import globally
6
17
7
- ``` bash
8
- # install dependencies
9
- npm install
18
+ ``` javascript
19
+ import Vue from ' vue' ;
20
+ import { VGrid } from ' vue-grid' ;
21
+ import App from ' ./App' ;
10
22
11
- # serve with hot reload at localhost:8080
12
- npm run dev
23
+ Vue . config . productionTip = false ;
24
+ Vue . use (VGrid);
13
25
14
- # build for production with minification
15
- npm run build
26
+ /* eslint-disable no-new */
27
+ new Vue ({
28
+ el: ' #app' ,
29
+ template: ' <App/>' ,
30
+ components: { App },
31
+ });
32
+ ```
33
+
34
+ ### Import locally
35
+
36
+ ``` javascript
37
+ import { VGrid , VGridItem } from ' vue-grid' ;
16
38
17
- # build for production and view the bundle analyzer report
18
- npm run build --report
39
+ export default {
40
+ name: ' app' ,
41
+ components: {
42
+ VGrid,
43
+ VGridItem,
44
+ },
45
+ data () {
46
+ return {
47
+ };
48
+ },
49
+ };
19
50
```
20
51
21
- For detailed explanation on how things work, checkout the [ guide] ( http://vuejs-templates.github.io/webpack/ ) and [ docs for vue-loader] ( http://vuejs.github.io/vue-loader ) .
52
+ ### Use in template
53
+
54
+ ``` html
55
+ <template >
56
+ <div id =" app" >
57
+ <v-grid class =" grid"
58
+ template-columns =" 2fr 1fr 1fr"
59
+ :auto-rows =" ['50px', '120px']"
60
+ gap =" 10px" >
61
+ <v-grid-item :column-start =" 1"
62
+ :column-end =" 4" >
63
+ </v-grid-item >
64
+ <v-grid-item ></v-grid-item >
65
+ <v-grid-item ></v-grid-item >
66
+ <v-grid-item ></v-grid-item >
67
+ <v-grid-item :column-start =" 1"
68
+ :column-end =" 4" >
69
+ </v-grid-item >
70
+ </v-grid >
71
+ </div >
72
+ </template >
73
+ ```
Original file line number Diff line number Diff line change 4
4
< meta charset ="utf-8 ">
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1, shrink-to-fit=no ">
6
6
< meta http-equiv ="x-ua-compatible " content ="ie=edge ">
7
- < title > vue-grid </ title >
7
+ < title > Vue Grid </ title >
8
8
</ head >
9
9
< body >
10
10
< div id ="app "> </ div >
11
- <!-- built files will be auto injected -->
12
11
</ body >
13
12
</ html >
Original file line number Diff line number Diff line change
1
+ language : node_js
2
+ node_js :
3
+ - " 8"
4
+ install :
5
+ - npm install
6
+ script :
7
+ - npm lint && codecov
8
+ - npm run build
You can’t perform that action at this time.
0 commit comments