feat: expand mini app on mounted
This commit is contained in:
@@ -35,10 +35,14 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import ProductList from "./components/ProductList.vue";
|
import ProductList from "./components/ProductList.vue";
|
||||||
import {ref} from "vue";
|
import {onMounted, ref} from "vue";
|
||||||
|
|
||||||
const goodsRef = ref();
|
const goodsRef = ref();
|
||||||
function scrollToProducts() {
|
function scrollToProducts() {
|
||||||
goodsRef.value?.scrollIntoView({ behavior: 'smooth' });
|
goodsRef.value?.scrollIntoView({ behavior: 'smooth' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
window.Telegram?.WebApp?.expand();
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,4 +6,3 @@ createApp(App).mount('#app')
|
|||||||
|
|
||||||
const tg = window.Telegram.WebApp;
|
const tg = window.Telegram.WebApp;
|
||||||
tg.ready();
|
tg.ready();
|
||||||
tg.expand(); // на весь экран
|
|
||||||
Reference in New Issue
Block a user