I am trying to use a v-if statement to show some HTML only if the archiveNote variable is not empty/null. Here is how it’s instantiated which is then passed in from this other Vue file The block of HTML still shows when archiveNote is console.log out as empty Answer If you want to show the <div> only when it is
Tag: vuejs2
t[this.activeSeriesIndex].data[0] is undefined in ApexCharts. How to correctly build the series array?
I’m a beginner in Vue and I’m using vue-apex chart to create a chart in my application. I want to display in chart, the values of the two component’s properties “uncorrectAns” and “correctAns” that I compute thanks to a specific method (computeStat()). When I run the application, the chart isn’t displayed and I get this error message on the browser
Vue.js – v-for to print object name only
I have a nested object and only wanted to print the object name. How do I do this in vue.js? This code prints the entire content of the object being iterated: How can I make it only print strings obj1 and obj2? Thanks! Answer Add key,index in v-for loop like v-for=”(obj,key,index) in object1″
Failed to mount component: template or render function not defined using vue.js
I’m learning vue. js .I’m trying to make simple form by using vue.js but I got above error while making a form. I tried but unable to fix the problem. Please help me. Answer UPDATE If you are using cli-vue : https://cli.vuejs.org/ Assume you put file in App.vue : Dont use jquery in Vue project. If you want to use
VUEX, what to do when $store.state is null
When users are not logged into my website, the state of user is set to null. However, this throws up a lot of issues on some pages where i look to see if this.$store.user For example, if I were to have a simple check such as and the user is not logged in (thus, setting the state of user to
Change buttons color in a vuetify list
After having tried to figure this out for two days I thought I will ask you. I think I do have a simple problem, however because of limited knowledge I’m not able to find a solution. Basically, I do have a list with OK/NOK buttons and I want to change the background color of the (clicked) button (either green or
Vue drag & drop in Recursive component & recursive nesting
Im working with Vue to create recursive Tree component, currently I have added support for checkboxes and expanding nodes, but Im having a bit of trouble with building drag & drop in recursive component Is there any way to implement drag & drop with this sample: Codesandbox Link I can get node that is dragged but on drop I do
Vue split components from a single .js file in multiple files
I have created a component inside my index.js (where my main Vue code is). Now I would like to modularize the project and put the component into a separate file. I don’t know how to do that because if I create e.g. optionalapm.js the main index.js returns an error that it can’t locate the vue component optionalapm which I included.
“Do not mutate vuex store state outside mutation handlers” error even after using computed var for prop
With the following component, I am getting an Error: [vuex] do not mutate vuex store state outside mutation handlers. error: For reference, here is headers.js: and BaseTableColumn.vue: The issue happens here: However, if I follow the docs like so: I still get the errors, specifically in the updated() hook and the highlightFirst() method, even though I’m not referencing or mutating
How can I reactively remove an object from an array which is passed as a prop so that it is reflected in the DOM?
I have the following blade file: where $items is a JSON array of objects pulled from the controller. Now, the items component looks like this: The computedItems property looks like: In item sub-component you have the ability to delete items through a method as follows: The event gets picked up by the parent (items component) and is handled: But for