HarmonyOS应用开发-qrcode二维码生成
一.创建项目二.示例代码Hml代码:TypeColor{{$item}}BackgroundColor{{$item}}Css代码:.container{flexdirection:column;justifycontent:center;alignitems:center;}.txt{color:orangered;}Js代码:exportdefault{data:{qrvalue:"这里是扫出的二维码内容",qrtype:'rect',qrsize:'200px',qrcol:'333',collist:['87ceeb','fa8072','da70d6','80ff00ff','00ff00ff'],qrbcol:'f0ffff',bcollist:['f0ffff','ffffef','d8bfd8']},setType(e){if(e.checked){this.qrtype'rect'}else{this.qrtype'circle'}},setColor(e){this.qrcole.newValue},setColorB(e){this.qrbcole.newValue}}三.实例效果