10,668 questions
1
vote
0
answers
53
views
Vue 3 Component Typing Issues
I have a list of vue 3 editor components, that I dynamically display based on the "page" the user is currently on.
Currently they are stored in a Component[], but I would like to make sure:
...
0
votes
0
answers
28
views
Custom Vue component referenced in vitepress home page front matter isn't rendering
I've written a custom text rotator Vue component that does a marquee style rotation over a list of strings for use in the home page of a Vitepress Website. I want to use it in the hero.text field of ...
0
votes
0
answers
59
views
Parsley.js custom validator not working while built-in validators do
I’m working on a Laravel + Vue project and using Parsley.js for form validation.
Parsley works fine for the built-in validators like data-parsley-required, data-parsley-pattern, and data-parsley-type....
0
votes
0
answers
69
views
Tantsack Virtualized Dynamic Height Rows
I have been trying to create a dynamic grid using tanstack virtualized rows (the number of columns being tied to window width)
The issue is that my rows expand in height due to window resize, but my ...
0
votes
1
answer
57
views
Style individual `RouterLink`s
Suppose a simple Vue.js component:
<template>
<RouterLink to="#">AAA</RouterLink>
<RouterLink to="#">BBB</RouterLink>
</template>
I cannot ...
1
vote
4
answers
162
views
How to access raw text content of slot?
I am trying to access the raw content of the default slot in Vue.js (3.5). However all I seem to be able to access, no matter what method I try, is the content all compressed into a single line.
I ...
0
votes
1
answer
34
views
Using properties in router-link to field
I have a list of items each with a name and numerical ID. Each one I want to render as a component with a link to a page for that item. This requires me to have a <router-link> tag. I cannot ...
0
votes
1
answer
51
views
How to convert time-only input to full DateTime object using VueDatePicker?
<template>
<VueDatePicker
v-model="deliveryTime"
time-picker
/>
</template>
<script setup>
import { ref } from 'vue'
const deliveryTime = ref(new Date())...
2
votes
2
answers
347
views
How to set a select options in Shadcn-vue AutoForm with Zod schema?
I'm using ShadCN Vue with AutoForm and zod for schema validation. I'm trying to dynamically populate the select options for a field named accounts using an array of account objects.
My code:
<...
0
votes
0
answers
64
views
How to display an image in a GUI using Trame, Vuetify
I am new to Trame and Vuetify. I need to show an image in the GUI. The GUI would run on a localhost. My MWE is given below:
from trame.app import get_server
from trame.widgets import html, vuetify, ...
0
votes
0
answers
65
views
How to render dynamic templates in Vue3
I have this component which I used in vue2 to render templates dynamically. But this stopped working in vue3. I have the code as below.
import { defineComponent, h } from 'vue'
import { } from '...
0
votes
0
answers
65
views
Why does update in parent component establish reactivity with AG grid?
I'm playing around with Vue Data Grid (AG Grid) and stumbled across a strange behavior wrt reactivity, exemplified by the following minimal component App (plain JS):
<script setup>
import {...
0
votes
2
answers
41
views
Vue emit from child and update state in parent
I'm trying to learn Vue and want to build a parent component of shopping list (my training excercise). The parent will manage the state and it contains two child components: 1) the table with products ...
-1
votes
1
answer
62
views
Vue.js 3 - pass contents of a component's slot to another slot outside it
I have a component Foo with the following contents:
<Bar>
<template #option="slotProps" v-if="$slots.option">
<slot name="option" v-bind="...
0
votes
1
answer
44
views
Dynamically loading components based on tag-name
I'm trying to automatically load components from a URL while parsing HTML templates, based on tag names. i.e. If an tag name ends with Component (like xxxComponent) this is a component which should be ...
1
vote
1
answer
891
views
How to remove unused Tailwindcss v4 classes when building a library with Vite?
I'm building a Vue 3 component library using Vite and Tailwind CSS, but I want to ensure that the final build only includes the Tailwind classes that are actually used in my components.
Right now, the ...
0
votes
0
answers
19
views
How to write a Markdown extension in VuePress
I want to add an extension to VuePress to be able to make left indents for text.
For this, I created a project
pnpm create vuepress-theme-hope my-docs
Added a plugin
@vuepress/plugin-register-...
0
votes
1
answer
54
views
cases for using $event as param of a function
I have a basic question related to argument of a function.
when emitting an event from a child to a parent or when triggering a click event, I've seen in somme cases the add of $event as a parameter ...
0
votes
1
answer
108
views
How to wait for an external script to be ready in Vue 3?
I am trying to integrate Google Pay as a component in an application. I need to load the Google Pay Javascript file before I perform any actions. This is what I am doing:
onMounted(()=>{
const ...
0
votes
1
answer
60
views
How does one resolve this: 'Uncaught ReferenceError: Cannot access 'NavBar' before initialization'?
<template>
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<router-link class="navbar-brand" ...
2
votes
2
answers
133
views
Why are child nodes not triggering an emit event in a tree?
I have a Vue component that recursively generates a tree recursively with a <CustomTreeNode> component. It looks something like this:
<template>
<div>
<div>
<...
0
votes
0
answers
44
views
Vue modal adding chapter of same subject
<template>
<div class="container mt-5">
<div class="row">
<div class="col-md-4 mb-4" v-for="subject in subjects.subject&...
1
vote
1
answer
548
views
Why should one use provide/inject in Vue 3
I have an application where one of its components is responsible for creating and managing a tree. Other components in this application sometimes need the tree data.
One of the available solutions for ...
1
vote
1
answer
50
views
How to hide text field floating suggestions when field is left, but not if a suggestion is clicked?
I made a vue component (my first ever!) that aims to show suggestions for options as you type:
const AutoCompleteComponent = {
data() {
return {
open: false,
...
0
votes
1
answer
76
views
Vue Component Renders Twice On Page
In my HomeView component I'm importing the AsideCTA component:
<template>
<TheHero />
<TheServices />
<TheBundles />
<AsideCTA title="Kontakta oss!" url=&...
3
votes
1
answer
62
views
Why is a third image briefly shown during flip animation in Vue.js?
I’m working on a Vue.js component where I’m creating a flip animation with images that change every few seconds. The goal is to randomly change the image, but there is an issue during the transition.
...
1
vote
2
answers
335
views
How To Edit Refs Used As Props In Vue.Js
I have a child component in Vue.js that gets passed a prop from the parent component. While the child component can read the prop, it can not write to the prop without throwing a TypeScript read-only ...
2
votes
0
answers
70
views
How to use classes to style child component's root and non-root elements in Vue 3?
I'm starting to implement a reusable Vue component library for in-house use on a team of 20+ developers across a couple of applications. A common pattern I have used in the past in Vue 2 is applying a ...
0
votes
1
answer
52
views
Message is added but isn't displayed
The toastmessages from PrimeVue ToastEventBus are added to the DOM but not displayed. Does anyone know why?
Based on this answer I have the following in page.
<!doctype html>
<html lang="...
0
votes
1
answer
1k
views
PrimeVue - How to use reset emit to clear form?
I've been experimenting with PrimeVue and am trying to understand how to use their forms. They don't have any example of clearing the form fields. However, there is mention of a "reset" ...
0
votes
0
answers
29
views
Image route that is dynamically generated, not html content type
I have a Vue3 SPA that generates dashbaords and such. When I visit https://website.com/#/ it loads my app. I want to visit https://website.com/#/dynamic-img and have the response be a image/png media ...
0
votes
0
answers
56
views
Vue 3 Carousel Uncaught TypeError: Cannot read properties of null (reading 'refs') within ES module
This is a follow up question to my previous question here Vue3 Carousel as ES module in Laravel blade template
I am using Vue 3 Carousel as an ES module to separate my components buit I'
Uncaught ...
0
votes
0
answers
45
views
Dynamic Components Not Rendering from the Database
I am trying to integrate dynamic components inside my Vue 3 blog articles stored in MongoDB to reduce the work of specifying image details every time. However, the image component is not being ...
1
vote
1
answer
34
views
Why do hidden elements change the size of vuetify select? (conditional rendering)
I have a vuetify select where I want to restrict the text when too many elements are selected.
So I used conditional rendering to just display what I want:
<v-col cols="auto">
<v-...
1
vote
0
answers
122
views
Zod + Quasar: Error - Unresolvable type reference or unsupported built-in utility type
Question Body:
What are you trying to accomplish?
I'm building a custom input component using Vue 3, Quasar, and Zod, with the goal of achieving both:
Static type checking: Ensuring defineProps uses ...
2
votes
1
answer
74
views
Vuetify3 autocomplete with per-item tooltips not clickable
Given Vue3 + Vuetify3 code:
<template>
<v-autocomplete :items="items" :value="selectedItem">
<template v-slot:item="data">
<v-tooltip>
...
0
votes
0
answers
165
views
How to create/export typescript declaration files in vue3 + vite library mode
I’m encountering some issues with creating and exporting TypeScript types in my library. Specifically, I have several challenges:
#1. Build Errors with Vite
When I try to build the library using vite ...
-2
votes
1
answer
41
views
Vuetify 3 | how we can close dailog programtically with composable
hi i am doing crud in vuetify 3 and for create form i am using v-dailog, i wanted to close v-dailog once form save data to server successfully. i have used composable to handle my all logics. let me ...
1
vote
0
answers
84
views
How to simulate the behavior of closing v-dialog in Vitest?
I try the fireEvent to click outside or emitted 'update:modelValue' but the v-dailog element still visible. So how can I correctly simulate the closing behavior of v-dialog ? Thanks in advance for ...
0
votes
1
answer
22
views
Tailwind classes used by my vue component within my npm pacakge not available when package is imported
I have the below Vue Component:
// src/components/CodeBlock.vue
<script setup>
import { ref } from 'vue';
const props = defineProps({
value: String
})
const text = ref(...
0
votes
0
answers
503
views
currentRenderingInstance.ce is null when rendering Vue compoments with Inertia in production
I'm using Laravel 11 and Inertia.js with Vue to build a multi page web application. I use Coolify with nixpacks to deploy my application on a server.
When making a request, the server always returns a ...
1
vote
1
answer
86
views
Vue 2 to 3 upgrade: simplifying checkbox question component
I have a checkbox form question component I made in Vue 2 and i'm migrating to Vue 3 so want to simplify it as much as possible and make sure i've taken advantage of all the new feature of Vue 3.
...
-1
votes
1
answer
57
views
I dont have VueRouter or Router from 'vue-router' [closed]
I dont know how to make a web router in vue because im a beginner, so in every tutorial, i see that they import router or vuerouter from 'vue-router'
What i've already tried? i ran npm install vue-...
0
votes
0
answers
32
views
How are cascading router-view elements handled?
TL;DR: how are the priorities of Vue routes (global vs child) calculated?
Quasar is a Vue framework that can bootstrap applications. I am trying to follow its suggested structure but I am not sure how ...
0
votes
1
answer
131
views
Is it possible to use v-slot in a single file component?
I'm using vue3
ComponentA.vue
<template>
<slot name="label"></slot>
<slot></slot>
</template>
Simply using a template will work.
<template>
&...
0
votes
1
answer
57
views
The global component not found In the TSX file ! Vue3 + vite + TS
1. Project initialization with Vite.js
pnpm create vite
√ Project name: ... demo
√ Select a framework: » Vue
√ Select a variant: » Customize with create-vue ↗
$ Vue.js - The Progressive JavaScript ...
0
votes
1
answer
35
views
Updating/ Removing recursive child components
I have an application which needs to walk and display a directory structure similar to a filesystem. Below is an example of how this would work with a filesystem.
App.vue
<script setup>
import ...
0
votes
1
answer
79
views
local registration went wrong
I generated a new project using vue 2, then I wanted to apply local registration, but I"m getting compile errors
the following shows the changes files:
main.js
import Vue from 'vue'
import ...
0
votes
0
answers
42
views
Vuelidate is always fail on validation
So I have an a component with composable, one of them is modal, so the modal is only the canvas, I just pass the slot to the body, but when I do a create data, the vuelidate is always failing even ...
0
votes
1
answer
50
views
Conditional rendering of multiple tables in Vue.js
I'm building a Vue.js application that requires conditional rendering of multiple tables based on certain conditions. I have a set of flags that determine which tables should be rendered, and I'm ...