Skip to content
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

使用组件报错:组件没有模板或渲染函数 #807

Open
zml212 opened this issue Apr 16, 2024 · 2 comments
Open

使用组件报错:组件没有模板或渲染函数 #807

zml212 opened this issue Apr 16, 2024 · 2 comments

Comments

@zml212
Copy link

zml212 commented Apr 16, 2024

image
代码如下:
组件内引入

import 'vue-cropper/dist/index.css'
import VueCropper from "vue-cropper"

使用

<VueCropper ref="mycropper" mode="cover" :img="options.img" :info="true" :autoCrop="options.autoCrop"
                :autoCropWidth="options.autoCropWidth" :autoCropHeight="options.autoCropHeight"
                :fixedBox="options.fixedBox" :outputType="options.outputType" @realTime="realTime"
                v-if="cropperDialogVisible"></VueCropper>

用的的Vue3+ts+vite

@xyxiao001
Copy link
Owner

https://github.com/xyxiao001/cropper-test 可以参考这个仓库看看

@zml212
Copy link
Author

zml212 commented Apr 16, 2024

如果是这样引入的话:

import 'vue-cropper/dist/index.css'
import {VueCropper}  from "vue-cropper"

会报一堆错:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants