The QR code scanning function based on the MUI framework is implemented using html5. the mui framework HTML5
An Implementation case of Barcode
I. Introduction
The Barcode module manages bar code scanning and provides scanning and identification functions for common bar codes (QR codes and One-Dimension codes). You can use the camera of the device to input data for bar code scanning. You can use plus. barcode to obtain the bar code management object.
II. Implementation results
Iii. Implementation Code
<! Doctype html>
Iii. problems encountered during the process
A. div occupies the entire page
1. The width and height of this div are 100%, and the height of the parent element is also (and so on until the root node), or the position of this div is absolute;
2. You can use js to dynamically set the page width and height.
Var height = window. innerHeight + 'px '; // obtain the actual page height var width = window. innerWidth + 'px '; document. getElementById ("bcid "). style. height = height; document. getElementById ("bcid "). style. width = width;
B. The scan control has the upper and lower margins.
Fill in black to reduce the visual differences, which have not been solved. (If you solve the problem, please leave a message. Thank you)
Summary
The above section describes the QR code scanning function implemented by using HTML5 Based on the MUI framework. I hope it will be helpful to you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!