|
197 | 197 | default: 'a, button' |
198 | 198 | }, |
199 | 199 | }, |
200 | | - inject: ["eventBus"], |
| 200 | + inject: ["eventBus", "layout"], |
201 | 201 | data: function () { |
202 | 202 | return { |
203 | 203 | cols: 1, |
|
301 | 301 | } |
302 | 302 | }, |
303 | 303 | mounted: function () { |
304 | | - this.cols = this.$parent.colNum; |
305 | | - this.rowHeight = this.$parent.rowHeight; |
306 | | - this.containerWidth = this.$parent.width !== null ? this.$parent.width : 100; |
307 | | - this.margin = this.$parent.margin !== undefined ? this.$parent.margin : [10, 10]; |
308 | | - this.maxRows = this.$parent.maxRows; |
| 304 | + this.cols = this.layout.colNum; |
| 305 | + this.rowHeight = this.layout.rowHeight; |
| 306 | + this.containerWidth = this.layout.width !== null ? this.layout.width : 100; |
| 307 | + this.margin = this.layout.margin !== undefined ? this.layout.margin : [10, 10]; |
| 308 | + this.maxRows = this.layout.maxRows; |
309 | 309 | if (this.isDraggable === null) { |
310 | | - this.draggable = this.$parent.isDraggable; |
| 310 | + this.draggable = this.layout.isDraggable; |
311 | 311 | } else { |
312 | 312 | this.draggable = this.isDraggable; |
313 | 313 | } |
314 | 314 | if (this.isResizable === null) { |
315 | | - this.resizable = this.$parent.isResizable; |
| 315 | + this.resizable = this.layout.isResizable; |
316 | 316 | } else { |
317 | 317 | this.resizable = this.isResizable; |
318 | 318 | } |
319 | | - this.useCssTransforms = this.$parent.useCssTransforms; |
| 319 | + this.useCssTransforms = this.layout.useCssTransforms; |
320 | 320 | this.createStyle(); |
321 | 321 | }, |
322 | 322 | watch: { |
|
417 | 417 | return navigator.userAgent.toLowerCase().indexOf("android") !== -1; |
418 | 418 | }, |
419 | 419 | renderRtl() { |
420 | | - return (this.$parent.isMirrored) ? !this.rtl : this.rtl; |
| 420 | + return (this.layout.isMirrored) ? !this.rtl : this.rtl; |
421 | 421 | }, |
422 | 422 | resizableHandleClass() { |
423 | 423 | if (this.renderRtl) { |
|
0 commit comments