UNPKG

tk-eui-plus

Version:

2 lines (1 loc) 1.29 kB
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.index=l(e.Vue))})(this,function(e){"use strict";const l={class:"dialog-footer"},c=((o,s)=>{const n=o.__vccOpts||o;for(const[d,r]of s)n[d]=r;return n})(e.defineComponent({__name:"index",props:{title:{type:String,default:""},visible:Boolean},emits:["update:visible"],setup(o,{emit:s}){let n=o,d=e.useSlots(),r=s,i=e.ref(n.visible);return e.watch(()=>n.visible,t=>{i.value=t}),e.watch(()=>i.value,t=>{r("update:visible",t)}),(t,a)=>{const p=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(p,e.mergeProps({modelValue:e.unref(i),"onUpdate:modelValue":a[0]||(a[0]=f=>e.isRef(i)?i.value=f:i=f),title:o.title,width:"500"},t.$attrs),{header:e.withCtx(()=>[e.renderSlot(t.$slots,"header",{},void 0,!0)]),footer:e.withCtx(()=>[e.createElementVNode("div",l,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])]),default:e.withCtx(()=>[e.unref(d).default?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):e.createCommentVNode("v-if",!0)]),_:3},16,["modelValue","title"])])}}}),[["__scopeId","data-v-3cc5024f"]]);return{install(o){o.component("tkDialog",c)}}});