Category "vuejs3"

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

How to get selected option text in vue form multiselect?

Currently i'm working with vue-form multiselect( https://www.npmjs.com/package/@vueform/multiselect) which is a vue select component. In this select box i need

How to maintain proper typescript type on Vue component data?

I'm working on a Vue project that I'm updating to Vue 3 with typescript. I've found a strange behavior with the typescript parser/compiler. I have the followin

Vue3 webcomponents production build problem

I'm trying to migrate my vue2 webcomponent to vue3, although the problem comes when i'm creating a build for production. I was using the vue-cli with --target w

Does Vue 3 Teleport only works to port outside vue?

Vue 3 has a new Teleport feature which replaces the portal-vue plugin in vue 2. However, I found that it is impossible to port a component to a place that is co

Could vue3 <script setup> use component is, how to make it work?

I am new beginner of vue3 and found that vue have three way to write component: <script setup> normal-setup/composition api options api. I know how to use