import{l as n}from"./index-5df52834.js";const p=Vue.createElementVNode("div",{class:"card-header"},[Vue.createElementVNode("span",{class:"font-medium"}," 页面水印功能（将平台主题改为亮白色观察水印效果更明显哦） ")],-1),C=Vue.createElementVNode("span",null," 请输入要创建水印的值：",-1),x=Vue.createElementVNode("span",null,"请选择要创建水印的颜色：",-1),N=Vue.createElementVNode("br",null,null,-1),k=Vue.defineComponent({name:"WaterMark"}),h=Vue.defineComponent({...k,setup(w){const V=Vue.ref(),d=Vue.ref(),r=Vue.ref("#409EFF"),l=Vue.ref("vue-pure-admin"),{setWatermark:u,clear:c}=n(),{setWatermark:a,clear:i}=n(V),{setWatermark:v}=n(d);return Vue.onMounted(()=>{Vue.nextTick(()=>{v("无法删除的水印",{forever:!0,width:187,height:80})})}),Vue.onBeforeUnmount(()=>{c()}),(g,e)=>{const s=Vue.resolveComponent("el-input"),m=Vue.resolveComponent("el-color-picker"),o=Vue.resolveComponent("el-button"),f=Vue.resolveComponent("el-card");return Vue.openBlock(),Vue.createBlock(f,{shadow:"never"},{header:Vue.withCtx(()=>[p]),default:Vue.withCtx(()=>[C,Vue.createVNode(s,{class:"mb-4 mr-4",style:{width:"200px"},modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=t=>l.value=t),clearable:""},null,8,["modelValue"]),x,Vue.createVNode(m,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=t=>r.value=t),"show-alpha":""},null,8,["modelValue"]),N,Vue.createVNode(o,{onClick:e[2]||(e[2]=t=>Vue.unref(u)(l.value,{fillStyle:r.value}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建整页水印 ")]),_:1}),Vue.createVNode(o,{onClick:e[3]||(e[3]=t=>Vue.unref(u)(l.value,{gradient:[{value:0,color:"magenta"},{value:.5,color:"blue"},{value:1,color:"red"}]}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建整页渐变水印 ")]),_:1}),Vue.createVNode(o,{onClick:e[4]||(e[4]=t=>Vue.unref(u)(l.value,{rotate:0,gradient:[{value:0,color:"magenta"},{value:.5,color:"blue"},{value:1,color:"red"}]}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建整页渐变且水平90度的水印 ")]),_:1}),Vue.createVNode(o,{onClick:e[5]||(e[5]=t=>Vue.unref(u)(l.value,{gradient:[{value:0,color:"magenta"},{value:.5,color:"blue"},{value:1,color:"red"}],shadowConfig:[20]}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建整页渐变且有阴影的水印 ")]),_:1}),Vue.createVNode(o,{onClick:e[6]||(e[6]=t=>Vue.unref(u)(l.value,{globalAlpha:.15,gradient:[{value:0,color:"magenta"},{value:.5,color:"blue"},{value:1,color:"red"}]}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建整页高透明渐变水印 ")]),_:1}),Vue.createVNode(o,{onClick:Vue.unref(c)},{default:Vue.withCtx(()=>[Vue.createTextVNode("清除整页水印")]),_:1},8,["onClick"]),Vue.createElementVNode("div",{ref_key:"local",ref:V,class:"mt-4 mb-4 w-[1080px] h-[400px] border-dotted border-2 border-sky-500"},null,512),Vue.createVNode(o,{onClick:e[7]||(e[7]=t=>Vue.unref(a)("局部水印",{fillStyle:r.value,width:140,height:60}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建局部水印 ")]),_:1}),Vue.createVNode(o,{onClick:e[8]||(e[8]=t=>Vue.unref(a)("局部水印",{width:140,height:60,gradient:[{value:0,color:"magenta"},{value:.5,color:"blue"},{value:1,color:"red"}]}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建局部渐变水印 ")]),_:1}),Vue.createVNode(o,{onClick:e[9]||(e[9]=t=>Vue.unref(a)("局部水印",{width:140,height:56.5,rotate:0,gradient:[{value:0,color:"magenta"},{value:.5,color:"blue"},{value:1,color:"red"}]}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建局部渐变且水平90度的水印 ")]),_:1}),Vue.createVNode(o,{onClick:e[10]||(e[10]=t=>Vue.unref(a)("局部水印",{width:140,height:56.5,gradient:[{value:0,color:"magenta"},{value:.5,color:"blue"},{value:1,color:"red"}],shadowConfig:[20]}))},{default:Vue.withCtx(()=>[Vue.createTextVNode(" 创建局部渐变且有阴影的水印 ")]),_:1}),Vue.createVNode(o,{onClick:Vue.unref(i)},{default:Vue.withCtx(()=>[Vue.createTextVNode("清除局部水印")]),_:1},8,["onClick"]),Vue.createElementVNode("div",{ref_key:"preventLocal",ref:d,class:"mt-4 mb-4 w-[1080px] h-[400px] border-dotted border-2 border-indigo-500"},null,512)]),_:1})}}});export{h as default};
