mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-04-05 19:42:07 +08:00
2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
import{Q as t}from"./vue3-next-qrcode@2.0.10_typescript@5.6.3-HdfsjwmG.js";import{L as l}from"./ray-dCjhX_JK.js";import{N as r,c as e,O as d}from"./naive-ui@2.40.3_vue@3.5.13_typescript@5.6.3_-RzgJ2d66.js";import{l as n,b as u,I as o}from"./@vue_runtime-core@3.5.13-C4z9ybNO.js";import{k as i}from"./@vue_reactivity@3.5.13-BUI-9P27.js";import"./date-fns@3.6.0-C0m45l1x.js";import"./seemly@0.3.8-BnJ6M8Cl.js";import"./vueuc@0.4.64_vue@3.5.13_typescript@5.6.3_-Cg_JnYIl.js";import"./evtd@0.2.4-CI_DDEu_.js";import"./@css-render_vue3-ssr@0.15.14_vue@3.5.13_typescript@5.6.3_-C_O0aIg6.js";import"./vooks@0.2.12_vue@3.5.13_typescript@5.6.3_-D2QHhDIA.js";import"./vdirs@0.1.8_vue@3.5.13_typescript@5.6.3_-C0KV5pCE.js";import"./@juggle_resize-observer@3.4.0-C8OzoCMD.js";import"./css-render@0.15.14-C5toWlUr.js";import"./@emotion_hash@0.8.0-WldOFDRm.js";import"./@vue_runtime-dom@3.5.13-DuNN1sOR.js";import"./@vue_shared@3.5.13-DbMIZLZJ.js";import"./lodash-es@4.17.21-B-5kLwAl.js";import"./treemate@0.3.11-DKekKYbv.js";import"./date-fns-tz@3.1.3_date-fns@3.6.0-8suFmB8o.js";import"./async-validator@4.2.5-DKvM95Vc.js";import"./@css-render_plugin-bem@0.15.14_css-render@0.15.14-Be8eOoM-.js";const S=n({name:"RQRCodeDemo",setup(){const a=i("ray template yes"),m=i(),s=i();return{qrcodeText:a,qrcodeStatus:m,rayQRCodeRef:s}},render(){return u(e,null,{default:()=>[u(r,null,{default:()=>[u("h2",null,[o("基于 awesome-qr 进行封装,支持 LOGO、gif、backgroundImage 等属性。")]),u("h2",null,[o("该组件会自动监听文本内容变化,然后重新渲染(watchText)")]),u("h2",null,[o("具体使用请参考 props 配置项")])]}),u(r,{title:"基础二维码"},{default:()=>[u(e,null,{default:()=>[u(t,{text:"ray template yes"},null),u(t,{text:"ray template yes",logoImage:l},null),u(t,{text:"ray template yes",gifBackgroundURL:"https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80",dotScale:.5,colorDark:"#64d9d6"},null)]})]}),u(r,{title:"状态二维码"},{default:()=>[u(e,null,{default:()=>[u(t,{text:"ray template yes",logoImage:l,status:"error",onReload:()=>{window.$message.info("reload event")}},null),u(t,{text:"ray template yes",logoImage:l,status:"loading"},null)]})]}),u(r,{title:"监听内容变化"},{default:()=>[u(e,{vertical:!0},{default:()=>[u(e,null,{default:()=>[u(d,{onClick:()=>{this.qrcodeStatus="loading",setTimeout(()=>{this.qrcodeText="text updated: "+new Date().getTime(),this.qrcodeStatus=void 0},1e3)}},{default:()=>[o("更新二维码内容")]}),u(d,{onClick:()=>{var a;(a=this.rayQRCodeRef)==null||a.downloadQRCode()}},{default:()=>[o("下载二维码")]})]}),u(e,null,{default:()=>[u(t,{text:this.qrcodeText,status:this.qrcodeStatus,logoImage:l,ref:"rayQRCodeRef"},null),o("当前二维码内容:"),this.qrcodeText]})]})]})]})}});export{S as default};
|