import{r,ay as A,bT as w,d as E,u as N,h as S,o as T,i as k,j as n,w as o,p as s,W as B,ao as z,ap as U,A as V,B as $,H as q,k as D,ae as M,l as m}from"./index-9PRMimni.js";function j(d){const u=r(""),t=r(!1),a=r(!1);return A(u,l=>{w(l)&&(a.value=!0,t.value=F(l))},{immediate:!1,flush:"sync"}),{clipboardRef:u,isSuccessRef:t,copiedRef:a}}function F(d,{target:u=document.body}={}){const t=document.createElement("textarea"),a=document.activeElement;t.value=d,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const l=document.getSelection();let i;l&&l.rangeCount>0&&(i=l.getRangeAt(0)),u.append(t),t.select(),t.selectionStart=0,t.selectionEnd=d.length;let f=!1;try{f=document.execCommand("copy")}catch(_){throw new Error(_)}return t.remove(),i&&l&&(l.removeAllRanges(),l.addRange(i)),a&&a.focus(),f}const H={class:"n-layout-page-header"},G=E({__name:"copy",setup(d){const{clipboardRef:u,copiedRef:t}=j(),a=r("NaiveUiAdmin@163.com"),l=r(null),i=N();function f(){const c=m(a.value);u.value=c,m(t)&&i.success(`拷贝成功：${c}`)}function _(){const c=m(l.value);if(!c){i.warning("请输入要复制的内容！");return}u.value=c,m(t)&&i.success(`拷贝成功：${c}`)}return(c,e)=>{const y=B,p=U,v=$,g=D,b=q,C=M,R=z;return T(),S("div",null,[k("div",H,[n(y,{bordered:!1,title:"文本复制"},{default:o(()=>e[1]||(e[1]=[s(" 文本复制示例，用于常规订单号，编号，快速复制等场景 ")])),_:1})]),n(y,{bordered:!1,title:"基本信息",class:"mt-3 proCard",size:"small",segmented:{content:!0}},{default:o(()=>[n(R,{"label-placement":"left",class:"py-2"},{default:o(()=>[n(p,null,{label:o(()=>e[2]||(e[2]=[s("收款人姓名")])),default:o(()=>[e[3]||(e[3]=s(" 啊俊 "))]),_:1}),n(p,{label:"收款账户"},{default:o(()=>e[4]||(e[4]=[s("NaiveUiAdmin@qq.com")])),_:1}),n(p,{label:"付款类型"},{default:o(()=>e[5]||(e[5]=[s("支付宝")])),_:1}),n(p,{label:"付款账户"},{default:o(()=>[s(V(a.value)+" ",1),n(v,{size:"small",type:"primary",onClick:f},{default:o(()=>e[6]||(e[6]=[s("复制")])),_:1})]),_:1}),n(p,{label:"转账金额"},{default:o(()=>[n(b,null,{default:o(()=>[n(g,{value:l.value,"onUpdate:value":e[0]||(e[0]=x=>l.value=x)},null,8,["value"]),n(v,{type:"primary",onClick:_},{default:o(()=>e[7]||(e[7]=[s("复制")])),_:1})]),_:1})]),_:1}),n(p,{label:"状态"},{default:o(()=>[n(C,{type:"success"},{default:o(()=>e[8]||(e[8]=[s(" 已到账")])),_:1})]),_:1})]),_:1})]),_:1})])}}});export{G as default};
