From 20fa0f93dd8fd75a4a882e7c40cf3681a22d87cd Mon Sep 17 00:00:00 2001 From: landluck Date: Mon, 15 Apr 2024 02:30:26 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20youzan/v?= =?UTF-8?q?ant-weapp@68be39fea2e113af2413f631847fcc9a49be8ecb=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...er.194ba64b.js => iframe-router.96c44ab5.js} | 17 ++--------------- assets/{main.3896dd28.js => main.d39e28d8.js} | 2 +- .../{mobile.bcbbc1cd.js => mobile.2a9ead0c.js} | 2 +- index.html | 4 ++-- mobile.html | 4 ++-- 5 files changed, 8 insertions(+), 21 deletions(-) rename assets/{iframe-router.194ba64b.js => iframe-router.96c44ab5.js} (99%) rename assets/{main.3896dd28.js => main.d39e28d8.js} (99%) rename assets/{mobile.bcbbc1cd.js => mobile.2a9ead0c.js} (99%) diff --git a/assets/iframe-router.194ba64b.js b/assets/iframe-router.96c44ab5.js similarity index 99% rename from assets/iframe-router.194ba64b.js rename to assets/iframe-router.96c44ab5.js index 5cda0649..e149295f 100644 --- a/assets/iframe-router.194ba64b.js +++ b/assets/iframe-router.96c44ab5.js @@ -37,20 +37,7 @@ yarn add @vant/weapp --production # \u5B89\u88C5 0.x \u7248\u672C npm i vant-weapp -S --production -

\u6B65\u9AA4\u4E8C \u4FEE\u6539 app.json

\u5C06 app.json \u4E2D\u7684 "style": "v2" \u53BB\u9664\uFF0C\u5C0F\u7A0B\u5E8F\u7684\u65B0\u7248\u57FA\u7840\u7EC4\u4EF6\u5F3A\u884C\u52A0\u4E0A\u4E86\u8BB8\u591A\u6837\u5F0F\uFF0C\u96BE\u4EE5\u8986\u76D6\uFF0C\u4E0D\u5173\u95ED\u5C06\u9020\u6210\u90E8\u5206\u7EC4\u4EF6\u6837\u5F0F\u6DF7\u4E71\u3002

\u6B65\u9AA4\u4E09 \u4FEE\u6539 project.config.json

\u5F00\u53D1\u8005\u5DE5\u5177\u521B\u5EFA\u7684\u9879\u76EE\uFF0CminiprogramRoot \u9ED8\u8BA4\u4E3A miniprogram\uFF0Cpackage.json \u5728\u5176\u5916\u90E8\uFF0Cnpm \u6784\u5EFA\u65E0\u6CD5\u6B63\u5E38\u5DE5\u4F5C\u3002

\u9700\u8981\u624B\u52A8\u5728 project.config.json \u5185\u6DFB\u52A0\u5982\u4E0B\u914D\u7F6E\uFF0C\u4F7F\u5F00\u53D1\u8005\u5DE5\u5177\u53EF\u4EE5\u6B63\u786E\u7D22\u5F15\u5230 npm \u4F9D\u8D56\u7684\u4F4D\u7F6E\u3002

{
-  ...
-  "setting": {
-    ...
-    "packNpmManually": true,
-    "packNpmRelationList": [
-      {
-        "packageJsonPath": "./package.json",
-        "miniprogramNpmDistDir": "./miniprogram/"
-      }
-    ]
-  }
-}
-

\u6CE8\u610F\uFF1A \u7531\u4E8E\u76EE\u524D\u65B0\u7248\u5F00\u53D1\u8005\u5DE5\u5177\u521B\u5EFA\u7684\u5C0F\u7A0B\u5E8F\u76EE\u5F55\u6587\u4EF6\u7ED3\u6784\u95EE\u9898\uFF0Cnpm\u6784\u5EFA\u7684\u6587\u4EF6\u76EE\u5F55\u4E3Aminiprogram_npm\uFF0C\u5E76\u4E14\u5F00\u53D1\u5DE5\u5177\u4F1A\u9ED8\u8BA4\u5728\u5F53\u524D\u76EE\u5F55\u4E0B\u521B\u5EFAminiprogram_npm\u7684\u6587\u4EF6\u540D\uFF0C\u6240\u4EE5\u65B0\u7248\u672C\u7684miniprogramNpmDistDir\u914D\u7F6E\u4E3A'./'\u5373\u53EF

\u6B65\u9AA4\u56DB \u6784\u5EFA npm \u5305

\u6253\u5F00\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\uFF0C\u70B9\u51FB \u5DE5\u5177 -> \u6784\u5EFA npm\uFF0C\u5E76\u52FE\u9009 \u4F7F\u7528 npm \u6A21\u5757 \u9009\u9879\uFF0C\u6784\u5EFA\u5B8C\u6210\u540E\uFF0C\u5373\u53EF\u5F15\u5165\u7EC4\u4EF6\u3002

\u6B65\u9AA4\u4E94 typescript \u652F\u6301

\u5982\u679C\u4F60\u4F7F\u7528 typescript \u5F00\u53D1\u5C0F\u7A0B\u5E8F\uFF0C\u8FD8\u9700\u8981\u505A\u5982\u4E0B\u64CD\u4F5C\uFF0C\u4EE5\u83B7\u5F97\u987A\u7545\u7684\u5F00\u53D1\u4F53\u9A8C\u3002

\u5B89\u88C5 miniprogram-api-typings

# \u901A\u8FC7 npm \u5B89\u88C5
+

\u6B65\u9AA4\u4E8C \u4FEE\u6539 app.json

\u5C06 app.json \u4E2D\u7684 "style": "v2" \u53BB\u9664\uFF0C\u5C0F\u7A0B\u5E8F\u7684\u65B0\u7248\u57FA\u7840\u7EC4\u4EF6\u5F3A\u884C\u52A0\u4E0A\u4E86\u8BB8\u591A\u6837\u5F0F\uFF0C\u96BE\u4EE5\u8986\u76D6\uFF0C\u4E0D\u5173\u95ED\u5C06\u9020\u6210\u90E8\u5206\u7EC4\u4EF6\u6837\u5F0F\u6DF7\u4E71\u3002

\u6B65\u9AA4\u4E09 \u6784\u5EFA npm \u5305

\u6253\u5F00\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\uFF0C\u70B9\u51FB \u5DE5\u5177 -> \u6784\u5EFA npm\uFF0C\u5E76\u52FE\u9009 \u4F7F\u7528 npm \u6A21\u5757 \u9009\u9879\uFF0C\u6784\u5EFA\u5B8C\u6210\u540E\uFF0C\u5373\u53EF\u5F15\u5165\u7EC4\u4EF6\u3002

\u6B65\u9AA4\u56DB typescript \u652F\u6301

\u5982\u679C\u4F60\u4F7F\u7528 typescript \u5F00\u53D1\u5C0F\u7A0B\u5E8F\uFF0C\u8FD8\u9700\u8981\u505A\u5982\u4E0B\u64CD\u4F5C\uFF0C\u4EE5\u83B7\u5F97\u987A\u7545\u7684\u5F00\u53D1\u4F53\u9A8C\u3002

\u5B89\u88C5 miniprogram-api-typings

# \u901A\u8FC7 npm \u5B89\u88C5
 npm i -D miniprogram-api-typings
 
 # \u901A\u8FC7 yarn \u5B89\u88C5
@@ -93,7 +80,7 @@ git clone git@github.com:youzan/vant-weapp.gi
 # \u6267\u884C\u7EC4\u4EF6\u7F16\u8BD1
 npm run dev
 
-

\u63A5\u7740\u6253\u5F00\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\uFF0C\u5BFC\u5165example\u76EE\u5F55\u7684\u9879\u76EE\u5C31\u53EF\u4EE5\u9884\u89C8\u793A\u4F8B\u4E86\u3002

\u5173\u4E8E\u7528\u6237\u9690\u79C1\u4FDD\u62A4\u6307\u5F15

@vant/weapp \u90E8\u5206\u7EC4\u4EF6\u4F7F\u7528\u4E86\u5FAE\u4FE1\u63D0\u4F9B\u7684\u63A5\u53E3\uFF0C\u5176\u4E2D\u90E8\u5206\u63A5\u53E3\u6D89\u53CA\u83B7\u53D6\u7528\u6237\u9690\u79C1\u4FE1\u606F\u3002

\u4F8B\u5982 <Uploader /> \u4F7F\u7528\u4E86\u5FAE\u4FE1\u63D0\u4F9B\u7684\u9009\u62E9\u7528\u6237\u76F8\u518C\u4E2D\u56FE\u7247\u63A5\u53E3(wx.chooseImage)\u3002

\u5F53\u5C0F\u7A0B\u5E8F\u5F15\u5165 @vant/weapp \u5E76\u53D1\u5E03\u65F6\uFF0C \u6839\u636E\u5FAE\u4FE1\u300A\u7528\u6237\u9690\u79C1\u4FDD\u62A4\u6307\u5F15\u586B\u5199\u8BF4\u660E\u300B\uFF0C \u5982\u68C0\u6D4B\u5230\u4EE3\u7801\u4E2D\u5B58\u5728\u6D89\u53CA\u7528\u6237\u9690\u79C1\u4FE1\u606F\u63A5\u53E3\u5219\u9700\u586B\u5199\u7528\u6237\u9690\u79C1\u4FDD\u62A4\u6307\u5F15\u4FE1\u606F\uFF0C\u5982\u5DF2\u586B\u5199\u5219\u65E0\u9700\u91CD\u590D\u586B\u5199\u3002

`,15),T=[I],$={__name:"quickstart",setup(a,{expose:s}){return s({frontmatter:{}}),(l,t)=>(e(),p("div",D,T))}},A={class:"van-doc-markdown-body"},F=d(`

\u5B9A\u5236\u4E3B\u9898

\u80CC\u666F\u77E5\u8BC6

\u5C0F\u7A0B\u5E8F\u57FA\u4E8E Shadow DOM \u6765\u5B9E\u73B0\u81EA\u5B9A\u4E49\u7EC4\u4EF6\uFF0C\u6240\u4EE5 Vant Weapp \u4F7F\u7528\u4E0E\u4E4B\u914D\u5957\u7684 CSS \u53D8\u91CF \u6765\u5B9E\u73B0\u5B9A\u5236\u4E3B\u9898\u3002\u94FE\u63A5\u4E2D\u7684\u5185\u5BB9\u53EF\u4EE5\u5E2E\u52A9\u4F60\u5BF9\u8FD9\u4E24\u4E2A\u6982\u5FF5\u6709\u57FA\u672C\u7684\u8BA4\u8BC6\uFF0C\u907F\u514D\u8BB8\u591A\u4E0D\u5FC5\u8981\u7684\u56F0\u6270\u3002

CSS \u53D8\u91CF \u7684\u517C\u5BB9\u6027\u8981\u6C42\u53EF\u4EE5\u5728 \u8FD9\u91CC \u67E5\u770B\u3002\u5BF9\u4E8E\u4E0D\u652F\u6301 CSS \u53D8\u91CF \u7684\u8BBE\u5907\uFF0C\u5B9A\u5236\u4E3B\u9898\u5C06\u4E0D\u4F1A\u751F\u6548\uFF0C\u4E0D\u8FC7\u4E0D\u5FC5\u62C5\u5FC3\uFF0C\u9ED8\u8BA4\u6837\u5F0F\u4ECD\u4F1A\u751F\u6548\u3002

\u6837\u5F0F\u53D8\u91CF

\u5B9A\u5236\u4F7F\u7528\u7684 CSS \u53D8\u91CF \u4E0E Less \u53D8\u91CF \u540C\u540D\uFF0C\u4E0B\u9762\u662F\u4E00\u4E9B\u57FA\u672C\u7684\u6837\u5F0F\u53D8\u91CF\uFF0C\u6240\u6709\u53EF\u7528\u7684\u989C\u8272\u53D8\u91CF\u8BF7\u53C2\u8003 \u914D\u7F6E\u6587\u4EF6\u3002

// Component Colors
+

\u63A5\u7740\u6253\u5F00\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\uFF0C\u5BFC\u5165example\u76EE\u5F55\u7684\u9879\u76EE\u5C31\u53EF\u4EE5\u9884\u89C8\u793A\u4F8B\u4E86\u3002

\u5173\u4E8E\u7528\u6237\u9690\u79C1\u4FDD\u62A4\u6307\u5F15

@vant/weapp \u90E8\u5206\u7EC4\u4EF6\u4F7F\u7528\u4E86\u5FAE\u4FE1\u63D0\u4F9B\u7684\u63A5\u53E3\uFF0C\u5176\u4E2D\u90E8\u5206\u63A5\u53E3\u6D89\u53CA\u83B7\u53D6\u7528\u6237\u9690\u79C1\u4FE1\u606F\u3002

\u4F8B\u5982 <Uploader /> \u4F7F\u7528\u4E86\u5FAE\u4FE1\u63D0\u4F9B\u7684\u9009\u62E9\u7528\u6237\u76F8\u518C\u4E2D\u56FE\u7247\u63A5\u53E3(wx.chooseImage)\u3002

\u5F53\u5C0F\u7A0B\u5E8F\u5F15\u5165 @vant/weapp \u5E76\u53D1\u5E03\u65F6\uFF0C \u6839\u636E\u5FAE\u4FE1\u300A\u7528\u6237\u9690\u79C1\u4FDD\u62A4\u6307\u5F15\u586B\u5199\u8BF4\u660E\u300B\uFF0C \u5982\u68C0\u6D4B\u5230\u4EE3\u7801\u4E2D\u5B58\u5728\u6D89\u53CA\u7528\u6237\u9690\u79C1\u4FE1\u606F\u63A5\u53E3\u5219\u9700\u586B\u5199\u7528\u6237\u9690\u79C1\u4FDD\u62A4\u6307\u5F15\u4FE1\u606F\uFF0C\u5982\u5DF2\u586B\u5199\u5219\u65E0\u9700\u91CD\u590D\u586B\u5199\u3002

`,14),T=[I],$={__name:"quickstart",setup(a,{expose:s}){return s({frontmatter:{}}),(l,t)=>(e(),p("div",D,T))}},A={class:"van-doc-markdown-body"},F=d(`

\u5B9A\u5236\u4E3B\u9898

\u80CC\u666F\u77E5\u8BC6

\u5C0F\u7A0B\u5E8F\u57FA\u4E8E Shadow DOM \u6765\u5B9E\u73B0\u81EA\u5B9A\u4E49\u7EC4\u4EF6\uFF0C\u6240\u4EE5 Vant Weapp \u4F7F\u7528\u4E0E\u4E4B\u914D\u5957\u7684 CSS \u53D8\u91CF \u6765\u5B9E\u73B0\u5B9A\u5236\u4E3B\u9898\u3002\u94FE\u63A5\u4E2D\u7684\u5185\u5BB9\u53EF\u4EE5\u5E2E\u52A9\u4F60\u5BF9\u8FD9\u4E24\u4E2A\u6982\u5FF5\u6709\u57FA\u672C\u7684\u8BA4\u8BC6\uFF0C\u907F\u514D\u8BB8\u591A\u4E0D\u5FC5\u8981\u7684\u56F0\u6270\u3002

CSS \u53D8\u91CF \u7684\u517C\u5BB9\u6027\u8981\u6C42\u53EF\u4EE5\u5728 \u8FD9\u91CC \u67E5\u770B\u3002\u5BF9\u4E8E\u4E0D\u652F\u6301 CSS \u53D8\u91CF \u7684\u8BBE\u5907\uFF0C\u5B9A\u5236\u4E3B\u9898\u5C06\u4E0D\u4F1A\u751F\u6548\uFF0C\u4E0D\u8FC7\u4E0D\u5FC5\u62C5\u5FC3\uFF0C\u9ED8\u8BA4\u6837\u5F0F\u4ECD\u4F1A\u751F\u6548\u3002

\u6837\u5F0F\u53D8\u91CF

\u5B9A\u5236\u4F7F\u7528\u7684 CSS \u53D8\u91CF \u4E0E Less \u53D8\u91CF \u540C\u540D\uFF0C\u4E0B\u9762\u662F\u4E00\u4E9B\u57FA\u672C\u7684\u6837\u5F0F\u53D8\u91CF\uFF0C\u6240\u6709\u53EF\u7528\u7684\u989C\u8272\u53D8\u91CF\u8BF7\u53C2\u8003 \u914D\u7F6E\u6587\u4EF6\u3002

// Component Colors
 @text-color: #323233;
 @border-color: #ebedf0;
 @active-color: #f2f3f5;
diff --git a/assets/main.3896dd28.js b/assets/main.d39e28d8.js
similarity index 99%
rename from assets/main.3896dd28.js
rename to assets/main.d39e28d8.js
index 812184e6..ff834358 100644
--- a/assets/main.3896dd28.js
+++ b/assets/main.d39e28d8.js
@@ -1 +1 @@
-import{_ as h,p as B,c as A,a as m,s as j,i as M,b as F,l as R,d as S,e as q,f as V,g as z}from"./iframe-router.194ba64b.js";import{c as C,n as p,a as r,r as u,o as i,F as y,b as $,d,t as f,e as v,f as g,g as I,h as Y,w as b,T as W,i as w,j as U,v as G,p as J,k as K,l as Q,m as X,q as Z,s as ee}from"./vue-libs.5e980ef0.js";const te={name:"VanDocNavLink",props:{base:String,item:Object},computed:{itemName(){const e=(this.item.title||this.item.name).split(" ");return`${e[0]} ${e.slice(1).join(" ")}`},path(){return`${this.base}${this.item.path}`},active(){return this.$route.path===this.path?!0:this.item.path==="home"?this.$route.path===this.base:!1}},watch:{active(){this.scrollIntoView()}},mounted(){this.scrollIntoView()},methods:{scrollIntoView(){this.active&&this.$el&&this.$el.scrollIntoViewIfNeeded&&this.$el.scrollIntoViewIfNeeded()}}},ne=["href","innerHTML"],oe=["innerHTML"];function se(e,n,t,a,s,o){const c=u("router-link");return t.item.path?(i(),C(c,{key:0,class:p({active:o.active}),to:o.path,innerHTML:o.itemName},null,8,["class","to","innerHTML"])):t.item.link?(i(),r("a",{key:1,href:t.item.link,innerHTML:o.itemName},null,8,ne)):(i(),r("a",{key:2,innerHTML:o.itemName},null,8,oe))}var x=h(te,[["render",se]]);const ae={name:"VanDocNav",components:{[x.name]:x},props:{lang:String,navConfig:Array},data(){return{top:64,bottom:0}},computed:{style(){return{top:this.top+"px",bottom:this.bottom+"px"}},base(){return this.lang?`/${this.lang}/`:"/"}},created(){window.addEventListener("scroll",this.onScroll),this.onScroll()},methods:{onScroll(){const{pageYOffset:e}=window;this.top=Math.max(0,64-e)}}},ie={class:"van-doc-nav__title"};function re(e,n,t,a,s,o){const c=u("van-doc-nav-link");return i(),r("div",{class:"van-doc-nav",style:I(o.style)},[(i(!0),r(y,null,$(t.navConfig,(l,_)=>(i(),r("div",{class:"van-doc-nav__group",key:_},[d("div",ie,f(l.title),1),l.items?(i(!0),r(y,{key:0},$(l.items,(k,T)=>(i(),r("div",{key:T,class:"van-doc-nav__item"},[v(c,{item:k,base:o.base},null,8,["item","base"])]))),128)):g("",!0)]))),128))],4)}var ce=h(ae,[["render",re]]);const le="modulepreload",H={},de="/vant-weapp/",N=function(n,t){return!t||t.length===0?n():Promise.all(t.map(a=>{if(a=`${de}${a}`,a in H)return;H[a]=!0;const s=a.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${o}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":le,s||(c.as="script",c.crossOrigin=""),c.href=a,document.head.appendChild(c),s)return new Promise((l,_)=>{c.addEventListener("load",l),c.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>n())};const ue={name:"VanDocSearch",props:{lang:String,searchConfig:Object},watch:{lang(){this.initDocsearch()}},mounted(){this.initDocsearch()},methods:{initDocsearch(){this.searchConfig&&(N(()=>Promise.resolve({}),["assets/style.37bc7816.css"]),N(()=>import("./index.3665b69b.js"),[]).then(e=>{e.default({...this.searchConfig,container:"#docsearch"})}))}}},he={id:"docsearch"};function _e(e,n,t,a,s,o){return i(),r("div",he)}var me=h(ue,[["render",_e]]);const ge={name:"VanDocHeader",components:{SearchInput:me},props:{lang:String,config:Object,versions:Array,langConfigs:Array},data(){return{packageVersion:B,showVersionPop:!1}},computed:{langLink(){return`#${this.$route.path.replace(this.lang,this.anotherLang.lang)}`},langLabel(){return this.anotherLang.label},anotherLang(){const e=this.langConfigs.filter(n=>n.lang!==this.lang);return e.length?e[0]:{}},searchConfig(){return this.config.searchConfig}},methods:{toggleVersionPop(){const e=!this.showVersionPop,n=e?"add":"remove";document.body[`${n}EventListener`]("click",this.checkHideVersionPop),this.showVersionPop=e},checkHideVersionPop(e){this.$refs.version.contains(e.target)||(this.showVersionPop=!1)},onSwitchLang(e){this.$router.push(this.$route.path.replace(e.from,e.to))},onSwitchVersion(e){e.link&&(location.href=e.link)}}},fe={class:"van-doc-header"},ve={class:"van-doc-row"},pe={class:"van-doc-header__top"},ye={class:"van-doc-header__logo"},we=["src"],ke={class:"van-doc-header__title"},Se={key:0,class:"van-doc-header__subtitle"},$e={class:"van-doc-header__top-nav"},be=["href"],Ce=["src"],Le={key:1},Te={key:0,ref:"version",class:"van-doc-header__top-nav-item"},Ve={key:0,class:"van-doc-header__version-pop"},xe=["onClick"],He={key:1,class:"van-doc-header__top-nav-item"},Ne=["href"];function De(e,n,t,a,s,o){const c=u("search-input");return i(),r("div",fe,[d("div",ve,[d("div",pe,[d("a",ye,[d("img",{src:t.config.logo},null,8,we),d("span",ke,f(t.config.title),1),t.config.subtitle?(i(),r("span",Se,f(t.config.subtitle),1)):g("",!0)]),d("ul",$e,[(i(!0),r(y,null,$(t.config.links,(l,_)=>(i(),r("li",{key:_,class:"van-doc-header__top-nav-item"},[d("a",{class:"van-doc-header__link",target:"_blank",href:l.url},[l.logo?(i(),r("img",{key:0,src:l.logo},null,8,Ce)):l.text?(i(),r("span",Le,f(l.text),1)):g("",!0)],8,be)]))),128)),t.versions?(i(),r("li",Te,[d("span",{class:"van-doc-header__cube van-doc-header__version",onClick:n[0]||(n[0]=(...l)=>o.toggleVersionPop&&o.toggleVersionPop(...l))},[Y(f(s.packageVersion)+" ",1),v(W,{name:"van-doc-dropdown"},{default:b(()=>[s.showVersionPop?(i(),r("div",Ve,[(i(!0),r(y,null,$(t.versions,(l,_)=>(i(),r("div",{key:_,class:"van-doc-header__version-pop-item",onClick:k=>o.onSwitchVersion(l)},f(l.label),9,xe))),128))])):g("",!0)]),_:1})])],512)):g("",!0),o.langLabel&&o.langLink?(i(),r("li",He,[d("a",{class:"van-doc-header__cube",href:o.langLink},f(o.langLabel),9,Ne)])):g("",!0),o.searchConfig?(i(),C(c,{key:2,lang:t.lang,"search-config":o.searchConfig},null,8,["lang","search-config"])):g("",!0)])])])])}var Pe=h(ge,[["render",De]]);const Ae={name:"VanDocContent",computed:{currentPage(){const{path:e}=this.$route;return e?e.split("/").slice(-1)[0]:this.$route.name}},watch:{$route(e,n){n.path!==e.path&&setTimeout(()=>{this.copyAction()})}},mounted(){this.copyAction()},methods:{onClick({target:e}){["H2","H3","H4","H5"].includes(e.tagName)&&this.scrollToAnchor(e)},scrollToAnchor(e){e.id&&this.$router.push({name:this.$route.name,hash:"#"+e.id})},copyAction(){const e=document.querySelectorAll(".van-doc-card pre code");if(!(!e||!e.length))for(let n=0;n{if(a)return;const s=t.innerText;A(s),t.classList.add("code-copy-success"),a=setTimeout(()=>{t.classList.remove("code-copy-success"),a=null},1400)})}}}};function Ie(e,n,t,a,s,o){return i(),r("div",{class:p(["van-doc-content",`van-doc-content--${o.currentPage}`]),onClick:n[0]||(n[0]=(...c)=>o.onClick&&o.onClick(...c))},[w(e.$slots,"default")],2)}var Ee=h(Ae,[["render",Ie]]);const Oe={name:"VanDocContainer",props:{hasSimulator:Boolean}};function Be(e,n,t,a,s,o){return i(),r("div",{class:p(["van-doc-container van-doc-row",{"van-doc-container--with-simulator":t.hasSimulator}])},[w(e.$slots,"default")],2)}var je=h(Oe,[["render",Be]]);const Me={name:"VanDocSimulator",props:{src:String},data(){return{scrollTop:window.scrollY,windowHeight:window.innerHeight}},computed:{isFixed(){return this.scrollTop>60},simulatorStyle(){return{height:Math.min(640,this.windowHeight-90)+"px"}}},mounted(){window.addEventListener("scroll",()=>{this.scrollTop=window.scrollY}),window.addEventListener("resize",()=>{this.windowHeight=window.innerHeight})}},Fe=["src"];function Re(e,n,t,a,s,o){return i(),r("div",{class:p(["van-doc-simulator",{"van-doc-simulator-fixed":o.isFixed}])},[d("iframe",{ref:"iframe",src:t.src,style:I(o.simulatorStyle),frameborder:"0"},null,12,Fe)],2)}var qe=h(Me,[["render",Re]]);const ze={name:"VanDoc",components:{DocNav:ce,DocHeader:Pe,DocContent:Ee,DocContainer:je,DocSimulator:qe},props:{lang:String,versions:Array,simulator:String,hasSimulator:Boolean,langConfigs:Array,config:{type:Object,required:!0},base:{type:String,default:""}},emits:["switch-version"],watch:{$route(){this.setNav()}},created(){this.setNav(),this.keyboardHandler()},methods:{setNav(){const{nav:e}=this.config,n=e.reduce((s,o)=>s.concat(o.items),[]),t=this.$route.path.split("/").pop();let a;for(let s=0,o=n.length;s{switch(e.keyCode){case 37:this.keyboardNav("prev");break;case 39:this.keyboardNav("next");break}})}}},Ye={class:"van-doc"};function We(e,n,t,a,s,o){const c=u("doc-header"),l=u("doc-nav"),_=u("doc-content"),k=u("doc-container"),T=u("doc-simulator");return i(),r("div",Ye,[v(c,{lang:t.lang,config:t.config,versions:t.versions,"lang-configs":t.langConfigs,onSwitchVersion:n[0]||(n[0]=O=>e.$emit("switch-version",O))},null,8,["lang","config","versions","lang-configs"]),v(l,{lang:t.lang,"nav-config":t.config.nav},null,8,["lang","nav-config"]),v(k,{"has-simulator":t.hasSimulator},{default:b(()=>[v(_,null,{default:b(()=>[w(e.$slots,"default")]),_:3})]),_:3},8,["has-simulator"]),t.hasSimulator?(i(),C(T,{key:0,src:t.simulator},null,8,["src"])):g("",!0)])}var Ue=h(ze,[["render",We]]);const Ge={components:{VanDoc:Ue},data(){return{hasSimulator:!0}},computed:{simulator(){var n,t;return(n=m.site.simulator)!=null&&n.url?(t=m.site.simulator)==null?void 0:t.url:`${location.pathname.replace(/\/index(\.html)?/,"/")}mobile.html${location.hash}`},lang(){const{lang:e}=this.$route.meta;return e||""},langConfigs(){const{locales:e={}}=m.site;return Object.keys(e).map(n=>({lang:n,label:e[n].langLabel||""}))},config(){const{locales:e}=m.site;return e?e[this.lang]:m.site},versions(){return m.site.versions||null}},watch:{"$route.path"(){this.setTitleAndToogleSimulator()},lang(e){j(e),this.setTitleAndToogleSimulator()},config:{handler(e){e&&this.setTitleAndToogleSimulator()},immediate:!0}},mounted(){this.$route.hash&&this.$nextTick(()=>{const e=document.querySelector(this.$route.hash);e&&e.scrollIntoView()})},methods:{setTitleAndToogleSimulator(){let{title:e}=this.config;const t=this.config.nav.reduce((a,s)=>[...a,...s.items],[]).find(a=>a.path===this.$route.meta.name);t&&t.title?e=t.title+" - "+e:this.config.description&&(e+=` - ${this.config.description}`),document.title=e,this.hasSimulator=!(m.site.hideSimulator||this.config.hideSimulator||t&&t.hideSimulator)}}},Je={class:"app"};function Ke(e,n,t,a,s,o){const c=u("router-view"),l=u("van-doc");return i(),r("div",Je,[o.config?(i(),C(l,{key:0,lang:o.lang,config:o.config,versions:o.versions,simulator:o.simulator,"has-simulator":s.hasSimulator,"lang-configs":o.langConfigs},{default:b(()=>[v(c)]),_:1},8,["lang","config","versions","simulator","has-simulator","lang-configs"])):g("",!0)])}var Qe=h(Ge,[["render",Ke]]);const Xe={name:"DemoPlayground",props:{originCode:String,codeSnippet:String,transform:Boolean,compact:Boolean,inline:Boolean},data(){return{showSource:!1,copyStatus:"ready"}},methods:{unescape,toggleSource(){this.showSource=!this.showSource},copySourceCode(){A(unescape(this.originCode)),this.copyStatus="copied",setTimeout(()=>{this.copyStatus="ready"},2e3)}}},Ze=e=>(J("data-v-356bb874"),e=e(),K(),e),et={class:"demo-playground--code"},tt={class:"demo-playground--code--actions"},nt=Ze(()=>d("span",null,null,-1)),ot=["data-status"],st=["innerHTML"];function at(e,n,t,a,s,o){return i(),r("div",{class:p({"demo-playground":!t.inline,transform:t.transform})},[t.inline?w(e.$slots,"default",{key:0},void 0,!0):(i(),r(y,{key:1},[d("div",{class:p(["demo-playground--previewer",{compact:t.compact}])},[w(e.$slots,"default",{},void 0,!0)],2),d("div",et,[d("div",tt,[nt,d("button",{title:"Copy source code",class:"action-icon",role:"copy","data-status":s.copyStatus,onClick:n[0]||(n[0]=(...c)=>o.copySourceCode&&o.copySourceCode(...c))},null,8,ot),d("button",{title:"Toggle source code panel",class:"action-icon",role:"source",onClick:n[1]||(n[1]=(...c)=>o.toggleSource&&o.toggleSource(...c))})]),U(d("div",{innerHTML:o.unescape(t.codeSnippet),class:"demo-playground--code--content"},null,8,st),[[G,s.showSource]])])],64))],2)}var D=h(Xe,[["render",at],["__scopeId","data-v-356bb874"]]);M&&location.replace("mobile.html"+location.hash);const{locales:E,defaultLang:it}=m.site;F(it);function rt(e){if(e.indexOf("_")!==-1){const n=e.split("_"),t=n.shift();return{component:`${V(t)}`,lang:n.join("-")}}return{component:`${V(e)}`,lang:""}}function ct(e){const n=e.path.split("/")[1];return Object.keys(E).indexOf(n)!==-1?n:z()}function lt(){const e=[],n=Object.keys(S);E?e.push({name:"notFound",path:"/:path(.*)+",redirect:a=>({name:ct(a)})}):e.push({name:"notFound",path:"/:path(.*)+",redirect:{name:"home"}});function t(a,s){e.push({name:s||"home",path:`/${s||""}`,component:a,meta:{lang:s}})}return n.forEach(a=>{const{component:s,lang:o}=rt(a);s==="home"&&t(S[a],o),o?e.push({name:`${o}/${s}`,path:`/${o}/${s}`,component:S[a],meta:{lang:o,name:s}}):e.push({name:`${s}`,path:`/${s}`,component:S[a],meta:{name:s}})}),e}const L=Q({history:X(),routes:lt(),scrollBehavior(e){return e.hash?{el:e.hash}:{top:0}}});L.afterEach(()=>{Z(q)});var P;((P=m.site.simulator)==null?void 0:P.syncPathFromSimulator)!==!1&&R(L);window.vueRouter=L;window.app=ee(Qe).use(L).component(D.name,D);setTimeout(()=>{window.app.mount("#app")},0);
+import{_ as h,p as B,c as A,a as m,s as j,i as M,b as F,l as R,d as S,e as q,f as V,g as z}from"./iframe-router.96c44ab5.js";import{c as C,n as p,a as r,r as u,o as i,F as y,b as $,d,t as f,e as v,f as g,g as I,h as Y,w as b,T as W,i as w,j as U,v as G,p as J,k as K,l as Q,m as X,q as Z,s as ee}from"./vue-libs.5e980ef0.js";const te={name:"VanDocNavLink",props:{base:String,item:Object},computed:{itemName(){const e=(this.item.title||this.item.name).split(" ");return`${e[0]} ${e.slice(1).join(" ")}`},path(){return`${this.base}${this.item.path}`},active(){return this.$route.path===this.path?!0:this.item.path==="home"?this.$route.path===this.base:!1}},watch:{active(){this.scrollIntoView()}},mounted(){this.scrollIntoView()},methods:{scrollIntoView(){this.active&&this.$el&&this.$el.scrollIntoViewIfNeeded&&this.$el.scrollIntoViewIfNeeded()}}},ne=["href","innerHTML"],oe=["innerHTML"];function se(e,n,t,a,s,o){const c=u("router-link");return t.item.path?(i(),C(c,{key:0,class:p({active:o.active}),to:o.path,innerHTML:o.itemName},null,8,["class","to","innerHTML"])):t.item.link?(i(),r("a",{key:1,href:t.item.link,innerHTML:o.itemName},null,8,ne)):(i(),r("a",{key:2,innerHTML:o.itemName},null,8,oe))}var x=h(te,[["render",se]]);const ae={name:"VanDocNav",components:{[x.name]:x},props:{lang:String,navConfig:Array},data(){return{top:64,bottom:0}},computed:{style(){return{top:this.top+"px",bottom:this.bottom+"px"}},base(){return this.lang?`/${this.lang}/`:"/"}},created(){window.addEventListener("scroll",this.onScroll),this.onScroll()},methods:{onScroll(){const{pageYOffset:e}=window;this.top=Math.max(0,64-e)}}},ie={class:"van-doc-nav__title"};function re(e,n,t,a,s,o){const c=u("van-doc-nav-link");return i(),r("div",{class:"van-doc-nav",style:I(o.style)},[(i(!0),r(y,null,$(t.navConfig,(l,_)=>(i(),r("div",{class:"van-doc-nav__group",key:_},[d("div",ie,f(l.title),1),l.items?(i(!0),r(y,{key:0},$(l.items,(k,T)=>(i(),r("div",{key:T,class:"van-doc-nav__item"},[v(c,{item:k,base:o.base},null,8,["item","base"])]))),128)):g("",!0)]))),128))],4)}var ce=h(ae,[["render",re]]);const le="modulepreload",H={},de="/vant-weapp/",N=function(n,t){return!t||t.length===0?n():Promise.all(t.map(a=>{if(a=`${de}${a}`,a in H)return;H[a]=!0;const s=a.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${o}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":le,s||(c.as="script",c.crossOrigin=""),c.href=a,document.head.appendChild(c),s)return new Promise((l,_)=>{c.addEventListener("load",l),c.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>n())};const ue={name:"VanDocSearch",props:{lang:String,searchConfig:Object},watch:{lang(){this.initDocsearch()}},mounted(){this.initDocsearch()},methods:{initDocsearch(){this.searchConfig&&(N(()=>Promise.resolve({}),["assets/style.37bc7816.css"]),N(()=>import("./index.3665b69b.js"),[]).then(e=>{e.default({...this.searchConfig,container:"#docsearch"})}))}}},he={id:"docsearch"};function _e(e,n,t,a,s,o){return i(),r("div",he)}var me=h(ue,[["render",_e]]);const ge={name:"VanDocHeader",components:{SearchInput:me},props:{lang:String,config:Object,versions:Array,langConfigs:Array},data(){return{packageVersion:B,showVersionPop:!1}},computed:{langLink(){return`#${this.$route.path.replace(this.lang,this.anotherLang.lang)}`},langLabel(){return this.anotherLang.label},anotherLang(){const e=this.langConfigs.filter(n=>n.lang!==this.lang);return e.length?e[0]:{}},searchConfig(){return this.config.searchConfig}},methods:{toggleVersionPop(){const e=!this.showVersionPop,n=e?"add":"remove";document.body[`${n}EventListener`]("click",this.checkHideVersionPop),this.showVersionPop=e},checkHideVersionPop(e){this.$refs.version.contains(e.target)||(this.showVersionPop=!1)},onSwitchLang(e){this.$router.push(this.$route.path.replace(e.from,e.to))},onSwitchVersion(e){e.link&&(location.href=e.link)}}},fe={class:"van-doc-header"},ve={class:"van-doc-row"},pe={class:"van-doc-header__top"},ye={class:"van-doc-header__logo"},we=["src"],ke={class:"van-doc-header__title"},Se={key:0,class:"van-doc-header__subtitle"},$e={class:"van-doc-header__top-nav"},be=["href"],Ce=["src"],Le={key:1},Te={key:0,ref:"version",class:"van-doc-header__top-nav-item"},Ve={key:0,class:"van-doc-header__version-pop"},xe=["onClick"],He={key:1,class:"van-doc-header__top-nav-item"},Ne=["href"];function De(e,n,t,a,s,o){const c=u("search-input");return i(),r("div",fe,[d("div",ve,[d("div",pe,[d("a",ye,[d("img",{src:t.config.logo},null,8,we),d("span",ke,f(t.config.title),1),t.config.subtitle?(i(),r("span",Se,f(t.config.subtitle),1)):g("",!0)]),d("ul",$e,[(i(!0),r(y,null,$(t.config.links,(l,_)=>(i(),r("li",{key:_,class:"van-doc-header__top-nav-item"},[d("a",{class:"van-doc-header__link",target:"_blank",href:l.url},[l.logo?(i(),r("img",{key:0,src:l.logo},null,8,Ce)):l.text?(i(),r("span",Le,f(l.text),1)):g("",!0)],8,be)]))),128)),t.versions?(i(),r("li",Te,[d("span",{class:"van-doc-header__cube van-doc-header__version",onClick:n[0]||(n[0]=(...l)=>o.toggleVersionPop&&o.toggleVersionPop(...l))},[Y(f(s.packageVersion)+" ",1),v(W,{name:"van-doc-dropdown"},{default:b(()=>[s.showVersionPop?(i(),r("div",Ve,[(i(!0),r(y,null,$(t.versions,(l,_)=>(i(),r("div",{key:_,class:"van-doc-header__version-pop-item",onClick:k=>o.onSwitchVersion(l)},f(l.label),9,xe))),128))])):g("",!0)]),_:1})])],512)):g("",!0),o.langLabel&&o.langLink?(i(),r("li",He,[d("a",{class:"van-doc-header__cube",href:o.langLink},f(o.langLabel),9,Ne)])):g("",!0),o.searchConfig?(i(),C(c,{key:2,lang:t.lang,"search-config":o.searchConfig},null,8,["lang","search-config"])):g("",!0)])])])])}var Pe=h(ge,[["render",De]]);const Ae={name:"VanDocContent",computed:{currentPage(){const{path:e}=this.$route;return e?e.split("/").slice(-1)[0]:this.$route.name}},watch:{$route(e,n){n.path!==e.path&&setTimeout(()=>{this.copyAction()})}},mounted(){this.copyAction()},methods:{onClick({target:e}){["H2","H3","H4","H5"].includes(e.tagName)&&this.scrollToAnchor(e)},scrollToAnchor(e){e.id&&this.$router.push({name:this.$route.name,hash:"#"+e.id})},copyAction(){const e=document.querySelectorAll(".van-doc-card pre code");if(!(!e||!e.length))for(let n=0;n{if(a)return;const s=t.innerText;A(s),t.classList.add("code-copy-success"),a=setTimeout(()=>{t.classList.remove("code-copy-success"),a=null},1400)})}}}};function Ie(e,n,t,a,s,o){return i(),r("div",{class:p(["van-doc-content",`van-doc-content--${o.currentPage}`]),onClick:n[0]||(n[0]=(...c)=>o.onClick&&o.onClick(...c))},[w(e.$slots,"default")],2)}var Ee=h(Ae,[["render",Ie]]);const Oe={name:"VanDocContainer",props:{hasSimulator:Boolean}};function Be(e,n,t,a,s,o){return i(),r("div",{class:p(["van-doc-container van-doc-row",{"van-doc-container--with-simulator":t.hasSimulator}])},[w(e.$slots,"default")],2)}var je=h(Oe,[["render",Be]]);const Me={name:"VanDocSimulator",props:{src:String},data(){return{scrollTop:window.scrollY,windowHeight:window.innerHeight}},computed:{isFixed(){return this.scrollTop>60},simulatorStyle(){return{height:Math.min(640,this.windowHeight-90)+"px"}}},mounted(){window.addEventListener("scroll",()=>{this.scrollTop=window.scrollY}),window.addEventListener("resize",()=>{this.windowHeight=window.innerHeight})}},Fe=["src"];function Re(e,n,t,a,s,o){return i(),r("div",{class:p(["van-doc-simulator",{"van-doc-simulator-fixed":o.isFixed}])},[d("iframe",{ref:"iframe",src:t.src,style:I(o.simulatorStyle),frameborder:"0"},null,12,Fe)],2)}var qe=h(Me,[["render",Re]]);const ze={name:"VanDoc",components:{DocNav:ce,DocHeader:Pe,DocContent:Ee,DocContainer:je,DocSimulator:qe},props:{lang:String,versions:Array,simulator:String,hasSimulator:Boolean,langConfigs:Array,config:{type:Object,required:!0},base:{type:String,default:""}},emits:["switch-version"],watch:{$route(){this.setNav()}},created(){this.setNav(),this.keyboardHandler()},methods:{setNav(){const{nav:e}=this.config,n=e.reduce((s,o)=>s.concat(o.items),[]),t=this.$route.path.split("/").pop();let a;for(let s=0,o=n.length;s{switch(e.keyCode){case 37:this.keyboardNav("prev");break;case 39:this.keyboardNav("next");break}})}}},Ye={class:"van-doc"};function We(e,n,t,a,s,o){const c=u("doc-header"),l=u("doc-nav"),_=u("doc-content"),k=u("doc-container"),T=u("doc-simulator");return i(),r("div",Ye,[v(c,{lang:t.lang,config:t.config,versions:t.versions,"lang-configs":t.langConfigs,onSwitchVersion:n[0]||(n[0]=O=>e.$emit("switch-version",O))},null,8,["lang","config","versions","lang-configs"]),v(l,{lang:t.lang,"nav-config":t.config.nav},null,8,["lang","nav-config"]),v(k,{"has-simulator":t.hasSimulator},{default:b(()=>[v(_,null,{default:b(()=>[w(e.$slots,"default")]),_:3})]),_:3},8,["has-simulator"]),t.hasSimulator?(i(),C(T,{key:0,src:t.simulator},null,8,["src"])):g("",!0)])}var Ue=h(ze,[["render",We]]);const Ge={components:{VanDoc:Ue},data(){return{hasSimulator:!0}},computed:{simulator(){var n,t;return(n=m.site.simulator)!=null&&n.url?(t=m.site.simulator)==null?void 0:t.url:`${location.pathname.replace(/\/index(\.html)?/,"/")}mobile.html${location.hash}`},lang(){const{lang:e}=this.$route.meta;return e||""},langConfigs(){const{locales:e={}}=m.site;return Object.keys(e).map(n=>({lang:n,label:e[n].langLabel||""}))},config(){const{locales:e}=m.site;return e?e[this.lang]:m.site},versions(){return m.site.versions||null}},watch:{"$route.path"(){this.setTitleAndToogleSimulator()},lang(e){j(e),this.setTitleAndToogleSimulator()},config:{handler(e){e&&this.setTitleAndToogleSimulator()},immediate:!0}},mounted(){this.$route.hash&&this.$nextTick(()=>{const e=document.querySelector(this.$route.hash);e&&e.scrollIntoView()})},methods:{setTitleAndToogleSimulator(){let{title:e}=this.config;const t=this.config.nav.reduce((a,s)=>[...a,...s.items],[]).find(a=>a.path===this.$route.meta.name);t&&t.title?e=t.title+" - "+e:this.config.description&&(e+=` - ${this.config.description}`),document.title=e,this.hasSimulator=!(m.site.hideSimulator||this.config.hideSimulator||t&&t.hideSimulator)}}},Je={class:"app"};function Ke(e,n,t,a,s,o){const c=u("router-view"),l=u("van-doc");return i(),r("div",Je,[o.config?(i(),C(l,{key:0,lang:o.lang,config:o.config,versions:o.versions,simulator:o.simulator,"has-simulator":s.hasSimulator,"lang-configs":o.langConfigs},{default:b(()=>[v(c)]),_:1},8,["lang","config","versions","simulator","has-simulator","lang-configs"])):g("",!0)])}var Qe=h(Ge,[["render",Ke]]);const Xe={name:"DemoPlayground",props:{originCode:String,codeSnippet:String,transform:Boolean,compact:Boolean,inline:Boolean},data(){return{showSource:!1,copyStatus:"ready"}},methods:{unescape,toggleSource(){this.showSource=!this.showSource},copySourceCode(){A(unescape(this.originCode)),this.copyStatus="copied",setTimeout(()=>{this.copyStatus="ready"},2e3)}}},Ze=e=>(J("data-v-356bb874"),e=e(),K(),e),et={class:"demo-playground--code"},tt={class:"demo-playground--code--actions"},nt=Ze(()=>d("span",null,null,-1)),ot=["data-status"],st=["innerHTML"];function at(e,n,t,a,s,o){return i(),r("div",{class:p({"demo-playground":!t.inline,transform:t.transform})},[t.inline?w(e.$slots,"default",{key:0},void 0,!0):(i(),r(y,{key:1},[d("div",{class:p(["demo-playground--previewer",{compact:t.compact}])},[w(e.$slots,"default",{},void 0,!0)],2),d("div",et,[d("div",tt,[nt,d("button",{title:"Copy source code",class:"action-icon",role:"copy","data-status":s.copyStatus,onClick:n[0]||(n[0]=(...c)=>o.copySourceCode&&o.copySourceCode(...c))},null,8,ot),d("button",{title:"Toggle source code panel",class:"action-icon",role:"source",onClick:n[1]||(n[1]=(...c)=>o.toggleSource&&o.toggleSource(...c))})]),U(d("div",{innerHTML:o.unescape(t.codeSnippet),class:"demo-playground--code--content"},null,8,st),[[G,s.showSource]])])],64))],2)}var D=h(Xe,[["render",at],["__scopeId","data-v-356bb874"]]);M&&location.replace("mobile.html"+location.hash);const{locales:E,defaultLang:it}=m.site;F(it);function rt(e){if(e.indexOf("_")!==-1){const n=e.split("_"),t=n.shift();return{component:`${V(t)}`,lang:n.join("-")}}return{component:`${V(e)}`,lang:""}}function ct(e){const n=e.path.split("/")[1];return Object.keys(E).indexOf(n)!==-1?n:z()}function lt(){const e=[],n=Object.keys(S);E?e.push({name:"notFound",path:"/:path(.*)+",redirect:a=>({name:ct(a)})}):e.push({name:"notFound",path:"/:path(.*)+",redirect:{name:"home"}});function t(a,s){e.push({name:s||"home",path:`/${s||""}`,component:a,meta:{lang:s}})}return n.forEach(a=>{const{component:s,lang:o}=rt(a);s==="home"&&t(S[a],o),o?e.push({name:`${o}/${s}`,path:`/${o}/${s}`,component:S[a],meta:{lang:o,name:s}}):e.push({name:`${s}`,path:`/${s}`,component:S[a],meta:{name:s}})}),e}const L=Q({history:X(),routes:lt(),scrollBehavior(e){return e.hash?{el:e.hash}:{top:0}}});L.afterEach(()=>{Z(q)});var P;((P=m.site.simulator)==null?void 0:P.syncPathFromSimulator)!==!1&&R(L);window.vueRouter=L;window.app=ee(Qe).use(L).component(D.name,D);setTimeout(()=>{window.app.mount("#app")},0);
diff --git a/assets/mobile.bcbbc1cd.js b/assets/mobile.2a9ead0c.js
similarity index 99%
rename from assets/mobile.bcbbc1cd.js
rename to assets/mobile.2a9ead0c.js
index 893072e2..f8010a32 100644
--- a/assets/mobile.bcbbc1cd.js
+++ b/assets/mobile.2a9ead0c.js
@@ -1 +1 @@
-import{_ as g,f as C,b as H,l as M,g as j,h as P}from"./iframe-router.194ba64b.js";import{a as l,t as w,f as O,i as D,o as c,n as A,d as h,r as y,F as N,b as F,c as T,w as L,h as V,e as b,l as X,m as Y,x as W,q,j as U,v as G,y as J,K as Q,s as Z}from"./vue-libs.5e980ef0.js";const I={name:"DemoBlock",props:{card:Boolean,title:String}},ee={class:"van-doc-demo-block"},te={key:0,class:"van-doc-demo-block__title"},ne={key:1,class:"van-doc-demo-block__card"};function oe(e,r,o,s,i,n){return c(),l("div",ee,[o.title?(c(),l("h2",te,w(o.title),1)):O("",!0),o.card?(c(),l("div",ne,[D(e.$slots,"default")])):D(e.$slots,"default",{key:2})])}var S=g(I,[["render",oe]]);const se={name:"DemoSection",computed:{demoName(){const{meta:e}=this.$route||{};return e&&e.name?`demo-${C(e.name)}`:""}}};function ae(e,r,o,s,i,n){return c(),l("section",{class:A(["van-doc-demo-section",n.demoName])},[D(e.$slots,"default")],2)}var K=g(se,[["render",ae]]);const x={},B={name:"vant-weapp",build:{srcDir:"packages",site:{publicPath:"/vant-weapp/"}},site:{versions:[{label:"0.x",link:"/vant-weapp/0.x"}],title:"Vant Weapp",description:"\u8F7B\u91CF\u3001\u53EF\u9760\u7684\u5C0F\u7A0B\u5E8F UI \u7EC4\u4EF6\u5E93",logo:"https://img.yzcdn.cn/vant/logo.png",simulator:{url:"https://vant-contrib.gitee.io/vant/v2/mobile.html?weapp=1",syncPathFromSimulator:!1},links:[{logo:"https://img.yzcdn.cn/vant/vant-o.svg",url:"https://vant-contrib.gitee.io/vant/"},{logo:"https://b.yzcdn.cn/vant/logo/github.svg",url:"https://github.com/youzan/vant-weapp"}],baiduAnalytics:{seed:"af5d41bc4e446e76665dbe3ec18d55c3"},nav:[]}},ce={},re={viewBox:"0 0 1024 1024"},ie=h("path",{fill:"#B6C3D2",d:"M601.1 556.5L333.8 289.3c-24.5-24.5-24.5-64.6 0-89.1s64.6-24.5 89.1 0l267.3 267.3c24.5 24.5 24.5 64.6 0 89.1-24.5 24.4-64.6 24.4-89.1-.1z"},null,-1),ue=h("path",{fill:"#B6C3D2",d:"M690.2 556.5L422.9 823.8c-24.5 24.5-64.6 24.5-89.1 0s-24.5-64.6 0-89.1l267.3-267.3c24.5-24.5 64.6-24.5 89.1 0 24.5 24.6 24.5 64.6 0 89.1z"},null,-1),le=[ie,ue];function me(e,r){return c(),l("svg",re,le)}var de=g(ce,[["render",me]]);const _e={components:{ArrowRight:de},props:{lang:String,group:Object},data(){return{active:[]}},computed:{base(){return this.lang?`/${this.lang}`:""}}},he={class:"demo-home-nav"},pe={class:"demo-home-nav__title"},fe={class:"demo-home-nav__group"};function ve(e,r,o,s,i,n){const d=y("arrow-right"),p=y("router-link");return c(),l("div",he,[h("div",pe,w(o.group.title),1),h("div",fe,[(c(!0),l(N,null,F(o.group.items,m=>(c(),T(p,{class:"demo-home-nav__block",key:m.path,to:`${n.base}/${m.path}`},{default:L(()=>[V(w(m.title)+" ",1),b(d,{class:"demo-home-nav__icon"})]),_:2},1032,["to"]))),128))])])}var ge=g(_e,[["render",ve]]);const ye={components:{DemoHomeNav:ge},computed:{lang(){const{lang:e}=this.$route.meta;return e},config(){const{locales:e}=B.site;return e?e[this.lang]:B.site},smallTitle(){return this.config.title.length>=8}}},we={class:"demo-home"},$e=["src"],ke={key:0,class:"demo-home__desc"};function be(e,r,o,s,i,n){const d=y("demo-home-nav");return c(),l("div",we,[h("h1",{class:A(["demo-home__title",{"demo-home__title--small":n.smallTitle}])},[h("img",{src:n.config.logo},null,8,$e),h("span",null,w(n.config.title),1)],2),n.config.description?(c(),l("h2",ke,w(n.config.description),1)):O("",!0),(c(!0),l(N,null,F(n.config.nav,(p,m)=>(c(),T(d,{key:m,lang:n.lang,group:p},null,8,["lang","group"]))),128))])}var z=g(ye,[["render",be]]);const{locales:E,defaultLang:Te}=B.site;H(Te);function xe(e){const r=e.path.split("/")[1];return Object.keys(E).indexOf(r)!==-1?r:j()}function De(){const e=[],r=Object.keys(x),o=E?Object.keys(E):[];return o.length?(e.push({name:"NotFound",path:"/:path(.*)+",redirect:s=>({name:xe(s)})}),o.forEach(s=>{e.push({name:s,path:`/${s}`,component:z,meta:{lang:s}})})):(e.push({name:"NotFound",path:"/:path(.*)+",redirect:{name:"home"}}),e.push({name:"home",path:"/",component:z})),r.forEach(s=>{const i=C(s);o.length?o.forEach(n=>{e.push({name:`${n}/${i}`,path:`/${n}/${i}`,component:x[s],meta:{name:s,lang:n}})}):e.push({name:i,path:`/${i}`,component:x[s],meta:{name:s}})}),e}const $=X({history:Y(),routes:De(),scrollBehavior:(e,r,o)=>o||{x:0,y:0}});W($.currentRoute,()=>{$.currentRoute.value.redirectedFrom||q(P)});M($);window.vueRouter=$;const Le={data(){return{path:"M296.114 508.035c-3.22-13.597.473-28.499 11.079-39.105l333.912-333.912c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L395.504 498.47l304.574 304.574c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L307.241 528.058a41.472 41.472 0 0 1-11.127-20.023z"}},computed:{title(){const{name:e}=this.$route.meta||{};return e?e.replace(/-/g,""):""}},methods:{onBack(){history.length>1?history.back():this.$router.replace("/")}}},Be={class:"demo-nav"},Ee={class:"demo-nav__title"},Ne=["d"];function Se(e,r,o,s,i,n){return U((c(),l("div",Be,[h("div",Ee,w(n.title),1),(c(),l("svg",{class:"demo-nav__back",viewBox:"0 0 1000 1000",onClick:r[0]||(r[0]=(...d)=>n.onBack&&n.onBack(...d))},[h("path",{fill:"#969799","fill-rule":"evenodd",d:i.path},null,8,Ne)]))],512)),[[G,n.title]])}var Ke=g(Le,[["render",Se]]);const ze={components:{DemoNav:Ke}};function Ce(e,r,o,s,i,n){const d=y("demo-nav"),p=y("demo-section"),m=y("router-view");return c(),l(N,null,[b(d),b(m,null,{default:L(({Component:k})=>[(c(),T(Q,null,[b(p,null,{default:L(()=>[(c(),T(J(k)))]),_:2},1024)],1024))]),_:1})],64)}var Oe=g(ze,[["render",Ce]]);(function(){if(typeof window=="undefined")return;var e,r="ontouchstart"in window;document.createTouch||(document.createTouch=function(a,t,u,_,f,v,R){return new o(t,u,{pageX:_,pageY:f,screenX:v,screenY:R,clientX:_-window.pageXOffset,clientY:f-window.pageYOffset},0,0)}),document.createTouchList||(document.createTouchList=function(){for(var a=s(),t=0;t{window.app.mount("#app")},0);
+import{_ as g,f as C,b as H,l as M,g as j,h as P}from"./iframe-router.96c44ab5.js";import{a as l,t as w,f as O,i as D,o as c,n as A,d as h,r as y,F as N,b as F,c as T,w as L,h as V,e as b,l as X,m as Y,x as W,q,j as U,v as G,y as J,K as Q,s as Z}from"./vue-libs.5e980ef0.js";const I={name:"DemoBlock",props:{card:Boolean,title:String}},ee={class:"van-doc-demo-block"},te={key:0,class:"van-doc-demo-block__title"},ne={key:1,class:"van-doc-demo-block__card"};function oe(e,r,o,s,i,n){return c(),l("div",ee,[o.title?(c(),l("h2",te,w(o.title),1)):O("",!0),o.card?(c(),l("div",ne,[D(e.$slots,"default")])):D(e.$slots,"default",{key:2})])}var S=g(I,[["render",oe]]);const se={name:"DemoSection",computed:{demoName(){const{meta:e}=this.$route||{};return e&&e.name?`demo-${C(e.name)}`:""}}};function ae(e,r,o,s,i,n){return c(),l("section",{class:A(["van-doc-demo-section",n.demoName])},[D(e.$slots,"default")],2)}var K=g(se,[["render",ae]]);const x={},B={name:"vant-weapp",build:{srcDir:"packages",site:{publicPath:"/vant-weapp/"}},site:{versions:[{label:"0.x",link:"/vant-weapp/0.x"}],title:"Vant Weapp",description:"\u8F7B\u91CF\u3001\u53EF\u9760\u7684\u5C0F\u7A0B\u5E8F UI \u7EC4\u4EF6\u5E93",logo:"https://img.yzcdn.cn/vant/logo.png",simulator:{url:"https://vant-contrib.gitee.io/vant/v2/mobile.html?weapp=1",syncPathFromSimulator:!1},links:[{logo:"https://img.yzcdn.cn/vant/vant-o.svg",url:"https://vant-contrib.gitee.io/vant/"},{logo:"https://b.yzcdn.cn/vant/logo/github.svg",url:"https://github.com/youzan/vant-weapp"}],baiduAnalytics:{seed:"af5d41bc4e446e76665dbe3ec18d55c3"},nav:[]}},ce={},re={viewBox:"0 0 1024 1024"},ie=h("path",{fill:"#B6C3D2",d:"M601.1 556.5L333.8 289.3c-24.5-24.5-24.5-64.6 0-89.1s64.6-24.5 89.1 0l267.3 267.3c24.5 24.5 24.5 64.6 0 89.1-24.5 24.4-64.6 24.4-89.1-.1z"},null,-1),ue=h("path",{fill:"#B6C3D2",d:"M690.2 556.5L422.9 823.8c-24.5 24.5-64.6 24.5-89.1 0s-24.5-64.6 0-89.1l267.3-267.3c24.5-24.5 64.6-24.5 89.1 0 24.5 24.6 24.5 64.6 0 89.1z"},null,-1),le=[ie,ue];function me(e,r){return c(),l("svg",re,le)}var de=g(ce,[["render",me]]);const _e={components:{ArrowRight:de},props:{lang:String,group:Object},data(){return{active:[]}},computed:{base(){return this.lang?`/${this.lang}`:""}}},he={class:"demo-home-nav"},pe={class:"demo-home-nav__title"},fe={class:"demo-home-nav__group"};function ve(e,r,o,s,i,n){const d=y("arrow-right"),p=y("router-link");return c(),l("div",he,[h("div",pe,w(o.group.title),1),h("div",fe,[(c(!0),l(N,null,F(o.group.items,m=>(c(),T(p,{class:"demo-home-nav__block",key:m.path,to:`${n.base}/${m.path}`},{default:L(()=>[V(w(m.title)+" ",1),b(d,{class:"demo-home-nav__icon"})]),_:2},1032,["to"]))),128))])])}var ge=g(_e,[["render",ve]]);const ye={components:{DemoHomeNav:ge},computed:{lang(){const{lang:e}=this.$route.meta;return e},config(){const{locales:e}=B.site;return e?e[this.lang]:B.site},smallTitle(){return this.config.title.length>=8}}},we={class:"demo-home"},$e=["src"],ke={key:0,class:"demo-home__desc"};function be(e,r,o,s,i,n){const d=y("demo-home-nav");return c(),l("div",we,[h("h1",{class:A(["demo-home__title",{"demo-home__title--small":n.smallTitle}])},[h("img",{src:n.config.logo},null,8,$e),h("span",null,w(n.config.title),1)],2),n.config.description?(c(),l("h2",ke,w(n.config.description),1)):O("",!0),(c(!0),l(N,null,F(n.config.nav,(p,m)=>(c(),T(d,{key:m,lang:n.lang,group:p},null,8,["lang","group"]))),128))])}var z=g(ye,[["render",be]]);const{locales:E,defaultLang:Te}=B.site;H(Te);function xe(e){const r=e.path.split("/")[1];return Object.keys(E).indexOf(r)!==-1?r:j()}function De(){const e=[],r=Object.keys(x),o=E?Object.keys(E):[];return o.length?(e.push({name:"NotFound",path:"/:path(.*)+",redirect:s=>({name:xe(s)})}),o.forEach(s=>{e.push({name:s,path:`/${s}`,component:z,meta:{lang:s}})})):(e.push({name:"NotFound",path:"/:path(.*)+",redirect:{name:"home"}}),e.push({name:"home",path:"/",component:z})),r.forEach(s=>{const i=C(s);o.length?o.forEach(n=>{e.push({name:`${n}/${i}`,path:`/${n}/${i}`,component:x[s],meta:{name:s,lang:n}})}):e.push({name:i,path:`/${i}`,component:x[s],meta:{name:s}})}),e}const $=X({history:Y(),routes:De(),scrollBehavior:(e,r,o)=>o||{x:0,y:0}});W($.currentRoute,()=>{$.currentRoute.value.redirectedFrom||q(P)});M($);window.vueRouter=$;const Le={data(){return{path:"M296.114 508.035c-3.22-13.597.473-28.499 11.079-39.105l333.912-333.912c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L395.504 498.47l304.574 304.574c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L307.241 528.058a41.472 41.472 0 0 1-11.127-20.023z"}},computed:{title(){const{name:e}=this.$route.meta||{};return e?e.replace(/-/g,""):""}},methods:{onBack(){history.length>1?history.back():this.$router.replace("/")}}},Be={class:"demo-nav"},Ee={class:"demo-nav__title"},Ne=["d"];function Se(e,r,o,s,i,n){return U((c(),l("div",Be,[h("div",Ee,w(n.title),1),(c(),l("svg",{class:"demo-nav__back",viewBox:"0 0 1000 1000",onClick:r[0]||(r[0]=(...d)=>n.onBack&&n.onBack(...d))},[h("path",{fill:"#969799","fill-rule":"evenodd",d:i.path},null,8,Ne)]))],512)),[[G,n.title]])}var Ke=g(Le,[["render",Se]]);const ze={components:{DemoNav:Ke}};function Ce(e,r,o,s,i,n){const d=y("demo-nav"),p=y("demo-section"),m=y("router-view");return c(),l(N,null,[b(d),b(m,null,{default:L(({Component:k})=>[(c(),T(Q,null,[b(p,null,{default:L(()=>[(c(),T(J(k)))]),_:2},1024)],1024))]),_:1})],64)}var Oe=g(ze,[["render",Ce]]);(function(){if(typeof window=="undefined")return;var e,r="ontouchstart"in window;document.createTouch||(document.createTouch=function(a,t,u,_,f,v,R){return new o(t,u,{pageX:_,pageY:f,screenX:v,screenY:R,clientX:_-window.pageXOffset,clientY:f-window.pageYOffset},0,0)}),document.createTouchList||(document.createTouchList=function(){for(var a=s(),t=0;t{window.app.mount("#app")},0);
diff --git a/index.html b/index.html
index 6b837ca1..7de3159e 100644
--- a/index.html
+++ b/index.html
@@ -26,9 +26,9 @@
       })();
     
     
-    
+    
     
-    
+    
     
   
   
diff --git a/mobile.html b/mobile.html
index 93ffeccb..2782183e 100644
--- a/mobile.html
+++ b/mobile.html
@@ -30,9 +30,9 @@
       }
     
     
-    
+    
     
-    
+