import{N as m,R as i}from"./hooks-DNoo5Jj5.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"./vue-hooks-plus@2.2.1_vue@3.5.12-C6aYKqdf.js";import"./lodash@4.17.21-Cw59kuJw.js";import"./js-cookie@3.0.5-Z_8Sd105.js";import"./screenfull@5.2.0-DmMZCkhi.js";import"./jsbarcode@3.11.6-DGNGFp02.js";import{N as o,c as a,O as r}from"./naive-ui@2.40.1_vue@3.5.12-DtgApL3K.js";import{l as p,b as u,I as t}from"./@vue_runtime-core@3.5.12-Ds-HrVrM.js";import{e as s,x as E}from"./@vue_reactivity@3.5.12-Bs6EYLxJ.js";import"./lodash-es@4.17.21-CeZG2a4n.js";import"./@vueuse_core@11.1.0_vue@3.5.12-C00EZtgk.js";import"./@vueuse_shared@11.1.0_vue@3.5.12-B9WpRTpD.js";import"./utils-DewQlJ2W.js";import"./pinia-plugin-persistedstate@4.1.1_pinia@2.2.4-_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.2.2_vue@3.5.12-DjAImzYl.js";import"./vue-demi@0.14.10_vue@3.5.12-Dq6ymT-8.js";import"./html-to-image@1.11.11-BOFdlgi9.js";import"./vue-router@4.3.2_vue@3.5.12-DrIOQ45i.js";import"./vue-i18n@9.13.1_vue@3.5.12-DJkg4ac8.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-ewSD1rNh.js";import"./@vue_shared@3.5.12--5_uv9t5.js";import"./interactjs@1.10.26-DZL_TZzP.js";import"./call-bind@1.0.7-Cpj98o6Y.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-gFk5c7Fb.js";import"./evtd@0.2.4-CI_DDEu_.js";import"./@css-render_vue3-ssr@0.15.14_vue@3.5.12-CJ-8xq3W.js";import"./vooks@0.2.12_vue@3.5.12-CeQQlSXI.js";import"./vdirs@0.1.8_vue@3.5.12-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 au=p({name:"ModalDemo",setup(){const l=s({modal1:!1,modal2:!1,modal3:!1}),{create:F}=m(),e=()=>{F({title:"卡片模态框",dad:!0,preset:"card",content:"我可以被拖拽的全屏card模态框",fullscreen:!0})},d=()=>{F({title:"模态框",content:"内容",preset:"dialog",dad:!0})};return{...E(l),createCardModal:e,createDialogModal:d}},render(){const{createCardModal:l,createDialogModal:F}=this;return u(a,{vertical:!0},{default:()=>[u(o,{title:"props"},{default:()=>[u(a,{vertical:!0},{default:()=>[u("h3",null,[t("memoryPosition: 是否记住上一次被拖拽的位置,如果设置为 true,那么下一次打开的时候会自动定位到上一次的位置。")]),u("h3",null,[t("fullscreen: 全屏模态框。")]),u("h3",null,[t("dad: 启用拖拽,当配置为 false 时,会禁用拖拽效果。")])]})]}),u(i,{show:this.modal1,"onUpdate:show":e=>this.modal1=e,title:"全屏模态框",fullscreen:!0,preset:"card"},{default:()=>[t("我是全屏模态框,并且会自动启用滚动条。")]}),u(i,{show:this.modal2,"onUpdate:show":e=>this.modal2=e,preset:"card",title:"可拖拽卡片模态框",dad:!0},{default:()=>[u("p",null,[t("我可以被拖拽")])]}),u(i,{show:this.modal3,"onUpdate:show":e=>this.modal3=e,preset:"dialog",title:"可拖拽卡片模态框",dad:!0},{default:()=>[u("p",null,[t("我可以被拖拽")])]}),u(o,{title:"可拖拽模态框"},{default:()=>[u(r,{onClick:()=>this.modal2=!0},{default:()=>[t("卡片模态框")]}),u(r,{onClick:()=>this.modal3=!0},{default:()=>[t("对话框模态框")]})]}),u(o,{title:"全屏模态框"},{default:()=>[u(a,{vertical:!0},{default:()=>[u("h4",null,[t("全屏模态框需要同时设置:fullscreen 为 true,并且 preset 为 card 时才会生效。")]),u(r,{onClick:()=>this.modal1=!0},{default:()=>[t("打开")]})]})]}),u(o,{title:"手动设置宽度"},{default:()=>[u("h4",null,[t("width(--r-modal-width): 当 preset 不为 dialog 或者 card 的时候,你可能用得上。")]),u("h4",null,[t("dialogWidth(--r-modal-dialog-width): 当 preset 为 dialog,你可能用得上。")]),u("h4",null,[t("cardWidth(--r-modal-card-width): 当 preset 为 card,你可能用得上。")]),u("h4",null,[t("所有的宽度配置属性都会注入一个对应的 `css variable`,有时候会用上。")])]}),u(o,{title:"重写 useModal"},{default:()=>[u(r,{onClick:l.bind(this)},{default:()=>[t("创建卡片模态框")]}),u(r,{onClick:F.bind(this)},{default:()=>[t("创建对话框模态框")]})]})]})}});export{au as default};