https://github.com/panghaojie/npm
https://www.npmjs.com/package/phj-util
npm install phj-util
import {qrcode} from 'phj-util'
// need DOM
// <div id="qrcode" style="width:100px;height:100px;"></div>
/**
* @description: generate qrcode
* @param id(string): 'qrcode' ,id of dom
* @param type(string): 'canvas' || 'img' || 'svg'
* @param text(string): 'https://github.com/panghaojie/npm'
*/
qrcode({
id : 'qrcode',
type: 'canvas',
text: 'https://github.com/panghaojie/npm'
});
qrcode({
id : 'qrcode',
type: 'img',
text: 'https://github.com/panghaojie/npm'
});
qrcode({
id : 'qrcode',
type: 'svg',
text: 'https://github.com/panghaojie/npm'
});
modify phj-util
modify index
modify the mode of import
add keywords
init