import{_ as a,b3 as t,aa as l,b4 as e,b as s,d as n,p as i,w as d,H as o,i as u,o as c,f as p,k as f,Y as r,R as C}from"./index-2PZN6pGH.js";const h=a({data:()=>({title:"get/setClipboardData",data:""}),methods:{dataChange:function(a){this.data=a.detail.value},getClipboard:function(){t({success:a=>{console.log(a.data);const t=a.data?"剪贴板内容为:"+a.data:"剪贴板暂无内容";l({content:t,title:"读取剪贴板",showCancel:!1})},fail:()=>{l({content:"读取剪贴板失败!",showCancel:!1})}})},setClipboard:function(){var a=this.data;0===a.length?l({title:"设置剪贴板失败",content:"内容不能为空",showCancel:!1}):e({data:a,success:()=>{},fail:()=>{}})}}},[["render",function(a,t,l,e,h,b){const g=s(n("page-head"),o),_=u,k=r,v=C;return c(),i(_,null,{default:d((()=>[p(g,{title:h.title},null,8,["title"]),p(_,{class:"uni-padding-wrap"},{default:d((()=>[p(_,{class:"uni-title"},{default:d((()=>[f("请输入剪贴板内容")])),_:1}),p(_,{class:"uni-list"},{default:d((()=>[p(_,{class:"uni-list-cell"},{default:d((()=>[p(k,{class:"uni-input",type:"text",placeholder:"请输入剪贴板内容",value:h.data,onInput:b.dataChange},null,8,["value","onInput"])])),_:1})])),_:1}),p(_,{class:"uni-btn-v"},{default:d((()=>[p(v,{type:"primary",onClick:b.setClipboard},{default:d((()=>[f("存储数据")])),_:1},8,["onClick"]),p(v,{onClick:b.getClipboard},{default:d((()=>[f("读取数据")])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})}]]);export{h as default};
