add:okBarcode

master
bobi 2019-11-02 12:50:07 +08:00
parent f9595834d7
commit 875cc667fc
3 changed files with 1540 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
layui.define(["jquery"], function (exports) {
let jQuery = layui.jquery;
// -------------------源码start--------------------- //
(function ($) {
/*!
* jQuery Cookie Plugin v1.4.1
@ -118,6 +119,7 @@ layui.define(["jquery"], function (exports) {
}));
})(jQuery);
// -------------------源码end--------------------- //
exports("okCookie");
});

View File

@ -8,13 +8,25 @@
</head>
<body>
<div class="ok-body">
<div id="barcode"></div>
</div>
<!--js逻辑-->
<script src="../../lib/layui/layui.js"></script>
<script>
layui.use(["okBarcode"], function () {
let okBarcode = layui.okBarcode;
console.log(okBarcode);
let $ = layui.jquery;
$("#barcode").barcode("153510264086cc8e", "code128", {
output: 'css', //渲染方式 css/bmp/svg/canvas
//bgColor: '#ff0000', //条码背景颜色
//color: '#00ff00', //条码颜色
barWidth: 1, //单条条码宽度
barHeight: 30, //单体条码高度
// moduleSize: 10, //条码大小
// posX: 10, //条码坐标X
// posY: 5, //条码坐标Y
showHRI: true, //是否在条码下方显示内容
addQuietZone: false //是否添加空白区(内边距)
});
});
</script>
</body>