| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Vue Grid Layout Example 8 - Responsive with predefined layouts</title>
- <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
- <link rel="stylesheet" href="app.css">
- <!--<link rel="stylesheet" href="../dist/vue-grid-layout.css">-->
- </head>
- <body>
- <h1>Vue Grid Layout Example 8 - Responsive with predefined layouts</h1>
- <a href="https://github.com/jbaysolutions/vue-grid-layout">View project on Github</a>
- <br />
- <a href="07-prevent-collision.html">Previous example: Prevent collision</a>
- <br />
- <a href="09-dynamic-add-remove.html">Next example: Dynamic Add/Remove</a>
- <div id="app" style="width: 100%;">
- <!--<pre>{{ $data | json }}</pre>-->
- <div>
- <div class="layoutJSON">
- Displayed as <code>[x, y, w, h]</code>:
- <div class="columns">
- <div class="layoutItem" v-for="item in layout">
- <b>{{item.i}}</b>: [{{item.x}}, {{item.y}}, {{item.w}}, {{item.h}}]
- </div>
- </div>
- </div>
- </div>
- <div id="content">
- <!--<button @click="decreaseWidth">Decrease Width</button>
- <button @click="increaseWidth">Increase Width</button>
- <button @click="addItem">Add an item</button>-->
- <input type="checkbox" v-model="draggable" /> Draggable
- <input type="checkbox" v-model="resizable" /> Resizable
- <input type="checkbox" v-model="responsive" /> Responsive
- <br />
- <grid-layout :layout.sync="layout"
- :responsive-layouts="layouts"
- :col-num="12"
- :row-height="30"
- :is-draggable="draggable"
- :is-resizable="resizable"
- :vertical-compact="true"
- :use-css-transforms="true"
- :responsive="responsive"
- @breakpoint-changed="breakpointChangedEvent"
- >
- <grid-item v-for="item in layout"
- :x="item.x"
- :y="item.y"
- :w="item.w"
- :h="item.h"
- :i="item.i"
- >
- <span class="text">{{item.i}}</span>
- </grid-item>
- </grid-layout>
- </div>
- </div>
- <script src="vue.min.js"></script>
- <script src="../dist/vue-grid-layout.umd.min.js"></script>
- <script src="08-responsive-predefined-layouts.js"></script>
- </body>
- </html>
|