import{d as C,f as _,u,U as t,a2 as v,ad as y,af as n,k as r,a4 as g,G as b}from"./vue-vendor-CxLCUzY4.js";import{C as k}from"./index-CYoRlduV.js";import{bl as w,u as x,_ as B}from"./index-Cy4uayzW.js";import{P as h}from"./index-CRgSyMPH.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-DYB8Ashr.js";import"./index-Bdn0r8CG.js";import"./index-CrdW4fN1.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-XU-h1taH.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./useContentViewHeight-Qm4QNm5l.js";import"./usePageContext-CXQdt-5h.js";import"./injectionKey-DPVn4AgL.js";const P=C({name:"Copy",components:{CollapseContainer:k,PageWrapper:h},setup(){const o=_(""),{createMessage:e}=x(),{clipboardRef:p,copiedRef:s}=w();function i(){const a=u(o);if(!a){e.warning("请输入要拷贝的内容！");return}p.value=a,u(s)&&e.warning("copy success！")}return{handleCopy:i,value:o}}}),$={class:"flex justify-center"};function F(o,e,p,s,i,a){const l=t("a-input"),m=t("a-button"),c=t("CollapseContainer"),d=t("PageWrapper");return v(),y(d,{title:"文本复制示例"},{default:n(()=>[r(c,{class:"w-full h-32 bg-white rounded-md",title:"Copy Example"},{default:n(()=>[g("div",$,[r(l,{placeholder:"请输入",value:o.value,"onUpdate:value":e[0]||(e[0]=f=>o.value=f)},null,8,["value"]),r(m,{type:"primary",onClick:o.handleCopy},{default:n(()=>e[1]||(e[1]=[b(" Copy ")])),_:1},8,["onClick"])])]),_:1})]),_:1})}const J=B(P,[["render",F]]);export{J as default};
