【发布时间】:2021-07-19 09:14:05
【问题描述】:
我正在尝试在我的文档中显示示例 Vue 组件,但是 Vue 也在我的 Vue 组件中识别 template。
vehicle-documents不是注册组件,同样放入如下代码:
Vue.config.ignoredElements = ['slide', 'slider', 'vehicle-documents'];
所以 Vue 忽略了组件本身:
If you want the modal make sure you add the click event and call the `open` function, and pass the `document` into this function call, as seen below.
```html
<vehicle-documents class="app" vehicle-id="">
<template v-slot:default="slotProps">
<button @click="slotProps.open(slotProps.document)">
{{ slotProps.document.name }}
</button>
</template>
</vehicle-documents>
```
如何让 Vue 忽略 template 块?我在这个页面需要Vue,所以这不是一个简单的移除Vue的案例。
【问题讨论】:
标签: vue.js