You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vue-grid-layout is a grid layout system, like [Gridster](http://dsmorse.github.io/gridster.js/), for Vue.js. **Heavily inspired in [React-Grid-Layout](https://github.com/STRML/react-grid-layout)**
### **For Vue 2.1.10 and below use version [2.1.3](https://github.com/jbaysolutions/vue-grid-layout/tree/2.1.3)**
8
12
### **For Vue 1 use version [1.0.3](https://github.com/jbaysolutions/vue-grid-layout/tree/1.0.3)**
@@ -25,6 +29,10 @@ vue-grid-layout is a grid layout system, like [Gridster](http://dsmorse.github.i
25
29
26
30
27
31
TODO UPDATE DOCS
32
+
33
+
Used guide for vue cli build: https://medium.com/justfrontendthings/how-to-create-and-publish-your-own-vuejs-component-library-on-npm-using-vue-cli-28e60943eed3
34
+
Also check https://cli.vuejs.org/guide/build-targets.html#library
35
+
28
36
-->
29
37
30
38
#### Projects using vue-grid-layout
@@ -40,30 +48,42 @@ TODO UPDATE DOCS
40
48
* Bounds checking for dragging and resizing
41
49
* Widgets may be added or removed without rebuilding grid
42
50
* Layout can be serialized and restored
43
-
* Automatic RTL support
51
+
* Automatic RTL support (resizing not working with RTL on 2.2.0)
44
52
45
53
46
54
## Getting Started
47
55
48
56
### Installation
49
57
50
-
Install the vue-grid-layout [package](https://www.npmjs.org/package/vue-grid-layout) package using [npm](https://www.npmjs.com/):
58
+
#### npm
51
59
52
-
npm install vue-grid-layout
60
+
# install with npm
61
+
npm install vue-grid-layout --save
62
+
63
+
# install with yarn
64
+
yarn add vue-grid-layout
53
65
54
66
55
-
### Usage
67
+
Import the library
56
68
57
-
npm install vue-grid-layout
69
+
```javascript
70
+
importVueGridLayoutfrom'vue-grid-layout';
71
+
```
72
+
73
+
74
+
75
+
#### browser
76
+
77
+
Include the browser-ready bundle (download from [releases](https://github.com/jbaysolutions/vue-grid-layout/releases)) in your page. The components will be automatically available.
58
78
59
-
or include the script in your html (download from [releases](https://github.com/jbaysolutions/vue-grid-layout/releases)):
60
-
61
79
```html
62
-
<scriptsrc="vue-grid-layout.min.js"></script>
80
+
<scriptsrc="vue-grid-layout.umd.min.js"></script>
63
81
````
64
82
65
-
```javascript
66
83
84
+
### Usage
85
+
86
+
```javascript
67
87
var testLayout = [
68
88
{"x":0,"y":0,"w":2,"h":2,"i":"0"},
69
89
{"x":2,"y":0,"w":2,"h":4,"i":"1"},
@@ -87,15 +107,8 @@ or include the script in your html (download from [releases](https://github.com/
0 commit comments