All Questions
Tagged with vue-component vue.js
9,595 questions
0
votes
0
answers
40
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
40
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 {...
-1
votes
1
answer
38
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
34
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
112
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
12
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
44
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
73
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
53
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" ...
0
votes
0
answers
41
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
47
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
45
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
62
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
46
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.
...
2
votes
0
answers
50
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 ...