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