如何在项目中引用此插件
2***@qq.com
- 发布:2023-05-20 16:17
- 更新:2023-05-20 16:19
- 阅读:188
1 个回复
技术部一哥 - 一个热爱前端开发的小菜鸟
1.导入插件到项目
2.新建一个页面粘贴下面代码
<template>
<view>
<CustomCamera ref="CustomCamera" coverImageType="side" @back="back" @getImage="getImage" />
</view>
</template>
<script>
// #ifdef APP
import CustomCamera from "@/components/CustomCamera/APP/index.nvue"
// #endif
// #ifdef MP-WEIXIN
import CustomCamera from "@/components/CustomCamera/WeChat/index.vue"
// #endif
export default {
components: {
CustomCamera
},
methods: {
back() {
uni.navigateBack()
},
getImage(res) {
console.log(res)
}
}
}
</script>