Skip to content
Advertisement

Tag: vue.js

Unable to require() a variable path from props in VueJS

I am sending data – a URL to a local image file, from parent to child, and when I load it in child component’s it shows an error, but if I directly load it, it works. Code: In parent.vue component’s data: In child.vue component’s mounted() And console.log(this.item.src) gives exactly the same string, so the child is actually getting the data

Control webpack verbosity when programmatically starting vue-cli-service serve

I’m trying to run vue-cli-service serve from inside a Node.js application like this: And it works. But when I do it in production mode (change service.init(“development”) to service.init(“production”)), I don’t see the webpack “building” progress anymore. Hence my question: how to start a Vue server in production mode, but keep webpack progress printed to the console? Answer Progress is reported

Vue Component Props only available on $vnode

I’m new to the World of Vue.js and I have to build a recursive Component renderer that turns JSON into rendered Vue components. So far the recursive rendering works just fine, except for the props I’m passing to the createElement function (code below 😉 ) is not available as props, but inside the $vnode.data object. Any ideas what I’m missing?

dynamically render vue template

I have vue template data as string. For example, String s = “<div>{{myData}}</div>” And now I want to render in my already defined vue component. Now I want the output as IRONMAN How can i achieve this? Pleas help. Thanks Answer You can have a single file component and do this – I have one called Dynamic.vue which accepts a

Why WebStorm show errors in gql query inside apollo object in Vue component or .grapgql files

I have a problem with WebStorm syntax highlighting. I created valid GraphQL query which works on localhost app but WebStorm says that unknown field “familyMembers” on object type “Query” and highlights the whole query in red. I am really confused but maybe I should change something inside apollo.config.js – if yes please tell me what. HelloWorld.vue apollo.config.js Some screenshots: Answer

is There an easy way to get all data from vuejs?

I have this data’s is there a way to get all of these? already tried this._data.forEach but it is not working thanks! Answer Vue uses underscore as a prefix for its internal properties. You should avoid using them. The data object for an instance is accessible via the $data property. https://v2.vuejs.org/v2/api/#vm-data So within an instance you can get that object

Advertisement