"dependencies": {
"vue-vital-sign-camera": "https://sdk.panoptic.ai/npm/vue-vital-sign-camera-1.0.8.tgz",
}
import { VitalSignCamera } from "vue-vital-sign-camera";
components: {
VitalSignCamera,
},
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 22621.2715
第三方开发者工具版本号: 最新vscode
基础库版本号: node v16.20.2 vue3+vite
项目创建方式: CLI
CLI版本号: npx degit dcloudio/uni-preset-vue#vite my-vue3-project
"dependencies": {
"vue-vital-sign-camera": "https://sdk.panoptic.ai/npm/vue-vital-sign-camera-1.0.8.tgz",
}
import { VitalSignCamera } from "vue-vital-sign-camera";
components: {
VitalSignCamera,
},
1.安装依赖"vue-vital-sign-camera": "https://sdk.panoptic.ai/npm/vue-vital-sign-camera-1.0.8.tgz",
2.vue中引入并注册组件vue-vital-sign-camera
import { VitalSignCamera } from "vue-vital-sign-camera";
components: {
VitalSignCamera,
},
正常引入并使用组件
引入后报错:
"openBlock" is not exported by "node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js", imported by "node_modules/vue-vital-sign-camera/dist/vital-sign-camera.js".
at ../node_modules/vue-vital-sign-camera/dist/vital-sign-camera.js:4:50
2: var At = (t, e, i) => e in t ? Ot(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
3: var M = (t, e, i) => (At(t, typeof e != "symbol" ? e + "" : e, i), i);
4: import { defineComponent as Ft, useCssVars as jt, openBlock as Ut, createElementBlock as Ht } from "vue";
^
5: import zt from "@mediapipe/face_mesh";
6: function Nt(t, e) {
在vue组件中引入vue-vital-sign-camera第三方库
import { VitalSignCamera } from "vue-vital-sign-camera";
components: {
VitalSignCamera,
},
引入后报错:
"openBlock" is not exported by "node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js", imported by "node_modules/vue-vital-sign-camera/dist/vital-sign-camera.js".
at ../node_modules/vue-vital-sign-camera/dist/vital-sign-camera.js:4:50
2: var At = (t, e, i) => e in t ? Ot(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
3: var M = (t, e, i) => (At(t, typeof e != "symbol" ? e + "" : e, i), i);
4: import { defineComponent as Ft, useCssVars as jt, openBlock as Ut, createElementBlock as Ht } from "vue";
^
5: import zt from "@mediapipe/face_mesh";
6: function Nt(t, e) {
1 个回复
DCloud_UNI_LXH
那就是该 npm 包不支持微信小程序