mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
2 lines
3.5 KiB
JavaScript
2 lines
3.5 KiB
JavaScript
import{V as i}from"./index.bbd81525.js";import{I as d}from"./function-call.f7305c66.js";import{c as r}from"./index.d8fe3225.js";import{T as D}from"./function-call.509e41a7.js";import{a as b}from"./use-translate.d2900b8c.js";import{z as x,C as c,r as B,o as P,a as _,e as l,w as u,B as o,h as $,t as T,d as f,F as U}from"./vue-libs.b44bc779.js";import"./with-install.19a35764.js";import"./use-route.82f2be69.js";import"./index.b70c9b40.js";import"./mount-component.f3744995.js";import"./use-expose.c942d5f8.js";import"./constant.80c6de18.js";import"./interceptor.f0c85874.js";import"./index.1461a543.js";import"./use-touch.04ca7093.js";import"./on-popup-reopen.138c77eb.js";import"./index.e6e790ed.js";import"./use-lazy-render.f712e85e.js";import"./index.d46e53a8.js";import"./index.45d743b7.js";import"./index.4e4daaac.js";const V={style:{width:"100%"},controls:""},j=["src"],so=x({__name:"index",setup(N){const w=d.Component,t=b({"zh-CN":{closed:"\u5173\u95ED",showClose:"\u5C55\u793A\u5173\u95ED\u6309\u94AE",showImages:"\u9884\u89C8\u56FE\u7247",beforeClose:"\u5F02\u6B65\u5173\u95ED",closeEvent:"\u76D1\u542C\u5173\u95ED\u4E8B\u4EF6",customConfig:"\u4F20\u5165\u914D\u7F6E\u9879",startPosition:"\u6307\u5B9A\u521D\u59CB\u4F4D\u7F6E",componentCall:"\u7EC4\u4EF6\u8C03\u7528",useImageSlot:"\u4F7F\u7528 image \u63D2\u69FD",index:s=>`\u7B2C${s+1}\u9875`},"en-US":{closed:"closed",showClose:"Show Close Icon",showImages:"Show Images",beforeClose:"Before Close",closeEvent:"Close Event",customConfig:"Custom Config",startPosition:"Set Start Position",componentCall:"Component Call",useImageSlot:"Use image slot",index:s=>`Page: ${s}`}}),v=[r("apple-1.jpeg"),r("apple-2.jpeg"),r("apple-3.jpeg"),r("apple-4.jpeg")],h=["https://www.w3school.com.cn/i/movie.ogg","https://www.w3school.com.cn/i/movie.ogg","https://www.w3school.com.cn/i/movie.ogg","https://www.w3school.com.cn/i/movie.ogg"],p=c(!1),g=c(0),C=c(!1),k=()=>D(t("closed")),E=()=>new Promise(s=>{setTimeout(()=>{s(!0)},1e3)}),F=()=>{p.value=!0},I=s=>{g.value=s},S=()=>{C.value=!0},a=(s={})=>{const e=d({images:v,...s});s.beforeClose&&setTimeout(()=>{e==null||e.close()},2e3)};return(s,e)=>{const m=B("demo-block");return P(),_(U,null,[l(m,{card:"",title:o(t)("basicUsage")},{default:u(()=>[l(o(i),{"is-link":"",value:o(t)("showImages"),onClick:e[0]||(e[0]=n=>a())},null,8,["value"])]),_:1},8,["title"]),l(m,{card:"",title:o(t)("customConfig")},{default:u(()=>[l(o(i),{"is-link":"",value:o(t)("startPosition"),onClick:e[1]||(e[1]=n=>a({startPosition:1}))},null,8,["value"]),l(o(i),{"is-link":"",value:o(t)("showClose"),onClick:e[2]||(e[2]=n=>a({closeable:!0}))},null,8,["value"]),l(o(i),{"is-link":"",value:o(t)("closeEvent"),onClick:e[3]||(e[3]=n=>a({onClose:k}))},null,8,["value"])]),_:1},8,["title"]),l(m,{card:"",title:o(t)("beforeClose")},{default:u(()=>[l(o(i),{"is-link":"",value:o(t)("beforeClose"),onClick:e[4]||(e[4]=n=>a({beforeClose:E}))},null,8,["value"])]),_:1},8,["title"]),l(m,{card:"",title:o(t)("componentCall")},{default:u(()=>[l(o(i),{"is-link":"",value:o(t)("componentCall"),onClick:F},null,8,["value"]),l(o(w),{show:p.value,"onUpdate:show":e[5]||(e[5]=n=>p.value=n),images:v,onChange:I},{index:u(()=>[$(T(o(t)("index",g.value)),1)]),_:1},8,["show"])]),_:1},8,["title"]),l(m,{card:"",title:o(t)("useImageSlot")},{default:u(()=>[l(o(i),{"is-link":"",value:o(t)("useImageSlot"),onClick:S},null,8,["value"]),l(o(w),{show:C.value,"onUpdate:show":e[6]||(e[6]=n=>C.value=n),images:h},{image:u(({src:n})=>[f("video",V,[f("source",{src:n},null,8,j)])]),_:1},8,["show"])]),_:1},8,["title"])],64)}}});export{so as default};
|