108,131 questions
1
vote
1
answer
71
views
Setting default value in USelectMenu
I am trying to populate a USelectMenu and set a default value. However the control shows the id and not the label:
This is my code:
<template>
<div class="p-8">
<h1 ...
1
vote
1
answer
60
views
VueJs emit event to parent template
I have a page that inherits from a base template (GuestLayout)
GuestLayout
<script>
import Toast from '../Components/Toast.vue'
export default {
components: {
Toast
},
data()...
0
votes
1
answer
41
views
What are the possible outcomes of the event value from update:modelValue of a Vuetify Datepicker?
So having a look at the documentation we see that when a Vuetify Datepicker component raises the update:modelValue event it passes a value of type [unknown].
My own component is working with Date | ...
-1
votes
2
answers
56
views
Is the Vue template sourced predictibly?
I have a moderately complex set of containers displayed conditionally:
<div v-for="activity in allActivities" :key="activity.id">
<div v-if="something(activity)&...
0
votes
2
answers
186
views
Main chunk in Webpack references the wrong runtime chunk
In an existing web app written in Vue and PHP, we are trying to add a Micro Frontend using Module Federation.
After we configured the app, I found out that the watch command wasn't working correctly. ...
104
votes
28
answers
173k
views
How do I fix a "Vue packages version mismatch" error on Laravel Spark v4.0.9?
When I run npm run dev on a Laravel Spark v4.0.9 app, I get the following error:
Module build failed: Error:
Vue packages version mismatch:
- [email protected]
- [email protected]
This may cause ...
76
votes
5
answers
93k
views
Copy text to clipboard: Cannot read properties of undefined reading 'writeText'
I have a button
When I clicked on COPY
copyImageLinkText({ mouseenter, mouseleave }, e) {
this.showCopiedText = !this.showCopiedText
navigator.clipboard.writeText(this.imageLink)
clearTimeout(...
117
votes
12
answers
184k
views
Enclosing a router-link tag in a button in vuejs
Can I wrap or enclose a router-link tag in a button tag?
When I press the button, I want it to route me to the desired page.
112
votes
9
answers
133k
views
Vue best practice for calling a method in a child component
I have been reading lots of articles about this, and it seems that there are multiple ways to do this with many authors advising against some implementations.
To make this simple I have created a ...
195
votes
6
answers
597k
views
Vue.js get selected option on @change
I have a combobox and want to do something different based on the selected combobox. I use a separate vue.html and TypeScript file.
Here's my code:
<select name="LeaveType" @change="...
0
votes
1
answer
56
views
How to intercept a form submit in websocket connection?
I have "inherited" a piece of code from a chat application. I would like to add some custom checks on the user input upon submission, allowing the submit to be aborted on client side if ...
72
votes
8
answers
94k
views
Vue.js 3 - replace/update reactive object without losing reactivity
I need to update a reactive object with some data after fetching:
setup(){
const formData = reactive({})
onMounted(() => {
fetchData().then((data) => {
if (data) {
...
1
vote
1
answer
51
views
404 error has been returned after "connect-history-api-fallback" middleware handed request
Need to provide the HTML5 mode for Vue frontend and Express backend.
Client:
import { createApp as createVueApplication } from "vue";
import {
createRouter,
createWebHistory,
type ...
0
votes
2
answers
51
views
How to copy values from an object to another limiting to properties of another object in vue.js/TypeScript?
In a TypeScript-based vue.js 3 app, some values are provided as part of the initialization. Those values are automatically set to the props variable by vue.js. As those values can be updated by an ...
0
votes
0
answers
66
views
How to keep buttons always at the bottom of the Ion Sheet Modal?
I am using ion modal with breakpoints so it has handle and I can resize it.
Good State #1
Good State #2
Here in this picture you can see the correct thing:
And also when I click submit it is correct ...
45
votes
13
answers
112k
views
SyntaxError: ambiguous indirect export: default Error when importing my own class
I have written a validation class and want to include it in my VueJS 3 project. Unfortunately I get the following error: SyntaxError: ambiguous indirect export: default
This is my code:
// ..classes/...
148
votes
14
answers
197k
views
vue js watch multiple properties with single handler
Currently I have to watch a few properties. And if each of them changes, I have to invoke the same function:
export default{
// ...... rest of code
watch: {
propa: function(after,before) {
...
0
votes
0
answers
36
views
Reactivity issue with TRichSelect, it works but not when called by an internal function [duplicate]
I am using Vue 2 in my application, and the TRichSelect component from the VueTailwind library is not reactive when I populate the v-model variable through an internal function. It works correctly ...
105
votes
8
answers
136k
views
How to use props in <script setup> in vue3
Just like the title says,
related Links:
New script setup (without ref sugar)
<template>
<TopNavbar title="room" />
<div>
{{ no }}
</div>
</template>
...
220
votes
3
answers
120k
views
How to create and use an optional parameter in Vue Router?
I need to route to a certain component in two ways - one with a param, one without. I have searched for optional params and somehow can't find much info.
So my route:
{
path: '/offers/:member',
...
120
votes
8
answers
65k
views
where to find or how to set htmlWebpackPlugin.options.title in project created with vue cli 3?
I wanted to set title to my webpage created with vue cli 3 and thus looked into public/index.html. There, I found <title><%= htmlWebpackPlugin.options.title %></title>.
How do I set ...
68
votes
10
answers
152k
views
Jest worker encountered 4 child process exceptions, exceeding retry limit
I am new to vue and jest testing, and I keep getting this error when running a specific test. I understand this is a general error, but I am unsure how to drill down and figure out what is wrong.
Here ...
0
votes
0
answers
35
views
Navigating to an anchor in Vue SPA not working in Safari
I have a page rendered using Vue, as part of an SPA app. In that page there is a header with an id element, but if I try to navigate to it, either as direct URL or a link in the page then no ...
79
votes
6
answers
86k
views
Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated
How can I solve this warning when creating laravel project?
Steps to replicate:
composer create-project --prefer-dist laravel/laravel example
cd example
composer require laravel/ui
php artisan ui vue ...
45
votes
5
answers
175k
views
How to resolve "Error: error:0308010C:digital envelope routines::unsupported" Nodejs 18 error [duplicate]
I need help with my NuxtJS application.
I recently had ESLint conflicts in the app after I left it for some time without updating (2 months). So after I started working on it, it presented a challenge ...