<template>
<audio ref="audioRef" :src="url"></audio>
</template>
09:47:33 [vite] [plugin:vite:import-analysis] Cannot find module '@dcloudio/uni-components/style/audio.css'
Require stack:
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+uni-cli-shared@3.0.0-3080720230703001_postcss@8.4.24+vue@3.3.4\node_modules\@dcloudio\uni-cli-shared\dist\resolve.js
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+uni-cli-shared@3.0.0-3080720230703001_postcss@8.4.24+vue@3.3.4\node_modules\@dcloudio\uni-cli-shared\dist\hbx\env.js
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+uni-cli-shared@3.0.0-3080720230703001_postcss@8.4.24+vue@3.3.4\node_modules\@dcloudio\uni-cli-shared\dist\logs\format.js
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+uni-cli-shared@3.0.0-3080720230703001_postcss@8.4.24+vue@3.3.4\node_modules\@dcloudio\uni-cli-shared\dist\logs\index.js
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+uni-cli-shared@3.0.0-3080720230703001_postcss@8.4.24+vue@3.3.4\node_modules\@dcloudio\uni-cli-shared\dist\mp\style.js
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+uni-cli-shared@3.0.0-3080720230703001_postcss@8.4.24+vue@3.3.4\node_modules\@dcloudio\uni-cli-shared\dist\mp\index.js
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+uni-cli-shared@3.0.0-3080720230703001_postcss@8.4.24+vue@3.3.4\node_modules\@dcloudio\uni-cli-shared\dist\index.js
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+vite-plugin-uni@3.0.0-3080720230703001_b3clu5zdrlhgg2dr74hqvpe4ui\node_modules\@dcloudio\vite-plugin-uni\dist\cli\index.js
- D:\Workspace\vite-uni-app\node_modules\.pnpm\@dcloudio+vite-plugin-uni@3.0.0-3080720230703001_b3clu5zdrlhgg2dr74hqvpe4ui\node_modules\@dcloudio\vite-plugin-uni\bin\uni.js
4 个回复
爱豆豆 - 办法总比困难多
微信小程序平台自基础库 1.6.0 版本开始,不再维护 audio 组件,推荐使用API方式而不是组件方式来播放音频。API见 uni.createInnerAudioContext 替代。
爱豆豆 - 办法总比困难多
参考文档 https://uniapp.dcloud.net.cn/api/media/audio-context.html#createinneraudiocontext
Diligent_UI - 【插件开发】【专治疑难杂症】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=193663(微信搜索飘逸科技UI小程序直接体验)】【骗子请绕道】问题咨询请加QQ群:120594820,代表作灵感实用工具小程序
看报错是来自于云服务的
8***@qq.com
现在这个问题解决了吗?我用H5编译使用audio也报错