【发布时间】:2019-10-18 10:03:39
【问题描述】:
根据quasar docs,与dialog plugin 一起使用的自定义组件可以有props。但我看不到如何通过
this.$q.dialog({component: CustomComponent,})
【问题讨论】:
根据quasar docs,与dialog plugin 一起使用的自定义组件可以有props。但我看不到如何通过
this.$q.dialog({component: CustomComponent,})
【问题讨论】:
docs 状态,您可以在逗号后添加它们,如下所示:
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...
【讨论】: