Vue.js 当与Quasar对话框插件一起使用时,如何将道具传递给组件
根据与Vue.js 当与Quasar对话框插件一起使用时,如何将道具传递给组件,vue.js,quasar,Vue.js,Quasar,根据与对话框一起使用的自定义组件,插件可以具有道具。但我不知道如何通过 this.$q.dialog({component: CustomComponent,}) 可以在逗号后添加它们的状态,如下所示: this.$q.dialog({ component: CustomComponent, // optional if you want to have access to // Router, Vuex store, and so on, in your // cust
对话框一起使用的自定义组件,插件
可以具有道具
。但我不知道如何通过
this.$q.dialog({component: CustomComponent,})
可以在逗号后添加它们的状态,如下所示:
this.$q.dialog({
component: CustomComponent,
// optional if you want to have access to
// Router, Vuex store, and so on, in your
// custom component:
parent: this, // becomes child of this Vue node
// ("this" points to your Vue component)
// (prop was called "root" in < 1.1.0 and
// still works, but recommending to switch
// to the more appropriate "parent" name)
// props forwarded to component
// (everything except "component" and "parent" props above):
text: 'something',
// ...more.props...
this.$q.dialog({
组件:自定义组件,
//如果要访问,则可以选择此选项
//路由器、Vuex存储等,在您的
//自定义组件:
父级:此,//成为此Vue节点的子级
//(“此”指向您的Vue组件)
//(在<1.1.0和
//仍然有效,但建议切换
//到更合适的“父级”名称)
//道具转发到组件
//(除上述“组件”和“父级”道具外的所有道具):
文字:“某物”,
//…更多。道具。。。
因此“文本”是“自定义组件”的道具。谢谢