Tips: \u6CE8\u610F\uFF0C\u5728\u81EA\u5B9A\u4E49calendar\u7684\u9AD8\u5EA6\u65F6\uFF0C\u9700\u8981\u786E\u4FDD\uFF0C\u6EDA\u52A8\u5230\u5F53\u524D\u6708\u4EFD\u65F6\uFF0C\u6240\u6709\u7684\u65E5\u671F\u8981\u5C55\u73B0\u5728.van-calendar__body\u5185\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6EDA\u52A8\u65F6\u5934\u90E8\u6708\u4EFD\u4E0E\u5F53\u524D\u6708\u4EFD\u4E0D\u540C\u6B65\u7684\u60C5\u51B5\u3002\u76EE\u524D\u5E73\u94FA\u578B\u9884\u8BBE\u9AD8\u5EA6618px,\u5F39\u7A97\u578B\u9AD8\u5EA690%\u3002
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C |
---|---|---|---|
type | \u9009\u62E9\u7C7B\u578B:single \u8868\u793A\u9009\u62E9\u5355\u4E2A\u65E5\u671F\uFF0Cmultiple \u8868\u793A\u9009\u62E9\u591A\u4E2A\u65E5\u671F\uFF0Crange \u8868\u793A\u9009\u62E9\u65E5\u671F\u533A\u95F4 | string | single |
title | \u65E5\u5386\u6807\u9898 | string | \u65E5\u671F\u9009\u62E9 |
color | \u4E3B\u9898\u8272\uFF0C\u5BF9\u5E95\u90E8\u6309\u94AE\u548C\u9009\u4E2D\u65E5\u671F\u751F\u6548 | string | #ee0a24 |
min-date | \u53EF\u9009\u62E9\u7684\u6700\u5C0F\u65E5\u671F | timestamp | \u5F53\u524D\u65E5\u671F |
max-date | \u53EF\u9009\u62E9\u7684\u6700\u5927\u65E5\u671F | timestamp | \u5F53\u524D\u65E5\u671F\u7684\u516D\u4E2A\u6708\u540E |
default-date | \u9ED8\u8BA4\u9009\u4E2D\u7684\u65E5\u671F\uFF0Ctype \u4E3Amultiple \u6216range \u65F6\u4E3A\u6570\u7EC4 | timestamp | timestamp[] | \u4ECA\u5929 |
row-height | \u65E5\u671F\u884C\u9AD8 | number | string | 64 |
formatter | \u65E5\u671F\u683C\u5F0F\u5316\u51FD\u6570 | (day: Day) => Day | - |
poppable | \u662F\u5426\u4EE5\u5F39\u5C42\u7684\u5F62\u5F0F\u5C55\u793A\u65E5\u5386 | boolean | true |
show-mark | \u662F\u5426\u663E\u793A\u6708\u4EFD\u80CC\u666F\u6C34\u5370 | boolean | true |
show-title | \u662F\u5426\u5C55\u793A\u65E5\u5386\u6807\u9898 | boolean | true |
show-subtitle | \u662F\u5426\u5C55\u793A\u65E5\u5386\u526F\u6807\u9898\uFF08\u5E74\u6708\uFF09 | boolean | true |
show-confirm | \u662F\u5426\u5C55\u793A\u786E\u8BA4\u6309\u94AE | boolean | true |
confirm-text | \u786E\u8BA4\u6309\u94AE\u7684\u6587\u5B57 | string | \u786E\u5B9A |
confirm-disabled-text | \u786E\u8BA4\u6309\u94AE\u5904\u4E8E\u7981\u7528\u72B6\u6001\u65F6\u7684\u6587\u5B57 | string | \u786E\u5B9A |
first-day-of-week | \u8BBE\u7F6E\u5468\u8D77\u59CB\u65E5 | 0~6 | 0 |
readonly v1.9.1 | \u662F\u5426\u4E3A\u53EA\u8BFB\u72B6\u6001\uFF0C\u53EA\u8BFB\u72B6\u6001\u4E0B\u4E0D\u80FD\u9009\u62E9\u65E5\u671F | boolean | false |
\u5F53 Calendar \u7684 poppable
\u4E3A true
\u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C |
---|---|---|---|
show | \u662F\u5426\u663E\u793A\u65E5\u5386\u5F39\u7A97 | boolean | false |
position | \u5F39\u51FA\u4F4D\u7F6E\uFF0C\u53EF\u9009\u503C\u4E3A top right left | string | bottom |
round | \u662F\u5426\u663E\u793A\u5706\u89D2\u5F39\u7A97 | boolean | true |
close-on-click-overlay | \u662F\u5426\u5728\u70B9\u51FB\u906E\u7F69\u5C42\u540E\u5173\u95ED | boolean | true |
safe-area-inset-bottom | \u662F\u5426\u5F00\u542F\u5E95\u90E8\u5B89\u5168\u533A\u9002\u914D | boolean | true |
\u5F53 Calendar \u7684 type
\u4E3A range
\u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C |
---|---|---|---|
max-range | \u65E5\u671F\u533A\u95F4\u6700\u591A\u53EF\u9009\u5929\u6570\uFF0C\u9ED8\u8BA4\u65E0\u9650\u5236 | number | string | - |
range-prompt | \u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u7684\u63D0\u793A\u6587\u6848 | string | null | \u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 xx \u5929 |
show-range-prompt | \u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\uFF0C\u662F\u5426\u5C55\u793A\u63D0\u793A\u6587\u6848 | boolean | true |
allow-same-day | \u662F\u5426\u5141\u8BB8\u65E5\u671F\u8303\u56F4\u7684\u8D77\u6B62\u65F6\u95F4\u4E3A\u540C\u4E00\u5929 | boolean | false |
\u5F53 Calendar \u7684 type
\u4E3A multiple
\u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C |
---|---|---|---|
min-range | \u65E5\u671F\u6700\u5C11\u53EF\u9009\u5929\u6570 | number | string | 1 |
\u65E5\u5386\u4E2D\u7684\u6BCF\u4E2A\u65E5\u671F\u90FD\u5BF9\u5E94\u4E00\u4E2A Day \u5BF9\u8C61\uFF0C\u901A\u8FC7formatter
\u5C5E\u6027\u53EF\u4EE5\u81EA\u5B9A\u4E49 Day \u5BF9\u8C61\u7684\u5185\u5BB9\u3002
\u952E\u540D | \u8BF4\u660E | \u7C7B\u578B |
---|---|---|
date | \u65E5\u671F\u5BF9\u5E94\u7684 Date \u5BF9\u8C61 | Date |
type | \u65E5\u671F\u7C7B\u578B\uFF0C\u53EF\u9009\u503C\u4E3Aselected \u3001start \u3001middle \u3001end \u3001disabled | string |
text | \u4E2D\u95F4\u663E\u793A\u7684\u6587\u5B57 | string |
topInfo | \u4E0A\u65B9\u7684\u63D0\u793A\u4FE1\u606F | string |
bottomInfo | \u4E0B\u65B9\u7684\u63D0\u793A\u4FE1\u606F | string |
className | \u81EA\u5B9A\u4E49 className | string |
\u4E8B\u4EF6\u540D | \u8BF4\u660E | \u56DE\u8C03\u53C2\u6570 |
---|---|---|
bind:select | \u70B9\u51FB\u4EFB\u610F\u65E5\u671F\u65F6\u89E6\u53D1 | value: Date | Date[] |
bind:unselect | \u5F53 Calendar \u7684 type \u4E3A multiple \u65F6,\u70B9\u51FB\u5DF2\u9009\u4E2D\u7684\u65E5\u671F\u65F6\u89E6\u53D1 | value: Date |
bind:confirm | \u65E5\u671F\u9009\u62E9\u5B8C\u6210\u540E\u89E6\u53D1\uFF0C\u82E5show-confirm \u4E3Atrue \uFF0C\u5219\u70B9\u51FB\u786E\u8BA4\u6309\u94AE\u540E\u89E6\u53D1 | value: Date | Date[] |
bind:open | \u6253\u5F00\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1 | - |
bind:close | \u5173\u95ED\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1 | - |
bind:opened | \u6253\u5F00\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1 | - |
bind:closed | \u5173\u95ED\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1 | - |
bind:over-range | \u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u89E6\u53D1 | - |
bind:click-subtitle v1.8.1 | \u70B9\u51FB\u65E5\u5386\u526F\u6807\u9898\u65F6\u89E6\u53D1 | WechatMiniprogram.TouchEvent |
\u540D\u79F0 | \u8BF4\u660E |
---|---|
title | \u81EA\u5B9A\u4E49\u6807\u9898 |
footer | \u81EA\u5B9A\u4E49\u5E95\u90E8\u533A\u57DF\u5185\u5BB9 |
\u901A\u8FC7 selectComponent \u53EF\u4EE5\u83B7\u53D6\u5230 Calendar \u5B9E\u4F8B\u5E76\u8C03\u7528\u5B9E\u4F8B\u65B9\u6CD5\u3002
\u65B9\u6CD5\u540D | \u8BF4\u660E | \u53C2\u6570 | \u8FD4\u56DE\u503C |
---|---|---|---|
reset | \u91CD\u7F6E\u9009\u4E2D\u7684\u65E5\u671F\u5230\u9ED8\u8BA4\u503C | - | - |
\u5546\u54C1\u5361\u7247\uFF0C\u7528\u4E8E\u5C55\u793A\u5546\u54C1\u7684\u56FE\u7247\u3001\u4EF7\u683C\u7B49\u4FE1\u606F\u3002
\u5728app.json
\u6216index.json
\u4E2D\u5F15\u5165\u7EC4\u4EF6\uFF0C\u8BE6\u7EC6\u4ECB\u7ECD\u89C1\u5FEB\u901F\u4E0A\u624B\u3002
"usingComponents": {
+
Tips: \u6CE8\u610F\uFF0C\u5728\u81EA\u5B9A\u4E49calendar\u7684\u9AD8\u5EA6\u65F6\uFF0C\u9700\u8981\u786E\u4FDD\uFF0C\u6EDA\u52A8\u5230\u5F53\u524D\u6708\u4EFD\u65F6\uFF0C\u6240\u6709\u7684\u65E5\u671F\u8981\u5C55\u73B0\u5728.van-calendar__body\u5185\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6EDA\u52A8\u65F6\u5934\u90E8\u6708\u4EFD\u4E0E\u5F53\u524D\u6708\u4EFD\u4E0D\u540C\u6B65\u7684\u60C5\u51B5\u3002\u76EE\u524D\u5E73\u94FA\u578B\u9884\u8BBE\u9AD8\u5EA6618px,\u5F39\u7A97\u578B\u9AD8\u5EA690%\u3002
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C |
---|---|---|---|
type | \u9009\u62E9\u7C7B\u578B:single \u8868\u793A\u9009\u62E9\u5355\u4E2A\u65E5\u671F\uFF0Cmultiple \u8868\u793A\u9009\u62E9\u591A\u4E2A\u65E5\u671F\uFF0Crange \u8868\u793A\u9009\u62E9\u65E5\u671F\u533A\u95F4 | string | single |
title | \u65E5\u5386\u6807\u9898 | string | \u65E5\u671F\u9009\u62E9 |
color | \u4E3B\u9898\u8272\uFF0C\u5BF9\u5E95\u90E8\u6309\u94AE\u548C\u9009\u4E2D\u65E5\u671F\u751F\u6548 | string | #ee0a24 |
min-date | \u53EF\u9009\u62E9\u7684\u6700\u5C0F\u65E5\u671F | timestamp | \u5F53\u524D\u65E5\u671F |
max-date | \u53EF\u9009\u62E9\u7684\u6700\u5927\u65E5\u671F | timestamp | \u5F53\u524D\u65E5\u671F\u7684\u516D\u4E2A\u6708\u540E |
default-date v1.10.21 | \u9ED8\u8BA4\u9009\u4E2D\u7684\u65E5\u671F\uFF0Ctype \u4E3Amultiple \u6216range \u65F6\u4E3A\u6570\u7EC4\uFF0C\u4F20\u5165 null \u8868\u793A\u9ED8\u8BA4\u4E0D\u9009\u62E9 | timestamp | timestamp[] | null | \u4ECA\u5929 |
row-height | \u65E5\u671F\u884C\u9AD8 | number | string | 64 |
formatter | \u65E5\u671F\u683C\u5F0F\u5316\u51FD\u6570 | (day: Day) => Day | - |
poppable | \u662F\u5426\u4EE5\u5F39\u5C42\u7684\u5F62\u5F0F\u5C55\u793A\u65E5\u5386 | boolean | true |
show-mark | \u662F\u5426\u663E\u793A\u6708\u4EFD\u80CC\u666F\u6C34\u5370 | boolean | true |
show-title | \u662F\u5426\u5C55\u793A\u65E5\u5386\u6807\u9898 | boolean | true |
show-subtitle | \u662F\u5426\u5C55\u793A\u65E5\u5386\u526F\u6807\u9898\uFF08\u5E74\u6708\uFF09 | boolean | true |
show-confirm | \u662F\u5426\u5C55\u793A\u786E\u8BA4\u6309\u94AE | boolean | true |
confirm-text | \u786E\u8BA4\u6309\u94AE\u7684\u6587\u5B57 | string | \u786E\u5B9A |
confirm-disabled-text | \u786E\u8BA4\u6309\u94AE\u5904\u4E8E\u7981\u7528\u72B6\u6001\u65F6\u7684\u6587\u5B57 | string | \u786E\u5B9A |
first-day-of-week | \u8BBE\u7F6E\u5468\u8D77\u59CB\u65E5 | 0~6 | 0 |
readonly v1.9.1 | \u662F\u5426\u4E3A\u53EA\u8BFB\u72B6\u6001\uFF0C\u53EA\u8BFB\u72B6\u6001\u4E0B\u4E0D\u80FD\u9009\u62E9\u65E5\u671F | boolean | false |
\u5F53 Calendar \u7684 poppable
\u4E3A true
\u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C |
---|---|---|---|
show | \u662F\u5426\u663E\u793A\u65E5\u5386\u5F39\u7A97 | boolean | false |
position | \u5F39\u51FA\u4F4D\u7F6E\uFF0C\u53EF\u9009\u503C\u4E3A top right left | string | bottom |
round | \u662F\u5426\u663E\u793A\u5706\u89D2\u5F39\u7A97 | boolean | true |
close-on-click-overlay | \u662F\u5426\u5728\u70B9\u51FB\u906E\u7F69\u5C42\u540E\u5173\u95ED | boolean | true |
safe-area-inset-bottom | \u662F\u5426\u5F00\u542F\u5E95\u90E8\u5B89\u5168\u533A\u9002\u914D | boolean | true |
\u5F53 Calendar \u7684 type
\u4E3A range
\u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C |
---|---|---|---|
max-range | \u65E5\u671F\u533A\u95F4\u6700\u591A\u53EF\u9009\u5929\u6570\uFF0C\u9ED8\u8BA4\u65E0\u9650\u5236 | number | string | - |
range-prompt | \u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u7684\u63D0\u793A\u6587\u6848 | string | null | \u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 xx \u5929 |
show-range-prompt | \u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\uFF0C\u662F\u5426\u5C55\u793A\u63D0\u793A\u6587\u6848 | boolean | true |
allow-same-day | \u662F\u5426\u5141\u8BB8\u65E5\u671F\u8303\u56F4\u7684\u8D77\u6B62\u65F6\u95F4\u4E3A\u540C\u4E00\u5929 | boolean | false |
\u5F53 Calendar \u7684 type
\u4E3A multiple
\u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C |
---|---|---|---|
min-range | \u65E5\u671F\u6700\u5C11\u53EF\u9009\u5929\u6570 | number | string | 1 |
\u65E5\u5386\u4E2D\u7684\u6BCF\u4E2A\u65E5\u671F\u90FD\u5BF9\u5E94\u4E00\u4E2A Day \u5BF9\u8C61\uFF0C\u901A\u8FC7formatter
\u5C5E\u6027\u53EF\u4EE5\u81EA\u5B9A\u4E49 Day \u5BF9\u8C61\u7684\u5185\u5BB9\u3002
\u952E\u540D | \u8BF4\u660E | \u7C7B\u578B |
---|---|---|
date | \u65E5\u671F\u5BF9\u5E94\u7684 Date \u5BF9\u8C61 | Date |
type | \u65E5\u671F\u7C7B\u578B\uFF0C\u53EF\u9009\u503C\u4E3Aselected \u3001start \u3001middle \u3001end \u3001disabled | string |
text | \u4E2D\u95F4\u663E\u793A\u7684\u6587\u5B57 | string |
topInfo | \u4E0A\u65B9\u7684\u63D0\u793A\u4FE1\u606F | string |
bottomInfo | \u4E0B\u65B9\u7684\u63D0\u793A\u4FE1\u606F | string |
className | \u81EA\u5B9A\u4E49 className | string |
\u4E8B\u4EF6\u540D | \u8BF4\u660E | \u56DE\u8C03\u53C2\u6570 |
---|---|---|
bind:select | \u70B9\u51FB\u4EFB\u610F\u65E5\u671F\u65F6\u89E6\u53D1 | value: Date | Date[] |
bind:unselect | \u5F53 Calendar \u7684 type \u4E3A multiple \u65F6,\u70B9\u51FB\u5DF2\u9009\u4E2D\u7684\u65E5\u671F\u65F6\u89E6\u53D1 | value: Date |
bind:confirm | \u65E5\u671F\u9009\u62E9\u5B8C\u6210\u540E\u89E6\u53D1\uFF0C\u82E5show-confirm \u4E3Atrue \uFF0C\u5219\u70B9\u51FB\u786E\u8BA4\u6309\u94AE\u540E\u89E6\u53D1 | value: Date | Date[] |
bind:open | \u6253\u5F00\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1 | - |
bind:close | \u5173\u95ED\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1 | - |
bind:opened | \u6253\u5F00\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1 | - |
bind:closed | \u5173\u95ED\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1 | - |
bind:over-range | \u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u89E6\u53D1 | - |
bind:click-subtitle v1.8.1 | \u70B9\u51FB\u65E5\u5386\u526F\u6807\u9898\u65F6\u89E6\u53D1 | WechatMiniprogram.TouchEvent |
\u540D\u79F0 | \u8BF4\u660E |
---|---|
title | \u81EA\u5B9A\u4E49\u6807\u9898 |
footer | \u81EA\u5B9A\u4E49\u5E95\u90E8\u533A\u57DF\u5185\u5BB9 |
\u901A\u8FC7 selectComponent \u53EF\u4EE5\u83B7\u53D6\u5230 Calendar \u5B9E\u4F8B\u5E76\u8C03\u7528\u5B9E\u4F8B\u65B9\u6CD5\u3002
\u65B9\u6CD5\u540D | \u8BF4\u660E | \u53C2\u6570 | \u8FD4\u56DE\u503C |
---|---|---|---|
reset | \u91CD\u7F6E\u9009\u4E2D\u7684\u65E5\u671F\u5230\u9ED8\u8BA4\u503C | - | - |
\u5546\u54C1\u5361\u7247\uFF0C\u7528\u4E8E\u5C55\u793A\u5546\u54C1\u7684\u56FE\u7247\u3001\u4EF7\u683C\u7B49\u4FE1\u606F\u3002
\u5728app.json
\u6216index.json
\u4E2D\u5F15\u5165\u7EC4\u4EF6\uFF0C\u8BE6\u7EC6\u4ECB\u7ECD\u89C1\u5FEB\u901F\u4E0A\u624B\u3002
"usingComponents": {
"van-card": "@vant/weapp/card/index"
}
<van-card
diff --git a/assets/main.5217dd5b.js b/assets/main.f88b1490.js
similarity index 99%
rename from assets/main.5217dd5b.js
rename to assets/main.f88b1490.js
index c1180d50..457765af 100644
--- a/assets/main.5217dd5b.js
+++ b/assets/main.f88b1490.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.87d87518.js";import{r as u,c as C,n as p,a as r,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.1ccdd11c.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.5c373114.js";import{r as u,c as C,n as p,a as r,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.1ccdd11c.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.83b1feca.js b/assets/mobile.9fd35b73.js
similarity index 99%
rename from assets/mobile.83b1feca.js
rename to assets/mobile.9fd35b73.js
index 42c0657a..512c1755 100644
--- a/assets/mobile.83b1feca.js
+++ b/assets/mobile.9fd35b73.js
@@ -1 +1 @@
-import{_ as g,f as C,b as H,l as M,g as j,h as P}from"./iframe-router.87d87518.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.1ccdd11c.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.5c373114.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.1ccdd11c.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 a46ee407..a11042b2 100644
--- a/index.html
+++ b/index.html
@@ -26,9 +26,9 @@
})();
-
+
-
+
diff --git a/mobile.html b/mobile.html
index f604687a..4db3ca1c 100644
--- a/mobile.html
+++ b/mobile.html
@@ -30,9 +30,9 @@
}
-
+
-
+