-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用官网component组件形式的例子 提示组件没注册 #323
Comments
import以后是否在当前组件的components里注册了Viewer组件
|
<script>
import 'viewerjs/dist/viewer.css'
import { component as Viewer } from "v-viewer"
export default {
components: {
Viewer,
},
data() {
return {
images: [
"https://picsum.photos/200/200",
"https://picsum.photos/300/200",
"https://picsum.photos/250/200"
]
}
},
methods: {
inited (viewer) {
this.$viewer = viewer
},
show () {
this.$viewer.show()
}
}
}
</script>
我再vue2中使用你github上提供的component 例子 报错
Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. |
<script>
import 'viewerjs/dist/viewer.css'
import { component as Viewer } from "v-viewer"
export default {
components: {
Viewer,
},
data() {
return {
images: [
"https://picsum.photos/200/200",
"https://picsum.photos/300/200",
"https://picsum.photos/250/200"
]
}
},
|
无法复现,线上例子单独引入component也没有问题 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我通过 import { component as Viewer} from 'v-viewer' 引入 提示 Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. 这是怎么回事
The text was updated successfully, but these errors were encountered: