|
196 | 196 | return [];
|
197 | 197 | }
|
198 | 198 | },
|
| 199 | + gridWidth: { |
| 200 | + type: Number, |
| 201 | + default: -1 |
| 202 | + }, |
199 | 203 | cellWidth: {
|
200 | 204 | type: Number,
|
201 | 205 | default: 80
|
|
242 | 246 | }
|
243 | 247 | },
|
244 | 248 | computed: {
|
| 249 | + gridResponsiveWidth: function() { |
| 250 | + return this.gridWidth < 0 ? this.windowWidth : Math.min(this.windowWidth, this.gridWidth); |
| 251 | + }, |
245 | 252 | height: function() {
|
246 | 253 | return Math.ceil(this.items.length / this.rowCount) * this.cellHeight;
|
247 | 254 | },
|
|
251 | 258 | };
|
252 | 259 | },
|
253 | 260 | rowCount: function() {
|
254 |
| - return Math.floor(this.windowWidth / this.cellWidth); |
| 261 | + return Math.floor(this.gridResponsiveWidth / this.cellWidth); |
255 | 262 | },
|
256 | 263 | rowShift: function() {
|
257 | 264 | if (this.center) {
|
258 |
| - var contentWidth = this.items.length * this.cellWidth, rowShift = contentWidth < this.windowWidth ? (this.windowWidth - contentWidth) / 2 : this.windowWidth % this.cellWidth / 2; |
| 265 | + var contentWidth = this.items.length * this.cellWidth, rowShift = contentWidth < this.gridResponsiveWidth ? (this.gridResponsiveWidth - contentWidth) / 2 : this.gridResponsiveWidth % this.cellWidth / 2; |
259 | 266 | return Math.floor(rowShift);
|
260 | 267 | }
|
261 | 268 | return 0;
|
|
494 | 501 | }
|
495 | 502 | };
|
496 | 503 | }, function(module, exports, __webpack_require__) {
|
497 |
| - exports = module.exports = __webpack_require__(0)(), exports.push([ module.i, "\nbody {\n margin: 0;\n padding: 0;\n}\n.v-grid {\n display: block;\n position: relative;\n width: 100%;\n}\n", "" ]); |
| 504 | + exports = module.exports = __webpack_require__(0)(), exports.push([ module.i, ".v-grid{display:block;position:relative;width:100%}", "" ]); |
498 | 505 | }, function(module, exports, __webpack_require__) {
|
499 |
| - exports = module.exports = __webpack_require__(0)(), exports.push([ module.i, "\n.v-grid-item-wrapper {\n display: block;\n position: absolute;\n box-sizing: border-box;\n left: 0;\n top: 0;\n user-select: none;\n transform: translate3d(0px, 0px, 0px);\n z-index: 1;\n}\n.v-grid-item-wrapper.v-grid-item-animate {\n transition: transform 800ms ease;\n}\n", "" ]); |
| 506 | + exports = module.exports = __webpack_require__(0)(), exports.push([ module.i, ".v-grid-item-wrapper{display:block;position:absolute;box-sizing:border-box;left:0;top:0;user-select:none;transform:translateZ(0);z-index:1}.v-grid-item-animate{transition:transform .8s ease}", "" ]); |
500 | 507 | }, function(module, exports, __webpack_require__) {
|
501 | 508 | __webpack_require__(14);
|
502 | 509 | var Component = __webpack_require__(1)(__webpack_require__(5), __webpack_require__(12), null, null);
|
|
561 | 568 | }, function(module, exports, __webpack_require__) {
|
562 | 569 | var content = __webpack_require__(8);
|
563 | 570 | "string" == typeof content && (content = [ [ module.i, content, "" ] ]), content.locals && (module.exports = content.locals);
|
564 |
| - __webpack_require__(2)("0a97df14", content, !0); |
| 571 | + __webpack_require__(2)("105852af", content, !0); |
565 | 572 | }, function(module, exports, __webpack_require__) {
|
566 | 573 | var content = __webpack_require__(9);
|
567 | 574 | "string" == typeof content && (content = [ [ module.i, content, "" ] ]), content.locals && (module.exports = content.locals);
|
568 |
| - __webpack_require__(2)("4be927ea", content, !0); |
| 575 | + __webpack_require__(2)("38de0bc4", content, !0); |
569 | 576 | }, function(module, exports) {
|
570 | 577 | module.exports = function(parentId, list) {
|
571 | 578 | for (var styles = [], newStyles = {}, i = 0; i < list.length; i++) {
|
|
0 commit comments