dcloudio / uni-app

A cross-platform framework using Vue.js
https://uniapp.dcloud.io
Apache License 2.0
39.97k stars 3.62k forks source link

vue3的hello-uniapp项目转换为快应用后编译报错 #5134

Open pingjiang opened 4 weeks ago

pingjiang commented 4 weeks ago

版本信息

"id": "hello-uniapp", "version": "3.4.5",

快应用IDE:14.1.1

报错信息

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\uni_modules\uni-data-picker\components\uni-data-pickerview\uni-data-pickerview.qxml:1:526

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\uni_modules\uni-popup\components\uni-popup\uni-popup.qxml:1:112

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\uni_modules\uni-popup\components\uni-popup\uni-popup.qxml:1:229

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\uni_modules\uni-swiper-dot\components\uni-swiper-dot\uni-swiper-dot.qxml:1:146

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\uni_modules\uni-swiper-dot\components\uni-swiper-dot\uni-swiper-dot.qxml:1:526

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\uni_modules\uni-swiper-dot\components\uni-swiper-dot\uni-swiper-dot.qxml:1:870

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\uni_modules\uni-swiper-dot\components\uni-swiper-dot\uni-swiper-dot.qxml:1:1169

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\uni_modules\uni-swiper-dot\components\uni-swiper-dot\uni-swiper-dot.qxml:1:1427

WRANNING: Component <map> missing required attribute 'latitude'
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\component\cover-view\cover-view.qxml:1:130

WRANNING: Component <map> missing required attribute 'longitude'
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\component\cover-view\cover-view.qxml:1:130

WRANNING: Component <button> attribute 'type' value 'error' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:1053

WRANNING: Component <button> attribute 'type' value 'error' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:1546

WRANNING: Component <button> attribute 'type' value 'error' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:2045

WRANNING: Component <button> attribute 'type' value 'error' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:2574

WRANNING: Component <button> attribute 'type' value 'info' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:1104

WRANNING: Component <button> attribute 'type' value 'info' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:1609

WRANNING: Component <button> attribute 'type' value 'info' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:2102

WRANNING: Component <button> attribute 'type' value 'info' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:2643

WRANNING: Component <button> attribute 'type' value 'success' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:943

WRANNING: Component <button> attribute 'type' value 'success' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:1412

WRANNING: Component <button> attribute 'type' value 'success' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:1923

WRANNING: Component <button> attribute 'type' value 'success' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:2428

WRANNING: Component <button> attribute 'type' value 'warning' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:998

WRANNING: Component <button> attribute 'type' value 'warning' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:1479

WRANNING: Component <button> attribute 'type' value 'warning' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:1984

WRANNING: Component <button> attribute 'type' value 'warning' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\button\button.qxml:1:2501

WRANNING: Component <button> attribute 'type' value 'button' is not allowed, Use below values 
 "primary, default, warn"
@ d:\code\h5b\h5bdemos\uniappdemo\unpackage\dist\build\quickapp-webview-huawei\pages\extUI\calendar\calendar.qxml:1:636

COMPILE RESULT:FAIL {"ERROR":8,"WARN":19}
bfc846958672 commented 3 weeks ago

已确认bug,感谢反馈

bfc846958672 commented 3 weeks ago

临时解决方案: 在HBuilderX安装目录内找到plugins目录,然后再找到以下三个目录

plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-mp-vite\dist
plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-mp-compiler\dist
plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-quickapp-webview\dist

然后用附件中的对应的文件内的dist 进行替换

uni-mp-compiler+uni-mp-vite+uni-quickapp-webview---.zip