UNPKG

hu-element-components

Version:

2 lines (1 loc) 1.77 kB
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("vue")):typeof define=="function"&&define.amd?define(["vue"],i):(e=typeof globalThis<"u"?globalThis:e||self,e.index=i(e.Vue))})(this,function(e){"use strict";const i=e.defineComponent({__name:"index",props:{visible:{typpe:Boolean,default:!1},options:{type:Array,required:!0},isScroll:{type:Boolean,default:!1},onChange:{type:Function},beforeUpload:{type:Function},onPreview:{type:Function},onRemove:{type:Function},beforeRemove:{type:Function},onSuccess:{type:Function},onExceed:{type:Function}},emits:["update:visible"],setup(o,{emit:a}){let l=o,f=a,t=e.ref(l.visible),r=e.ref();return e.watch(()=>l.visible,n=>{t.value=n}),e.watch(()=>t.value,n=>{f("update:visible",n)}),(n,d)=>{const m=e.resolveComponent("m-form"),c=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"m--choose-icon-dialog-body-height":o.isScroll})},[e.createVNode(c,e.mergeProps({modelValue:e.unref(t),"onUpdate:modelValue":d[0]||(d[0]=s=>e.isRef(t)?t.value=s:t=s)},n.$attrs),{default:e.withCtx(()=>[e.createVNode(m,{ref_key:"form",ref:r,options:o.options,"label-width":"100px",onOnChange:o.onChange,onBeforeUpload:o.beforeUpload,onOnPreview:o.onPreview,onOnRemove:o.onRemove,onBeforeRemove:o.beforeRemove,onOnSuccess:o.onSuccess,onOnExceed:o.onExceed},{uploadArea:e.withCtx(()=>[e.renderSlot(n.$slots,"uploadArea")]),uploadTip:e.withCtx(()=>[e.renderSlot(n.$slots,"uploadTip")]),_:3},8,["options","onOnChange","onBeforeUpload","onOnPreview","onOnRemove","onBeforeRemove","onOnSuccess","onOnExceed"])]),footer:e.withCtx(()=>[e.renderSlot(n.$slots,"footer",{form:e.unref(r)})]),_:3},16,["modelValue"])],2)}}});return{install(o){o.component("m-modal-form",i)}}});