vue-script-setup Questions

2

I have this component A with an exposed method send A.vue: <script setup lang="ts"> function send(data: string) { console.log(data) } defineExpose({ send }) </script> And t...
Cabinetwork asked 12/4, 2022 at 18:19

2

Solved

I'm trying to get computed to work in <script setup>: <template> <div> <p>{{ whatever.get() }}</p> </div> </template> <script setup> import {com...

2

Solved

when I write this code in vue 3 setup code block to get the input value follow this answer, this is part of the code: import { defineComponent } from "vue"; import { defineProps, defineEm...

1

Solved

Hello today i move to vue 3 with script setup. I try use onBeforeMount for load external data (async await). but receive error: "onBeforeMount is not defined" I going to documentation and...
Ilyssa asked 26/1, 2022 at 21:35

2

I noticed that to make a template ref in Vue 3 composition api <script setup>, I should make a variable name with the exact same as the ref value. For example in Vue 3 documentation: <temp...
Guillemette asked 15/8, 2021 at 6:35

2

Solved

I'm wondering how I can observe child properties from the parent component in Vue 3 using the composition api (I'm working with the experimental script setup). <template>//Child.vue <butt...
Officialism asked 21/2, 2021 at 14:48

2

Solved

I've created a starter project with vue ui (typescript, babel, linter). Everything works fine, but I can't quite understand how to make Composition API's setupmethod to work. It's simply not being ...

1

Solved

how to access app.config.globalProperties withing <script setup lang="ts"> ? I have looked around for several approaches: like this SO post, and tried to combine elements below: \\ ...
Fictile asked 24/4, 2021 at 4:48

1

Solved

I am trying to get the current path (something like "https://example.com/some/path") with Vue3 and Vue-router. Before, when using Vue2, I could get the current route using: // works with...

© 2022 - 2024 — McMap. All rights reserved.