UNPKG

yuang-framework-ui-pc

Version:

yuang-framework-ui-pc Library

56 lines (55 loc) 1.91 kB
import { defineComponent, resolveComponent, createBlock, openBlock } from "vue"; import EleQrCodeSvg from "../ele-qr-code-svg/index"; import CanvasRender from "./components/canvas-render"; import { qrCodeEmits, qrCodeProps } from "./props"; const _sfc_main = defineComponent({ name: "EleQrCode", components: { EleQrCodeSvg, CanvasRender }, props: qrCodeProps, emits: qrCodeEmits, setup(_props, { emit }) { const handleDone = () => { emit("done"); }; return { handleDone }; } }); const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_EleQrCodeSvg = resolveComponent("EleQrCodeSvg"); const _component_CanvasRender = resolveComponent("CanvasRender"); return _ctx.tag === "svg" ? (openBlock(), 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"])) : (openBlock(), 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]]); export { index as default };