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-DS3utcig.js";import{bl as w,u as x,_ as B}from"./index-CLZzJyTP.js";import{P as h}from"./index-D55rh6hR.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-BZbg0EjM.js";import"./index-DvqyyN77.js";import"./index-CrdW4fN1.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-DLfJuPsF.js";import"./useWindowSizeFn-D9PllI8g.js";import"./useContentViewHeight-BIb_dTbE.js";import"./usePageContext-FyDvfV_K.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};
