index-2bccee7c.js 1.27 KB
import{d as _,k as C,u,a8 as a,_ as v,a9 as y,aa as n,f as s,a0 as g,E as b}from"./vue-5a35c3f5.js";import{aW as h,bD as w,a as x,_ as k}from"./index.js";import{P as B}from"./index-f532aa07.js";import"./antd-6b087f69.js";import"./useContentViewHeight-d0a5c58e.js";import"./useWindowSizeFn-cc2fb57c.js";import"./onMountedOrActivated-52afb7a7.js";const P=_({name:"Copy",components:{CollapseContainer:h,PageWrapper:B},setup(){const e=C(""),{createMessage:o}=x(),{clipboardRef:r,copiedRef:p}=w();function l(){const t=u(e);if(!t){o.warning("请输入要拷贝的内容!");return}r.value=t,u(p)&&o.warning("copy success!")}return{handleCopy:l,value:e}}}),W={class:"flex justify-center"};function $(e,o,r,p,l,t){const c=a("a-input"),i=a("a-button"),d=a("CollapseContainer"),f=a("PageWrapper");return v(),y(f,{title:"文本复制示例"},{default:n(()=>[s(d,{class:"w-full h-32 bg-white rounded-md",title:"Copy Example"},{default:n(()=>[g("div",W,[s(c,{placeholder:"请输入",value:e.value,"onUpdate:value":o[0]||(o[0]=m=>e.value=m)},null,8,["value"]),s(i,{type:"primary",onClick:e.handleCopy},{default:n(()=>[b(" Copy ")]),_:1},8,["onClick"])])]),_:1})]),_:1})}const T=k(P,[["render",$],["__file","E:/allcode/erp/test7901/order-erp-front/src/views/demo/feat/copy/index.vue"]]);export{T as default};