All Questions
85 questions
0
votes
1
answer
82
views
difference between vuejs local registration syntax
I found out there is two ways to make local registration in vuejs:
1) assigning components to a variable:
const components = { 'test-selector': TestSelector, };
2) declaring it as an object
...
1
vote
1
answer
386
views
Vuejs: Should I split views into small components?
I have a project that has 2 folders for components - 1) src/components/ and 2) src/views. In the first one I store general components such as a drawer or nav, and in the second I store pages (views).
...
0
votes
0
answers
148
views
Two Vue components conflicting each other while loading data
I have a "ProjectsSearchBar" component for searching and selecting projects that are making calls to API to fetch projects. I am trying to place two same components side by side. ...
0
votes
1
answer
1k
views
Binding v-model from of child component to its parent
In my parent component I have a simple input as
<input v-model="value" />
export default class ParentComponent extends Vue {
value = "" as string;
async check() {
try {...
0
votes
0
answers
101
views
How to set binded attribute to custom component in Vue
Hello I'm trying to add a custom Vue component to my template using the DOM, I already setted the properties, but I can't set the associated attribute of events in the custom component. Here is my ...
0
votes
1
answer
112
views
Refactoring vue component with inconsistent props
I want to refactor the Vue component where the same data comes in different structures.
Example Appointment.vue component:
<template>
<div>
<div v-if="config.data.user....
2
votes
1
answer
4k
views
Why is my Vue JS Nuxt lazy loaded component bundled in app.js, not loaded separately?
I've just started using Nuxt but have used VueJS for a while. For a test, I've tried lazy loading the tutorial component that is created with the create-nuxt-app command. (I've tried my own component ...
1
vote
0
answers
179
views
Vuejs component method generate html that have onclick and will call another method
Is there any solution when generating html on method, and the html tag have onclick event listener to other vuejs method?
Methods :{
methodOne(){
//...
return '<button class=&...
0
votes
2
answers
797
views
Vuejs method ajax call other method on component
how to call another method inside jquery ajax?
methods : {
calert(type,msg="",error=""){
console.log("call me");
},
getData(){
$.ajax({
...
2
votes
3
answers
2k
views
Vue js call method function of different page
Hey I am really new to VUE and for this project I have a button on one page which should trigger or call the function of another page. Everyone will be like why don't you have the button and function ...
2
votes
2
answers
19k
views
How to remove event listener from Vue Component
I have a Vue2 component which contains an added eventListener i created on mounted. I was wondering how do i properly remove this listener when the component is destroyed?
<template>
<div&...
2
votes
2
answers
313
views
delete input based on index of a click event from parent vue
I'm working with BootstrapVue.
I want to splice my inputs in my child.vue after clicking on a button in my parent.vue.
But every time I delete something in my parent.vue - which I can promise that it'...
0
votes
2
answers
839
views
trigger function in child.vue after clicking button in parent.vue
I'm working with BootstrapVue.
I have a method in my parent.vue where I pass a value (this.propsIndex) to my child.vue.
Now I want to use this value each time it will be clicked in a method of my ...
0
votes
1
answer
24
views
JS/Vue: Confirming a class is part of a public API?
I am using a library for tags in my Vue app and I need to change the tabindex and add an eventListener but I don't have the template accessible to add a custom eventListener to since it's an imported ...
0
votes
1
answer
233
views
How can I remove manually added event listeners on beforeDestory hook of one component before redirecting to any another component, in Vuejs2?
I want to know the concept of the below thing-
I have created one component and set up its respected event listeners. Now, I want to remove those listeners on this component's beforeDestroy hook ...