Skip to content
Advertisement

Tag: vue.js

How does vue watch sublist change or v-model

I try to watch a list that has sub list and some <input> can change the sublist well. when I modify the input,watcher doesn’t work Answer Do a deep watch in order to watch nested changes and trigger the watch: Interesting: If the nested data is any of the following, the watch will not fire without a deep watch: array

Building Chrome Extensions with Vuejs and Vuecli

I’m currently building a Chrome Extension with a vuejs powered frontend. This worked pretty great using vuecli. Up until the point at which the app started using the Webextension-API. Normal websites do not have access to this API; registered Extensions do. So what’s a good setup for developing a vuejs-Extension with the power of using vuecli (which supports webpack tooling)?

[Vue warn]: Invalid prop: type check failed for prop “xxx”. Expected Number with value X, got String with value “X”

App.vue MyComponent.vue All works great until I increase the number un in the numeric textbox: (from initial ‘5’ to ‘6’): Error: vue.runtime.esm.js?2b0e:619 [Vue warn]: Invalid prop: type check failed for prop “daysNumber”. Expected Number with value 6, got String with value “6”. found in Answer You need to add the .number modifier to v-model, otherwise the type from the input

custom image slider in vue js

Tryin to build a simple custom image slide and mostly make it work except one thing. When :src data changes, I want to add a transition like opacity:0 ~ 1 but couldn’t achieve that part. Here is the slide. template script what is best and simple possible way to add a transition when :src changes every 5s, appreciate if anyone

Vuejs: how do you pass class(classes) to template?

What is the right syntax to pass class to %item.class% in the following code? Any syntax like [item.class] or {{ item.class }} passes it as string without render. How to pass it properly? How to pass several classes and apply to several tags (a, span etc.) nested in one template? Pass an array? How to iterate it? Thanks beforehands 🙂

Using v-tooltip on custom (non native) component

I have a custom component which is being used application wide. But, in some place I want to show tooltip on hover on this component, according to vuetify docs this should work but it doesn’t because <custom-component /> is not a native component. And to have this functionality for native component a .native modifier is to be used. Example: @click.native=”someMethod”

Advertisement