mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
2 lines
3.4 KiB
JavaScript
2 lines
3.4 KiB
JavaScript
import{V as c,a as r}from"./index.c4b18c89.js";import{V as n}from"./index.45d743b7.js";import{V as x}from"./index.4e4daaac.js";import{c as F}from"./index.d8fe3225.js";import{a as D}from"./use-translate.d2900b8c.js";import{z as T,r as A,o as u,a as p,e,w as o,B as t,F as h,b as f,c as m,d as a,t as l,h as V}from"./vue-libs.b44bc779.js";import"./with-install.19a35764.js";import"./index.b70c9b40.js";const k={class:"text"},E=a("div",{class:"text"},"cover",-1),y={class:"text"},B=a("div",{class:"text"},"contain",-1),C={class:"text"},b={class:"text"},L={class:"text"},M={class:"text"},N={class:"text"},z={class:"text"},O=T({__name:"index",setup(R){const s=D({"zh-CN":{fitMode:"\u586B\u5145\u6A21\u5F0F",position:"\u56FE\u7247\u4F4D\u7F6E",round:"\u5706\u5F62\u56FE\u7247",loading:"\u52A0\u8F7D\u4E2D\u63D0\u793A",error:"\u52A0\u8F7D\u5931\u8D25\u63D0\u793A",defaultTip:"\u9ED8\u8BA4\u63D0\u793A",customTip:"\u81EA\u5B9A\u4E49\u63D0\u793A",loadFail:"\u52A0\u8F7D\u5931\u8D25"},"en-US":{fitMode:"Fit Mode",position:"Position",round:"Round",loading:"Loading",error:"Error",defaultTip:"Default Tip",customTip:"Custom Tip",loadFail:"Load failed"}}),_=F("cat.jpeg"),g=["contain","cover","fill","none","scale-down"],v=["left","center","right"],w=["top","center","bottom"];return(U,S)=>{const d=A("demo-block");return u(),p(h,null,[e(d,{title:t(s)("basicUsage")},{default:o(()=>[e(t(c),null,{default:o(()=>[e(t(n),{width:"100",height:"100",src:t(_)},null,8,["src"])]),_:1})]),_:1},8,["title"]),e(d,{title:t(s)("fitMode")},{default:o(()=>[e(t(c),{gutter:"20"},{default:o(()=>[(u(!0),p(h,null,f(t(g),i=>(u(),m(t(r),{span:"8",key:i},{default:o(()=>[e(t(n),{fit:i,width:"100%",height:"27vw",src:t(_)},null,8,["fit","src"]),a("div",k,l(i),1)]),_:2},1024))),128))]),_:1})]),_:1},8,["title"]),e(d,{title:t(s)("position")},{default:o(()=>[e(t(c),{gutter:"20"},{default:o(()=>[(u(!0),p(h,null,f(t(v),i=>(u(),m(t(r),{span:"8",key:i},{default:o(()=>[e(t(n),{position:i,width:"100%",height:"27vw",fit:"cover",src:t(_)},null,8,["position","src"]),E,a("div",y,l(i),1)]),_:2},1024))),128)),(u(!0),p(h,null,f(t(w),i=>(u(),m(t(r),{span:"8",key:i},{default:o(()=>[e(t(n),{position:i,width:"100%",height:"27vw",fit:"contain",src:t(_)},null,8,["position","src"]),B,a("div",C,l(i),1)]),_:2},1024))),128))]),_:1})]),_:1},8,["title"]),e(d,{title:t(s)("round")},{default:o(()=>[e(t(c),{gutter:"20"},{default:o(()=>[(u(!0),p(h,null,f(t(g),i=>(u(),m(t(r),{span:"8",key:i},{default:o(()=>[e(t(n),{round:"",fit:i,width:"100%",height:"27vw",src:t(_)},null,8,["fit","src"]),a("div",b,l(i),1)]),_:2},1024))),128))]),_:1})]),_:1},8,["title"]),e(d,{title:t(s)("loading")},{default:o(()=>[e(t(c),{gutter:"20"},{default:o(()=>[e(t(r),{span:"8"},{default:o(()=>[e(t(n),{width:"100%",height:"27vw"}),a("div",L,l(t(s)("defaultTip")),1)]),_:1}),e(t(r),{span:"8"},{default:o(()=>[e(t(n),{width:"100%",height:"27vw"},{loading:o(()=>[e(t(x),{type:"spinner",size:"20"})]),_:1}),a("div",M,l(t(s)("customTip")),1)]),_:1})]),_:1})]),_:1},8,["title"]),e(d,{title:t(s)("error")},{default:o(()=>[e(t(c),{gutter:"20"},{default:o(()=>[e(t(r),{span:"8"},{default:o(()=>[e(t(n),{width:"100%",height:"27vw",src:"http://x"}),a("div",N,l(t(s)("defaultTip")),1)]),_:1}),e(t(r),{span:"8"},{default:o(()=>[e(t(n),{width:"100%",height:"27vw",src:"http://x"},{error:o(()=>[V(l(t(s)("loadFail")),1)]),_:1}),a("div",z,l(t(s)("customTip")),1)]),_:1})]),_:1})]),_:1},8,["title"])],64)}}});export{O as default};
|