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-Dz2zbQB_.js";import{bl as w,u as x,_ as B}from"./index-B_2CoVdl.js";import{P as h}from"./index-DaObvZxT.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-exs4VcBw.js";import"./index-DAURrYyA.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-BWLGvKEC.js";import"./useWindowSizeFn-C3WExEpc.js";import"./useContentViewHeight-DlpfApuB.js";import"./usePageContext-HMYqek-Q.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};
