File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed
src/components/observables Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change 11<template >
2- <div class = " absolute-full overflow-hidden invisible " style =" z-index : -1 " >
2+ <div :style = " absoluteFull " style =" z-index : -1 " >
33 <div
44 ref =" expand"
5- class = " absolute-full overflow-hidden invisible "
5+ :style = " absoluteFull "
66 @scroll =" onResize"
77 >
8- <div ref =" expandChild" class = " absolute-top-left transition-0 " style =" width : 100000px ; height : 100000px ;" ></div >
8+ <div ref =" expandChild" :style = " absoluteTop " style =" width : 100000px ; height : 100000px ;" ></div >
99 </div >
1010 <div
1111 ref =" shrink"
12- class = " absolute-full overflow-hidden invisible "
12+ :style = " absoluteFull "
1313 @scroll =" onResize"
1414 >
15- <div class = " absolute-top-left transition-0 " style =" width : 200% ; height : 200% ;" ></div >
15+ <div :style = " absoluteTop " style =" width : 200% ; height : 200% ;" ></div >
1616 </div >
1717 </div >
1818</template >
@@ -27,6 +27,23 @@ function getSize (el) {
2727
2828export default {
2929 name: ' q-resize-observable' ,
30+ data : () => ({
31+ absoluteFull: {
32+ position: ' absolute' ,
33+ top: 0 ,
34+ left: 0 ,
35+ right: 0 ,
36+ bottom: 0 ,
37+ overflow: ' hidden' ,
38+ visibility: ' hidden'
39+ },
40+ absoluteTop: {
41+ position: ' absolute' ,
42+ top: 0 ,
43+ left: 0 ,
44+ transition: ' 0s'
45+ }
46+ }),
3047 methods: {
3148 onResize () {
3249 const size = getSize (this .$el .parentNode )
You can’t perform that action at this time.
0 commit comments