在支付宝小程序上,使用barcode会有尺寸不准的问题。查看了一下源码,在common/help.js中需要把val='MP'注释。 <img width="490" alt="image" src="https://user-images.githubusercontent.com/36835846/206857376-2f8c0a9c-70ca-481d-ac5c-6a1c3fedc5eb.png"> 在barcode.ts文件中,需要在setBarCodeText函数中增加以下判断才能保证渲染正常 <img width="868" alt="image" src="https://user-images.githubusercontent.com/36835846/206857470-a09638de-136a-4f89-801f-03452b455ae8.png">