Category "vuejs3"

ref vs reactive in Vue 3?

Looking at some examples of some people's preview tutorials for Vue 3. [Currently beta right now] I've found two examples: Reactive <template> <butto

Call a function from another component using composition API

Below is a code for a header and a body (different components). How do you call the continue function of the component 2 and pass a parameter when you are insid

After test is run, Error "TypeError: Cannot read property '$model' of undefined..." appears

UPDATE: I've found out that i have to mock certain functions but it is still a hell of a job :) I've been stuck on this particular problem for almost 3 weeks no

Vue3 Manually Render Slot Content

I'm trying to parse out the contents of a slot and render the contents in multiple places. The idea is to create a wizard that allows each step to be contained

Vue3 Manually Render Slot Content

I'm trying to parse out the contents of a slot and render the contents in multiple places. The idea is to create a wizard that allows each step to be contained

Laravel Inertia prop not passing values

When calling an edit function the prop mealService is passing null values and will not populate form fields with values. It looks like the controller isn't load

Handle a click event on Splide component

I'm using Vue-splide with the latest version. I want to handle the "click" event, so I wrote <Splide @splide:click="test" :options="options"> functio

How to use v-model on component in vue 3 script setup

I want to add a v-model on a component but I got this warning: [Vue warn]: Component emitted event "input" but it is neither declared in the emits option nor as

Unable to filter data in props according to search criteria in Vue 3

I'm designing a client management system linked to a mySQL database and is trying to filter this displayed data from the database that is called through an API

Vue 3 - emit is not a function

I'm having a strange problem using emit in Vue 3 Composition API + Vite. I want to make a simple emit from a child component to a parent. The code of the child:

How to display custom building on mapbox-gl map

I wan't to display my own buildings on map(as in example). They should be static - my screen example At screenshot you can see example with marker building(it m

Using layout property in <script setup> tag

Is there any way to use layout property of inertiajs for vue 3 in <script setup> tag? In other words, I am asking for an equivalent of the following code,

How to `emit` event out of `setup` method in vue3?

I know I can call the emit method from the setup method, but is there any way to emit event from any other functions without passing the emit method from setup

How to pass an argument to Pinia store?

I'm making a session API call in main.js and using values from the response as the initial value for my root store. In vuex it's handled this like, DataService.

Vue.js 3 use autofocus on input with ref inside a method

I worked with Vue2, but I recently try Vue 3. I have simple problem: <input ref="myinput" /> <button @click="submitData" /> I want to set "focus"

Extract modelValue logic to composable

I'm transitioning from Vue 2 to Vue 3 and I'm having trouble with composables. I have a bunch of components that inherits modelValue. So, for every component th

Vue.js 3: Cannot import Vue global object

I'm going crazy trying to reconcile the Vue 3 CLI output into something that works with various tutorials and plugins that all use the Vue object, as in Vue.cre

How to make vue3 import async dynamic component work?

I am a beginner using vue3. We can use dynamic component like this: <script setup> import CommonLayout from "@/components/Layout/CommonLayout.vue"; </s

Vue 3 how to get information about $children

This my old code with VUE 2 in Tabs component: created() { this.tabs = this.$children; } Tabs: <Tabs> <Tab title="tab title"> .... <

How can I use async/await in the Vue 3.0 setup() function using Typescript

(This question has been answered for JavaScript, see below, but this question is specific for TypeScript, which behaves differently) I'm trying to use async fun