10,682 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 '...
-1
votes
0
answers
42
views
My Axios code successfully calls API endpoints but data doesn't work with Vue components
Link to my Python backend code.
Link to my separate Axios code (which works).
Link to my Vue project with the Axios code built in (which doesn't).
I posted some API questions here a few days ago. ...
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 {...
0
votes
2
answers
35
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
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" ...
2
votes
2
answers
120
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
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,
...