Answer the question
In order to leave comments, you need to log in
How to pass parameters when rendering a vue component?
I want to pass parameters to the component via render, but it doesn't work like this:
import Vue from 'vue'
import App from './App.vue'
window.app = function(opt){
new Vue({
el: opt.el,
render: h => h(App, {
props: {
items: opt.items
}
})
});
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question