ray-template/js/index-BLhKipa_.js

2 lines
5.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{O as C,P as f,Q as k}from"./hooks-yKQIzKXx.js";import"./currency.js@2.0.4-9OAR_aOO.js";import"./dayjs@1.11.10-C8LoRVP6.js";import"./print-js@1.6.0-BdoEj60G.js";import"./jsbarcode@3.11.6-DGNGFp02.js";import"./@logicflow_core@2.0.6-CHqfytjt.js";import"./mobx-preact@3.0.0_mobx@5.15.7_preact@10.22.0-q-IhwcFu.js";import"./preact@10.22.0-D1_UwAj3.js";import{a as A}from"./vue-hooks-plus@2.2.1_vue@3.5.12_typescript@5.6.3_--wFVw10U.js";import{s as B}from"./instance-DGp8AH04.js";import"./lodash@4.17.21-Cw59kuJw.js";import{N as p,q as y,ag as h,L as D,O as i,c as l}from"./naive-ui@2.40.1_vue@3.5.12_typescript@5.6.3_-D3cUk1tG.js";import{l as b,b as t,I as o,F as w}from"./@vue_runtime-core@3.5.12-rIgKm_Vg.js";import{e as P,x as N}from"./@vue_reactivity@3.5.12-Bs6EYLxJ.js";import"./lodash-es@4.17.21-B-5kLwAl.js";import"./@vueuse_core@11.1.0_vue@3.5.12_typescript@5.6.3_-ZDBD96r1.js";import"./@vueuse_shared@11.1.0_vue@3.5.12_typescript@5.6.3_-DnrABUGp.js";import"./js-cookie@3.0.5-Z_8Sd105.js";import"./screenfull@5.2.0-DmMZCkhi.js";import"./call-bind@1.0.7-Cpj98o6Y.js";import"./utils-DJWgFDlo.js";import"./pinia-plugin-persistedstate@4.1.1_pinia@2.2.4_typescript@5.6.3_vue@3.5.12_typescript@5.6.3____dh65odvamx6uymfx32yexjadga-_Zka_ujQ.js";import"./destr@2.0.3-CVtkxrq9.js";import"./deep-pick-omit@1.2.1-CegYQlcN.js";import"./pinia@2.2.4_typescript@5.6.3_vue@3.5.12_typescript@5.6.3_-BdVsFNKX.js";import"./vue-demi@0.14.10_vue@3.5.12_typescript@5.6.3_-Dq6ymT-8.js";import"./html-to-image@1.11.11-BOFdlgi9.js";import"./vue-router@4.3.2_vue@3.5.12_typescript@5.6.3_-Brd4YmBy.js";import"./vue-i18n@9.13.1_vue@3.5.12_typescript@5.6.3_-DVUVmCuN.js";import"./@intlify_shared@9.13.1-BxU0OzX2.js";import"./@intlify_core-base@9.13.1-C6DqbPB6.js";import"./@intlify_message-compiler@9.13.1-GrLDMuy_.js";import"./echarts@5.5.0-CezqL3m-.js";import"./zrender@5.5.0-DW8ownf1.js";import"./tslib@2.3.0-BDyQ-Jie.js";import"./@vue_runtime-dom@3.5.12-BKraWVUW.js";import"./@vue_shared@3.5.12--5_uv9t5.js";import"./interactjs@1.10.26-DZL_TZzP.js";import"./mobx@5.15.7-CEMJDQot.js";import"./uuid@9.0.1-CQkTLCs1.js";import"./classnames@2.5.1-nUTIn1-D.js";import"./mousetrap@1.6.5-BTGDluHR.js";import"./mobx-utils@5.6.2_mobx@5.15.7-C1xBETkd.js";import"./axios@1.7.5-C8DqakIB.js";import"./date-fns@3.6.0-q9PkOyxq.js";import"./seemly@0.3.8-DjGKl9dV.js";import"./vueuc@0.4.64_vue@3.5.12_typescript@5.6.3_-BcAtcaHt.js";import"./evtd@0.2.4-CI_DDEu_.js";import"./@css-render_vue3-ssr@0.15.14_vue@3.5.12_typescript@5.6.3_-BZYDXyJG.js";import"./vooks@0.2.12_vue@3.5.12_typescript@5.6.3_--iLh4DJ5.js";import"./vdirs@0.1.8_vue@3.5.12_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"./treemate@0.3.11-DKekKYbv.js";import"./date-fns-tz@3.1.3_date-fns@3.6.0-ztskLDQQ.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 R=e=>B({url:"/api/list",method:"get",params:e}),Mt=b({name:"MockDemo",setup(){const e=[{type:"selection",multiple:!0},{title:"id",key:"id"},{title:"邮箱",key:"email"},{title:"地址",key:"address"},{title:"姓名",key:"name"},{title:"年龄",key:"age"},{title:"创建时间",key:"createDate"},{title:"操作",key:"action",render:m=>t(l,{align:"center"},{default:()=>[t(i,{type:"primary",text:!0,onClick:()=>{window.$message.info("查看")}},{default:()=>[o("查看")]}),t(i,{type:"primary",text:!0,onClick:()=>{window.$message.warning("编辑")}},{default:()=>[o("编辑")]}),t(i,{type:"error",text:!0,onClick:()=>{window.$message.error("删除")}},{default:()=>[o("删除")]})]})}],u=P({email:null}),[n,{getPage:r,getPageSize:a,setItemCount:s,getCallback:F,setPage:x,setPageSize:v}]=C(()=>{E({page:r(),pageSize:a(),email:u.email})}),{data:c,loading:d,run:E}=A(R,{defaultParams:[{page:r(),pageSize:a(),email:u.email}],onSuccess:m=>{const{total:g}=m;s(g)}});return{personData:c,personLoading:d,columns:e,...N(u),getCallback:F,paginationRef:n}},render(){return t(l,{vertical:!0},{default:()=>{var e;return[t(p,{title:"Mock 数据"},{default:()=>[t("h2",null,[o("mock 数据使用。但是,并没有启用生产环境的部署,所以生产环境结果为空。")])]}),t(p,{title:"提示"},{default:()=>[t("h2",null,[o("RTable 组件有一个比较值得注意的地方就是,该组件会自动的按照数据量计算分页条数。所以你在异步获取数据的时候,一定要手动设置 remote 属性为 true并且设置 itemCount 或者 pageCount。")])]}),t(y,{labelPlacement:"left"},{default:()=>[t(f,{cols:3},{default:()=>t(w,null,[t(h,{label:"邮箱"},{default:()=>[t(D,{value:this.email,"onUpdate:value":u=>this.email=u,clearable:!0},null)]})]),action:()=>{var u;return t(i,{type:"primary",onClick:(u=this.getCallback)==null?void 0:u.bind(this)},{default:()=>[o("搜索")]})}})]}),t(k,{title:"Mock数据表格",data:(e=this.personData)==null?void 0:e.data,loading:this.personLoading,columns:this.columns,"onUpdate:columns":u=>this.columns=u,pagination:this.paginationRef,remote:!0,rowKey:u=>u.id},null)]}})}});export{Mt as default};