Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/196.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js 当与Quasar对话框插件一起使用时,如何将道具传递给组件_Vue.js_Quasar - Fatal编程技术网

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和
//仍然有效,但建议切换
//到更合适的“父级”名称)
//道具转发到组件
//(除上述“组件”和“父级”道具外的所有道具):
文字:“某物”,
//…更多。道具。。。

因此“文本”是“自定义组件”的道具。谢谢