diff --git a/client/web/compose/src/components/PageBlocks/Wrap/base.vue b/client/web/compose/src/components/PageBlocks/Wrap/base.vue index ba8d7da228..a09ab7a8f9 100644 --- a/client/web/compose/src/components/PageBlocks/Wrap/base.vue +++ b/client/web/compose/src/components/PageBlocks/Wrap/base.vue @@ -34,7 +34,7 @@ export default { }, isBlockOpened () { - return this.block.blockID === this.$route.query.blockID + return this.block.blockID === this.$route.query.magnifiedBlockID }, headerSet () { diff --git a/client/web/compose/src/components/Public/Page/Block/Modal.vue b/client/web/compose/src/components/Public/Page/Block/Modal.vue index 05cfd9285c..e9abb0d45a 100644 --- a/client/web/compose/src/components/Public/Page/Block/Modal.vue +++ b/client/web/compose/src/components/Public/Page/Block/Modal.vue @@ -76,26 +76,26 @@ export default { }, watch: { - '$route.query.blockID': { + '$route.query.magnifiedBlockID': { immediate: true, - handler (blockID, oldBlockID) { - if (!blockID) { + handler (magnifiedBlockID, oldMagnifiedBlockID) { + if (!magnifiedBlockID) { this.showModal = false return } - if (this.showModal && (blockID !== oldBlockID)) { + if (this.showModal && (magnifiedBlockID !== oldMagnifiedBlockID)) { this.showModal = false setTimeout(() => { - this.$router.push({ query: { ...this.$route.query, blockID } }) + this.$router.push({ query: { ...this.$route.query, magnifiedBlockID } }) }, 300) return } setTimeout(() => { - this.loadModal(blockID) + this.loadModal(magnifiedBlockID) }, 100) }, }, @@ -112,8 +112,8 @@ export default { methods: { magnifyPageBlock ({ blockID, block } = {}) { this.customBlock = block - blockID = blockID || (block || {}).blockID - this.$router.push({ query: { ...this.$route.query, blockID } }) + const magnifiedBlockID = blockID || (block || {}).blockID + this.$router.push({ query: { ...this.$route.query, magnifiedBlockID } }) }, loadModal (blockID) { @@ -148,7 +148,7 @@ export default { }, hideModal () { - this.$router.push({ query: { ...this.$route.query, blockID: undefined } }) + this.$router.push({ query: { ...this.$route.query, magnifiedBlockID: undefined } }) }, }, }