UNPKG

yuang-framework-ui-pc

Version:

yuang-framework-ui-pc Library

94 lines (93 loc) 3.34 kB
"use strict"; const vue = require("vue"); const receiver = require("../ele-config-provider/receiver"); const EleDialog = require("../ele-dialog/index"); const EleCropper = require("../ele-cropper/index"); const props = require("./props"); const _sfc_main = vue.defineComponent({ name: "EleCropperModal", components: { EleDialog, EleCropper }, props: props.cropperModalProps, emits: props.cropperModalEmits, setup(props2, { emit }) { const { lang } = receiver.useLocale("cropper", props2); const updateModelValue = (value) => { emit("update:modelValue", value); }; const handleDone = (result) => { emit("done", result); }; return { lang, updateModelValue, 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_EleCropper = vue.resolveComponent("EleCropper"); const _component_EleDialog = vue.resolveComponent("EleDialog"); return vue.openBlock(), vue.createBlock(_component_EleDialog, vue.mergeProps({ width: "620px", title: _ctx.lang.title }, _ctx.modalProps || {}, { modelValue: _ctx.modelValue, "onUpdate:modelValue": _ctx.updateModelValue }), vue.createSlots({ default: vue.withCtx(() => [ vue.createVNode(_component_EleCropper, { height: _ctx.height, src: _ctx.src, imageType: _ctx.imageType, accept: _ctx.accept, tools: _ctx.tools, preview: _ctx.preview, previewWidth: _ctx.previewWidth, toBlob: _ctx.toBlob, options: _ctx.options, croppedOptions: _ctx.croppedOptions, tooltip: _ctx.tooltip, tooltipProps: _ctx.tooltipProps, beforeUploadClick: _ctx.beforeUploadClick, responsive: _ctx.responsive, locale: _ctx.locale, onDone: _ctx.handleDone }, null, 8, ["height", "src", "imageType", "accept", "tools", "preview", "previewWidth", "toBlob", "options", "croppedOptions", "tooltip", "tooltipProps", "beforeUploadClick", "responsive", "locale", "onDone"]) ]), _: 2 }, [ _ctx.$slots.header ? { name: "header", fn: vue.withCtx((slotProps) => [ vue.renderSlot(_ctx.$slots, "header", vue.normalizeProps(vue.guardReactiveProps(slotProps || {}))) ]), key: "0" } : void 0, _ctx.$slots.footer ? { name: "footer", fn: vue.withCtx((slotProps) => [ vue.renderSlot(_ctx.$slots, "footer", vue.normalizeProps(vue.guardReactiveProps(slotProps || {}))) ]), key: "1" } : void 0, _ctx.$slots.maxIcon ? { name: "maxIcon", fn: vue.withCtx((slotProps) => [ vue.renderSlot(_ctx.$slots, "maxIcon", vue.normalizeProps(vue.guardReactiveProps(slotProps || {}))) ]), key: "2" } : void 0, _ctx.$slots.closeIcon ? { name: "closeIcon", fn: vue.withCtx((slotProps) => [ vue.renderSlot(_ctx.$slots, "closeIcon", vue.normalizeProps(vue.guardReactiveProps(slotProps || {}))) ]), key: "3" } : void 0 ]), 1040, ["title", "modelValue", "onUpdate:modelValue"]); } const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); module.exports = index;