UNPKG

ming-pro

Version:

> ming-pro组件库是对element-plus的二次封装,在使用更易用。库是依赖element-plus以及icon,使用前先安装element-plus及icon相关设置。

2 lines (1 loc) 1.76 kB
(function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t(require("vue")):typeof define=="function"&&define.amd?define(["vue"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.index=t(e.Vue))})(this,function(e){"use strict";var t="";const d=e.defineComponent({props:{visible:{type:Boolean,default:!1},options:{type:Array,required:!0},isScroll:{type:Boolean,default:!0},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:c}){const i=o,l=e.computed({get(){return i.visible},set(n){c("update:visible",n)}});let r=e.ref(null);const f=e.computed(()=>i.isScroll?"modal-form-dialog-scroll":"");return(n,s)=>{const m=e.resolveComponent("m-form"),u=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(u,e.mergeProps({"custom-class":e.unref(f),modelValue:e.unref(l),"onUpdate:modelValue":s[0]||(s[0]=p=>e.isRef(l)?l.value=p:null)},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,["custom-class","modelValue"])}}});var a={install(o){o.component("m-modal-form",d)}};return a});