【发布时间】:2020-12-30 18:18:30
【问题描述】:
在使用 Bootstrap-Vue 作为 UI 框架时,我正在尝试制作一个自定义表单组件并在多个父组件中使用它。这是我的表单组件
<template>
<b-form>
<b-input-group>
<b-form-input placeholder="Post Title"></b-form-input>
<wysiwyg-input placeholder="Post Content" />
</b-input-group>
</b-form>
</template>
而父组件是
<FormFields :title="title" :content="content" />
如何从子组件访问父组件中的值。
注意:我也在使用 vue-quill 编辑器。
这里是codeandbox链接: https://codesandbox.io/s/mystifying-benz-w8wgu?file=/src/App.vue
提前致谢!
【问题讨论】:
标签: vue.js vuejs2 bootstrap-vue vue-quill-editor