|
192 | 192 | default: 'a, button' |
193 | 193 | }, |
194 | 194 | }, |
195 | | - inject: ["eventBus"], |
| 195 | + inject: ["eventBus", "layout"], |
196 | 196 | data: function () { |
197 | 197 | return { |
198 | 198 | cols: 1, |
|
296 | 296 | } |
297 | 297 | }, |
298 | 298 | mounted: function () { |
299 | | - this.cols = this.$parent.colNum; |
300 | | - this.rowHeight = this.$parent.rowHeight; |
301 | | - this.containerWidth = this.$parent.width !== null ? this.$parent.width : 100; |
302 | | - this.margin = this.$parent.margin !== undefined ? this.$parent.margin : [10, 10]; |
303 | | - this.maxRows = this.$parent.maxRows; |
| 299 | + this.cols = this.layout.colNum; |
| 300 | + this.rowHeight = this.layout.rowHeight; |
| 301 | + this.containerWidth = this.layout.width !== null ? this.layout.width : 100; |
| 302 | + this.margin = this.layout.margin !== undefined ? this.layout.margin : [10, 10]; |
| 303 | + this.maxRows = this.layout.maxRows; |
304 | 304 | if (this.isDraggable === null) { |
305 | | - this.draggable = this.$parent.isDraggable; |
| 305 | + this.draggable = this.layout.isDraggable; |
306 | 306 | } else { |
307 | 307 | this.draggable = this.isDraggable; |
308 | 308 | } |
309 | 309 | if (this.isResizable === null) { |
310 | | - this.resizable = this.$parent.isResizable; |
| 310 | + this.resizable = this.layout.isResizable; |
311 | 311 | } else { |
312 | 312 | this.resizable = this.isResizable; |
313 | 313 | } |
314 | | - this.useCssTransforms = this.$parent.useCssTransforms; |
| 314 | + this.useCssTransforms = this.layout.useCssTransforms; |
315 | 315 | this.createStyle(); |
316 | 316 | }, |
317 | 317 | watch: { |
|
412 | 412 | return navigator.userAgent.toLowerCase().indexOf("android") !== -1; |
413 | 413 | }, |
414 | 414 | renderRtl() { |
415 | | - return (this.$parent.isMirrored) ? !this.rtl : this.rtl; |
| 415 | + return (this.layout.isMirrored) ? !this.rtl : this.rtl; |
416 | 416 | }, |
417 | 417 | resizableHandleClass() { |
418 | 418 | if (this.renderRtl) { |
|
0 commit comments