This commit is contained in:
tamaina 2020-02-22 01:03:50 +09:00 committed by GitHub
parent 3a3319ff52
commit ccc27bcc14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 13 deletions

View File

@ -40,7 +40,8 @@ export default Vue.extend({
}, },
data() { data() {
return { return {
gridInnerStyle: {} gridInnerStyle: {},
sizeWaiting: false
} }
}, },
mounted() { mounted() {
@ -59,6 +60,13 @@ export default Vue.extend({
}, },
size() { size() {
// for Safari bug // for Safari bug
if (this.sizeWaiting) return;
this.sizeWaiting = true;
window.requestAnimationFrame(() => {
this.sizeWaiting = false;
if (this.$refs.gridOuter) { if (this.$refs.gridOuter) {
let height = 287; let height = 287;
const parent = this.$props.parentElement || this.$parent.$el; const parent = this.$props.parentElement || this.$parent.$el;
@ -73,6 +81,7 @@ export default Vue.extend({
} else { } else {
this.gridInnerStyle = {}; this.gridInnerStyle = {};
} }
});
} }
} }
}); });