j-QRCode
Ten element tworzy kod QR, który zawiera Książka QRC.
Konfiguracja:
width {Number}standardowy widok obrazu (default:128)height {Number}Podstawowy rozmiar obrazu (default image height):128)fg {String}kolor przedni (default:#000000)bg {String}- kolor tła (default:#FFFFFF)delay {Number}małe opóźnienie w generowaniu kodu (default:200)
Jak tworzyć kod QR?
var opt = {};
opt.text = 'https://www.totaljs.com';
// opt.width {Number}
// opt.height {Number}
// opt.fg {String}
// opt.bg {String}
opt.callback = function(base64) {
console.log(base64);
};
SETTER('qrcode/create', opt);Użyj go z <ui-component name="qrcode">Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu DEF.fallback (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.
<ui-component name="qrcode" config="width:200;height:200"></ui-component>
<script>
ON('ready', function() {
var opt = {};
opt.text = 'https://totaljs.com';
opt.callback = function(base64) {
var img = document.createElement('IMG');
img.setAttribute('src', base64);
document.body.append(img);
};
SETTER('qrcode/create', opt);
});
</script>