mirari / v-viewer

Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js
https://mirari.cc/v-viewer/
MIT License
2.46k stars 292 forks source link

使用官网component组件形式的例子 提示组件没注册 #323

Open xd15332538931 opened 4 months ago

xd15332538931 commented 4 months ago

我通过 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. 这是怎么回事

mirari commented 4 months ago

import以后是否在当前组件的components里注册了Viewer组件

components: {
      Viewer,
    },
xd15332538931 commented 4 months ago

我再vue2中使用你github上提供的component 例子 报错

Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

xd15332538931 commented 4 months ago

我再vue2中 这样引入还是 提示 Unknown custom element: <viewer> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
mirari commented 4 months ago

无法复现,线上例子单独引入component也没有问题 https://codepen.io/mirari/pen/PowNyEY