yuang-framework-ui-pc
Version:
yuang-framework-ui-pc Library
55 lines (54 loc) • 1.9 kB
JavaScript
"use strict";
const vue = require("vue");
const EleQrCodeSvg = require("../ele-qr-code-svg/index");
const CanvasRender = require("./components/canvas-render");
const props = require("./props");
const _sfc_main = vue.defineComponent({
name: "EleQrCode",
components: { EleQrCodeSvg, CanvasRender },
props: props.qrCodeProps,
emits: props.qrCodeEmits,
setup(_props, { emit }) {
const handleDone = () => {
emit("done");
};
return { handleDone };
}
});
const _export_sfc = (sfc, props2) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props2) {
target[key] = val;
}
return target;
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_EleQrCodeSvg = vue.resolveComponent("EleQrCodeSvg");
const _component_CanvasRender = vue.resolveComponent("CanvasRender");
return _ctx.tag === "svg" ? (vue.openBlock(), vue.createBlock(_component_EleQrCodeSvg, {
key: 0,
value: _ctx.value,
size: _ctx.size,
level: _ctx.level,
bgColor: _ctx.bgColor,
fgColor: _ctx.fgColor,
margin: _ctx.margin,
imageSettings: _ctx.imageSettings,
customStyle: _ctx.customStyle,
onDone: _ctx.handleDone
}, null, 8, ["value", "size", "level", "bgColor", "fgColor", "margin", "imageSettings", "customStyle", "onDone"])) : (vue.openBlock(), vue.createBlock(_component_CanvasRender, {
key: 1,
value: _ctx.value,
size: _ctx.size,
level: _ctx.level,
bgColor: _ctx.bgColor,
fgColor: _ctx.fgColor,
margin: _ctx.margin,
imageSettings: _ctx.imageSettings,
customStyle: _ctx.customStyle,
tag: _ctx.tag,
onDone: _ctx.handleDone
}, null, 8, ["value", "size", "level", "bgColor", "fgColor", "margin", "imageSettings", "customStyle", "tag", "onDone"]));
}
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
module.exports = index;