[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nindent_style = space\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.wxml]\nindent_size = 2\n\n[*.wxss]\nindent_size = 2\n\n[*.js]\nindent_size = 2\n\n[*.json]\nindent_size = 2\n"
  },
  {
    "path": ".eslintignore",
    "content": "lib\ndist\nexample/dist\nnode_modules\n"
  },
  {
    "path": ".eslintrc",
    "content": "{\n  \"root\": true,\n  \"globals\": {\n    \"getApp\": false,\n    \"getCurrentPages\": false,\n    \"Page\": false,\n    \"Component\": false,\n    \"App\": false,\n    \"wx\": false,\n    \"Behavior\": false\n  },\n  \"extends\": [\"@vant\"]\n}\n"
  },
  {
    "path": ".gitee/ISSUE_TEMPLATE.zh-CN.md",
    "content": "你好，请使用下面的链接创建 issue 以帮助我们更快的排查问题，不规范的 issue 会被关闭，感谢配合。\n\nhttp://vant-ui.github.io/vant-issue-generater?repo=VantWeapp\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [chenjiahan, nemo-shen]\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/template-1-bug-report-vant.zh-CN.yml",
    "content": "name: 我要反馈 Vant Weapp 的 Bug\ndescription: 通过标准模板进行 Bug 反馈\ntitle: \"[Bug Report] 请在此填写标题\"\nlabels: [\"bug: need confirm\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        在提交 Bug 报告前，请注意：\n\n        - 确认你的问题无法通过官方文档得到解决。\n        - 确认你搜索过 [历史 issue](https://github.com/youzan/vant-weapp/issues)，并且没有发现同样的问题。\n        - 如果不是反馈 Bug，请到 [Discussions 讨论区](https://github.com/youzan/vant-weapp/discussions) 发帖。\n\n  - type: textarea\n    id: reproduce\n    attributes:\n      label: 重现链接\n      description: 请提供一个尽可能简单的微信小程序代码片段协助我们排查，这可以更快的帮助我们定位问题，解决 issue。\n    validations:\n      required: true\n\n  - type: input\n    id: version\n    attributes:\n      label: Vant Weapp 版本\n      description: 你正在使用的 Vant Weapp 版本是多少？（请填写 node_modules/@vant/weapp/package.json 里实际安装的版本）\n      placeholder: 比如 1.10.5\n    validations:\n      required: true\n\n  - type: textarea\n    id: description\n    attributes:\n      label: 描述一下你遇到的问题。\n      placeholder: 比如：弹窗无法展示、日历组件报错\n    validations:\n      required: true\n\n  - type: textarea\n    id: reproduce-steps\n    attributes:\n      label: 重现步骤\n      description: 请提供一个最简单的操作步骤，方便我们快速重现问题。\n      placeholder: |\n        比如：\n        1. 点击按钮\n        2. 弹窗无法展示\n    validations:\n      required: true\n\n  - type: input\n    id: browsers\n    attributes:\n      label: 设备/浏览器\n      description: 在哪些设备/浏览器上能重现这个问题？"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/template-3-feature-request-vant.zh-CN.yml",
    "content": "name: 我想要一个 Vant Weapp 的新功能\ndescription: 通过标准模板描述一下你的功能需求。\ntitle: \"[Feature Request] 请在此填写标题\"\nlabels: [\"feature: need confirm\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        在提交功能需求前，请注意：\n\n        - 确认这是一个通用功能，并且无法通过现有的 API 或 Slot 实现。\n        - 确认你搜索过 [历史 issue](https://github.com/youzan/vant-weapp/issues)，并且没有发现同样的需求。\n        - 可以先到 [Discussions 讨论区](https://github.com/youzan/vant-weapp/discussions) 发帖，讨论一下需求是否合理。\n\n  - type: textarea\n    id: description\n    attributes:\n      label: 这个功能解决了什么问题？\n      description: 请尽可能详细地说明这个功能的使用场景。\n    validations:\n      required: true\n\n  - type: textarea\n    id: api\n    attributes:\n      label: 你期望的 API 是什么样子的？\n      description: 描述一下这个新功能的 API，并提供一些代码示例。\n      placeholder: |\n        ```xml\n        <van-button some-prop=\"xxx\" />\n        ```\n    validations:\n      required: true"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "### Pull Request 标题规则\n\ntype(ComponentName?)：commit message\n\n示例：\n\n- docs: fix typo in quickstart\n- build: optimize build speed\n- fix(Button): incorrect style\n- feat(Button): add color prop\n\n可选择的类型:\n\n- fix\n- feat\n- docs\n- perf\n- test\n- types\n- build\n- chore\n- refactor\n- breaking change\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n- package-ecosystem: npm\n  directory: \"/\"\n  schedule:\n    interval: monthly\n  open-pull-requests-limit: 10\n  ignore:\n  - dependency-name: miniprogram-api-typings\n    versions:\n    - 3.3.2\n"
  },
  {
    "path": ".github/pr-labeler.yml",
    "content": "\"change: feat\":\n  - \"/^(feat|types|style)/\"\n\"change: fix\":\n  - \"/^fix/\"\n\"change: perf\":\n  - \"/^perf/\"\n\"change: breaking\":\n  - \"/^breaking change/\"\n\"change: docs\":\n  - \"/^docs/\"\n"
  },
  {
    "path": ".github/workflows/deploy-site.yml",
    "content": "name: Deploy Site\n\non:\n  push:\n    branches: [dev]\n    paths:\n      - 'docs/**/*.md'\n      - 'packages/**/*.md'\n\n  workflow_dispatch:\n\njobs:\n  build-and-deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout 🛎️\n        uses: actions/checkout@v2\n        with:\n          ref: 'dev'\n\n      - name: Install dependencies\n        uses: bahmutov/npm-install@v1\n\n      - name: Build Site\n        run: npx --no-install vant-cli build-site\n\n      - name: Deploy for GitHub 🚀\n        uses: JamesIves/github-pages-deploy-action@v4.6.0\n        with:\n          branch: gh-pages\n          folder: site-dist\n          token: ${{ secrets.VANT_UI_TOKEN }}\n          repository-name: vant-ui/vant-ui.github.io\n          target-folder: vant-weapp\n          # enable single-commit to reduce the repo size\n          single-commit: true\n          clean: true\n          clean-exclude: |\n            0.x\n"
  },
  {
    "path": ".github/workflows/pr-label.yaml",
    "content": "name: PR Labeler\n\non:\n  pull_request_target:\n    types:\n      - opened\n      - edited\n\njobs:\n  change-labeling:\n    name: Labeling for changes\n    runs-on: ubuntu-latest\n    steps:\n      - uses: github/issue-labeler@v3.4\n        with:\n          repo-token: \"${{ secrets.GITHUB_TOKEN }}\"\n          configuration-path: .github/pr-labeler.yml\n          enable-versioned-regex: 0\n          include-title: 1\n          sync-labels: 1\n"
  },
  {
    "path": ".github/workflows/release-tag.yml",
    "content": "name: Create Release Tag\n\non:\n  push:\n    tags:\n      - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10\n\njobs:\n  build:\n    name: Create Release\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      - name: Create Release for Tag\n        id: release_tag\n        uses: ncipollo/release-action@v1\n        with:\n          generateReleaseNotes: \"true\"\n          body: |\n            > 请访问 [更新日志](https://vant-ui.github.io/vant-weapp/#/changelog) 了解所有更新。\n"
  },
  {
    "path": ".github/workflows/test.yml",
    "content": "name: CI\n\non: [push, pull_request]\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v1\n    - uses: actions/setup-node@v1\n      with:\n        node-version: '18.x'\n\n    - name: Install dependencies\n      uses: bahmutov/npm-install@v1\n\n    - name: Run linter\n      run: npm run lint\n\n  test:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: szenius/set-timezone@v1.0\n      with:\n        timezoneLinux: \"Asia/Shanghai\"\n        timezoneMacos: \"Asia/Shanghai\"\n        timezoneWindows: \"China Standard Time\"\n    - uses: actions/checkout@v1\n    - uses: actions/setup-node@v1\n      with:\n        node-version: '18.x'\n\n    - name: Install dependencies\n      uses: bahmutov/npm-install@v1\n\n    - name: Run test cases\n      run: npm test\n\n    - name: Upload coverage to Codecov\n      uses: codecov/codecov-action@v1\n      with:\n        token: ${{ secrets.CODECOV_TOKEN }}\n\n  build:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v1\n    - uses: actions/setup-node@v1\n      with:\n        node-version: '18.x'\n\n    - name: Install dependencies\n      uses: bahmutov/npm-install@v1\n\n    - name: Build\n      run: npm run build:lib\n"
  },
  {
    "path": ".gitignore",
    "content": "*.log*\n.cache\n.DS_Store\n.idea\n.vscode\nnode_modules\nsite-dist\ndocs/dist\nexample/dist\n.history\nchangelog.generated.md\npackage-lock.json\nbuild/private.wx1c01b35002d3ba14.key\nproject.private.config.json\n"
  },
  {
    "path": ".husky/.gitignore",
    "content": "_\n"
  },
  {
    "path": ".husky/commit-msg",
    "content": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx --no-install vant-cli commit-lint $1\n"
  },
  {
    "path": ".husky/pre-commit",
    "content": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx --no-install lint-staged\n"
  },
  {
    "path": ".npmrc",
    "content": "registry=https://registry.npmjs.org\n"
  },
  {
    "path": ".prettierignore",
    "content": "lib\ndist\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"singleQuote\": true,\n  \"proseWrap\": \"never\"\n}\n"
  },
  {
    "path": ".stylelintrc",
    "content": "{\n  \"extends\": [\n    \"@vant/stylelint-config\"\n  ],\n  \"rules\": {\n    \"unit-no-unknown\": [\n      true,\n      {\n        \"ignoreUnits\": \"/rpx/\"\n      }\n    ],\n    \"selector-type-no-unknown\": [\n      true,\n      {\n        \"ignoreTypes\": [\n          \"/page/\"\n        ]\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright 2016-present Youzan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\">\n  <img alt=\"logo\" src=\"https://img.yzcdn.cn/vant/logo.png\" width=\"120\" style=\"margin-bottom: 10px;\">\n</p>\n<h3 align=\"center\">轻量、可靠的小程序 UI 组件库</h3>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/npm/v/@vant/weapp.svg?style=for-the-badge\" alt=\"npm version\" />\n  <img src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge&color=#4fc08d\" />\n  <img src=\"https://img.shields.io/npm/dt/@vant/weapp.svg?style=for-the-badge&color=#4fc08d\" alt=\"downloads\" />\n  <img src=\"https://img.shields.io/npm/dm/@vant/weapp.svg?style=for-the-badge&color=#4fc08d\" alt=\"downloads\" />\n</p>\n\n<p align=\"center\">\n  🔥 <a href=\"https://vant.pro/vant-weapp/\">文档网站（国内）</a>\n  &nbsp;\n  🔥 <a href=\"https://vant-ui.github.io/vant-weapp/\">文档网站（GitHub）</a>\n  &nbsp;\n  🚀 <a href=\"https://github.com/vant-ui/vant\" target=\"_blank\">Vue 版</a>\n</p>\n\n---\n\n### 介绍\n\nVant 是一个**轻量、可靠的移动端组件库**，于 2017 年开源。\n\n目前 Vant 官方提供了 [Vue 2 版本](https://vant-ui.github.io/vant/v2/)、[Vue 3 版本](https://vant-ui.github.io/vant/)和[微信小程序版本](http://vant-ui.github.io/vant-weapp/)，并由社区团队维护 [React 版本](https://github.com/3lang3/react-vant)和[支付宝小程序版本](https://github.com/ant-move/Vant-Aliapp)。\n\n## 预览\n\n扫描下方小程序二维码，体验组件库示例。注意：因微信审核机制限制，目前示例小程序不是最新版本，可以 clone 代码到本地开发工具预览\n\n<img src=\"https://img.yzcdn.cn/vant-weapp/qrcode-201808101114.jpg\" width=\"200\" height=\"200\" style=\"margin-top: 10px;\" >\n\n## 使用之前\n\n使用 Vant Weapp 前，请确保你已经学习过微信官方的 [小程序简易教程](https://developers.weixin.qq.com/miniprogram/dev/framework/) 和 [自定义组件介绍](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/)。\n\n## 安装\n\n### 方式一. 通过 npm 安装 (推荐)\n\n小程序已经支持使用 npm 安装第三方包，详见 [npm 支持](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html?search-key=npm)\n\n```bash\n# 通过 npm 安装\nnpm i @vant/weapp -S --production\n\n# 通过 yarn 安装\nyarn add @vant/weapp --production\n\n# 安装 0.x 版本\nnpm i vant-weapp -S --production\n```\n\n### 方式二. 下载代码\n\n直接通过 git 下载 Vant Weapp 源代码，并将 `dist` 目录拷贝到自己的项目中。\n\n```bash\ngit clone https://github.com/youzan/vant-weapp.git\n```\n\n## 使用组件\n\n以按钮组件为例，只需要在 json 文件中引入按钮对应的自定义组件即可\n\n```json\n{\n  \"usingComponents\": {\n    \"van-button\": \"/path/to/vant-weapp/dist/button/index\"\n  }\n}\n```\n\n接着就可以在 wxml 中直接使用组件\n\n```html\n<van-button type=\"primary\">按钮</van-button>\n```\n\n## 在开发者工具中预览\n\n```bash\n# 安装项目依赖\nnpm install\n\n# 执行组件编译\nnpm run dev\n```\n\n打开[微信开发者工具](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html)，把`vant-weapp/example`目录添加进去就可以预览示例了。\n\nPS：关于 `van-area` Area 省市区选择组件，地区数据初始化可以直接在云开发环境中导入`vant-weapp/example/database_area.JSON` 文件使用。\n\n## 基础库版本\n\nVant Weapp 最低支持到小程序基础库 2.6.5 版本。\n\n## 链接\n\n- [文档网站（GitHub）](https://vant-ui.github.io/vant-weapp/)\n- [文档网站（国内）](https://vant.pro/vant-weapp/)\n- [意见反馈](https://github.com/youzan/vant-weapp/issues)\n- [设计资源](https://vant-ui.github.io/vant/#/zh-CN/design)\n- [更新日志](https://vant-ui.github.io/vant-weapp/#/changelog)\n- [官方示例](https://github.com/vant-ui/vant-demo)\n\n## 核心团队\n\n以下是 Vant 和 Vant Weapp 的核心贡献者们：\n\n| [![chenjiahan](https://avatars.githubusercontent.com/u/7237365?s=80&v=4)](https://github.com/chenjiahan/) | [![cookfront](https://avatars.githubusercontent.com/u/4829465?s=80&v=4)](https://github.com/cookfront/) | [![w91](https://avatars.githubusercontent.com/u/2599455?s=80&v=4)](https://github.com/w91/) | [![pangxie1991](https://avatars.githubusercontent.com/u/5961240?s=80&v=4)](https://github.com/pangxie1991/) | [![rex-zsd](https://avatars.githubusercontent.com/u/8767877?s=80&v=4)](https://github.com/rex-zsd/) | [![nemo-shen](https://avatars.githubusercontent.com/u/13480805?s=80&v=4)](https://github.com/nemo-shen/) |\n| :-: | :-: | :-: | :-: | :-: | :-: |\n| [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) | [nemo-shen](https://github.com/nemo-shen/) |\n\n| [![Lindysen](https://avatars.githubusercontent.com/u/33708359?s=80&v=4)](https://github.com/Lindysen/) | [![JakeLaoyu](https://avatars.githubusercontent.com/u/16181940?s=80&v=4)](https://github.com/JakeLaoyu/) | [![landluck](https://avatars.githubusercontent.com/u/27060081?s=80&v=4)](https://github.com/landluck/) | [![wjw-gavin](https://avatars.githubusercontent.com/u/19986739?s=80&v=4)](https://github.com/wjw-gavin/) | [![inottn](https://avatars.githubusercontent.com/u/18509404?s=80&v=4)](https://github.com/inottn/) | [![zhousg](https://avatars.githubusercontent.com/u/15833290?s=80&v=4)](https://github.com/zhousg/) |\n| :-: | :-: | :-: | :-: | :-: | :-: |\n| [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) | [landluck](https://github.com/landluck/) | [wjw-gavin](https://github.com/wjw-gavin/) | [inottn](https://github.com/inottn/) | [zhousg](https://github.com/zhousg/) |\n\n## 贡献者们\n\n感谢以下小伙伴们为 Vant Weapp 发展做出的贡献：\n\n<a href=\"https://github.com/youzan/vant-weapp/graphs/contributors\">\n  <img src=\"https://opencollective.com/vant-weapp/contributors.svg?width=890&button=false\" alt=\"contributors\">\n</a>\n\n## 开源协议\n\n本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89)协议，请自由地享受和参与开源。\n"
  },
  {
    "path": "babel.config.js",
    "content": "module.exports = {\n  presets: [\n    [\n      '@babel/preset-env',\n      {\n        loose: true,\n        modules: false,\n      },\n    ],\n  ],\n  env: {\n    test: {\n      presets: ['@babel/preset-typescript'],\n      plugins: ['@babel/plugin-transform-modules-commonjs'],\n    },\n  },\n};\n"
  },
  {
    "path": "build/compiler.js",
    "content": "const fs = require('fs');\nconst gulp = require('gulp');\nconst path = require('path');\nconst less = require('gulp-less');\nconst insert = require('gulp-insert');\nconst rename = require('gulp-rename');\nconst postcss = require('gulp-postcss');\nconst ts = require('gulp-typescript');\nconst util = require('util');\nconst merge2 = require('merge2');\nconst exec = util.promisify(require('child_process').exec);\n\nconst src = path.resolve(__dirname, '../packages');\nconst icons = path.resolve(__dirname, '../node_modules/@vant/icons');\n\nconst libConfig = path.resolve(__dirname, '../tsconfig.lib.json');\nconst esConfig = path.resolve(__dirname, '../tsconfig.json');\nconst exampleConfig = path.resolve(__dirname, '../tsconfig.example.json');\n\nconst libDir = path.resolve(__dirname, '../lib');\nconst esDir = path.resolve(__dirname, '../dist');\nconst exampleDistDir = path.resolve(__dirname, '../example/dist');\nconst examplePagesDir = path.resolve(__dirname, '../example/pages');\n\nconst exampleAppJsonPath = path.resolve(__dirname, '../example/app.json');\nconst baseCssPath = path.resolve(__dirname, '../packages/common/index.wxss');\n\nconst lessCompiler = (dist) =>\n  function compileLess() {\n    const srcPath = [`${src}/**/*.less`];\n    if ([esDir, libDir].indexOf(dist) !== -1) {\n      srcPath.push(`!${src}/**/demo/**/*.less`);\n    }\n    return gulp\n      .src(srcPath)\n      .pipe(less())\n      .pipe(postcss())\n      .pipe(\n        insert.transform((contents, file) => {\n          if (!file.path.includes('packages' + path.sep + 'common')) {\n            const relativePath = path\n              .relative(\n                path.normalize(`${file.path}${path.sep}..`),\n                baseCssPath\n              )\n              .replace(/\\\\/g, '/');\n            contents = `@import '${relativePath}';${contents}`;\n          }\n          return contents;\n        })\n      )\n      .pipe(rename({ extname: '.wxss' }))\n      .pipe(gulp.dest(dist));\n  };\n\nconst tsCompiler = (dist, config) =>\n  function compileTs() {\n    const tsProject = ts.createProject(config, {\n      declaration: true,\n    });\n    const tsResult = tsProject.src().pipe(tsProject());\n\n    return merge2(\n      tsResult.js\n        .pipe(\n          insert.transform((contents, file) => {\n            if (dist === exampleDistDir && file.path.includes(`${path.sep}demo${path.sep}`)) {\n              const iconConfig = '@vant/icons/src/config';\n              contents = contents.replace(\n                iconConfig,\n                path.relative(\n                  path.dirname(file.path),\n                  `${exampleDistDir}/${iconConfig}`\n                ).replace(/\\\\/g, '/')\n              );\n            }\n            return contents;\n          })\n        )\n        .pipe(gulp.dest(dist)),\n      tsResult.dts.pipe(gulp.dest(dist))\n    );\n  };\n\nconst copier = (dist, ext) =>\n  function copy() {\n    const srcPath = [`${src}/**/*.${ext}`];\n    if ([esDir, libDir].indexOf(dist) !== -1) {\n      srcPath.push(`!${src}/**/demo/**/*.${ext}`);\n    }\n    return gulp\n      .src(srcPath)\n      .pipe(\n        insert.transform((contents, file) => {\n          if (ext === 'json' &&  file.path.includes(`${path.sep}demo${path.sep}`)  ) {\n            contents = contents.replace('/example', '');\n          }\n          return contents;\n        })\n      )\n      .pipe(gulp.dest(dist));\n  };\n\nconst staticCopier = (dist) =>\n  gulp.parallel(\n    copier(dist, 'wxml'),\n    copier(dist, 'wxs'),\n    copier(dist, 'json')\n  );\n\nconst cleaner = (path) =>\n  function clean() {\n    return exec(`npx rimraf ${path}`);\n  };\n\nconst tasks = [\n  ['buildEs', esDir, esConfig],\n  ['buildLib', libDir, libConfig],\n].reduce((prev, [name, ...args]) => {\n  prev[name] = gulp.series(\n    cleaner(...args),\n    gulp.parallel(\n      tsCompiler(...args),\n      lessCompiler(...args),\n      staticCopier(...args)\n    )\n  );\n  return prev;\n}, {});\n\ntasks.buildExample = gulp.series(\n  cleaner(exampleDistDir),\n  gulp.parallel(\n    tsCompiler(exampleDistDir, exampleConfig),\n    lessCompiler(exampleDistDir),\n    staticCopier(exampleDistDir),\n    () =>\n      gulp\n        .src(`${icons}/**/*`)\n        .pipe(gulp.dest(`${exampleDistDir}/@vant/icons`)),\n    () => {\n      const appJson = JSON.parse(fs.readFileSync(exampleAppJsonPath));\n      const excludePages = ['pages/dashboard/index'];\n      appJson.pages\n        .filter((page) => page.indexOf(excludePages) === -1)\n        .forEach((path) => {\n          const component = path.replace(/(pages\\/|\\/index)/g, '');\n          const writeFiles = [\n            {\n              path: `${examplePagesDir}/${component}/index.js`,\n              contents: \"import Page from '../../common/page';\\n\\nPage();\",\n            },\n            {\n              path: `${examplePagesDir}/${component}/index.wxml`,\n              contents: `<van-${component}-demo />`,\n            },\n          ];\n          writeFiles.forEach((writeFile) => {\n            fs.access(writeFile.path, fs.constants.F_OK, (fileNotExists) => {\n              if (fileNotExists) {\n                fs.writeFile(writeFile.path, writeFile.contents, (err) => {\n                  if (err) {\n                    throw err;\n                  }\n                });\n              }\n            });\n          });\n        });\n    },\n    () => {\n      gulp.watch(`${src}/**/*.less`, lessCompiler(exampleDistDir));\n      gulp.watch(`${src}/**/*.wxml`, copier(exampleDistDir, 'wxml'));\n      gulp.watch(`${src}/**/*.wxs`, copier(exampleDistDir, 'wxs'));\n      gulp.watch(`${src}/**/*.ts`, tsCompiler(exampleDistDir, exampleConfig));\n      gulp.watch(`${src}/**/*.json`, copier(exampleDistDir, 'json'));\n    }\n  )\n);\n\nmodule.exports = tasks;\n"
  },
  {
    "path": "build/dev.mjs",
    "content": "import { dirname, resolve } from 'path';\nimport { fileURLToPath } from 'url';\nimport { dev } from '@vant/cli/lib/commands/dev.js';\nimport { exec } from 'child_process';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst gulpConfig = resolve(__dirname, './compiler.js');\n\nasync function run() {\n  await dev();\n\n  const p = exec(`npx gulp -f ${gulpConfig} buildExample --color`);\n  p.stdout.on('data', (stdout) => console.info(stdout));\n  p.stderr.on('data', (stderr) => console.info(stderr));\n}\n\nrun();\n"
  },
  {
    "path": "build/release.sh",
    "content": "#!/usr/bin/env sh\nset -e\necho \"Enter release version: \"\nread VERSION\n\nread -p \"Releasing $VERSION - are you sure? (y/n)\" -n 1 -r\necho    # (optional) move to a new line\nif [[ $REPLY =~ ^[Yy]$ ]]\nthen\n  # build\n  npm run build:lib\n  if [[ `git status --porcelain` ]]; \n  then\n    git add -A\n    git commit -am \"build: compile $VERSION\"\n  fi\n\n  # commit\n  npm version $VERSION --message \"release: $VERSION\"\n\n  # publish\n  git push origin dev\n  git push origin refs/tags/v$VERSION\n\n  if [[ $VERSION =~ [beta] ]]\n  then\n    npm publish --tag beta\n  else \n    npm publish\n  fi\nfi\n"
  },
  {
    "path": "build/upload.js",
    "content": "const ci = require('miniprogram-ci');\nconst path = require('path');\nconst config = require('../example/project.config.json');\nconst package = require('../package.json');\n\nconst project = new ci.Project({\n  appid: config.appid,\n  type: 'miniProgram',\n  projectPath: path.join(__dirname, '../example'),\n  privateKeyPath: path.join(__dirname, './private.wx1c01b35002d3ba14.key'),\n  ignores: ['node_modules/**/*'],\n});\n\nci.upload({\n  project,\n  version: package.version,\n  desc: package.description,\n  setting: config.setting,\n});\n"
  },
  {
    "path": "dist/action-sheet/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/action-sheet/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\nVantComponent({\n    classes: ['list-class'],\n    mixins: [button],\n    props: {\n        show: Boolean,\n        title: String,\n        cancelText: String,\n        description: String,\n        round: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        actions: {\n            type: Array,\n            value: [],\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickAction: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onSelect(event) {\n            const { index } = event.currentTarget.dataset;\n            const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data;\n            const item = actions[index];\n            if (item) {\n                this.$emit('select', item);\n                if (closeOnClickAction) {\n                    this.onClose();\n                }\n                if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {\n                    wx.getUserProfile({\n                        desc: item.getUserProfileDesc || '  ',\n                        complete: (userProfile) => {\n                            this.$emit('getuserinfo', userProfile);\n                        },\n                    });\n                }\n            }\n        },\n        onCancel() {\n            this.$emit('cancel');\n        },\n        onClose() {\n            this.$emit('close');\n        },\n        onClickOverlay() {\n            this.$emit('click-overlay');\n            this.onClose();\n        },\n    },\n});\n"
  },
  {
    "path": "dist/action-sheet/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-popup\": \"../popup/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "dist/action-sheet/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<van-popup\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  round=\"{{ round }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay=\"{{ overlay }}\"\n  custom-class=\"van-action-sheet custom-class\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClickOverlay\"\n>\n  <view wx:if=\"{{ title }}\" class=\"van-action-sheet__header\">\n    {{ title }}\n    <van-icon\n      name=\"cross\"\n      custom-class=\"van-action-sheet__close\"\n      bind:click=\"onClose\"\n    />\n  </view>\n  <view wx:if=\"{{ description }}\" class=\"van-action-sheet__description van-hairline--bottom\">\n    {{ description }}\n  </view>\n  <view wx:if=\"{{ actions && actions.length }}\" class=\"list-class\">\n    <!-- button外包一层view，防止actions动态变化，导致渲染时button被打散 -->\n    <button\n      wx:for=\"{{ actions }}\"\n      wx:key=\"index\"\n      open-type=\"{{ item.disabled || item.loading || (canIUseGetUserProfile && item.openType === 'getUserInfo') ? '' : item.openType }}\"\n      style=\"{{ item.color ? 'color: ' + item.color : '' }}\"\n      class=\"{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}\"\n      hover-class=\"van-action-sheet__item--hover\"\n      data-index=\"{{ index }}\"\n      bindtap=\"{{ item.disabled || item.loading ? '' : 'onSelect' }}\"\n      bindgetuserinfo=\"onGetUserInfo\"\n      bindcontact=\"onContact\"\n      bindgetphonenumber=\"onGetPhoneNumber\"\n      binderror=\"onError\"\n      bindlaunchapp=\"onLaunchApp\"\n      bindopensetting=\"onOpenSetting\"\n      lang=\"{{ lang }}\"\n      session-from=\"{{ sessionFrom }}\"\n      send-message-title=\"{{ sendMessageTitle }}\"\n      send-message-path=\"{{ sendMessagePath }}\"\n      send-message-img=\"{{ sendMessageImg }}\"\n      show-message-card=\"{{ showMessageCard }}\"\n      app-parameter=\"{{ appParameter }}\"\n    >\n      <block wx:if=\"{{ !item.loading }}\">\n        {{ item.name }}\n        <view wx:if=\"{{ item.subname }}\" class=\"van-action-sheet__subname\" >{{ item.subname }}</view>\n      </block>\n      <van-loading wx:else custom-class=\"van-action-sheet__loading\" size=\"22px\" />\n    </button>\n  </view>\n  <slot />\n  <block wx:if=\"{{ cancelText }}\">\n    <view class=\"van-action-sheet__gap\" />\n    <view\n      class=\"van-action-sheet__cancel\"\n      hover-class=\"van-action-sheet__cancel--hover\"\n      hover-stay-time=\"70\"\n      bind:tap=\"onCancel\"\n    >\n      {{ cancelText }}\n    </view>\n  </block>\n</van-popup>\n"
  },
  {
    "path": "dist/action-sheet/index.wxss",
    "content": "@import '../common/index.wxss';.van-action-sheet{color:var(--action-sheet-item-text-color,#323233);max-height:var(--action-sheet-max-height,90%)!important}.van-action-sheet__cancel,.van-action-sheet__item{background-color:var(--action-sheet-item-background,#fff);font-size:var(--action-sheet-item-font-size,16px);line-height:var(--action-sheet-item-line-height,22px);padding:14px 16px;text-align:center}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{background-color:var(--action-sheet-cancel-padding-color,#f7f8fa);display:block;height:var(--action-sheet-cancel-padding-top,8px)}.van-action-sheet__item--disabled{color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{color:var(--action-sheet-subname-color,#969799);font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.van-action-sheet__header{font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--font-weight-bold,500);line-height:var(--action-sheet-header-height,48px);text-align:center}.van-action-sheet__description{color:var(--action-sheet-description-color,#969799);font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.van-action-sheet__close{color:var(--action-sheet-close-icon-color,#c8c9cc);font-size:var(--action-sheet-close-icon-size,22px)!important;line-height:inherit!important;padding:var(--action-sheet-close-icon-padding,0 16px);position:absolute!important;right:0;top:0}.van-action-sheet__loading{display:flex!important}"
  },
  {
    "path": "dist/area/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/area/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { pickerProps } from '../picker/shared';\nimport { requestAnimationFrame } from '../common/utils';\nconst EMPTY_CODE = '000000';\nVantComponent({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: Object.assign(Object.assign({}, pickerProps), { showToolbar: {\n            type: Boolean,\n            value: true,\n        }, value: {\n            type: String,\n            observer(value) {\n                this.code = value;\n                this.setValues();\n            },\n        }, areaList: {\n            type: Object,\n            value: {},\n            observer: 'setValues',\n        }, columnsNum: {\n            type: null,\n            value: 3,\n        }, columnsPlaceholder: {\n            type: Array,\n            observer(val) {\n                this.setData({\n                    typeToColumnsPlaceholder: {\n                        province: val[0] || '',\n                        city: val[1] || '',\n                        county: val[2] || '',\n                    },\n                });\n            },\n        } }),\n    data: {\n        columns: [{ values: [] }, { values: [] }, { values: [] }],\n        typeToColumnsPlaceholder: {},\n    },\n    mounted() {\n        requestAnimationFrame(() => {\n            this.setValues();\n        });\n    },\n    methods: {\n        getPicker() {\n            if (this.picker == null) {\n                this.picker = this.selectComponent('.van-area__picker');\n            }\n            return this.picker;\n        },\n        onCancel(event) {\n            this.emit('cancel', event.detail);\n        },\n        onConfirm(event) {\n            const { index } = event.detail;\n            let { value } = event.detail;\n            value = this.parseValues(value);\n            this.emit('confirm', { value, index });\n        },\n        emit(type, detail) {\n            detail.values = detail.value;\n            delete detail.value;\n            this.$emit(type, detail);\n        },\n        parseValues(values) {\n            const { columnsPlaceholder } = this.data;\n            return values.map((value, index) => {\n                if (value &&\n                    (!value.code || value.name === columnsPlaceholder[index])) {\n                    return Object.assign(Object.assign({}, value), { code: '', name: '' });\n                }\n                return value;\n            });\n        },\n        onChange(event) {\n            var _a;\n            const { index, picker, value } = event.detail;\n            this.code = value[index].code;\n            (_a = this.setValues()) === null || _a === void 0 ? void 0 : _a.then(() => {\n                this.$emit('change', {\n                    picker,\n                    values: this.parseValues(picker.getValues()),\n                    index,\n                });\n            });\n        },\n        getConfig(type) {\n            const { areaList } = this.data;\n            return (areaList && areaList[`${type}_list`]) || {};\n        },\n        getList(type, code) {\n            if (type !== 'province' && !code) {\n                return [];\n            }\n            const { typeToColumnsPlaceholder } = this.data;\n            const list = this.getConfig(type);\n            let result = Object.keys(list).map((code) => ({\n                code,\n                name: list[code],\n            }));\n            if (code != null) {\n                // oversea code\n                if (code[0] === '9' && type === 'city') {\n                    code = '9';\n                }\n                result = result.filter((item) => item.code.indexOf(code) === 0);\n            }\n            if (typeToColumnsPlaceholder[type] && result.length) {\n                // set columns placeholder\n                const codeFill = type === 'province'\n                    ? ''\n                    : type === 'city'\n                        ? EMPTY_CODE.slice(2, 4)\n                        : EMPTY_CODE.slice(4, 6);\n                result.unshift({\n                    code: `${code}${codeFill}`,\n                    name: typeToColumnsPlaceholder[type],\n                });\n            }\n            return result;\n        },\n        getIndex(type, code) {\n            let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;\n            const list = this.getList(type, code.slice(0, compareNum - 2));\n            // oversea code\n            if (code[0] === '9' && type === 'province') {\n                compareNum = 1;\n            }\n            code = code.slice(0, compareNum);\n            for (let i = 0; i < list.length; i++) {\n                if (list[i].code.slice(0, compareNum) === code) {\n                    return i;\n                }\n            }\n            return 0;\n        },\n        setValues() {\n            const picker = this.getPicker();\n            if (!picker) {\n                return;\n            }\n            let code = this.code || this.getDefaultCode();\n            const provinceList = this.getList('province');\n            const cityList = this.getList('city', code.slice(0, 2));\n            const stack = [];\n            const indexes = [];\n            const { columnsNum } = this.data;\n            if (columnsNum >= 1) {\n                stack.push(picker.setColumnValues(0, provinceList, false));\n                indexes.push(this.getIndex('province', code));\n            }\n            if (columnsNum >= 2) {\n                stack.push(picker.setColumnValues(1, cityList, false));\n                indexes.push(this.getIndex('city', code));\n                if (cityList.length && code.slice(2, 4) === '00') {\n                    [{ code }] = cityList;\n                }\n            }\n            if (columnsNum === 3) {\n                stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false));\n                indexes.push(this.getIndex('county', code));\n            }\n            return Promise.all(stack)\n                .catch(() => { })\n                .then(() => picker.setIndexes(indexes))\n                .catch(() => { });\n        },\n        getDefaultCode() {\n            const { columnsPlaceholder } = this.data;\n            if (columnsPlaceholder.length) {\n                return EMPTY_CODE;\n            }\n            const countyCodes = Object.keys(this.getConfig('county'));\n            if (countyCodes[0]) {\n                return countyCodes[0];\n            }\n            const cityCodes = Object.keys(this.getConfig('city'));\n            if (cityCodes[0]) {\n                return cityCodes[0];\n            }\n            return '';\n        },\n        getValues() {\n            const picker = this.getPicker();\n            if (!picker) {\n                return [];\n            }\n            return this.parseValues(picker.getValues().filter((value) => !!value));\n        },\n        getDetail() {\n            const values = this.getValues();\n            const area = {\n                code: '',\n                country: '',\n                province: '',\n                city: '',\n                county: '',\n            };\n            if (!values.length) {\n                return area;\n            }\n            const names = values.map((item) => item.name);\n            area.code = values[values.length - 1].code;\n            if (area.code[0] === '9') {\n                area.country = names[1] || '';\n                area.province = names[2] || '';\n            }\n            else {\n                area.province = names[0] || '';\n                area.city = names[1] || '';\n                area.county = names[2] || '';\n            }\n            return area;\n        },\n        reset(code) {\n            this.code = code || '';\n            return this.setValues();\n        },\n    },\n});\n"
  },
  {
    "path": "dist/area/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-picker\": \"../picker/index\"\n  }\n}\n"
  },
  {
    "path": "dist/area/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-picker\n  class=\"van-area__picker\"\n  active-class=\"active-class\"\n  toolbar-class=\"toolbar-class\"\n  column-class=\"column-class\"\n  show-toolbar=\"{{ showToolbar }}\"\n  value-key=\"name\"\n  title=\"{{ title }}\"\n  loading=\"{{ loading }}\"\n  columns=\"{{ computed.displayColumns(columns, columnsNum) }}\"\n  item-height=\"{{ itemHeight }}\"\n  visible-item-count=\"{{ visibleItemCount }}\"\n  cancel-button-text=\"{{ cancelButtonText }}\"\n  confirm-button-text=\"{{ confirmButtonText }}\"\n  bind:change=\"onChange\"\n  bind:confirm=\"onConfirm\"\n  bind:cancel=\"onCancel\"\n/>\n"
  },
  {
    "path": "dist/area/index.wxs",
    "content": "/* eslint-disable */\nfunction displayColumns(columns, columnsNum) {\n  return columns.slice(0, +columnsNum);\n}\n\nmodule.exports = {\n  displayColumns: displayColumns,\n};\n"
  },
  {
    "path": "dist/area/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "dist/button/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/button/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\nimport { canIUseFormFieldButton } from '../common/version';\nconst mixins = [button];\nif (canIUseFormFieldButton()) {\n    mixins.push('wx://form-field-button');\n}\nVantComponent({\n    mixins,\n    classes: ['hover-class', 'loading-class'],\n    data: {\n        baseStyle: '',\n    },\n    props: {\n        formType: String,\n        icon: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        plain: Boolean,\n        block: Boolean,\n        round: Boolean,\n        square: Boolean,\n        loading: Boolean,\n        hairline: Boolean,\n        disabled: Boolean,\n        loadingText: String,\n        customStyle: String,\n        loadingType: {\n            type: String,\n            value: 'circular',\n        },\n        type: {\n            type: String,\n            value: 'default',\n        },\n        dataset: null,\n        size: {\n            type: String,\n            value: 'normal',\n        },\n        loadingSize: {\n            type: String,\n            value: '20px',\n        },\n        color: String,\n    },\n    methods: {\n        onClick(event) {\n            this.$emit('click', event);\n            const { canIUseGetUserProfile, openType, getUserProfileDesc, lang, } = this.data;\n            if (openType === 'getUserInfo' && canIUseGetUserProfile) {\n                wx.getUserProfile({\n                    desc: getUserProfileDesc || '  ',\n                    lang: lang || 'en',\n                    complete: (userProfile) => {\n                        this.$emit('getuserinfo', userProfile);\n                    },\n                });\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/button/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "dist/button/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<button\n  id=\"{{ id || buttonId }}\"\n  data-detail=\"{{ dataset }}\"\n  class=\"custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}\"\n  hover-class=\"{{ disabled || loading ? '' : 'van-button--active hover-class'}}\"\n  lang=\"{{ lang }}\"\n  form-type=\"{{ formType }}\"\n  style=\"{{ computed.rootStyle({ plain, color, customStyle }) }}\"\n  open-type=\"{{ disabled || loading || (canIUseGetUserProfile && openType === 'getUserInfo') ? '' : openType }}\"\n  business-id=\"{{ businessId }}\"\n  session-from=\"{{ sessionFrom }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  app-parameter=\"{{ appParameter }}\"\n  aria-label=\"{{ ariaLabel }}\"\n  bindtap=\"{{ disabled || loading ? '' : 'onClick' }}\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindcontact=\"onContact\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindgetrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n  bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n  binderror=\"onError\"\n  bindlaunchapp=\"onLaunchApp\"\n  bindopensetting=\"onOpenSetting\"\n  bindchooseavatar=\"onChooseAvatar\"\n>\n  <block wx:if=\"{{ loading }}\">\n    <van-loading\n      custom-class=\"loading-class\"\n      size=\"{{ loadingSize }}\"\n      type=\"{{ loadingType }}\"\n      color=\"{{ computed.loadingColor({ type, color, plain }) }}\"\n    />\n    <view wx:if=\"{{ loadingText }}\" class=\"van-button__loading-text\">\n      {{ loadingText }}\n    </view>\n  </block>\n  <block wx:else>\n    <van-icon\n      wx:if=\"{{ icon }}\"\n      size=\"1.2em\"\n      name=\"{{ icon }}\"\n      class-prefix=\"{{ classPrefix }}\"\n      class=\"van-button__icon\"\n      custom-style=\"line-height: inherit;\"\n    />\n    <view class=\"van-button__text\">\n      <slot />\n    </view>\n  </block>\n</button>\n"
  },
  {
    "path": "dist/button/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  if (!data.color) {\n    return data.customStyle;\n  }\n\n  var properties = {\n    color: data.plain ? data.color : '#fff',\n    background: data.plain ? null : data.color,\n  };\n\n  // hide border when color is linear-gradient\n  if (data.color.indexOf('gradient') !== -1) {\n    properties.border = 0;\n  } else {\n    properties['border-color'] = data.color;\n  }\n\n  return style([properties, data.customStyle]);\n}\n\nfunction loadingColor(data) {\n  if (data.plain) {\n    return data.color ? data.color : '#c9c9c9';\n  }\n\n  if (data.type === 'default') {\n    return '#c9c9c9';\n  }\n\n  return '#fff';\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  loadingColor: loadingColor,\n};\n"
  },
  {
    "path": "dist/button/index.wxss",
    "content": "@import '../common/index.wxss';.van-button{-webkit-text-size-adjust:100%;align-items:center;-webkit-appearance:none;border-radius:var(--button-border-radius,2px);box-sizing:border-box;display:inline-flex;font-size:var(--button-default-font-size,16px);height:var(--button-default-height,44px);justify-content:center;line-height:var(--button-line-height,20px);padding:0;position:relative;text-align:center;transition:opacity .2s;vertical-align:middle}.van-button:before{background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:\" \";height:100%;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{background:var(--button-default-background-color,#fff);border:var(--button-border-width,1px) solid var(--button-default-border-color,#ebedf0);color:var(--button-default-color,#323233)}.van-button--primary{background:var(--button-primary-background-color,#07c160);border:var(--button-border-width,1px) solid var(--button-primary-border-color,#07c160);color:var(--button-primary-color,#fff)}.van-button--info{background:var(--button-info-background-color,#1989fa);border:var(--button-border-width,1px) solid var(--button-info-border-color,#1989fa);color:var(--button-info-color,#fff)}.van-button--danger{background:var(--button-danger-background-color,#ee0a24);border:var(--button-border-width,1px) solid var(--button-danger-border-color,#ee0a24);color:var(--button-danger-color,#fff)}.van-button--warning{background:var(--button-warning-background-color,#ff976a);border:var(--button-border-width,1px) solid var(--button-warning-border-color,#ff976a);color:var(--button-warning-color,#fff)}.van-button--plain{background:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:var(--button-warning-background-color,#ff976a)}.van-button--large{height:var(--button-large-height,50px);width:100%}.van-button--normal{font-size:var(--button-normal-font-size,14px);padding:0 15px}.van-button--small{font-size:var(--button-small-font-size,12px);height:var(--button-small-height,30px);min-width:var(--button-small-min-width,60px);padding:0 var(--padding-xs,8px)}.van-button--mini{display:inline-block;font-size:var(--button-mini-font-size,10px);height:var(--button-mini-height,22px);min-width:var(--button-mini-min-width,50px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:flex;width:100%}.van-button--round{border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{line-height:inherit!important;min-width:1em;vertical-align:top}.van-button--hairline{border-width:0;padding-top:1px}.van-button--hairline:after{border-color:inherit;border-radius:calc(var(--button-border-radius, 2px)*2);border-width:1px}.van-button--hairline.van-button--round:after{border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}"
  },
  {
    "path": "dist/calendar/calendar.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<view class=\"van-calendar\">\n  <header\n    title=\"{{ title }}\"\n    showTitle=\"{{ showTitle }}\"\n    subtitle=\"{{ subtitle }}\"\n    showSubtitle=\"{{ showSubtitle }}\"\n    firstDayOfWeek=\"{{ firstDayOfWeek }}\"\n    bind:click-subtitle=\"onClickSubtitle\"\n  >\n    <slot name=\"title\" slot=\"title\"></slot>\n  </header>\n\n  <scroll-view\n    class=\"van-calendar__body\"\n    scroll-y\n    scroll-into-view=\"{{ scrollIntoView }}\"\n  >\n    <month\n      wx:for=\"{{ computed.getMonths(minDate, maxDate) }}\"\n      wx:key=\"index\"\n      id=\"month{{ index }}\"\n      class=\"month\"\n      data-date=\"{{ item }}\"\n      date=\"{{ item }}\"\n      type=\"{{ type }}\"\n      color=\"{{ color }}\"\n      minDate=\"{{ minDate }}\"\n      maxDate=\"{{ maxDate }}\"\n      showMark=\"{{ showMark }}\"\n      formatter=\"{{ formatter }}\"\n      rowHeight=\"{{ rowHeight }}\"\n      currentDate=\"{{ currentDate }}\"\n      showSubtitle=\"{{ showSubtitle }}\"\n      allowSameDay=\"{{ allowSameDay }}\"\n      showMonthTitle=\"{{ index !== 0 || !showSubtitle }}\"\n      firstDayOfWeek=\"{{ firstDayOfWeek }}\"\n      bind:click=\"onClickDay\"\n    />\n  </scroll-view>\n\n  <view\n    class=\"{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}\"\n  >\n    <slot name=\"footer\"></slot>\n  </view>\n\n  <view\n    class=\"{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}\"\n  >\n    <van-button\n      wx:if=\"{{ showConfirm }}\"\n      round\n      block\n      type=\"danger\"\n      color=\"{{ color }}\"\n      custom-class=\"van-calendar__confirm\"\n      disabled=\"{{ computed.getButtonDisabled(type, currentDate, minRange) }}\"\n      nativeType=\"text\"\n      bind:click=\"onConfirm\"\n    >\n      {{\n        computed.getButtonDisabled(type, currentDate, minRange)\n          ? confirmDisabledText\n          : confirmText\n      }}\n    </van-button>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/calendar/components/header/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/calendar/components/header/index.js",
    "content": "import { VantComponent } from '../../../common/component';\nVantComponent({\n    props: {\n        title: {\n            type: String,\n            value: '日期选择',\n        },\n        subtitle: String,\n        showTitle: Boolean,\n        showSubtitle: Boolean,\n        firstDayOfWeek: {\n            type: Number,\n            observer: 'initWeekDay',\n        },\n    },\n    data: {\n        weekdays: [],\n    },\n    created() {\n        this.initWeekDay();\n    },\n    methods: {\n        initWeekDay() {\n            const defaultWeeks = ['日', '一', '二', '三', '四', '五', '六'];\n            const firstDayOfWeek = this.data.firstDayOfWeek || 0;\n            this.setData({\n                weekdays: [\n                    ...defaultWeeks.slice(firstDayOfWeek, 7),\n                    ...defaultWeeks.slice(0, firstDayOfWeek),\n                ],\n            });\n        },\n        onClickSubtitle(event) {\n            this.$emit('click-subtitle', event);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/calendar/components/header/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/calendar/components/header/index.wxml",
    "content": "<view class=\"van-calendar__header\">\n  <block wx:if=\"{{ showTitle }}\">\n    <view class=\"van-calendar__header-title\"><slot name=\"title\"></slot></view>\n    <view class=\"van-calendar__header-title\">{{ title }}</view>\n  </block>\n\n  <view wx:if=\"{{ showSubtitle }}\" class=\"van-calendar__header-subtitle\" bind:tap=\"onClickSubtitle\">\n    {{ subtitle }}\n  </view>\n\n  <view class=\"van-calendar__weekdays\">\n    <view wx:for=\"{{ weekdays }}\" wx:key=\"index\" class=\"van-calendar__weekday\">\n      {{ item }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/calendar/components/header/index.wxss",
    "content": "@import '../../../common/index.wxss';.van-calendar__header{box-shadow:var(--calendar-header-box-shadow,0 2px 10px hsla(220,1%,50%,.16));flex-shrink:0}.van-calendar__header-subtitle,.van-calendar__header-title{font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.van-calendar__header-title+.van-calendar__header-title,.van-calendar__header-title:empty{display:none}.van-calendar__header-title:empty+.van-calendar__header-title{display:block!important}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--calendar-weekdays-font-size,12px);line-height:var(--calendar-weekdays-height,30px);text-align:center}"
  },
  {
    "path": "dist/calendar/components/month/index.d.ts",
    "content": "export interface Day {\n    date: Date;\n    type: string;\n    text: number;\n    bottomInfo?: string;\n}\n"
  },
  {
    "path": "dist/calendar/components/month/index.js",
    "content": "import { VantComponent } from '../../../common/component';\nimport { getMonthEndDay, compareDay, getPrevDay, getNextDay, } from '../../utils';\nVantComponent({\n    props: {\n        date: {\n            type: null,\n            observer: 'setDays',\n        },\n        type: {\n            type: String,\n            observer: 'setDays',\n        },\n        color: String,\n        minDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        maxDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        showMark: Boolean,\n        rowHeight: null,\n        formatter: {\n            type: null,\n            observer: 'setDays',\n        },\n        currentDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        firstDayOfWeek: {\n            type: Number,\n            observer: 'setDays',\n        },\n        allowSameDay: Boolean,\n        showSubtitle: Boolean,\n        showMonthTitle: Boolean,\n    },\n    data: {\n        visible: true,\n        days: [],\n    },\n    methods: {\n        onClick(event) {\n            const { index } = event.currentTarget.dataset;\n            const item = this.data.days[index];\n            if (item.type !== 'disabled') {\n                this.$emit('click', item);\n            }\n        },\n        setDays() {\n            const days = [];\n            const startDate = new Date(this.data.date);\n            const year = startDate.getFullYear();\n            const month = startDate.getMonth();\n            const totalDay = getMonthEndDay(startDate.getFullYear(), startDate.getMonth() + 1);\n            for (let day = 1; day <= totalDay; day++) {\n                const date = new Date(year, month, day);\n                const type = this.getDayType(date);\n                let config = {\n                    date,\n                    type,\n                    text: day,\n                    bottomInfo: this.getBottomInfo(type),\n                };\n                if (this.data.formatter) {\n                    config = this.data.formatter(config);\n                }\n                days.push(config);\n            }\n            this.setData({ days });\n        },\n        getMultipleDayType(day) {\n            const { currentDate } = this.data;\n            if (!Array.isArray(currentDate)) {\n                return '';\n            }\n            const isSelected = (date) => currentDate.some((item) => compareDay(item, date) === 0);\n            if (isSelected(day)) {\n                const prevDay = getPrevDay(day);\n                const nextDay = getNextDay(day);\n                const prevSelected = isSelected(prevDay);\n                const nextSelected = isSelected(nextDay);\n                if (prevSelected && nextSelected) {\n                    return 'multiple-middle';\n                }\n                if (prevSelected) {\n                    return 'end';\n                }\n                return nextSelected ? 'start' : 'multiple-selected';\n            }\n            return '';\n        },\n        getRangeDayType(day) {\n            const { currentDate, allowSameDay } = this.data;\n            if (!Array.isArray(currentDate)) {\n                return '';\n            }\n            const [startDay, endDay] = currentDate;\n            if (!startDay) {\n                return '';\n            }\n            const compareToStart = compareDay(day, startDay);\n            if (!endDay) {\n                return compareToStart === 0 ? 'start' : '';\n            }\n            const compareToEnd = compareDay(day, endDay);\n            if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) {\n                return 'start-end';\n            }\n            if (compareToStart === 0) {\n                return 'start';\n            }\n            if (compareToEnd === 0) {\n                return 'end';\n            }\n            if (compareToStart > 0 && compareToEnd < 0) {\n                return 'middle';\n            }\n            return '';\n        },\n        getDayType(day) {\n            const { type, minDate, maxDate, currentDate } = this.data;\n            if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) {\n                return 'disabled';\n            }\n            if (type === 'single') {\n                return compareDay(day, currentDate) === 0 ? 'selected' : '';\n            }\n            if (type === 'multiple') {\n                return this.getMultipleDayType(day);\n            }\n            /* istanbul ignore else */\n            if (type === 'range') {\n                return this.getRangeDayType(day);\n            }\n            return '';\n        },\n        getBottomInfo(type) {\n            if (this.data.type === 'range') {\n                if (type === 'start') {\n                    return '开始';\n                }\n                if (type === 'end') {\n                    return '结束';\n                }\n                if (type === 'start-end') {\n                    return '开始/结束';\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/calendar/components/month/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/calendar/components/month/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\"></wxs>\n<wxs src=\"../../../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-calendar__month\" style=\"{{ computed.getMonthStyle(visible, date, rowHeight) }}\">\n  <view wx:if=\"{{ showMonthTitle }}\" class=\"van-calendar__month-title\">\n    {{ computed.formatMonthTitle(date) }}\n  </view>\n\n  <view wx:if=\"{{ visible }}\" class=\"van-calendar__days\">\n    <view wx:if=\"{{ showMark }}\" class=\"van-calendar__month-mark\">\n      {{ computed.getMark(date) }}\n    </view>\n\n    <view\n      wx:for=\"{{ days }}\"\n      wx:key=\"index\"\n      style=\"{{ computed.getDayStyle(item.type, index, date, rowHeight, color, firstDayOfWeek) }}\"\n      class=\"{{ utils.bem('calendar__day', [item.type]) }} {{ item.className }}\"\n      data-index=\"{{ index }}\"\n      bindtap=\"onClick\"\n    >\n      <view wx:if=\"{{ item.type === 'selected' }}\" class=\"van-calendar__selected-day\" style=\"width: {{ rowHeight }}px; height: {{ rowHeight }}px; background: {{ color }}\">\n        <view wx:if=\"{{ item.topInfo }}\" class=\"van-calendar__top-info\">{{ item.topInfo }}</view>\n        {{ item.text }}\n        <view wx:if=\"{{ item.bottomInfo }}\" class=\"van-calendar__bottom-info\">\n          {{ item.bottomInfo }}\n        </view>\n      </view>\n\n      <view wx:else>\n        <view wx:if=\"{{ item.topInfo }}\" class=\"van-calendar__top-info\">{{ item.topInfo }}</view>\n        {{ item.text }}\n        <view wx:if=\"{{ item.bottomInfo }}\" class=\"van-calendar__bottom-info\">\n          {{ item.bottomInfo }}\n        </view>\n      </view>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/calendar/components/month/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../../utils.wxs');\n\nfunction getMark(date) {\n  return getDate(date).getMonth() + 1;\n}\n\nvar ROW_HEIGHT = 64;\n\nfunction getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {\n  var style = [];\n  var current = getDate(date).getDay() || 7;\n  var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) :\n               current === 7 && firstDayOfWeek === 0 ? 0 :\n               (current - firstDayOfWeek);\n\n  if (index === 0) {\n    style.push(['margin-left', (100 * offset) / 7 + '%']);\n  }\n\n  if (rowHeight !== ROW_HEIGHT) {\n    style.push(['height', rowHeight + 'px']);\n  }\n\n  if (color) {\n    if (\n      type === 'start' ||\n      type === 'end' ||\n      type === 'start-end' ||\n      type === 'multiple-selected' ||\n      type === 'multiple-middle'\n    ) {\n      style.push(['background', color]);\n    } else if (type === 'middle') {\n      style.push(['color', color]);\n    }\n  }\n\n  return style\n    .map(function(item) {\n      return item.join(':');\n    })\n    .join(';');\n}\n\nfunction formatMonthTitle(date) {\n  date = getDate(date);\n  return date.getFullYear() + '年' + (date.getMonth() + 1) + '月';\n}\n\nfunction getMonthStyle(visible, date, rowHeight) {\n  if (!visible) {\n    date = getDate(date);\n\n    var totalDay = utils.getMonthEndDay(\n      date.getFullYear(),\n      date.getMonth() + 1\n    );\n    var offset = getDate(date).getDay();\n    var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;\n\n    return 'padding-bottom:' + padding + 'px';\n  }\n}\n\nmodule.exports = {\n  getMark: getMark,\n  getDayStyle: getDayStyle,\n  formatMonthTitle: formatMonthTitle,\n  getMonthStyle: getMonthStyle\n};\n"
  },
  {
    "path": "dist/calendar/components/month/index.wxss",
    "content": "@import '../../../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:100%}.van-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.van-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{color:var(--calendar-month-mark-color,rgba(242,243,245,.8));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.van-calendar__day,.van-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.van-calendar__day{font-size:var(--calendar-day-font-size,16px);height:var(--calendar-day-height,64px);position:relative;width:14.285%}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#ee0a24);color:var(--calendar-range-edge-color,#fff)}.van-calendar__day--start{border-radius:4px 0 0 4px}.van-calendar__day--end{border-radius:0 4px 4px 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px}.van-calendar__day--middle{color:var(--calendar-range-middle-color,#ee0a24)}.van-calendar__day--middle:after{background-color:currentColor;bottom:0;content:\"\";left:0;opacity:var(--calendar-range-middle-background-opacity,.1);position:absolute;right:0;top:0}.van-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,54px);width:var(--calendar-selected-day-size,54px)}"
  },
  {
    "path": "dist/calendar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/calendar/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { ROW_HEIGHT, getPrevDay, getNextDay, getToday, compareDay, copyDates, calcDateNum, formatMonthTitle, compareMonth, getMonths, getDayByOffset, } from './utils';\nimport Toast from '../toast/toast';\nimport { requestAnimationFrame } from '../common/utils';\nconst initialMinDate = getToday().getTime();\nconst initialMaxDate = (() => {\n    const now = getToday();\n    return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()).getTime();\n})();\nconst getTime = (date) => date instanceof Date ? date.getTime() : date;\nVantComponent({\n    props: {\n        title: {\n            type: String,\n            value: '日期选择',\n        },\n        color: String,\n        show: {\n            type: Boolean,\n            observer(val) {\n                if (val) {\n                    this.initRect();\n                    this.scrollIntoView();\n                }\n            },\n        },\n        formatter: null,\n        confirmText: {\n            type: String,\n            value: '确定',\n        },\n        confirmDisabledText: {\n            type: String,\n            value: '确定',\n        },\n        rangePrompt: String,\n        showRangePrompt: {\n            type: Boolean,\n            value: true,\n        },\n        defaultDate: {\n            type: null,\n            value: getToday().getTime(),\n            observer(val) {\n                this.setData({ currentDate: val });\n                this.scrollIntoView();\n            },\n        },\n        allowSameDay: Boolean,\n        type: {\n            type: String,\n            value: 'single',\n            observer: 'reset',\n        },\n        minDate: {\n            type: Number,\n            value: initialMinDate,\n        },\n        maxDate: {\n            type: Number,\n            value: initialMaxDate,\n        },\n        position: {\n            type: String,\n            value: 'bottom',\n        },\n        rowHeight: {\n            type: null,\n            value: ROW_HEIGHT,\n        },\n        round: {\n            type: Boolean,\n            value: true,\n        },\n        poppable: {\n            type: Boolean,\n            value: true,\n        },\n        showMark: {\n            type: Boolean,\n            value: true,\n        },\n        showTitle: {\n            type: Boolean,\n            value: true,\n        },\n        showConfirm: {\n            type: Boolean,\n            value: true,\n        },\n        showSubtitle: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        maxRange: {\n            type: null,\n            value: null,\n        },\n        minRange: {\n            type: Number,\n            value: 1,\n        },\n        firstDayOfWeek: {\n            type: Number,\n            value: 0,\n        },\n        readonly: Boolean,\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        subtitle: '',\n        currentDate: null,\n        scrollIntoView: '',\n    },\n    watch: {\n        minDate() {\n            this.initRect();\n        },\n        maxDate() {\n            this.initRect();\n        },\n    },\n    created() {\n        this.setData({\n            currentDate: this.getInitialDate(this.data.defaultDate),\n        });\n    },\n    mounted() {\n        if (this.data.show || !this.data.poppable) {\n            this.initRect();\n            this.scrollIntoView();\n        }\n    },\n    methods: {\n        reset() {\n            this.setData({ currentDate: this.getInitialDate(this.data.defaultDate) });\n            this.scrollIntoView();\n        },\n        initRect() {\n            if (this.contentObserver != null) {\n                this.contentObserver.disconnect();\n            }\n            const contentObserver = this.createIntersectionObserver({\n                thresholds: [0, 0.1, 0.9, 1],\n                observeAll: true,\n            });\n            this.contentObserver = contentObserver;\n            contentObserver.relativeTo('.van-calendar__body');\n            contentObserver.observe('.month', (res) => {\n                if (res.boundingClientRect.top <= res.relativeRect.top) {\n                    // @ts-ignore\n                    this.setData({ subtitle: formatMonthTitle(res.dataset.date) });\n                }\n            });\n        },\n        limitDateRange(date, minDate = null, maxDate = null) {\n            minDate = minDate || this.data.minDate;\n            maxDate = maxDate || this.data.maxDate;\n            if (compareDay(date, minDate) === -1) {\n                return minDate;\n            }\n            if (compareDay(date, maxDate) === 1) {\n                return maxDate;\n            }\n            return date;\n        },\n        getInitialDate(defaultDate = null) {\n            const { type, minDate, maxDate, allowSameDay } = this.data;\n            if (!defaultDate)\n                return [];\n            const now = getToday().getTime();\n            if (type === 'range') {\n                if (!Array.isArray(defaultDate)) {\n                    defaultDate = [];\n                }\n                const [startDay, endDay] = defaultDate || [];\n                const startDate = getTime(startDay || now);\n                const start = this.limitDateRange(startDate, minDate, allowSameDay ? startDate : getPrevDay(new Date(maxDate)).getTime());\n                const date = getTime(endDay || now);\n                const end = this.limitDateRange(date, allowSameDay ? date : getNextDay(new Date(minDate)).getTime());\n                return [start, end];\n            }\n            if (type === 'multiple') {\n                if (Array.isArray(defaultDate)) {\n                    return defaultDate.map((date) => this.limitDateRange(date));\n                }\n                return [this.limitDateRange(now)];\n            }\n            if (!defaultDate || Array.isArray(defaultDate)) {\n                defaultDate = now;\n            }\n            return this.limitDateRange(defaultDate);\n        },\n        scrollIntoView() {\n            requestAnimationFrame(() => {\n                const { currentDate, type, show, poppable, minDate, maxDate } = this.data;\n                if (!currentDate)\n                    return;\n                // @ts-ignore\n                const targetDate = type === 'single' ? currentDate : currentDate[0];\n                const displayed = show || !poppable;\n                if (!targetDate || !displayed) {\n                    return;\n                }\n                const months = getMonths(minDate, maxDate);\n                months.some((month, index) => {\n                    if (compareMonth(month, targetDate) === 0) {\n                        this.setData({ scrollIntoView: `month${index}` });\n                        return true;\n                    }\n                    return false;\n                });\n            });\n        },\n        onOpen() {\n            this.$emit('open');\n        },\n        onOpened() {\n            this.$emit('opened');\n        },\n        onClose() {\n            this.$emit('close');\n        },\n        onClosed() {\n            this.$emit('closed');\n        },\n        onClickDay(event) {\n            if (this.data.readonly) {\n                return;\n            }\n            let { date } = event.detail;\n            const { type, currentDate, allowSameDay } = this.data;\n            if (type === 'range') {\n                // @ts-ignore\n                const [startDay, endDay] = currentDate;\n                if (startDay && !endDay) {\n                    const compareToStart = compareDay(date, startDay);\n                    if (compareToStart === 1) {\n                        const { days } = this.selectComponent('.month').data;\n                        days.some((day, index) => {\n                            const isDisabled = day.type === 'disabled' &&\n                                getTime(startDay) < getTime(day.date) &&\n                                getTime(day.date) < getTime(date);\n                            if (isDisabled) {\n                                ({ date } = days[index - 1]);\n                            }\n                            return isDisabled;\n                        });\n                        this.select([startDay, date], true);\n                    }\n                    else if (compareToStart === -1) {\n                        this.select([date, null]);\n                    }\n                    else if (allowSameDay) {\n                        this.select([date, date], true);\n                    }\n                }\n                else {\n                    this.select([date, null]);\n                }\n            }\n            else if (type === 'multiple') {\n                let selectedIndex;\n                // @ts-ignore\n                const selected = currentDate.some((dateItem, index) => {\n                    const equal = compareDay(dateItem, date) === 0;\n                    if (equal) {\n                        selectedIndex = index;\n                    }\n                    return equal;\n                });\n                if (selected) {\n                    // @ts-ignore\n                    const cancelDate = currentDate.splice(selectedIndex, 1);\n                    this.setData({ currentDate });\n                    this.unselect(cancelDate);\n                }\n                else {\n                    // @ts-ignore\n                    this.select([...currentDate, date]);\n                }\n            }\n            else {\n                this.select(date, true);\n            }\n        },\n        unselect(dateArray) {\n            const date = dateArray[0];\n            if (date) {\n                this.$emit('unselect', copyDates(date));\n            }\n        },\n        select(date, complete) {\n            if (complete && this.data.type === 'range') {\n                const valid = this.checkRange(date);\n                if (!valid) {\n                    // auto selected to max range if showConfirm\n                    if (this.data.showConfirm) {\n                        this.emit([\n                            date[0],\n                            getDayByOffset(date[0], this.data.maxRange - 1),\n                        ]);\n                    }\n                    else {\n                        this.emit(date);\n                    }\n                    return;\n                }\n            }\n            this.emit(date);\n            if (complete && !this.data.showConfirm) {\n                this.onConfirm();\n            }\n        },\n        emit(date) {\n            this.setData({\n                currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),\n            });\n            this.$emit('select', copyDates(date));\n        },\n        checkRange(date) {\n            const { maxRange, rangePrompt, showRangePrompt } = this.data;\n            if (maxRange && calcDateNum(date) > maxRange) {\n                if (showRangePrompt) {\n                    Toast({\n                        context: this,\n                        message: rangePrompt || `选择天数不能超过 ${maxRange} 天`,\n                    });\n                }\n                this.$emit('over-range');\n                return false;\n            }\n            return true;\n        },\n        onConfirm() {\n            if (this.data.type === 'range' &&\n                !this.checkRange(this.data.currentDate)) {\n                return;\n            }\n            wx.nextTick(() => {\n                // @ts-ignore\n                this.$emit('confirm', copyDates(this.data.currentDate));\n            });\n        },\n        onClickSubtitle(event) {\n            this.$emit('click-subtitle', event);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/calendar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"header\": \"./components/header/index\",\n    \"month\": \"./components/month/index\",\n    \"van-button\": \"../button/index\",\n    \"van-popup\": \"../popup/index\",\n    \"van-toast\": \"../toast/index\"\n  }\n}\n"
  },
  {
    "path": "dist/calendar/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<import src=\"./calendar.wxml\" />\n\n<van-popup\n  wx:if=\"{{ poppable }}\"\n  custom-class=\"van-calendar__popup--{{ position }}\"\n  close-icon-class=\"van-calendar__close-icon\"\n  show=\"{{ show }}\"\n  round=\"{{ round }}\"\n  position=\"{{ position }}\"\n  closeable=\"{{ showTitle || showSubtitle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:enter=\"onOpen\"\n  bind:close=\"onClose\"\n  bind:after-enter=\"onOpened\"\n  bind:after-leave=\"onClosed\"\n>\n  <include src=\"./calendar.wxml\" />\n</van-popup>\n\n<include wx:else src=\"./calendar.wxml\" />\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "dist/calendar/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('./utils.wxs');\n\nfunction getMonths(minDate, maxDate) {\n  var months = [];\n  var cursor = getDate(minDate);\n\n  cursor.setDate(1);\n\n  do {\n    months.push(cursor.getTime());\n    cursor.setMonth(cursor.getMonth() + 1);\n  } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);\n\n  return months;\n}\n\nfunction getButtonDisabled(type, currentDate, minRange) {\n  if (currentDate == null) {\n    return true;\n  }\n\n  if (type === 'range') {\n    return !currentDate[0] || !currentDate[1];\n  }\n\n  if (type === 'multiple') {\n    return currentDate.length < minRange;\n  }\n\n  return !currentDate;\n}\n\nmodule.exports = {\n  getMonths: getMonths,\n  getButtonDisabled: getButtonDisabled\n};\n"
  },
  {
    "path": "dist/calendar/index.wxss",
    "content": "@import '../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:var(--calendar-height,100%)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:var(--calendar-popup-height,90%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.van-calendar__footer{flex-shrink:0;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:var(--calendar-confirm-button-height,36px)!important;line-height:var(--calendar-confirm-button-line-height,34px)!important;margin:var(--calendar-confirm-button-margin,7px 0)!important}"
  },
  {
    "path": "dist/calendar/utils.d.ts",
    "content": "export declare const ROW_HEIGHT = 64;\nexport declare function formatMonthTitle(date: Date): string;\nexport declare function compareMonth(date1: Date | number, date2: Date | number): 0 | 1 | -1;\nexport declare function compareDay(day1: Date | number, day2: Date | number): 0 | 1 | -1;\nexport declare function getDayByOffset(date: Date, offset: number): Date;\nexport declare function getPrevDay(date: Date): Date;\nexport declare function getNextDay(date: Date): Date;\nexport declare function getToday(): Date;\nexport declare function calcDateNum(date: [Date, Date]): number;\nexport declare function copyDates(dates: Date | Date[]): Date | Date[];\nexport declare function getMonthEndDay(year: number, month: number): number;\nexport declare function getMonths(minDate: number, maxDate: number): number[];\n"
  },
  {
    "path": "dist/calendar/utils.js",
    "content": "export const ROW_HEIGHT = 64;\nexport function formatMonthTitle(date) {\n    if (!(date instanceof Date)) {\n        date = new Date(date);\n    }\n    return `${date.getFullYear()}年${date.getMonth() + 1}月`;\n}\nexport function compareMonth(date1, date2) {\n    if (!(date1 instanceof Date)) {\n        date1 = new Date(date1);\n    }\n    if (!(date2 instanceof Date)) {\n        date2 = new Date(date2);\n    }\n    const year1 = date1.getFullYear();\n    const year2 = date2.getFullYear();\n    const month1 = date1.getMonth();\n    const month2 = date2.getMonth();\n    if (year1 === year2) {\n        return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;\n    }\n    return year1 > year2 ? 1 : -1;\n}\nexport function compareDay(day1, day2) {\n    if (!(day1 instanceof Date)) {\n        day1 = new Date(day1);\n    }\n    if (!(day2 instanceof Date)) {\n        day2 = new Date(day2);\n    }\n    const compareMonthResult = compareMonth(day1, day2);\n    if (compareMonthResult === 0) {\n        const date1 = day1.getDate();\n        const date2 = day2.getDate();\n        return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;\n    }\n    return compareMonthResult;\n}\nexport function getDayByOffset(date, offset) {\n    date = new Date(date);\n    date.setDate(date.getDate() + offset);\n    return date;\n}\nexport function getPrevDay(date) {\n    return getDayByOffset(date, -1);\n}\nexport function getNextDay(date) {\n    return getDayByOffset(date, 1);\n}\nexport function getToday() {\n    const today = new Date();\n    today.setHours(0, 0, 0, 0);\n    return today;\n}\nexport function calcDateNum(date) {\n    const day1 = new Date(date[0]).getTime();\n    const day2 = new Date(date[1]).getTime();\n    return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;\n}\nexport function copyDates(dates) {\n    if (Array.isArray(dates)) {\n        return dates.map((date) => {\n            if (date === null) {\n                return date;\n            }\n            return new Date(date);\n        });\n    }\n    return new Date(dates);\n}\nexport function getMonthEndDay(year, month) {\n    return 32 - new Date(year, month - 1, 32).getDate();\n}\nexport function getMonths(minDate, maxDate) {\n    const months = [];\n    const cursor = new Date(minDate);\n    cursor.setDate(1);\n    do {\n        months.push(cursor.getTime());\n        cursor.setMonth(cursor.getMonth() + 1);\n    } while (compareMonth(cursor, maxDate) !== 1);\n    return months;\n}\n"
  },
  {
    "path": "dist/calendar/utils.wxs",
    "content": "/* eslint-disable */\nfunction getMonthEndDay(year, month) {\n  return 32 -  getDate(year, month - 1, 32).getDate();\n}\n\nfunction compareMonth(date1, date2) {\n  date1 = getDate(date1);\n  date2 = getDate(date2);\n\n  var year1 = date1.getFullYear();\n  var year2 = date2.getFullYear();\n  var month1 = date1.getMonth();\n  var month2 = date2.getMonth();\n\n  if (year1 === year2) {\n    return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;\n  }\n\n  return year1 > year2 ? 1 : -1;\n}\n\nmodule.exports = {\n  getMonthEndDay: getMonthEndDay,\n  compareMonth: compareMonth\n};\n"
  },
  {
    "path": "dist/card/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/card/index.js",
    "content": "import { link } from '../mixins/link';\nimport { VantComponent } from '../common/component';\nVantComponent({\n    classes: [\n        'num-class',\n        'desc-class',\n        'thumb-class',\n        'title-class',\n        'price-class',\n        'origin-price-class',\n    ],\n    mixins: [link],\n    props: {\n        tag: String,\n        num: String,\n        desc: String,\n        thumb: String,\n        title: String,\n        price: {\n            type: String,\n            observer: 'updatePrice',\n        },\n        centered: Boolean,\n        lazyLoad: Boolean,\n        thumbLink: String,\n        originPrice: String,\n        thumbMode: {\n            type: String,\n            value: 'aspectFit',\n        },\n        currency: {\n            type: String,\n            value: '¥',\n        },\n    },\n    methods: {\n        updatePrice() {\n            const { price } = this.data;\n            const priceArr = price.toString().split('.');\n            this.setData({\n                integerStr: priceArr[0],\n                decimalStr: priceArr[1] ? `.${priceArr[1]}` : '',\n            });\n        },\n        onClickThumb() {\n            this.jumpLink('thumbLink');\n        },\n    },\n});\n"
  },
  {
    "path": "dist/card/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tag\": \"../tag/index\"\n  }\n}\n"
  },
  {
    "path": "dist/card/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class van-card\">\n  <view class=\"{{ utils.bem('card__header', { center: centered }) }}\">\n    <view class=\"van-card__thumb\" bind:tap=\"onClickThumb\">\n      <image\n        wx:if=\"{{ thumb }}\"\n        src=\"{{ thumb }}\"\n        mode=\"{{ thumbMode }}\"\n        lazy-load=\"{{ lazyLoad }}\"\n        class=\"van-card__img thumb-class\"\n      />\n      <slot wx:else name=\"thumb\" />\n      <van-tag\n        wx:if=\"{{ tag }}\"\n        mark\n        type=\"danger\"\n        custom-class=\"van-card__tag\"\n      >\n        {{ tag }}\n      </van-tag>\n      <slot wx:else name=\"tag\" />\n    </view>\n\n    <view class=\"van-card__content {{ utils.bem('card__content', { center: centered }) }}\">\n      <view>\n        <view wx:if=\"{{ title }}\" class=\"van-card__title title-class\">{{ title }}</view>\n        <slot wx:else name=\"title\" />\n\n        <view wx:if=\"{{ desc }}\" class=\"van-card__desc desc-class\">{{ desc }}</view>\n        <slot wx:else name=\"desc\" />\n\n        <slot name=\"tags\" />\n      </view>\n\n      <view class=\"van-card__bottom\">\n        <slot name=\"price-top\" />\n        <view wx:if=\"{{ price || price === 0 }}\" class=\"van-card__price price-class\">\n          <text>{{ currency }}</text>\n          <text class=\"van-card__price-integer\">{{ integerStr }}</text>\n          <text class=\"van-card__price-decimal\">{{ decimalStr }}</text>\n        </view>\n        <slot wx:else name=\"price\" />\n        <view wx:if=\"{{ originPrice || originPrice === 0 }}\" class=\"van-card__origin-price origin-price-class\">{{ currency }} {{ originPrice }}</view>\n        <slot wx:else name=\"origin-price\" />\n        <view wx:if=\"{{ num }}\" class=\"van-card__num num-class\">x {{ num }}</view>\n        <slot wx:else  name=\"num\" />\n        <slot name=\"bottom\" />\n      </view>\n    </view>\n  </view>\n\n  <view class=\"van-card__footer\">\n    <slot name=\"footer\" />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/card/index.wxss",
    "content": "@import '../common/index.wxss';.van-card{background-color:var(--card-background-color,#fafafa);box-sizing:border-box;color:var(--card-text-color,#323233);font-size:var(--card-font-size,12px);padding:var(--card-padding,8px 16px);position:relative}.van-card__header{display:flex}.van-card__header--center{align-items:center;justify-content:center}.van-card__thumb{flex:none;height:var(--card-thumb-size,88px);margin-right:var(--padding-xs,8px);position:relative;width:var(--card-thumb-size,88px)}.van-card__thumb:empty{display:none}.van-card__img{border-radius:8px;height:100%;width:100%}.van-card__content{display:flex;flex:1;flex-direction:column;justify-content:space-between;min-height:var(--card-thumb-size,88px);min-width:0;position:relative}.van-card__content--center{justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{font-weight:700;line-height:var(--card-title-line-height,16px)}.van-card__desc{color:var(--card-desc-color,#646566);line-height:var(--card-desc-line-height,20px)}.van-card__bottom{line-height:20px}.van-card__price{color:var(--card-price-color,#ee0a24);display:inline-block;font-size:var(--card-price-font-size,12px);font-weight:700}.van-card__price-integer{font-size:var(--card-price-integer-font-size,16px)}.van-card__price-decimal,.van-card__price-integer{font-family:var(--card-price-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif)}.van-card__origin-price{color:var(--card-origin-price-color,#646566);display:inline-block;font-size:var(--card-origin-price-font-size,10px);margin-left:5px;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{left:0;position:absolute!important;top:2px}.van-card__footer{flex:none;text-align:right;width:100%}"
  },
  {
    "path": "dist/cascader/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/cascader/index.js",
    "content": "import { VantComponent } from '../common/component';\nvar FieldName;\n(function (FieldName) {\n    FieldName[\"TEXT\"] = \"text\";\n    FieldName[\"VALUE\"] = \"value\";\n    FieldName[\"CHILDREN\"] = \"children\";\n})(FieldName || (FieldName = {}));\nconst defaultFieldNames = {\n    text: FieldName.TEXT,\n    value: FieldName.VALUE,\n    children: FieldName.CHILDREN,\n};\nVantComponent({\n    props: {\n        title: String,\n        value: {\n            type: String,\n        },\n        placeholder: {\n            type: String,\n            value: '请选择',\n        },\n        activeColor: {\n            type: String,\n            value: '#1989fa',\n        },\n        options: {\n            type: Array,\n            value: [],\n        },\n        swipeable: {\n            type: Boolean,\n            value: false,\n        },\n        closeable: {\n            type: Boolean,\n            value: true,\n        },\n        ellipsis: {\n            type: Boolean,\n            value: true,\n        },\n        showHeader: {\n            type: Boolean,\n            value: true,\n        },\n        closeIcon: {\n            type: String,\n            value: 'cross',\n        },\n        fieldNames: {\n            type: Object,\n            value: defaultFieldNames,\n            observer: 'updateFieldNames',\n        },\n        useTitleSlot: Boolean,\n    },\n    data: {\n        tabs: [],\n        activeTab: 0,\n        textKey: FieldName.TEXT,\n        valueKey: FieldName.VALUE,\n        childrenKey: FieldName.CHILDREN,\n        innerValue: '',\n    },\n    watch: {\n        options() {\n            this.updateTabs();\n        },\n        value(newVal) {\n            this.updateValue(newVal);\n        },\n    },\n    created() {\n        this.updateTabs();\n    },\n    methods: {\n        updateValue(val) {\n            if (val !== undefined) {\n                const values = this.data.tabs.map((tab) => tab.selected && tab.selected[this.data.valueKey]);\n                if (values.indexOf(val) > -1) {\n                    return;\n                }\n            }\n            this.innerValue = val;\n            this.updateTabs();\n        },\n        updateFieldNames() {\n            const { text = 'text', value = 'value', children = 'children', } = this.data.fieldNames || defaultFieldNames;\n            this.setData({\n                textKey: text,\n                valueKey: value,\n                childrenKey: children,\n            });\n        },\n        getSelectedOptionsByValue(options, value) {\n            for (let i = 0; i < options.length; i++) {\n                const option = options[i];\n                if (option[this.data.valueKey] === value) {\n                    return [option];\n                }\n                if (option[this.data.childrenKey]) {\n                    const selectedOptions = this.getSelectedOptionsByValue(option[this.data.childrenKey], value);\n                    if (selectedOptions) {\n                        return [option, ...selectedOptions];\n                    }\n                }\n            }\n        },\n        updateTabs() {\n            const { options } = this.data;\n            const { innerValue } = this;\n            if (!options.length) {\n                return;\n            }\n            if (innerValue !== undefined) {\n                const selectedOptions = this.getSelectedOptionsByValue(options, innerValue);\n                if (selectedOptions) {\n                    let optionsCursor = options;\n                    const tabs = selectedOptions.map((option) => {\n                        const tab = {\n                            options: optionsCursor,\n                            selected: option,\n                        };\n                        const next = optionsCursor.find((item) => item[this.data.valueKey] === option[this.data.valueKey]);\n                        if (next) {\n                            optionsCursor = next[this.data.childrenKey];\n                        }\n                        return tab;\n                    });\n                    if (optionsCursor) {\n                        tabs.push({\n                            options: optionsCursor,\n                            selected: null,\n                        });\n                    }\n                    this.setData({\n                        tabs,\n                    });\n                    wx.nextTick(() => {\n                        this.setData({\n                            activeTab: tabs.length - 1,\n                        });\n                    });\n                    return;\n                }\n            }\n            this.setData({\n                tabs: [\n                    {\n                        options,\n                        selected: null,\n                    },\n                ],\n                activeTab: 0,\n            });\n        },\n        onClose() {\n            this.$emit('close');\n        },\n        onClickTab(e) {\n            const { index: tabIndex, title } = e.detail;\n            this.$emit('click-tab', { title, tabIndex });\n            this.setData({\n                activeTab: tabIndex,\n            });\n        },\n        // 选中\n        onSelect(e) {\n            const { option, tabIndex } = e.currentTarget.dataset;\n            if (option && option.disabled) {\n                return;\n            }\n            const { valueKey, childrenKey } = this.data;\n            let { tabs } = this.data;\n            tabs[tabIndex].selected = option;\n            if (tabs.length > tabIndex + 1) {\n                tabs = tabs.slice(0, tabIndex + 1);\n            }\n            if (option[childrenKey]) {\n                const nextTab = {\n                    options: option[childrenKey],\n                    selected: null,\n                };\n                if (tabs[tabIndex + 1]) {\n                    tabs[tabIndex + 1] = nextTab;\n                }\n                else {\n                    tabs.push(nextTab);\n                }\n                wx.nextTick(() => {\n                    this.setData({\n                        activeTab: tabIndex + 1,\n                    });\n                });\n            }\n            this.setData({\n                tabs,\n            });\n            const selectedOptions = tabs.map((tab) => tab.selected).filter(Boolean);\n            const value = option[valueKey];\n            const params = {\n                value,\n                tabIndex,\n                selectedOptions,\n            };\n            this.innerValue = value;\n            this.$emit('change', params);\n            if (!option[childrenKey]) {\n                this.$emit('finish', params);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/cascader/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-tab\":  \"../tab/index\",\n    \"van-tabs\": \"../tabs/index\"\n  }\n}"
  },
  {
    "path": "dist/cascader/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"utils\" />\n\n<view wx:if=\"{{ showHeader }}\" class=\"van-cascader__header\">\n  <slot name=\"title\" wx:if=\"{{ useTitleSlot }}\"></slot>\n  <text class=\"van-cascader__title\" wx:else>{{ title }}</text>\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"{{ closeIcon }}\"\n    class=\"van-cascader__close-icon\"\n    bind:tap=\"onClose\"\n  />\n</view>\n\n<van-tabs\n  active=\"{{ activeTab }}\"\n  custom-class=\"van-cascader__tabs\"\n  wrap-class=\"van-cascader__tabs-wrap\"\n  tab-class=\"van-cascader__tab\"\n  color=\"{{ activeColor }}\"\n  border=\"{{ false }}\"\n  swipeable=\"{{ swipeable }}\"\n  ellipsis=\"{{ ellipsis }}\"\n  bind:click=\"onClickTab\"\n>\n  <van-tab\n    wx:for=\"{{ tabs }}\"\n    wx:for-item=\"tab\"\n    wx:for-index=\"tabIndex\"\n    wx:key=\"tabIndex\"\n    title=\"{{ tab.selected ? tab.selected[textKey] : placeholder }}\"\n    style=\"width: 100%;\"\n    title-style=\"{{ !tab.selected ? 'color: #969799;font-weight:normal;' : '' }}\"\n  >\n    <!-- 暂不支持 -->\n    <!-- <slot name=\"options-top\"></slot> -->\n\n    <view class=\"van-cascader__options\">\n      <view\n        wx:for=\"{{ tab.options }}\"\n        wx:for-item=\"option\"\n        wx:key=\"index\"\n        class=\"{{ option.className }} {{ utils.optionClass(tab, valueKey, option) }}\"\n        style=\"{{ utils.optionStyle({ tab, valueKey, option, activeColor }) }}\"\n        data-option=\"{{ option }}\"\n        data-tab-index=\"{{ tabIndex }}\"\n        bind:tap=\"onSelect\"\n      >\n        <text>{{ option[textKey] }}</text>\n        <van-icon wx:if=\"{{ utils.isSelected(tab, valueKey, option) }}\" name=\"success\" size=\"18\" />\n      </view>\n    </view>\n    <!-- 暂不支持 -->\n    <!-- <slot name=\"options-bottom\"></slot> -->\n  </van-tab>\n</van-tabs>\n"
  },
  {
    "path": "dist/cascader/index.wxs",
    "content": "var utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction isSelected(tab, valueKey, option) {\n  return tab.selected && tab.selected[valueKey] === option[valueKey]\n}\n\nfunction optionClass(tab, valueKey, option) {\n  return utils.bem('cascader__option', { selected: isSelected(tab, valueKey, option), disabled: option.disabled })\n}\n\nfunction optionStyle(data) {\n  var color = data.option.color || (isSelected(data.tab, data.valueKey, data.option) ? data.activeColor : undefined);\n  return style({\n    color\n  });\n}\n\n\nmodule.exports = {\n  isSelected: isSelected,\n  optionClass: optionClass,\n  optionStyle: optionStyle,\n};"
  },
  {
    "path": "dist/cascader/index.wxss",
    "content": "@import '../common/index.wxss';.van-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.van-cascader__title{font-size:16px;font-weight:600;line-height:20px}.van-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.van-cascader__tabs-wrap{height:48px!important;padding:0 8px}.van-cascader__tab{color:#323233!important;flex:none!important;font-weight:600!important;padding:0 8px!important}.van-cascader__tab--unselected{color:#969799!important;font-weight:400!important}.van-cascader__option{align-items:center;cursor:pointer;display:flex;font-size:14px;justify-content:space-between;line-height:20px;padding:10px 16px}.van-cascader__option:active{background-color:#f2f3f5}.van-cascader__option--selected{color:#1989fa;font-weight:600}.van-cascader__option--disabled{color:#c8c9cc;cursor:not-allowed}.van-cascader__option--disabled:active{background-color:initial}.van-cascader__options{-webkit-overflow-scrolling:touch;box-sizing:border-box;height:384px;overflow-y:auto;padding-top:6px}"
  },
  {
    "path": "dist/cell/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/cell/index.js",
    "content": "import { link } from '../mixins/link';\nimport { VantComponent } from '../common/component';\nVantComponent({\n    classes: [\n        'title-class',\n        'label-class',\n        'value-class',\n        'right-icon-class',\n        'hover-class',\n    ],\n    mixins: [link],\n    props: {\n        title: null,\n        value: null,\n        icon: String,\n        size: String,\n        label: String,\n        center: Boolean,\n        isLink: Boolean,\n        required: Boolean,\n        clickable: Boolean,\n        titleWidth: String,\n        customStyle: String,\n        arrowDirection: String,\n        useLabelSlot: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        titleStyle: String,\n    },\n    methods: {\n        onClick(event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "dist/cell/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/cell/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('cell', [size, { center, required, borderless: !border, clickable: isLink || clickable }]) }}\"\n  hover-class=\"van-cell--hover hover-class\"\n  hover-stay-time=\"70\"\n  style=\"{{ customStyle }}\"\n  bind:tap=\"onClick\"\n>\n  <van-icon\n    wx:if=\"{{ icon }}\"\n    name=\"{{ icon }}\"\n    class=\"van-cell__left-icon-wrap\"\n    custom-class=\"van-cell__left-icon\"\n  />\n  <slot wx:else name=\"icon\" />\n\n  <view\n    style=\"{{ computed.titleStyle({ titleWidth, titleStyle }) }}\"\n    class=\"van-cell__title title-class\"\n  >\n\n    <block wx:if=\"{{ title }}\">{{ title }}</block>\n    <slot wx:else name=\"title\" />\n\n    <view wx:if=\"{{ label || useLabelSlot }}\" class=\"van-cell__label label-class\">\n      <slot wx:if=\"{{ useLabelSlot }}\" name=\"label\" />\n      <block wx:elif=\"{{ label }}\">{{ label }}</block>\n    </view>\n  </view>\n\n  <view class=\"van-cell__value value-class\">\n    <block wx:if=\"{{ value || value === 0 }}\">{{ value }}</block>\n    <slot wx:else />\n  </view>\n\n  <van-icon\n    wx:if=\"{{ isLink }}\"\n    name=\"{{ arrowDirection ? 'arrow' + '-' + arrowDirection : 'arrow' }}\"\n    class=\"van-cell__right-icon-wrap right-icon-class\"\n    custom-class=\"van-cell__right-icon\"\n  />\n  <slot wx:else name=\"right-icon\" />\n\n  <slot name=\"extra\" />\n</view>\n"
  },
  {
    "path": "dist/cell/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction titleStyle(data) {\n  return style([\n    {\n      'max-width': addUnit(data.titleWidth),\n      'min-width': addUnit(data.titleWidth),\n    },\n    data.titleStyle,\n  ]);\n}\n\nmodule.exports = {\n  titleStyle: titleStyle,\n};\n"
  },
  {
    "path": "dist/cell/index.wxss",
    "content": "@import '../common/index.wxss';.van-cell{background-color:var(--cell-background-color,#fff);box-sizing:border-box;color:var(--cell-text-color,#323233);display:flex;font-size:var(--cell-font-size,14px);line-height:var(--cell-line-height,24px);padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);position:relative;width:100%}.van-cell:after{border-bottom:1px solid #ebedf0;bottom:0;box-sizing:border-box;content:\" \";left:16px;pointer-events:none;position:absolute;right:16px;transform:scaleY(.5);transform-origin:center}.van-cell--borderless:after{display:none}.van-cell-group{background-color:var(--cell-background-color,#fff)}.van-cell__label{color:var(--cell-label-color,#969799);font-size:var(--cell-label-font-size,12px);line-height:var(--cell-label-line-height,18px);margin-top:var(--cell-label-margin-top,3px)}.van-cell__value{color:var(--cell-value-color,#969799);overflow:hidden;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{align-items:center;display:flex;font-size:var(--cell-icon-size,16px);height:var(--cell-line-height,24px)}.van-cell__left-icon-wrap{margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{color:var(--cell-right-icon-color,#969799);margin-left:var(--padding-base,4px)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{color:var(--cell-required-color,#ee0a24);content:\"*\";font-size:var(--cell-font-size,14px);left:var(--padding-xs,8px);position:absolute}.van-cell--center{align-items:center}.van-cell--large{padding-bottom:var(--cell-large-vertical-padding,12px);padding-top:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:var(--cell-large-label-font-size,14px)}"
  },
  {
    "path": "dist/cell-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/cell-group/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        title: String,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        inset: Boolean,\n    },\n});\n"
  },
  {
    "path": "dist/cell-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/cell-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ title }}\"\n  class=\"{{ utils.bem('cell-group__title', { inset }) }}\"\n>\n  {{ title }}\n</view>\n<view class=\"custom-class {{ utils.bem('cell-group', { inset }) }} {{ border ? 'van-hairline--top-bottom' : '' }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/cell-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-cell-group--inset{border-radius:var(--cell-group-inset-border-radius,8px);margin:var(--cell-group-inset-padding,0 16px);overflow:hidden}.van-cell-group__title{color:var(--cell-group-title-color,#969799);font-size:var(--cell-group-title-font-size,14px);line-height:var(--cell-group-title-line-height,16px);padding:var(--cell-group-title-padding,16px 16px 8px)}.van-cell-group__title--inset{padding:var(--cell-group-inset-title-padding,16px 16px 8px 32px)}"
  },
  {
    "path": "dist/checkbox/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/checkbox/index.js",
    "content": "import { useParent } from '../common/relation';\nimport { VantComponent } from '../common/component';\nfunction emit(target, value) {\n    target.$emit('input', value);\n    target.$emit('change', value);\n}\nVantComponent({\n    field: true,\n    relation: useParent('checkbox-group'),\n    classes: ['icon-class', 'label-class'],\n    props: {\n        value: Boolean,\n        disabled: Boolean,\n        useIconSlot: Boolean,\n        checkedColor: String,\n        labelPosition: {\n            type: String,\n            value: 'right',\n        },\n        labelDisabled: Boolean,\n        shape: {\n            type: String,\n            value: 'round',\n        },\n        iconSize: {\n            type: null,\n            value: 20,\n        },\n    },\n    data: {\n        parentDisabled: false,\n        direction: 'vertical',\n    },\n    methods: {\n        emitChange(value) {\n            if (this.parent) {\n                this.setParentValue(this.parent, value);\n            }\n            else {\n                emit(this, value);\n            }\n        },\n        toggle() {\n            const { parentDisabled, disabled, value } = this.data;\n            if (!disabled && !parentDisabled) {\n                this.emitChange(!value);\n            }\n        },\n        onClickLabel() {\n            const { labelDisabled, parentDisabled, disabled, value } = this.data;\n            if (!disabled && !labelDisabled && !parentDisabled) {\n                this.emitChange(!value);\n            }\n        },\n        setParentValue(parent, value) {\n            const parentValue = parent.data.value.slice();\n            const { name } = this.data;\n            const { max } = parent.data;\n            if (value) {\n                if (max && parentValue.length >= max) {\n                    return;\n                }\n                if (parentValue.indexOf(name) === -1) {\n                    parentValue.push(name);\n                    emit(parent, parentValue);\n                }\n            }\n            else {\n                const index = parentValue.indexOf(name);\n                if (index !== -1) {\n                    parentValue.splice(index, 1);\n                    emit(parent, parentValue);\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/checkbox/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/checkbox/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('checkbox', [{ horizontal: direction === 'horizontal' }]) }} custom-class\">\n  <view\n    wx:if=\"{{ labelPosition === 'left' }}\"\n    class=\"label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n  <view class=\"van-checkbox__icon-wrap\" bindtap=\"toggle\">\n    <slot wx:if=\"{{ useIconSlot }}\" name=\"icon\" />\n    <van-icon\n      wx:else\n      name=\"success\"\n      size=\"0.8em\"\n      class=\"{{ utils.bem('checkbox__icon', [shape, { disabled: disabled || parentDisabled, checked: value }]) }}\"\n      style=\"{{ computed.iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) }}\"\n      custom-class=\"icon-class\"\n      custom-style=\"line-height: 1.25em;\"\n    />\n  </view>\n  <view\n    wx:if=\"{{ labelPosition === 'right' }}\"\n    class=\"label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/checkbox/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {\n  var styles = {\n    'font-size': addUnit(iconSize),\n  };\n\n  if (checkedColor && value && !disabled && !parentDisabled) {\n    styles['border-color'] = checkedColor;\n    styles['background-color'] = checkedColor;\n  }\n\n  return style(styles);\n}\n\nmodule.exports = {\n  iconStyle: iconStyle,\n};\n"
  },
  {
    "path": "dist/checkbox/index.wxss",
    "content": "@import '../common/index.wxss';.van-checkbox{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{flex:none}.van-checkbox__icon{align-items:center;border:1px solid var(--checkbox-border-color,#c8c9cc);box-sizing:border-box;color:transparent;display:flex;font-size:var(--checkbox-size,20px);height:1em;justify-content:center;text-align:center;transition-duration:var(--checkbox-transition-duration,.2s);transition-property:color,border-color,background-color;width:1em}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:var(--checkbox-checked-icon-color,#1989fa);color:#fff}.van-checkbox__icon--disabled{background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;color:var(--checkbox-label-color,#323233);padding-left:var(--checkbox-label-margin,10px)}.van-checkbox__label--left{float:left;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}"
  },
  {
    "path": "dist/checkbox-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/checkbox-group/index.js",
    "content": "import { useChildren } from '../common/relation';\nimport { VantComponent } from '../common/component';\nVantComponent({\n    field: true,\n    relation: useChildren('checkbox', function (target) {\n        this.updateChild(target);\n    }),\n    props: {\n        max: Number,\n        value: {\n            type: Array,\n            observer: 'updateChildren',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        direction: {\n            type: String,\n            value: 'vertical',\n        },\n    },\n    methods: {\n        updateChildren() {\n            this.children.forEach((child) => this.updateChild(child));\n        },\n        updateChild(child) {\n            const { value, disabled, direction } = this.data;\n            child.setData({\n                value: value.indexOf(child.data.name) !== -1,\n                parentDisabled: disabled,\n                direction,\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/checkbox-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/checkbox-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"{{ utils.bem('checkbox-group', [{ horizontal: direction === 'horizontal' }]) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/checkbox-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}"
  },
  {
    "path": "dist/circle/canvas.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ntype CanvasContext = WechatMiniprogram.CanvasContext;\nexport declare function adaptor(ctx: CanvasContext & Record<string, unknown>): CanvasContext;\nexport {};\n"
  },
  {
    "path": "dist/circle/canvas.js",
    "content": "export function adaptor(ctx) {\n    // @ts-ignore\n    return Object.assign(ctx, {\n        setStrokeStyle(val) {\n            ctx.strokeStyle = val;\n        },\n        setLineWidth(val) {\n            ctx.lineWidth = val;\n        },\n        setLineCap(val) {\n            ctx.lineCap = val;\n        },\n        setFillStyle(val) {\n            ctx.fillStyle = val;\n        },\n        setFontSize(val) {\n            ctx.font = String(val);\n        },\n        setGlobalAlpha(val) {\n            ctx.globalAlpha = val;\n        },\n        setLineJoin(val) {\n            ctx.lineJoin = val;\n        },\n        setTextAlign(val) {\n            ctx.textAlign = val;\n        },\n        setMiterLimit(val) {\n            ctx.miterLimit = val;\n        },\n        setShadow(offsetX, offsetY, blur, color) {\n            ctx.shadowOffsetX = offsetX;\n            ctx.shadowOffsetY = offsetY;\n            ctx.shadowBlur = blur;\n            ctx.shadowColor = color;\n        },\n        setTextBaseline(val) {\n            ctx.textBaseline = val;\n        },\n        createCircularGradient() { },\n        draw() { },\n    });\n}\n"
  },
  {
    "path": "dist/circle/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/circle/index.js",
    "content": "import { BLUE, WHITE } from '../common/color';\nimport { VantComponent } from '../common/component';\nimport { getSystemInfoSync } from '../common/utils';\nimport { isObj } from '../common/validator';\nimport { canIUseCanvas2d } from '../common/version';\nimport { adaptor } from './canvas';\nfunction format(rate) {\n    return Math.min(Math.max(rate, 0), 100);\n}\nconst PERIMETER = 2 * Math.PI;\nconst BEGIN_ANGLE = -Math.PI / 2;\nconst STEP = 1;\nVantComponent({\n    props: {\n        text: String,\n        lineCap: {\n            type: String,\n            value: 'round',\n        },\n        value: {\n            type: Number,\n            value: 0,\n            observer: 'reRender',\n        },\n        speed: {\n            type: Number,\n            value: 50,\n        },\n        size: {\n            type: Number,\n            value: 100,\n            observer() {\n                this.drawCircle(this.currentValue);\n            },\n        },\n        fill: String,\n        layerColor: {\n            type: String,\n            value: WHITE,\n        },\n        color: {\n            type: null,\n            value: BLUE,\n            observer() {\n                this.setHoverColor().then(() => {\n                    this.drawCircle(this.currentValue);\n                });\n            },\n        },\n        type: {\n            type: String,\n            value: '',\n        },\n        strokeWidth: {\n            type: Number,\n            value: 4,\n        },\n        clockwise: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        hoverColor: BLUE,\n    },\n    methods: {\n        getContext() {\n            const { type, size } = this.data;\n            if (type === '' || !canIUseCanvas2d()) {\n                const ctx = wx.createCanvasContext('van-circle', this);\n                return Promise.resolve(ctx);\n            }\n            const dpr = getSystemInfoSync().pixelRatio;\n            return new Promise((resolve) => {\n                wx.createSelectorQuery()\n                    .in(this)\n                    .select('#van-circle')\n                    .node()\n                    .exec((res) => {\n                    const canvas = res[0].node;\n                    const ctx = canvas.getContext(type);\n                    if (!this.inited) {\n                        this.inited = true;\n                        canvas.width = size * dpr;\n                        canvas.height = size * dpr;\n                        ctx.scale(dpr, dpr);\n                    }\n                    resolve(adaptor(ctx));\n                });\n            });\n        },\n        setHoverColor() {\n            const { color, size } = this.data;\n            if (isObj(color)) {\n                return this.getContext().then((context) => {\n                    if (!context)\n                        return;\n                    const LinearColor = context.createLinearGradient(size, 0, 0, 0);\n                    Object.keys(color)\n                        .sort((a, b) => parseFloat(a) - parseFloat(b))\n                        .map((key) => LinearColor.addColorStop(parseFloat(key) / 100, color[key]));\n                    this.hoverColor = LinearColor;\n                });\n            }\n            this.hoverColor = color;\n            return Promise.resolve();\n        },\n        presetCanvas(context, strokeStyle, beginAngle, endAngle, fill) {\n            const { strokeWidth, lineCap, clockwise, size } = this.data;\n            const position = size / 2;\n            const radius = position - strokeWidth / 2;\n            context.setStrokeStyle(strokeStyle);\n            context.setLineWidth(strokeWidth);\n            context.setLineCap(lineCap);\n            context.beginPath();\n            context.arc(position, position, radius, beginAngle, endAngle, !clockwise);\n            context.stroke();\n            if (fill) {\n                context.setFillStyle(fill);\n                context.fill();\n            }\n        },\n        renderLayerCircle(context) {\n            const { layerColor, fill } = this.data;\n            this.presetCanvas(context, layerColor, 0, PERIMETER, fill);\n        },\n        renderHoverCircle(context, formatValue) {\n            const { clockwise } = this.data;\n            // 结束角度\n            const progress = PERIMETER * (formatValue / 100);\n            const endAngle = clockwise\n                ? BEGIN_ANGLE + progress\n                : 3 * Math.PI - (BEGIN_ANGLE + progress);\n            this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle);\n        },\n        drawCircle(currentValue) {\n            const { size } = this.data;\n            this.getContext().then((context) => {\n                if (!context)\n                    return;\n                context.clearRect(0, 0, size, size);\n                this.renderLayerCircle(context);\n                const formatValue = format(currentValue);\n                if (formatValue !== 0) {\n                    this.renderHoverCircle(context, formatValue);\n                }\n                context.draw();\n            });\n        },\n        reRender() {\n            // tofector 动画暂时没有想到好的解决方案\n            const { value, speed } = this.data;\n            if (speed <= 0 || speed > 1000) {\n                this.drawCircle(value);\n                return;\n            }\n            this.clearMockInterval();\n            this.currentValue = this.currentValue || 0;\n            const run = () => {\n                this.interval = setTimeout(() => {\n                    if (this.currentValue !== value) {\n                        if (Math.abs(this.currentValue - value) < STEP) {\n                            this.currentValue = value;\n                        }\n                        else if (this.currentValue < value) {\n                            this.currentValue += STEP;\n                        }\n                        else {\n                            this.currentValue -= STEP;\n                        }\n                        this.drawCircle(this.currentValue);\n                        run();\n                    }\n                    else {\n                        this.clearMockInterval();\n                    }\n                }, 1000 / speed);\n            };\n            run();\n        },\n        clearMockInterval() {\n            if (this.interval) {\n                clearTimeout(this.interval);\n                this.interval = null;\n            }\n        },\n    },\n    mounted() {\n        this.currentValue = this.data.value;\n        this.setHoverColor().then(() => {\n            this.drawCircle(this.currentValue);\n        });\n    },\n    destroyed() {\n        this.clearMockInterval();\n    },\n});\n"
  },
  {
    "path": "dist/circle/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/circle/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-circle\">\n  <canvas class=\"van-circle__canvas\" type=\"{{ type }}\" style=\"width: {{ utils.addUnit(size) }};height:{{ utils.addUnit(size) }}\" id=\"van-circle\" canvas-id=\"van-circle\"></canvas>\n  <view wx:if=\"{{ !text }}\" class=\"van-circle__text\">\n    <slot></slot>\n  </view>\n  <cover-view wx:else class=\"van-circle__text\">{{ text }}</cover-view>\n</view>\n"
  },
  {
    "path": "dist/circle/index.wxss",
    "content": "@import '../common/index.wxss';.van-circle{display:inline-block;position:relative;text-align:center}.van-circle__text{color:var(--circle-text-color,#323233);left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%}"
  },
  {
    "path": "dist/col/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/col/index.js",
    "content": "import { useParent } from '../common/relation';\nimport { VantComponent } from '../common/component';\nVantComponent({\n    relation: useParent('row'),\n    props: {\n        span: Number,\n        offset: Number,\n    },\n});\n"
  },
  {
    "path": "dist/col/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/col/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('col', [span]) }} {{ offset ? 'van-col--offset-' + offset : '' }}\"\n  style=\"{{ computed.rootStyle({ gutter }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/col/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  if (!data.gutter) {\n    return '';\n  }\n\n  return style({\n    'padding-right': addUnit(data.gutter / 2),\n    'padding-left': addUnit(data.gutter / 2),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "dist/col/index.wxss",
    "content": "@import '../common/index.wxss';.van-col{box-sizing:border-box;float:left}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}"
  },
  {
    "path": "dist/collapse/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/collapse/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nVantComponent({\n    relation: useChildren('collapse-item'),\n    props: {\n        value: {\n            type: null,\n            observer: 'updateExpanded',\n        },\n        accordion: {\n            type: Boolean,\n            observer: 'updateExpanded',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    methods: {\n        updateExpanded() {\n            this.children.forEach((child) => {\n                child.updateExpanded();\n            });\n        },\n        switch(name, expanded) {\n            const { accordion, value } = this.data;\n            const changeItem = name;\n            if (!accordion) {\n                name = expanded\n                    ? (value || []).concat(name)\n                    : (value || []).filter((activeName) => activeName !== name);\n            }\n            else {\n                name = expanded ? name : '';\n            }\n            if (expanded) {\n                this.$emit('open', changeItem);\n            }\n            else {\n                this.$emit('close', changeItem);\n            }\n            this.$emit('change', name);\n            this.$emit('input', name);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/collapse/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/collapse/index.wxml",
    "content": "<view class=\"custom-class van-collapse {{ border ? 'van-hairline--top-bottom' : '' }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/collapse/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "dist/collapse-item/animate.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nexport declare function setContentAnimate(context: WechatMiniprogram.Component.TrivialInstance, expanded: boolean, mounted: boolean): void;\n"
  },
  {
    "path": "dist/collapse-item/animate.js",
    "content": "import { getRect } from '../common/utils';\nfunction useAnimation(context, expanded, mounted, height) {\n    const animation = wx.createAnimation({\n        duration: 0,\n        timingFunction: 'ease-in-out',\n    });\n    if (expanded) {\n        if (height === 0) {\n            animation.height('auto').top(1).step();\n        }\n        else {\n            animation\n                .height(height)\n                .top(1)\n                .step({\n                duration: mounted ? 300 : 1,\n            })\n                .height('auto')\n                .step();\n        }\n        context.setData({\n            animation: animation.export(),\n        });\n        return;\n    }\n    animation.height(height).top(0).step({ duration: 1 }).height(0).step({\n        duration: 300,\n    });\n    context.setData({\n        animation: animation.export(),\n    });\n}\nexport function setContentAnimate(context, expanded, mounted) {\n    getRect(context, '.van-collapse-item__content')\n        .then((rect) => rect.height)\n        .then((height) => {\n        useAnimation(context, expanded, mounted, height);\n    });\n}\n"
  },
  {
    "path": "dist/collapse-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/collapse-item/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nimport { setContentAnimate } from './animate';\nVantComponent({\n    classes: ['title-class', 'content-class'],\n    relation: useParent('collapse'),\n    props: {\n        size: String,\n        name: null,\n        title: null,\n        value: null,\n        icon: String,\n        label: String,\n        disabled: Boolean,\n        clickable: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        isLink: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        expanded: false,\n        parentBorder: true,\n    },\n    mounted() {\n        this.updateExpanded();\n        this.mounted = true;\n    },\n    methods: {\n        updateExpanded() {\n            if (!this.parent) {\n                return;\n            }\n            const { value, accordion, border } = this.parent.data;\n            const { children = [] } = this.parent;\n            const { name } = this.data;\n            const index = children.indexOf(this);\n            const currentName = name == null ? index : name;\n            const expanded = accordion\n                ? value === currentName\n                : (value || []).some((name) => name === currentName);\n            if (expanded !== this.data.expanded) {\n                setContentAnimate(this, expanded, this.mounted);\n            }\n            this.setData({ index, expanded, parentBorder: border });\n        },\n        onClick() {\n            if (this.data.disabled) {\n                return;\n            }\n            const { name, expanded } = this.data;\n            const index = this.parent.children.indexOf(this);\n            const currentName = name == null ? index : name;\n            this.parent.switch(currentName, !expanded);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/collapse-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\"\n  }\n}\n"
  },
  {
    "path": "dist/collapse-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-collapse-item custom-class {{ index !== 0 && parentBorder ? 'van-hairline--top' : '' }}\">\n  <van-cell\n    size=\"{{ size }}\"\n    title=\"{{ title }}\"\n    title-class=\"title-class\"\n    icon=\"{{ icon }}\"\n    value=\"{{ value }}\"\n    label=\"{{ label }}\"\n    is-link=\"{{ isLink }}\"\n    clickable=\"{{ clickable }}\"\n    border=\"{{ border && expanded }}\"\n    class=\"{{ utils.bem('collapse-item__title', { disabled, expanded }) }}\"\n    right-icon-class=\"van-cell__right-icon\"\n    custom-class=\"van-cell\"\n    hover-class=\"van-cell--hover\"\n    bind:click=\"onClick\"\n  >\n    <slot\n      name=\"title\"\n      slot=\"title\"\n    />\n    <slot\n      name=\"icon\"\n      slot=\"icon\"\n    />\n    <slot name=\"value\" />\n    <slot\n      name=\"right-icon\"\n      slot=\"right-icon\"\n    />\n  </van-cell>\n  <view\n    class=\"{{ utils.bem('collapse-item__wrapper') }}\"\n    style=\"height: 0;\"\n    animation=\"{{ animation }}\"\n  >\n    <view\n      class=\"van-collapse-item__content content-class\"\n    >\n      <slot />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/collapse-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{transform:rotate(90deg);transition:transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{background-color:var(--collapse-item-content-background-color,#fff);color:var(--collapse-item-content-text-color,#969799);font-size:var(--collapse-item-content-font-size,13px);line-height:var(--collapse-item-content-line-height,1.5);padding:var(--collapse-item-content-padding,15px)}"
  },
  {
    "path": "dist/common/color.d.ts",
    "content": "export declare const RED = \"#ee0a24\";\nexport declare const BLUE = \"#1989fa\";\nexport declare const WHITE = \"#fff\";\nexport declare const GREEN = \"#07c160\";\nexport declare const ORANGE = \"#ff976a\";\nexport declare const GRAY = \"#323233\";\nexport declare const GRAY_DARK = \"#969799\";\n"
  },
  {
    "path": "dist/common/color.js",
    "content": "export const RED = '#ee0a24';\nexport const BLUE = '#1989fa';\nexport const WHITE = '#fff';\nexport const GREEN = '#07c160';\nexport const ORANGE = '#ff976a';\nexport const GRAY = '#323233';\nexport const GRAY_DARK = '#969799';\n"
  },
  {
    "path": "dist/common/component.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nimport { VantComponentOptions } from 'definitions/index';\ndeclare function VantComponent<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption>(vantOptions: VantComponentOptions<Data, Props, Methods>): void;\nexport { VantComponent };\n"
  },
  {
    "path": "dist/common/component.js",
    "content": "import { basic } from '../mixins/basic';\nfunction mapKeys(source, target, map) {\n    Object.keys(map).forEach((key) => {\n        if (source[key]) {\n            target[map[key]] = source[key];\n        }\n    });\n}\nfunction VantComponent(vantOptions) {\n    const options = {};\n    mapKeys(vantOptions, options, {\n        data: 'data',\n        props: 'properties',\n        watch: 'observers',\n        mixins: 'behaviors',\n        methods: 'methods',\n        beforeCreate: 'created',\n        created: 'attached',\n        mounted: 'ready',\n        destroyed: 'detached',\n        classes: 'externalClasses',\n    });\n    // add default externalClasses\n    options.externalClasses = options.externalClasses || [];\n    options.externalClasses.push('custom-class');\n    // add default behaviors\n    options.behaviors = options.behaviors || [];\n    options.behaviors.push(basic);\n    // add relations\n    const { relation } = vantOptions;\n    if (relation) {\n        options.relations = relation.relations;\n        options.behaviors.push(relation.mixin);\n    }\n    // map field to form-field behavior\n    if (vantOptions.field) {\n        options.behaviors.push('wx://form-field');\n    }\n    // add default options\n    options.options = {\n        multipleSlots: true,\n        addGlobalClass: true,\n    };\n    Component(options);\n}\nexport { VantComponent };\n"
  },
  {
    "path": "dist/common/index.wxss",
    "content": ".van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{clear:both;content:\"\";display:table}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:\" \";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}"
  },
  {
    "path": "dist/common/relation.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ntype TrivialInstance = WechatMiniprogram.Component.TrivialInstance;\nexport declare function useParent(name: string, onEffect?: (this: TrivialInstance) => void): {\n    relations: {\n        [x: string]: WechatMiniprogram.Component.RelationOption;\n    };\n    mixin: string;\n};\nexport declare function useChildren(name: string, onEffect?: (this: TrivialInstance, target: TrivialInstance) => void): {\n    relations: {\n        [x: string]: WechatMiniprogram.Component.RelationOption;\n    };\n    mixin: string;\n};\nexport {};\n"
  },
  {
    "path": "dist/common/relation.js",
    "content": "export function useParent(name, onEffect) {\n    const path = `../${name}/index`;\n    return {\n        relations: {\n            [path]: {\n                type: 'ancestor',\n                linked() {\n                    onEffect && onEffect.call(this);\n                },\n                linkChanged() {\n                    onEffect && onEffect.call(this);\n                },\n                unlinked() {\n                    onEffect && onEffect.call(this);\n                },\n            },\n        },\n        mixin: Behavior({\n            created() {\n                Object.defineProperty(this, 'parent', {\n                    get: () => this.getRelationNodes(path)[0],\n                });\n                Object.defineProperty(this, 'index', {\n                    // @ts-ignore\n                    get: () => { var _a, _b; return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.indexOf(this); },\n                });\n            },\n        }),\n    };\n}\nexport function useChildren(name, onEffect) {\n    const path = `../${name}/index`;\n    return {\n        relations: {\n            [path]: {\n                type: 'descendant',\n                linked(target) {\n                    onEffect && onEffect.call(this, target);\n                },\n                linkChanged(target) {\n                    onEffect && onEffect.call(this, target);\n                },\n                unlinked(target) {\n                    onEffect && onEffect.call(this, target);\n                },\n            },\n        },\n        mixin: Behavior({\n            created() {\n                Object.defineProperty(this, 'children', {\n                    get: () => this.getRelationNodes(path) || [],\n                });\n            },\n        }),\n    };\n}\n"
  },
  {
    "path": "dist/common/style/clearfix.wxss",
    "content": ".van-clearfix:after{clear:both;content:\"\";display:table}"
  },
  {
    "path": "dist/common/style/ellipsis.wxss",
    "content": ".van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3}"
  },
  {
    "path": "dist/common/style/hairline.wxss",
    "content": ".van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:\" \";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}"
  },
  {
    "path": "dist/common/style/mixins/clearfix.wxss",
    "content": ""
  },
  {
    "path": "dist/common/style/mixins/ellipsis.wxss",
    "content": ""
  },
  {
    "path": "dist/common/style/mixins/hairline.wxss",
    "content": ""
  },
  {
    "path": "dist/common/style/var.wxss",
    "content": ""
  },
  {
    "path": "dist/common/utils.d.ts",
    "content": "/// <reference types=\"node\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\nexport { isDef } from './validator';\nexport { getSystemInfoSync } from './version';\nexport declare function range(num: number, min: number, max: number): number;\nexport declare function nextTick(cb: (...args: any[]) => void): void;\nexport declare function addUnit(value?: string | number): string | undefined;\nexport declare function requestAnimationFrame(cb: () => void): NodeJS.Timeout;\nexport declare function pickExclude(obj: unknown, keys: string[]): {};\nexport declare function getRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;\nexport declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;\nexport declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void;\nexport declare function toPromise(promiseLike: Promise<unknown> | unknown): Promise<unknown>;\nexport declare function addNumber(num1: any, num2: any): number;\nexport declare const clamp: (num: any, min: any, max: any) => number;\nexport declare function getCurrentPage<T>(): T & WechatMiniprogram.OptionalInterface<WechatMiniprogram.Page.ILifetime> & WechatMiniprogram.Page.InstanceProperties & WechatMiniprogram.Page.InstanceMethods<WechatMiniprogram.IAnyObject> & WechatMiniprogram.Page.Data<WechatMiniprogram.IAnyObject> & WechatMiniprogram.IAnyObject;\nexport declare const isPC: boolean;\nexport declare const isWxWork: boolean;\n"
  },
  {
    "path": "dist/common/utils.js",
    "content": "import { isDef, isNumber, isPlainObject, isPromise } from './validator';\nimport { canIUseGroupSetData, canIUseNextTick, getSystemInfoSync, } from './version';\nexport { isDef } from './validator';\nexport { getSystemInfoSync } from './version';\nexport function range(num, min, max) {\n    return Math.min(Math.max(num, min), max);\n}\nexport function nextTick(cb) {\n    if (canIUseNextTick()) {\n        wx.nextTick(cb);\n    }\n    else {\n        setTimeout(() => {\n            cb();\n        }, 1000 / 30);\n    }\n}\nexport function addUnit(value) {\n    if (!isDef(value)) {\n        return undefined;\n    }\n    value = String(value);\n    return isNumber(value) ? `${value}px` : value;\n}\nexport function requestAnimationFrame(cb) {\n    return setTimeout(() => {\n        cb();\n    }, 1000 / 30);\n}\nexport function pickExclude(obj, keys) {\n    if (!isPlainObject(obj)) {\n        return {};\n    }\n    return Object.keys(obj).reduce((prev, key) => {\n        if (!keys.includes(key)) {\n            prev[key] = obj[key];\n        }\n        return prev;\n    }, {});\n}\nexport function getRect(context, selector) {\n    return new Promise((resolve) => {\n        wx.createSelectorQuery()\n            .in(context)\n            .select(selector)\n            .boundingClientRect()\n            .exec((rect = []) => resolve(rect[0]));\n    });\n}\nexport function getAllRect(context, selector) {\n    return new Promise((resolve) => {\n        wx.createSelectorQuery()\n            .in(context)\n            .selectAll(selector)\n            .boundingClientRect()\n            .exec((rect = []) => resolve(rect[0]));\n    });\n}\nexport function groupSetData(context, cb) {\n    if (canIUseGroupSetData()) {\n        context.groupSetData(cb);\n    }\n    else {\n        cb();\n    }\n}\nexport function toPromise(promiseLike) {\n    if (isPromise(promiseLike)) {\n        return promiseLike;\n    }\n    return Promise.resolve(promiseLike);\n}\n// 浮点数精度处理\nexport function addNumber(num1, num2) {\n    const cardinal = Math.pow(10, 10);\n    return Math.round((num1 + num2) * cardinal) / cardinal;\n}\n// 限制value在[min, max]之间\nexport const clamp = (num, min, max) => Math.min(Math.max(num, min), max);\nexport function getCurrentPage() {\n    const pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nexport const isPC = ['mac', 'windows'].includes(getSystemInfoSync().platform);\n// 是否企业微信\nexport const isWxWork = getSystemInfoSync().environment === 'wxwork';\n"
  },
  {
    "path": "dist/common/validator.d.ts",
    "content": "export declare function isFunction(val: unknown): val is Function;\nexport declare function isPlainObject(val: unknown): val is Record<string, unknown>;\nexport declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;\nexport declare function isDef(value: unknown): boolean;\nexport declare function isObj(x: unknown): x is Record<string, unknown>;\nexport declare function isNumber(value: string): boolean;\nexport declare function isBoolean(value: unknown): value is boolean;\nexport declare function isImageUrl(url: string): boolean;\nexport declare function isVideoUrl(url: string): boolean;\n"
  },
  {
    "path": "dist/common/validator.js",
    "content": "// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(val) {\n    return typeof val === 'function';\n}\nexport function isPlainObject(val) {\n    return val !== null && typeof val === 'object' && !Array.isArray(val);\n}\nexport function isPromise(val) {\n    return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch);\n}\nexport function isDef(value) {\n    return value !== undefined && value !== null;\n}\nexport function isObj(x) {\n    const type = typeof x;\n    return x !== null && (type === 'object' || type === 'function');\n}\nexport function isNumber(value) {\n    return /^\\d+(\\.\\d+)?$/.test(value);\n}\nexport function isBoolean(value) {\n    return typeof value === 'boolean';\n}\nconst IMAGE_REGEXP = /\\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;\nconst VIDEO_REGEXP = /\\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i;\nexport function isImageUrl(url) {\n    return IMAGE_REGEXP.test(url);\n}\nexport function isVideoUrl(url) {\n    return VIDEO_REGEXP.test(url);\n}\n"
  },
  {
    "path": "dist/common/version.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ninterface WxWorkSystemInfo extends WechatMiniprogram.SystemInfo {\n    environment?: 'wxwork';\n}\ninterface SystemInfo extends WxWorkSystemInfo, WechatMiniprogram.SystemInfo {\n}\nexport declare function getSystemInfoSync(): SystemInfo;\nexport declare function canIUseModel(): boolean;\nexport declare function canIUseFormFieldButton(): boolean;\nexport declare function canIUseAnimate(): boolean;\nexport declare function canIUseGroupSetData(): boolean;\nexport declare function canIUseNextTick(): boolean;\nexport declare function canIUseCanvas2d(): boolean;\nexport declare function canIUseGetUserProfile(): boolean;\nexport {};\n"
  },
  {
    "path": "dist/common/version.js",
    "content": "let systemInfo;\nexport function getSystemInfoSync() {\n    if (systemInfo == null) {\n        systemInfo = wx.getSystemInfoSync();\n    }\n    return systemInfo;\n}\nfunction compareVersion(v1, v2) {\n    v1 = v1.split('.');\n    v2 = v2.split('.');\n    const len = Math.max(v1.length, v2.length);\n    while (v1.length < len) {\n        v1.push('0');\n    }\n    while (v2.length < len) {\n        v2.push('0');\n    }\n    for (let i = 0; i < len; i++) {\n        const num1 = parseInt(v1[i], 10);\n        const num2 = parseInt(v2[i], 10);\n        if (num1 > num2) {\n            return 1;\n        }\n        if (num1 < num2) {\n            return -1;\n        }\n    }\n    return 0;\n}\nfunction gte(version) {\n    const system = getSystemInfoSync();\n    return compareVersion(system.SDKVersion, version) >= 0;\n}\nexport function canIUseModel() {\n    return gte('2.9.3');\n}\nexport function canIUseFormFieldButton() {\n    return gte('2.10.3');\n}\nexport function canIUseAnimate() {\n    return gte('2.9.0');\n}\nexport function canIUseGroupSetData() {\n    return gte('2.4.0');\n}\nexport function canIUseNextTick() {\n    try {\n        return wx.canIUse('nextTick');\n    }\n    catch (e) {\n        return gte('2.7.1');\n    }\n}\nexport function canIUseCanvas2d() {\n    return gte('2.9.0');\n}\nexport function canIUseGetUserProfile() {\n    return !!wx.getUserProfile;\n}\n"
  },
  {
    "path": "dist/config-provider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/config-provider/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        themeVars: {\n            type: Object,\n            value: {},\n        },\n    },\n});\n"
  },
  {
    "path": "dist/config-provider/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/config-provider/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-config-provider\" style=\"{{ computed.mapThemeVarsToCSSVars(themeVars) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/config-provider/index.wxs",
    "content": "/* eslint-disable */\nvar object = require('../wxs/object.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction kebabCase(word) {\n  var newWord = word\n    .replace(getRegExp(\"[A-Z]\", 'g'), function (i) {\n      return '-' + i;\n    })\n    .toLowerCase()\n    .replace(getRegExp(\"^-\"), '');\n\n  return newWord;\n}\n\nfunction mapThemeVarsToCSSVars(themeVars) {\n  var cssVars = {};\n  object.keys(themeVars).forEach(function (key) {\n    var cssVarsKey = '--' + kebabCase(key);\n    cssVars[cssVarsKey] = themeVars[key];\n  });\n\n  return style(cssVars);\n}\n\nmodule.exports = {\n  kebabCase: kebabCase,\n  mapThemeVarsToCSSVars: mapThemeVarsToCSSVars,\n};\n"
  },
  {
    "path": "dist/count-down/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/count-down/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { isSameSecond, parseFormat, parseTimeData } from './utils';\nfunction simpleTick(fn) {\n    return setTimeout(fn, 30);\n}\nVantComponent({\n    props: {\n        useSlot: Boolean,\n        millisecond: Boolean,\n        time: {\n            type: Number,\n            observer: 'reset',\n        },\n        format: {\n            type: String,\n            value: 'HH:mm:ss',\n        },\n        autoStart: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        timeData: parseTimeData(0),\n        formattedTime: '0',\n    },\n    destroyed() {\n        clearTimeout(this.tid);\n        this.tid = null;\n    },\n    methods: {\n        // 开始\n        start() {\n            if (this.counting) {\n                return;\n            }\n            this.counting = true;\n            this.endTime = Date.now() + this.remain;\n            this.tick();\n        },\n        // 暂停\n        pause() {\n            this.counting = false;\n            clearTimeout(this.tid);\n        },\n        // 重置\n        reset() {\n            this.pause();\n            this.remain = this.data.time;\n            this.setRemain(this.remain);\n            if (this.data.autoStart) {\n                this.start();\n            }\n        },\n        tick() {\n            if (this.data.millisecond) {\n                this.microTick();\n            }\n            else {\n                this.macroTick();\n            }\n        },\n        microTick() {\n            this.tid = simpleTick(() => {\n                this.setRemain(this.getRemain());\n                if (this.remain !== 0) {\n                    this.microTick();\n                }\n            });\n        },\n        macroTick() {\n            this.tid = simpleTick(() => {\n                const remain = this.getRemain();\n                if (!isSameSecond(remain, this.remain) || remain === 0) {\n                    this.setRemain(remain);\n                }\n                if (this.remain !== 0) {\n                    this.macroTick();\n                }\n            });\n        },\n        getRemain() {\n            return Math.max(this.endTime - Date.now(), 0);\n        },\n        setRemain(remain) {\n            this.remain = remain;\n            const timeData = parseTimeData(remain);\n            if (this.data.useSlot) {\n                this.$emit('change', timeData);\n            }\n            this.setData({\n                formattedTime: parseFormat(this.data.format, timeData),\n            });\n            if (remain === 0) {\n                this.pause();\n                this.$emit('finish');\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/count-down/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/count-down/index.wxml",
    "content": "<view class=\"van-count-down\">\n  <slot wx:if=\"{{ useSlot }}\"/>\n  <block wx:else>{{ formattedTime }}</block>\n</view>\n"
  },
  {
    "path": "dist/count-down/index.wxss",
    "content": "@import '../common/index.wxss';.van-count-down{color:var(--count-down-text-color,#323233);font-size:var(--count-down-font-size,14px);line-height:var(--count-down-line-height,20px)}"
  },
  {
    "path": "dist/count-down/utils.d.ts",
    "content": "export type TimeData = {\n    days: number;\n    hours: number;\n    minutes: number;\n    seconds: number;\n    milliseconds: number;\n};\nexport declare function parseTimeData(time: number): TimeData;\nexport declare function parseFormat(format: string, timeData: TimeData): string;\nexport declare function isSameSecond(time1: number, time2: number): boolean;\n"
  },
  {
    "path": "dist/count-down/utils.js",
    "content": "function padZero(num, targetLength = 2) {\n    let str = num + '';\n    while (str.length < targetLength) {\n        str = '0' + str;\n    }\n    return str;\n}\nconst SECOND = 1000;\nconst MINUTE = 60 * SECOND;\nconst HOUR = 60 * MINUTE;\nconst DAY = 24 * HOUR;\nexport function parseTimeData(time) {\n    const days = Math.floor(time / DAY);\n    const hours = Math.floor((time % DAY) / HOUR);\n    const minutes = Math.floor((time % HOUR) / MINUTE);\n    const seconds = Math.floor((time % MINUTE) / SECOND);\n    const milliseconds = Math.floor(time % SECOND);\n    return {\n        days,\n        hours,\n        minutes,\n        seconds,\n        milliseconds,\n    };\n}\nexport function parseFormat(format, timeData) {\n    const { days } = timeData;\n    let { hours, minutes, seconds, milliseconds } = timeData;\n    if (format.indexOf('DD') === -1) {\n        hours += days * 24;\n    }\n    else {\n        format = format.replace('DD', padZero(days));\n    }\n    if (format.indexOf('HH') === -1) {\n        minutes += hours * 60;\n    }\n    else {\n        format = format.replace('HH', padZero(hours));\n    }\n    if (format.indexOf('mm') === -1) {\n        seconds += minutes * 60;\n    }\n    else {\n        format = format.replace('mm', padZero(minutes));\n    }\n    if (format.indexOf('ss') === -1) {\n        milliseconds += seconds * 1000;\n    }\n    else {\n        format = format.replace('ss', padZero(seconds));\n    }\n    return format.replace('SSS', padZero(milliseconds, 3));\n}\nexport function isSameSecond(time1, time2) {\n    return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);\n}\n"
  },
  {
    "path": "dist/datetime-picker/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/datetime-picker/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { isDef } from '../common/validator';\nimport { pickerProps } from '../picker/shared';\nconst currentYear = new Date().getFullYear();\nfunction isValidDate(date) {\n    return isDef(date) && !isNaN(new Date(date).getTime());\n}\nfunction range(num, min, max) {\n    return Math.min(Math.max(num, min), max);\n}\nfunction padZero(val) {\n    return `00${val}`.slice(-2);\n}\nfunction times(n, iteratee) {\n    let index = -1;\n    const result = Array(n < 0 ? 0 : n);\n    while (++index < n) {\n        result[index] = iteratee(index);\n    }\n    return result;\n}\nfunction getTrueValue(formattedValue) {\n    if (formattedValue === undefined) {\n        formattedValue = '1';\n    }\n    while (isNaN(parseInt(formattedValue, 10))) {\n        formattedValue = formattedValue.slice(1);\n    }\n    return parseInt(formattedValue, 10);\n}\nfunction getMonthEndDay(year, month) {\n    return 32 - new Date(year, month - 1, 32).getDate();\n}\nconst defaultFormatter = (type, value) => value;\nVantComponent({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: Object.assign(Object.assign({}, pickerProps), { value: {\n            type: null,\n            observer: 'updateValue',\n        }, filter: null, type: {\n            type: String,\n            value: 'datetime',\n            observer: 'updateValue',\n        }, showToolbar: {\n            type: Boolean,\n            value: true,\n        }, formatter: {\n            type: null,\n            value: defaultFormatter,\n        }, minDate: {\n            type: Number,\n            value: new Date(currentYear - 10, 0, 1).getTime(),\n            observer: 'updateValue',\n        }, maxDate: {\n            type: Number,\n            value: new Date(currentYear + 10, 11, 31).getTime(),\n            observer: 'updateValue',\n        }, minHour: {\n            type: Number,\n            value: 0,\n            observer: 'updateValue',\n        }, maxHour: {\n            type: Number,\n            value: 23,\n            observer: 'updateValue',\n        }, minMinute: {\n            type: Number,\n            value: 0,\n            observer: 'updateValue',\n        }, maxMinute: {\n            type: Number,\n            value: 59,\n            observer: 'updateValue',\n        } }),\n    data: {\n        innerValue: Date.now(),\n        columns: [],\n    },\n    methods: {\n        updateValue() {\n            const { data } = this;\n            const val = this.correctValue(data.value);\n            const isEqual = val === data.innerValue;\n            this.updateColumnValue(val).then(() => {\n                if (!isEqual) {\n                    this.$emit('input', val);\n                }\n            });\n        },\n        getPicker() {\n            if (this.picker == null) {\n                this.picker = this.selectComponent('.van-datetime-picker');\n                const { picker } = this;\n                const { setColumnValues } = picker;\n                picker.setColumnValues = (...args) => setColumnValues.apply(picker, [...args, false]);\n            }\n            return this.picker;\n        },\n        updateColumns() {\n            const { formatter = defaultFormatter } = this.data;\n            const results = this.getOriginColumns().map((column) => ({\n                values: column.values.map((value) => formatter(column.type, value)),\n            }));\n            return this.set({ columns: results });\n        },\n        getOriginColumns() {\n            const { filter } = this.data;\n            const results = this.getRanges().map(({ type, range }) => {\n                let values = times(range[1] - range[0] + 1, (index) => {\n                    const value = range[0] + index;\n                    return type === 'year' ? `${value}` : padZero(value);\n                });\n                if (filter) {\n                    values = filter(type, values);\n                }\n                return { type, values };\n            });\n            return results;\n        },\n        getRanges() {\n            const { data } = this;\n            if (data.type === 'time') {\n                return [\n                    {\n                        type: 'hour',\n                        range: [data.minHour, data.maxHour],\n                    },\n                    {\n                        type: 'minute',\n                        range: [data.minMinute, data.maxMinute],\n                    },\n                ];\n            }\n            const { maxYear, maxDate, maxMonth, maxHour, maxMinute, } = this.getBoundary('max', data.innerValue);\n            const { minYear, minDate, minMonth, minHour, minMinute, } = this.getBoundary('min', data.innerValue);\n            const result = [\n                {\n                    type: 'year',\n                    range: [minYear, maxYear],\n                },\n                {\n                    type: 'month',\n                    range: [minMonth, maxMonth],\n                },\n                {\n                    type: 'day',\n                    range: [minDate, maxDate],\n                },\n                {\n                    type: 'hour',\n                    range: [minHour, maxHour],\n                },\n                {\n                    type: 'minute',\n                    range: [minMinute, maxMinute],\n                },\n            ];\n            if (data.type === 'date')\n                result.splice(3, 2);\n            if (data.type === 'year-month')\n                result.splice(2, 3);\n            return result;\n        },\n        correctValue(value) {\n            const { data } = this;\n            // validate value\n            const isDateType = data.type !== 'time';\n            if (isDateType && !isValidDate(value)) {\n                value = data.minDate;\n            }\n            else if (!isDateType && !value) {\n                const { minHour } = data;\n                value = `${padZero(minHour)}:00`;\n            }\n            // time type\n            if (!isDateType) {\n                let [hour, minute] = value.split(':');\n                hour = padZero(range(hour, data.minHour, data.maxHour));\n                minute = padZero(range(minute, data.minMinute, data.maxMinute));\n                return `${hour}:${minute}`;\n            }\n            // date type\n            value = Math.max(value, data.minDate);\n            value = Math.min(value, data.maxDate);\n            return value;\n        },\n        getBoundary(type, innerValue) {\n            const value = new Date(innerValue);\n            const boundary = new Date(this.data[`${type}Date`]);\n            const year = boundary.getFullYear();\n            let month = 1;\n            let date = 1;\n            let hour = 0;\n            let minute = 0;\n            if (type === 'max') {\n                month = 12;\n                date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);\n                hour = 23;\n                minute = 59;\n            }\n            if (value.getFullYear() === year) {\n                month = boundary.getMonth() + 1;\n                if (value.getMonth() + 1 === month) {\n                    date = boundary.getDate();\n                    if (value.getDate() === date) {\n                        hour = boundary.getHours();\n                        if (value.getHours() === hour) {\n                            minute = boundary.getMinutes();\n                        }\n                    }\n                }\n            }\n            return {\n                [`${type}Year`]: year,\n                [`${type}Month`]: month,\n                [`${type}Date`]: date,\n                [`${type}Hour`]: hour,\n                [`${type}Minute`]: minute,\n            };\n        },\n        onCancel() {\n            this.$emit('cancel');\n        },\n        onConfirm() {\n            this.$emit('confirm', this.data.innerValue);\n        },\n        onChange() {\n            const { data } = this;\n            let value;\n            const picker = this.getPicker();\n            const originColumns = this.getOriginColumns();\n            if (data.type === 'time') {\n                const indexes = picker.getIndexes();\n                value = `${+originColumns[0].values[indexes[0]]}:${+originColumns[1]\n                    .values[indexes[1]]}`;\n            }\n            else {\n                const indexes = picker.getIndexes();\n                const values = indexes.map((value, index) => originColumns[index].values[value]);\n                const year = getTrueValue(values[0]);\n                const month = getTrueValue(values[1]);\n                const maxDate = getMonthEndDay(year, month);\n                let date = getTrueValue(values[2]);\n                if (data.type === 'year-month') {\n                    date = 1;\n                }\n                date = date > maxDate ? maxDate : date;\n                let hour = 0;\n                let minute = 0;\n                if (data.type === 'datetime') {\n                    hour = getTrueValue(values[3]);\n                    minute = getTrueValue(values[4]);\n                }\n                value = new Date(year, month - 1, date, hour, minute);\n            }\n            value = this.correctValue(value);\n            this.updateColumnValue(value).then(() => {\n                this.$emit('input', value);\n                this.$emit('change', picker);\n            });\n        },\n        updateColumnValue(value) {\n            let values = [];\n            const { type } = this.data;\n            const formatter = this.data.formatter || defaultFormatter;\n            const picker = this.getPicker();\n            if (type === 'time') {\n                const pair = value.split(':');\n                values = [formatter('hour', pair[0]), formatter('minute', pair[1])];\n            }\n            else {\n                const date = new Date(value);\n                values = [\n                    formatter('year', `${date.getFullYear()}`),\n                    formatter('month', padZero(date.getMonth() + 1)),\n                ];\n                if (type === 'date') {\n                    values.push(formatter('day', padZero(date.getDate())));\n                }\n                if (type === 'datetime') {\n                    values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes())));\n                }\n            }\n            return this.set({ innerValue: value })\n                .then(() => this.updateColumns())\n                .then(() => picker.setValues(values));\n        },\n    },\n    created() {\n        const innerValue = this.correctValue(this.data.value);\n        this.updateColumnValue(innerValue).then(() => {\n            this.$emit('input', innerValue);\n        });\n    },\n});\n"
  },
  {
    "path": "dist/datetime-picker/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-picker\": \"../picker/index\"\n  }\n}\n"
  },
  {
    "path": "dist/datetime-picker/index.wxml",
    "content": "<van-picker\n  class=\"van-datetime-picker\"\n  active-class=\"active-class\"\n  toolbar-class=\"toolbar-class\"\n  column-class=\"column-class\"\n  title=\"{{ title }}\"\n  columns=\"{{ columns }}\"\n  item-height=\"{{ itemHeight }}\"\n  show-toolbar=\"{{ showToolbar }}\"\n  visible-item-count=\"{{ visibleItemCount }}\"\n  confirm-button-text=\"{{ confirmButtonText }}\"\n  cancel-button-text=\"{{ cancelButtonText }}\"\n  bind:change=\"onChange\"\n  bind:confirm=\"onConfirm\"\n  bind:cancel=\"onCancel\"\n/>\n"
  },
  {
    "path": "dist/datetime-picker/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "dist/definitions/index.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ninterface VantComponentInstance {\n    parent: WechatMiniprogram.Component.TrivialInstance;\n    children: WechatMiniprogram.Component.TrivialInstance[];\n    index: number;\n    $emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;\n    setView: (value: Record<string, any>, callback?: () => void) => void;\n}\nexport type VantComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {\n    data?: Data;\n    field?: boolean;\n    classes?: string[];\n    mixins?: string[];\n    props?: Props;\n    relation?: {\n        relations: Record<string, WechatMiniprogram.Component.RelationOption>;\n        mixin: string;\n    };\n    watch?: Record<string, (...args: any[]) => any>;\n    methods?: Methods;\n    beforeCreate?: () => void;\n    created?: () => void;\n    mounted?: () => void;\n    destroyed?: () => void;\n} & ThisType<VantComponentInstance & WechatMiniprogram.Component.Instance<Data & {\n    name: string;\n    value: any;\n} & Record<string, any>, Props, Methods> & Record<string, any>>;\nexport {};\n"
  },
  {
    "path": "dist/definitions/index.js",
    "content": "export {};\n"
  },
  {
    "path": "dist/dialog/dialog.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\nexport type Action = 'confirm' | 'cancel' | 'overlay';\ntype DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;\ninterface DialogOptions {\n    lang?: string;\n    show?: boolean;\n    title?: string;\n    width?: string | number | null;\n    zIndex?: number;\n    theme?: string;\n    context?: (() => DialogContext) | DialogContext;\n    message?: string;\n    overlay?: boolean;\n    selector?: string;\n    ariaLabel?: string;\n    /**\n     * @deprecated use custom-class instead\n     */\n    className?: string;\n    customStyle?: string;\n    transition?: string;\n    /**\n     * @deprecated use beforeClose instead\n     */\n    asyncClose?: boolean;\n    beforeClose?: null | ((action: Action) => Promise<void | boolean> | void);\n    businessId?: number;\n    sessionFrom?: string;\n    overlayStyle?: string;\n    appParameter?: string;\n    messageAlign?: string;\n    sendMessageImg?: string;\n    showMessageCard?: boolean;\n    sendMessagePath?: string;\n    sendMessageTitle?: string;\n    confirmButtonText?: string;\n    cancelButtonText?: string;\n    showConfirmButton?: boolean;\n    showCancelButton?: boolean;\n    closeOnClickOverlay?: boolean;\n    confirmButtonOpenType?: string;\n}\ndeclare const Dialog: {\n    (options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    alert(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    confirm(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    close(): void;\n    stopLoading(): void;\n    currentOptions: DialogOptions;\n    defaultOptions: DialogOptions;\n    setDefaultOptions(options: DialogOptions): void;\n    resetDefaultOptions(): void;\n};\nexport default Dialog;\n"
  },
  {
    "path": "dist/dialog/dialog.js",
    "content": "let queue = [];\nconst defaultOptions = {\n    show: false,\n    title: '',\n    width: null,\n    theme: 'default',\n    message: '',\n    zIndex: 100,\n    overlay: true,\n    selector: '#van-dialog',\n    className: '',\n    asyncClose: false,\n    beforeClose: null,\n    transition: 'scale',\n    customStyle: '',\n    messageAlign: '',\n    overlayStyle: '',\n    confirmButtonText: '确认',\n    cancelButtonText: '取消',\n    showConfirmButton: true,\n    showCancelButton: false,\n    closeOnClickOverlay: false,\n    confirmButtonOpenType: '',\n};\nlet currentOptions = Object.assign({}, defaultOptions);\nfunction getContext() {\n    const pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nconst Dialog = (options) => {\n    options = Object.assign(Object.assign({}, currentOptions), options);\n    return new Promise((resolve, reject) => {\n        const context = (typeof options.context === 'function'\n            ? options.context()\n            : options.context) || getContext();\n        const dialog = context.selectComponent(options.selector);\n        delete options.context;\n        delete options.selector;\n        if (dialog) {\n            dialog.setData(Object.assign({ callback: (action, instance) => {\n                    action === 'confirm' ? resolve(instance) : reject(instance);\n                } }, options));\n            wx.nextTick(() => {\n                dialog.setData({ show: true });\n            });\n            queue.push(dialog);\n        }\n        else {\n            console.warn('未找到 van-dialog 节点，请确认 selector 及 context 是否正确');\n        }\n    });\n};\nDialog.alert = (options) => Dialog(options);\nDialog.confirm = (options) => Dialog(Object.assign({ showCancelButton: true }, options));\nDialog.close = () => {\n    queue.forEach((dialog) => {\n        dialog.close();\n    });\n    queue = [];\n};\nDialog.stopLoading = () => {\n    queue.forEach((dialog) => {\n        dialog.stopLoading();\n    });\n};\nDialog.currentOptions = currentOptions;\nDialog.defaultOptions = defaultOptions;\nDialog.setDefaultOptions = (options) => {\n    currentOptions = Object.assign(Object.assign({}, currentOptions), options);\n    Dialog.currentOptions = currentOptions;\n};\nDialog.resetDefaultOptions = () => {\n    currentOptions = Object.assign({}, defaultOptions);\n    Dialog.currentOptions = currentOptions;\n};\nDialog.resetDefaultOptions();\nexport default Dialog;\n"
  },
  {
    "path": "dist/dialog/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/dialog/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\nimport { GRAY, RED } from '../common/color';\nimport { toPromise } from '../common/utils';\nVantComponent({\n    mixins: [button],\n    classes: ['cancle-button-class', 'confirm-button-class'],\n    props: {\n        show: {\n            type: Boolean,\n            observer(show) {\n                !show && this.stopLoading();\n            },\n        },\n        title: String,\n        message: String,\n        theme: {\n            type: String,\n            value: 'default',\n        },\n        confirmButtonId: String,\n        className: String,\n        customStyle: String,\n        asyncClose: Boolean,\n        messageAlign: String,\n        beforeClose: null,\n        overlayStyle: String,\n        useSlot: Boolean,\n        useTitleSlot: Boolean,\n        useConfirmButtonSlot: Boolean,\n        useCancelButtonSlot: Boolean,\n        showCancelButton: Boolean,\n        closeOnClickOverlay: Boolean,\n        confirmButtonOpenType: String,\n        width: null,\n        zIndex: {\n            type: Number,\n            value: 2000,\n        },\n        confirmButtonText: {\n            type: String,\n            value: '确认',\n        },\n        cancelButtonText: {\n            type: String,\n            value: '取消',\n        },\n        confirmButtonColor: {\n            type: String,\n            value: RED,\n        },\n        cancelButtonColor: {\n            type: String,\n            value: GRAY,\n        },\n        showConfirmButton: {\n            type: Boolean,\n            value: true,\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        transition: {\n            type: String,\n            value: 'scale',\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        loading: {\n            confirm: false,\n            cancel: false,\n        },\n        callback: (() => { }),\n    },\n    methods: {\n        onConfirm() {\n            this.handleAction('confirm');\n        },\n        onCancel() {\n            this.handleAction('cancel');\n        },\n        onClickOverlay() {\n            this.close('overlay');\n        },\n        close(action) {\n            this.setData({ show: false });\n            this.closeAction = action;\n        },\n        onAfterLeave() {\n            const { closeAction: action } = this;\n            this.$emit('close', action);\n            const { callback } = this.data;\n            if (callback) {\n                callback(action, this);\n            }\n        },\n        stopLoading() {\n            this.setData({\n                loading: {\n                    confirm: false,\n                    cancel: false,\n                },\n            });\n        },\n        handleAction(action) {\n            this.$emit(action, { dialog: this });\n            const { asyncClose, beforeClose } = this.data;\n            if (!asyncClose && !beforeClose) {\n                this.close(action);\n                return;\n            }\n            this.setData({\n                [`loading.${action}`]: true,\n            });\n            if (beforeClose) {\n                toPromise(beforeClose(action)).then((value) => {\n                    if (value) {\n                        this.close(action);\n                    }\n                    else {\n                        this.stopLoading();\n                    }\n                });\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/dialog/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"van-button\": \"../button/index\",\n    \"van-goods-action\": \"../goods-action/index\",\n    \"van-goods-action-button\": \"../goods-action-button/index\"\n  }\n}\n"
  },
  {
    "path": "dist/dialog/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<van-popup\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay=\"{{ overlay }}\"\n  transition=\"{{ transition }}\"\n  custom-class=\"van-dialog van-dialog--{{ theme }}{{ className }} custom-class\"\n  custom-style=\"width: {{ utils.addUnit(width) }};{{ customStyle }}\"\n  overlay-style=\"{{ overlayStyle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClickOverlay\"\n  bind:after-leave=\"onAfterLeave\"\n>\n  <view\n    wx:if=\"{{ title || useTitleSlot  }}\"\n    class=\"{{ utils.bem('dialog__header', { isolated: !(message || useSlot) }) }}\"\n  >\n    <slot wx:if=\"{{ useTitleSlot }}\" name=\"title\" />\n    <block wx:elif=\"{{ title }}\">{{ title }}</block>\n  </view>\n\n  <slot wx:if=\"{{ useSlot }}\" />\n  <view\n    wx:elif=\"{{ message }}\"\n    class=\"{{ utils.bem('dialog__message', [theme, messageAlign, { hasTitle: title }]) }}\"\n  >\n    <text class=\"van-dialog__message-text\">{{ message }}</text>\n  </view>\n\n  <van-goods-action wx:if=\"{{ theme === 'round-button' }}\" custom-class=\"van-dialog__footer--round-button\">\n    <van-goods-action-button\n      wx:if=\"{{ showCancelButton }}\"\n      size=\"large\"\n      loading=\"{{ loading.cancel }}\"\n      class=\"van-dialog__button van-hairline--right\"\n      custom-class=\"van-dialog__cancel cancle-button-class\"\n      custom-style=\"color: {{ cancelButtonColor }}\"\n      bind:click=\"onCancel\"\n    >\n      {{ cancelButtonText }}\n    </van-goods-action-button>\n    <van-goods-action-button\n      wx:if=\"{{ showConfirmButton }}\"\n      size=\"large\"\n      class=\"van-dialog__button\"\n      loading=\"{{ loading.confirm }}\"\n      custom-class=\"van-dialog__confirm confirm-button-class\"\n      custom-style=\"color: {{ confirmButtonColor }}\"\n      button-id=\"{{ confirmButtonId }}\"\n      open-type=\"{{ confirmButtonOpenType }}\"\n      lang=\"{{ lang }}\"\n      business-id=\"{{ businessId }}\"\n      session-from=\"{{ sessionFrom }}\"\n      send-message-title=\"{{ sendMessageTitle }}\"\n      send-message-path=\"{{ sendMessagePath }}\"\n      send-message-img=\"{{ sendMessageImg }}\"\n      show-message-card=\"{{ showMessageCard }}\"\n      app-parameter=\"{{ appParameter }}\"\n      bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n      bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n      bind:click=\"onConfirm\"\n      bindgetuserinfo=\"onGetUserInfo\"\n      bindcontact=\"onContact\"\n      bindgetphonenumber=\"onGetPhoneNumber\"\n      binderror=\"onError\"\n      bindlaunchapp=\"onLaunchApp\"\n      bindopensetting=\"onOpenSetting\"\n    >\n      {{ confirmButtonText }}\n    </van-goods-action-button>\n  </van-goods-action>\n\n  <view wx:elif=\"{{ showCancelButton || showConfirmButton }}\" class=\"van-hairline--top van-dialog__footer\">\n    <block wx:if=\"{{ showCancelButton }}\">\n      <slot wx:if=\"{{ useCancelButtonSlot }}\" name=\"cancel-button\" />\n\n      <van-button\n        wx:else\n        size=\"large\"\n        loading=\"{{ loading.cancel }}\"\n        class=\"van-dialog__button van-hairline--right\"\n        custom-class=\"van-dialog__cancel cancle-button-class\"\n        custom-style=\"color: {{ cancelButtonColor }}\"\n        bind:click=\"onCancel\"\n      >\n        {{ cancelButtonText }}\n      </van-button>\n    </block>\n\n    <block wx:if=\"{{ showConfirmButton }}\">\n      <slot wx:if=\"{{ useConfirmButtonSlot }}\" name=\"confirm-button\" />\n\n      <van-button\n        wx:else\n        size=\"large\"\n        class=\"van-dialog__button\"\n        loading=\"{{ loading.confirm }}\"\n        custom-class=\"van-dialog__confirm confirm-button-class\"\n        custom-style=\"color: {{ confirmButtonColor }}\"\n        button-id=\"{{ confirmButtonId }}\"\n        open-type=\"{{ confirmButtonOpenType }}\"\n        lang=\"{{ lang }}\"\n        business-id=\"{{ businessId }}\"\n        session-from=\"{{ sessionFrom }}\"\n        send-message-title=\"{{ sendMessageTitle }}\"\n        send-message-path=\"{{ sendMessagePath }}\"\n        send-message-img=\"{{ sendMessageImg }}\"\n        show-message-card=\"{{ showMessageCard }}\"\n        app-parameter=\"{{ appParameter }}\"\n        bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n        bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n        bind:click=\"onConfirm\"\n        bindgetuserinfo=\"onGetUserInfo\"\n        bindcontact=\"onContact\"\n        bindgetphonenumber=\"onGetPhoneNumber\"\n        binderror=\"onError\"\n        bindlaunchapp=\"onLaunchApp\"\n        bindopensetting=\"onOpenSetting\"\n      >\n        {{ confirmButtonText }}\n      </van-button>\n    </block>\n  </view>\n</van-popup>\n"
  },
  {
    "path": "dist/dialog/index.wxss",
    "content": "@import '../common/index.wxss';.van-dialog{background-color:var(--dialog-background-color,#fff);border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,320px)}@media (max-width:321px){.van-dialog{width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{font-weight:var(--dialog-header-font-weight,500);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.van-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{-webkit-overflow-scrolling:touch;font-size:var(--dialog-message-font-size,14px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,#646566);padding-top:var(--dialog-has-title-message-padding-top,8px)}.van-dialog__message--round-button{color:#323233;padding-bottom:16px}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex}.van-dialog__footer--round-button{padding:8px 24px 16px!important;position:relative!important}.van-dialog__button{flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}"
  },
  {
    "path": "dist/divider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/divider/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        dashed: Boolean,\n        hairline: Boolean,\n        contentPosition: String,\n        fontSize: String,\n        borderColor: String,\n        textColor: String,\n        customStyle: String,\n    },\n});\n"
  },
  {
    "path": "dist/divider/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "dist/divider/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('divider', [{ dashed, hairline }, contentPosition]) }}\"\n  style=\"{{ computed.rootStyle({ borderColor, textColor, fontSize, customStyle }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/divider/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      'border-color': data.borderColor,\n      color: data.textColor,\n      'font-size': addUnit(data.fontSize),\n    },\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "dist/divider/index.wxss",
    "content": "@import '../common/index.wxss';.van-divider{align-items:center;border:0 solid var(--divider-border-color,#ebedf0);color:var(--divider-text-color,#969799);display:flex;font-size:var(--divider-font-size,14px);line-height:var(--divider-line-height,24px);margin:var(--divider-margin,16px 0)}.van-divider:after,.van-divider:before{border-color:inherit;border-style:inherit;border-width:1px 0 0;box-sizing:border-box;display:block;flex:1;height:1px}.van-divider:before{content:\"\"}.van-divider--hairline:after,.van-divider--hairline:before{transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:\"\";margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:var(--divider-content-right-width,10%)}"
  },
  {
    "path": "dist/dropdown-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/dropdown-item/index.js",
    "content": "import { useParent } from '../common/relation';\nimport { VantComponent } from '../common/component';\nVantComponent({\n    classes: ['item-title-class'],\n    field: true,\n    relation: useParent('dropdown-menu', function () {\n        this.updateDataFromParent();\n    }),\n    props: {\n        value: {\n            type: null,\n            observer: 'rerender',\n        },\n        title: {\n            type: String,\n            observer: 'rerender',\n        },\n        disabled: Boolean,\n        titleClass: {\n            type: String,\n            observer: 'rerender',\n        },\n        options: {\n            type: Array,\n            value: [],\n            observer: 'rerender',\n        },\n        popupStyle: String,\n        useBeforeToggle: {\n            type: Boolean,\n            value: false,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        transition: true,\n        showPopup: false,\n        showWrapper: false,\n        displayTitle: '',\n        safeAreaTabBar: false,\n    },\n    methods: {\n        rerender() {\n            wx.nextTick(() => {\n                var _a;\n                (_a = this.parent) === null || _a === void 0 ? void 0 : _a.updateItemListData();\n            });\n        },\n        updateDataFromParent() {\n            if (this.parent) {\n                const { overlay, duration, activeColor, closeOnClickOverlay, direction, safeAreaTabBar, } = this.parent.data;\n                this.setData({\n                    overlay,\n                    duration,\n                    activeColor,\n                    closeOnClickOverlay,\n                    direction,\n                    safeAreaTabBar,\n                });\n            }\n        },\n        onOpen() {\n            this.$emit('open');\n        },\n        onOpened() {\n            this.$emit('opened');\n        },\n        onClose() {\n            this.$emit('close');\n        },\n        onClosed() {\n            this.$emit('closed');\n            this.setData({ showWrapper: false });\n        },\n        onOptionTap(event) {\n            const { option } = event.currentTarget.dataset;\n            const { value } = option;\n            const shouldEmitChange = this.data.value !== value;\n            this.setData({ showPopup: false, value });\n            this.$emit('close');\n            this.rerender();\n            if (shouldEmitChange) {\n                this.$emit('change', value);\n            }\n        },\n        toggle(show, options = {}) {\n            const { showPopup } = this.data;\n            if (typeof show !== 'boolean') {\n                show = !showPopup;\n            }\n            if (show === showPopup) {\n                return;\n            }\n            this.onBeforeToggle(show).then((status) => {\n                var _a;\n                if (!status) {\n                    return;\n                }\n                this.setData({\n                    transition: !options.immediate,\n                    showPopup: show,\n                });\n                if (show) {\n                    (_a = this.parent) === null || _a === void 0 ? void 0 : _a.getChildWrapperStyle().then((wrapperStyle) => {\n                        this.setData({ wrapperStyle, showWrapper: true });\n                        this.rerender();\n                    });\n                }\n                else {\n                    this.rerender();\n                }\n            });\n        },\n        onBeforeToggle(status) {\n            const { useBeforeToggle } = this.data;\n            if (!useBeforeToggle) {\n                return Promise.resolve(true);\n            }\n            return new Promise((resolve) => {\n                this.$emit('before-toggle', {\n                    status,\n                    callback: (value) => resolve(value),\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/dropdown-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"van-cell\": \"../cell/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/dropdown-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ showWrapper }}\"\n  class=\"{{ utils.bem('dropdown-item', direction) }} custom-class\"\n  style=\"{{ wrapperStyle }}\"\n>\n  <van-popup\n    show=\"{{ showPopup }}\"\n    custom-style=\"position: absolute;{{ popupStyle }}\"\n    overlay-style=\"position: absolute;\"\n    overlay=\"{{ overlay }}\"\n    position=\"{{ direction === 'down' ? 'top' : 'bottom' }}\"\n    duration=\"{{ transition ? duration : 0 }}\"\n    safe-area-tab-bar=\"{{ safeAreaTabBar }}\"\n    close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n    rootPortal=\"{{ rootPortal }}\"\n    bind:enter=\"onOpen\"\n    bind:leave=\"onClose\"\n    bind:close=\"toggle\"\n    bind:after-enter=\"onOpened\"\n    bind:after-leave=\"onClosed\"\n  >\n    <van-cell\n      wx:for=\"{{ options }}\"\n      wx:key=\"value\"\n      data-option=\"{{ item }}\"\n      class=\"{{ utils.bem('dropdown-item__option', { active: item.value === value } ) }}\"\n      clickable\n      icon=\"{{ item.icon }}\"\n      bind:tap=\"onOptionTap\"\n    >\n      <view\n        slot=\"title\"\n        class=\"van-dropdown-item__title item-title-class\"\n        style=\"{{ item.value === value  ? 'color:' + activeColor : '' }}\"\n      >\n        {{ item.text }}\n      </view>\n      <van-icon\n        wx:if=\"{{ item.value === value }}\"\n        name=\"success\"\n        class=\"van-dropdown-item__icon\"\n        color=\"{{ activeColor }}\"\n      />\n    </van-cell>\n\n    <slot />\n  </van-popup>\n</view>\n"
  },
  {
    "path": "dist/dropdown-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-dropdown-item{left:0;overflow:hidden;position:fixed;right:0}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}"
  },
  {
    "path": "dist/dropdown-item/shared.d.ts",
    "content": "export interface Option {\n    text: string;\n    value: string | number;\n    icon: string;\n}\n"
  },
  {
    "path": "dist/dropdown-item/shared.js",
    "content": "export {};\n"
  },
  {
    "path": "dist/dropdown-menu/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/dropdown-menu/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nimport { addUnit, getRect, getSystemInfoSync } from '../common/utils';\nlet ARRAY = [];\nVantComponent({\n    field: true,\n    classes: ['title-class'],\n    relation: useChildren('dropdown-item', function () {\n        this.updateItemListData();\n    }),\n    props: {\n        activeColor: {\n            type: String,\n            observer: 'updateChildrenData',\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildrenData',\n        },\n        zIndex: {\n            type: Number,\n            value: 10,\n        },\n        duration: {\n            type: Number,\n            value: 200,\n            observer: 'updateChildrenData',\n        },\n        direction: {\n            type: String,\n            value: 'down',\n            observer: 'updateChildrenData',\n        },\n        safeAreaTabBar: {\n            type: Boolean,\n            value: false,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildrenData',\n        },\n        closeOnClickOutside: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        itemListData: [],\n    },\n    beforeCreate() {\n        const { windowHeight } = getSystemInfoSync();\n        this.windowHeight = windowHeight;\n        ARRAY.push(this);\n    },\n    destroyed() {\n        ARRAY = ARRAY.filter((item) => item !== this);\n    },\n    methods: {\n        updateItemListData() {\n            this.setData({\n                itemListData: this.children.map((child) => child.data),\n            });\n        },\n        updateChildrenData() {\n            this.children.forEach((child) => {\n                child.updateDataFromParent();\n            });\n        },\n        toggleItem(active) {\n            this.children.forEach((item, index) => {\n                const { showPopup } = item.data;\n                if (index === active) {\n                    item.toggle();\n                }\n                else if (showPopup) {\n                    item.toggle(false, { immediate: true });\n                }\n            });\n        },\n        close() {\n            this.children.forEach((child) => {\n                child.toggle(false, { immediate: true });\n            });\n        },\n        getChildWrapperStyle() {\n            const { zIndex, direction } = this.data;\n            return getRect(this, '.van-dropdown-menu').then((rect) => {\n                const { top = 0, bottom = 0 } = rect;\n                const offset = direction === 'down' ? bottom : this.windowHeight - top;\n                let wrapperStyle = `z-index: ${zIndex};`;\n                if (direction === 'down') {\n                    wrapperStyle += `top: ${addUnit(offset)};`;\n                }\n                else {\n                    wrapperStyle += `bottom: ${addUnit(offset)};`;\n                }\n                return wrapperStyle;\n            });\n        },\n        onTitleTap(event) {\n            const { index } = event.currentTarget.dataset;\n            const child = this.children[index];\n            if (!child.data.disabled) {\n                ARRAY.forEach((menuItem) => {\n                    if (menuItem &&\n                        menuItem.data.closeOnClickOutside &&\n                        menuItem !== this) {\n                        menuItem.close();\n                    }\n                });\n                this.toggleItem(index);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/dropdown-menu/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/dropdown-menu/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\">\n  <view\n    wx:for=\"{{ itemListData }}\"\n    wx:key=\"index\"\n    data-index=\"{{ index }}\"\n    class=\"{{ utils.bem('dropdown-menu__item', { disabled: item.disabled }) }}\"\n    bind:tap=\"onTitleTap\"\n  >\n    <view\n      class=\"{{ item.titleClass }} {{ utils.bem('dropdown-menu__title', { active: item.showPopup, down: item.showPopup === (direction === 'down') }) }} title-class\"\n      style=\"{{ item.showPopup ? 'color:' + activeColor : '' }}\"\n    >\n      <view class=\"van-ellipsis\">\n        {{ computed.displayTitle(item) }}\n      </view>\n    </view>\n  </view>\n\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/dropdown-menu/index.wxs",
    "content": "/* eslint-disable */\nfunction displayTitle(item) {\n  if (item.title) {\n    return item.title;\n  }\n\n  var match = item.options.filter(function(option) {\n    return option.value === item.value;\n  });\n  var displayTitle = match.length ? match[0].text : '';\n  return displayTitle;\n}\n\nmodule.exports = {\n  displayTitle: displayTitle\n};\n"
  },
  {
    "path": "dist/dropdown-menu/index.wxss",
    "content": "@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:var(--dropdown-menu-box-shadow,0 2px 12px hsla(210,1%,40%,.12));display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 24px 0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:\"\";margin-top:-5px;opacity:.8;position:absolute;right:11px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}"
  },
  {
    "path": "dist/empty/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/empty/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        description: String,\n        image: {\n            type: String,\n            value: 'default',\n        },\n    },\n});\n"
  },
  {
    "path": "dist/empty/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "dist/empty/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class van-empty\">\n  <view class=\"van-empty__image\">\n    <slot name=\"image\"></slot>\n  </view>\n  <view class=\"van-empty__image\">\n    <image wx:if=\"{{ image }}\" class=\"van-empty__image__img\" src=\"{{ computed.imageUrl(image) }}\" />\n  </view>\n\n  <view class=\"van-empty__description\">\n    <slot name=\"description\"></slot>\n  </view>\n  <view class=\"van-empty__description\">\n    {{ description }}\n  </view>\n\n  <view class=\"van-empty__bottom\">\n    <slot></slot>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/empty/index.wxs",
    "content": "/* eslint-disable */\nvar PRESETS = ['error', 'search', 'default', 'network'];\n\nfunction imageUrl(image) {\n  if (PRESETS.indexOf(image) !== -1) {\n    return 'https://img.yzcdn.cn/vant/empty-image-' + image + '.png';\n  }\n\n  return image;\n}\n\nmodule.exports = {\n  imageUrl: imageUrl,\n};\n\n"
  },
  {
    "path": "dist/empty/index.wxss",
    "content": "@import '../common/index.wxss';.van-empty{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:32px 0}.van-empty__image{height:160px;width:160px}.van-empty__image:empty{display:none}.van-empty__image__img{height:100%;width:100%}.van-empty__image:not(:empty)+.van-empty__image{display:none}.van-empty__description{color:#969799;font-size:14px;line-height:20px;margin-top:16px;padding:0 60px}.van-empty__description:empty,.van-empty__description:not(:empty)+.van-empty__description{display:none}.van-empty__bottom{margin-top:24px}"
  },
  {
    "path": "dist/field/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/field/index.js",
    "content": "import { nextTick } from '../common/utils';\nimport { VantComponent } from '../common/component';\nimport { commonProps, inputProps, textareaProps } from './props';\nVantComponent({\n    field: true,\n    classes: ['input-class', 'right-icon-class', 'label-class'],\n    props: Object.assign(Object.assign(Object.assign(Object.assign({}, commonProps), inputProps), textareaProps), { size: String, icon: String, label: String, error: Boolean, center: Boolean, isLink: Boolean, leftIcon: String, rightIcon: String, autosize: null, required: Boolean, iconClass: String, clickable: Boolean, inputAlign: String, customStyle: String, errorMessage: String, arrowDirection: String, showWordLimit: Boolean, errorMessageAlign: String, readonly: {\n            type: Boolean,\n            observer: 'setShowClear',\n        }, clearable: {\n            type: Boolean,\n            observer: 'setShowClear',\n        }, clearTrigger: {\n            type: String,\n            value: 'focus',\n        }, border: {\n            type: Boolean,\n            value: true,\n        }, titleWidth: {\n            type: String,\n            value: '6.2em',\n        }, clearIcon: {\n            type: String,\n            value: 'clear',\n        }, extraEventParams: {\n            type: Boolean,\n            value: false,\n        } }),\n    data: {\n        focused: false,\n        innerValue: '',\n        showClear: false,\n    },\n    watch: {\n        value(value) {\n            if (value !== this.value) {\n                this.setData({ innerValue: value });\n                this.value = value;\n                this.setShowClear();\n            }\n        },\n        clearTrigger() {\n            this.setShowClear();\n        },\n    },\n    created() {\n        this.value = this.data.value;\n        this.setData({ innerValue: this.value });\n    },\n    methods: {\n        formatValue(value) {\n            const { maxlength } = this.data;\n            if (maxlength !== -1 && value.length > maxlength) {\n                return value.slice(0, maxlength);\n            }\n            return value;\n        },\n        onInput(event) {\n            const { value = '' } = event.detail || {};\n            const formatValue = this.formatValue(value);\n            this.value = formatValue;\n            this.setShowClear();\n            return this.emitChange(Object.assign(Object.assign({}, event.detail), { value: formatValue }));\n        },\n        onFocus(event) {\n            this.focused = true;\n            this.setShowClear();\n            this.$emit('focus', event.detail);\n        },\n        onBlur(event) {\n            this.focused = false;\n            this.setShowClear();\n            this.$emit('blur', event.detail);\n        },\n        onClickIcon() {\n            this.$emit('click-icon');\n        },\n        onClickInput(event) {\n            this.$emit('click-input', event.detail);\n        },\n        onClear() {\n            this.setData({ innerValue: '' });\n            this.value = '';\n            this.setShowClear();\n            nextTick(() => {\n                this.emitChange({ value: '' });\n                this.$emit('clear', '');\n            });\n        },\n        onConfirm(event) {\n            const { value = '' } = event.detail || {};\n            this.value = value;\n            this.setShowClear();\n            this.$emit('confirm', value);\n        },\n        setValue(value) {\n            this.value = value;\n            this.setShowClear();\n            if (value === '') {\n                this.setData({ innerValue: '' });\n            }\n            this.emitChange({ value });\n        },\n        onLineChange(event) {\n            this.$emit('linechange', event.detail);\n        },\n        onKeyboardHeightChange(event) {\n            this.$emit('keyboardheightchange', event.detail);\n        },\n        onBindNicknameReview(event) {\n            this.$emit('nicknamereview', event.detail);\n        },\n        emitChange(detail) {\n            const { extraEventParams } = this.data;\n            this.setData({ value: detail.value });\n            let result;\n            const data = extraEventParams\n                ? Object.assign(Object.assign({}, detail), { callback: (data) => {\n                        result = data;\n                    } }) : detail.value;\n            this.$emit('input', data);\n            this.$emit('change', data);\n            return result;\n        },\n        setShowClear() {\n            const { clearable, readonly, clearTrigger } = this.data;\n            const { focused, value } = this;\n            let showClear = false;\n            if (clearable && !readonly) {\n                const hasValue = !!value;\n                const trigger = clearTrigger === 'always' || (clearTrigger === 'focus' && focused);\n                showClear = hasValue && trigger;\n            }\n            this.setView({ showClear });\n        },\n        noop() { },\n    },\n});\n"
  },
  {
    "path": "dist/field/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/field/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-cell\n  size=\"{{ size }}\"\n  icon=\"{{ leftIcon }}\"\n  center=\"{{ center }}\"\n  border=\"{{ border }}\"\n  is-link=\"{{ isLink }}\"\n  required=\"{{ required }}\"\n  clickable=\"{{ clickable }}\"\n  title-width=\"{{ titleWidth }}\"\n  title-style=\"margin-right: 12px;\"\n  custom-style=\"{{ customStyle }}\"\n  arrow-direction=\"{{ arrowDirection }}\"\n  custom-class=\"custom-class van-field\"\n>\n  <slot name=\"left-icon\" slot=\"icon\" />\n  <label for=\"{{ name }}\" wx:if=\"{{ label }}\" class=\"label-class {{ utils.bem('field__label', { disabled }) }}\" slot=\"title\">\n    {{ label }}\n  </label>\n  <slot wx:else name=\"label\" slot=\"title\" />\n  <view class=\"{{ utils.bem('field__body', [type]) }}\">\n    <view class=\"{{ utils.bem('field__control', [inputAlign, 'custom']) }}\" bindtap=\"onClickInput\">\n      <slot name=\"input\" />\n    </view>\n    <include wx:if=\"{{ type === 'textarea' }}\" src=\"./textarea.wxml\" />\n    <include wx:else src=\"./input.wxml\" />\n\n    <van-icon\n      wx:if=\"{{ showClear }}\"\n      name=\"{{ clearIcon }}\"\n      class=\"van-field__clear-root van-field__icon-root\"\n      catch:touchstart=\"onClear\"\n    />\n    <view class=\"van-field__icon-container\" bind:tap=\"onClickIcon\">\n      <van-icon\n        wx:if=\"{{ rightIcon || icon }}\"\n        name=\"{{ rightIcon || icon }}\"\n        class=\"van-field__icon-root {{ iconClass }}\"\n        custom-class=\"right-icon-class\"\n      />\n      <slot name=\"right-icon\" />\n      <slot name=\"icon\" />\n    </view>\n    <view class=\"van-field__button\">\n      <slot name=\"button\" />\n    </view>\n  </view>\n  <label for=\"{{ name }}\" wx:if=\"{{ showWordLimit && maxlength }}\" class=\"van-field__word-limit\">\n    <view class=\"{{ utils.bem('field__word-num', { full: value.length >= maxlength }) }}\">{{ value.length >= maxlength ? maxlength : value.length }}</view>/{{ maxlength }}\n  </label>\n  <label for=\"{{ name }}\"  wx:if=\"{{ errorMessage }}\" class=\"{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}\">\n    {{ errorMessage }}\n  </label>\n</van-cell>\n"
  },
  {
    "path": "dist/field/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction inputStyle(autosize) {\n  if (autosize && autosize.constructor === 'Object') {\n    return style({\n      'min-height': addUnit(autosize.minHeight),\n      'max-height': addUnit(autosize.maxHeight),\n    });\n  }\n\n  return '';\n}\n\nmodule.exports = {\n  inputStyle: inputStyle,\n};\n"
  },
  {
    "path": "dist/field/index.wxss",
    "content": "@import '../common/index.wxss';.van-field{--cell-icon-size:var(--field-icon-size,16px)}.van-field__label{color:var(--field-label-color,#646566)}.van-field__label--disabled{color:var(--field-disabled-text-color,#c8c9cc)}.van-field__body{align-items:center;display:flex}.van-field__body--textarea{box-sizing:border-box;line-height:1.2em;min-height:var(--cell-line-height,24px);padding:3.6px 0}.van-field__control:empty+.van-field__control{display:block}.van-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,#323233);display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:left;width:100%}.van-field__control:empty{display:none}.van-field__control--textarea{height:var(--field-text-area-min-height,18px);min-height:var(--field-text-area-min-height,18px)}.van-field__control--error{color:var(--field-input-error-text-color,#ee0a24)}.van-field__control--disabled{background-color:initial;color:var(--field-input-disabled-text-color,#c8c9cc);opacity:1}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__control--custom{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__placeholder{color:var(--field-placeholder-text-color,#c8c9cc);left:0;pointer-events:none;position:absolute;right:0;top:0}.van-field__placeholder--error{color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{flex-shrink:0}.van-field__clear-root{color:var(--field-clear-icon-color,#c8c9cc);font-size:var(--field-clear-icon-size,16px)}.van-field__icon-container{color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{color:var(--field-error-message-color,#ee0a24);display:block;font-size:var(--field-error-message-text-font-size,12px);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{color:var(--field-word-limit-color,#646566);font-size:var(--field-word-limit-font-size,12px);line-height:var(--field-word-limit-line-height,16px);margin-top:var(--padding-base,4px);text-align:right}.van-field__word-num{display:inline}.van-field__word-num--full{color:var(--field-word-num-full-color,#ee0a24)}"
  },
  {
    "path": "dist/field/input.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<input\n  id=\"{{ name }}\"\n  class=\"{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class\"\n  type=\"{{ type }}\"\n  focus=\"{{ focus }}\"\n  cursor=\"{{ cursor }}\"\n  value=\"{{ innerValue }}\"\n  auto-focus=\"{{ autoFocus }}\"\n  disabled=\"{{ disabled || readonly }}\"\n  maxlength=\"{{ maxlength }}\"\n  placeholder=\"{{ placeholder }}\"\n  placeholder-style=\"{{ placeholderStyle }}\"\n  placeholder-class=\"{{ utils.bem('field__placeholder', { error }) }}\"\n  confirm-type=\"{{ confirmType }}\"\n  confirm-hold=\"{{ confirmHold }}\"\n  hold-keyboard=\"{{ holdKeyboard }}\"\n  cursor-spacing=\"{{ cursorSpacing }}\"\n  adjust-position=\"{{ adjustPosition }}\"\n  selection-end=\"{{ selectionEnd }}\"\n  selection-start=\"{{ selectionStart }}\"\n  always-embed=\"{{ alwaysEmbed }}\"\n  password=\"{{ password || type === 'password' }}\"\n  bindinput=\"onInput\"\n  bindtap=\"onClickInput\"\n  bindblur=\"onBlur\"\n  bindfocus=\"onFocus\"\n  bindconfirm=\"onConfirm\"\n  bindkeyboardheightchange=\"onKeyboardHeightChange\"\n  bindnicknamereview=\"onBindNicknameReview\"\n/>\n"
  },
  {
    "path": "dist/field/props.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nexport declare const commonProps: WechatMiniprogram.Component.PropertyOption;\nexport declare const inputProps: WechatMiniprogram.Component.PropertyOption;\nexport declare const textareaProps: WechatMiniprogram.Component.PropertyOption;\n"
  },
  {
    "path": "dist/field/props.js",
    "content": "export const commonProps = {\n    value: String,\n    placeholder: String,\n    placeholderStyle: String,\n    placeholderClass: String,\n    disabled: Boolean,\n    maxlength: {\n        type: Number,\n        value: -1,\n    },\n    cursorSpacing: {\n        type: Number,\n        value: 50,\n    },\n    autoFocus: Boolean,\n    focus: Boolean,\n    cursor: {\n        type: Number,\n        value: -1,\n    },\n    selectionStart: {\n        type: Number,\n        value: -1,\n    },\n    selectionEnd: {\n        type: Number,\n        value: -1,\n    },\n    adjustPosition: {\n        type: Boolean,\n        value: true,\n    },\n    holdKeyboard: Boolean,\n};\nexport const inputProps = {\n    type: {\n        type: String,\n        value: 'text',\n    },\n    password: Boolean,\n    confirmType: String,\n    confirmHold: Boolean,\n    alwaysEmbed: Boolean,\n};\nexport const textareaProps = {\n    autoHeight: Boolean,\n    fixed: Boolean,\n    showConfirmBar: {\n        type: Boolean,\n        value: true,\n    },\n    disableDefaultPadding: {\n        type: Boolean,\n        value: true,\n    },\n};\n"
  },
  {
    "path": "dist/field/textarea.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n<textarea\n  id=\"{{ name }}\"\n  class=\"{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class\"\n  fixed=\"{{ fixed }}\"\n  focus=\"{{ focus }}\"\n  cursor=\"{{ cursor }}\"\n  value=\"{{ innerValue }}\"\n  auto-focus=\"{{ autoFocus }}\"\n  disabled=\"{{ disabled || readonly }}\"\n  maxlength=\"{{ maxlength }}\"\n  placeholder=\"{{ placeholder }}\"\n  placeholder-style=\"{{ placeholderStyle }}\"\n  placeholder-class=\"{{ utils.bem('field__placeholder', { error, disabled }) }}\"\n  auto-height=\"{{ !!autosize }}\"\n  style=\"{{ computed.inputStyle(autosize) }}\"\n  cursor-spacing=\"{{ cursorSpacing }}\"\n  adjust-position=\"{{ adjustPosition }}\"\n  show-confirm-bar=\"{{ showConfirmBar }}\"\n  hold-keyboard=\"{{ holdKeyboard }}\"\n  selection-end=\"{{ selectionEnd }}\"\n  selection-start=\"{{ selectionStart }}\"\n  disable-default-padding=\"{{ disableDefaultPadding }}\"\n  bindinput=\"onInput\"\n  bindtap=\"onClickInput\"\n  bindblur=\"onBlur\"\n  bindfocus=\"onFocus\"\n  bindconfirm=\"onConfirm\"\n  bindlinechange=\"onLineChange\"\n  bindkeyboardheightchange=\"onKeyboardHeightChange\"\n/>\n"
  },
  {
    "path": "dist/field/types.d.ts",
    "content": "export interface InputDetails {\n    /** 输入框内容 */\n    value: string;\n    /** 光标位置 */\n    cursor?: number;\n    /** keyCode 为键值 (目前工具还不支持返回keyCode参数) `2.1.0` 起支持 */\n    keyCode?: number;\n}\n"
  },
  {
    "path": "dist/field/types.js",
    "content": "export {};\n"
  },
  {
    "path": "dist/goods-action/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/goods-action/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nVantComponent({\n    relation: useChildren('goods-action-button', function () {\n        this.children.forEach((item) => {\n            item.updateStyle();\n        });\n    }),\n    props: {\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n});\n"
  },
  {
    "path": "dist/goods-action/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/goods-action/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class {{ utils.bem('goods-action', { safe: safeAreaInsetBottom }) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/goods-action/index.wxss",
    "content": "@import '../common/index.wxss';.van-goods-action{align-items:center;background-color:var(--goods-action-background-color,#fff);bottom:0;box-sizing:initial;display:flex;height:var(--goods-action-height,50px);left:0;position:fixed;right:0}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}"
  },
  {
    "path": "dist/goods-action-button/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/goods-action-button/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nimport { button } from '../mixins/button';\nimport { link } from '../mixins/link';\nVantComponent({\n    mixins: [link, button],\n    relation: useParent('goods-action'),\n    props: {\n        text: String,\n        color: String,\n        size: {\n            type: String,\n            value: 'normal',\n        },\n        loading: Boolean,\n        disabled: Boolean,\n        plain: Boolean,\n        type: {\n            type: String,\n            value: 'danger',\n        },\n        customStyle: {\n            type: String,\n            value: '',\n        },\n    },\n    methods: {\n        onClick(event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n        updateStyle() {\n            if (this.parent == null) {\n                return;\n            }\n            const { index } = this;\n            const { children = [] } = this.parent;\n            this.setData({\n                isFirst: index === 0,\n                isLast: index === children.length - 1,\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/goods-action-button/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../button/index\"\n  }\n}\n"
  },
  {
    "path": "dist/goods-action-button/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<van-button\n  id=\"{{ id }}\"\n  button-id=\"{{ buttonId }}\"\n  lang=\"{{ lang }}\"\n  type=\"{{ type }}\"\n  size=\"{{ size }}\"\n  color=\"{{ color }}\"\n  plain=\"{{ plain }}\"\n  loading=\"{{ loading }}\"\n  disabled=\"{{ disabled }}\"\n  open-type=\"{{ openType }}\"\n  class=\"{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}\"\n  custom-class=\"van-goods-action-button__inner custom-class\"\n  custom-style=\"{{customStyle}}\"\n  business-id=\"{{ businessId }}\"\n  session-from=\"{{ sessionFrom }}\"\n  app-parameter=\"{{ appParameter }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  bind:click=\"onClick\"\n  binderror=\"onError\"\n  bindcontact=\"onContact\"\n  bindopensetting=\"onOpenSetting\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n  bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindlaunchapp=\"onLaunchApp\"\n>\n  {{ text }}\n  <slot></slot>\n</van-button>\n"
  },
  {
    "path": "dist/goods-action-button/index.wxss",
    "content": "@import '../common/index.wxss';:host{flex:1}.van-goods-action-button{--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(to right,#ffd01e,#ff8917));--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(to right,#ff6034,#ee0a24));--button-default-height:var(--goods-action-button-height,40px);--button-line-height:var(--goods-action-button-line-height,20px);--button-plain-background-color:var(--goods-action-button-plain-color,#fff);--button-border-width:0;display:block}.van-goods-action-button--first{--button-border-radius:999px 0 0 var(--goods-action-button-border-radius,999px);margin-left:5px}.van-goods-action-button--last{--button-border-radius:0 999px var(--goods-action-button-border-radius,999px) 0;margin-right:5px}.van-goods-action-button--first.van-goods-action-button--last{--button-border-radius:var(--goods-action-button-border-radius,999px)}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{font-weight:var(--font-weight-bold,500)!important;width:100%}@media (max-width:321px){.van-goods-action-button{font-size:13px}}"
  },
  {
    "path": "dist/goods-action-icon/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/goods-action-icon/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\nimport { link } from '../mixins/link';\nVantComponent({\n    classes: ['icon-class', 'text-class', 'info-class'],\n    mixins: [link, button],\n    props: {\n        text: String,\n        dot: Boolean,\n        info: String,\n        icon: String,\n        size: String,\n        color: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        disabled: Boolean,\n        loading: Boolean,\n    },\n    methods: {\n        onClick(event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "dist/goods-action-icon/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-button\": \"../button/index\"\n  }\n}\n"
  },
  {
    "path": "dist/goods-action-icon/index.wxml",
    "content": "<van-button\n  square\n  id=\"{{ id }}\"\n  size=\"large\"\n  lang=\"{{ lang }}\"\n  loading=\"{{ loading }}\"\n  disabled=\"{{ disabled }}\"\n  open-type=\"{{ openType }}\"\n  business-id=\"{{ businessId }}\"\n  custom-class=\"van-goods-action-icon\"\n  session-from=\"{{ sessionFrom }}\"\n  app-parameter=\"{{ appParameter }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  bind:click=\"onClick\"\n  binderror=\"onError\"\n  bindcontact=\"onContact\"\n  bindopensetting=\"onOpenSetting\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindlaunchapp=\"onLaunchApp\"\n>\n  <van-icon\n    wx:if=\"{{ icon }}\"\n    name=\"{{ icon }}\"\n    dot=\"{{ dot }}\"\n    info=\"{{ info }}\"\n    size=\"{{ size }}\"\n    color=\"{{ color }}\"\n    class-prefix=\"{{ classPrefix }}\"\n    class=\"van-goods-action-icon__icon\"\n    custom-class=\"icon-class\"\n    info-class=\"info-class\"\n  />\n  <view wx:else>\n    <slot name=\"icon\" />\n  </view>\n  <text class=\"text-class\">{{ text }}</text>\n</van-button>\n"
  },
  {
    "path": "dist/goods-action-icon/index.wxss",
    "content": "@import '../common/index.wxss';.van-goods-action-icon{border:none!important;color:var(--goods-action-icon-text-color,#646566)!important;display:flex!important;flex-direction:column;font-size:var(--goods-action-icon-font-size,10px)!important;height:var(--goods-action-icon-height,50px)!important;justify-content:center!important;line-height:1!important;min-width:var(--goods-action-icon-width,48px)}.van-goods-action-icon__icon{color:var(--goods-action-icon-color,#323233);display:flex;font-size:var(--goods-action-icon-size,18px);margin:0 auto 5px}"
  },
  {
    "path": "dist/grid/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/grid/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nVantComponent({\n    relation: useChildren('grid-item'),\n    props: {\n        square: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        gutter: {\n            type: null,\n            value: 0,\n            observer: 'updateChildren',\n        },\n        clickable: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        columnNum: {\n            type: Number,\n            value: 4,\n            observer: 'updateChildren',\n        },\n        center: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildren',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildren',\n        },\n        direction: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        iconSize: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        reverse: {\n            type: Boolean,\n            value: false,\n            observer: 'updateChildren',\n        },\n    },\n    methods: {\n        updateChildren() {\n            this.children.forEach((child) => {\n                child.updateStyle();\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/grid/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/grid/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-grid custom-class {{ border && !gutter ? 'van-hairline--top' : '' }}\"\n  style=\"{{ computed.rootStyle({ gutter }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/grid/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'padding-left': addUnit(data.gutter),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "dist/grid/index.wxss",
    "content": "@import '../common/index.wxss';.van-grid{box-sizing:border-box;overflow:hidden;position:relative}"
  },
  {
    "path": "dist/grid-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/grid-item/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nimport { link } from '../mixins/link';\nVantComponent({\n    relation: useParent('grid'),\n    classes: ['content-class', 'icon-class', 'text-class'],\n    mixins: [link],\n    props: {\n        icon: String,\n        iconColor: String,\n        iconPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        dot: Boolean,\n        info: null,\n        badge: null,\n        text: String,\n        useSlot: Boolean,\n    },\n    data: {\n        viewStyle: '',\n    },\n    mounted() {\n        this.updateStyle();\n    },\n    methods: {\n        updateStyle() {\n            if (!this.parent) {\n                return;\n            }\n            const { data, children } = this.parent;\n            const { columnNum, border, square, gutter, clickable, center, direction, reverse, iconSize, } = data;\n            this.setData({\n                center,\n                border,\n                square,\n                gutter,\n                clickable,\n                direction,\n                reverse,\n                iconSize,\n                index: children.indexOf(this),\n                columnNum,\n            });\n        },\n        onClick() {\n            this.$emit('click');\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "dist/grid-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/grid-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('grid-item', { square }) }}\"\n  style=\"{{ computed.wrapperStyle({ square, gutter, columnNum, index }) }}\"\n  bindtap=\"onClick\"\n>\n  <view\n    class=\"content-class {{ utils.bem('grid-item__content', [direction, { center, square, reverse, clickable, surround: border && gutter }]) }} {{ border ? 'van-hairline--surround' : '' }}\"\n    style=\"{{ computed.contentStyle({ square, gutter }) }}\"\n  >\n    <block wx:if=\"{{ useSlot }}\">\n      <slot />\n    </block>\n    <block wx:else>\n      <view class=\"van-grid-item__icon icon-class\">\n        <van-icon wx:if=\"{{ icon }}\" name=\"{{ icon }}\" color=\"{{ iconColor }}\" class-prefix=\"{{ iconPrefix }}\" dot=\"{{ dot }}\" info=\"{{ badge || info }}\" size=\"{{ iconSize }}\" />\n        <slot wx:else name=\"icon\"></slot>\n      </view>\n      <view class=\"van-grid-item__text text-class\">\n        <text wx:if=\"{{ text }}\">{{ text }}</text>\n        <slot wx:else name=\"text\"></slot>\n      </view>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/grid-item/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction wrapperStyle(data) {\n  var width = 100 / data.columnNum + '%';\n\n  return style({\n    width: width,\n    'padding-top': data.square ? width : null,\n    'padding-right': addUnit(data.gutter),\n    'margin-top':\n      data.index >= data.columnNum && !data.square\n        ? addUnit(data.gutter)\n        : null,\n  });\n}\n\nfunction contentStyle(data) {\n  return data.square\n    ? style({\n        right: addUnit(data.gutter),\n        bottom: addUnit(data.gutter),\n        height: 'auto',\n      })\n    : '';\n}\n\nmodule.exports = {\n  wrapperStyle: wrapperStyle,\n  contentStyle: contentStyle,\n};\n"
  },
  {
    "path": "dist/grid-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-grid-item{box-sizing:border-box;float:left;position:relative}.van-grid-item--square{height:0}.van-grid-item__content{background-color:var(--grid-item-content-background-color,#fff);box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:var(--grid-item-content-padding,16px 8px)}.van-grid-item__content:after{border-width:0 1px 1px 0;z-index:1}.van-grid-item__content--surround:after{border-width:1px}.van-grid-item__content--center{align-items:center;justify-content:center}.van-grid-item__content--square{left:0;position:absolute;right:0;top:0}.van-grid-item__content--horizontal{flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__text{margin:0 0 0 8px}.van-grid-item__content--reverse{flex-direction:column-reverse}.van-grid-item__content--reverse .van-grid-item__text{margin:0 0 8px}.van-grid-item__content--horizontal.van-grid-item__content--reverse{flex-direction:row-reverse}.van-grid-item__content--horizontal.van-grid-item__content--reverse .van-grid-item__text{margin:0 8px 0 0}.van-grid-item__content--clickable:active{background-color:var(--grid-item-content-active-color,#f2f3f5)}.van-grid-item__icon{align-items:center;display:flex;font-size:var(--grid-item-icon-size,26px);height:var(--grid-item-icon-size,26px)}.van-grid-item__text{word-wrap:break-word;color:var(--grid-item-text-color,#646566);font-size:var(--grid-item-text-font-size,12px)}.van-grid-item__icon+.van-grid-item__text{margin-top:8px}"
  },
  {
    "path": "dist/icon/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/icon/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    classes: ['info-class'],\n    props: {\n        dot: Boolean,\n        info: null,\n        size: null,\n        color: String,\n        customStyle: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        name: String,\n    },\n    methods: {\n        onClick() {\n            this.$emit('click');\n        },\n    },\n});\n"
  },
  {
    "path": "dist/icon/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "dist/icon/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"{{ computed.rootClass({ classPrefix, name }) }}\"\n  style=\"{{ computed.rootStyle({ customStyle, color, size }) }}\"\n  bindtap=\"onClick\"\n>\n  <van-info\n    wx:if=\"{{ info !== null || dot }}\"\n    dot=\"{{ dot }}\"\n    info=\"{{ info }}\"\n    custom-class=\"van-icon__info info-class\"\n  />\n  <image\n    wx:if=\"{{ computed.isImage(name) }}\"\n    src=\"{{ name }}\"\n    mode=\"aspectFit\"\n    class=\"van-icon__image\"\n  />\n</view>\n"
  },
  {
    "path": "dist/icon/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction isImage(name) {\n  return name.indexOf('/') !== -1;\n}\n\nfunction rootClass(data) {\n  var classes = ['custom-class'];\n\n  if (data.classPrefix !== 'van-icon') {\n    classes.push('van-icon--custom')\n  }\n\n  if (data.classPrefix != null) {\n    classes.push(data.classPrefix);\n  }\n\n  if (isImage(data.name)) {\n    classes.push('van-icon--image');\n  } else if (data.classPrefix != null) {\n    classes.push(data.classPrefix + '-' + data.name);\n  }\n\n  return classes.join(' ');\n}\n\nfunction rootStyle(data) {\n  return style([\n    {\n      color: data.color,\n      'font-size': addUnit(data.size),\n    },\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  isImage: isImage,\n  rootClass: rootClass,\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "dist/icon/index.wxss",
    "content": "@import '../common/index.wxss';.van-icon{text-rendering:auto;-webkit-font-smoothing:antialiased;font:normal normal normal 14px/1 vant-icon;font:normal normal normal 14px/1 var(--van-icon-font-family,\"vant-icon\");font-size:inherit;position:relative}.van-icon,.van-icon:before{display:inline-block}.van-icon-contact:before{content:\"\\e753\"}.van-icon-notes:before{content:\"\\e63c\"}.van-icon-records:before{content:\"\\e63d\"}.van-icon-cash-back-record:before{content:\"\\e63e\"}.van-icon-newspaper:before{content:\"\\e63f\"}.van-icon-discount:before{content:\"\\e640\"}.van-icon-completed:before{content:\"\\e641\"}.van-icon-user:before{content:\"\\e642\"}.van-icon-description:before{content:\"\\e643\"}.van-icon-list-switch:before{content:\"\\e6ad\"}.van-icon-list-switching:before{content:\"\\e65a\"}.van-icon-link-o:before{content:\"\\e751\"}.van-icon-miniprogram-o:before{content:\"\\e752\"}.van-icon-qq:before{content:\"\\e74e\"}.van-icon-wechat-moments:before{content:\"\\e74f\"}.van-icon-weibo:before{content:\"\\e750\"}.van-icon-cash-o:before{content:\"\\e74d\"}.van-icon-guide-o:before{content:\"\\e74c\"}.van-icon-invitation:before{content:\"\\e6d6\"}.van-icon-shield-o:before{content:\"\\e74b\"}.van-icon-exchange:before{content:\"\\e6af\"}.van-icon-eye:before{content:\"\\e6b0\"}.van-icon-enlarge:before{content:\"\\e6b1\"}.van-icon-expand-o:before{content:\"\\e6b2\"}.van-icon-eye-o:before{content:\"\\e6b3\"}.van-icon-expand:before{content:\"\\e6b4\"}.van-icon-filter-o:before{content:\"\\e6b5\"}.van-icon-fire:before{content:\"\\e6b6\"}.van-icon-fail:before{content:\"\\e6b7\"}.van-icon-failure:before{content:\"\\e6b8\"}.van-icon-fire-o:before{content:\"\\e6b9\"}.van-icon-flag-o:before{content:\"\\e6ba\"}.van-icon-font:before{content:\"\\e6bb\"}.van-icon-font-o:before{content:\"\\e6bc\"}.van-icon-gem-o:before{content:\"\\e6bd\"}.van-icon-flower-o:before{content:\"\\e6be\"}.van-icon-gem:before{content:\"\\e6bf\"}.van-icon-gift-card:before{content:\"\\e6c0\"}.van-icon-friends:before{content:\"\\e6c1\"}.van-icon-friends-o:before{content:\"\\e6c2\"}.van-icon-gold-coin:before{content:\"\\e6c3\"}.van-icon-gold-coin-o:before{content:\"\\e6c4\"}.van-icon-good-job-o:before{content:\"\\e6c5\"}.van-icon-gift:before{content:\"\\e6c6\"}.van-icon-gift-o:before{content:\"\\e6c7\"}.van-icon-gift-card-o:before{content:\"\\e6c8\"}.van-icon-good-job:before{content:\"\\e6c9\"}.van-icon-home-o:before{content:\"\\e6ca\"}.van-icon-goods-collect:before{content:\"\\e6cb\"}.van-icon-graphic:before{content:\"\\e6cc\"}.van-icon-goods-collect-o:before{content:\"\\e6cd\"}.van-icon-hot-o:before{content:\"\\e6ce\"}.van-icon-info:before{content:\"\\e6cf\"}.van-icon-hotel-o:before{content:\"\\e6d0\"}.van-icon-info-o:before{content:\"\\e6d1\"}.van-icon-hot-sale-o:before{content:\"\\e6d2\"}.van-icon-hot:before{content:\"\\e6d3\"}.van-icon-like:before{content:\"\\e6d4\"}.van-icon-idcard:before{content:\"\\e6d5\"}.van-icon-like-o:before{content:\"\\e6d7\"}.van-icon-hot-sale:before{content:\"\\e6d8\"}.van-icon-location-o:before{content:\"\\e6d9\"}.van-icon-location:before{content:\"\\e6da\"}.van-icon-label:before{content:\"\\e6db\"}.van-icon-lock:before{content:\"\\e6dc\"}.van-icon-label-o:before{content:\"\\e6dd\"}.van-icon-map-marked:before{content:\"\\e6de\"}.van-icon-logistics:before{content:\"\\e6df\"}.van-icon-manager:before{content:\"\\e6e0\"}.van-icon-more:before{content:\"\\e6e1\"}.van-icon-live:before{content:\"\\e6e2\"}.van-icon-manager-o:before{content:\"\\e6e3\"}.van-icon-medal:before{content:\"\\e6e4\"}.van-icon-more-o:before{content:\"\\e6e5\"}.van-icon-music-o:before{content:\"\\e6e6\"}.van-icon-music:before{content:\"\\e6e7\"}.van-icon-new-arrival-o:before{content:\"\\e6e8\"}.van-icon-medal-o:before{content:\"\\e6e9\"}.van-icon-new-o:before{content:\"\\e6ea\"}.van-icon-free-postage:before{content:\"\\e6eb\"}.van-icon-newspaper-o:before{content:\"\\e6ec\"}.van-icon-new-arrival:before{content:\"\\e6ed\"}.van-icon-minus:before{content:\"\\e6ee\"}.van-icon-orders-o:before{content:\"\\e6ef\"}.van-icon-new:before{content:\"\\e6f0\"}.van-icon-paid:before{content:\"\\e6f1\"}.van-icon-notes-o:before{content:\"\\e6f2\"}.van-icon-other-pay:before{content:\"\\e6f3\"}.van-icon-pause-circle:before{content:\"\\e6f4\"}.van-icon-pause:before{content:\"\\e6f5\"}.van-icon-pause-circle-o:before{content:\"\\e6f6\"}.van-icon-peer-pay:before{content:\"\\e6f7\"}.van-icon-pending-payment:before{content:\"\\e6f8\"}.van-icon-passed:before{content:\"\\e6f9\"}.van-icon-plus:before{content:\"\\e6fa\"}.van-icon-phone-circle-o:before{content:\"\\e6fb\"}.van-icon-phone-o:before{content:\"\\e6fc\"}.van-icon-printer:before{content:\"\\e6fd\"}.van-icon-photo-fail:before{content:\"\\e6fe\"}.van-icon-phone:before{content:\"\\e6ff\"}.van-icon-photo-o:before{content:\"\\e700\"}.van-icon-play-circle:before{content:\"\\e701\"}.van-icon-play:before{content:\"\\e702\"}.van-icon-phone-circle:before{content:\"\\e703\"}.van-icon-point-gift-o:before{content:\"\\e704\"}.van-icon-point-gift:before{content:\"\\e705\"}.van-icon-play-circle-o:before{content:\"\\e706\"}.van-icon-shrink:before{content:\"\\e707\"}.van-icon-photo:before{content:\"\\e708\"}.van-icon-qr:before{content:\"\\e709\"}.van-icon-qr-invalid:before{content:\"\\e70a\"}.van-icon-question-o:before{content:\"\\e70b\"}.van-icon-revoke:before{content:\"\\e70c\"}.van-icon-replay:before{content:\"\\e70d\"}.van-icon-service:before{content:\"\\e70e\"}.van-icon-question:before{content:\"\\e70f\"}.van-icon-search:before{content:\"\\e710\"}.van-icon-refund-o:before{content:\"\\e711\"}.van-icon-service-o:before{content:\"\\e712\"}.van-icon-scan:before{content:\"\\e713\"}.van-icon-share:before{content:\"\\e714\"}.van-icon-send-gift-o:before{content:\"\\e715\"}.van-icon-share-o:before{content:\"\\e716\"}.van-icon-setting:before{content:\"\\e717\"}.van-icon-points:before{content:\"\\e718\"}.van-icon-photograph:before{content:\"\\e719\"}.van-icon-shop:before{content:\"\\e71a\"}.van-icon-shop-o:before{content:\"\\e71b\"}.van-icon-shop-collect-o:before{content:\"\\e71c\"}.van-icon-shop-collect:before{content:\"\\e71d\"}.van-icon-smile:before{content:\"\\e71e\"}.van-icon-shopping-cart-o:before{content:\"\\e71f\"}.van-icon-sign:before{content:\"\\e720\"}.van-icon-sort:before{content:\"\\e721\"}.van-icon-star-o:before{content:\"\\e722\"}.van-icon-smile-comment-o:before{content:\"\\e723\"}.van-icon-stop:before{content:\"\\e724\"}.van-icon-stop-circle-o:before{content:\"\\e725\"}.van-icon-smile-o:before{content:\"\\e726\"}.van-icon-star:before{content:\"\\e727\"}.van-icon-success:before{content:\"\\e728\"}.van-icon-stop-circle:before{content:\"\\e729\"}.van-icon-records-o:before{content:\"\\e72a\"}.van-icon-shopping-cart:before{content:\"\\e72b\"}.van-icon-tosend:before{content:\"\\e72c\"}.van-icon-todo-list:before{content:\"\\e72d\"}.van-icon-thumb-circle-o:before{content:\"\\e72e\"}.van-icon-thumb-circle:before{content:\"\\e72f\"}.van-icon-umbrella-circle:before{content:\"\\e730\"}.van-icon-underway:before{content:\"\\e731\"}.van-icon-upgrade:before{content:\"\\e732\"}.van-icon-todo-list-o:before{content:\"\\e733\"}.van-icon-tv-o:before{content:\"\\e734\"}.van-icon-underway-o:before{content:\"\\e735\"}.van-icon-user-o:before{content:\"\\e736\"}.van-icon-vip-card-o:before{content:\"\\e737\"}.van-icon-vip-card:before{content:\"\\e738\"}.van-icon-send-gift:before{content:\"\\e739\"}.van-icon-wap-home:before{content:\"\\e73a\"}.van-icon-wap-nav:before{content:\"\\e73b\"}.van-icon-volume-o:before{content:\"\\e73c\"}.van-icon-video:before{content:\"\\e73d\"}.van-icon-wap-home-o:before{content:\"\\e73e\"}.van-icon-volume:before{content:\"\\e73f\"}.van-icon-warning:before{content:\"\\e740\"}.van-icon-weapp-nav:before{content:\"\\e741\"}.van-icon-wechat-pay:before{content:\"\\e742\"}.van-icon-warning-o:before{content:\"\\e743\"}.van-icon-wechat:before{content:\"\\e744\"}.van-icon-setting-o:before{content:\"\\e745\"}.van-icon-youzan-shield:before{content:\"\\e746\"}.van-icon-warn-o:before{content:\"\\e747\"}.van-icon-smile-comment:before{content:\"\\e748\"}.van-icon-user-circle-o:before{content:\"\\e749\"}.van-icon-video-o:before{content:\"\\e74a\"}.van-icon-add-square:before{content:\"\\e65c\"}.van-icon-add:before{content:\"\\e65d\"}.van-icon-arrow-down:before{content:\"\\e65e\"}.van-icon-arrow-up:before{content:\"\\e65f\"}.van-icon-arrow:before{content:\"\\e660\"}.van-icon-after-sale:before{content:\"\\e661\"}.van-icon-add-o:before{content:\"\\e662\"}.van-icon-alipay:before{content:\"\\e663\"}.van-icon-ascending:before{content:\"\\e664\"}.van-icon-apps-o:before{content:\"\\e665\"}.van-icon-aim:before{content:\"\\e666\"}.van-icon-award:before{content:\"\\e667\"}.van-icon-arrow-left:before{content:\"\\e668\"}.van-icon-award-o:before{content:\"\\e669\"}.van-icon-audio:before{content:\"\\e66a\"}.van-icon-bag-o:before{content:\"\\e66b\"}.van-icon-balance-list:before{content:\"\\e66c\"}.van-icon-back-top:before{content:\"\\e66d\"}.van-icon-bag:before{content:\"\\e66e\"}.van-icon-balance-pay:before{content:\"\\e66f\"}.van-icon-balance-o:before{content:\"\\e670\"}.van-icon-bar-chart-o:before{content:\"\\e671\"}.van-icon-bars:before{content:\"\\e672\"}.van-icon-balance-list-o:before{content:\"\\e673\"}.van-icon-birthday-cake-o:before{content:\"\\e674\"}.van-icon-bookmark:before{content:\"\\e675\"}.van-icon-bill:before{content:\"\\e676\"}.van-icon-bell:before{content:\"\\e677\"}.van-icon-browsing-history-o:before{content:\"\\e678\"}.van-icon-browsing-history:before{content:\"\\e679\"}.van-icon-bookmark-o:before{content:\"\\e67a\"}.van-icon-bulb-o:before{content:\"\\e67b\"}.van-icon-bullhorn-o:before{content:\"\\e67c\"}.van-icon-bill-o:before{content:\"\\e67d\"}.van-icon-calendar-o:before{content:\"\\e67e\"}.van-icon-brush-o:before{content:\"\\e67f\"}.van-icon-card:before{content:\"\\e680\"}.van-icon-cart-o:before{content:\"\\e681\"}.van-icon-cart-circle:before{content:\"\\e682\"}.van-icon-cart-circle-o:before{content:\"\\e683\"}.van-icon-cart:before{content:\"\\e684\"}.van-icon-cash-on-deliver:before{content:\"\\e685\"}.van-icon-cash-back-record-o:before{content:\"\\e686\"}.van-icon-cashier-o:before{content:\"\\e687\"}.van-icon-chart-trending-o:before{content:\"\\e688\"}.van-icon-certificate:before{content:\"\\e689\"}.van-icon-chat:before{content:\"\\e68a\"}.van-icon-clear:before{content:\"\\e68b\"}.van-icon-chat-o:before{content:\"\\e68c\"}.van-icon-checked:before{content:\"\\e68d\"}.van-icon-clock:before{content:\"\\e68e\"}.van-icon-clock-o:before{content:\"\\e68f\"}.van-icon-close:before{content:\"\\e690\"}.van-icon-closed-eye:before{content:\"\\e691\"}.van-icon-circle:before{content:\"\\e692\"}.van-icon-cluster-o:before{content:\"\\e693\"}.van-icon-column:before{content:\"\\e694\"}.van-icon-comment-circle-o:before{content:\"\\e695\"}.van-icon-cluster:before{content:\"\\e696\"}.van-icon-comment:before{content:\"\\e697\"}.van-icon-comment-o:before{content:\"\\e698\"}.van-icon-comment-circle:before{content:\"\\e699\"}.van-icon-completed-o:before{content:\"\\e69a\"}.van-icon-credit-pay:before{content:\"\\e69b\"}.van-icon-coupon:before{content:\"\\e69c\"}.van-icon-debit-pay:before{content:\"\\e69d\"}.van-icon-coupon-o:before{content:\"\\e69e\"}.van-icon-contact-o:before{content:\"\\e69f\"}.van-icon-descending:before{content:\"\\e6a0\"}.van-icon-desktop-o:before{content:\"\\e6a1\"}.van-icon-diamond-o:before{content:\"\\e6a2\"}.van-icon-description-o:before{content:\"\\e6a3\"}.van-icon-delete:before{content:\"\\e6a4\"}.van-icon-diamond:before{content:\"\\e6a5\"}.van-icon-delete-o:before{content:\"\\e6a6\"}.van-icon-cross:before{content:\"\\e6a7\"}.van-icon-edit:before{content:\"\\e6a8\"}.van-icon-ellipsis:before{content:\"\\e6a9\"}.van-icon-down:before{content:\"\\e6aa\"}.van-icon-discount-o:before{content:\"\\e6ab\"}.van-icon-ecard-pay:before{content:\"\\e6ac\"}.van-icon-envelop-o:before{content:\"\\e6ae\"}@font-face{font-display:auto;font-family:vant-icon;font-style:normal;font-weight:400;src:url(//at.alicdn.com/t/c/font_2553510_kfwma2yq1rs.woff2?t=1694918397022) format(\"woff2\"),url(//at.alicdn.com/t/c/font_2553510_kfwma2yq1rs.woff?t=1694918397022) format(\"woff\")}:host{align-items:center;display:inline-flex;justify-content:center}.van-icon--custom{position:relative}.van-icon--image{height:1em;width:1em}.van-icon__image{height:100%;width:100%}.van-icon__info{z-index:1}"
  },
  {
    "path": "dist/image/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/image/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\nVantComponent({\n    mixins: [button],\n    classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],\n    props: {\n        src: {\n            type: String,\n            observer() {\n                this.setData({\n                    error: false,\n                    loading: true,\n                });\n            },\n        },\n        round: Boolean,\n        width: null,\n        height: null,\n        radius: null,\n        lazyLoad: Boolean,\n        useErrorSlot: Boolean,\n        useLoadingSlot: Boolean,\n        showMenuByLongpress: Boolean,\n        fit: {\n            type: String,\n            value: 'fill',\n        },\n        webp: {\n            type: Boolean,\n            value: false,\n        },\n        showError: {\n            type: Boolean,\n            value: true,\n        },\n        showLoading: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        error: false,\n        loading: true,\n        viewStyle: '',\n    },\n    methods: {\n        onLoad(event) {\n            this.setData({\n                loading: false,\n            });\n            this.$emit('load', event.detail);\n        },\n        onError(event) {\n            this.setData({\n                loading: false,\n                error: true,\n            });\n            this.$emit('error', event.detail);\n        },\n        onClick(event) {\n            this.$emit('click', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/image/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "dist/image/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  style=\"{{ computed.rootStyle({ width, height, radius }) }}\"\n  class=\"custom-class {{ utils.bem('image', { round })}}\"\n  bind:tap=\"onClick\"\n>\n  <image\n    wx:if=\"{{ !error }}\"\n    src=\"{{ src }}\"\n    mode=\"{{ computed.mode(fit) }}\"\n    lazy-load=\"{{ lazyLoad }}\"\n    webp=\"{{ webp }}\"\n    class=\"image-class van-image__img\"\n    show-menu-by-longpress=\"{{ showMenuByLongpress }}\"\n    bind:load=\"onLoad\"\n    bind:error=\"onError\"\n  />\n\n  <view\n    wx:if=\"{{ loading && showLoading }}\"\n    class=\"loading-class van-image__loading\"\n  >\n    <slot wx:if=\"{{ useLoadingSlot }}\" name=\"loading\" />\n    <van-icon wx:else name=\"photo\" custom-class=\"van-image__loading-icon\" />\n  </view>\n  <view\n    wx:if=\"{{ error && showError }}\"\n    class=\"error-class van-image__error\"\n  >\n    <slot wx:if=\"{{ useErrorSlot }}\" name=\"error\" />\n    <van-icon wx:else name=\"photo-fail\" custom-class=\"van-image__error-icon\" />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/image/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      width: addUnit(data.width),\n      height: addUnit(data.height),\n      'border-radius': addUnit(data.radius),\n    },\n    data.radius ? 'overflow: hidden' : null,\n  ]);\n}\n\nvar FIT_MODE_MAP = {\n  none: 'center',\n  fill: 'scaleToFill',\n  cover: 'aspectFill',\n  contain: 'aspectFit',\n  widthFix: 'widthFix',\n  heightFix: 'heightFix',\n};\n\nfunction mode(fit) {\n  return FIT_MODE_MAP[fit];\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  mode: mode,\n};\n"
  },
  {
    "path": "dist/image/index.wxss",
    "content": "@import '../common/index.wxss';.van-image{display:inline-block;position:relative;vertical-align:top}.van-image--round{border-radius:50%;overflow:hidden}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;height:100%;width:100%}.van-image__error,.van-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.van-image__loading-icon{color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:var(--image-error-icon-color,#dcdee0);font-size:var(--image-error-icon-size,32px)!important}"
  },
  {
    "path": "dist/index-anchor/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/index-anchor/index.js",
    "content": "import { getRect } from '../common/utils';\nimport { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nVantComponent({\n    relation: useParent('index-bar'),\n    props: {\n        useSlot: Boolean,\n        index: null,\n    },\n    data: {\n        active: false,\n        wrapperStyle: '',\n        anchorStyle: '',\n    },\n    methods: {\n        scrollIntoView(scrollTop) {\n            getRect(this, '.van-index-anchor-wrapper').then((rect) => {\n                wx.pageScrollTo({\n                    duration: 0,\n                    scrollTop: scrollTop + rect.top - this.parent.data.stickyOffsetTop,\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/index-anchor/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/index-anchor/index.wxml",
    "content": "<view\n  class=\"van-index-anchor-wrapper\"\n  style=\"{{ wrapperStyle }}\"\n>\n  <view\n    class=\"van-index-anchor {{ active ? 'van-index-anchor--active van-hairline--bottom' : '' }}\"\n    style=\"{{ anchorStyle }}\"\n  >\n    <slot wx:if=\"{{ useSlot }}\"/>\n    <block wx:else>\n      <text>{{ index }}</text>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/index-anchor/index.wxss",
    "content": "@import '../common/index.wxss';.van-index-anchor{background-color:var(--index-anchor-background-color,transparent);color:var(--index-anchor-text-color,#323233);font-size:var(--index-anchor-font-size,14px);font-weight:var(--index-anchor-font-weight,500);line-height:var(--index-anchor-line-height,32px);padding:var(--index-anchor-padding,0 16px)}.van-index-anchor--active{background-color:var(--index-anchor-active-background-color,#fff);color:var(--index-anchor-active-text-color,#07c160);left:0;right:0}"
  },
  {
    "path": "dist/index-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/index-bar/index.js",
    "content": "import { GREEN } from '../common/color';\nimport { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nimport { getRect, isDef } from '../common/utils';\nimport { pageScrollMixin } from '../mixins/page-scroll';\nconst indexList = () => {\n    const indexList = [];\n    const charCodeOfA = 'A'.charCodeAt(0);\n    for (let i = 0; i < 26; i++) {\n        indexList.push(String.fromCharCode(charCodeOfA + i));\n    }\n    return indexList;\n};\nVantComponent({\n    relation: useChildren('index-anchor', function () {\n        this.updateData();\n    }),\n    props: {\n        sticky: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        highlightColor: {\n            type: String,\n            value: GREEN,\n        },\n        stickyOffsetTop: {\n            type: Number,\n            value: 0,\n        },\n        indexList: {\n            type: Array,\n            value: indexList(),\n        },\n    },\n    mixins: [\n        pageScrollMixin(function (event) {\n            this.scrollTop = (event === null || event === void 0 ? void 0 : event.scrollTop) || 0;\n            this.onScroll();\n        }),\n    ],\n    data: {\n        activeAnchorIndex: null,\n        showSidebar: false,\n    },\n    created() {\n        this.scrollTop = 0;\n    },\n    methods: {\n        updateData() {\n            wx.nextTick(() => {\n                if (this.timer != null) {\n                    clearTimeout(this.timer);\n                }\n                this.timer = setTimeout(() => {\n                    this.setData({\n                        showSidebar: !!this.children.length,\n                    });\n                    this.setRect().then(() => {\n                        this.onScroll();\n                    });\n                }, 0);\n            });\n        },\n        setRect() {\n            return Promise.all([\n                this.setAnchorsRect(),\n                this.setListRect(),\n                this.setSiderbarRect(),\n            ]);\n        },\n        setAnchorsRect() {\n            return Promise.all(this.children.map((anchor) => getRect(anchor, '.van-index-anchor-wrapper').then((rect) => {\n                Object.assign(anchor, {\n                    height: rect.height,\n                    top: rect.top + this.scrollTop,\n                });\n            })));\n        },\n        setListRect() {\n            return getRect(this, '.van-index-bar').then((rect) => {\n                if (!isDef(rect)) {\n                    return;\n                }\n                Object.assign(this, {\n                    height: rect.height,\n                    top: rect.top + this.scrollTop,\n                });\n            });\n        },\n        setSiderbarRect() {\n            return getRect(this, '.van-index-bar__sidebar').then((res) => {\n                if (!isDef(res)) {\n                    return;\n                }\n                this.sidebar = {\n                    height: res.height,\n                    top: res.top,\n                };\n            });\n        },\n        setDiffData({ target, data }) {\n            const diffData = {};\n            Object.keys(data).forEach((key) => {\n                if (target.data[key] !== data[key]) {\n                    diffData[key] = data[key];\n                }\n            });\n            if (Object.keys(diffData).length) {\n                target.setData(diffData);\n            }\n        },\n        getAnchorRect(anchor) {\n            return getRect(anchor, '.van-index-anchor-wrapper').then((rect) => ({\n                height: rect.height,\n                top: rect.top,\n            }));\n        },\n        getActiveAnchorIndex() {\n            const { children, scrollTop } = this;\n            const { sticky, stickyOffsetTop } = this.data;\n            for (let i = this.children.length - 1; i >= 0; i--) {\n                const preAnchorHeight = i > 0 ? children[i - 1].height : 0;\n                const reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;\n                if (reachTop + scrollTop >= children[i].top) {\n                    return i;\n                }\n            }\n            return -1;\n        },\n        onScroll() {\n            const { children = [], scrollTop } = this;\n            if (!children.length) {\n                return;\n            }\n            const { sticky, stickyOffsetTop, zIndex, highlightColor } = this.data;\n            const active = this.getActiveAnchorIndex();\n            this.setDiffData({\n                target: this,\n                data: {\n                    activeAnchorIndex: active,\n                },\n            });\n            if (sticky) {\n                let isActiveAnchorSticky = false;\n                if (active !== -1) {\n                    isActiveAnchorSticky =\n                        children[active].top <= stickyOffsetTop + scrollTop;\n                }\n                children.forEach((item, index) => {\n                    if (index === active) {\n                        let wrapperStyle = '';\n                        let anchorStyle = `\n              color: ${highlightColor};\n            `;\n                        if (isActiveAnchorSticky) {\n                            wrapperStyle = `\n                height: ${children[index].height}px;\n              `;\n                            anchorStyle = `\n                position: fixed;\n                top: ${stickyOffsetTop}px;\n                z-index: ${zIndex};\n                color: ${highlightColor};\n              `;\n                        }\n                        this.setDiffData({\n                            target: item,\n                            data: {\n                                active: true,\n                                anchorStyle,\n                                wrapperStyle,\n                            },\n                        });\n                    }\n                    else if (index === active - 1) {\n                        const currentAnchor = children[index];\n                        const currentOffsetTop = currentAnchor.top;\n                        const targetOffsetTop = index === children.length - 1\n                            ? this.top\n                            : children[index + 1].top;\n                        const parentOffsetHeight = targetOffsetTop - currentOffsetTop;\n                        const translateY = parentOffsetHeight - currentAnchor.height;\n                        const anchorStyle = `\n              position: relative;\n              transform: translate3d(0, ${translateY}px, 0);\n              z-index: ${zIndex};\n              color: ${highlightColor};\n            `;\n                        this.setDiffData({\n                            target: item,\n                            data: {\n                                active: true,\n                                anchorStyle,\n                            },\n                        });\n                    }\n                    else {\n                        this.setDiffData({\n                            target: item,\n                            data: {\n                                active: false,\n                                anchorStyle: '',\n                                wrapperStyle: '',\n                            },\n                        });\n                    }\n                });\n            }\n        },\n        onClick(event) {\n            this.scrollToAnchor(event.target.dataset.index);\n        },\n        onTouchMove(event) {\n            const sidebarLength = this.children.length;\n            const touch = event.touches[0];\n            const itemHeight = this.sidebar.height / sidebarLength;\n            let index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);\n            if (index < 0) {\n                index = 0;\n            }\n            else if (index > sidebarLength - 1) {\n                index = sidebarLength - 1;\n            }\n            this.scrollToAnchor(index);\n        },\n        onTouchStop() {\n            this.scrollToAnchorIndex = null;\n        },\n        scrollToAnchor(index) {\n            if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {\n                return;\n            }\n            this.scrollToAnchorIndex = index;\n            const anchor = this.children.find((item) => item.data.index === this.data.indexList[index]);\n            if (anchor) {\n                anchor.scrollIntoView(this.scrollTop);\n                this.$emit('select', anchor.data.index);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/index-bar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/index-bar/index.wxml",
    "content": "<view class=\"van-index-bar\">\n  <slot />\n\n  <view\n    wx:if=\"{{ showSidebar }}\"\n    class=\"van-index-bar__sidebar\"\n    catch:tap=\"onClick\"\n    catch:touchmove=\"onTouchMove\"\n    catch:touchend=\"onTouchStop\"\n    catch:touchcancel=\"onTouchStop\"\n  >\n    <view\n      wx:for=\"{{ indexList }}\"\n      wx:key=\"index\"\n      class=\"van-index-bar__index\"\n      style=\"z-index: {{ zIndex + 1 }}; color: {{ activeAnchorIndex === index ? highlightColor : '' }}\"\n      data-index=\"{{ index }}\"\n    >\n      {{ item }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/index-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{display:flex;flex-direction:column;position:fixed;right:0;text-align:center;top:50%;transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-size:var(--index-bar-index-font-size,10px);font-weight:500;line-height:var(--index-bar-index-line-height,14px);padding:0 var(--padding-base,4px) 0 var(--padding-md,16px)}"
  },
  {
    "path": "dist/info/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/info/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        dot: Boolean,\n        info: null,\n        customStyle: String,\n    },\n});\n"
  },
  {
    "path": "dist/info/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/info/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ info !== null && info !== '' || dot }}\"\n  class=\"van-info {{ utils.bem('info', { dot }) }} custom-class\"\n  style=\"{{ customStyle }}\"\n>{{ dot ? '' : info }}</view>\n"
  },
  {
    "path": "dist/info/index.wxss",
    "content": "@import '../common/index.wxss';.van-info{align-items:center;background-color:var(--info-background-color,#ee0a24);border:var(--info-border-width,1px) solid #fff;border-radius:var(--info-size,16px);box-sizing:border-box;color:var(--info-color,#fff);display:inline-flex;font-family:var(--info-font-family,-apple-system-font,Helvetica Neue,Arial,sans-serif);font-size:var(--info-font-size,12px);font-weight:var(--info-font-weight,500);height:var(--info-size,16px);justify-content:center;min-width:var(--info-size,16px);padding:var(--info-padding,0 3px);position:absolute;right:0;top:0;transform:translate(50%,-50%);transform-origin:100%;white-space:nowrap}.van-info--dot{background-color:var(--info-dot-color,#ee0a24);border-radius:100%;height:var(--info-dot-size,8px);min-width:0;width:var(--info-dot-size,8px)}"
  },
  {
    "path": "dist/loading/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/loading/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        color: String,\n        vertical: Boolean,\n        type: {\n            type: String,\n            value: 'circular',\n        },\n        size: String,\n        textSize: String,\n    },\n    data: {\n        array12: Array.from({ length: 12 }),\n    },\n});\n"
  },
  {
    "path": "dist/loading/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/loading/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class {{ utils.bem('loading', { vertical }) }}\">\n  <view\n    class=\"van-loading__spinner van-loading__spinner--{{ type }}\"\n    style=\"{{ computed.spinnerStyle({ color, size }) }}\"\n  >\n    <view\n      wx:if=\"{{ type === 'spinner' }}\"\n      wx:for=\"{{ array12 }}\"\n      wx:key=\"index\"\n      class=\"van-loading__dot\"\n    />\n  </view>\n  <view class=\"van-loading__text\" style=\"{{ computed.textStyle({ textSize }) }}\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/loading/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction spinnerStyle(data) {\n  return style({\n    color: data.color,\n    width: addUnit(data.size),\n    height: addUnit(data.size),\n  });\n}\n\nfunction textStyle(data) {\n  return style({\n    'font-size': addUnit(data.textSize),\n  });\n}\n\nmodule.exports = {\n  spinnerStyle: spinnerStyle,\n  textStyle: textStyle,\n};\n"
  },
  {
    "path": "dist/loading/index.wxss",
    "content": "@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{align-items:center;color:var(--loading-spinner-color,#c8c9cc);display:inline-flex;justify-content:center}.van-loading__spinner{animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.van-loading__spinner--spinner{animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-radius:100%;border-top-color:initial}.van-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.van-loading__text:empty{display:none}.van-loading--vertical{flex-direction:column}.van-loading--vertical .van-loading__text{margin:var(--padding-xs,8px) 0 0}.van-loading__dot{height:100%;left:0;position:absolute;top:0;width:100%}.van-loading__dot:before{background-color:currentColor;border-radius:40%;content:\" \";display:block;height:25%;margin:0 auto;width:2px}.van-loading__dot:first-of-type{opacity:1;transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;transform:rotate(1turn)}@keyframes van-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"
  },
  {
    "path": "dist/mixins/basic.d.ts",
    "content": "export declare const basic: string;\n"
  },
  {
    "path": "dist/mixins/basic.js",
    "content": "export const basic = Behavior({\n    methods: {\n        $emit(name, detail, options) {\n            this.triggerEvent(name, detail, options);\n        },\n        set(data) {\n            this.setData(data);\n            return new Promise((resolve) => wx.nextTick(resolve));\n        },\n        // high performance setData\n        setView(data, callback) {\n            const target = {};\n            let hasChange = false;\n            Object.keys(data).forEach((key) => {\n                if (data[key] !== this.data[key]) {\n                    target[key] = data[key];\n                    hasChange = true;\n                }\n            });\n            if (hasChange) {\n                return this.setData(target, callback);\n            }\n            return callback && callback();\n        },\n    },\n});\n"
  },
  {
    "path": "dist/mixins/button.d.ts",
    "content": "export declare const button: string;\n"
  },
  {
    "path": "dist/mixins/button.js",
    "content": "import { canIUseGetUserProfile } from '../common/version';\nexport const button = Behavior({\n    externalClasses: ['hover-class'],\n    properties: {\n        id: String,\n        buttonId: String,\n        lang: String,\n        businessId: Number,\n        sessionFrom: String,\n        sendMessageTitle: String,\n        sendMessagePath: String,\n        sendMessageImg: String,\n        showMessageCard: Boolean,\n        appParameter: String,\n        ariaLabel: String,\n        openType: String,\n        getUserProfileDesc: String,\n    },\n    data: {\n        canIUseGetUserProfile: canIUseGetUserProfile(),\n    },\n    methods: {\n        onGetUserInfo(event) {\n            this.triggerEvent('getuserinfo', event.detail);\n        },\n        onContact(event) {\n            this.triggerEvent('contact', event.detail);\n        },\n        onGetPhoneNumber(event) {\n            this.triggerEvent('getphonenumber', event.detail);\n        },\n        onGetRealTimePhoneNumber(event) {\n            this.triggerEvent('getrealtimephonenumber', event.detail);\n        },\n        onError(event) {\n            this.triggerEvent('error', event.detail);\n        },\n        onLaunchApp(event) {\n            this.triggerEvent('launchapp', event.detail);\n        },\n        onOpenSetting(event) {\n            this.triggerEvent('opensetting', event.detail);\n        },\n        onAgreePrivacyAuthorization(event) {\n            this.triggerEvent('agreeprivacyauthorization', event.detail);\n        },\n        onChooseAvatar(event) {\n            this.triggerEvent('chooseavatar', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/mixins/link.d.ts",
    "content": "export declare const link: string;\n"
  },
  {
    "path": "dist/mixins/link.js",
    "content": "export const link = Behavior({\n    properties: {\n        url: String,\n        linkType: {\n            type: String,\n            value: 'navigateTo',\n        },\n    },\n    methods: {\n        jumpLink(urlKey = 'url') {\n            const url = this.data[urlKey];\n            if (url) {\n                if (this.data.linkType === 'navigateTo' &&\n                    getCurrentPages().length > 9) {\n                    wx.redirectTo({ url });\n                }\n                else {\n                    wx[this.data.linkType]({ url });\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/mixins/page-scroll.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\ntype IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;\ntype Scroller = (this: WechatMiniprogram.Component.TrivialInstance, event?: IPageScrollOption) => void;\nexport declare function pageScrollMixin(scroller: Scroller): string;\nexport {};\n"
  },
  {
    "path": "dist/mixins/page-scroll.js",
    "content": "import { isFunction } from '../common/validator';\nimport { getCurrentPage, isDef } from '../common/utils';\nfunction onPageScroll(event) {\n    const { vanPageScroller = [] } = getCurrentPage();\n    vanPageScroller.forEach((scroller) => {\n        if (typeof scroller === 'function') {\n            // @ts-ignore\n            scroller(event);\n        }\n    });\n}\nexport function pageScrollMixin(scroller) {\n    return Behavior({\n        attached() {\n            const page = getCurrentPage();\n            if (!isDef(page)) {\n                return;\n            }\n            const _scroller = scroller.bind(this);\n            const { vanPageScroller = [] } = page;\n            if (isFunction(page.onPageScroll) && page.onPageScroll !== onPageScroll) {\n                vanPageScroller.push(page.onPageScroll.bind(page));\n            }\n            vanPageScroller.push(_scroller);\n            page.vanPageScroller = vanPageScroller;\n            page.onPageScroll = onPageScroll;\n            this._scroller = _scroller;\n        },\n        detached() {\n            const page = getCurrentPage();\n            if (!isDef(page) || !isDef(page.vanPageScroller)) {\n                return;\n            }\n            const { vanPageScroller } = page;\n            const index = vanPageScroller.findIndex((v) => v === this._scroller);\n            if (index > -1) {\n                page.vanPageScroller.splice(index, 1);\n            }\n            this._scroller = undefined;\n        },\n    });\n}\n"
  },
  {
    "path": "dist/mixins/touch.d.ts",
    "content": "export declare const touch: string;\n"
  },
  {
    "path": "dist/mixins/touch.js",
    "content": "// @ts-nocheck\nconst MIN_DISTANCE = 10;\nfunction getDirection(x, y) {\n    if (x > y && x > MIN_DISTANCE) {\n        return 'horizontal';\n    }\n    if (y > x && y > MIN_DISTANCE) {\n        return 'vertical';\n    }\n    return '';\n}\nexport const touch = Behavior({\n    methods: {\n        resetTouchStatus() {\n            this.direction = '';\n            this.deltaX = 0;\n            this.deltaY = 0;\n            this.offsetX = 0;\n            this.offsetY = 0;\n        },\n        touchStart(event) {\n            this.resetTouchStatus();\n            const touch = event.touches[0];\n            this.startX = touch.clientX;\n            this.startY = touch.clientY;\n        },\n        touchMove(event) {\n            const touch = event.touches[0];\n            this.deltaX = touch.clientX - this.startX;\n            this.deltaY = touch.clientY - this.startY;\n            this.offsetX = Math.abs(this.deltaX);\n            this.offsetY = Math.abs(this.deltaY);\n            this.direction =\n                this.direction || getDirection(this.offsetX, this.offsetY);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/mixins/transition.d.ts",
    "content": "export declare function transition(showDefaultValue: boolean): string;\n"
  },
  {
    "path": "dist/mixins/transition.js",
    "content": "// @ts-nocheck\nimport { requestAnimationFrame } from '../common/utils';\nimport { isObj } from '../common/validator';\nconst getClassNames = (name) => ({\n    enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`,\n    'enter-to': `van-${name}-enter-to van-${name}-enter-active enter-to-class enter-active-class`,\n    leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`,\n    'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class`,\n});\nexport function transition(showDefaultValue) {\n    return Behavior({\n        properties: {\n            customStyle: String,\n            // @ts-ignore\n            show: {\n                type: Boolean,\n                value: showDefaultValue,\n                observer: 'observeShow',\n            },\n            // @ts-ignore\n            duration: {\n                type: null,\n                value: 300,\n            },\n            name: {\n                type: String,\n                value: 'fade',\n            },\n        },\n        data: {\n            type: '',\n            inited: false,\n            display: false,\n        },\n        ready() {\n            if (this.data.show === true) {\n                this.observeShow(true, false);\n            }\n        },\n        methods: {\n            observeShow(value, old) {\n                if (value === old) {\n                    return;\n                }\n                value ? this.enureEnter() : this.enureLeave();\n            },\n            enureEnter() {\n                if (this.enterPromise)\n                    return;\n                this.enterPromise = new Promise((resolve) => this.enter(resolve));\n            },\n            enureLeave() {\n                const { enterPromise } = this;\n                if (!enterPromise)\n                    return;\n                enterPromise\n                    .then(() => new Promise((resolve) => this.leave(resolve)))\n                    .then(() => {\n                    this.enterPromise = null;\n                });\n            },\n            enter(resolve) {\n                const { duration, name } = this.data;\n                const classNames = getClassNames(name);\n                const currentDuration = isObj(duration) ? duration.enter : duration;\n                if (this.status === 'enter') {\n                    return;\n                }\n                this.status = 'enter';\n                this.$emit('before-enter');\n                requestAnimationFrame(() => {\n                    if (this.status !== 'enter') {\n                        return;\n                    }\n                    this.$emit('enter');\n                    this.setData({\n                        inited: true,\n                        display: true,\n                        classes: classNames.enter,\n                        currentDuration,\n                    });\n                    requestAnimationFrame(() => {\n                        if (this.status !== 'enter') {\n                            return;\n                        }\n                        this.transitionEnded = false;\n                        this.setData({ classes: classNames['enter-to'] });\n                        resolve();\n                    });\n                });\n            },\n            leave(resolve) {\n                if (!this.data.display) {\n                    return;\n                }\n                const { duration, name } = this.data;\n                const classNames = getClassNames(name);\n                const currentDuration = isObj(duration) ? duration.leave : duration;\n                this.status = 'leave';\n                this.$emit('before-leave');\n                requestAnimationFrame(() => {\n                    if (this.status !== 'leave') {\n                        return;\n                    }\n                    this.$emit('leave');\n                    this.setData({\n                        classes: classNames.leave,\n                        currentDuration,\n                    });\n                    requestAnimationFrame(() => {\n                        if (this.status !== 'leave') {\n                            return;\n                        }\n                        this.transitionEnded = false;\n                        setTimeout(() => {\n                            this.onTransitionEnd();\n                            resolve();\n                        }, currentDuration);\n                        this.setData({ classes: classNames['leave-to'] });\n                    });\n                });\n            },\n            onTransitionEnd() {\n                if (this.transitionEnded) {\n                    return;\n                }\n                this.transitionEnded = true;\n                this.$emit(`after-${this.status}`);\n                const { show, display } = this.data;\n                if (!show && display) {\n                    this.setData({ display: false });\n                }\n            },\n        },\n    });\n}\n"
  },
  {
    "path": "dist/nav-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/nav-bar/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { getRect, getSystemInfoSync } from '../common/utils';\nVantComponent({\n    classes: ['title-class'],\n    props: {\n        title: String,\n        fixed: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        placeholder: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        leftText: String,\n        rightText: String,\n        customStyle: String,\n        leftArrow: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        height: 46,\n    },\n    created() {\n        const { statusBarHeight } = getSystemInfoSync();\n        this.setData({\n            statusBarHeight,\n            height: 46 + statusBarHeight,\n        });\n    },\n    mounted() {\n        this.setHeight();\n    },\n    methods: {\n        onClickLeft() {\n            this.$emit('click-left');\n        },\n        onClickRight() {\n            this.$emit('click-right');\n        },\n        setHeight() {\n            if (!this.data.fixed || !this.data.placeholder) {\n                return;\n            }\n            wx.nextTick(() => {\n                getRect(this, '.van-nav-bar').then((res) => {\n                    if (res && 'height' in res) {\n                        this.setData({ height: res.height });\n                    }\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/nav-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/nav-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view wx:if=\"{{ fixed && placeholder }}\" style=\"height: {{ height }}px;\" />\n\n<view\n  class=\"{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}\"\n  style=\"{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}\"\n>\n  <view class=\"van-nav-bar__content\">\n    <view class=\"van-nav-bar__left\" bind:tap=\"onClickLeft\">\n      <block wx:if=\"{{ leftArrow || leftText }}\">\n        <van-icon\n          wx:if=\"{{ leftArrow }}\"\n          size=\"16px\"\n          name=\"arrow-left\"\n          custom-class=\"van-nav-bar__arrow\"\n        />\n        <view\n          wx:if=\"{{ leftText }}\"\n          class=\"van-nav-bar__text\"\n          hover-class=\"van-nav-bar__text--hover\"\n          hover-stay-time=\"70\"\n        >{{ leftText }}</view>\n      </block>\n      <slot wx:else name=\"left\" />\n    </view>\n    <view class=\"van-nav-bar__title title-class van-ellipsis\">\n      <block wx:if=\"{{ title }}\">{{ title }}</block>\n      <slot wx:else name=\"title\" />\n    </view>\n    <view class=\"van-nav-bar__right\" bind:tap=\"onClickRight\">\n      <view\n        wx:if=\"{{ rightText }}\"\n        class=\"van-nav-bar__text\"\n        hover-class=\"van-nav-bar__text--hover\"\n        hover-stay-time=\"70\"\n      >{{ rightText }}</view>\n      <slot wx:else name=\"right\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/nav-bar/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction barStyle(data) {\n  return style({\n    'z-index': data.zIndex,\n    'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,\n  });\n}\n\nmodule.exports = {\n  barStyle: barStyle,\n};\n"
  },
  {
    "path": "dist/nav-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-nav-bar{background-color:var(--nav-bar-background-color,#fff);box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.van-nav-bar__content{height:100%;position:relative}.van-nav-bar__text{color:var(--nav-bar-text-color,#1989fa);display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.van-nav-bar__text--hover{background-color:#f2f3f5}.van-nav-bar__arrow{color:var(--nav-bar-icon-color,#1989fa)!important;font-size:var(--nav-bar-arrow-size,16px)!important;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.van-nav-bar__title{color:var(--nav-bar-title-text-color,#323233);font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--font-weight-bold,500);margin:0 auto;max-width:60%}.van-nav-bar__left,.van-nav-bar__right{align-items:center;bottom:0;display:flex;font-size:var(--font-size-md,14px);position:absolute;top:0}.van-nav-bar__left{left:var(--padding-md,16px)}.van-nav-bar__right{right:var(--padding-md,16px)}"
  },
  {
    "path": "dist/notice-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/notice-bar/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { getRect, requestAnimationFrame } from '../common/utils';\nVantComponent({\n    props: {\n        text: {\n            type: String,\n            value: '',\n            observer: 'init',\n        },\n        mode: {\n            type: String,\n            value: '',\n        },\n        url: {\n            type: String,\n            value: '',\n        },\n        openType: {\n            type: String,\n            value: 'navigate',\n        },\n        delay: {\n            type: Number,\n            value: 1,\n        },\n        speed: {\n            type: Number,\n            value: 60,\n            observer: 'init',\n        },\n        scrollable: null,\n        leftIcon: {\n            type: String,\n            value: '',\n        },\n        color: String,\n        backgroundColor: String,\n        background: String,\n        wrapable: Boolean,\n    },\n    data: {\n        show: true,\n    },\n    created() {\n        this.resetAnimation = wx.createAnimation({\n            duration: 0,\n            timingFunction: 'linear',\n        });\n    },\n    destroyed() {\n        this.timer && clearTimeout(this.timer);\n    },\n    mounted() {\n        this.init();\n    },\n    methods: {\n        init() {\n            requestAnimationFrame(() => {\n                Promise.all([\n                    getRect(this, '.van-notice-bar__content'),\n                    getRect(this, '.van-notice-bar__wrap'),\n                ]).then((rects) => {\n                    const [contentRect, wrapRect] = rects;\n                    const { scrollable } = this.data;\n                    if (contentRect == null ||\n                        wrapRect == null ||\n                        !contentRect.width ||\n                        !wrapRect.width ||\n                        scrollable === false) {\n                        return;\n                    }\n                    if (scrollable || wrapRect.width < contentRect.width) {\n                        this.initAnimation(wrapRect.width, contentRect.width);\n                        this.scroll(true);\n                    }\n                });\n            });\n        },\n        initAnimation(warpWidth, contentWidth) {\n            const { speed, delay } = this.data;\n            this.wrapWidth = warpWidth;\n            this.contentWidth = contentWidth;\n            // begin 0\n            this.contentDuration = (contentWidth / speed) * 1000;\n            // begin -wrapWidth\n            this.duration = ((warpWidth + contentWidth) / speed) * 1000;\n            this.animation = wx.createAnimation({\n                duration: this.contentDuration,\n                timingFunction: 'linear',\n                delay,\n            });\n        },\n        scroll(isInit = false) {\n            this.timer && clearTimeout(this.timer);\n            this.timer = null;\n            this.setData({\n                animationData: this.resetAnimation\n                    .translateX(isInit ? 0 : this.wrapWidth)\n                    .step()\n                    .export(),\n            });\n            const duration = isInit ? this.contentDuration : this.duration;\n            requestAnimationFrame(() => {\n                this.setData({\n                    animationData: this.animation\n                        .translateX(-this.contentWidth)\n                        .step({ duration })\n                        .export(),\n                });\n            });\n            this.timer = setTimeout(() => {\n                this.scroll();\n            }, duration + this.data.delay);\n        },\n        onClickIcon(event) {\n            if (this.data.mode === 'closeable') {\n                this.timer && clearTimeout(this.timer);\n                this.timer = null;\n                this.setData({ show: false });\n                this.$emit('close', event.detail);\n            }\n        },\n        onClick(event) {\n            this.$emit('click', event);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/notice-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/notice-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  wx:if=\"{{ show }}\"\n  class=\"custom-class {{ utils.bem('notice-bar', { withicon: mode, wrapable }) }}\"\n  style=\"{{ computed.rootStyle({ color, backgroundColor, background }) }}\"\n  bind:tap=\"onClick\"\n>\n  <van-icon\n    wx:if=\"{{ leftIcon }}\"\n    name=\"{{ leftIcon }}\"\n    class=\"van-notice-bar__left-icon\"\n  />\n  <slot wx:else name=\"left-icon\" />\n\n  <view class=\"van-notice-bar__wrap\">\n    <view class=\"van-notice-bar__content {{ scrollable === false && !wrapable ? 'van-ellipsis' : '' }}\" animation=\"{{ animationData }}\">\n      {{ text }}\n      <slot wx:if=\"{{ !text }}\"></slot>\n    </view>\n  </view>\n\n  <van-icon\n    wx:if=\"{{ mode === 'closeable' }}\"\n    class=\"van-notice-bar__right-icon\"\n    name=\"cross\"\n    catch:tap=\"onClickIcon\"\n  />\n  <navigator\n    wx:elif=\"{{ mode === 'link' }}\"\n    url=\"{{ url }}\"\n    open-type=\"{{ openType }}\"\n  >\n    <van-icon class=\"van-notice-bar__right-icon\" name=\"arrow\" />\n  </navigator>\n  <slot wx:else name=\"right-icon\" />\n</view>\n"
  },
  {
    "path": "dist/notice-bar/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    color: data.color,\n    'background-color': data.backgroundColor,\n    background: data.background,\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "dist/notice-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-notice-bar{align-items:center;background-color:var(--notice-bar-background-color,#fffbe8);color:var(--notice-bar-text-color,#ed6a0c);display:flex;font-size:var(--notice-bar-font-size,14px);height:var(--notice-bar-height,40px);line-height:var(--notice-bar-line-height,24px);padding:var(--notice-bar-padding,0 16px)}.van-notice-bar--withicon{padding-right:40px;position:relative}.van-notice-bar--wrapable{height:auto;padding:var(--notice-bar-wrapable-padding,8px 16px)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{align-items:center;display:flex;margin-right:4px;vertical-align:middle}.van-notice-bar__left-icon,.van-notice-bar__right-icon{font-size:var(--notice-bar-icon-size,16px);min-width:var(--notice-bar-icon-min-width,22px)}.van-notice-bar__right-icon{position:absolute;right:15px;top:10px}.van-notice-bar__wrap{flex:1;height:var(--notice-bar-line-height,24px);overflow:hidden;position:relative}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}"
  },
  {
    "path": "dist/notify/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/notify/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { WHITE } from '../common/color';\nimport { getSystemInfoSync } from '../common/utils';\nVantComponent({\n    props: {\n        message: String,\n        background: String,\n        type: {\n            type: String,\n            value: 'danger',\n        },\n        color: {\n            type: String,\n            value: WHITE,\n        },\n        duration: {\n            type: Number,\n            value: 3000,\n        },\n        zIndex: {\n            type: Number,\n            value: 110,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: false,\n        },\n        top: null,\n    },\n    data: {\n        show: false,\n        onOpened: null,\n        onClose: null,\n        onClick: null,\n    },\n    created() {\n        const { statusBarHeight } = getSystemInfoSync();\n        this.setData({ statusBarHeight });\n    },\n    methods: {\n        show() {\n            const { duration, onOpened } = this.data;\n            clearTimeout(this.timer);\n            this.setData({ show: true });\n            wx.nextTick(onOpened);\n            if (duration > 0 && duration !== Infinity) {\n                this.timer = setTimeout(() => {\n                    this.hide();\n                }, duration);\n            }\n        },\n        hide() {\n            const { onClose } = this.data;\n            clearTimeout(this.timer);\n            this.setData({ show: false });\n            wx.nextTick(onClose);\n        },\n        onTap(event) {\n            const { onClick } = this.data;\n            if (onClick) {\n                onClick(event.detail);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/notify/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "dist/notify/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-transition\n  name=\"slide-down\"\n  show=\"{{ show }}\"\n  custom-class=\"van-notify__container\"\n  custom-style=\"{{ computed.rootStyle({ zIndex, top }) }}\"\n  bind:tap=\"onTap\"\n>\n  <view\n    class=\"van-notify van-notify--{{ type }}\"\n    style=\"{{ computed.notifyStyle({ background, color }) }}\"\n  >\n    <view\n      wx:if=\"{{ safeAreaInsetTop }}\"\n      style=\"height: {{ statusBarHeight }}px\"\n    />\n    <text>{{ message }}</text>\n  </view>\n</van-transition>\n"
  },
  {
    "path": "dist/notify/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'z-index': data.zIndex,\n    top: addUnit(data.top),\n  });\n}\n\nfunction notifyStyle(data) {\n  return style({\n    background: data.background,\n    color: data.color,\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  notifyStyle: notifyStyle,\n};\n"
  },
  {
    "path": "dist/notify/index.wxss",
    "content": "@import '../common/index.wxss';.van-notify{word-wrap:break-word;font-size:var(--notify-font-size,14px);line-height:var(--notify-line-height,20px);padding:var(--notify-padding,6px 15px);text-align:center}.van-notify__container{box-sizing:border-box;left:0;position:fixed;top:0;width:100%}.van-notify--primary{background-color:var(--notify-primary-background-color,#1989fa)}.van-notify--success{background-color:var(--notify-success-background-color,#07c160)}.van-notify--danger{background-color:var(--notify-danger-background-color,#ee0a24)}.van-notify--warning{background-color:var(--notify-warning-background-color,#ff976a)}"
  },
  {
    "path": "dist/notify/notify.d.ts",
    "content": "interface NotifyOptions {\n    type?: 'primary' | 'success' | 'danger' | 'warning';\n    color?: string;\n    zIndex?: number;\n    top?: number;\n    message: string;\n    context?: any;\n    duration?: number;\n    selector?: string;\n    background?: string;\n    safeAreaInsetTop?: boolean;\n    onClick?: () => void;\n    onOpened?: () => void;\n    onClose?: () => void;\n}\ndeclare function Notify(options: NotifyOptions | string): any;\ndeclare namespace Notify {\n    var clear: (options?: NotifyOptions | undefined) => void;\n    var setDefaultOptions: (options: NotifyOptions) => void;\n    var resetDefaultOptions: () => void;\n}\nexport default Notify;\n"
  },
  {
    "path": "dist/notify/notify.js",
    "content": "import { WHITE } from '../common/color';\nconst defaultOptions = {\n    selector: '#van-notify',\n    type: 'danger',\n    message: '',\n    background: '',\n    duration: 3000,\n    zIndex: 110,\n    top: 0,\n    color: WHITE,\n    safeAreaInsetTop: false,\n    onClick: () => { },\n    onOpened: () => { },\n    onClose: () => { },\n};\nlet currentOptions = Object.assign({}, defaultOptions);\nfunction parseOptions(message) {\n    if (message == null) {\n        return {};\n    }\n    return typeof message === 'string' ? { message } : message;\n}\nfunction getContext() {\n    const pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nexport default function Notify(options) {\n    options = Object.assign(Object.assign({}, currentOptions), parseOptions(options));\n    const context = options.context || getContext();\n    const notify = context.selectComponent(options.selector);\n    delete options.context;\n    delete options.selector;\n    if (notify) {\n        notify.setData(options);\n        notify.show();\n        return notify;\n    }\n    console.warn('未找到 van-notify 节点，请确认 selector 及 context 是否正确');\n}\nNotify.clear = function (options) {\n    options = Object.assign(Object.assign({}, defaultOptions), parseOptions(options));\n    const context = options.context || getContext();\n    const notify = context.selectComponent(options.selector);\n    if (notify) {\n        notify.hide();\n    }\n};\nNotify.setDefaultOptions = (options) => {\n    Object.assign(currentOptions, options);\n};\nNotify.resetDefaultOptions = () => {\n    currentOptions = Object.assign({}, defaultOptions);\n};\n"
  },
  {
    "path": "dist/overlay/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/overlay/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        show: Boolean,\n        customStyle: String,\n        duration: {\n            type: null,\n            value: 300,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        lockScroll: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onClick() {\n            this.$emit('click');\n        },\n        // for prevent touchmove\n        noop() { },\n    },\n});\n"
  },
  {
    "path": "dist/overlay/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "dist/overlay/index.wxml",
    "content": "<import src=\"./overlay.wxml\" />\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./overlay.wxml\" />\n</root-portal>\n\n<include wx:else src=\"./overlay.wxml\" />\n"
  },
  {
    "path": "dist/overlay/index.wxss",
    "content": "@import '../common/index.wxss';.van-overlay{background-color:var(--overlay-background-color,rgba(0,0,0,.7));height:100%;left:0;position:fixed;top:0;width:100%}"
  },
  {
    "path": "dist/overlay/overlay.wxml",
    "content": "<van-transition\n  show=\"{{ show }}\"\n  custom-class=\"van-overlay custom-class\"\n  custom-style=\"z-index: {{ zIndex }}; {{ customStyle }}\"\n  duration=\"{{ duration }}\"\n  bind:tap=\"onClick\"\n  catch:touchmove=\"{{ lockScroll ? 'noop' : ''}}\"\n>\n  <slot></slot>\n</van-transition>"
  },
  {
    "path": "dist/panel/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/panel/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    classes: ['header-class', 'footer-class'],\n    props: {\n        desc: String,\n        title: String,\n        status: String,\n    },\n});\n"
  },
  {
    "path": "dist/panel/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\"\n  }\n}\n"
  },
  {
    "path": "dist/panel/index.wxml",
    "content": "<view class=\"van-panel van-hairline--top-bottom custom-class\">\n  <van-cell\n    wx:if=\"{{ title || desc || status }}\"\n    title=\"{{ title }}\"\n    label=\"{{ desc }}\"\n    value=\"{{ status }}\"\n    custom-class=\"header-class\"\n    value-class=\"van-panel__header-value\"\n  />\n  <slot wx:else name=\"header\" />\n\n  <view class=\"van-panel__content\">\n    <slot />\n  </view>\n\n  <view class=\"van-panel__footer van-hairline--top footer-class\">\n    <slot name=\"footer\" />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/panel/index.wxss",
    "content": "@import '../common/index.wxss';.van-panel{background:var(--panel-background-color,#fff)}.van-panel__header-value{color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:var(--panel-footer-padding,8px 16px)}.van-panel__footer:empty{display:none}"
  },
  {
    "path": "dist/picker/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/picker/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { pickerProps } from './shared';\nVantComponent({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: Object.assign(Object.assign({}, pickerProps), { valueKey: {\n            type: String,\n            value: 'text',\n        }, toolbarPosition: {\n            type: String,\n            value: 'top',\n        }, defaultIndex: {\n            type: Number,\n            value: 0,\n        }, columns: {\n            type: Array,\n            value: [],\n            observer(columns = []) {\n                this.simple = columns.length && !columns[0].values;\n                if (Array.isArray(this.children) && this.children.length) {\n                    this.setColumns().catch(() => { });\n                }\n            },\n        } }),\n    beforeCreate() {\n        Object.defineProperty(this, 'children', {\n            get: () => this.selectAllComponents('.van-picker__column') || [],\n        });\n    },\n    methods: {\n        noop() { },\n        setColumns() {\n            const { data } = this;\n            const columns = this.simple ? [{ values: data.columns }] : data.columns;\n            const stack = columns.map((column, index) => this.setColumnValues(index, column.values));\n            return Promise.all(stack);\n        },\n        emit(event) {\n            const { type } = event.currentTarget.dataset;\n            if (this.simple) {\n                this.$emit(type, {\n                    value: this.getColumnValue(0),\n                    index: this.getColumnIndex(0),\n                });\n            }\n            else {\n                this.$emit(type, {\n                    value: this.getValues(),\n                    index: this.getIndexes(),\n                });\n            }\n        },\n        onChange(event) {\n            if (this.simple) {\n                this.$emit('change', {\n                    picker: this,\n                    value: this.getColumnValue(0),\n                    index: this.getColumnIndex(0),\n                });\n            }\n            else {\n                this.$emit('change', {\n                    picker: this,\n                    value: this.getValues(),\n                    index: event.currentTarget.dataset.index,\n                });\n            }\n        },\n        // get column instance by index\n        getColumn(index) {\n            return this.children[index];\n        },\n        // get column value by index\n        getColumnValue(index) {\n            const column = this.getColumn(index);\n            return column && column.getValue();\n        },\n        // set column value by index\n        setColumnValue(index, value) {\n            const column = this.getColumn(index);\n            if (column == null) {\n                return Promise.reject(new Error('setColumnValue: 对应列不存在'));\n            }\n            return column.setValue(value);\n        },\n        // get column option index by column index\n        getColumnIndex(columnIndex) {\n            return (this.getColumn(columnIndex) || {}).data.currentIndex;\n        },\n        // set column option index by column index\n        setColumnIndex(columnIndex, optionIndex) {\n            const column = this.getColumn(columnIndex);\n            if (column == null) {\n                return Promise.reject(new Error('setColumnIndex: 对应列不存在'));\n            }\n            return column.setIndex(optionIndex);\n        },\n        // get options of column by index\n        getColumnValues(index) {\n            return (this.children[index] || {}).data.options;\n        },\n        // set options of column by index\n        setColumnValues(index, options, needReset = true) {\n            const column = this.children[index];\n            if (column == null) {\n                return Promise.reject(new Error('setColumnValues: 对应列不存在'));\n            }\n            const isSame = JSON.stringify(column.data.options) === JSON.stringify(options);\n            if (isSame) {\n                return Promise.resolve();\n            }\n            return column.set({ options }).then(() => {\n                if (needReset) {\n                    column.setIndex(0);\n                }\n            });\n        },\n        // get values of all columns\n        getValues() {\n            return this.children.map((child) => child.getValue());\n        },\n        // set values of all columns\n        setValues(values) {\n            const stack = values.map((value, index) => this.setColumnValue(index, value));\n            return Promise.all(stack);\n        },\n        // get indexes of all columns\n        getIndexes() {\n            return this.children.map((child) => child.data.currentIndex);\n        },\n        // set indexes of all columns\n        setIndexes(indexes) {\n            const stack = indexes.map((optionIndex, columnIndex) => this.setColumnIndex(columnIndex, optionIndex));\n            return Promise.all(stack);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/picker/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"picker-column\": \"../picker-column/index\",\n    \"loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "dist/picker/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-picker custom-class\">\n  <include wx:if=\"{{ toolbarPosition === 'top' }}\" src=\"./toolbar.wxml\" />\n\n  <view wx:if=\"{{ loading }}\" class=\"van-picker__loading\">\n    <loading color=\"#1989fa\"/>\n  </view>\n\n  <view\n    class=\"van-picker__columns\"\n    style=\"{{ computed.columnsStyle({ itemHeight, visibleItemCount }) }}\"\n    catch:touchmove=\"noop\"\n  >\n    <picker-column\n      class=\"van-picker__column\"\n      wx:for=\"{{ computed.columns(columns) }}\"\n      wx:key=\"index\"\n      data-index=\"{{ index }}\"\n      custom-class=\"column-class\"\n      value-key=\"{{ valueKey }}\"\n      initial-options=\"{{ item.values }}\"\n      default-index=\"{{ item.defaultIndex || defaultIndex }}\"\n      item-height=\"{{ itemHeight }}\"\n      visible-item-count=\"{{ visibleItemCount }}\"\n      active-class=\"active-class\"\n      bind:change=\"onChange\"\n    />\n    <view class=\"van-picker__mask\" style=\"{{ computed.maskStyle({ itemHeight, visibleItemCount }) }}\" />\n    <view\n      class=\"van-picker__frame van-hairline--top-bottom\"\n      style=\"{{ computed.frameStyle({ itemHeight }) }}\"\n    />\n  </view>\n\n  <include wx:if=\"{{ toolbarPosition === 'bottom' }}\" src=\"./toolbar.wxml\" />\n</view>\n"
  },
  {
    "path": "dist/picker/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\nvar array = require('../wxs/array.wxs');\n\nfunction columnsStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight * data.visibleItemCount),\n  });\n}\n\nfunction maskStyle(data) {\n  return style({\n    'background-size':\n      '100% ' + addUnit((data.itemHeight * (data.visibleItemCount - 1)) / 2),\n  });\n}\n\nfunction frameStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight),\n  });\n}\n\nfunction columns(columns) {\n  if (!array.isArray(columns)) {\n    return [];\n  }\n\n  if (columns.length && !columns[0].values) {\n    return [{ values: columns }];\n  }\n\n  return columns;\n}\n\nmodule.exports = {\n  columnsStyle: columnsStyle,\n  frameStyle: frameStyle,\n  maskStyle: maskStyle,\n  columns: columns,\n};\n"
  },
  {
    "path": "dist/picker/index.wxss",
    "content": "@import '../common/index.wxss';.van-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,#fff);overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.van-picker__cancel,.van-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.van-picker__cancel--hover,.van-picker__confirm--hover{opacity:.7}.van-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.van-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.van-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);max-width:50%;text-align:center}.van-picker__columns{display:flex;position:relative}.van-picker__column{flex:1 1;width:0}.van-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,hsla(0,0%,100%,.9));bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:4}.van-picker__mask{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-image:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-position:top,bottom;background-repeat:no-repeat;height:100%;left:0;top:0;width:100%;z-index:2}.van-picker__frame,.van-picker__mask{pointer-events:none;position:absolute}.van-picker__frame{left:16px;right:16px;top:50%;transform:translateY(-50%);z-index:1}"
  },
  {
    "path": "dist/picker/shared.d.ts",
    "content": "export declare const pickerProps: {\n    title: StringConstructor;\n    loading: BooleanConstructor;\n    showToolbar: BooleanConstructor;\n    cancelButtonText: {\n        type: StringConstructor;\n        value: string;\n    };\n    confirmButtonText: {\n        type: StringConstructor;\n        value: string;\n    };\n    visibleItemCount: {\n        type: NumberConstructor;\n        value: number;\n    };\n    itemHeight: {\n        type: NumberConstructor;\n        value: number;\n    };\n};\n"
  },
  {
    "path": "dist/picker/shared.js",
    "content": "export const pickerProps = {\n    title: String,\n    loading: Boolean,\n    showToolbar: Boolean,\n    cancelButtonText: {\n        type: String,\n        value: '取消',\n    },\n    confirmButtonText: {\n        type: String,\n        value: '确认',\n    },\n    visibleItemCount: {\n        type: Number,\n        value: 6,\n    },\n    itemHeight: {\n        type: Number,\n        value: 44,\n    },\n};\n"
  },
  {
    "path": "dist/picker/toolbar.wxml",
    "content": "<view wx:if=\"{{ showToolbar }}\" class=\"van-picker__toolbar toolbar-class\">\n  <view\n    class=\"van-picker__cancel\"\n    hover-class=\"van-picker__cancel--hover\"\n    hover-stay-time=\"70\"\n    data-type=\"cancel\"\n    bindtap=\"emit\"\n  >\n    {{ cancelButtonText }}\n  </view>\n  <view wx:if=\"{{ title }}\" class=\"van-picker__title van-ellipsis\">{{\n    title\n  }}</view>\n  <view\n    class=\"van-picker__confirm\"\n    hover-class=\"van-picker__confirm--hover\"\n    hover-stay-time=\"70\"\n    data-type=\"confirm\"\n    bindtap=\"emit\"\n  >\n    {{ confirmButtonText }}\n  </view>\n</view>\n"
  },
  {
    "path": "dist/picker-column/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/picker-column/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { range } from '../common/utils';\nimport { isObj } from '../common/validator';\nconst DEFAULT_DURATION = 200;\nVantComponent({\n    classes: ['active-class'],\n    props: {\n        valueKey: String,\n        className: String,\n        itemHeight: Number,\n        visibleItemCount: Number,\n        initialOptions: {\n            type: Array,\n            value: [],\n        },\n        defaultIndex: {\n            type: Number,\n            value: 0,\n            observer(value) {\n                this.setIndex(value);\n            },\n        },\n    },\n    data: {\n        startY: 0,\n        offset: 0,\n        duration: 0,\n        startOffset: 0,\n        options: [],\n        currentIndex: 0,\n    },\n    created() {\n        const { defaultIndex, initialOptions } = this.data;\n        this.set({\n            currentIndex: defaultIndex,\n            options: initialOptions,\n        }).then(() => {\n            this.setIndex(defaultIndex);\n        });\n    },\n    methods: {\n        getCount() {\n            return this.data.options.length;\n        },\n        onTouchStart(event) {\n            this.setData({\n                startY: event.touches[0].clientY,\n                startOffset: this.data.offset,\n                duration: 0,\n            });\n        },\n        onTouchMove(event) {\n            const { data } = this;\n            const deltaY = event.touches[0].clientY - data.startY;\n            this.setData({\n                offset: range(data.startOffset + deltaY, -(this.getCount() * data.itemHeight), data.itemHeight),\n            });\n        },\n        onTouchEnd() {\n            const { data } = this;\n            if (data.offset !== data.startOffset) {\n                this.setData({ duration: DEFAULT_DURATION });\n                const index = range(Math.round(-data.offset / data.itemHeight), 0, this.getCount() - 1);\n                this.setIndex(index, true);\n            }\n        },\n        onClickItem(event) {\n            const { index } = event.currentTarget.dataset;\n            this.setIndex(index, true);\n        },\n        adjustIndex(index) {\n            const { data } = this;\n            const count = this.getCount();\n            index = range(index, 0, count);\n            for (let i = index; i < count; i++) {\n                if (!this.isDisabled(data.options[i]))\n                    return i;\n            }\n            for (let i = index - 1; i >= 0; i--) {\n                if (!this.isDisabled(data.options[i]))\n                    return i;\n            }\n        },\n        isDisabled(option) {\n            return isObj(option) && option.disabled;\n        },\n        getOptionText(option) {\n            const { data } = this;\n            return isObj(option) && data.valueKey in option\n                ? option[data.valueKey]\n                : option;\n        },\n        setIndex(index, userAction) {\n            const { data } = this;\n            index = this.adjustIndex(index) || 0;\n            const offset = -index * data.itemHeight;\n            if (index !== data.currentIndex) {\n                return this.set({ offset, currentIndex: index }).then(() => {\n                    userAction && this.$emit('change', index);\n                });\n            }\n            return this.set({ offset });\n        },\n        setValue(value) {\n            const { options } = this.data;\n            for (let i = 0; i < options.length; i++) {\n                if (this.getOptionText(options[i]) === value) {\n                    return this.setIndex(i);\n                }\n            }\n            return Promise.resolve();\n        },\n        getValue() {\n            const { data } = this;\n            return data.options[data.currentIndex];\n        },\n    },\n});\n"
  },
  {
    "path": "dist/picker-column/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/picker-column/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-picker-column custom-class\"\n  style=\"{{ computed.rootStyle({ itemHeight, visibleItemCount }) }}\"\n  bind:touchstart=\"onTouchStart\"\n  catch:touchmove=\"onTouchMove\"\n  bind:touchend=\"onTouchEnd\"\n  bind:touchcancel=\"onTouchEnd\"\n>\n  <view style=\"{{ computed.wrapperStyle({ offset, itemHeight, visibleItemCount, duration }) }}\">\n    <view\n      wx:for=\"{{ options }}\"\n      wx:for-item=\"option\"\n      wx:key=\"index\"\n      data-index=\"{{ index }}\"\n      style=\"height: {{ itemHeight }}px\"\n      class=\"van-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: index === currentIndex }) }} {{ index === currentIndex ? 'active-class' : '' }}\"\n      bindtap=\"onClickItem\"\n    >{{ computed.optionText(option, valueKey) }}</view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/picker-column/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction isObj(x) {\n  var type = typeof x;\n  return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction optionText(option, valueKey) {\n  return isObj(option) && option[valueKey] != null ? option[valueKey] : option;\n}\n\nfunction rootStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight * data.visibleItemCount),\n  });\n}\n\nfunction wrapperStyle(data) {\n  var offset = addUnit(\n    data.offset + (data.itemHeight * (data.visibleItemCount - 1)) / 2\n  );\n\n  return style({\n    transition: 'transform ' + data.duration + 'ms',\n    'line-height': addUnit(data.itemHeight),\n    transform: 'translate3d(0, ' + offset + ', 0)',\n  });\n}\n\nmodule.exports = {\n  optionText: optionText,\n  rootStyle: rootStyle,\n  wrapperStyle: wrapperStyle,\n};\n"
  },
  {
    "path": "dist/picker-column/index.wxss",
    "content": "@import '../common/index.wxss';.van-picker-column{color:var(--picker-option-text-color,#000);font-size:var(--picker-option-font-size,16px);overflow:hidden;text-align:center}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{color:var(--picker-option-selected-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}"
  },
  {
    "path": "dist/popup/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/popup/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { transition } from '../mixins/transition';\nVantComponent({\n    classes: [\n        'enter-class',\n        'enter-active-class',\n        'enter-to-class',\n        'leave-class',\n        'leave-active-class',\n        'leave-to-class',\n        'close-icon-class',\n    ],\n    mixins: [transition(false)],\n    props: {\n        round: Boolean,\n        closeable: Boolean,\n        customStyle: String,\n        overlayStyle: String,\n        transition: {\n            type: String,\n            observer: 'observeClass',\n        },\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeIcon: {\n            type: String,\n            value: 'cross',\n        },\n        closeIconPosition: {\n            type: String,\n            value: 'top-right',\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        position: {\n            type: String,\n            value: 'center',\n            observer: 'observeClass',\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: false,\n        },\n        safeAreaTabBar: {\n            type: Boolean,\n            value: false,\n        },\n        lockScroll: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    created() {\n        this.observeClass();\n    },\n    methods: {\n        onClickCloseIcon() {\n            this.$emit('close');\n        },\n        onClickOverlay() {\n            this.$emit('click-overlay');\n            if (this.data.closeOnClickOverlay) {\n                this.$emit('close');\n            }\n        },\n        observeClass() {\n            const { transition, position, duration } = this.data;\n            const updateData = {\n                name: transition || position,\n            };\n            if (transition === 'none') {\n                updateData.duration = 0;\n                this.originDuration = duration;\n            }\n            else if (this.originDuration != null) {\n                updateData.duration = this.originDuration;\n            }\n            this.setData(updateData);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/popup/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-overlay\": \"../overlay/index\"\n  }\n}\n"
  },
  {
    "path": "dist/popup/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<import src=\"./popup.wxml\" />\n\n<van-overlay\n  wx:if=\"{{ overlay }}\"\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  custom-style=\"{{ overlayStyle }}\"\n  duration=\"{{ duration }}\"\n  bind:click=\"onClickOverlay\"\n  lock-scroll=\"{{ lockScroll }}\"\n  root-portal=\"{{ rootPortal }}\"\n/>\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./popup.wxml\" />\n</root-portal>\n\n <include wx:else src=\"./popup.wxml\" />\n"
  },
  {
    "path": "dist/popup/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction popupStyle(data) {\n  return style([\n    {\n      'z-index': data.zIndex,\n      '-webkit-transition-duration': data.currentDuration + 'ms',\n      'transition-duration': data.currentDuration + 'ms',\n    },\n    data.display ? null : 'display: none',\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  popupStyle: popupStyle,\n};\n"
  },
  {
    "path": "dist/popup/index.wxss",
    "content": "@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--bottom.van-popup--safeTabBar,.van-popup--top.van-popup--safeTabBar{bottom:var(--tabbar-height,50px)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}"
  },
  {
    "path": "dist/popup/popup.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n<view\n  wx:if=\"{{ inited }}\"\n  class=\"custom-class {{ classes }} {{ utils.bem('popup', [position, { round, safe: safeAreaInsetBottom, safeTop: safeAreaInsetTop, safeTabBar: safeAreaTabBar }]) }}\"\n  style=\"{{ computed.popupStyle({ zIndex, currentDuration, display, customStyle }) }}\"\n  bind:transitionend=\"onTransitionEnd\"\n>\n  <slot />\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"{{ closeIcon }}\"\n    class=\"close-icon-class van-popup__close-icon van-popup__close-icon--{{ closeIconPosition }}\"\n    bind:tap=\"onClickCloseIcon\"\n  />\n</view>\n"
  },
  {
    "path": "dist/progress/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/progress/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { BLUE } from '../common/color';\nimport { getRect } from '../common/utils';\nVantComponent({\n    props: {\n        inactive: Boolean,\n        percentage: {\n            type: Number,\n            observer: 'setLeft',\n        },\n        pivotText: String,\n        pivotColor: String,\n        trackColor: String,\n        showPivot: {\n            type: Boolean,\n            value: true,\n        },\n        color: {\n            type: String,\n            value: BLUE,\n        },\n        textColor: {\n            type: String,\n            value: '#fff',\n        },\n        strokeWidth: {\n            type: null,\n            value: 4,\n        },\n    },\n    data: {\n        right: 0,\n    },\n    mounted() {\n        this.setLeft();\n    },\n    methods: {\n        setLeft() {\n            Promise.all([\n                getRect(this, '.van-progress'),\n                getRect(this, '.van-progress__pivot'),\n            ]).then(([portion, pivot]) => {\n                if (portion && pivot) {\n                    this.setData({\n                        right: (pivot.width * (this.data.percentage - 100)) / 100,\n                    });\n                }\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/progress/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/progress/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-progress custom-class\"\n  style=\"{{ computed.rootStyle({ strokeWidth, trackColor }) }}\"\n>\n  <view\n    class=\"van-progress__portion\"\n    style=\"{{ computed.portionStyle({ percentage, inactive, color }) }}\"\n  >\n    <view\n      wx:if=\"{{ showPivot && computed.pivotText(pivotText, percentage) }}\"\n      style=\"{{ computed.pivotStyle({ textColor, pivotColor, inactive, color, right }) }}\"\n      class=\"van-progress__pivot\"\n    >\n      {{ computed.pivotText(pivotText, percentage) }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/progress/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction pivotText(pivotText, percentage) {\n  return pivotText || percentage + '%';\n}\n\nfunction rootStyle(data) {\n  return style({\n    'height': data.strokeWidth ? utils.addUnit(data.strokeWidth) : '',\n    'background': data.trackColor,\n  });\n}\n\nfunction portionStyle(data) {\n  return style({\n    background: data.inactive ? '#cacaca' : data.color,\n    width: data.percentage ? data.percentage + '%' : '',\n  });\n}\n\nfunction pivotStyle(data) {\n  return style({\n    color: data.textColor,\n    right: data.right + 'px',\n    background: data.pivotColor ? data.pivotColor : data.inactive ? '#cacaca' : data.color,\n  });\n}\n\nmodule.exports = {\n  pivotText: pivotText,\n  rootStyle: rootStyle,\n  portionStyle: portionStyle,\n  pivotStyle: pivotStyle,\n};\n"
  },
  {
    "path": "dist/progress/index.wxss",
    "content": "@import '../common/index.wxss';.van-progress{background:var(--progress-background-color,#ebedf0);border-radius:var(--progress-height,4px);height:var(--progress-height,4px);position:relative}.van-progress__portion{background:var(--progress-color,#1989fa);border-radius:inherit;height:100%;left:0;position:absolute}.van-progress__pivot{background-color:var(--progress-pivot-background-color,#1989fa);border-radius:1em;box-sizing:border-box;color:var(--progress-pivot-text-color,#fff);font-size:var(--progress-pivot-font-size,10px);line-height:var(--progress-pivot-line-height,1.6);min-width:3.6em;padding:var(--progress-pivot-padding,0 5px);position:absolute;text-align:center;top:50%;transform:translateY(-50%);word-break:keep-all}"
  },
  {
    "path": "dist/radio/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/radio/index.js",
    "content": "import { canIUseModel } from '../common/version';\nimport { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nVantComponent({\n    field: true,\n    relation: useParent('radio-group', function () {\n        this.updateFromParent();\n    }),\n    classes: ['icon-class', 'label-class'],\n    props: {\n        name: null,\n        value: null,\n        disabled: Boolean,\n        useIconSlot: Boolean,\n        checkedColor: String,\n        labelPosition: {\n            type: String,\n            value: 'right',\n        },\n        labelDisabled: Boolean,\n        shape: {\n            type: String,\n            value: 'round',\n        },\n        iconSize: {\n            type: null,\n            value: 20,\n        },\n    },\n    data: {\n        direction: '',\n        parentDisabled: false,\n    },\n    methods: {\n        updateFromParent() {\n            if (!this.parent) {\n                return;\n            }\n            const { value, disabled: parentDisabled, direction } = this.parent.data;\n            this.setData({\n                value,\n                direction,\n                parentDisabled,\n            });\n        },\n        emitChange(value) {\n            const instance = this.parent || this;\n            instance.$emit('input', value);\n            instance.$emit('change', value);\n            if (canIUseModel()) {\n                instance.setData({ value });\n            }\n        },\n        onChange() {\n            if (!this.data.disabled && !this.data.parentDisabled) {\n                this.emitChange(this.data.name);\n            }\n        },\n        onClickLabel() {\n            const { disabled, parentDisabled, labelDisabled, name } = this.data;\n            if (!(disabled || parentDisabled) && !labelDisabled) {\n                this.emitChange(name);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/radio/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/radio/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('radio', [direction]) }} custom-class\">\n  <view\n    wx:if=\"{{ labelPosition === 'left' }}\"\n    class=\"{{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }} label-class\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n  <view class=\"van-radio__icon-wrap\" style=\"font-size: {{ utils.addUnit(iconSize) }}\" bindtap=\"onChange\">\n    <slot wx:if=\"{{ useIconSlot }}\" name=\"icon\" />\n    <van-icon\n      wx:else\n      name=\"success\"\n      class=\"{{ utils.bem('radio__icon', [shape, { disabled: disabled || parentDisabled, checked: value === name }]) }}\"\n      style=\"{{ computed.iconStyle({ iconSize, checkedColor, disabled, parentDisabled, value, name }) }}\"\n      custom-class=\"icon-class\"\n      custom-style=\"{{ computed.iconCustomStyle({ iconSize }) }}\"\n    />\n  </view>\n  <view\n    wx:if=\"{{ labelPosition === 'right' }}\"\n    class=\"label-class {{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/radio/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction iconStyle(data) {\n  var styles = {\n    'font-size': addUnit(data.iconSize),\n  };\n\n  if (\n    data.checkedColor &&\n    !(data.disabled || data.parentDisabled) &&\n    data.value === data.name\n  ) {\n    styles['border-color'] = data.checkedColor;\n    styles['background-color'] = data.checkedColor;\n  }\n\n  return style(styles);\n}\n\nfunction iconCustomStyle(data) {\n  return style({\n    'line-height': addUnit(data.iconSize),\n    'font-size': '.8em',\n    display: 'block',\n  });\n}\n\nmodule.exports = {\n  iconStyle: iconStyle,\n  iconCustomStyle: iconCustomStyle,\n};\n"
  },
  {
    "path": "dist/radio/index.wxss",
    "content": "@import '../common/index.wxss';.van-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{flex:none}.van-radio--horizontal{margin-right:var(--padding-sm,12px)}.van-radio__icon{align-items:center;border:1px solid var(--radio-border-color,#c8c9cc);box-sizing:border-box;color:transparent;display:flex;font-size:var(--radio-size,20px);height:1em;justify-content:center;text-align:center;transition-duration:var(--radio-transition-duration,.2s);transition-property:color,border-color,background-color;width:1em}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{background-color:var(--radio-checked-icon-color,#1989fa);border-color:var(--radio-checked-icon-color,#1989fa);color:#fff}.van-radio__icon--disabled{background-color:var(--radio-disabled-background-color,#ebedf0);border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;color:var(--radio-label-color,#323233);line-height:var(--radio-size,20px);padding-left:var(--radio-label-margin,10px)}.van-radio__label--left{float:left;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}"
  },
  {
    "path": "dist/radio-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/radio-group/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nVantComponent({\n    field: true,\n    relation: useChildren('radio'),\n    props: {\n        value: {\n            type: null,\n            observer: 'updateChildren',\n        },\n        direction: String,\n        disabled: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n    },\n    methods: {\n        updateChildren() {\n            this.children.forEach((child) => child.updateFromParent());\n        },\n    },\n});\n"
  },
  {
    "path": "dist/radio-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/radio-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"{{ utils.bem('radio-group', [direction]) }}\">\n  <slot></slot>\n</view>\n"
  },
  {
    "path": "dist/radio-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-radio-group--horizontal{display:flex;flex-wrap:wrap}"
  },
  {
    "path": "dist/rate/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/rate/index.js",
    "content": "import { getAllRect } from '../common/utils';\nimport { VantComponent } from '../common/component';\nimport { canIUseModel } from '../common/version';\nVantComponent({\n    field: true,\n    classes: ['icon-class'],\n    props: {\n        value: {\n            type: Number,\n            observer(value) {\n                if (value !== this.data.innerValue) {\n                    this.setData({ innerValue: value });\n                }\n            },\n        },\n        readonly: Boolean,\n        disabled: Boolean,\n        allowHalf: Boolean,\n        size: null,\n        icon: {\n            type: String,\n            value: 'star',\n        },\n        voidIcon: {\n            type: String,\n            value: 'star-o',\n        },\n        color: String,\n        voidColor: String,\n        disabledColor: String,\n        count: {\n            type: Number,\n            value: 5,\n            observer(value) {\n                this.setData({ innerCountArray: Array.from({ length: value }) });\n            },\n        },\n        gutter: null,\n        touchable: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        innerValue: 0,\n        innerCountArray: Array.from({ length: 5 }),\n    },\n    methods: {\n        onSelect(event) {\n            const { data } = this;\n            const { score } = event.currentTarget.dataset;\n            if (!data.disabled && !data.readonly) {\n                this.setData({ innerValue: score + 1 });\n                if (canIUseModel()) {\n                    this.setData({ value: score + 1 });\n                }\n                wx.nextTick(() => {\n                    this.$emit('input', score + 1);\n                    this.$emit('change', score + 1);\n                });\n            }\n        },\n        onTouchMove(event) {\n            const { touchable } = this.data;\n            if (!touchable)\n                return;\n            const { clientX } = event.touches[0];\n            getAllRect(this, '.van-rate__icon').then((list) => {\n                const target = list\n                    .sort((cur, next) => cur.dataset.score - next.dataset.score)\n                    .find((item) => clientX >= item.left && clientX <= item.right);\n                if (target != null) {\n                    this.onSelect(Object.assign(Object.assign({}, event), { currentTarget: target }));\n                }\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/rate/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/rate/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"../wxs/style.wxs\" module=\"style\" />\n\n<view\n  class=\"{{ utils.bem('rate') }} custom-class\"\n  bind:touchmove=\"onTouchMove\"\n>\n  <view\n    class=\"{{ utils.bem('rate__item') }}\"\n    wx:for=\"{{ innerCountArray }}\"\n    wx:key=\"index\"\n    style=\"{{ style({ paddingRight: index !== count - 1 ? utils.addUnit(gutter) : null }) }}\"\n  >\n    <van-icon\n      name=\"{{ index + 1 <= innerValue ? icon : voidIcon }}\"\n      class=\"{{ utils.bem('rate__icon', [{ disabled, full: index + 1 <= innerValue }])}}\"\n      style=\"{{ style({ fontSize: utils.addUnit(size) }) }}\"\n      custom-class=\"icon-class\"\n      data-score=\"{{ index }}\"\n      color=\"{{ disabled ? disabledColor : index + 1 <= innerValue ? color : voidColor }}\"\n      bind:click=\"onSelect\"\n    />\n\n    <van-icon\n      wx:if=\"{{ allowHalf }}\"\n      name=\"{{ index + 0.5 <= innerValue ? icon : voidIcon }}\"\n      class=\"{{ utils.bem('rate__icon', ['half', { disabled, full: index + 0.5 <= innerValue }]) }}\"\n      style=\"{{ style({ fontSize: utils.addUnit(size) }) }}\"\n      custom-class=\"icon-class\"\n      data-score=\"{{ index - 0.5 }}\"\n      color=\"{{ disabled ? disabledColor : index + 0.5 <= innerValue ? color : voidColor }}\"\n      bind:click=\"onSelect\"\n    />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/rate/index.wxss",
    "content": "@import '../common/index.wxss';.van-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.van-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.van-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:100%}.van-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.van-rate__icon--full,.van-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.van-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)}"
  },
  {
    "path": "dist/row/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/row/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nVantComponent({\n    relation: useChildren('col', function (target) {\n        const { gutter } = this.data;\n        if (gutter) {\n            target.setData({ gutter });\n        }\n    }),\n    props: {\n        gutter: {\n            type: Number,\n            observer: 'setGutter',\n        },\n    },\n    methods: {\n        setGutter() {\n            this.children.forEach((col) => {\n                col.setData(this.data);\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/row/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/row/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-row custom-class\" style=\"{{ computed.rootStyle({ gutter }) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/row/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  if (!data.gutter) {\n    return '';\n  }\n\n  return style({\n    'margin-right': addUnit(-data.gutter / 2),\n    'margin-left': addUnit(-data.gutter / 2),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "dist/row/index.wxss",
    "content": "@import '../common/index.wxss';.van-row:after{clear:both;content:\"\";display:table}"
  },
  {
    "path": "dist/search/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/search/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { canIUseModel } from '../common/version';\nVantComponent({\n    field: true,\n    classes: ['field-class', 'input-class', 'cancel-class'],\n    props: {\n        value: {\n            type: String,\n            value: '',\n        },\n        label: String,\n        focus: Boolean,\n        error: Boolean,\n        disabled: Boolean,\n        readonly: Boolean,\n        inputAlign: String,\n        showAction: Boolean,\n        useActionSlot: Boolean,\n        useLeftIconSlot: Boolean,\n        useRightIconSlot: Boolean,\n        leftIcon: {\n            type: String,\n            value: 'search',\n        },\n        rightIcon: String,\n        placeholder: String,\n        placeholderStyle: String,\n        actionText: {\n            type: String,\n            value: '取消',\n        },\n        background: {\n            type: String,\n            value: '#ffffff',\n        },\n        maxlength: {\n            type: Number,\n            value: -1,\n        },\n        shape: {\n            type: String,\n            value: 'square',\n        },\n        clearable: {\n            type: Boolean,\n            value: true,\n        },\n        clearTrigger: {\n            type: String,\n            value: 'focus',\n        },\n        clearIcon: {\n            type: String,\n            value: 'clear',\n        },\n        cursorSpacing: {\n            type: Number,\n            value: 0,\n        },\n    },\n    methods: {\n        onChange(event) {\n            if (canIUseModel()) {\n                this.setData({ value: event.detail });\n            }\n            this.$emit('change', event.detail);\n        },\n        onCancel() {\n            /**\n             * 修复修改输入框值时，输入框失焦和赋值同时触发，赋值失效\n             * https://github.com/youzan/vant-weapp/issues/1768\n             */\n            setTimeout(() => {\n                if (canIUseModel()) {\n                    this.setData({ value: '' });\n                }\n                this.$emit('cancel');\n                this.$emit('change', '');\n            }, 200);\n        },\n        onSearch(event) {\n            this.$emit('search', event.detail);\n        },\n        onFocus(event) {\n            this.$emit('focus', event.detail);\n        },\n        onBlur(event) {\n            this.$emit('blur', event.detail);\n        },\n        onClear(event) {\n            this.$emit('clear', event.detail);\n        },\n        onClickInput(event) {\n            this.$emit('click-input', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/search/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-field\": \"../field/index\"\n  }\n}\n"
  },
  {
    "path": "dist/search/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('search', { withaction: showAction || useActionSlot }) }} custom-class\"\n  style=\"background: {{ background }}\"\n>\n  <view class=\"{{ utils.bem('search__content', [shape]) }}\">\n    <view class=\"van-search__label\" wx:if=\"{{ label }}\">{{ label }}</view>\n    <slot wx:else name=\"label\" />\n\n    <van-field\n      type=\"search\"\n      left-icon=\"{{ !useLeftIconSlot ? leftIcon : '' }}\"\n      right-icon=\"{{ !useRightIconSlot ? rightIcon : '' }}\"\n      focus=\"{{ focus }}\"\n      error=\"{{ error }}\"\n      border=\"{{ false }}\"\n      confirm-type=\"search\"\n      class=\"van-search__field field-class\"\n      value=\"{{ value }}\"\n      disabled=\"{{ disabled }}\"\n      readonly=\"{{ readonly }}\"\n      clearable=\"{{ clearable }}\"\n      clear-trigger=\"{{ clearTrigger }}\"\n      clear-icon=\"{{ clearIcon }}\"\n      maxlength=\"{{ maxlength }}\"\n      input-align=\"{{ inputAlign }}\"\n      input-class=\"input-class\"\n      placeholder=\"{{ placeholder }}\"\n      placeholder-style=\"{{ placeholderStyle }}\"\n      cursor-spacing=\"{{ cursorSpacing }}\"\n      custom-style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n      bind:blur=\"onBlur\"\n      bind:focus=\"onFocus\"\n      bind:change=\"onChange\"\n      bind:confirm=\"onSearch\"\n      bind:clear=\"onClear\"\n      bind:click-input=\"onClickInput\"\n    >\n      <slot wx:if=\"{{ useLeftIconSlot }}\" name=\"left-icon\" slot=\"left-icon\" />\n      <slot wx:if=\"{{ useRightIconSlot }}\" name=\"right-icon\" slot=\"right-icon\" />\n    </van-field>\n  </view>\n\n  <view\n    wx:if=\"{{ showAction || useActionSlot }}\"\n    class=\"van-search__action\"\n    hover-class=\"van-search__action--hover\"\n    hover-stay-time=\"70\"\n  >\n    <slot wx:if=\"{{ useActionSlot }}\" name=\"action\" />\n    <view wx:else bind:tap=\"onCancel\" class=\"van-search__action-button cancel-class\">{{ actionText }}</view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/search/index.wxss",
    "content": "@import '../common/index.wxss';.van-search{align-items:center;box-sizing:border-box;display:flex;padding:var(--search-padding,10px 12px)}.van-search__content{background-color:var(--search-background-color,#f7f8fa);border-radius:2px;display:flex;flex:1;padding-left:var(--padding-sm,12px)}.van-search__content--round{border-radius:999px}.van-search__label{color:var(--search-label-color,#323233);font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,34px);padding:var(--search-label-padding,0 5px)}.van-search__field{flex:1}.van-search__field__left-icon{color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{color:var(--search-action-text-color,#323233);font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,34px)}.van-search__action--hover{background-color:#f2f3f5}.van-search__action-button{padding:var(--search-action-padding,0 8px)}"
  },
  {
    "path": "dist/share-sheet/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/share-sheet/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        // whether to show popup\n        show: Boolean,\n        // overlay custom style\n        overlayStyle: String,\n        // z-index\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        title: String,\n        cancelText: {\n            type: String,\n            value: '取消',\n        },\n        description: String,\n        options: {\n            type: Array,\n            value: [],\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        duration: {\n            type: null,\n            value: 300,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onClickOverlay() {\n            this.$emit('click-overlay');\n        },\n        onCancel() {\n            this.onClose();\n            this.$emit('cancel');\n        },\n        onSelect(event) {\n            this.$emit('select', event.detail);\n        },\n        onClose() {\n            this.$emit('close');\n        },\n    },\n});\n"
  },
  {
    "path": "dist/share-sheet/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"options\": \"./options\"\n  }\n}\n"
  },
  {
    "path": "dist/share-sheet/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-popup\n  round\n  class=\"van-share-sheet\"\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  overlay=\"{{ overlay }}\"\n  duration=\"{{ duration }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay-style=\"{{ overlayStyle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClose\"\n  bind:click-overlay=\"onClickOverlay\"\n>\n  <view class=\"van-share-sheet__header\">\n    <view class=\"van-share-sheet__title\">\n      <slot name=\"title\" />\n    </view>\n    <view wx:if=\"{{ title }}\" class=\"van-share-sheet__title\">{{ title }}</view>\n\n    <view class=\"van-share-sheet__description\">\n      <slot name=\"description\" />\n    </view>\n    <view wx:if=\"{{ description }}\" class=\"van-share-sheet__description\">\n      {{ description }}\n    </view>\n  </view>\n\n  <block wx:if=\"{{ computed.isMulti(options) }}\">\n    <options\n      wx:for=\"{{ options }}\"\n      show-border=\"{{ index !== 0 }}\"\n      wx:key=\"index\"\n      options=\"{{ item }}\"\n      bind:select=\"onSelect\"\n    />\n  </block>\n\n  <options wx:else options=\"{{ options }}\" bind:select=\"onSelect\" />\n\n  <button type=\"button\" class=\"van-share-sheet__cancel\" bindtap=\"onCancel\">\n    {{ cancelText }}\n  </button>\n</van-popup>\n"
  },
  {
    "path": "dist/share-sheet/index.wxs",
    "content": "/* eslint-disable */\nfunction isMulti(options) {\n  if (options == null || options[0] == null) {\n    return false;\n  }\n\n  return \"Array\" === options.constructor && \"Array\" === options[0].constructor;\n}\n\nmodule.exports = {\n  isMulti: isMulti\n};\n"
  },
  {
    "path": "dist/share-sheet/index.wxss",
    "content": "@import '../common/index.wxss';.van-share-sheet__header{padding:12px 16px 4px;text-align:center}.van-share-sheet__title{color:#323233;font-size:14px;font-weight:400;line-height:20px;margin-top:8px}.van-share-sheet__title:empty,.van-share-sheet__title:not(:empty)+.van-share-sheet__title{display:none}.van-share-sheet__description{color:#969799;display:block;font-size:12px;line-height:16px;margin-top:8px}.van-share-sheet__description:empty,.van-share-sheet__description:not(:empty)+.van-share-sheet__description{display:none}.van-share-sheet__cancel{background:#fff;border:none;box-sizing:initial;display:block;font-size:16px;height:auto;line-height:48px;padding:0;text-align:center;width:100%}.van-share-sheet__cancel:before{background-color:#f7f8fa;content:\" \";display:block;height:8px}.van-share-sheet__cancel:after{display:none}.van-share-sheet__cancel:active{background-color:#f2f3f5}"
  },
  {
    "path": "dist/share-sheet/options.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/share-sheet/options.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        options: Array,\n        showBorder: Boolean,\n    },\n    methods: {\n        onSelect(event) {\n            const { index } = event.currentTarget.dataset;\n            const option = this.data.options[index];\n            this.$emit('select', Object.assign(Object.assign({}, option), { index }));\n        },\n    },\n});\n"
  },
  {
    "path": "dist/share-sheet/options.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/share-sheet/options.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./options.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('share-sheet__options', { border: showBorder }) }}\">\n  <view\n    wx:for=\"{{ options }}\"\n    wx:key=\"index\"\n    class=\"van-share-sheet__option\"\n    data-index=\"{{ index }}\"\n    bindtap=\"onSelect\"\n  >\n    <button class=\"van-share-sheet__button\" open-type=\"{{ item.openType }}\">\n      <image src=\"{{ computed.getIconURL(item.icon) }}\" class=\"van-share-sheet__icon\" /> \n      <view wx:if=\"{{ item.name }}\" class=\"van-share-sheet__name\">{{ item.name }}</view>\n      <view wx:if=\"{{ item.description }}\" class=\"van-share-sheet__option-description\">\n        {{ item.description }}\n      </view>\n    </button>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/share-sheet/options.wxs",
    "content": "/* eslint-disable */\nvar PRESET_ICONS = ['qq', 'link', 'weibo', 'wechat', 'poster', 'qrcode', 'weapp-qrcode', 'wechat-moments'];\n\nfunction getIconURL(icon) {\n  if (PRESET_ICONS.indexOf(icon) !== -1) {\n    return 'https://img.yzcdn.cn/vant/share-sheet-' + icon + '.png';\n  }\n\n  return icon;\n}\n\nmodule.exports = {\n  getIconURL: getIconURL,\n};\n"
  },
  {
    "path": "dist/share-sheet/options.wxss",
    "content": "@import '../common/index.wxss';.van-share-sheet__options{-webkit-overflow-scrolling:touch;display:flex;overflow-x:auto;overflow-y:visible;padding:16px 0 16px 8px;position:relative}.van-share-sheet__options--border:before{border-top:1px solid #ebedf0;box-sizing:border-box;content:\" \";left:16px;pointer-events:none;position:absolute;right:0;top:0;transform:scaleY(.5);transform-origin:center}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{align-items:center;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}.van-share-sheet__option:active{opacity:.7}.van-share-sheet__button{background-color:initial;border:0;height:auto;line-height:inherit;padding:0}.van-share-sheet__button:after{border:0}.van-share-sheet__icon{height:48px;margin:0 16px;width:48px}.van-share-sheet__name{color:#646566;font-size:12px;margin-top:8px;padding:0 4px}.van-share-sheet__option-description{color:#c8c9cc;font-size:12px;padding:0 4px}"
  },
  {
    "path": "dist/sidebar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/sidebar/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nVantComponent({\n    relation: useChildren('sidebar-item', function () {\n        this.setActive(this.data.activeKey);\n    }),\n    props: {\n        activeKey: {\n            type: Number,\n            value: 0,\n            observer: 'setActive',\n        },\n    },\n    beforeCreate() {\n        this.currentActive = -1;\n    },\n    methods: {\n        setActive(activeKey) {\n            const { children, currentActive } = this;\n            if (!children.length) {\n                return Promise.resolve();\n            }\n            this.currentActive = activeKey;\n            const stack = [];\n            if (currentActive !== activeKey && children[currentActive]) {\n                stack.push(children[currentActive].setActive(false));\n            }\n            if (children[activeKey]) {\n                stack.push(children[activeKey].setActive(true));\n            }\n            return Promise.all(stack);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/sidebar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/sidebar/index.wxml",
    "content": "<view class=\"van-sidebar custom-class\">\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/sidebar/index.wxss",
    "content": "@import '../common/index.wxss';.van-sidebar{width:var(--sidebar-width,80px)}"
  },
  {
    "path": "dist/sidebar-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/sidebar-item/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nVantComponent({\n    classes: ['active-class', 'disabled-class'],\n    relation: useParent('sidebar'),\n    props: {\n        dot: Boolean,\n        badge: null,\n        info: null,\n        title: String,\n        disabled: Boolean,\n    },\n    methods: {\n        onClick() {\n            const { parent } = this;\n            if (!parent || this.data.disabled) {\n                return;\n            }\n            const index = parent.children.indexOf(this);\n            parent.setActive(index).then(() => {\n                this.$emit('click', index);\n                parent.$emit('change', index);\n            });\n        },\n        setActive(selected) {\n            return this.setData({ selected });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/sidebar-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "dist/sidebar-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class\"\n  hover-class=\"van-sidebar-item--hover\"\n  hover-stay-time=\"70\"\n  bind:tap=\"onClick\"\n>\n  <view class=\"van-sidebar-item__text\">\n    <van-info\n      wx:if=\"{{ badge != null || info !== null || dot }}\"\n      dot=\"{{ dot }}\"\n      info=\"{{ badge != null ? badge : info }}\"\n    />\n    <view wx:if=\"{{ title }}\">{{ title }}</view>\n    <slot wx:else name=\"title\" />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/sidebar-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-sidebar-item{background-color:var(--sidebar-background-color,#f7f8fa);border-left:3px solid transparent;box-sizing:border-box;color:var(--sidebar-text-color,#323233);display:block;font-size:var(--sidebar-font-size,14px);line-height:var(--sidebar-line-height,20px);overflow:hidden;padding:var(--sidebar-padding,20px 12px 20px 8px);-webkit-user-select:none;user-select:none}.van-sidebar-item__text{display:inline-block;position:relative;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{border-color:var(--sidebar-selected-border-color,#ee0a24);color:var(--sidebar-selected-text-color,#323233);font-weight:var(--sidebar-selected-font-weight,500)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:var(--sidebar-disabled-text-color,#c8c9cc)}"
  },
  {
    "path": "dist/skeleton/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/skeleton/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    classes: ['avatar-class', 'title-class', 'row-class'],\n    props: {\n        row: {\n            type: Number,\n            value: 0,\n            observer(value) {\n                this.setData({ rowArray: Array.from({ length: value }) });\n            },\n        },\n        title: Boolean,\n        avatar: Boolean,\n        loading: {\n            type: Boolean,\n            value: true,\n        },\n        animate: {\n            type: Boolean,\n            value: true,\n        },\n        avatarSize: {\n            type: String,\n            value: '32px',\n        },\n        avatarShape: {\n            type: String,\n            value: 'round',\n        },\n        titleWidth: {\n            type: String,\n            value: '40%',\n        },\n        rowWidth: {\n            type: null,\n            value: '100%',\n            observer(val) {\n                this.setData({ isArray: val instanceof Array });\n            },\n        },\n    },\n    data: {\n        isArray: false,\n        rowArray: [],\n    },\n});\n"
  },
  {
    "path": "dist/skeleton/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "dist/skeleton/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ loading }}\"\n  class=\"custom-class {{ utils.bem('skeleton', [{animate}]) }}\"\n>\n  <view\n    wx:if=\"{{ avatar }}\"\n    class=\"avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}\"\n    style=\"{{ 'width:' + avatarSize + ';height:' + avatarSize }}\"\n  />\n  <view class=\"{{ utils.bem('skeleton__content')}}\">\n    <view\n      wx:if=\"{{ title }}\"\n      class=\"title-class {{ utils.bem('skeleton__title') }}\"\n      style=\"{{ 'width:' + titleWidth }}\"\n    />\n    <view\n      wx:for=\"{{ rowArray }}\"\n      wx:key=\"index\"\n      wx:for-index=\"index\"\n      class=\"row-class {{ utils.bem('skeleton__row') }}\"\n      style=\"{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}\"\n    />\n  </view>\n</view>\n<view wx:else class=\"{{ utils.bem('skeleton__content')}}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/skeleton/index.wxss",
    "content": "@import '../common/index.wxss';.van-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.van-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,#f2f3f5);flex-shrink:0;margin-right:var(--padding-md,16px)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{background-color:var(--skeleton-row-background-color,#f2f3f5);height:var(--skeleton-row-height,16px)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{animation:van-skeleton-blink 1.2s ease-in-out infinite}@keyframes van-skeleton-blink{50%{opacity:.6}}"
  },
  {
    "path": "dist/slider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/slider/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { touch } from '../mixins/touch';\nimport { canIUseModel } from '../common/version';\nimport { getRect, addUnit, nextTick, addNumber, clamp } from '../common/utils';\nconst DRAG_STATUS = {\n    START: 'start',\n    MOVING: 'moving',\n    END: 'end',\n};\nVantComponent({\n    mixins: [touch],\n    props: {\n        range: Boolean,\n        disabled: Boolean,\n        useButtonSlot: Boolean,\n        activeColor: String,\n        inactiveColor: String,\n        max: {\n            type: Number,\n            value: 100,\n        },\n        min: {\n            type: Number,\n            value: 0,\n        },\n        step: {\n            type: Number,\n            value: 1,\n        },\n        value: {\n            type: null,\n            value: 0,\n            observer(val) {\n                if (val !== this.value) {\n                    this.updateValue(val);\n                }\n            },\n        },\n        vertical: Boolean,\n        barHeight: null,\n    },\n    created() {\n        this.updateValue(this.data.value);\n    },\n    methods: {\n        onTouchStart(event) {\n            if (this.data.disabled)\n                return;\n            const { index } = event.currentTarget.dataset;\n            if (typeof index === 'number') {\n                this.buttonIndex = index;\n            }\n            this.touchStart(event);\n            this.startValue = this.format(this.value);\n            this.newValue = this.value;\n            if (this.isRange(this.newValue)) {\n                this.startValue = this.newValue.map((val) => this.format(val));\n            }\n            else {\n                this.startValue = this.format(this.newValue);\n            }\n            this.dragStatus = DRAG_STATUS.START;\n        },\n        onTouchMove(event) {\n            if (this.data.disabled)\n                return;\n            if (this.dragStatus === DRAG_STATUS.START) {\n                this.$emit('drag-start');\n            }\n            this.touchMove(event);\n            this.dragStatus = DRAG_STATUS.MOVING;\n            getRect(this, '.van-slider').then((rect) => {\n                const { vertical } = this.data;\n                const delta = vertical ? this.deltaY : this.deltaX;\n                const total = vertical ? rect.height : rect.width;\n                const diff = (delta / total) * this.getRange();\n                if (this.isRange(this.startValue)) {\n                    this.newValue[this.buttonIndex] =\n                        this.startValue[this.buttonIndex] + diff;\n                }\n                else {\n                    this.newValue = this.startValue + diff;\n                }\n                this.updateValue(this.newValue, false, true);\n            });\n        },\n        onTouchEnd() {\n            if (this.data.disabled)\n                return;\n            if (this.dragStatus === DRAG_STATUS.MOVING) {\n                this.dragStatus = DRAG_STATUS.END;\n                nextTick(() => {\n                    this.updateValue(this.newValue, true);\n                    this.$emit('drag-end');\n                });\n            }\n        },\n        onClick(event) {\n            if (this.data.disabled)\n                return;\n            const { min } = this.data;\n            getRect(this, '.van-slider').then((rect) => {\n                const { vertical } = this.data;\n                const touch = event.touches[0];\n                const delta = vertical\n                    ? touch.clientY - rect.top\n                    : touch.clientX - rect.left;\n                const total = vertical ? rect.height : rect.width;\n                const value = Number(min) + (delta / total) * this.getRange();\n                if (this.isRange(this.value)) {\n                    const [left, right] = this.value;\n                    const middle = (left + right) / 2;\n                    if (value <= middle) {\n                        this.updateValue([value, right], true);\n                    }\n                    else {\n                        this.updateValue([left, value], true);\n                    }\n                }\n                else {\n                    this.updateValue(value, true);\n                }\n            });\n        },\n        isRange(val) {\n            const { range } = this.data;\n            return range && Array.isArray(val);\n        },\n        handleOverlap(value) {\n            if (value[0] > value[1]) {\n                return value.slice(0).reverse();\n            }\n            return value;\n        },\n        updateValue(value, end, drag) {\n            if (this.isRange(value)) {\n                value = this.handleOverlap(value).map((val) => this.format(val));\n            }\n            else {\n                value = this.format(value);\n            }\n            this.value = value;\n            const { vertical } = this.data;\n            const mainAxis = vertical ? 'height' : 'width';\n            this.setData({\n                wrapperStyle: `\n          background: ${this.data.inactiveColor || ''};\n          ${vertical ? 'width' : 'height'}: ${addUnit(this.data.barHeight) || ''};\n        `,\n                barStyle: `\n          ${mainAxis}: ${this.calcMainAxis()};\n          left: ${vertical ? 0 : this.calcOffset()};\n          top: ${vertical ? this.calcOffset() : 0};\n          ${drag ? 'transition: none;' : ''}\n        `,\n            });\n            if (drag) {\n                this.$emit('drag', { value });\n            }\n            if (end) {\n                this.$emit('change', value);\n            }\n            if ((drag || end) && canIUseModel()) {\n                this.setData({ value });\n            }\n        },\n        getScope() {\n            return Number(this.data.max) - Number(this.data.min);\n        },\n        getRange() {\n            const { max, min } = this.data;\n            return max - min;\n        },\n        getOffsetWidth(current, min) {\n            const scope = this.getScope();\n            // 避免最小值小于最小step时出现负数情况\n            return `${Math.max(((current - min) * 100) / scope, 0)}%`;\n        },\n        // 计算选中条的长度百分比\n        calcMainAxis() {\n            const { value } = this;\n            const { min } = this.data;\n            if (this.isRange(value)) {\n                return this.getOffsetWidth(value[1], value[0]);\n            }\n            return this.getOffsetWidth(value, Number(min));\n        },\n        // 计算选中条的开始位置的偏移量\n        calcOffset() {\n            const { value } = this;\n            const { min } = this.data;\n            const scope = this.getScope();\n            if (this.isRange(value)) {\n                return `${((value[0] - Number(min)) * 100) / scope}%`;\n            }\n            return '0%';\n        },\n        format(value) {\n            const min = +this.data.min;\n            const max = +this.data.max;\n            const step = +this.data.step;\n            value = clamp(value, min, max);\n            const diff = Math.round((value - min) / step) * step;\n            return addNumber(min, diff);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/slider/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/slider/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"../wxs/style.wxs\" module=\"style\" />\n\n<view\n  class=\"custom-class {{ utils.bem('slider', { disabled, vertical }) }}\"\n  style=\"{{ wrapperStyle }}\"\n  bind:tap=\"onClick\"\n>\n  <view\n    class=\"{{ utils.bem('slider__bar') }}\"\n    style=\"{{ barStyle }}; {{ style({ backgroundColor: activeColor }) }}\"\n  >\n    <view\n      wx:if=\"{{ range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper-left') }}\"\n      data-index=\"{{ 0 }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"left-button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n    <view\n      wx:if=\"{{ range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper-right') }}\"\n      data-index=\"{{ 1 }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"right-button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n\n    <view\n      wx:if=\"{{ !range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper') }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/slider/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction barStyle(barHeight, activeColor) {\n  return style({\n    height: addUnit(barHeight),\n    background: activeColor,\n  });\n}\n\nmodule.exports = {\n  barStyle: barStyle,\n};\n"
  },
  {
    "path": "dist/slider/index.wxss",
    "content": "@import '../common/index.wxss';.van-slider{background-color:var(--slider-inactive-background-color,#ebedf0);border-radius:999px;height:var(--slider-bar-height,2px);position:relative}.van-slider:before{bottom:calc(var(--padding-xs, 8px)*-1);content:\"\";left:0;position:absolute;right:0;top:calc(var(--padding-xs, 8px)*-1)}.van-slider__bar{background-color:var(--slider-active-background-color,#1989fa);border-radius:inherit;height:100%;position:relative;transition:all .2s;width:100%}.van-slider__button{background-color:var(--slider-button-background-color,#fff);border-radius:var(--slider-button-border-radius,50%);box-shadow:var(--slider-button-box-shadow,0 1px 2px rgba(0,0,0,.5));height:var(--slider-button-height,24px);width:var(--slider-button-width,24px)}.van-slider__button-wrapper,.van-slider__button-wrapper-right{position:absolute;right:0;top:50%;transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper-left{left:0;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.van-slider--disabled{opacity:var(--slider-disabled-opacity,.5)}.van-slider--vertical{display:inline-block;height:100%;width:var(--slider-bar-height,2px)}.van-slider--vertical .van-slider__button-wrapper,.van-slider--vertical .van-slider__button-wrapper-right{bottom:0;right:50%;top:auto;transform:translate3d(50%,50%,0)}.van-slider--vertical .van-slider__button-wrapper-left{left:auto;right:50%;top:0;transform:translate3d(50%,-50%,0)}.van-slider--vertical:before{bottom:0;left:-8px;right:-8px;top:0}"
  },
  {
    "path": "dist/stepper/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/stepper/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { isDef } from '../common/validator';\nconst LONG_PRESS_START_TIME = 600;\nconst LONG_PRESS_INTERVAL = 200;\n// add num and avoid float number\nfunction add(num1, num2) {\n    const cardinal = Math.pow(10, 10);\n    return Math.round((num1 + num2) * cardinal) / cardinal;\n}\nfunction equal(value1, value2) {\n    return String(value1) === String(value2);\n}\nVantComponent({\n    field: true,\n    classes: ['input-class', 'plus-class', 'minus-class'],\n    props: {\n        value: {\n            type: null,\n        },\n        integer: {\n            type: Boolean,\n            observer: 'check',\n        },\n        disabled: Boolean,\n        inputWidth: String,\n        buttonSize: String,\n        asyncChange: Boolean,\n        disableInput: Boolean,\n        decimalLength: {\n            type: Number,\n            value: null,\n            observer: 'check',\n        },\n        min: {\n            type: null,\n            value: 1,\n            observer: 'check',\n        },\n        max: {\n            type: null,\n            value: Number.MAX_SAFE_INTEGER,\n            observer: 'check',\n        },\n        step: {\n            type: null,\n            value: 1,\n        },\n        showPlus: {\n            type: Boolean,\n            value: true,\n        },\n        showMinus: {\n            type: Boolean,\n            value: true,\n        },\n        disablePlus: Boolean,\n        disableMinus: Boolean,\n        longPress: {\n            type: Boolean,\n            value: true,\n        },\n        theme: String,\n        alwaysEmbed: Boolean,\n    },\n    data: {\n        currentValue: '',\n    },\n    watch: {\n        value() {\n            this.observeValue();\n        },\n    },\n    created() {\n        this.setData({\n            currentValue: this.format(this.data.value).newValue,\n        });\n    },\n    methods: {\n        observeValue() {\n            const { value } = this.data;\n            this.setData({ currentValue: this.format(value).newValue });\n        },\n        check() {\n            const { newValue } = this.format(this.data.currentValue);\n            if (!equal(newValue, this.data.currentValue)) {\n                this.setData({ currentValue: newValue });\n            }\n        },\n        isDisabled(type) {\n            const { disabled, disablePlus, disableMinus, currentValue, max, min } = this.data;\n            if (type === 'plus') {\n                return disabled || disablePlus || +currentValue >= +max;\n            }\n            return disabled || disableMinus || +currentValue <= +min;\n        },\n        onFocus(event) {\n            this.$emit('focus', event.detail);\n        },\n        onBlur(event) {\n            const data = this.format(event.detail.value);\n            this.setData({ currentValue: data.newValue });\n            this.emitChange(data);\n            this.$emit('blur', Object.assign(Object.assign({}, event.detail), { value: +data.newValue }));\n        },\n        // filter illegal characters\n        filter(value) {\n            value = String(value).replace(/[^0-9.-]/g, '');\n            if (this.data.integer && value.indexOf('.') !== -1) {\n                value = value.split('.')[0];\n            }\n            return value;\n        },\n        format(value) {\n            // filter illegal characters and format integer\n            const safeValue = this.filter(value);\n            // format range\n            const rangeValue = Math.max(Math.min(this.data.max, +safeValue), this.data.min);\n            // format decimal\n            const newValue = isDef(this.data.decimalLength)\n                ? rangeValue.toFixed(this.data.decimalLength)\n                : String(rangeValue);\n            return { value, newValue };\n        },\n        onInput(event) {\n            const { value = '' } = event.detail || {};\n            // allow input to be empty\n            if (value === '') {\n                return;\n            }\n            const formatted = this.format(value);\n            this.emitChange(formatted);\n        },\n        emitChange(data) {\n            const { value, newValue } = data;\n            if (!this.data.asyncChange) {\n                // fix when input 11. parsed to 11, unable to enter decimal\n                this.setData({ currentValue: +value === +newValue ? value : newValue });\n            }\n            this.$emit('change', +newValue);\n        },\n        onChange() {\n            const { type } = this;\n            if (this.isDisabled(type)) {\n                this.$emit('overlimit', type);\n                return;\n            }\n            const diff = type === 'minus' ? -this.data.step : +this.data.step;\n            const value = this.format(String(add(+this.data.currentValue, diff)));\n            this.emitChange(value);\n            this.$emit(type);\n        },\n        longPressStep() {\n            this.longPressTimer = setTimeout(() => {\n                this.onChange();\n                this.longPressStep();\n            }, LONG_PRESS_INTERVAL);\n        },\n        onTap(event) {\n            const { type } = event.currentTarget.dataset;\n            this.type = type;\n            this.onChange();\n        },\n        onTouchStart(event) {\n            if (!this.data.longPress) {\n                return;\n            }\n            clearTimeout(this.longPressTimer);\n            const { type } = event.currentTarget.dataset;\n            this.type = type;\n            this.isLongPress = false;\n            this.longPressTimer = setTimeout(() => {\n                this.isLongPress = true;\n                this.onChange();\n                this.longPressStep();\n            }, LONG_PRESS_START_TIME);\n        },\n        onTouchEnd() {\n            if (!this.data.longPress) {\n                return;\n            }\n            clearTimeout(this.longPressTimer);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/stepper/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/stepper/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('stepper', [theme]) }} custom-class\">\n  <view\n    wx:if=\"{{ showMinus }}\"\n    data-type=\"minus\"\n    style=\"{{ computed.buttonStyle({ buttonSize }) }}\"\n    class=\"minus-class {{ utils.bem('stepper__minus', { disabled: disabled || disableMinus || currentValue <= min }) }}\"\n    hover-class=\"van-stepper__minus--hover\"\n    hover-stay-time=\"70\"\n    bind:tap=\"onTap\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchend=\"onTouchEnd\"\n  >\n    <slot name=\"minus\" />\n  </view>\n  <input\n    type=\"{{ integer ? 'number' : 'digit' }}\"\n    class=\"input-class {{ utils.bem('stepper__input', { disabled: disabled || disableInput }) }}\"\n    style=\"{{ computed.inputStyle({ buttonSize, inputWidth }) }}\"\n    value=\"{{ currentValue }}\"\n    focus=\"{{ focus }}\"\n    disabled=\"{{ disabled || disableInput }}\"\n    always-embed=\"{{ alwaysEmbed }}\"\n    bindinput=\"onInput\"\n    bind:focus=\"onFocus\"\n    bind:blur=\"onBlur\"\n  />\n  <view\n    wx:if=\"{{ showPlus }}\"\n    data-type=\"plus\"\n    style=\"{{ computed.buttonStyle({ buttonSize }) }}\"\n    class=\"plus-class {{ utils.bem('stepper__plus', { disabled: disabled || disablePlus || currentValue >= max }) }}\"\n    hover-class=\"van-stepper__plus--hover\"\n    hover-stay-time=\"70\"\n    bind:tap=\"onTap\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchend=\"onTouchEnd\"\n  >\n    <slot name=\"plus\" />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/stepper/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction buttonStyle(data) {\n  return style({\n    width: addUnit(data.buttonSize),\n    height: addUnit(data.buttonSize),\n  });\n}\n\nfunction inputStyle(data) {\n  return style({\n    width: addUnit(data.inputWidth),\n    height: addUnit(data.buttonSize),\n  });\n}\n\nmodule.exports = {\n  buttonStyle: buttonStyle,\n  inputStyle: inputStyle,\n};\n"
  },
  {
    "path": "dist/stepper/index.wxss",
    "content": "@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{background-color:var(--stepper-background-color,#f2f3f5);border:0;box-sizing:border-box;color:var(--stepper-button-icon-color,#323233);display:inline-block;height:var(--stepper-input-height,28px);margin:1px;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,28px)}.van-stepper__minus:before,.van-stepper__plus:before{height:1px;width:9px}.van-stepper__minus:after,.van-stepper__plus:after{height:9px;width:1px}.van-stepper__minus:empty.van-stepper__minus:after,.van-stepper__minus:empty.van-stepper__minus:before,.van-stepper__minus:empty.van-stepper__plus:after,.van-stepper__minus:empty.van-stepper__plus:before,.van-stepper__plus:empty.van-stepper__minus:after,.van-stepper__plus:empty.van-stepper__minus:before,.van-stepper__plus:empty.van-stepper__plus:after,.van-stepper__plus:empty.van-stepper__plus:before{background-color:currentColor;bottom:0;content:\"\";left:0;margin:auto;position:absolute;right:0;top:0}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:var(--stepper-button-disabled-icon-color,#c8c9cc)}.van-stepper__minus--disabled,.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:var(--stepper-button-disabled-color,#f7f8fa)}.van-stepper__minus{border-radius:var(--stepper-border-radius,var(--stepper-border-radius,4px)) 0 0 var(--stepper-border-radius,var(--stepper-border-radius,4px))}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 var(--stepper-border-radius,var(--stepper-border-radius,4px)) var(--stepper-border-radius,var(--stepper-border-radius,4px)) 0}.van-stepper--round .van-stepper__input{background-color:initial!important}.van-stepper--round .van-stepper__minus,.van-stepper--round .van-stepper__plus{border-radius:100%}.van-stepper--round .van-stepper__minus:active,.van-stepper--round .van-stepper__plus:active{opacity:.7}.van-stepper--round .van-stepper__minus--disabled,.van-stepper--round .van-stepper__minus--disabled:active,.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__plus--disabled:active{opacity:.3}.van-stepper--round .van-stepper__plus{background-color:#ee0a24;color:#fff}.van-stepper--round .van-stepper__minus{background-color:#fff;border:1px solid #ee0a24;color:#ee0a24}.van-stepper__input{-webkit-appearance:none;background-color:var(--stepper-background-color,#f2f3f5);border:0;border-radius:0;border-width:1px 0;box-sizing:border-box;color:var(--stepper-input-text-color,#323233);display:inline-block;font-size:var(--stepper-input-font-size,14px);height:var(--stepper-input-height,28px);margin:1px;min-height:0;padding:1px;text-align:center;vertical-align:middle;width:var(--stepper-input-width,32px)}.van-stepper__input--disabled{background-color:var(--stepper-input-disabled-background-color,#f2f3f5);color:var(--stepper-input-disabled-text-color,#c8c9cc)}"
  },
  {
    "path": "dist/steps/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/steps/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { GREEN, GRAY_DARK } from '../common/color';\nVantComponent({\n    classes: ['desc-class'],\n    props: {\n        icon: String,\n        steps: Array,\n        active: Number,\n        direction: {\n            type: String,\n            value: 'horizontal',\n        },\n        activeColor: {\n            type: String,\n            value: GREEN,\n        },\n        inactiveColor: {\n            type: String,\n            value: GRAY_DARK,\n        },\n        activeIcon: {\n            type: String,\n            value: 'checked',\n        },\n        inactiveIcon: String,\n    },\n    methods: {\n        onClick(event) {\n            const { index } = event.currentTarget.dataset;\n            this.$emit('click-step', index);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/steps/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/steps/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class {{ utils.bem('steps', [direction]) }}\">\n  <view class=\"van-step__wrapper\">\n    <view\n      wx:for=\"{{ steps }}\"\n      wx:key=\"index\"\n      bindtap=\"onClick\"\n      data-index=\"{{ index }}\"\n      class=\"{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline\"\n      style=\"{{ status(index, active) === 'inactive' ? 'color: ' + inactiveColor: '' }}\"\n    >\n      <view class=\"van-step__title\" style=\"{{ index === active ? 'color: ' + activeColor : '' }}\">\n        <view>{{ item.text }}</view>\n        <view class=\"desc-class\">{{ item.desc }}</view>\n      </view>\n      <view class=\"van-step__circle-container\">\n        <block wx:if=\"{{ index !== active }}\">\n          <van-icon\n            wx:if=\"{{ item.inactiveIcon || inactiveIcon }}\"\n            color=\"{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}\"\n            name=\"{{ item.inactiveIcon || inactiveIcon }}\"\n            class=\"van-step__icon\"\n          />\n          <view\n            wx:else\n            class=\"van-step__circle\"\n            style=\"{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}\"\n          />\n        </block>\n\n        <van-icon wx:else name=\"{{ item.activeIcon || activeIcon }}\" color=\"{{ activeColor }}\" class=\"van-step__icon\" />\n      </view>\n      <view\n        wx:if=\"{{ index !== steps.length - 1 }}\"\n        class=\"van-step__line\" style=\"{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}\"\n      />\n    </view>\n  </view>\n</view>\n\n<wxs module=\"status\">\nfunction get(index, active) {\n  if (index < active) {\n    return 'finish';\n  } else if (index === active) {\n    return 'process';\n  }\n\n  return 'inactive';\n}\n\nmodule.exports = get;\n</wxs>\n"
  },
  {
    "path": "dist/steps/index.wxss",
    "content": "@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{background-color:var(--step-circle-color,#969799);border-radius:50%;height:var(--step-circle-size,5px);width:var(--step-circle-size,5px)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{bottom:0;position:absolute;right:0;top:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{padding:0 0 0 8px;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0 var(--padding-xs,8px);position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:1px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:\"\";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{background-color:var(--steps-background-color,#fff);font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1}"
  },
  {
    "path": "dist/sticky/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/sticky/index.js",
    "content": "import { getRect } from '../common/utils';\nimport { VantComponent } from '../common/component';\nimport { isDef } from '../common/validator';\nimport { pageScrollMixin } from '../mixins/page-scroll';\nconst ROOT_ELEMENT = '.van-sticky';\nVantComponent({\n    props: {\n        zIndex: {\n            type: Number,\n            value: 99,\n        },\n        offsetTop: {\n            type: Number,\n            value: 0,\n            observer: 'onScroll',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'onScroll',\n        },\n        container: {\n            type: null,\n            observer: 'onScroll',\n        },\n        scrollTop: {\n            type: null,\n            observer(val) {\n                this.onScroll({ scrollTop: val });\n            },\n        },\n    },\n    mixins: [\n        pageScrollMixin(function (event) {\n            if (this.data.scrollTop != null) {\n                return;\n            }\n            this.onScroll(event);\n        }),\n    ],\n    data: {\n        height: 0,\n        fixed: false,\n        transform: 0,\n    },\n    mounted() {\n        this.onScroll();\n    },\n    methods: {\n        onScroll({ scrollTop } = {}) {\n            const { container, offsetTop, disabled } = this.data;\n            if (disabled) {\n                this.setDataAfterDiff({\n                    fixed: false,\n                    transform: 0,\n                });\n                return;\n            }\n            this.scrollTop = scrollTop || this.scrollTop;\n            if (typeof container === 'function') {\n                Promise.all([getRect(this, ROOT_ELEMENT), this.getContainerRect()])\n                    .then(([root, container]) => {\n                    if (offsetTop + root.height > container.height + container.top) {\n                        this.setDataAfterDiff({\n                            fixed: false,\n                            transform: container.height - root.height,\n                        });\n                    }\n                    else if (offsetTop >= root.top) {\n                        this.setDataAfterDiff({\n                            fixed: true,\n                            height: root.height,\n                            transform: 0,\n                        });\n                    }\n                    else {\n                        this.setDataAfterDiff({ fixed: false, transform: 0 });\n                    }\n                })\n                    .catch(() => { });\n                return;\n            }\n            getRect(this, ROOT_ELEMENT).then((root) => {\n                if (!isDef(root) || (!root.width && !root.height)) {\n                    return;\n                }\n                if (offsetTop >= root.top) {\n                    this.setDataAfterDiff({ fixed: true, height: root.height });\n                    this.transform = 0;\n                }\n                else {\n                    this.setDataAfterDiff({ fixed: false });\n                }\n            });\n        },\n        setDataAfterDiff(data) {\n            wx.nextTick(() => {\n                const diff = Object.keys(data).reduce((prev, key) => {\n                    if (data[key] !== this.data[key]) {\n                        prev[key] = data[key];\n                    }\n                    return prev;\n                }, {});\n                if (Object.keys(diff).length > 0) {\n                    this.setData(diff);\n                }\n                this.$emit('scroll', {\n                    scrollTop: this.scrollTop,\n                    isFixed: data.fixed || this.data.fixed,\n                });\n            });\n        },\n        getContainerRect() {\n            const nodesRef = this.data.container();\n            if (!nodesRef) {\n                return Promise.reject(new Error('not found container'));\n            }\n            return new Promise((resolve) => nodesRef.boundingClientRect(resolve).exec());\n        },\n    },\n});\n"
  },
  {
    "path": "dist/sticky/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/sticky/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class van-sticky\" style=\"{{ computed.containerStyle({ fixed, height, zIndex }) }}\">\n  <view class=\"{{ utils.bem('sticky-wrap', { fixed }) }}\" style=\"{{ computed.wrapStyle({ fixed, offsetTop, transform, zIndex }) }}\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/sticky/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction wrapStyle(data) {\n  return style({\n    transform: data.transform\n      ? 'translate3d(0, ' + data.transform + 'px, 0)'\n      : '',\n    top: data.fixed ? addUnit(data.offsetTop) : '',\n    'z-index': data.zIndex,\n  });\n}\n\nfunction containerStyle(data) {\n  return style({\n    height: data.fixed ? addUnit(data.height) : '',\n    'z-index': data.zIndex,\n  });\n}\n\nmodule.exports = {\n  wrapStyle: wrapStyle,\n  containerStyle: containerStyle,\n};\n"
  },
  {
    "path": "dist/sticky/index.wxss",
    "content": "@import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{left:0;position:fixed;right:0}"
  },
  {
    "path": "dist/submit-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/submit-bar/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    classes: ['bar-class', 'price-class', 'button-class'],\n    props: {\n        tip: {\n            type: null,\n            observer: 'updateTip',\n        },\n        tipIcon: String,\n        type: Number,\n        price: {\n            type: null,\n            observer: 'updatePrice',\n        },\n        label: String,\n        loading: Boolean,\n        disabled: Boolean,\n        buttonText: String,\n        currency: {\n            type: String,\n            value: '¥',\n        },\n        buttonType: {\n            type: String,\n            value: 'danger',\n        },\n        decimalLength: {\n            type: Number,\n            value: 2,\n            observer: 'updatePrice',\n        },\n        suffixLabel: String,\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    methods: {\n        updatePrice() {\n            const { price, decimalLength } = this.data;\n            const priceStrArr = typeof price === 'number' &&\n                (price / 100).toFixed(decimalLength).split('.');\n            this.setData({\n                hasPrice: typeof price === 'number',\n                integerStr: priceStrArr && priceStrArr[0],\n                decimalStr: decimalLength && priceStrArr ? `.${priceStrArr[1]}` : '',\n            });\n        },\n        updateTip() {\n            this.setData({ hasTip: typeof this.data.tip === 'string' });\n        },\n        onSubmit(event) {\n            this.$emit('submit', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/submit-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../button/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/submit-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-submit-bar custom-class\">\n  <slot name=\"top\" />\n\n  <view class=\"van-submit-bar__tip\">\n    <van-icon\n      wx:if=\"{{ tipIcon }}\"\n      size=\"12px\"\n      name=\"{{ tipIcon }}\"\n      custom-class=\"van-submit-bar__tip-icon\"\n    />\n    <view wx:if=\"{{ hasTip }}\" class=\"van-submit-bar__tip-text\">\n      {{ tip }}\n    </view>\n    <slot name=\"tip\" />\n  </view>\n\n  <view class=\"bar-class van-submit-bar__bar\">\n    <slot />\n    <view wx:if=\"{{ hasPrice }}\" class=\"van-submit-bar__text\">\n      <text>{{ label || '合计：' }}</text>\n      <text class=\"van-submit-bar__price price-class\">\n        <text class=\"van-submit-bar__currency\">{{ currency }} </text>\n        <text class=\"van-submit-bar__price-integer\">{{ integerStr }}</text><text>{{decimalStr}}</text>\n      </text>\n      <text class=\"van-submit-bar__suffix-label\">{{ suffixLabel }}</text>\n    </view>\n    <van-button\n      round\n      type=\"{{ buttonType }}\"\n      loading=\"{{ loading }}\"\n      disabled=\"{{ disabled }}\"\n      class=\"van-submit-bar__button\"\n      custom-class=\"button-class\"\n      custom-style=\"width: 100%;\"\n      bind:click=\"onSubmit\"\n    >\n      {{ loading ? '' : buttonText }}\n    </van-button>\n  </view>\n\n  <view wx:if=\"{{ safeAreaInsetBottom }}\" class=\"van-submit-bar__safe\" />\n</view>\n"
  },
  {
    "path": "dist/submit-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-submit-bar{background-color:var(--submit-bar-background-color,#fff);bottom:0;left:0;position:fixed;-webkit-user-select:none;user-select:none;width:100%;z-index:var(--submit-bar-z-index,100)}.van-submit-bar__tip{background-color:var(--submit-bar-tip-background-color,#fff7cc);color:var(--submit-bar-tip-color,#f56723);font-size:var(--submit-bar-tip-font-size,12px);line-height:var(--submit-bar-tip-line-height,1.5);padding:var(--submit-bar-tip-padding,10px)}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{margin-right:4px;vertical-align:middle}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{align-items:center;background-color:var(--submit-bar-background-color,#fff);display:flex;font-size:var(--submit-bar-text-font-size,14px);height:var(--submit-bar-height,50px);justify-content:flex-end;padding:var(--submit-bar-padding,0 16px)}.van-submit-bar__safe{height:constant(safe-area-inset-bottom);height:env(safe-area-inset-bottom)}.van-submit-bar__text{color:var(--submit-bar-text-color,#323233);flex:1;font-weight:var(--font-weight-bold,500);padding-right:var(--padding-sm,12px);text-align:right}.van-submit-bar__price{color:var(--submit-bar-price-color,#ee0a24);font-size:var(--submit-bar-price-font-size,12px);font-weight:var(--font-weight-bold,500)}.van-submit-bar__price-integer{font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:20px}.van-submit-bar__currency{font-size:var(--submit-bar-currency-font-size,12px)}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{--button-default-height:var(--submit-bar-button-height,40px)!important;--button-line-height:var(--submit-bar-button-height,40px)!important;font-weight:var(--font-weight-bold,500);width:var(--submit-bar-button-width,110px)}"
  },
  {
    "path": "dist/swipe-cell/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/swipe-cell/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { touch } from '../mixins/touch';\nimport { range } from '../common/utils';\nconst THRESHOLD = 0.3;\nlet ARRAY = [];\nVantComponent({\n    props: {\n        disabled: Boolean,\n        leftWidth: {\n            type: Number,\n            value: 0,\n            observer(leftWidth = 0) {\n                if (this.offset > 0) {\n                    this.swipeMove(leftWidth);\n                }\n            },\n        },\n        rightWidth: {\n            type: Number,\n            value: 0,\n            observer(rightWidth = 0) {\n                if (this.offset < 0) {\n                    this.swipeMove(-rightWidth);\n                }\n            },\n        },\n        asyncClose: Boolean,\n        name: {\n            type: null,\n            value: '',\n        },\n    },\n    mixins: [touch],\n    data: {\n        catchMove: false,\n        wrapperStyle: '',\n    },\n    created() {\n        this.offset = 0;\n        ARRAY.push(this);\n    },\n    destroyed() {\n        ARRAY = ARRAY.filter((item) => item !== this);\n    },\n    methods: {\n        open(position) {\n            const { leftWidth, rightWidth } = this.data;\n            const offset = position === 'left' ? leftWidth : -rightWidth;\n            this.swipeMove(offset);\n            this.$emit('open', {\n                position,\n                name: this.data.name,\n            });\n        },\n        close() {\n            this.swipeMove(0);\n        },\n        swipeMove(offset = 0) {\n            this.offset = range(offset, -this.data.rightWidth, this.data.leftWidth);\n            const transform = `translate3d(${this.offset}px, 0, 0)`;\n            const transition = this.dragging\n                ? 'none'\n                : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';\n            this.setData({\n                wrapperStyle: `\n        -webkit-transform: ${transform};\n        -webkit-transition: ${transition};\n        transform: ${transform};\n        transition: ${transition};\n      `,\n            });\n        },\n        swipeLeaveTransition() {\n            const { leftWidth, rightWidth } = this.data;\n            const { offset } = this;\n            if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) {\n                this.open('right');\n            }\n            else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) {\n                this.open('left');\n            }\n            else {\n                this.swipeMove(0);\n            }\n            this.setData({ catchMove: false });\n        },\n        startDrag(event) {\n            if (this.data.disabled) {\n                return;\n            }\n            this.startOffset = this.offset;\n            this.touchStart(event);\n        },\n        noop() { },\n        onDrag(event) {\n            if (this.data.disabled) {\n                return;\n            }\n            this.touchMove(event);\n            if (this.direction !== 'horizontal') {\n                return;\n            }\n            this.dragging = true;\n            ARRAY.filter((item) => item !== this && item.offset !== 0).forEach((item) => item.close());\n            this.setData({ catchMove: true });\n            this.swipeMove(this.startOffset + this.deltaX);\n        },\n        endDrag() {\n            if (this.data.disabled) {\n                return;\n            }\n            this.dragging = false;\n            this.swipeLeaveTransition();\n        },\n        onClick(event) {\n            const { key: position = 'outside' } = event.currentTarget.dataset;\n            this.$emit('click', position);\n            if (!this.offset) {\n                return;\n            }\n            if (this.data.asyncClose) {\n                this.$emit('close', {\n                    position,\n                    instance: this,\n                    name: this.data.name,\n                });\n            }\n            else {\n                this.swipeMove(0);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/swipe-cell/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/swipe-cell/index.wxml",
    "content": "<view\n  class=\"van-swipe-cell custom-class\"\n  data-key=\"cell\"\n  catchtap=\"onClick\"\n  bindtouchstart=\"startDrag\"\n  catchtouchmove=\"{{ catchMove ? 'noop' : '' }}\"\n  capture-bind:touchmove=\"onDrag\"\n  bindtouchend=\"endDrag\"\n  bindtouchcancel=\"endDrag\"\n>\n  <view style=\"{{ wrapperStyle }}\">\n    <view wx:if=\"{{ leftWidth }}\" class=\"van-swipe-cell__left\" data-key=\"left\" catch:tap=\"onClick\">\n      <slot name=\"left\" />\n    </view>\n    <slot />\n    <view wx:if=\"{{ rightWidth }}\" class=\"van-swipe-cell__right\" data-key=\"right\" catch:tap=\"onClick\">\n      <slot name=\"right\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/swipe-cell/index.wxss",
    "content": "@import '../common/index.wxss';.van-swipe-cell{overflow:hidden;position:relative}.van-swipe-cell__left,.van-swipe-cell__right{height:100%;position:absolute;top:0}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}"
  },
  {
    "path": "dist/switch/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/switch/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    field: true,\n    classes: ['node-class'],\n    props: {\n        checked: null,\n        loading: Boolean,\n        disabled: Boolean,\n        activeColor: String,\n        inactiveColor: String,\n        size: {\n            type: String,\n            value: '30',\n        },\n        activeValue: {\n            type: null,\n            value: true,\n        },\n        inactiveValue: {\n            type: null,\n            value: false,\n        },\n    },\n    methods: {\n        onClick() {\n            const { activeValue, inactiveValue, disabled, loading } = this.data;\n            if (disabled || loading) {\n                return;\n            }\n            const checked = this.data.checked === activeValue;\n            const value = checked ? inactiveValue : activeValue;\n            this.$emit('input', value);\n            this.$emit('change', value);\n        },\n    },\n});\n"
  },
  {
    "path": "dist/switch/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "dist/switch/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class\"\n  style=\"{{ computed.rootStyle({ size, checked, activeColor, inactiveColor, activeValue }) }}\"\n  bind:tap=\"onClick\"\n>\n  <view class=\"van-switch__node node-class\">\n    <van-loading\n      wx:if=\"{{ loading }}\"\n      color=\"{{ computed.loadingColor({ checked, activeColor, inactiveColor, activeValue }) }}\"\n      custom-class=\"van-switch__loading\"\n    />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/switch/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  var currentColor = data.checked === data.activeValue ? data.activeColor : data.inactiveColor;\n\n  return style({\n    'font-size': addUnit(data.size),\n    'background-color': currentColor,\n  });\n}\n\nvar BLUE = '#1989fa';\nvar GRAY_DARK = '#969799';\n\nfunction loadingColor(data) {\n  return data.checked === data.activeValue\n    ? data.activeColor || BLUE\n    : data.inactiveColor || GRAY_DARK;\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  loadingColor: loadingColor,\n};\n"
  },
  {
    "path": "dist/switch/index.wxss",
    "content": "@import '../common/index.wxss';.van-switch{background-color:var(--switch-background-color,#fff);border:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,2em)}.van-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,1em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,1em);z-index:var(--switch-node-z-index,1)}.van-switch__loading{height:50%;left:25%;position:absolute!important;top:25%;width:50%}.van-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.van-switch--on .van-switch__node{transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)))}.van-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}"
  },
  {
    "path": "dist/tab/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/tab/index.js",
    "content": "import { useParent } from '../common/relation';\nimport { VantComponent } from '../common/component';\nVantComponent({\n    relation: useParent('tabs'),\n    props: {\n        dot: {\n            type: Boolean,\n            observer: 'update',\n        },\n        info: {\n            type: null,\n            observer: 'update',\n        },\n        title: {\n            type: String,\n            observer: 'update',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'update',\n        },\n        titleStyle: {\n            type: String,\n            observer: 'update',\n        },\n        name: {\n            type: null,\n            value: '',\n        },\n    },\n    data: {\n        active: false,\n    },\n    methods: {\n        getComputedName() {\n            if (this.data.name !== '') {\n                return this.data.name;\n            }\n            return this.index;\n        },\n        updateRender(active, parent) {\n            const { data: parentData } = parent;\n            this.inited = this.inited || active;\n            this.setData({\n                active,\n                shouldRender: this.inited || !parentData.lazyRender,\n                shouldShow: active || parentData.animated,\n            });\n        },\n        update() {\n            if (this.parent) {\n                this.parent.updateTabs();\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/tab/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/tab/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"custom-class {{ utils.bem('tab__pane', { active, inactive: !active }) }}\"\n  style=\"{{ shouldShow ? '' : 'display: none;' }}\"\n>\n  <slot wx:if=\"{{ shouldRender }}\" />\n</view>\n"
  },
  {
    "path": "dist/tab/index.wxss",
    "content": "@import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.van-tab__pane{-webkit-overflow-scrolling:touch;box-sizing:border-box;overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}"
  },
  {
    "path": "dist/tabbar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/tabbar/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nimport { getRect } from '../common/utils';\nVantComponent({\n    relation: useChildren('tabbar-item', function () {\n        this.updateChildren();\n    }),\n    props: {\n        active: {\n            type: null,\n            observer: 'updateChildren',\n        },\n        activeColor: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        inactiveColor: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        fixed: {\n            type: Boolean,\n            value: true,\n            observer: 'setHeight',\n        },\n        placeholder: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        height: 50,\n    },\n    methods: {\n        updateChildren() {\n            const { children } = this;\n            if (!Array.isArray(children) || !children.length) {\n                return;\n            }\n            children.forEach((child) => child.updateFromParent());\n        },\n        setHeight() {\n            if (!this.data.fixed || !this.data.placeholder) {\n                return;\n            }\n            wx.nextTick(() => {\n                getRect(this, '.van-tabbar').then((res) => {\n                    this.setData({ height: res.height });\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/tabbar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/tabbar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ border ? 'van-hairline--top-bottom' : '' }} {{ utils.bem('tabbar', { fixed, safe: safeAreaInsetBottom }) }} custom-class\"\n  style=\"{{ zIndex ? 'z-index: ' + zIndex : '' }}\"\n>\n  <slot />\n</view>\n\n<view wx:if=\"{{ fixed && placeholder }}\" style=\"height: {{ height }}px;\"></view>\n"
  },
  {
    "path": "dist/tabbar/index.wxss",
    "content": "@import '../common/index.wxss';.van-tabbar{background-color:var(--tabbar-background-color,#fff);box-sizing:initial;display:flex;height:var(--tabbar-height,50px);width:100%}.van-tabbar--fixed{bottom:0;left:0;position:fixed}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}"
  },
  {
    "path": "dist/tabbar-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/tabbar-item/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nVantComponent({\n    props: {\n        info: null,\n        name: null,\n        icon: String,\n        dot: Boolean,\n        url: {\n            type: String,\n            value: '',\n        },\n        linkType: {\n            type: String,\n            value: 'redirectTo',\n        },\n        iconPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n    },\n    relation: useParent('tabbar'),\n    data: {\n        active: false,\n        activeColor: '',\n        inactiveColor: '',\n    },\n    methods: {\n        onClick() {\n            const { parent } = this;\n            if (parent) {\n                const index = parent.children.indexOf(this);\n                const active = this.data.name || index;\n                if (active !== this.data.active) {\n                    parent.$emit('change', active);\n                }\n            }\n            const { url, linkType } = this.data;\n            if (url && wx[linkType]) {\n                return wx[linkType]({ url });\n            }\n            this.$emit('click');\n        },\n        updateFromParent() {\n            const { parent } = this;\n            if (!parent) {\n                return;\n            }\n            const index = parent.children.indexOf(this);\n            const parentData = parent.data;\n            const { data } = this;\n            const active = (data.name || index) === parentData.active;\n            const patch = {};\n            if (active !== data.active) {\n                patch.active = active;\n            }\n            if (parentData.activeColor !== data.activeColor) {\n                patch.activeColor = parentData.activeColor;\n            }\n            if (parentData.inactiveColor !== data.inactiveColor) {\n                patch.inactiveColor = parentData.inactiveColor;\n            }\n            if (Object.keys(patch).length > 0) {\n                this.setData(patch);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "dist/tabbar-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "dist/tabbar-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('tabbar-item', { active }) }} custom-class\"\n  style=\"color: {{ active ? activeColor : inactiveColor }}\"\n  bindtap=\"onClick\"\n>\n  <view class=\"van-tabbar-item__icon\">\n    <van-icon\n      wx:if=\"{{ icon }}\"\n      name=\"{{ icon }}\"\n      class-prefix=\"{{ iconPrefix }}\"\n      custom-class=\"van-tabbar-item__icon__inner\"\n    />\n    <block wx:else>\n      <slot wx:if=\"{{ active }}\" name=\"icon-active\" />\n      <slot wx:else name=\"icon\" />\n    </block>\n    <van-info\n      dot=\"{{ dot }}\"\n      info=\"{{ info }}\"\n      custom-class=\"van-tabbar-item__info\"\n    />\n  </view>\n  <view class=\"van-tabbar-item__text\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "dist/tabbar-item/index.wxss",
    "content": "@import '../common/index.wxss';:host{flex:1}.van-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,#646566);display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}"
  },
  {
    "path": "dist/tabs/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/tabs/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { touch } from '../mixins/touch';\nimport { getAllRect, getRect, groupSetData, nextTick, requestAnimationFrame, } from '../common/utils';\nimport { isDef } from '../common/validator';\nimport { useChildren } from '../common/relation';\nVantComponent({\n    mixins: [touch],\n    classes: [\n        'nav-class',\n        'tab-class',\n        'tab-active-class',\n        'line-class',\n        'wrap-class',\n    ],\n    relation: useChildren('tab', function () {\n        this.updateTabs();\n    }),\n    props: {\n        sticky: Boolean,\n        border: Boolean,\n        swipeable: Boolean,\n        titleActiveColor: String,\n        titleInactiveColor: String,\n        color: String,\n        animated: {\n            type: Boolean,\n            observer() {\n                this.children.forEach((child, index) => child.updateRender(index === this.data.currentIndex, this));\n            },\n        },\n        lineWidth: {\n            type: null,\n            value: 40,\n            observer: 'resize',\n        },\n        lineHeight: {\n            type: null,\n            value: -1,\n        },\n        active: {\n            type: null,\n            value: 0,\n            observer(name) {\n                if (name !== this.getCurrentName()) {\n                    this.setCurrentIndexByName(name);\n                }\n            },\n        },\n        type: {\n            type: String,\n            value: 'line',\n        },\n        ellipsis: {\n            type: Boolean,\n            value: true,\n        },\n        duration: {\n            type: Number,\n            value: 0.3,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        swipeThreshold: {\n            type: Number,\n            value: 5,\n            observer(value) {\n                this.setData({\n                    scrollable: this.children.length > value || !this.data.ellipsis,\n                });\n            },\n        },\n        offsetTop: {\n            type: Number,\n            value: 0,\n        },\n        lazyRender: {\n            type: Boolean,\n            value: true,\n        },\n        useBeforeChange: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        tabs: [],\n        scrollLeft: 0,\n        scrollable: false,\n        currentIndex: 0,\n        container: null,\n        skipTransition: true,\n        scrollWithAnimation: false,\n        lineOffsetLeft: 0,\n        inited: false,\n    },\n    mounted() {\n        requestAnimationFrame(() => {\n            this.swiping = true;\n            this.setData({\n                container: () => this.createSelectorQuery().select('.van-tabs'),\n            });\n            this.resize();\n            this.scrollIntoView();\n        });\n    },\n    methods: {\n        updateTabs() {\n            const { children = [], data } = this;\n            this.setData({\n                tabs: children.map((child) => child.data),\n                scrollable: this.children.length > data.swipeThreshold || !data.ellipsis,\n            });\n            this.setCurrentIndexByName(data.active || this.getCurrentName());\n        },\n        trigger(eventName, child) {\n            const { currentIndex } = this.data;\n            const data = this.getChildData(currentIndex, child);\n            if (!isDef(data)) {\n                return;\n            }\n            this.$emit(eventName, data);\n        },\n        onTap(event) {\n            const { index } = event.currentTarget.dataset;\n            const child = this.children[index];\n            if (child.data.disabled) {\n                this.trigger('disabled', child);\n                return;\n            }\n            this.onBeforeChange(index).then(() => {\n                this.setCurrentIndex(index);\n                nextTick(() => {\n                    this.trigger('click');\n                });\n            });\n        },\n        // correct the index of active tab\n        setCurrentIndexByName(name) {\n            const { children = [] } = this;\n            const matched = children.filter((child) => child.getComputedName() === name);\n            if (matched.length) {\n                this.setCurrentIndex(matched[0].index);\n            }\n        },\n        setCurrentIndex(currentIndex) {\n            const { data, children = [] } = this;\n            if (!isDef(currentIndex) ||\n                currentIndex >= children.length ||\n                currentIndex < 0) {\n                return;\n            }\n            groupSetData(this, () => {\n                children.forEach((item, index) => {\n                    const active = index === currentIndex;\n                    if (active !== item.data.active || !item.inited) {\n                        item.updateRender(active, this);\n                    }\n                });\n            });\n            if (currentIndex === data.currentIndex) {\n                if (!data.inited) {\n                    this.resize();\n                }\n                return;\n            }\n            const shouldEmitChange = data.currentIndex !== null;\n            this.setData({ currentIndex });\n            requestAnimationFrame(() => {\n                this.resize();\n                this.scrollIntoView();\n            });\n            nextTick(() => {\n                this.trigger('input');\n                if (shouldEmitChange) {\n                    this.trigger('change');\n                }\n            });\n        },\n        getCurrentName() {\n            const activeTab = this.children[this.data.currentIndex];\n            if (activeTab) {\n                return activeTab.getComputedName();\n            }\n        },\n        resize() {\n            if (this.data.type !== 'line') {\n                return;\n            }\n            const { currentIndex, ellipsis, skipTransition } = this.data;\n            Promise.all([\n                getAllRect(this, '.van-tab'),\n                getRect(this, '.van-tabs__line'),\n            ]).then(([rects = [], lineRect]) => {\n                const rect = rects[currentIndex];\n                if (rect == null) {\n                    return;\n                }\n                let lineOffsetLeft = rects\n                    .slice(0, currentIndex)\n                    .reduce((prev, curr) => prev + curr.width, 0);\n                lineOffsetLeft +=\n                    (rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);\n                this.setData({ lineOffsetLeft, inited: true });\n                this.swiping = true;\n                if (skipTransition) {\n                    // waiting transition end\n                    setTimeout(() => {\n                        this.setData({ skipTransition: false });\n                    }, this.data.duration);\n                }\n            });\n        },\n        // scroll active tab into view\n        scrollIntoView() {\n            const { currentIndex, scrollable, scrollWithAnimation } = this.data;\n            if (!scrollable) {\n                return;\n            }\n            Promise.all([\n                getAllRect(this, '.van-tab'),\n                getRect(this, '.van-tabs__nav'),\n            ]).then(([tabRects, navRect]) => {\n                const tabRect = tabRects[currentIndex];\n                const offsetLeft = tabRects\n                    .slice(0, currentIndex)\n                    .reduce((prev, curr) => prev + curr.width, 0);\n                this.setData({\n                    scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,\n                });\n                if (!scrollWithAnimation) {\n                    nextTick(() => {\n                        this.setData({ scrollWithAnimation: true });\n                    });\n                }\n            });\n        },\n        onTouchScroll(event) {\n            this.$emit('scroll', event.detail);\n        },\n        onTouchStart(event) {\n            if (!this.data.swipeable)\n                return;\n            this.swiping = true;\n            this.touchStart(event);\n        },\n        onTouchMove(event) {\n            if (!this.data.swipeable || !this.swiping)\n                return;\n            this.touchMove(event);\n        },\n        // watch swipe touch end\n        onTouchEnd() {\n            if (!this.data.swipeable || !this.swiping)\n                return;\n            const { direction, deltaX, offsetX } = this;\n            const minSwipeDistance = 50;\n            if (direction === 'horizontal' && offsetX >= minSwipeDistance) {\n                const index = this.getAvaiableTab(deltaX);\n                if (index !== -1) {\n                    this.onBeforeChange(index).then(() => this.setCurrentIndex(index));\n                }\n            }\n            this.swiping = false;\n        },\n        getAvaiableTab(direction) {\n            const { tabs, currentIndex } = this.data;\n            const step = direction > 0 ? -1 : 1;\n            for (let i = step; currentIndex + i < tabs.length && currentIndex + i >= 0; i += step) {\n                const index = currentIndex + i;\n                if (index >= 0 &&\n                    index < tabs.length &&\n                    tabs[index] &&\n                    !tabs[index].disabled) {\n                    return index;\n                }\n            }\n            return -1;\n        },\n        onBeforeChange(index) {\n            const { useBeforeChange } = this.data;\n            if (!useBeforeChange) {\n                return Promise.resolve();\n            }\n            return new Promise((resolve, reject) => {\n                this.$emit('before-change', Object.assign(Object.assign({}, this.getChildData(index)), { callback: (status) => (status ? resolve() : reject()) }));\n            });\n        },\n        getChildData(index, child) {\n            const currentChild = child || this.children[index];\n            if (!isDef(currentChild)) {\n                return;\n            }\n            return {\n                index: currentChild.index,\n                name: currentChild.getComputedName(),\n                title: currentChild.data.title,\n            };\n        },\n    },\n});\n"
  },
  {
    "path": "dist/tabs/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\",\n    \"van-sticky\": \"../sticky/index\"\n  }\n}\n"
  },
  {
    "path": "dist/tabs/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class {{ utils.bem('tabs') }}\">\n  <van-sticky\n    disabled=\"{{ !sticky }}\"\n    z-index=\"{{ zIndex }}\"\n    offset-top=\"{{ offsetTop }}\"\n    container=\"{{ container }}\"\n    bind:scroll=\"onTouchScroll\"\n  >\n    <view class=\"{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class\">\n      <slot name=\"nav-left\" />\n\n      <scroll-view\n        scroll-x=\"{{ scrollable }}\"\n        scroll-with-animation=\"{{ scrollWithAnimation }}\"\n        scroll-left=\"{{ scrollLeft }}\"\n        class=\"{{ utils.bem('tabs__scroll', [type]) }}\"\n        style=\"{{ color ? 'border-color: ' + color : '' }}\"\n      >\n        <view class=\"{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class\" style=\"{{ computed.navStyle(color, type) }}\">\n          <view wx:if=\"{{ type === 'line' }}\" class=\"van-tabs__line\" style=\"{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}\" />\n          <view\n            wx:for=\"{{ tabs }}\"\n            wx:key=\"index\"\n            data-index=\"{{ index }}\"\n            class=\"{{ computed.tabClass(index === currentIndex, ellipsis) }} {{ utils.bem('tab', { active: index === currentIndex, disabled: item.disabled, complete: !ellipsis }) }}\"\n            style=\"{{ computed.tabStyle({ active: index === currentIndex, ellipsis, color, type, disabled: item.disabled, titleActiveColor, titleInactiveColor, swipeThreshold, scrollable }) }}\"\n            bind:tap=\"onTap\"\n          >\n            <view class=\"{{ ellipsis ? 'van-ellipsis' : '' }}\" style=\"{{ item.titleStyle }}\">\n              {{ item.title }}\n              <van-info\n                wx:if=\"{{ item.info !== null || item.dot }}\"\n                info=\"{{ item.info }}\"\n                dot=\"{{ item.dot }}\"\n                custom-class=\"van-tab__title__info\"\n              />\n            </view>\n          </view>\n        </view>\n      </scroll-view>\n\n      <slot name=\"nav-right\" />\n    </view>\n  </van-sticky>\n\n  <view\n    class=\"van-tabs__content\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchmove=\"onTouchMove\"\n    bind:touchend=\"onTouchEnd\"\n    bind:touchcancel=\"onTouchEnd\"\n  >\n    <view\n      class=\"{{ utils.bem('tabs__track', [{ animated }]) }} van-tabs__track\"\n      style=\"{{ computed.trackStyle({ duration, currentIndex, animated }) }}\"\n    >\n      <slot />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/tabs/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction tabClass(active, ellipsis) {\n  var classes = ['tab-class'];\n\n  if (active) {\n    classes.push('tab-active-class');\n  }\n\n  if (ellipsis) {\n    classes.push('van-ellipsis');\n  }\n\n  return classes.join(' ');\n}\n\nfunction tabStyle(data) {\n  var titleColor = data.active\n    ? data.titleActiveColor\n    : data.titleInactiveColor;\n\n  var ellipsis = data.scrollable && data.ellipsis;\n\n  // card theme color\n  if (data.type === 'card') {\n    return style({\n      'border-color': data.color,\n      'background-color': !data.disabled && data.active ? data.color : null,\n      color: titleColor || (!data.disabled && !data.active ? data.color : null),\n      'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,\n    });\n  }\n\n  return style({\n    color: titleColor,\n    'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,\n  });\n}\n\nfunction navStyle(color, type) {\n  return style({\n    'border-color': type === 'card' && color ? color : null,\n  });\n}\n\nfunction trackStyle(data) {\n  if (!data.animated) {\n    return '';\n  }\n\n  return style({\n    left: -100 * data.currentIndex + '%',\n    'transition-duration': data.duration + 's',\n    '-webkit-transition-duration': data.duration + 's',\n  });\n}\n\nfunction lineStyle(data) {\n  return style({\n    width: utils.addUnit(data.lineWidth),\n    opacity: data.inited ? 1 : 0,\n    transform: 'translateX(' + data.lineOffsetLeft + 'px)',\n    '-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',\n    'background-color': data.color,\n    height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,\n    'border-radius':\n      data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,\n    'transition-duration': !data.skipTransition ? data.duration + 's' : null,\n    '-webkit-transition-duration': !data.skipTransition\n      ? data.duration + 's'\n      : null,\n  });\n}\n\nmodule.exports = {\n  tabClass: tabClass,\n  tabStyle: tabStyle,\n  trackStyle: trackStyle,\n  lineStyle: lineStyle,\n  navStyle: navStyle,\n};\n"
  },
  {
    "path": "dist/tabs/index.wxss",
    "content": "@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff);overflow:auto}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line{height:var(--tabs-line-height,44px)}.van-tabs--card{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}"
  },
  {
    "path": "dist/tag/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/tag/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        size: String,\n        mark: Boolean,\n        color: String,\n        plain: Boolean,\n        round: Boolean,\n        textColor: String,\n        type: {\n            type: String,\n            value: 'default',\n        },\n        closeable: Boolean,\n    },\n    methods: {\n        onClose() {\n            this.$emit('close');\n        },\n    },\n});\n"
  },
  {
    "path": "dist/tag/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "dist/tag/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('tag', [type, size, { mark, plain, round }]) }}\"\n  style=\"{{ computed.rootStyle({ plain, color, textColor }) }}\"\n>\n  <slot />\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"cross\"\n    custom-class=\"van-tag__close\"\n    bind:click=\"onClose\"\n  />\n</view>\n"
  },
  {
    "path": "dist/tag/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'background-color': data.plain ? '' : data.color,\n    color: data.textColor || data.plain ? data.textColor || data.color : '',\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "dist/tag/index.wxss",
    "content": "@import '../common/index.wxss';.van-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.van-tag--default{background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0}.van-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.van-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.van-tag--mark:after{content:\"\";display:block;width:2px}.van-tag--round{border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{margin-left:2px;min-width:1em}"
  },
  {
    "path": "dist/toast/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/toast/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    props: {\n        show: Boolean,\n        mask: Boolean,\n        message: String,\n        forbidClick: Boolean,\n        zIndex: {\n            type: Number,\n            value: 1000,\n        },\n        type: {\n            type: String,\n            value: 'text',\n        },\n        loadingType: {\n            type: String,\n            value: 'circular',\n        },\n        position: {\n            type: String,\n            value: 'middle',\n        },\n    },\n    methods: {\n        // for prevent touchmove\n        noop() { },\n    },\n});\n"
  },
  {
    "path": "dist/toast/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\",\n    \"van-overlay\": \"../overlay/index\",\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "dist/toast/index.wxml",
    "content": "<van-overlay\n  wx:if=\"{{ mask || forbidClick }}\"\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  custom-style=\"{{ mask ? '' : 'background-color: transparent;' }}\"\n/>\n<van-transition\n  show=\"{{ show }}\"\n  custom-style=\"z-index: {{ zIndex }}\"\n  custom-class=\"van-toast__container\"\n>\n  <view\n    class=\"van-toast van-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }} van-toast--{{ position }}\"\n    catch:touchmove=\"noop\"\n  >\n    <!-- text only -->\n    <text wx:if=\"{{ type === 'text' }}\">{{ message }}</text>\n\n    <!-- html only -->\n    <rich-text wx:elif=\"{{ type === 'html' }}\" nodes=\"{{ message }}\"></rich-text>\n\n    <!-- with icon -->\n    <block wx:else>\n      <van-loading\n        wx:if=\"{{ type === 'loading' }}\"\n        color=\"white\"\n        type=\"{{ loadingType }}\"\n        custom-class=\"van-toast__loading\"\n      />\n      <van-icon wx:else class=\"van-toast__icon\" name=\"{{ type }}\" />\n      <text wx:if=\"{{ message }}\" class=\"van-toast__text\">{{ message }}</text>\n    </block>\n\n    <slot />\n  </view>\n</van-transition>\n"
  },
  {
    "path": "dist/toast/index.wxss",
    "content": "@import '../common/index.wxss';.van-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,8px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.van-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.van-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.van-toast--icon .van-toast__icon{font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{transform:translateY(-30vh)}.van-toast--bottom{transform:translateY(30vh)}"
  },
  {
    "path": "dist/toast/toast.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\ntype ToastMessage = string | number;\ntype ToastContext = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance;\ninterface ToastOptions {\n    show?: boolean;\n    type?: string;\n    mask?: boolean;\n    zIndex?: number;\n    context?: (() => ToastContext) | ToastContext;\n    position?: string;\n    duration?: number;\n    selector?: string;\n    forbidClick?: boolean;\n    loadingType?: string;\n    message?: ToastMessage;\n    onClose?: () => void;\n}\ndeclare function Toast(toastOptions: ToastOptions | ToastMessage): WechatMiniprogram.Component.TrivialInstance | undefined;\ndeclare namespace Toast {\n    var loading: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var success: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var fail: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var clear: () => void;\n    var setDefaultOptions: (options: ToastOptions) => void;\n    var resetDefaultOptions: () => void;\n}\nexport default Toast;\n"
  },
  {
    "path": "dist/toast/toast.js",
    "content": "import { isObj } from '../common/validator';\nconst defaultOptions = {\n    type: 'text',\n    mask: false,\n    message: '',\n    show: true,\n    zIndex: 1000,\n    duration: 2000,\n    position: 'middle',\n    forbidClick: false,\n    loadingType: 'circular',\n    selector: '#van-toast',\n};\nlet queue = [];\nlet currentOptions = Object.assign({}, defaultOptions);\nfunction parseOptions(message) {\n    return isObj(message) ? message : { message };\n}\nfunction getContext() {\n    const pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nfunction Toast(toastOptions) {\n    const options = Object.assign(Object.assign({}, currentOptions), parseOptions(toastOptions));\n    const context = (typeof options.context === 'function'\n        ? options.context()\n        : options.context) || getContext();\n    const toast = context.selectComponent(options.selector);\n    if (!toast) {\n        console.warn('未找到 van-toast 节点，请确认 selector 及 context 是否正确');\n        return;\n    }\n    delete options.context;\n    delete options.selector;\n    toast.clear = () => {\n        toast.setData({ show: false });\n        if (options.onClose) {\n            options.onClose();\n        }\n    };\n    queue.push(toast);\n    toast.setData(options);\n    clearTimeout(toast.timer);\n    if (options.duration != null && options.duration > 0) {\n        toast.timer = setTimeout(() => {\n            toast.clear();\n            queue = queue.filter((item) => item !== toast);\n        }, options.duration);\n    }\n    return toast;\n}\nconst createMethod = (type) => (options) => Toast(Object.assign({ type }, parseOptions(options)));\nToast.loading = createMethod('loading');\nToast.success = createMethod('success');\nToast.fail = createMethod('fail');\nToast.clear = () => {\n    queue.forEach((toast) => {\n        toast.clear();\n    });\n    queue = [];\n};\nToast.setDefaultOptions = (options) => {\n    Object.assign(currentOptions, options);\n};\nToast.resetDefaultOptions = () => {\n    currentOptions = Object.assign({}, defaultOptions);\n};\nexport default Toast;\n"
  },
  {
    "path": "dist/transition/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/transition/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { transition } from '../mixins/transition';\nVantComponent({\n    classes: [\n        'enter-class',\n        'enter-active-class',\n        'enter-to-class',\n        'leave-class',\n        'leave-active-class',\n        'leave-to-class',\n    ],\n    mixins: [transition(true)],\n});\n"
  },
  {
    "path": "dist/transition/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "dist/transition/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  wx:if=\"{{ inited }}\"\n  class=\"van-transition custom-class {{ classes }}\"\n  style=\"{{ computed.rootStyle({ currentDuration, display, customStyle }) }}\"\n  bind:transitionend=\"onTransitionEnd\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "dist/transition/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      '-webkit-transition-duration': data.currentDuration + 'ms',\n      'transition-duration': data.currentDuration + 'ms',\n    },\n    data.display ? null : 'display: none',\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "dist/transition/index.wxss",
    "content": "@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:transform}.van-slide-up-enter,.van-slide-up-leave-to{transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{transform:translate3d(100%,0,0)}"
  },
  {
    "path": "dist/tree-select/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/tree-select/index.js",
    "content": "import { VantComponent } from '../common/component';\nVantComponent({\n    classes: [\n        'main-item-class',\n        'content-item-class',\n        'main-active-class',\n        'content-active-class',\n        'main-disabled-class',\n        'content-disabled-class',\n    ],\n    props: {\n        items: {\n            type: Array,\n            observer: 'updateSubItems',\n        },\n        activeId: null,\n        mainActiveIndex: {\n            type: Number,\n            value: 0,\n            observer: 'updateSubItems',\n        },\n        height: {\n            type: null,\n            value: 300,\n        },\n        max: {\n            type: Number,\n            value: Infinity,\n        },\n        selectedIcon: {\n            type: String,\n            value: 'success',\n        },\n    },\n    data: {\n        subItems: [],\n    },\n    methods: {\n        // 当一个子项被选择时\n        onSelectItem(event) {\n            const { item } = event.currentTarget.dataset;\n            const isArray = Array.isArray(this.data.activeId);\n            // 判断有没有超出右侧选择的最大数\n            const isOverMax = isArray && this.data.activeId.length >= this.data.max;\n            // 判断该项有没有被选中, 如果有被选中，则忽视是否超出的条件\n            const isSelected = isArray\n                ? this.data.activeId.indexOf(item.id) > -1\n                : this.data.activeId === item.id;\n            if (!item.disabled && (!isOverMax || isSelected)) {\n                this.$emit('click-item', item);\n            }\n        },\n        // 当一个导航被点击时\n        onClickNav(event) {\n            const index = event.detail;\n            const item = this.data.items[index];\n            if (!item.disabled) {\n                this.$emit('click-nav', { index });\n            }\n        },\n        // 更新子项列表\n        updateSubItems() {\n            const { items, mainActiveIndex } = this.data;\n            const { children = [] } = items[mainActiveIndex] || {};\n            this.setData({ subItems: children });\n        },\n    },\n});\n"
  },
  {
    "path": "dist/tree-select/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-sidebar\": \"../sidebar/index\",\n    \"van-sidebar-item\": \"../sidebar-item/index\"\n  }\n}\n"
  },
  {
    "path": "dist/tree-select/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"wxs\" />\n\n<view\n  class=\"van-tree-select\"\n  style=\"height: {{ utils.addUnit(height) }}\"\n>\n  <scroll-view scroll-y class=\"van-tree-select__nav\">\n    <van-sidebar active-key=\"{{ mainActiveIndex }}\" bind:change=\"onClickNav\" custom-class=\"van-tree-select__nav__inner\">\n      <van-sidebar-item\n        wx:for=\"{{ items }}\"\n        wx:key=\"index\"\n        custom-class=\"main-item-class\"\n        active-class=\"main-active-class\"\n        disabled-class=\"main-disabled-class\"\n        badge=\"{{ item.badge }}\"\n        dot=\"{{ item.dot }}\"\n        title=\"{{ item.text }}\"\n        disabled=\"{{ item.disabled }}\"\n      />\n    </van-sidebar>\n  </scroll-view>\n  <scroll-view scroll-y class=\"van-tree-select__content\">\n    <slot name=\"content\" />\n    <view\n      wx:for=\"{{ subItems }}\"\n      wx:key=\"id\"\n      class=\"van-ellipsis content-item-class {{ utils.bem('tree-select__item', { active: wxs.isActive(activeId, item.id), disabled: item.disabled }) }} {{ wxs.isActive(activeId, item.id) ? 'content-active-class' : '' }} {{ item.disabled ? 'content-disabled-class' : '' }}\"\n      data-item=\"{{ item }}\"\n      bind:tap=\"onSelectItem\"\n    >\n      {{ item.text }}\n      <van-icon\n        wx:if=\"{{ wxs.isActive(activeId, item.id) }}\"\n        name=\"{{ selectedIcon }}\"\n        size=\"16px\"\n        class=\"van-tree-select__selected\"\n      />\n    </view>\n  </scroll-view>\n</view>\n"
  },
  {
    "path": "dist/tree-select/index.wxs",
    "content": "/* eslint-disable */\nvar array = require('../wxs/array.wxs');\n\nfunction isActive (activeList, itemId) {\n  if (array.isArray(activeList)) {\n    return activeList.indexOf(itemId) > -1;\n  }\n\n  return activeList === itemId;\n}\n\nmodule.exports.isActive = isActive;\n"
  },
  {
    "path": "dist/tree-select/index.wxss",
    "content": "@import '../common/index.wxss';.van-tree-select{display:flex;font-size:var(--tree-select-font-size,14px);position:relative;-webkit-user-select:none;user-select:none}.van-tree-select__nav{--sidebar-padding:12px 8px 12px 12px;background-color:var(--tree-select-nav-background-color,#f7f8fa);flex:1}.van-tree-select__nav__inner{height:100%;width:100%!important}.van-tree-select__content{background-color:var(--tree-select-content-background-color,#fff);flex:2}.van-tree-select__item{font-weight:700;line-height:var(--tree-select-item-height,44px);padding:0 32px 0 var(--padding-md,16px);position:relative}.van-tree-select__item--active{color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;right:var(--padding-md,16px);top:50%;transform:translateY(-50%)}"
  },
  {
    "path": "dist/uploader/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "dist/uploader/index.js",
    "content": "import { VantComponent } from '../common/component';\nimport { isBoolean, isPromise } from '../common/validator';\nimport { imageProps, mediaProps, messageFileProps, videoProps } from './shared';\nimport { chooseFile, isImageFile, isVideoFile } from './utils';\nVantComponent({\n    props: Object.assign(Object.assign(Object.assign(Object.assign({ disabled: Boolean, multiple: Boolean, uploadText: String, useBeforeRead: Boolean, afterRead: null, beforeRead: null, previewSize: {\n            type: null,\n            value: 80,\n        }, name: {\n            type: null,\n            value: '',\n        }, accept: {\n            type: String,\n            value: 'image',\n        }, fileList: {\n            type: Array,\n            value: [],\n            observer: 'formatFileList',\n        }, maxSize: {\n            type: Number,\n            value: Number.MAX_VALUE,\n        }, maxCount: {\n            type: Number,\n            value: 100,\n        }, deletable: {\n            type: Boolean,\n            value: true,\n        }, showUpload: {\n            type: Boolean,\n            value: true,\n        }, previewImage: {\n            type: Boolean,\n            value: true,\n        }, previewFullImage: {\n            type: Boolean,\n            value: true,\n        }, videoFit: {\n            type: String,\n            value: 'contain',\n        }, imageFit: {\n            type: String,\n            value: 'scaleToFill',\n        }, uploadIcon: {\n            type: String,\n            value: 'photograph',\n        } }, imageProps), videoProps), mediaProps), messageFileProps),\n    data: {\n        lists: [],\n        isInCount: true,\n    },\n    methods: {\n        formatFileList() {\n            const { fileList = [], maxCount } = this.data;\n            const lists = fileList.map((item) => (Object.assign(Object.assign({}, item), { isImage: isImageFile(item), isVideo: isVideoFile(item), deletable: isBoolean(item.deletable) ? item.deletable : true })));\n            this.setData({ lists, isInCount: lists.length < maxCount });\n        },\n        getDetail(index) {\n            return {\n                name: this.data.name,\n                index: index == null ? this.data.fileList.length : index,\n            };\n        },\n        startUpload() {\n            const { maxCount, multiple, lists, disabled } = this.data;\n            if (disabled)\n                return;\n            chooseFile(Object.assign(Object.assign({}, this.data), { maxCount: maxCount - lists.length }))\n                .then((res) => {\n                this.onBeforeRead(multiple ? res : res[0]);\n            })\n                .catch((error) => {\n                this.$emit('error', error);\n            });\n        },\n        onBeforeRead(file) {\n            const { beforeRead, useBeforeRead } = this.data;\n            let res = true;\n            if (typeof beforeRead === 'function') {\n                res = beforeRead(file, this.getDetail());\n            }\n            if (useBeforeRead) {\n                res = new Promise((resolve, reject) => {\n                    this.$emit('before-read', Object.assign(Object.assign({ file }, this.getDetail()), { callback: (ok) => {\n                            ok ? resolve() : reject();\n                        } }));\n                });\n            }\n            if (!res) {\n                return;\n            }\n            if (isPromise(res)) {\n                res.then((data) => this.onAfterRead(data || file));\n            }\n            else {\n                this.onAfterRead(file);\n            }\n        },\n        onAfterRead(file) {\n            const { maxSize, afterRead } = this.data;\n            const oversize = Array.isArray(file)\n                ? file.some((item) => item.size > maxSize)\n                : file.size > maxSize;\n            if (oversize) {\n                this.$emit('oversize', Object.assign({ file }, this.getDetail()));\n                return;\n            }\n            if (typeof afterRead === 'function') {\n                afterRead(file, this.getDetail());\n            }\n            this.$emit('after-read', Object.assign({ file }, this.getDetail()));\n        },\n        deleteItem(event) {\n            const { index } = event.currentTarget.dataset;\n            this.$emit('delete', Object.assign(Object.assign({}, this.getDetail(index)), { file: this.data.fileList[index] }));\n        },\n        onPreviewImage(event) {\n            if (!this.data.previewFullImage)\n                return;\n            const { index } = event.currentTarget.dataset;\n            const { lists, showmenu } = this.data;\n            const item = lists[index];\n            wx.previewImage({\n                urls: lists.filter((item) => isImageFile(item)).map((item) => item.url),\n                current: item.url,\n                showmenu,\n                fail() {\n                    wx.showToast({ title: '预览图片失败', icon: 'none' });\n                },\n            });\n        },\n        onPreviewVideo(event) {\n            if (!this.data.previewFullImage)\n                return;\n            const { index } = event.currentTarget.dataset;\n            const { lists } = this.data;\n            const sources = [];\n            const current = lists.reduce((sum, cur, curIndex) => {\n                if (!isVideoFile(cur)) {\n                    return sum;\n                }\n                sources.push(Object.assign(Object.assign({}, cur), { type: 'video' }));\n                if (curIndex < index) {\n                    sum++;\n                }\n                return sum;\n            }, 0);\n            wx.previewMedia({\n                sources,\n                current,\n                fail() {\n                    wx.showToast({ title: '预览视频失败', icon: 'none' });\n                },\n            });\n        },\n        onPreviewFile(event) {\n            if (!this.data.previewFile)\n                return;\n            const { index } = event.currentTarget.dataset;\n            wx.openDocument({\n                filePath: this.data.lists[index].url,\n                showMenu: true,\n            });\n        },\n        onClickPreview(event) {\n            const { index } = event.currentTarget.dataset;\n            const item = this.data.lists[index];\n            this.$emit('click-preview', Object.assign(Object.assign({}, item), this.getDetail(index)));\n        },\n    },\n});\n"
  },
  {
    "path": "dist/uploader/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "dist/uploader/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-uploader\">\n  <view class=\"van-uploader__wrapper\">\n    <!-- 预览样式 -->\n    <view\n      wx:if=\"{{ previewImage }}\"\n      wx:for=\"{{ lists }}\"\n      wx:key=\"index\"\n      class=\"van-uploader__preview\"\n      data-index=\"{{ index }}\"\n      bindtap=\"onClickPreview\"\n    >\n      <image\n        wx:if=\"{{ item.isImage }}\"\n        mode=\"{{ imageFit }}\"\n        src=\"{{ item.thumb || item.url }}\"\n        alt=\"{{ item.name || ('图片' + index) }}\"\n        class=\"van-uploader__preview-image\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewImage\"\n      />\n      <video\n        wx:elif=\"{{ item.isVideo }}\"\n        src=\"{{ item.url }}\"\n        title=\"{{ item.name || ('视频' + index) }}\"\n        poster=\"{{ item.thumb }}\"\n        autoplay=\"{{ item.autoplay }}\"\n        object-fit=\"{{videoFit}}\"\n        referrer-policy=\"{{ referrerPolicy }}\"\n        class=\"van-uploader__preview-image\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewVideo\"\n      >\n      </video>\n      <view\n        wx:else\n        class=\"van-uploader__file\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewFile\"\n      >\n        <van-icon name=\"description\" class=\"van-uploader__file-icon\" />\n        <view class=\"van-uploader__file-name van-ellipsis\">{{ item.name || item.url }}</view>\n      </view>\n      <view\n        wx:if=\"{{ item.status === 'uploading' || item.status === 'failed' }}\"\n        class=\"van-uploader__mask\"\n      >\n       <van-icon wx:if=\"{{ item.status === 'failed' }}\" name=\"close\" class=\"van-uploader__mask-icon\" />\n       <van-loading wx:else custom-class=\"van-uploader__loading\" />\n       <text wx:if=\"{{ item.message }}\" class=\"van-uploader__mask-message\">{{ item.message }}</text>\n      </view>\n      <view\n        wx:if=\"{{ deletable && item.deletable }}\"\n        data-index=\"{{ index }}\"\n        class=\"van-uploader__preview-delete\"\n        catch:tap=\"deleteItem\"\n      >\n        <van-icon name=\"cross\" class=\"van-uploader__preview-delete-icon\" />\n      </view>\n    </view>\n\n    <!-- 上传样式 -->\n    <block wx:if=\"{{ isInCount }}\">\n      <view class=\"van-uploader__slot\" bindtap=\"startUpload\">\n        <slot />\n      </view>\n\n      <!-- 默认上传样式 -->\n      <view\n        wx:if=\"{{ showUpload }}\"\n        class=\"van-uploader__upload {{ disabled ? 'van-uploader__upload--disabled': ''}}\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        bindtap=\"startUpload\"\n      >\n        <van-icon name=\"{{ uploadIcon }}\" class=\"van-uploader__upload-icon\" />\n        <text wx:if=\"{{ uploadText }}\" class=\"van-uploader__upload-text\">{{ uploadText }}</text>\n      </view>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "dist/uploader/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction sizeStyle(data) {\n  return \"Array\" === data.previewSize.constructor ? style({\n    width: addUnit(data.previewSize[0]),\n    height: addUnit(data.previewSize[1]),\n  }) : style({\n    width: addUnit(data.previewSize),\n    height: addUnit(data.previewSize),\n  });\n}\n\nmodule.exports = {\n  sizeStyle: sizeStyle,\n};\n"
  },
  {
    "path": "dist/uploader/index.wxss",
    "content": "@import '../common/index.wxss';.van-uploader{display:inline-block;position:relative}.van-uploader__wrapper{display:flex;flex-wrap:wrap}.van-uploader__slot:empty{display:none}.van-uploader__slot:not(:empty)+.van-uploader__upload{display:none!important}.van-uploader__upload{align-items:center;background-color:var(--uploader-upload-background-color,#f7f8fa);box-sizing:border-box;display:flex;flex-direction:column;height:var(--uploader-size,80px);justify-content:center;margin:0 8px 8px 0;position:relative;width:var(--uploader-size,80px)}.van-uploader__upload:active{background-color:var(--uploader-upload-active-color,#f2f3f5)}.van-uploader__upload-icon{color:var(--uploader-icon-color,#dcdee0);font-size:var(--uploader-icon-size,24px)}.van-uploader__upload-text{color:var(--uploader-text-color,#969799);font-size:var(--uploader-text-font-size,12px);margin-top:var(--padding-xs,8px)}.van-uploader__upload--disabled{opacity:var(--uploader-disabled-opacity,.5)}.van-uploader__preview{cursor:pointer;margin:0 8px 8px 0;position:relative}.van-uploader__preview-image{display:block;height:var(--uploader-size,80px);overflow:hidden;width:var(--uploader-size,80px)}.van-uploader__preview-delete,.van-uploader__preview-delete:after{height:var(--uploader-delete-icon-size,14px);position:absolute;right:0;top:0;width:var(--uploader-delete-icon-size,14px)}.van-uploader__preview-delete:after{background-color:var(--uploader-delete-background-color,rgba(0,0,0,.7));border-radius:0 0 0 12px;content:\"\"}.van-uploader__preview-delete-icon{color:var(--uploader-delete-color,#fff);font-size:var(--uploader-delete-icon-size,14px);position:absolute;right:0;top:0;transform:scale(.7) translate(10%,-10%);z-index:1}.van-uploader__file{align-items:center;background-color:var(--uploader-file-background-color,#f7f8fa);display:flex;flex-direction:column;height:var(--uploader-size,80px);justify-content:center;width:var(--uploader-size,80px)}.van-uploader__file-icon{color:var(--uploader-file-icon-color,#646566);font-size:var(--uploader-file-icon-size,20px)}.van-uploader__file-name{box-sizing:border-box;color:var(--uploader-file-name-text-color,#646566);font-size:var(--uploader-file-name-font-size,12px);margin-top:var(--uploader-file-name-margin-top,8px);padding:var(--uploader-file-name-padding,0 4px);text-align:center;width:100%}.van-uploader__mask{align-items:center;background-color:var(--uploader-mask-background-color,rgba(50,50,51,.88));bottom:0;color:#fff;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;right:0;top:0}.van-uploader__mask-icon{font-size:var(--uploader-mask-icon-size,22px)}.van-uploader__mask-message{font-size:var(--uploader-mask-message-font-size,12px);line-height:var(--uploader-mask-message-line-height,14px);margin-top:6px;padding:0 var(--padding-base,4px)}.van-uploader__loading{color:var(--uploader-loading-icon-color,#fff)!important;height:var(--uploader-loading-icon-size,22px);width:var(--uploader-loading-icon-size,22px)}"
  },
  {
    "path": "dist/uploader/shared.d.ts",
    "content": "export declare const imageProps: {\n    sizeType: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    showmenu: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n};\nexport declare const videoProps: {\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    compressed: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n    maxDuration: {\n        type: NumberConstructor;\n        value: number;\n    };\n    camera: {\n        type: StringConstructor;\n        value: string;\n    };\n    referrerPolicy: {\n        type: StringConstructor;\n        value: string;\n    };\n};\nexport declare const mediaProps: {\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    mediaType: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    maxDuration: {\n        type: NumberConstructor;\n        value: number;\n    };\n    camera: {\n        type: StringConstructor;\n        value: string;\n    };\n};\nexport declare const messageFileProps: {\n    extension: null;\n    previewFile: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n};\n"
  },
  {
    "path": "dist/uploader/shared.js",
    "content": "// props for image\nexport const imageProps = {\n    sizeType: {\n        type: Array,\n        value: ['original', 'compressed'],\n    },\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    showmenu: {\n        type: Boolean,\n        value: true,\n    },\n};\n// props for video\nexport const videoProps = {\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    compressed: {\n        type: Boolean,\n        value: true,\n    },\n    maxDuration: {\n        type: Number,\n        value: 60,\n    },\n    camera: {\n        type: String,\n        value: 'back',\n    },\n    referrerPolicy: {\n        type: String,\n        value: 'no-referrer',\n    },\n};\n// props for media\nexport const mediaProps = {\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    mediaType: {\n        type: Array,\n        value: ['image', 'video', 'mix'],\n    },\n    maxDuration: {\n        type: Number,\n        value: 60,\n    },\n    camera: {\n        type: String,\n        value: 'back',\n    },\n};\n// props for file\nexport const messageFileProps = {\n    extension: null,\n    previewFile: {\n        type: Boolean,\n        value: true,\n    },\n};\n"
  },
  {
    "path": "dist/uploader/utils.d.ts",
    "content": "export interface File {\n    url: string;\n    size?: number;\n    name?: string;\n    type: string;\n    duration?: number;\n    time?: number;\n    isImage?: boolean;\n    isVideo?: boolean;\n}\nexport declare function isImageFile(item: File): boolean;\nexport declare function isVideoFile(item: File): boolean;\nexport declare function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount, mediaType, extension, }: {\n    accept: any;\n    multiple: any;\n    capture: any;\n    compressed: any;\n    maxDuration: any;\n    sizeType: any;\n    camera: any;\n    maxCount: any;\n    mediaType: any;\n    extension: any;\n}): Promise<File | File[]>;\n"
  },
  {
    "path": "dist/uploader/utils.js",
    "content": "import { pickExclude, isPC, isWxWork } from '../common/utils';\nimport { isImageUrl, isVideoUrl } from '../common/validator';\nexport function isImageFile(item) {\n    if (item.isImage != null) {\n        return item.isImage;\n    }\n    if (item.type) {\n        return item.type === 'image';\n    }\n    if (item.url) {\n        return isImageUrl(item.url);\n    }\n    return false;\n}\nexport function isVideoFile(item) {\n    if (item.isVideo != null) {\n        return item.isVideo;\n    }\n    if (item.type) {\n        return item.type === 'video';\n    }\n    if (item.url) {\n        return isVideoUrl(item.url);\n    }\n    return false;\n}\nfunction formatImage(res) {\n    return res.tempFiles.map((item) => (Object.assign(Object.assign({}, pickExclude(item, ['path'])), { type: 'image', url: item.tempFilePath || item.path, thumb: item.tempFilePath || item.path })));\n}\nfunction formatVideo(res) {\n    return [\n        Object.assign(Object.assign({}, pickExclude(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg'])), { type: 'video', url: res.tempFilePath, thumb: res.thumbTempFilePath }),\n    ];\n}\nfunction formatMedia(res) {\n    return res.tempFiles.map((item) => (Object.assign(Object.assign({}, pickExclude(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])), { type: item.fileType, url: item.tempFilePath, thumb: item.fileType === 'video' ? item.thumbTempFilePath : item.tempFilePath })));\n}\nfunction formatFile(res) {\n    return res.tempFiles.map((item) => (Object.assign(Object.assign({}, pickExclude(item, ['path'])), { url: item.path })));\n}\nexport function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount, mediaType, extension, }) {\n    return new Promise((resolve, reject) => {\n        switch (accept) {\n            case 'image':\n                if (isPC || isWxWork) {\n                    wx.chooseImage({\n                        count: multiple ? Math.min(maxCount, 9) : 1,\n                        sourceType: capture,\n                        sizeType,\n                        success: (res) => resolve(formatImage(res)),\n                        fail: reject,\n                    });\n                }\n                else {\n                    wx.chooseMedia({\n                        count: multiple ? Math.min(maxCount, 9) : 1,\n                        mediaType: ['image'],\n                        sourceType: capture,\n                        maxDuration,\n                        sizeType,\n                        camera,\n                        success: (res) => resolve(formatImage(res)),\n                        fail: reject,\n                    });\n                }\n                break;\n            case 'media':\n                wx.chooseMedia({\n                    count: multiple ? Math.min(maxCount, 9) : 1,\n                    mediaType,\n                    sourceType: capture,\n                    maxDuration,\n                    sizeType,\n                    camera,\n                    success: (res) => resolve(formatMedia(res)),\n                    fail: reject,\n                });\n                break;\n            case 'video':\n                wx.chooseVideo({\n                    sourceType: capture,\n                    compressed,\n                    maxDuration,\n                    camera,\n                    success: (res) => resolve(formatVideo(res)),\n                    fail: reject,\n                });\n                break;\n            default:\n                wx.chooseMessageFile(Object.assign(Object.assign({ count: multiple ? maxCount : 1, type: accept }, (extension ? { extension } : {})), { success: (res) => resolve(formatFile(res)), fail: reject }));\n                break;\n        }\n    });\n}\n"
  },
  {
    "path": "dist/wxs/add-unit.wxs",
    "content": "/* eslint-disable */\nvar REGEXP = getRegExp('^-?\\d+(\\.\\d+)?$');\n\nfunction addUnit(value) {\n  if (value == null) {\n    return undefined;\n  }\n\n  return REGEXP.test('' + value) ? value + 'px' : value;\n}\n\nmodule.exports = addUnit;\n"
  },
  {
    "path": "dist/wxs/array.wxs",
    "content": "function isArray(array) {\n  return array && array.constructor === 'Array';\n}\n\nmodule.exports.isArray = isArray;\n"
  },
  {
    "path": "dist/wxs/bem.wxs",
    "content": "/* eslint-disable */\nvar array = require('./array.wxs');\nvar object = require('./object.wxs');\nvar PREFIX = 'van-';\n\nfunction join(name, mods) {\n  name = PREFIX + name;\n  mods = mods.map(function(mod) {\n    return name + '--' + mod;\n  });\n  mods.unshift(name);\n  return mods.join(' ');\n}\n\nfunction traversing(mods, conf) {\n  if (!conf) {\n    return;\n  }\n\n  if (typeof conf === 'string' || typeof conf === 'number') {\n    mods.push(conf);\n  } else if (array.isArray(conf)) {\n    conf.forEach(function(item) {\n      traversing(mods, item);\n    });\n  } else if (typeof conf === 'object') {\n    object.keys(conf).forEach(function(key) {\n      conf[key] && mods.push(key);\n    });\n  }\n}\n\nfunction bem(name, conf) {\n  var mods = [];\n  traversing(mods, conf);\n  return join(name, mods);\n}\n\nmodule.exports = bem;\n"
  },
  {
    "path": "dist/wxs/memoize.wxs",
    "content": "/**\n * Simple memoize\n * wxs doesn't support fn.apply, so this memoize only support up to 2 args\n */\n/* eslint-disable */\n\nfunction isPrimitive(value) {\n  var type = typeof value;\n  return (\n    type === 'boolean' ||\n    type === 'number' ||\n    type === 'string' ||\n    type === 'undefined' ||\n    value === null\n  );\n}\n\n// mock simple fn.call in wxs\nfunction call(fn, args) {\n  if (args.length === 2) {\n    return fn(args[0], args[1]);\n  }\n\n  if (args.length === 1) {\n    return fn(args[0]);\n  }\n\n  return fn();\n}\n\nfunction serializer(args) {\n  if (args.length === 1 && isPrimitive(args[0])) {\n    return args[0];\n  }\n  var obj = {};\n  for (var i = 0; i < args.length; i++) {\n    obj['key' + i] = args[i];\n  }\n  return JSON.stringify(obj);\n}\n\nfunction memoize(fn) {\n  var cache = {};\n\n  return function() {\n    var key = serializer(arguments);\n    if (cache[key] === undefined) {\n      cache[key] = call(fn, arguments);\n    }\n\n    return cache[key];\n  };\n}\n\nmodule.exports = memoize;\n"
  },
  {
    "path": "dist/wxs/object.wxs",
    "content": "/* eslint-disable */\nvar REGEXP = getRegExp('{|}|\"', 'g');\n\nfunction keys(obj) {\n  return JSON.stringify(obj)\n    .replace(REGEXP, '')\n    .split(',')\n    .map(function(item) {\n      return item.split(':')[0];\n    });\n}\n\nmodule.exports.keys = keys;\n"
  },
  {
    "path": "dist/wxs/style.wxs",
    "content": "/* eslint-disable */\nvar object = require('./object.wxs');\nvar array = require('./array.wxs');\n\nfunction kebabCase(word) {\n  var newWord = word\n    .replace(getRegExp(\"[A-Z]\", 'g'), function (i) {\n      return '-' + i;\n    })\n    .toLowerCase()\n\n  return newWord;\n}\n\nfunction style(styles) {\n  if (array.isArray(styles)) {\n    return styles\n      .filter(function (item) {\n        return item != null && item !== '';\n      })\n      .map(function (item) {\n        return style(item);\n      })\n      .join(';');\n  }\n\n  if ('Object' === styles.constructor) {\n    return object\n      .keys(styles)\n      .filter(function (key) {\n        return styles[key] != null && styles[key] !== '';\n      })\n      .map(function (key) {\n        return [kebabCase(key), [styles[key]]].join(':');\n      })\n      .join(';');\n  }\n\n  return styles;\n}\n\nmodule.exports = style;\n"
  },
  {
    "path": "dist/wxs/utils.wxs",
    "content": "/* eslint-disable */\nvar bem = require('./bem.wxs');\nvar memoize = require('./memoize.wxs');\nvar addUnit = require('./add-unit.wxs');\n\nmodule.exports = {\n  bem: memoize(bem),\n  memoize: memoize,\n  addUnit: addUnit\n};\n"
  },
  {
    "path": "docs/markdown/changelog.md",
    "content": "# 更新日志\n\n### [v1.11.7](https://github.com/youzan/vant-weapp/compare/v1.11.6...v1.11.7)\n\n`2024-10-14`\n\n**Bug Fixes**  \n\n- notice-bar: 修复滚动速度不一致的问题 [#5910](https://github.com/youzan/vant-weapp/pull/5910)  \n- uploader: 修复 `referrer-policy` 属性无效的问题 [#5909](https://github.com/youzan/vant-weapp/pull/5909)  \n- stepper: 修复 `stepper` 组件无法输入小数的问题 [#5908](https://github.com/youzan/vant-weapp/pull/5908)  \n- dialog: 防止嵌套对话框意外关闭 [#5907](https://github.com/youzan/vant-weapp/pull/5907)  \n- steps: 解决最后一个节点描述为空时的对齐问题 [#5906](https://github.com/youzan/vant-weapp/pull/5906)  \n- collapse: 确保 `border` 属性正确关闭底部边框 [#5905](https://github.com/youzan/vant-weapp/pull/5905)  \n- image: 修复图片底部额外空白的问题 [#5904](https://github.com/youzan/vant-weapp/pull/5904)  \n\n**Feature**  \n\n- cascader: 增加 `ellipsis` 属性支持 [#5806](https://github.com/youzan/vant-weapp/pull/5806)  \n- uploader: 增加 `preview-file` 属性支持 [#5828](https://github.com/youzan/vant-weapp/pull/5828)  \n\n**Document**  \n\n- 添加新的文档站点 URL [#5810](https://github.com/youzan/vant-weapp/pull/5810)  \n- 设置旧域名的重定向 [#5811](https://github.com/youzan/vant-weapp/pull/5811)  \n\n**Build**  \n\n- 使用 GitHub 生成 changelog [#5800](https://github.com/youzan/vant-weapp/pull/5800)  \n- 更新 @vant/cli 到 v7 [#5801](https://github.com/youzan/vant-weapp/pull/5801)  \n- 将 `ws` 从 7.5.6 升级到 7.5.10 [#5823](https://github.com/youzan/vant-weapp/pull/5823)  \n- 将 `rollup` 从 4.18.0 升级到 4.22.4 [#5897](https://github.com/youzan/vant-weapp/pull/5897) \n\n### [v1.11.6](https://github.com/youzan/vant-weapp/compare/v1.11.5...v1.11.6)\n\n`2024-05-14`\n\n**Bug Fixes**\n\n- Cascader: 修复显示错误在 value 值清空的情况下 [#5760](https://github.com/youzan/vant-weapp/issues/5760)\n- Field: 修复清除按钮显示错误在 value 默认有值的情况下 [#5792](https://github.com/youzan/vant-weapp/issues/5792)\n\n**Document**\n\n- Button: 补全 hover-class 属性 [ebba3b](https://github.com/youzan/vant-weapp/commit/ebba3b14a133769e7b04b7a48667cbc777c280c4)\n- Stepper: 修复 onChange 事件示例代码错误 [#5778](https://github.com/youzan/vant-weapp/issues/5778)\n\n**Feature**\n\n- Uploader: 新增 referrer-policy 属性支持 [#5770](https://github.com/youzan/vant-weapp/issues/5770)\n\n### [v1.11.5](https://github.com/youzan/vant-weapp/compare/v1.11.4...v1.11.5)\n\n`2024-04-15`\n\n**Bug Fixes**\n\n- Transition: 修复 observeDuration 方法未实现导致的报错 [#5743](https://github.com/youzan/vant-weapp/issues/5743)\n- van-stepper: 修复在设置 max 属性后 onChange 结果不受限制 [#5741](https://github.com/youzan/vant-weapp/issues/5741)\n\n**Feature**\n\n- input: 新增 nicknamereview 事件支持 [#5758](https://github.com/youzan/vant-weapp/issues/5758)\n\n**Document**\n\n- docs(quickstart): 删除不需要的引导步骤 [#5744](https://github.com/youzan/vant-weapp/pull/5744)\n\n### [v1.11.4](https://github.com/youzan/vant-weapp/compare/v1.11.3...v1.11.4)\n\n`2024-01-22`\n\n**Bug Fixes**\n\n- Transition: 修复 popup 在特定情况下无法关闭 [#5707](https://github.com/youzan/vant-weapp/issues/5707)\n\n### [v1.11.3](https://github.com/youzan/vant-weapp/compare/v1.11.2...v1.11.3)\n\n`2024-01-16`\n\n**Bug Fixes**\n\n- Cascader: 修复 title slot 不生效 [#5676](https://github.com/youzan/vant-weapp/issues/5676)\n- Transition: 修复 transition 多次触发 enter 时异常 [#5699](https://github.com/youzan/vant-weapp/issues/5699)\n\n**Feature**\n\n- Calendar、ActionSheet、Dialog、ShareSheet: 增加 root-portal 属性支持 [#5680](https://github.com/youzan/vant-weapp/issues/5680)\n- goods-action-button: 增加 custom-style 属性支持 [#5659](https://github.com/youzan/vant-weapp/issues/5659)\n- Upload: 增加 mix mediaType 支持 [#5690](https://github.com/youzan/vant-weapp/issues/5690)\n\n### [v1.11.2](https://github.com/youzan/vant-weapp/compare/v1.11.1...v1.11.2)\n\n`2023-12-05`\n\n**Bug Fixes**\n\n- dialog/goods-action-button: 修复 dialog、goods-action-button 组件缺少 getRealTimePhoneNumber 事件 [#5633](https://github.com/youzan/vant-weapp/issues/5633)\n- upload: 修复企业微信下图片无法上传 [#5581](https://github.com/youzan/vant-weapp/issues/5581)\n- calendar/input/textarea/popup: 修复 skyline 模式下组件报错问题 [#5650](https://github.com/youzan/vant-weapp/issues/5650)\n\n**Document**\n\n- area: 订正 columns-num 只支持 number 类型. [#5631](https://github.com/youzan/vant-weapp/issues/5631)\n\n### [v1.11.1](https://github.com/youzan/vant-weapp/compare/v1.11.0...v1.11.1)\n\n`2023-10-10`\n\n**Feature**\n\n- icon: update @vant/icon to v3.0.1 [#5583](https://github.com/youzan/vant-weapp/issues/5583)\n\n### [v1.11.0](https://github.com/youzan/vant-weapp/compare/v1.10.25...v1.11.0)\n\n`2023-09-18`\n\n**Bug Fixes**\n\n- calendar: 修复 calendar 调用 reset 方法时丢失默认值 [#5546](https://github.com/youzan/vant-weapp/issues/5546)\n- van-notice-bar: 修复 delay 属性不生效问题 [#5547](https://github.com/youzan/vant-weapp/issues/5547)\n\n**Document**\n\n- skeleton: 修复 custom class 文档缺失 [#5548](https://github.com/youzan/vant-weapp/issues/5548)\n\n**Feature**\n\n- icon: 升级 @vant/icon 到 [3.0.0](https://github.com/youzan/vant/blob/main/packages/vant-icons/CHANGELOG.md) [#5561](https://github.com/youzan/vant-weapp/issues/5561)\n\n### [v1.10.25](https://github.com/youzan/vant-weapp/compare/v1.10.24...v1.10.25)\n\n`2023-08-30`\n\n**Document**\n\n- slider: 修复 use-button-slot 文档错误 [#5534](https://github.com/youzan/vant-weapp/issues/5534)\n\n**Feature**\n\n- button: 增加 button-id 属性 和 agreePrivacyAuthorization 事件支持 [#5533](https://github.com/youzan/vant-weapp/issues/5533)\n\n### [v1.10.24](https://github.com/youzan/vant-weapp/compare/v1.10.23...v1.10.24)\n\n`2023-08-25`\n\n**Bug Fixes**\n\n- calendar: 增加 limit date 监听 [#5520](https://github.com/youzan/vant-weapp/issues/5520)\n\n**Feature**\n\n- button: 增加 agreePrivacyAuthorization open-type 支持 [#5527](https://github.com/youzan/vant-weapp/issues/5527)\n\n### [v1.10.23](https://github.com/youzan/vant-weapp/compare/v1.10.22...v1.10.23)\n\n`2023-07-28`\n\n**Feature**\n\n- dialog: 增加 confirm/cancel button slot 支持 [#5502](https://github.com/youzan/vant-weapp/issues/5502)\n- Search: 增加 cursor-spacing 属性支持 [#5498](https://github.com/youzan/vant-weapp/issues/5498)\n\n### [v1.10.22](https://github.com/youzan/vant-weapp/compare/v1.10.21...v1.10.22)\n\n`2023-07-24`\n\n**Bug Fixes**\n\n- field: 修复 error message 居中错误 [#5482](https://github.com/youzan/vant-weapp/issues/5482)\n- GoodsAction: 修复自定义 icon 时样式错误 [#5496](https://github.com/youzan/vant-weapp/issues/5496)\n- sticky: 修复渲染位置错误再 transition 中 [#5483](https://github.com/youzan/vant-weapp/issues/5483)\n\n### [v1.10.21](https://github.com/youzan/vant-weapp/compare/v1.10.20...v1.10.21)\n\n`2023-07-10`\n\n**Bug Fixes**\n\n- uploader: 修复无法唤起选择图片框在 PC 下 [#5477](https://github.com/youzan/vant-weapp/issues/5477)\n\n**Feature**\n\n- button: 增加 getRealtimePhoneNumber 支持 [#5471](https://github.com/youzan/vant-weapp/issues/5471)\n- calendar: 增加 default-date 为 null 支持 [#5395](https://github.com/youzan/vant-weapp/issues/5395)\n- dialog: 增加确认/取消按钮外部样式类支持 [#5478](https://github.com/youzan/vant-weapp/issues/5478)\n- field: 增加自定义样式类支持 [#5476](https://github.com/youzan/vant-weapp/issues/5476)\n- field: 扩大 input 点击区域支持 [#5479](https://github.com/youzan/vant-weapp/issues/5479)\n- Upload: 增加 videoFit 属性支持 [#5475](https://github.com/youzan/vant-weapp/issues/5475)\n\n### [v1.10.20](https://github.com/youzan/vant-weapp/compare/v1.10.19...v1.10.20)\n\n`2023-07-03`\n\n**Bug Fixes**\n\n- calendar: 修复无法选择同一天在 range 模式下 [#5451](https://github.com/youzan/vant-weapp/issues/5451)\n- slider: 修复小数精度丢失问题 [#5444](https://github.com/youzan/vant-weapp/issues/5444)\n\n**Document**\n\n- add @inottn and @zhousg to core team [#5453](https://github.com/youzan/vant-weapp/issues/5453)\n- popup: 修复文档缺失 close-icon-position 属性 [#5389](https://github.com/youzan/vant-weapp/pull/5389)\n- dialog: 修复示例代码错误问题 [#5389](https://github.com/youzan/vant-weapp/pull/5389)\n\n**Feature**\n\n- goods-action-icon: 增加 size 属性 [#5457](https://github.com/youzan/vant-weapp/issues/5457)\n- goods-action-icon: 增加 info-class 自定义样式类 [#5457](https://github.com/youzan/vant-weapp/issues/5457)\n- icon: 增加 info-class 自定义样式类 [#5458](https://github.com/youzan/vant-weapp/issues/5458)\n\n### [v1.10.19](https://github.com/youzan/vant-weapp/compare/v1.10.18...v1.10.19)\n\n`2023-05-19`\n\n**Bug Fixes**\n\n- calendar: 修复日历月份标题不同步问题 [#5381](https://github.com/youzan/vant-weapp/pull/5381)\n- cascader: 修复选中项目缺失和 fieldNames 不生效问题 [#5182](https://github.com/youzan/vant-weapp/pull/5185)\n- cascader: 修复异步数据视图不更新问题 [#5380](https://github.com/youzan/vant-weapp/pull/5380)\n- tab: 修复异步数据情况选中线向右偏移问题 [#5135](https://github.com/youzan/vant-weapp/issues/5135)\n\n### [v1.10.18](https://github.com/youzan/vant-weapp/compare/v1.10.17...v1.10.18)\n\n`2023-05-08`\n\n**Bug Fixes**\n\n- steps: 修复在竖向模式下 icon 被覆盖的问题 [#5329](https://github.com/youzan/vant-weapp/issues/5329)\n- tabs: 修复 tab 较多时，slot 无法正常显示问题 [#4700](https://github.com/youzan/vant-weapp/issues/4700)\n\n**Feature**\n\n- field: input/change 事件增加 callback 参数 [#5345](https://github.com/youzan/vant-weapp/issues/5345)\n- goods-action: goods-action-button 增加 size 属性 [#5347](https://github.com/youzan/vant-weapp/issues/5347)\n\n### [v1.10.17](https://github.com/youzan/vant-weapp/compare/v1.10.16...v1.10.17)\n\n`2023-05-04`\n\n**Bug Fixes**\n\n- icon: 修复定位样式错误在外部传入 custom-class 的情况下 [#5335](https://github.com/youzan/vant-weapp/issues/5335)\n- tab: 修复 tab 被嵌套时，内部 tab 样式错误问题 [#5200](https://github.com/youzan/vant-weapp/issues/5200)\n- Uploader: 替换 wx.chooseImage 为 wx.chooseMedia 解决选择图片页面刷新问题 [#5343](https://github.com/youzan/vant-weapp/issues/5343)\n- van-field: 修复安卓设备下 textarea maxlength 限制不生效问题 [#5308](https://github.com/youzan/vant-weapp/issues/5308)\n\n### [v1.10.16](https://github.com/youzan/vant-weapp/compare/v1.10.15...v1.10.16)\n\n`2023-04-18`\n\n**Bug Fixes**\n\n- icon: 修复显示异常在自定义图标的模式下 [#5320](https://github.com/youzan/vant-weapp/issues/5320)\n- stepper: 修复最大值在设置字符串下功能错误问题 [#5295](https://github.com/youzan/vant-weapp/issues/5295)\n- tabs: 修复在部分设备下 info 样式错误问题 [#5318](https://github.com/youzan/vant-weapp/issues/5318)\n\n### [v1.10.15](https://github.com/youzan/vant-weapp/compare/v1.10.14...v1.10.15)\n\n`2023-04-03`\n\n**Bug Fixes**\n\n- calendar: 修复在 allow-same-day 和 不显示 confirm 按钮时 confirm 丢失问题 [db8981](https://github.com/youzan/vant-weapp/commit/db89819f9e3537435ac5fcc52f680affd9255c6b)\n\n**Feature**\n\n- van-goods-action-icon: 增加 color 属性支持 [4fd22f](https://github.com/youzan/vant-weapp/commit/4fd22f0a6b6b5ebcc37807ed3c85c3b40bd60e0c)\n\n**hotfix**\n\n- rate: 修复在覆盖半个星时覆盖高度不够问题 [#5294](https://github.com/youzan/vant-weapp/issues/5294)\n\n### [v1.10.14](https://github.com/youzan/vant-weapp/compare/v1.10.13...v1.10.14)\n\n`2023-02-27`\n\n**Bug Fixes**\n\n- icon: 修复在自定义 icon 时丢失 dot 组件 [#5253](https://github.com/youzan/vant-weapp/issues/5253)\n\n**Document**\n\n- 增加 @landluck and @wjw-gavin 到核心团队 [#5252](https://github.com/youzan/vant-weapp/issues/5252)\n\n**Feature**\n\n- dropdown-item: 增加 root-portal 属性支持 [#5256](https://github.com/youzan/vant-weapp/issues/5256)\n- dropdown-menu: 增加 safe-area-tab-bar 属性支持 [#5257](https://github.com/youzan/vant-weapp/issues/5257)\n- overlay: 增加 root-portal 属性支持 [#5255](https://github.com/youzan/vant-weapp/issues/5255)\n- popup: 增加 root-portal 属性支持 [#5254](https://github.com/youzan/vant-weapp/issues/5254)\n\n### [v1.10.13](https://github.com/youzan/vant-weapp/compare/v1.10.12...v1.10.13)\n\n`2023-02-13`\n\n**Bug Fixes**\n\n- calendar: 修复 calendar 组件安全区域传参未传递给 popup 组件的问题 [db7957](https://github.com/youzan/vant-weapp/commit/db79570d98537db669730aa66d3fb3932ded4737)\n- cascader: 修复 cascader 组件 onClickTab 事件没有同步 activeTab 的值导致选择异常的问题 [92ae4a](https://github.com/youzan/vant-weapp/commit/92ae4a29c0b99aa65be6a71004b795ae2650f37c)\n- stepper: 修复 always-embed 申明两次警告问题 [#5231](https://github.com/youzan/vant-weapp/issues/5231)\n- stepper: 修复 onblur 时在值变更的情况下 change 事件没有触发 [#5227](https://github.com/youzan/vant-weapp/issues/5227)\n\n**Feature**\n\n- calendar: 增加 min-range 属性支持在 multiple 模式下 [#5230](https://github.com/youzan/vant-weapp/issues/5230)\n- popup: 增加 safe-area-tab-bar 属性支持 [#5194](https://github.com/youzan/vant-weapp/issues/5194)\n- tabbar-item: 增加 url link-type 属性支持 [#5232](https://github.com/youzan/vant-weapp/issues/5232)\n- uploader: 增加 showmenu 属性支持 [#5229](https://github.com/youzan/vant-weapp/issues/5229)\n\n### [v1.10.12](https://github.com/youzan/vant-weapp/compare/v1.10.11...v1.10.12)\n\n`2023-01-16`\n\n**Bug Fixes**\n\n- calendar: 修复在 allow-same-day 情况下初始不能选择同一天 [#5193](https://github.com/youzan/vant-weapp/issues/5193)\n- stepper: 修复在 async change 情况下外部无法更新 input 值 [#5191](https://github.com/youzan/vant-weapp/issues/5191)\n\n**Document**\n\n- docs(action-sheet): 修复 close-on-click-overlay 初始值书写错误 [b2fabe](https://github.com/youzan/vant-weapp/commit/b2fabe6b2b72ce1734b9123b00e78a854111d240)\n\n**Feature**\n\n- dropdown-menu: 增加 use-before-toggle 属性支持 [#5190](https://github.com/youzan/vant-weapp/issues/5190)\n- field: 增加 extra-event-params 属性支持 [#5184](https://github.com/youzan/vant-weapp/issues/5184)\n\n### [v1.10.11](https://github.com/youzan/vant-weapp/compare/v1.10.10...v1.10.11)\n\n`2023-01-03`\n\n**Bug Fixes**\n\n- stepper: 修复显示错误的值在 blur 的情况下 [#5158](https://github.com/youzan/vant-weapp/issues/5158)\n- steps: 修复额外的间距在垂直方向的情况下 [#5166](https://github.com/youzan/vant-weapp/issues/5166)\n- transition: 修复 enter 时间触发多次的问题 [#5157](https://github.com/youzan/vant-weapp/issues/5157)\n\n**Feature**\n\n- image: 增加 webp 属性支持 [#5163](https://github.com/youzan/vant-weapp/issues/5163)\n- uploader: 增加 extension 属性支持 [a80767](https://github.com/youzan/vant-weapp/commit/a80767e9c1699a9b15fb9d4bb1b552ef3fc5c8dc)\n\n### [v1.10.10](https://github.com/youzan/vant-weapp/compare/v1.10.9...v1.10.10)\n\n`2022-12-16`\n\n**Bug Fixes**\n\n- dialog: 修复在没有底部按钮时存在额外的白线 [#5141](https://github.com/youzan/vant-weapp/issues/5141)\n- dropdown: 修复文案超出限制后箭头样式问题 [#5145](https://github.com/youzan/vant-weapp/issues/5145)\n- button: 修复 demo 示例缺失 button 组件引入 [8ec17c](https://github.com/youzan/vant-weapp/commit/8ec17cc87da28b9f3caa5293c3710ee927eaa210)\n- search: 优化取消按钮的点击区域 [#5148](https://github.com/youzan/vant-weapp/issues/5148)\n- uploader: 修复无法预览视频问题 [#5142](https://github.com/youzan/vant-weapp/issues/5142)\n\n**Document**\n\n- cascader: 增加 cascader 文档链接 [4bb9e6](https://github.com/youzan/vant-weapp/commit/4bb9e625381dee97fbe2e6d3c1602365ab2c41c5)\n- uploader: 优化 thumb 字段文案描述 [af7493](https://github.com/youzan/vant-weapp/commit/af74936bdc9a665dfdd024a2e85be66fabf3133d)\n\n**Feature**\n\n- tab: 新增 before-change 属性支持 [#5139](https://github.com/youzan/vant-weapp/issues/5139)\n\n### [v1.10.9](https://github.com/youzan/vant-weapp/compare/v1.10.8...v1.10.9)\n\n`2022-12-12`\n\n**Bug Fixes**\n\n- slider: 修复文档示例值错误 [#5128](https://github.com/youzan/vant-weapp/issues/5128)\n- tab: 修复在开启微信工具热更新时出现堆栈溢出问题 [#5125](https://github.com/youzan/vant-weapp/issues/5125)\n- transition: 修复页面切后台后无法触发 transition 相关组件更新 [#5131](https://github.com/youzan/vant-weapp/issues/5131)\n\n**Feature**\n\n- cascader: 新增 cascader 组件 [#4992](https://github.com/youzan/vant-weapp/issues/4992)\n\n### [v1.10.8](https://github.com/youzan/vant-weapp/compare/v1.10.7...v1.10.8)\n\n`2022-11-29`\n\n**Bug Fixes**\n\n- slider: 修复快速滑动时 value 可能错误问题 [#5112](https://github.com/youzan/vant-weapp/issues/5112)\n- tabs: 修复初始化加载时选中状态动画问题 [#5115](https://github.com/youzan/vant-weapp/issues/5115)\n\n**Document**\n\n- Calendar: 修复示例代码错误问题 [c55c78](https://github.com/youzan/vant-weapp/commit/c55c785a9ed67e0801c693d61b1e7e691bd19cf1)\n- fix(stepper): 修复 stepper blur 事件失焦时会触发 change 事件 [8b441d](https://github.com/youzan/vant-weapp/commit/8b441de1a6a0d439913d6a582d954331ff17e1fa)\n\n**Feature**\n\n- dialog: 增加 custom-class 属性支持 [#5102](https://github.com/youzan/vant-weapp/issues/5102)\n- uploader: 增加 media-type 属性支持 [#5113](https://github.com/youzan/vant-weapp/issues/5113)\n\n### [v1.10.7](https://github.com/youzan/vant-weapp/compare/v1.10.6...v1.10.7)\n\n`2022-11-18`\n\n**Bug Fixes**\n\n- search: 增加 value 默认 props 定义 [697746](https://github.com/youzan/vant-weapp/commit/697746fb470e9e16476f3fe95c15e4448ca9d686)\n\n**Document**\n\n- collapse: 增加 right-icon 额外使用说明 [d39b35](https://github.com/youzan/vant-weapp/commit/d39b35fc3a1d4b913d7b94bb45b3e861e3cee79e)\n\n**Feature**\n\n- action-sheet: 增加自定义样式能力支持 [#5097](https://github.com/youzan/vant-weapp/issues/5097)\n- dropdown-menu: 增加多个自定义样式能力支持 [#5099](https://github.com/youzan/vant-weapp/issues/5099)\n\n### [v1.10.6](https://github.com/youzan/vant-weapp/compare/v1.10.5...v1.10.6)\n\n`2022-11-06`\n\n**Bug Fixes**\n\n- van-tabs: 修复插件内使用 van-tabs 切换 tab 报错的问题 [#5073](https://github.com/youzan/vant-weapp/issues/5073)\n- button: 修复 button 在 disabeld 或 loading 时能触发 active 状态问题 [#5084](https://github.com/youzan/vant-weapp/issues/5084)\n- mixin: 修复 page-scroll mixin 函数监听没有收回问题 [#5086](https://github.com/youzan/vant-weapp/issues/5086)\n- overlay: 修复 custom-class 不生效问题 [#5083](https://github.com/youzan/vant-weapp/issues/5083)\n- slider: 修复 slider 在 value 小于 step 无法滑动问题 [#5079](https://github.com/youzan/vant-weapp/issues/5079)\n\n**Feature**\n\n- Dialog: option context 支持传入函数 [#5043](https://github.com/youzan/vant-weapp/issues/5043)\n\n### [v1.10.5](https://github.com/youzan/vant-weapp/compare/v1.10.4...v1.10.5)\n\n`2022-09-07`\n\n**Feature**\n\n- Dialog: messageAlign 属性支持传 justify [#5034](https://github.com/youzan/vant-weapp/issues/5034)\n- Notify: 支持 setDefaultOptions 和 resetDefaultOptions 方法 [#5028](https://github.com/youzan/vant-weapp/issues/5028)\n- toast: context 选项支持传入函数 [#5022](https://github.com/youzan/vant-weapp/issues/5022)\n\n**Bug Fixes**\n\n- Calendar: 修复 getDay 和 getUTCDay 有时间差，导致星期错位的问题 [#4883](https://github.com/youzan/vant-weapp/issues/4883)\n\n### [v1.10.4](https://github.com/youzan/vant-weapp/compare/v1.10.3...v1.10.4)\n\n`2022-07-23`\n\n**Feature**\n\n- Button: 新增 chooseavatar 事件 [#4976](https://github.com/youzan/vant-weapp/issues/4976)\n\n**Bug Fixes**\n\n- NavBar: 修复因 `box-sizing: border-box` 导致导航栏高度不正确问题 [#4969](https://github.com/youzan/vant-weapp/issues/4969)\n\n### [v1.10.3](https://github.com/youzan/vant-weapp/compare/v1.10.2...v1.10.3)\n\n`2022-05-02`\n\n**Feature**\n\n- Area: 新增 show-toolbar 属性 [#4752](https://github.com/youzan/vant-weapp/issues/4752)\n- CollapseItem: 新增 size 属性 [#4829](https://github.com/youzan/vant-weapp/issues/4829)\n- uploader: preview-size 属性类型支持 Array 自定义宽高 [#4798](https://github.com/youzan/vant-weapp/issues/4798)\n\n**Bug Fixes**\n\n- Calendar: 修复设置 maxDate 和 minDate 后，周几显示不正确的问题 [#4742](https://github.com/youzan/vant-weapp/issues/4742)\n- NoticeBar: 修复无法从初始最左侧位置开始滚动的问题 [#4746](https://github.com/youzan/vant-weapp/issues/4746)\n\n### [v1.10.2](https://github.com/youzan/vant-weapp/compare/v1.10.1...v1.10.2)\n\n`2022-01-11`\n\n**Bug Fixes**\n\n- build: 修复编译时 dts 文件丢失 [#4741](https://github.com/youzan/vant-weapp/issues/4741)\n- Calendar: 修复 row-height 样式问题 [#4733](https://github.com/youzan/vant-weapp/issues/4733)\n- ShareSheet: 修复 点击文字 时 未触发小程序开放能力 [#4739](https://github.com/youzan/vant-weapp/pull/4739)\n\n### [v1.10.1](https://github.com/youzan/vant-weapp/compare/v1.10.0...v1.10.1)\n\n`2022-01-04`\n\n**Bug Fixes**\n\n- NoticeBar: 移除 默认 icon 尺寸 [#4692](https://github.com/youzan/vant-weapp/issues/4692)\n- Tab: 修复 滑动失效问题 [#4715](https://github.com/youzan/vant-weapp/issues/4715)\n\n**Document**\n\n- quickstart: 增加 用户隐私保护 说明 [#4711](https://github.com/youzan/vant-weapp/issues/4711)\n\n**Feature**\n\n- GoodsAction: 增加 GoodsActionIcon 组件的 class-prefix 属性 [#4712](https://github.com/youzan/vant-weapp/issues/4712)\n\n### [v1.10.0](https://github.com/youzan/vant-weapp/compare/v1.9.2...v1.10.0)\n\n`2021-12-21`\n\n**Bug Fixes**\n\n- page-scroll: 修复当 vanPageScroller 为 undefined 时报错 [#4640](https://github.com/youzan/vant-weapp/issues/4640)\n- Switch: 修复当使用 active-value 时 自定义颜色失效 [#4645](https://github.com/youzan/vant-weapp/issues/4645)\n- Toast: 修复当 type 为 success/error 时 toast 样式不正确 [#4587](https://github.com/youzan/vant-weapp/issues/4587)\n\n**Document**\n\n- NoticeBar: 修复文档中 单位标识 错误 [#4641](https://github.com/youzan/vant-weapp/issues/4641)\n\n**Feature**\n\n- Stepper: 新增 always-embed 属性 [#4678](https://github.com/youzan/vant-weapp/issues/4678)\n\n### [v1.9.2](https://github.com/youzan/vant-weapp/compare/v1.9.1...v1.9.2)\n\n`2021-10-28`\n\n**Bug Fixes**\n\n- Calendar: 选择最小可选日期范围 [#4569](https://github.com/youzan/vant-weapp/issues/4569)\n- Collapse: 修复多次点击失效问题 [#4567](https://github.com/youzan/vant-weapp/issues/4567)\n- Tab: 修复卡片模式标签页样式问题 [#4582](https://github.com/youzan/vant-weapp/issues/4582)\n- Tab: 修复多指滑动多个标签问题 [#4539](https://github.com/youzan/vant-weapp/issues/4539)\n\n**Feature**\n\n- DropdownMenu: 新增 --dropdown-menu-box-shadow CssVariable [#4565](https://github.com/youzan/vant-weapp/issues/4565)\n- DropdownMenu: 新增 custom-class [#4583](https://github.com/youzan/vant-weapp/issues/4583)\n- Field: 新增 always-embed 属性 [#4571](https://github.com/youzan/vant-weapp/issues/4571)\n- Toast: 支持 html type [#4581](https://github.com/youzan/vant-weapp/issues/4581)\n\n### [v1.9.1](https://github.com/youzan/vant-weapp/compare/v1.9.0...v1.9.1)\n\n`2021-09-29`\n\n**Bug Fixes**\n\n- CheckBox: 移除无用方法 [#4527](https://github.com/youzan/vant-weapp/issues/4527)\n- Slider: 修复 vertical 属性导致点击无效问题 [#4532](https://github.com/youzan/vant-weapp/issues/4532)\n\n**Document**\n\n- Calendar: Day 数据结构增加 className 属性说明 [#4524](https://github.com/youzan/vant-weapp/issues/4524)\n\n**Feature**\n\n- Calendar: 增加 readonly 属性 [#4529](https://github.com/youzan/vant-weapp/issues/4529)\n\n### [v1.9.0](https://github.com/youzan/vant-weapp/compare/v1.8.7...v1.9.0)\n\n`2021-09-27`\n\n**Bug Fixes**\n\n- Slider: 移除 theme mixin [#4520](https://github.com/youzan/vant-weapp/issues/4520)\n- Tab: 修复初始位置不正确问题 [#4521](https://github.com/youzan/vant-weapp/issues/4521)\n\n**Document**\n\n- ActionSheet: 添加 show 属性说明 [#4518](https://github.com/youzan/vant-weapp/issues/4518)\n\n**Feature**\n\n- Slider: 添加 vertical 属性 [#4486](https://github.com/youzan/vant-weapp/issues/4486)\n\n**Performance**\n\n- 移除 CSS variables 兼容代码 [#4487](https://github.com/youzan/vant-weapp/issues/4487)\n\n### [v1.8.7](https://github.com/youzan/vant-weapp/compare/v1.8.6...v1.8.7)\n\n`2021-09-22`\n\n**Features**\n\n- Icons: 新增 guide-o 图标 [#4507](https://github.com/youzan/vant-weapp/issues/4507)\n\n### [1.8.6](https://github.com/youzan/vant-weapp/compare/v1.8.5...v1.8.6)\n\n`2021-09-20`\n\n**Features**\n\n- Calendar: 新增 confirmDisabledText 默认文案 [#4490](https://github.com/youzan/vant-weapp/issues/4490)) ([8629da1](https://github.com/youzan/vant-weapp/commit/8629da1b75bb50e2f0a99905de90fd85015fb785)\n\n**Bug Fixes**\n\n- 移除 optionalTypes [#4501](https://github.com/youzan/vant-weapp/issues/4501)) ([3afe10c](https://github.com/youzan/vant-weapp/commit/3afe10c0f929e5c6b0f32ca34de9dc8d05c8c016)\n- Docs: 修复文档错误 [#4489](https://github.com/youzan/vant-weapp/issues/4489)\n\n### [1.8.5](https://github.com/youzan/vant-weapp/compare/v1.8.4...v1.8.5)\n\n`2021-09-15`\n\n**Bug Fixes**\n\n- Calendar: 修复超出选择范围 toast 提示一直存在问题 [#4474](https://github.com/youzan/vant-weapp/issues/4474)\n- page-scroll: 修复 isDef 取反问题 [#4488](https://github.com/youzan/vant-weapp/issues/4488)\n\n### [1.8.4](https://github.com/youzan/vant-weapp/compare/v1.8.3...v1.8.4)\n\n`2021-09-07`\n\n**Bug Fixes**\n\n- page-scroll: 修复 getCurrentPage 为空时报错 [#4458](https://github.com/youzan/vant-weapp/issues/4458)\n\n**Features**\n\n- Field: 新增 clear-trigger 属性 [#4461](https://github.com/youzan/vant-weapp/issues/4461)\n- Search: 新增 clear-icon 属性 [#4463](https://github.com/youzan/vant-weapp/issues/4463)\n- Search: 新增 clear-trigger 属性 [9e17b13](https://github.com/youzan/vant-weapp/commit/9e17b13164e57ff09140d755870853f702a89a39)\n- Slider: 新增 range 属性 [#4442](https://github.com/youzan/vant-weapp/issues/4442)\n\n### [v1.8.3](https://github.com/youzan/vant-weapp/compare/v1.8.2...v1.8.3)\n\n`2021-08-30`\n\n**Bug Fixes**\n\n- Calendar: 修复 default-date 属性失效问题 [#4430](https://github.com/youzan/vant-weapp/issues/4430)\n- ShareSheet: 调整 overlayStyle 属性类型为 string [8c408e2](https://github.com/youzan/vant-weapp/commit/8c408e23030e65a0baf62f0b21fb8ed3f2c9df67)\n- Stepper: 调整 minus/plus slots 位置 [#4427](https://github.com/youzan/vant-weapp/issues/4427)\n- Sticky: 修复 root 为 null 时，读取 root.top 报错问题 [#4433](https://github.com/youzan/vant-weapp/issues/4433)\n- Calendar: 调整 minDate 和 maxDate 传值类型为 Number [37d8e69](https://github.com/youzan/vant-weapp/commit/37d8e697c9e3d985b926f68553b8afbb5c0a0569)\n\n**Features**\n\n- Popup: 新增 lock-scroll 属性 [#4384](https://github.com/youzan/vant-weapp/issues/4384)\n\n**Performance Improvements**\n\n- Radio: label 的 margin-left 改为 padding-left，增大可点击区域，增强用户体验 [#4165](https://github.com/youzan/vant-weapp/issues/4165)\n\n### [v1.8.2](https://github.com/youzan/vant-weapp/compare/v1.8.1...v1.8.2)\n\n`2021-08-18`\n\n**Bug Fixes**\n\n- Calendar: 修复 template 引用路径不是相对路径的问题 [7f7cf6](https://github.com/youzan/vant-weapp/commit/7f7cf62ee0f675ad6b86d41f70b23336e7ddc7a1)\n- Field: 修复 template 引用路径不是相对路径的问题 [6dd42a](https://github.com/youzan/vant-weapp/commit/6dd42a0473578e26e5f5f96158959e56689f68b6)\n\n### [v1.8.1](https://github.com/youzan/vant-weapp/compare/v1.8.0...v1.8.1)\n\n`2021-08-18`\n\n**Feature**\n\n- Calendar: 新增 click-subtitle 事件 [#4385](https://github.com/youzan/vant-weapp/issues/4385)\n- Circle: 使用 setTimeout 代替 setInterval [#4401](https://github.com/youzan/vant-weapp/issues/4401)\n\n**Bug Fixes**\n\n- Picker: 修复 template 引用路径不是相对路径的问题 [#4408](https://github.com/youzan/vant-weapp/issues/4408)\n\n### [v1.8.0](https://github.com/youzan/vant-weapp/compare/v1.7.2...v1.8.0)\n\n`2021-08-11`\n\n**Feature**\n\n- Overlay: 新增 lock-scroll 属性 [#4383](https://github.com/youzan/vant-weapp/issues/4383)\n- search: 新增 click-input 事件 [#4357](https://github.com/youzan/vant-weapp/issues/4357)\n\n**Performance**\n\n- 移除了 iOS8 相关的 polyfill，减少包体积 [#4395](https://github.com/youzan/vant-weapp/issues/4395)\n\n### [v1.7.2](https://github.com/youzan/vant-weapp/compare/v1.7.1...v1.7.2)\n\n`2021-07-19`\n\n**Bug Fixes**\n\n- Calendar: 初始日期设置为当前日期 [#4339](https://github.com/youzan/vant-weapp/issues/4339)\n\n**Features**\n\n- Cell: CellGroup 新增 inset 属性 [#4341](https://github.com/youzan/vant-weapp/issues/4341)\n- Search: 新增 click-input 事件 [#4337](https://github.com/youzan/vant-weapp/issues/4337)\n\n### [1.7.1](https://github.com/youzan/vant-weapp/tree/v1.7.1)\n\n`2021-07-06`\n\n**Bug Fixes**\n\n- Col: 修复样式问题 [#4322](https://github.com/youzan/vant-weapp/issues/4322)\n- Grid: 增加 icon-prefix 属性默认值 [#4318](https://github.com/youzan/vant-weapp/issues/4318)\n- IndexBar: 修复当索引列表为空时报错 [#4310](https://github.com/youzan/vant-weapp/issues/4310)\n\n### [1.7.0](https://github.com/youzan/vant-weapp/tree/v1.7.0)\n\n`2021-07-04`\n\n**Bug Fixes**\n\n- Button: 修复 type 为 getUserInfo & wx.getUserProfile 可用时 lang 参数失效 [#4250](https://github.com/youzan/vant-weapp/issues/4250)\n- ShareSheet: 新增内置 icon `weapp-qrcode` `wechat-moments` [#4256](https://github.com/youzan/vant-weapp/issues/4256)\n\n**Features**\n\n- Checkbox: 增加 direction 属性，设置排列方向 [#4265](https://github.com/youzan/vant-weapp/issues/4265)\n- ConfigProvider: 增加全局配置组件 [#4279](https://github.com/youzan/vant-weapp/issues/4279)\n- Grid: 增加 reverse 属性，支持文本&图片位置互换 [#4280](https://github.com/youzan/vant-weapp/issues/4280)\n- GridItem: 增加 icon-prefix 属性，支持第三方字体 [#4276](https://github.com/youzan/vant-weapp/issues/4276)\n- Rate: 增加更多 css 变量 [#4297](https://github.com/youzan/vant-weapp/issues/4297)\n- Slider: 增加更多 css 变量 [#4305](https://github.com/youzan/vant-weapp/issues/4305)\n\n**Improvements**\n\n- wxs style 方法支持驼峰变量命名，以便能更好的在 wxml 中使用 [#4281](https://github.com/youzan/vant-weapp/issues/4281)\n\n### [1.6.9](https://github.com/youzan/vant-weapp/tree/v1.6.9)\n\n`2021-06-06`\n\n**Bug Fixes**\n\n- DatetimePicker: 修复 动态设置 min-hour min-date 显示不正确 [#4245](https://github.com/youzan/vant-weapp/issues/4245)\n- Tabs: 修复 tab 数量较多时滚动距离不正确 [#4202](https://github.com/youzan/vant-weapp/issues/4202)\n- Uploader: 修复 demo 中 beforeRead 报错 [#4235](https://github.com/youzan/vant-weapp/issues/4235)\n\n### [1.6.9-beta.2](https://github.com/youzan/vant-weapp/tree/v1.6.9-beta.2)\n\n`2021-05-22`\n\n**Bug Fixes**\n\n- Button: 修复 open-type 不生效 [#4222](https://github.com/youzan/vant-weapp/issues/4222)\n- Calendar: 修复 allow-same-day 开启时 custom-color 属性无效 [#4200](https://github.com/youzan/vant-weapp/issues/4200)\n- Circle: 修复 value 是小数时抖动的情况 [#4152](https://github.com/youzan/vant-weapp/issues/4152)\n- NoticeBar: 调整滚动行为 [#4201](https://github.com/youzan/vant-weapp/issues/4201)\n- NoticeBar: 修复不正确的滚动速度 [cde3876](https://github.com/youzan/vant-weapp/commit/cde3876fb0742cacf3e481a8eb2b487dabc8709e)\n- Radio: 支持动态设置 disabled [#4191](https://github.com/youzan/vant-weapp/issues/4191)\n- Rate: 支持滑动选择半星 [#4195](https://github.com/youzan/vant-weapp/issues/4195)\n\n**Features**\n\n- Calendar: 增加 first-day-of-week 属性，设置周起始日 [#4211](https://github.com/youzan/vant-weapp/issues/4211)\n- Calendar: 增加 show-range-prompt 属性和 over-range 事件，设置是否展示提示文案 [#4212](https://github.com/youzan/vant-weapp/issues/4212)\n- Icons: 图标库迁移至 iconfont.cn [#4219](https://github.com/youzan/vant-weapp/issues/4219)\n- OpenType: 支持 getUserProfile [#4203](https://github.com/youzan/vant-weapp/issues/4203)\n- Panel: 移除 useFooterSlot [#4205](https://github.com/youzan/vant-weapp/issues/4205)\n\n### [1.6.8](https://github.com/youzan/vant-weapp/tree/v1.6.8)\n\n`2021-02-26`\n\n**Features**\n\n- NoticeBar: 新增默认插槽 ([#4048](https://github.com/youzan/vant-weapp/pull/4048))\n- Stepper: 新增 theme 属性，支持圆形风格 ([#4049](https://github.com/youzan/vant-weapp/pull/4049))\n- Stepper: 新增 plus & minus 插槽 ([#4049](https://github.com/youzan/vant-weapp/pull/4049))\n\n**Bug Fixes**\n\n- Checkbox: 修复 label-position 属性无效 ([#4036](https://github.com/youzan/vant-weapp/pull/4036))\n- Dialog: 修复 beforeClose 方法类型定义 ([#4019](https://github.com/youzan/vant-weapp/pull/4019))\n\n**Improvements**\n\n- Circle: 当内置 canvas 不支持同层渲染时降级至默认 type ([#4050](https://github.com/youzan/vant-weapp/pull/4050))\n\n### [1.6.7](https://github.com/youzan/vant-weapp/tree/v1.6.7)\n\n`2021-01-27`\n\n**Features**\n\n- Radio: 新增 `direction` 属性 ([#4007](https://github.com/youzan/vant-weapp/issues/4007))\n\n**Bug Fixes**\n\n- Icons: 修复部分地区图标不显示 ([#4012](https://github.com/youzan/vant-weapp/issues/4012))\n- Transition: 修复默认设置 `show` 属性为 `true` 时不生效 ([#4005](https://github.com/youzan/vant-weapp/issues/4005))\n\n### [1.6.6](https://github.com/youzan/vant-weapp/tree/v1.6.6)\n\n`2021-01-21`\n\n**Features**\n\n- Uploader: 支持文件预览 ([#3975](https://github.com/youzan/vant-weapp/pull/3975))\n\n**Bug Fixes**\n\n- Picker: 修复标题栏无法显示 ([#3973](https://github.com/youzan/vant-weapp/pull/3973))\n\n**Improvements**\n\n- Calendar: 优化模板代码 ([#3972](https://github.com/youzan/vant-weapp/pull/3972))\n\n### [1.6.5](https://github.com/youzan/vant-weapp/tree/v1.6.5)\n\n`2021-01-19`\n\n**Features**\n\n- Field: 新增 input 插槽 ([#3932](https://github.com/youzan/vant-weapp/pull/3932))\n- Field: 新增 click-input 事件 ([#3932](https://github.com/youzan/vant-weapp/pull/3932))\n- Icon: 新增 delete-o、sort、font、font-o、revoke 图标 ([#3881](https://github.com/youzan/vant-weapp/pull/3881))\n\n**Bug Fixes**\n\n- Button: 修复 custom-style 属性不生效 ([#3903](https://github.com/youzan/vant-weapp/pull/3903))\n- Dialog: 修复 close-on-click-overlay 属性不生效 ([#3913](https://github.com/youzan/vant-weapp/pull/3913))\n\n**Improvements**\n\n- Cell: 优化性能 ([#3888](https://github.com/youzan/vant-weapp/issues/3888))\n- Col: 优化性能 ([#3886](https://github.com/youzan/vant-weapp/issues/3886))\n- Divider: 优化性能 ([#3887](https://github.com/youzan/vant-weapp/issues/3887))\n- Empty: 优化性能 ([#3933](https://github.com/youzan/vant-weapp/issues/3933))\n- Loading: 优化性能 ([#3892](https://github.com/youzan/vant-weapp/issues/3892))\n- Notice-bar: 优化性能 ([#3891](https://github.com/youzan/vant-weapp/issues/3891))\n- Notify: 优化性能 ([#3893](https://github.com/youzan/vant-weapp/issues/3893))\n- Picker: 优化性能 ([#3949](https://github.com/youzan/vant-weapp/issues/3949))\n- Stepper: 优化性能 ([#3890](https://github.com/youzan/vant-weapp/issues/3890))\n- Sticky: 优化性能 ([#3879](https://github.com/youzan/vant-weapp/issues/3879))\n- SwipeCell: 优化性能 ([#3928](https://github.com/youzan/vant-weapp/issues/3928))\n- Switch: 优化性能 ([#3889](https://github.com/youzan/vant-weapp/issues/3889))\n- Tag: 优化性能 ([#3894](https://github.com/youzan/vant-weapp/issues/3894))\n- Transition: 优化性能 ([#3895](https://github.com/youzan/vant-weapp/issues/3895))\n- Uploader: 优化性能 ([#3897](https://github.com/youzan/vant-weapp/issues/3897))\n\n### [1.6.4](https://github.com/youzan/vant-weapp/tree/v1.6.4)\n\n`2020-12-18`\n\n**Improvements**\n\n- Tab: 优化粘性布局时的渲染性能 ([#3875](https://github.com/youzan/vant-weapp/pull/3875))\n- Grid: 使用 wxs 优化性能 ([#3839](https://github.com/youzan/vant-weapp/pull/3868))\n- Image: 使用 wxs 优化性能 ([#3839](https://github.com/youzan/vant-weapp/pull/3868))\n- Button: 使用 wxs 优化性能 ([#3839](https://github.com/youzan/vant-weapp/pull/3839))\n- Icon: 减少代码体积 ([#3839](https://github.com/youzan/vant-weapp/pull/3868))\n- Checkbox: 减少代码体积 ([#3839](https://github.com/youzan/vant-weapp/pull/3868))\n- Slider: 减少代码体积 ([#3839](https://github.com/youzan/vant-weapp/pull/3868))\n\n**Bug Fixes**\n\n- Calendar: 修复在 phone 设备上选择日期后显示错误 ([#3833](https://github.com/youzan/vant-weapp/pull/3833))\n- GoodsAction: 修复部分设备上高度异常 ([#3865](https://github.com/youzan/vant-weapp/pull/3865))\n- Slider: 修复设置 `max` `min` 时滑动不均匀 ([#3876](https://github.com/youzan/vant-weapp/pull/3876))\n- Tab: 修复切换时内容区闪烁的问题 ([#3866](https://github.com/youzan/vant-weapp/pull/3866))\n\n### [1.6.3](https://github.com/youzan/vant-weapp/tree/v1.6.3)\n\n`2020-12-09`\n\n**Features**\n\n- Dialog: 新增 `beforeClose` 属性 ([#3815](https://github.com/youzan/vant-weapp/pull/3815))\n- uploader: 新增若干 CSS 变量 ([#3797](https://github.com/youzan/vant-weapp/pull/3797))\n- Aarea: 支持不传入 `county_list` 数据 ([#3824](https://github.com/youzan/vant-weapp/pull/3824))\n- Tab: 新增 `resize` 方法 ([#3827](https://github.com/youzan/vant-weapp/pull/3827))\n\n**Improvements**\n\n- Collapse: 使用 animate 提升动画性能 ([#3826](https://github.com/youzan/vant-weapp/pull/3826))\n- Tab: 优化样式拼装性能 ([#3827](https://github.com/youzan/vant-weapp/pull/3827))\n\n**Bug Fixes**\n\n- Field: 修复输入中文时显示字数暂时超出 maxlength ([#3802](https://github.com/youzan/vant-weapp/pull/3802))\n- Info: 修复样式错误 ([#3823](https://github.com/youzan/vant-weapp/pull/3823))\n- NavBar: 修复动态渲染时组件报错 ([#3822](https://github.com/youzan/vant-weapp/pull/3822))\n- Progress: 修复 `percentage` 为 0 时样式异常 ([#3808](https://github.com/youzan/vant-weapp/pull/3808))\n\n### [1.6.2](https://github.com/youzan/vant-weapp/tree/v1.6.2)\n\n`2020-11-29`\n\n**Features**\n\n- Tabbar: 新增 `placeholder` `icon-prefix` 属性 ([#3792](https://github.com/youzan/vant-weapp/pull/3792))\n\n**Bug Fixes**\n\n- DatetimePicker: 修复 `type=year-month` 时选择出现报错 ([#3783](https://github.com/youzan/vant-weapp/pull/3783))\n- Info: 修复部分安卓设备中文案不完全居中 ([#3778](https://github.com/youzan/vant-weapp/pull/3778))\n- Tab: 修复 `ellipsis` 为 `false` 时下划线位置不正确 ([#3777](https://github.com/youzan/vant-weapp/pull/3777))\n- Notify: 修复组件未全局居中 ([#3751](https://github.com/youzan/vant-weapp/pull/3751))\n\n**Improvements**\n\n- Icon: 使用 wxs 优化性能 ([#3791](https://github.com/youzan/vant-weapp/pull/3791))\n\n### [1.6.1](https://github.com/youzan/vant-weapp/tree/v1.6.1)\n\n`2020-11-12`\n\n**Bug Fixes**\n\n- Field: 修复未传入 `label` 属性时仍渲染 label [#3756](https://github.com/youzan/vant-weapp/pull/3756)\n- Picker: 修复 confirm、cancel 事件报错 [#3755](https://github.com/youzan/vant-weapp/pull/3755)\n\n### [1.6.0](https://github.com/youzan/vant-weapp/tree/v1.6.0)\n\n`2020-11-11`\n\n**Features**\n\n- SwipeCell: 新增外部样式类 `custom-class` [#3678](https://github.com/youzan/vant-weapp/pull/3678)\n- ActionSheet: 调整取消文字颜色至 @gray-7 [#3719](https://github.com/youzan/vant-weapp/pull/3719)\n- ActionSheet: 调整顶部栏样式 [#3720](https://github.com/youzan/vant-weapp/pull/3720)\n- ActionSheet: 调整加载图标大小至 22px [#3718](https://github.com/youzan/vant-weapp/pull/3718)\n- ActionSheet: 调整描述文字样式 [#3726](https://github.com/youzan/vant-weapp/pull/3726)\n- Cell: 调整图标外边距至 4px [#3721](https://github.com/youzan/vant-weapp/pull/3721)\n- DropdownMenu: 增加默认阴影 [#3723](https://github.com/youzan/vant-weapp/pull/3723)\n- DropdownMenu: 调整选中态默认颜色至 #ee0a24 [#3725](https://github.com/youzan/vant-weapp/pull/3725)\n- Image: 调整图标大小至 36px [#3724](https://github.com/youzan/vant-weapp/pull/3724)\n- Popup: 调整圆角至 16px [#3713](https://github.com/youzan/vant-weapp/pull/3713)\n- Search: 调整左侧内边距至 12px [#3716](https://github.com/youzan/vant-weapp/pull/3716)\n- Sidebar: 调整宽度至 85px [#3722](https://github.com/youzan/vant-weapp/pull/3722)\n- TabbarItem: 调整图标大小至 22px [#3717](https://github.com/youzan/vant-weapp/pull/3717)\n\n**Bug Fixes**\n\n- Field: 修复使用 `label` 属性时 `label-class` 样式类不生效 [#3729](https://github.com/youzan/vant-weapp/pull/3729)\n- NoticeBar: 修复内容较短时开启 `scrollable` 不生效 [#3727](https://github.com/youzan/vant-weapp/pull/3727)\n- SidebarItem: 修复长数字不换行的问题 [#3714](https://github.com/youzan/vant-weapp/pull/3714)\n- Tag: 默认字体加入 miui [#3715](https://github.com/youzan/vant-weapp/pull/3715)\n\n### [1.5.2](https://github.com/youzan/vant-weapp/tree/v1.5.2)\n\n`2020-10-15`\n\n**Features**\n\n- Uploader: 标准化 file-list 与事件参数 [#3673](https://github.com/youzan/vant-weapp/pull/3673)\n- Uploader: 新增 thumb，支持缩略图展示 [#3673](https://github.com/youzan/vant-weapp/pull/3673)\n- GoodsAction: 新增若干 CSS 变量 [#3654](https://github.com/youzan/vant-weapp/pull/3654)\n- 移动 @types/wechat-miniprogram 至 dependencies [#3654](https://github.com/youzan/vant-weapp/pull/3674)\n\n**Bug Fixes**\n\n- Button: 修复细边框样式问题 [#3653](https://github.com/youzan/vant-weapp/pull/3653)\n- Tab: 重构动画实现，不再使用 `transform` [#3668](https://github.com/youzan/vant-weapp/pull/3668)\n\n### [1.5.1](https://github.com/youzan/vant-weapp/tree/v1.5.1)\n\n`2020-09-29`\n\n**Features**\n\n- Card: 新增 `origin-price` `tag` 插槽 [#3645](https://github.com/youzan/vant-weapp/pull/3645)\n- ShareSheet: 调整默认 z-index 至 100 [#3575](https://github.com/youzan/vant-weapp/pull/3575)\n- ShareSheet: 新增 item 属性 openType [#3575](https://github.com/youzan/vant-weapp/pull/3575)\n- Uploader: 扩大删除按钮点击区域 [#3631](https://github.com/youzan/vant-weapp/pull/3631)\n\n**Bug Fixes**\n\n- Uploader: 支持预览视频 [#3594](https://github.com/youzan/vant-weapp/pull/3594)\n- Dialog: 调整类型定义 [#3630](https://github.com/youzan/vant-weapp/pull/3630)\n- NavBar: 修复 CSS 变量 --nav-bar-icon-color 不生效 [#3643](https://github.com/youzan/vant-weapp/pull/3643)\n- NavBar: 修复未设置 title 时样式异常 [#3643](https://github.com/youzan/vant-weapp/pull/3643)\n- Tab: 修复 line-width 属性不支持 string [#3628](https://github.com/youzan/vant-weapp/pull/3628)\n\n### [1.5.0](https://github.com/youzan/vant-weapp/tree/v1.5.0)\n\n`2020-08-27`\n\n**Features**\n\n- ShareSheet: 新增组件 [#3559](https://github.com/youzan/vant-weapp/pull/3559)\n- Icons: 升级 @vant/icons 至 v1.2.5 [#3539](https://github.com/youzan/vant-weapp/pull/3539)\n- sidebar: 新增 badge 属性 [#3564](https://github.com/youzan/vant-weapp/pull/3564)\n- Tabs: 调整默认 line-width 至 40px [#3518](https://github.com/youzan/vant-weapp/pull/3518)\n- Tabs: 去除默认边框 [#3519](https://github.com/youzan/vant-weapp/pull/3519)\n- TreeSelect: 新增 selected-icon 属性 [#3565](https://github.com/youzan/vant-weapp/pull/3565)\n- TreeSelect: 支持 badge、dot 显示 [#3565](https://github.com/youzan/vant-weapp/pull/3565)\n\n**Bug Fixes**\n\n- collapse: 修复嵌套在 popup 等组件中时默认展开无效 [#3562](https://github.com/youzan/vant-weapp/pull/3562)\n- empty: 修复 image、description 插槽不生效 [#3563](https://github.com/youzan/vant-weapp/pull/3563)\n\n### [1.4.4](https://github.com/youzan/vant-weapp/tree/v1.4.4)\n\n`2020-08-12`\n\n**Bug Fixes**\n\n- Transition: 重构组件以修复卡顿问题 [#3498](https://github.com/youzan/vant-weapp/pull/3498)\n- Icon: 修复数字未对齐 [#3501](https://github.com/youzan/vant-weapp/pull/3501)\n- Tab: 修复可滚动时下划线位置错误 [#3511](https://github.com/youzan/vant-weapp/pull/3511)\n\n### [v1.4.3](https://github.com/youzan/vant-weapp/tree/v1.4.3)\n\n`2020-08-07`\n\n**Features**\n\n- Dialog: 增加圆角按钮样式 [#3476](https://github.com/youzan/vant-weapp/pull/3476)\n- Cell: 调整下划线位置 [#3487](https://github.com/youzan/vant-weapp/pull/3487)\n- Tab: 调整默认滚动阈值至 5 个、优化样式 [#3459](https://github.com/youzan/vant-weapp/pull/3459)\n\n### [v1.4.2](https://github.com/youzan/vant-weapp/tree/v1.4.2)\n\n`2020-08-03`\n\n**Features**\n\n- Toast: 优化样式 [#3451](https://github.com/youzan/vant-weapp/pull/3451)\n- Tag: 优化样式 [#3465](https://github.com/youzan/vant-weapp/pull/3465)\n\n**Bug Fixes**\n\n- Calendar: 修复超出 max-range 时未显示 Toast [#3466](https://github.com/youzan/vant-weapp/pull/3466)\n- Tab: 修复手势滚动可切换至禁用项 [#3467](https://github.com/youzan/vant-weapp/pull/3467)\n\n### [v1.4.1](https://github.com/youzan/vant-weapp/tree/v1.4.1)\n\n`2020-07-28`\n\n**Features**\n\n- Picker: 调整默认可见的选项个数为 6 个 [#3418](https://github.com/youzan/vant-weapp/pull/3418)\n- Toast: 调整圆角为 8px [#3419](https://github.com/youzan/vant-weapp/pull/3419)\n\n**Bug Fixes**\n\n- Slider: 修复点击会触发 drag 事件 [#3415](https://github.com/youzan/vant-weapp/pull/3415)\n- Area: 修复中间列无法滚动 [#3443](https://github.com/youzan/vant-weapp/pull/3443)\n\n### [v1.4.0](https://github.com/youzan/vant-weapp/tree/v1.4.0)\n\n`2020-07-17`\n\n**Features**\n\n- Empty: 新增 Empty 组件 [\\#3327](https://github.com/youzan/vant-weapp/pull/3327)\n- NoticeBar: 新增 background 属性 [\\#3388](https://github.com/youzan/vant-weapp/pull/3388)\n- NoticeBar: 新增 close 事件 [\\#3388](https://github.com/youzan/vant-weapp/pull/3388)\n- GridItem: 新增 icon-color 属性 [\\#3386](https://github.com/youzan/vant-weapp/pull/3386)\n- NavBar: 现在 custom-style 将影响根节点[\\#3371](https://github.com/youzan/vant-weapp/pull/3371)\n- Cell: 新增 title-style 属性, fix Field label width [\\#3370](https://github.com/youzan/vant-weapp/pull/3370)\n- Uploader: 更新 failed 图标 [\\#3359](https://github.com/youzan/vant-weapp/pull/3359)\n- Uploader: 更新删除图标样式 [\\#3385](https://github.com/youzan/vant-weapp/pull/3385)\n- Uploader: 移除圆角样式 [\\#3384](https://github.com/youzan/vant-weapp/pull/3384)\n- Field: 更新禁用态样式 [\\#3358](https://github.com/youzan/vant-weapp/pull/3358)\n- Field: 更新 label 样式 [\\#3357](https://github.com/youzan/vant-weapp/pull/3357)\n- Picker: 调整 action button 样式 [\\#3316](https://github.com/youzan/vant-weapp/pull/3316)\n\n**Bug Fixes**\n\n- Collapse: 使用 animation 重构动画部分逻辑以修复动画卡顿 [\\#3401](https://github.com/youzan/vant-weapp/pull/3401)\n- Uploader: 修复 loading 样式错误、调整 previewSize 属性默认值 [\\#3317](https://github.com/youzan/vant-weapp/pull/3317)\n- Area: 修复低版本基础库下 columns-num 设置为 1 或 2 时真机环境报错 [\\#3318](https://github.com/youzan/vant-weapp/pull/3318)\n- DatetimePicker: 修复使用 formatter 时，事件返回值可能不正确 [\\#3352](https://github.com/youzan/vant-weapp/pull/3352)\n- Field: 修复 textarea 模式下 label 与 value 不在同一水平线上 [\\#3383](https://github.com/youzan/vant-weapp/pull/3383)\n- Dialog: show dialog after class ready [\\#3374](https://github.com/youzan/vant-weapp/pull/3374)\n- Calendar: confirm-disabled-text 属性增加默认值 [\\#3394](https://github.com/youzan/vant-weapp/pull/3394)\n\n### [v1.3.3](https://github.com/youzan/vant-weapp/tree/v1.3.3)\n\n`2020-06-24`\n\n**Features**\n\n- steps: 为每一项增加 inactiveIcon、activeIcon 属性 [\\#3315](https://github.com/youzan/vant-weapp/pull/3315)\n- field: 增加外部样式类 label-class [\\#3311](https://github.com/youzan/vant-weapp/pull/3311)\n- field: 现在总会从内部 set value 值 [\\#3313](https://github.com/youzan/vant-weapp/pull/3313)\n- uploader: 为每一项增加 deletable 属性 [\\#3270](https://github.com/youzan/vant-weapp/pull/3270)\n- uploader: 扩大删除图标的可点击区域 [\\#3265](https://github.com/youzan/vant-weapp/pull/3265)\n\n**Bug Fixes**\n\n- tabbar: 修复 iphone-se 上高度异常 [\\#3314](https://github.com/youzan/vant-weapp/pull/3314)\n- grid: 修复 text 与 icon 同时设置时样式异常 [\\#3310](https://github.com/youzan/vant-weapp/pull/3310)\n- calendar: 修复多选模式下 default-date 属性不生效 [\\#3284](https://github.com/youzan/vant-weapp/pull/3284)\n- circle: 修复 type=\"2d\" 时无法动态变更 value [\\#3264](https://github.com/youzan/vant-weapp/pull/3264)\n- nav-bar: 修复未设置 left-text 时左侧图标样式异常 [\\#3263](https://github.com/youzan/vant-weapp/pull/3263)\n\n### [v1.3.2](https://github.com/youzan/vant-weapp/tree/v1.3.2)\n\n`2020-06-04`\n\n**Features**\n\n- button: 新增 form-type 属性 [\\#3208](https://github.com/youzan/vant-weapp/pull/3208)\n- grid: 新增 icon-size、badge 属性 [\\#3236](https://github.com/youzan/vant-weapp/pull/3236)\n- grid: 新增 direction 属性 [\\#3192](https://github.com/youzan/vant-weapp/pull/3192)\n\n**Bug Fixes**\n\n- Grid: 修复开启 `square` 时横、纵向间距不同 [\\#3231](https://github.com/youzan/vant-weapp/pull/3231)\n- uploader: 修复点击删除图标时触发 click-preview 事件 [\\#3230](https://github.com/youzan/vant-weapp/pull/3230)\n- circle: 修复 `type=\"2d\"` 不生效 [\\#3228](https://github.com/youzan/vant-weapp/pull/3228)\n- calendar: 修复在选择区间时，点击确定报错 [\\#3195](https://github.com/youzan/vant-weapp/pull/3195)\n- tag: 修复 css 变量名拼写错误 [\\#3191](https://github.com/youzan/vant-weapp/pull/3191)\n\n### [v1.3.1](https://github.com/youzan/vant-weapp/tree/v1.3.1)\n\n`2020-05-24`\n\n**Features**\n\n- Button: 新增 class-prefix 属性 [\\#3159](https://github.com/youzan/vant-weapp/pull/3159)\n- Collapse: 新增 open、close 事件 [\\#3176](https://github.com/youzan/vant-weapp/pull/3176)\n\n**Bug Fixes**\n\n- 修复控制台提示选择器错误的问题 [\\#3137](https://github.com/youzan/vant-weapp/pull/3137)\n- 修复 GoodsActionButton 在某些情况下报错的问题 [\\#3145](https://github.com/youzan/vant-weapp/pull/3145)\n\n### [v1.3.0](https://github.com/youzan/vant-weapp/tree/v1.3.0)\n\n`2020-05-08`\n\n#### 支持简易双向绑定\n\n1.3.0 中，我们为数个表单组件支持了简易双向绑定，涉及组件有\n\nSlider [\\#3107](https://github.com/youzan/vant-weapp/pull/3107)\n\nSearch [\\#3106](https://github.com/youzan/vant-weapp/pull/3106)\n\nRate [\\#3105](https://github.com/youzan/vant-weapp/pull/3105)\n\n**Features**\n\n- sticky: 新增 scroll-top 属性 [\\#3115](https://github.com/youzan/vant-weapp/pull/3115)\n- button: 新增 dataset 属性 [\\#3075](https://github.com/youzan/vant-weapp/pull/3075)\n- uploader: 所有类型都会触发 click-preview 事件 [\\#3071](https://github.com/youzan/vant-weapp/pull/3071)\n- Uploader: 属性 accept 新增值 media [\\#3047](https://github.com/youzan/vant-weapp/pull/3047)\n- feat: 新增基础 font-family [\\#3061](https://github.com/youzan/vant-weapp/pull/3061)\n- submit-bar: 使用另一个 view 实现 safe-area-inset-bottom 以避免样式冲突 [\\#3104](https://github.com/youzan/vant-weapp/pull/3104)\n\n**Bug Fixes**\n\n- dialog: 修复 title 多余空格的问题 [\\#3069](https://github.com/youzan/vant-weapp/pull/3069)\n- tab: 修复 tab 个数多时显示滚动条 [\\#3072](https://github.com/youzan/vant-weapp/pull/3072)\n- Sticky: 修复使用组件时页面 onPageScroll 失效 [\\#3092](https://github.com/youzan/vant-weapp/pull/3092)\n- button: 修复 disabled 属性对 open-type 类型的按钮无效 [\\#3076](https://github.com/youzan/vant-weapp/pull/3076)\n\n### [v1.2.2](https://github.com/youzan/vant-weapp/tree/v1.2.2)\n\n`2020-04-21`\n\n**Features**\n\n- GoodsActionButton: 新增 CSS 变量 goods-action-line-height [\\#3037](https://github.com/youzan/vant-weapp/pull/3037)\n- Calendar: 选择区间大于 range 时自动选中最大范围 [\\#3026](https://github.com/youzan/vant-weapp/pull/3026)\n- Notify: 新增 top 属性 [\\#3018](https://github.com/youzan/vant-weapp/pull/3018)\n\n**Bug Fixes**\n\n- Field: 修复未设置 autosize 时 wxs 报错 [\\#3038](https://github.com/youzan/vant-weapp/pull/3038)\n- Field: 避免设置 showClear 为 undefined [\\#3012](https://github.com/youzan/vant-weapp/pull/3012)\n\n### [v1.2.1](https://github.com/youzan/vant-weapp/tree/v1.2.1)\n\n`2020-04-12`\n\n**Features**\n\n- Field: 支持小程序双向绑定 [\\#2986](https://github.com/youzan/vant-weapp/pull/2986)\n- Calendar: 多选模式下新增 unselect 事件 [\\#2990](https://github.com/youzan/vant-weapp/pull/2990)\n\n**Bug Fixes**\n\n- IndexBar: 移除 scroll-top 属性 [\\#2999](https://github.com/youzan/vant-weapp/pull/2999)\n- Uploader: 修复图片后缀名为大写时未正常识别 [\\#2987](https://github.com/youzan/vant-weapp/pull/2987)\n- Field: 修复 autosize 属性 设置 max-height 不生效 [\\#3007](https://github.com/youzan/vant-weapp/pull/3007)\n\n### [v1.2.0](https://github.com/youzan/vant-weapp/tree/v1.2.0)\n\n`2020-04-04`\n\n**Features**\n\n- TreeSelect: 更新 nav 背景色 [\\#2952](https://github.com/youzan/vant-weapp/pull/2952)\n- Sticky: 使用 page scroll 重构组件 [\\#2950](https://github.com/youzan/vant-weapp/pull/2950)\n- Field: 新增 auto-focus、disable-default-padding、cursor 属性 [\\#2936](https://github.com/youzan/vant-weapp/pull/2936)\n- Field: 新增 linechange、keyboardheightchange 事件 [\\#2936](https://github.com/youzan/vant-weapp/pull/2936)\n- Uploader: 支持显示上传状态 [\\#2929](https://github.com/youzan/vant-weapp/pull/2929)\n- Image: mode 属性新增 widthFix、heightFix [\\#2908](https://github.com/youzan/vant-weapp/pull/2908)\n- Canvas: 新增 type 属性 [\\#2906](https://github.com/youzan/vant-weapp/pull/2906)\n- NavBar: 新增 placeholder 属性 [\\#2896](https://github.com/youzan/vant-weapp/pull/2896)\n\n**Bug Fixes**\n\n- Field: 修复输入过快时输入框内容不断回退 [\\#2936](https://github.com/youzan/vant-weapp/pull/2936)\n- Calendar: 修复 show-confirm 为 true 时组件初始化报错 [\\#2951](https://github.com/youzan/vant-weapp/pull/2951)\n- Tab: 修复 type 为 card 时 color 对边框无效 [\\#2941](https://github.com/youzan/vant-weapp/pull/2941)\n\n### [v1.1.0](https://github.com/youzan/vant-weapp/tree/v1.1.0)\n\n`2020-03-21`\n\n**Features**\n\n- 新增 Calendar 日历组件 [\\#2894](https://github.com/youzan/vant-weapp/pull/2894)\n- Grid: 新增外部样式类 custom-class、content-class、icon-class、text-class [\\#2882](https://github.com/youzan/vant-weapp/pull/2882)\n- Steps: 新增 click 事件 [\\#2874](https://github.com/youzan/vant-weapp/pull/2874)\n- SideBar: 新增 title 插槽 [\\#2873](https://github.com/youzan/vant-weapp/pull/2873)\n- Uploader: 新增 upload-icon 属性 [\\#2869](https://github.com/youzan/vant-weapp/pull/2869)\n- Uploader: 新增 show-upload 属性 [\\#2868](https://github.com/youzan/vant-weapp/pull/2868)\n- Uploader: 更新样式、调整事件触发顺序与 vant 一致 [\\#2886](https://github.com/youzan/vant-weapp/pull/2886)\n- Field: 新增 show-word-limit 属性 [\\#2856](https://github.com/youzan/vant-weapp/pull/2856)\n- Field: autosize 属性支持传入对象，指定 maxHeight 与 minHeight [\\#2856](https://github.com/youzan/vant-weapp/pull/2856)\n- Field: 新增若干 CSS 变量 [\\#2856](https://github.com/youzan/vant-weapp/pull/2856)\n\n**Bug Fixes**\n\n- Button: 移除 lang 属性默认值 [\\#2883](https://github.com/youzan/vant-weapp/pull/2883)\n- Button: 修复 disabled 属性对原生事件无效 [\\#2878](https://github.com/youzan/vant-weapp/pull/2878)\n\n### [v1.0.7](https://github.com/youzan/vant-weapp/tree/v1.0.7)\n\n`2020-03-04`\n\n**Features**\n\n- DropdownItem: 新增 `popupStyle` 属性 [\\#2804](https://github.com/youzan/vant-weapp/pull/2804)\n- DropdownItem: 新增 `open` `close` `opened` `closed` 事件 [\\#2804](https://github.com/youzan/vant-weapp/pull/2804)\n- Card: 新增 `price` `num` 插槽 [\\#2787](https://github.com/youzan/vant-weapp/pull/2787)\n- Card: 新增 `origin-price-class` 外部样式类 [\\#2787](https://github.com/youzan/vant-weapp/pull/2787)\n\n**Bug Fixes**\n\n- Tab: 修复内容项高度不同时粘性布局异常 [\\#2817](https://github.com/youzan/vant-weapp/pull/2817)\n- Picker: 修复未选中项样式未置灰 [\\#2816](https://github.com/youzan/vant-weapp/pull/2816)\n- GoodsActionButton: 修复仅使用一个 button 时样式异常 [\\#2808](https://github.com/youzan/vant-weapp/pull/2808)\n- Radio: `name`类型与`value`统一 [\\#2801](https://github.com/youzan/vant-weapp/pull/2801)\n- Uploader: 修复文档错误 [\\#2777](https://github.com/youzan/vant-weapp/pull/2777)\n\n### [v1.0.6](https://github.com/youzan/vant-weapp/tree/v1.0.6)\n\n`2020-02-24`\n\n**Features**\n\n- GoodsActionButton: 新增默认 slot [\\#2779](https://github.com/youzan/vant-weapp/pull/2779)\n- SubmitBar: 更新圆角样式 [\\#2755](https://github.com/youzan/vant-weapp/pull/2755)\n- Card: 更新样式 [\\#2754](https://github.com/youzan/vant-weapp/pull/2754)\n- 优化 relation 部分代码 [\\#2760](https://github.com/youzan/vant-weapp/pull/2760)\n\n**Bug Fixes**\n\n- DropdownItem: 修复点击选项时不触发`close`事件 [\\#2766](https://github.com/youzan/vant-weapp/pull/2766)\n- GoodsActionButton: 修复低版本基础库下的样式问题 [\\#2762](https://github.com/youzan/vant-weapp/pull/2762)\n- Tabs: 修复点击禁用项时事件参数错误 [\\#2758](https://github.com/youzan/vant-weapp/pull/2758)\n- Checkbox: 修复动态设置`disabled`属性无效 [\\#2748](https://github.com/youzan/vant-weapp/pull/2748)\n- Button: add loading color when plain is true [\\#2746](https://github.com/youzan/vant-weapp/pull/2746)\n- Radio: 修复`label-disabled`文档错误 [\\#2763](https://github.com/youzan/vant-weapp/pull/2763)\n\n### [v1.0.5](https://github.com/youzan/vant-weapp/tree/v1.0.5)\n\n`2020-02-07`\n\n**Features**\n\n- ActionSheet: actions 支持更多 openType [\\#2715](https://github.com/youzan/vant-weapp/pull/2715)\n- Uploader: 新增开始`disabled`时的组件样式 [\\#2720](https://github.com/youzan/vant-weapp/pull/2720)\n- Icon: 调整示例小程序页面与 vant 对齐 [\\#2728](https://github.com/youzan/vant-weapp/pull/2728)\n- 示例小程序首页与 vant 对齐 [\\#2729](https://github.com/youzan/vant-weapp/pull/2729)\n- 完善快速上手文档，增加 npm 构建说明 [\\#2726](https://github.com/youzan/vant-weapp/pull/2726)\n\n**Bug Fixes**\n\n- Radio: 修复`disabled`属性不生效 [\\#2711](https://github.com/youzan/vant-weapp/pull/2711)\n- Tab: 修复`animated`属性无法动态切换 [\\#2712](https://github.com/youzan/vant-weapp/pull/2712)\n- Circle: 修正文档错误，`size`属性不支持`string`类型 [\\#2694](https://github.com/youzan/vant-weapp/pull/2694)\n- 修正文档默认 slot 名称为 default 的错误 [\\#2726](https://github.com/youzan/vant-weapp/pull/2726)\n- TreeSelect: 修正文档示例代码标签闭合错误 [\\#2710](https://github.com/youzan/vant-weapp/pull/2710)\n\n### [v1.0.4](https://github.com/youzan/vant-weapp/tree/v1.0.4)\n\n`2020-01-21`\n\n**Features**\n\n- Stepper: 新增 disable-long-press 属性 [\\#2691](https://github.com/youzan/vant-weapp/pull/2691)\n- quickstart: 快速上手新增关闭 style v2 说明 [\\#2704](https://github.com/youzan/vant-weapp/pull/2704)\n- Search: 新增 background、disabled、input-align 文档示例 [\\#2698](https://github.com/youzan/vant-weapp/pull/2698)\n- Icon: 文档新增图标文字加载失败说明 [\\#2681](https://github.com/youzan/vant-weapp/pull/2681)\n\n**Bug Fixes**\n\n- Sticky: 修复真机上页面滚动缓慢时无法吸顶/取消吸顶 [\\#2703](https://github.com/youzan/vant-weapp/pull/2703)\n- DropdownItem: 修复 wx:key 警告 [\\#2670](https://github.com/youzan/vant-weapp/pull/2670)\n- IndexBar: 文档修复组件引入路径错误 [\\#2689](https://github.com/youzan/vant-weapp/pull/2689)\n- 升级依赖版本以避免安全警告 [\\#2680](https://github.com/youzan/vant-weapp/pull/2680)\n\n### [v1.0.3](https://github.com/youzan/vant-weapp/tree/v1.0.3)\n\n`2020-01-09`\n\n**Features**\n\n- npm 包默认输出 es5 版本代码 [\\#2639](https://github.com/youzan/vant-weapp/pull/2639)\n- Steps: 新增外部样式类 desc-class [\\#2630](https://github.com/youzan/vant-weapp/pull/2630)\n\n**Bug Fixes**\n\n- Tab: 解决动态添加选项时，顺序错乱和下划线长度不变的问题 [\\#2663](https://github.com/youzan/vant-weapp/pull/2663)\n- NavBar: 修复返回图标未居中的问题 [\\#2633](https://github.com/youzan/vant-weapp/pull/2633)\n\n### [v1.0.2](https://github.com/youzan/vant-weapp/tree/v1.0.2)\n\n`2019-12-31`\n\n**Features**\n\n- Skeleton: 新增外部样式类` row-class``avatar-class``title-class ` [\\#2612](https://github.com/youzan/vant-weapp/pull/2612)\n- SwipeCell: 支持动态修改`width`属性 [\\#2607](https://github.com/youzan/vant-weapp/pull/2607)\n- Uploader: 新增` camera``compressed``maxDuration `属性 [\\#2584](https://github.com/youzan/vant-weapp/pull/2584)\n\n**Improvements**\n\n- Tab: 优化弹性滚动效果 [\\#2606](https://github.com/youzan/vant-weapp/pull/2606)\n\n**Bug Fixes**\n\n- IndexBar: 修复字母未全部定义时 click 事件报错 [\\#2605](https://github.com/youzan/vant-weapp/pull/2605)\n- Field: 修复点击清除图标后下一次点击无效 [\\#2602](https://github.com/youzan/vant-weapp/pull/2602)\n\n### [v1.0.1](https://github.com/youzan/vant-weapp/tree/v1.0.1)\n\n`2019-12-23`\n\n**Features**\n\n- Uploader: 新增 sizeType 属性 [\\#2563](https://github.com/youzan/vant-weapp/pull/2563)\n- GoodsActionButton: 新增 plain 属性 [\\#2559](https://github.com/youzan/vant-weapp/pull/2559)\n- Uploader: 去除 use-slot 属性 [\\#2551](https://github.com/youzan/vant-weapp/pull/2551)\n- 新增样式覆盖说明文档 [\\#2566](https://github.com/youzan/vant-weapp/pull/2566)\n\n**Improvements**\n\n- 使用 nextTick 优化部分异步逻辑 [\\#2561](https://github.com/youzan/vant-weapp/pull/2561)\n- wxs 新增 addUnit 方法以减少 setData 调用次数 [\\#2550](https://github.com/youzan/vant-weapp/pull/2550)\n\n**Bug Fixes**\n\n- Tag: 修复未依赖 van-icon 组件 [\\#2579](https://github.com/youzan/vant-weapp/pull/2579)\n- Notify: 修复 safeAreaInsetTop 不生效 [\\#2558](https://github.com/youzan/vant-weapp/pull/2558)\n- Uploader: 修复 capture 属性不生效 [\\#2551](https://github.com/youzan/vant-weapp/pull/2551)\n\n### [v1.0.0](https://github.com/youzan/vant-weapp/tree/v1.0.0)\n\n`2019-12-11`\n\n#### 主要变动\n\n- npm 包名由 vant-weapp 重命名为 @vant/weapp\n- 增加十一个新组件\n- 增加数十个 API\n- 所有组件支持通过`CSS自定义属性`自定义样式\n- 使用`env()`重构 iOS 安全区域适配\n- 调整部分 API 命名，废除少量 API\n\n#### 新组件\n\n在 Vant Weapp 1.0 版本中，我们新增了 11 个实用的基础组件：\n\n- <b>Grid 宫格</b>，用于展示内容或进行页面导航\n- <b>Image 图片</b>，增强版的 Image 标签，支持图片懒加载与加载失败提示\n- <b>Circle 环形进度条</b>，告知用户当前的状态和进度\n- <b>Overaly 遮罩层</b>，用于强调特定的页面元素，并阻止用户进行其他操作\n- <b>Divider 分割线</b>，区隔内容的分割线\n- <b>Sticky 粘性布局</b>，与 CSS 中`position: sticky`属性实现的效果类似\n- <b>Skeleton 骨架屏</b>，在待加载区域展示的占位区块，提供界面加载过程中的过渡效果\n- <b>IndexBar 索引栏</b>，通讯录中的字母索引栏，用于长列表快速索引\n- <b>Uploader 文件上传</b>，上传一个或多个文件\n- <b>CountDown 倒计时</b>，用于显示活动倒计时、短信验证码等\n- <b>DropdownMenu 下拉菜单</b>，用于列表的分类选择、筛选及排序\n\n![](https://img.yzcdn.cn/public_files/2019/12/06/748d9b70feb76eeaf44f9d6080b6e108.png)\n\n#### 样式定制\n\n在 1.0 迭代计划确定之初，我们就不断思考这样一个问题 -- 该如何给用户提供动态切换主题样式的功能呢？\n\n微信小程序的环境是非常特殊的。不具有动态加载代码的机制，同时微信又限制了代码的主包大小和总大小。传统的基于预设的样式定制过于臃肿，不再适合微信小程序的环境。\n\n微信小程序自定义组件的组件模型相当于一个简化版的 [Shadow DOM](https://developers.google.com/web/fundamentals/web-components/shadowdom?hl=zh-CN)，幸运的是，小程序也支持了 [CSS 自定义属性](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties) 的特性。最终，我们基于 CSS 自定义属性设计了样式定制的方案，开发者使用灵活、方便，组件维护也更简单。\n\n从 1.0 版本开始，Vant Weapp 中的所有组件都支持通过 [CSS 组定义属性](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties) 进行样式定制，具体使用姿势可查看[相关文档](/vant-weapp/#/theme)\n\n![定制主题](https://img.yzcdn.cn/public_files/2019/06/11/9a066c1a212264c7ae56065e1f13d317.png)\n\n#### 不兼容更新\n\n1.0 版本中包含少量不兼容更新，主要是命名调整和移除个别属性。对于正在使用 0.x 版本的项目，请按照下方的列表依次检查，大部分项目可以<b>无痛升级</b>。\n\n##### Badge\n\n- `BadgeGroup`重命名为`Sidebar`\n- `Badge`重命名为`SlidebarItem`\n- `active`属性重命名为`activeKey`\n\n##### Notify\n\n- `text`选项重命名为`message`\n- `backgroundColor`选项重命名为`background`\n\n##### Popup\n\n- 去除`transitionend`事件，新增 6 个事件\n\n##### SwitchCell\n\n- 移除了`SwitchCell`组件，可以使用`Cell`和`Switch`组件代替\n\n##### Transition\n\n- 去除`transitionend`事件，新增 6 个事件\n\n---\n\n#### 新特性\n\n##### ActionSheet\n\n- 新增`click-overlay`事件\n- 新增`close-on-click-action`属性\n- 新增`color`属性\n- 新增`description`属性\n- 新增`round`属性\n\n##### Area\n\n- 新增`columns-placeholder`属性\n- `reset`方法支持传入`code`参数\n\n##### Button\n\n- 新增`loading-type`属性\n- `color`属性支持渐变色\n- 切换`disabled`时增加过渡效果\n\n##### Checkbox\n\n- 新增`icon-size`属性\n\n##### Color\n\n- 基础红色更新为`#ee0a24`\n\n##### DatetimePicker\n\n- 新增`filter`属性\n\n##### Dialog\n\n- 优化文字换行\n- 新增`title`插槽\n- 新增`confirm-button-color`属性\n- 新增`cancel-button-color`属性\n- 新增`width`属性\n- 新增`overlay-style`属性\n\n##### Field\n\n- 新增`clickable`属性\n- 新增`arrow-direction`属性\n- 新增`hold-keyboard`属性\n\n##### GoodsActionButton\n\n- 新增`color`属性\n- 样式升级为圆角风格\n\n##### GoodsActionIcon\n\n- 新增`icon`插槽\n- 新增`dot`属性\n\n##### GridItem\n\n- 新增`info`属性\n- 新增`dot`属性\n\n##### Icon\n\n- 新增`dot`属性\n- 新增`down`图标\n- 新增`wap-hone`实底风格图标\n- 支持`number`类型的`size`属性\n\n##### Loading\n\n- 支持`number`类型的`size`属性\n\n##### NoticeBar\n\n- 阻止关闭图标点击事件冒泡\n\n##### Notify\n\n- 新增`clear`方法\n\n##### Popup\n\n- 新增`round`属性\n- 新增`closeable`属性\n- 新增`close-icon`属性\n- 新增`close-icon-position`属性\n\n##### Progress\n\n- 新增`stroke-width`属性\n\n##### Radio\n\n- 新增`icon-size`属性\n\n##### Rate\n\n- 优化手势判断\n- 新增`gutter`属性\n- 新增`touchable`属性\n- 支持`string`类型的`size`属性\n\n##### Search\n\n- 新增`action-text`属性\n- 新增`left-icon`插槽\n- 新增`right-icon`插槽\n\n##### SlidebarItem\n\n- 新增`dot`属性\n\n##### Slider\n\n- 新增`drag-start`事件\n- 新增`drag-end`事件\n- 支持传入任意范围的`max`和`min`属性\n- 支持`number`类型的`bar-height`属性\n- 增加滑动动画\n- 增大点击区域\n\n##### SwipeCell\n\n- 新增`name`属性\n- 新增`open`事件\n- 支持打开状态互斥\n\n##### Switch\n\n- 加载图标的颜色会跟随开关状态变化\n\n##### Stepper\n\n- 支持长按手势\n- 新增`input-width`属性\n- 新增`button-size`属性\n- 新增`decimalLength`属性\n- 新增 disablePlus、disableMinus 属性\n\n##### Steps\n\n- 新增`active-icon`属性\n- 新增`inactive-icon`属性\n\n##### Tabs\n\n- 使用 Sticky 组件重构吸顶实现\n- 新增`name`属性\n- 新增`line-height`属性\n- 新增`ellipsis`属性\n- 新增`lazy-render`属性\n- `line-width`属性支持`String`类型\n- 增加云开发结合示例\n\n##### TreeSelect\n\n- 新增`max`属性\n- 新增`content`插槽\n"
  },
  {
    "path": "docs/markdown/custom-style.md",
    "content": "# 样式覆盖\n\n### 介绍\n\nVant Weapp 基于微信小程序的机制，为开发者提供了以下 3 种修改组件样式的方法\n\n### 解除样式隔离\n\n样式隔离的相关背景知识请查阅[微信小程序文档](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#%E7%BB%84%E4%BB%B6%E6%A0%B7%E5%BC%8F%E9%9A%94%E7%A6%BB)\n\n<br />\n\nVant Weapp 的所有组件都开启了`addGlobalClass: true`以接受外部样式的影响，可以使用如下 2 种方式覆盖组件样式\n\n> 在页面中使用 Vant Weapp 组件时，可直接在页面的样式文件中覆盖样式\n\n```html\n<van-button type=\"primary\">主要按钮</van-button>\n```\n\n```css\n/* page.wxss */\n.van-button--primary {\n  font-size: 20px;\n  background-color: pink;\n}\n```\n\n> 在自定义组件中使用 Vant Weapp 组件时，需开启`styleIsolation: 'shared'`选项\n\n```html\n<van-button type=\"primary\">主要按钮</van-button>\n```\n\n```js\nComponent({\n  options: {\n    styleIsolation: 'shared',\n  },\n});\n```\n\n```css\n.van-button--primary {\n  font-size: 20px;\n  background-color: pink;\n}\n```\n\n### 使用外部样式类\n\n外部样式类的相关知识背景请查阅[微信小程序文档](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#%E5%A4%96%E9%83%A8%E6%A0%B7%E5%BC%8F%E7%B1%BB)\n\n<br />\n\nVant Weapp 开放了大量的外部样式类供开发者使用，具体的样式类名称可查阅对应组件的“外部样式类”部分。\n\n需要注意的是普通样式类和外部样式类的优先级是未定义的，因此使用时请添加`!important`以保证外部样式类的优先级。\n\n```html\n<van-cell\n  title=\"单元格\"\n  value=\"内容\"\n  title-class=\"cell-title\"\n  value-class=\"cell-value\"\n/>\n```\n\n```css\n.cell-title {\n  color: pink !important;\n  font-size: 20px !important;\n}\n\n.cell-value {\n  color: green !important;\n  font-size: 12px !important;\n}\n```\n\n### 使用 CSS 变量\n\nVant Weapp 为部分 CSS 属性开放了基于 CSS 属性的定制方案。\n\n相较于 解除样式隔离 和 使用外部样式类，这种方案支持在页面或应用级别对多个组件的样式做批量修改以进行主题样式的定制。\n\n当然，用它来修改单个组件的部分样式也是绰绰有余的。具体的使用方法请查阅[定制主题](#/theme)\n"
  },
  {
    "path": "docs/markdown/home.md",
    "content": "<div class=\"van-doc-card\">\n  <div class=\"van-doc-intro\">\n    <img class=\"van-doc-intro__logo\" style=\"width: 120px; height: 120px; box-shadow: none;\" src=\"https://img.yzcdn.cn/public_files/2017/12/18/fd78cf6bb5d12e2a119d0576bedfd230.png\">\n    <h2 style=\"margin: 0; font-size: 32px; line-height: 60px;\">Vant Weapp</h2>\n    <p>轻量、可靠的小程序 UI 组件库</p>\n  </div>\n</div>\n\n### 介绍\n\nVant 是一个**轻量、可靠的移动端组件库**，于 2017 年开源。\n\n目前 Vant 官方提供了 [Vue 2 版本](/vant/v2/)、[Vue 3 版本](/vant/)和[微信小程序版本](/vant-weapp/)，并由社区团队维护 [React 版本](https://github.com/3lang3/react-vant)和[支付宝小程序版本](https://github.com/ant-move/Vant-Aliapp)。\n\n### 预览\n\n扫描下方小程序二维码，体验组件库示例：\n\n<img src=\"https://img.yzcdn.cn/vant-weapp/qrcode-201808101114.jpg\" style=\"width: 200px; height: 200px; margin-top: 15px; box-shadow: none\" >\n\n> Tips: 为了便于预览组件效果，本文档的右侧内嵌了 H5 版的 Vant 页面作为参考。在实际使用中，个别组件的表现可能与小程序上的表现有差异，请以实际效果为准。\n\n### 快速上手\n\n请参考 [快速上手](#/quickstart)。\n\n### 链接\n\n- [意见反馈](https://github.com/youzan/vant-weapp/issues)\n- [设计资源](/vant/#/zh-CN/design)\n- [更新日志](/vant-weapp/#/changelog)\n- [官方示例](https://github.com/vant-ui/vant-demo)\n\n## 贡献\n\n### 核心团队\n\n以下是 Vant 和 Vant Weapp 的核心贡献者们：\n\n| [![chenjiahan](https://avatars.githubusercontent.com/u/7237365?s=80&v=4)](https://github.com/chenjiahan/) | [![cookfront](https://avatars.githubusercontent.com/u/4829465?s=80&v=4)](https://github.com/cookfront/) | [![w91](https://avatars.githubusercontent.com/u/2599455?s=80&v=4)](https://github.com/w91/) | [![pangxie1991](https://avatars.githubusercontent.com/u/5961240?s=80&v=4)](https://github.com/pangxie1991/) | [![rex-zsd](https://avatars.githubusercontent.com/u/8767877?s=80&v=4)](https://github.com/rex-zsd/) | [![nemo-shen](https://avatars.githubusercontent.com/u/13480805?s=80&v=4)](https://github.com/nemo-shen/) |\n| :-: | :-: | :-: | :-: | :-: | :-: |\n| [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) | [nemo-shen](https://github.com/nemo-shen/) |\n\n| [![Lindysen](https://avatars.githubusercontent.com/u/33708359?s=80&v=4)](https://github.com/Lindysen/) | [![JakeLaoyu](https://avatars.githubusercontent.com/u/16181940?s=80&v=4)](https://github.com/JakeLaoyu/) | [![landluck](https://avatars.githubusercontent.com/u/27060081?s=80&v=4)](https://github.com/landluck/) | [![wjw-gavin](https://avatars.githubusercontent.com/u/19986739?s=80&v=4)](https://github.com/wjw-gavin/) | [![inottn](https://avatars.githubusercontent.com/u/18509404?s=80&v=4)](https://github.com/inottn/) | [![zhousg](https://avatars.githubusercontent.com/u/15833290?s=80&v=4)](https://github.com/zhousg/) |\n| :-: | :-: | :-: | :-: | :-: | :-: |\n| [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) | [landluck](https://github.com/landluck/) | [wjw-gavin](https://github.com/wjw-gavin/) | [inottn](https://github.com/inottn/) | [zhousg](https://github.com/zhousg/) |\n\n### 贡献者们\n\n感谢以下小伙伴们为 Vant Weapp 发展做出的贡献：\n\n<a href=\"https://github.com/youzan/vant-weapp/graphs/contributors\">\n  <img src=\"https://opencollective.com/vant-weapp/contributors.svg?width=890&button=false\" alt=\"contributors\" style=\"width: 100%; margin: 16px 0\">\n</a>\n\n### 贡献代码\n\n使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant-weapp/issues) 给我们，当然，我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant-weapp/pulls)。\n\n### 开源协议\n\n本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议，请自由地享受和参与开源。\n"
  },
  {
    "path": "docs/markdown/quickstart.md",
    "content": "# 快速上手\n\n### 背景知识\n\n使用 Vant Weapp 前，请确保你已经学习过微信官方的 [小程序简易教程](https://developers.weixin.qq.com/miniprogram/dev/framework/) 和 [自定义组件介绍](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/)。\n\n## 安装\n\n### 步骤一 通过 npm 安装\n\n> 使用 npm 构建前，请先阅读微信官方的 [npm 支持](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html)\n\n```bash\n# 通过 npm 安装\nnpm i @vant/weapp -S --production\n\n# 通过 yarn 安装\nyarn add @vant/weapp --production\n\n# 安装 0.x 版本\nnpm i vant-weapp -S --production\n```\n\n### 步骤二 修改 app.json\n\n将 app.json 中的 `\"style\": \"v2\"` 去除，小程序的[新版基础组件](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#style)强行加上了许多样式，难以覆盖，不关闭将造成部分组件样式混乱。\n\n### 步骤三 构建 npm 包\n\n打开微信开发者工具，点击 **工具 -> 构建 npm**，并勾选 **使用 npm 模块** 选项，构建完成后，即可引入组件。\n\n<img style=\"width: 500px;\" src=\"https://img.yzcdn.cn/public_files/2019/08/15/fa0549210055976cb63798503611ce3d.png\" />\n\n### 步骤四 typescript 支持\n\n如果你使用 typescript 开发小程序，还需要做如下操作，以获得顺畅的开发体验。\n\n#### 安装 miniprogram-api-typings\n\n```bash\n# 通过 npm 安装\nnpm i -D miniprogram-api-typings\n\n# 通过 yarn 安装\nyarn add -D miniprogram-api-typings\n```\n\n#### 在 tsconfig.json 中增加如下配置，以防止 tsc 编译报错。\n\n请将`path/to/node_modules/@vant/weapp`修改为项目的 `node_modules` 中 @vant/weapp 所在的目录。\n\n```json\n{\n  ...\n  \"compilerOptions\": {\n    ...\n    \"baseUrl\": \".\",\n    \"types\": [\"miniprogram-api-typings\"],\n    \"paths\": {\n      \"@vant/weapp/*\": [\"path/to/node_modules/@vant/weapp/dist/*\"]\n    },\n    \"lib\": [\"ES6\"]\n  }\n}\n```\n\n### 示例工程\n\n我们提供了一个[示例工程](https://github.com/vant-ui/vant-demo)，示例工程会帮助你了解如下内容：\n\n- 基于 Vant Weapp 搭建小程序应用\n- 样式覆盖方案\n\n## 使用\n\n### 引入组件\n\n以 Button 组件为例，只需要在`app.json`或`index.json`中配置 Button 对应的路径即可。\n\n所有组件文档中的引入路径均以 npm 安装为例，如果你是通过下载源代码的方式使用 @vant/weapp，请将路径修改为项目中 @vant/weapp 所在的目录。\n\n```json\n// 通过 npm 安装\n// app.json\n\"usingComponents\": {\n  \"van-button\": \"@vant/weapp/button/index\"\n}\n```\n\n```json\n// 通过下载源码使用 es6版本\n// app.json\n\"usingComponents\": {\n  \"van-button\": \"path/to/@vant/weapp/dist/button/index\"\n}\n```\n\n```json\n// 通过下载源码使用 es5版本\n// app.json\n\"usingComponents\": {\n  \"van-button\": \"path/to/@vant/weapp/lib/button/index\"\n}\n```\n\n### 使用组件\n\n引入组件后，可以在 wxml 中直接使用组件\n\n```xml\n<van-button type=\"primary\">按钮</van-button>\n```\n\n## 其他\n\n### 在开发者工具中预览示例小程序\n\n```bash\n\n# 将项目克隆到本地\ngit clone git@github.com:youzan/vant-weapp.git\n\n# 安装项目依赖\ncd vant-weapp && npm install\n\n# 执行组件编译\nnpm run dev\n\n```\n\n接着打开微信开发者工具，导入`example`目录的项目就可以预览示例了。\n\n### 关于用户隐私保护指引\n\n@vant/weapp 部分组件使用了微信提供的接口，其中部分接口涉及获取用户隐私信息。\n\n例如 `<Uploader />` 使用了微信提供的选择用户相册中图片接口`(wx.chooseImage)`。\n\n当小程序引入 @vant/weapp 并发布时，\n根据微信[《用户隐私保护指引填写说明》](https://developers.weixin.qq.com/miniprogram/dev/framework/user-privacy/)，\n如检测到代码中存在涉及用户隐私信息接口则需填写用户隐私保护指引信息，如已填写则无需重复填写。\n"
  },
  {
    "path": "docs/markdown/theme.md",
    "content": "# 定制主题\n\n### 背景知识\n\n小程序基于 [Shadow DOM](https://developers.google.com/web/fundamentals/web-components/shadowdom?hl=zh-cn) 来实现自定义组件，所以 Vant Weapp 使用与之配套的 [CSS 变量](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties) 来实现定制主题。链接中的内容可以帮助你对这两个概念有基本的认识，避免许多不必要的困扰。\n\nCSS 变量 的兼容性要求可以在 [这里](https://caniuse.com/#feat=css-variables) 查看。对于不支持 CSS 变量 的设备，定制主题将不会生效，不过不必担心，默认样式仍会生效。\n\n### 样式变量\n\n定制使用的 CSS 变量 与 Less 变量 同名，下面是一些基本的样式变量，所有可用的颜色变量请参考 [配置文件](https://github.com/youzan/vant-weapp/blob/dev/packages/common/style/var.less)。\n\n```less\n// Component Colors\n@text-color: #323233;\n@border-color: #ebedf0;\n@active-color: #f2f3f5;\n@background-color: #f8f8f8;\n@background-color-light: #fafafa;\n```\n\n## 定制方法\n\n### 定制单个组件的主题样式\n\n> 在 wxss 中为组件设置 CSS 变量\n\n```html\n<van-button class=\"my-button\">\n  默认按钮\n</van-button>\n```\n\n```less\n.my-button {\n  --button-border-radius: 10px;\n  --button-default-color: #f2f3f5;\n}\n```\n\n> 或通过 style 属性来设置 CSS 变量，这使你能够轻松实现主题的动态切换\n\n```html\n<van-button style=\"{{ buttonStyle }}\">\n  默认按钮\n</van-button>\n```\n\n```js\nPage({\n  data: {\n    buttonStyle: `\n      --button-border-radius: 10px;\n      --button-default-color: green;\n    `,\n  },\n\n  onLoad() {\n    setTimeout(() => {\n      this.setData({\n        buttonStyle: `\n          --button-border-radius: 2px;\n          --button-default-color: pink;\n        `,\n      });\n    }, 2000);\n  },\n});\n```\n\n### 定制多个组件的主题样式\n\n> 与单个组件的定制方式类似，只需用一个 container 节点包裹住需要定制的组件，并将 CSS 变量 设置在 container 节点上\n\n```html\n<view class=\"container\">\n  <van-button bind:click=\"onClick\">\n    默认按钮\n  </van-button>\n\n  <van-toast id=\"van-toast\" />\n</view>\n```\n\n```js\nimport Toast from '@vant/weapp/toast/toast';\n\nPage({\n  onClick() {\n    Toast('我是提示文案，建议不超过十五字~');\n  },\n});\n```\n\n```less\n.container {\n  --button-border-radius: 10px;\n  --button-default-color: #f2f3f5;\n  --toast-max-width: 100px;\n  --toast-background-color: pink;\n}\n```\n\n### 定制全局主题样式\n\n> 在 app.wxss 中，写入 CSS 变量，即可对全局生效\n\n```less\npage {\n  --button-border-radius: 10px;\n  --button-default-color: #f2f3f5;\n  --toast-max-width: 100px;\n  --toast-background-color: pink;\n}\n```\n"
  },
  {
    "path": "example/app.js",
    "content": "App({\n  globalData: {},\n  onLaunch() {\n    if (!wx.cloud) {\n      console.error('请使用 2.2.3 或以上的基础库以使用云能力');\n    } else {\n      wx.cloud.init({\n        env: 'production-7dtfw'\n      });\n    }\n  }\n});\n"
  },
  {
    "path": "example/app.json",
    "content": "{\n  \"pages\": [\n    \"pages/dashboard/index\",\n    \"pages/action-sheet/index\",\n    \"pages/button/index\",\n    \"pages/card/index\",\n    \"pages/cell/index\",\n    \"pages/col/index\",\n    \"pages/count-down/index\",\n    \"pages/dialog/index\",\n    \"pages/field/index\",\n    \"pages/icon/index\",\n    \"pages/image/index\",\n    \"pages/loading/index\",\n    \"pages/nav-bar/index\",\n    \"pages/notice-bar/index\",\n    \"pages/notify/index\",\n    \"pages/panel/index\",\n    \"pages/popup/index\",\n    \"pages/progress/index\",\n    \"pages/stepper/index\",\n    \"pages/steps/index\",\n    \"pages/sticky/index\",\n    \"pages/switch/index\",\n    \"pages/search/index\",\n    \"pages/slider/index\",\n    \"pages/sidebar/index\",\n    \"pages/tab/index\",\n    \"pages/tabbar/index\",\n    \"pages/tag/index\",\n    \"pages/toast/index\",\n    \"pages/transition/index\",\n    \"pages/tree-select/index\",\n    \"pages/area/index\",\n    \"pages/submit-bar/index\",\n    \"pages/radio/index\",\n    \"pages/checkbox/index\",\n    \"pages/goods-action/index\",\n    \"pages/swipe-cell/index\",\n    \"pages/uploader/index\",\n    \"pages/datetime-picker/index\",\n    \"pages/rate/index\",\n    \"pages/collapse/index\",\n    \"pages/picker/index\",\n    \"pages/overlay/index\",\n    \"pages/circle/index\",\n    \"pages/grid/index\",\n    \"pages/dropdown-menu/index\",\n    \"pages/index-bar/index\",\n    \"pages/skeleton/index\",\n    \"pages/divider/index\",\n    \"pages/empty/index\",\n    \"pages/calendar/index\",\n    \"pages/share-sheet/index\",\n    \"pages/config-provider/index\",\n    \"pages/cascader/index\"\n  ],\n  \"window\": {\n    \"navigationBarBackgroundColor\": \"#f8f8f8\",\n    \"navigationBarTitleText\": \"Vant Weapp\",\n    \"navigationBarTextStyle\": \"black\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#f8f8f8\"\n  },\n  \"usingComponents\": {\n    \"demo-block\": \"./components/demo-block/index\",\n    \"van-action-sheet-demo\": \"./dist/action-sheet/demo/index\",\n    \"van-area-demo\": \"./dist/area/demo/index\",\n    \"van-button-demo\": \"./dist/button/demo/index\",\n    \"van-card-demo\": \"./dist/card/demo/index\",\n    \"van-cell-demo\": \"./dist/cell/demo/index\",\n    \"van-checkbox-demo\": \"./dist/checkbox/demo/index\",\n    \"van-col-demo\": \"./dist/col/demo/index\",\n    \"van-count-down-demo\": \"./dist/count-down/demo/index\",\n    \"van-dialog-demo\": \"./dist/dialog/demo/index\",\n    \"van-divider-demo\": \"./dist/divider/demo/index\",\n    \"van-empty-demo\": \"./dist/empty/demo/index\",\n    \"van-field-demo\": \"./dist/field/demo/index\",\n    \"van-goods-action-demo\": \"./dist/goods-action/demo/index\",\n    \"van-icon-demo\": \"./dist/icon/demo/index\",\n    \"van-image-demo\": \"./dist/image/demo/index\",\n    \"van-loading-demo\": \"./dist/loading/demo/index\",\n    \"van-nav-bar-demo\": \"./dist/nav-bar/demo/index\",\n    \"van-notice-bar-demo\": \"./dist/notice-bar/demo/index\",\n    \"van-notify-demo\": \"./dist/notify/demo/index\",\n    \"van-panel-demo\": \"./dist/panel/demo/index\",\n    \"van-popup-demo\": \"./dist/popup/demo/index\",\n    \"van-progress-demo\": \"./dist/progress/demo/index\",\n    \"van-radio-demo\": \"./dist/radio/demo/index\",\n    \"van-search-demo\": \"./dist/search/demo/index\",\n    \"van-sidebar-demo\": \"./dist/sidebar/demo/index\",\n    \"van-slider-demo\": \"./dist/slider/demo/index\",\n    \"van-stepper-demo\": \"./dist/stepper/demo/index\",\n    \"van-steps-demo\": \"./dist/steps/demo/index\",\n    \"van-sticky-demo\": \"./dist/sticky/demo/index\",\n    \"van-submit-bar-demo\": \"./dist/submit-bar/demo/index\",\n    \"van-swipe-cell-demo\": \"./dist/swipe-cell/demo/index\",\n    \"van-uploader-demo\": \"./dist/uploader/demo/index\",\n    \"van-switch-demo\": \"./dist/switch/demo/index\",\n    \"van-tab-demo\": \"./dist/tab/demo/index\",\n    \"van-tabbar-demo\": \"./dist/tabbar/demo/index\",\n    \"van-tag-demo\": \"./dist/tag/demo/index\",\n    \"van-toast-demo\": \"./dist/toast/demo/index\",\n    \"van-transition-demo\": \"./dist/transition/demo/index\",\n    \"van-tree-select-demo\": \"./dist/tree-select/demo/index\",\n    \"van-datetime-picker-demo\": \"./dist/datetime-picker/demo/index\",\n    \"van-rate-demo\": \"./dist/rate/demo/index\",\n    \"van-collapse-demo\": \"./dist/collapse/demo/index\",\n    \"van-picker-demo\": \"./dist/picker/demo/index\",\n    \"van-overlay-demo\": \"./dist/overlay/demo/index\",\n    \"van-circle-demo\": \"./dist/circle/demo/index\",\n    \"van-index-bar-demo\": \"./dist/index-bar/demo/index\",\n    \"van-grid-demo\": \"./dist/grid/demo/index\",\n    \"van-dropdown-menu-demo\": \"./dist/dropdown-menu/demo/index\",\n    \"van-skeleton-demo\": \"./dist/skeleton/demo/index\",\n    \"van-calendar-demo\": \"./dist/calendar/demo/index\",\n    \"van-share-sheet-demo\": \"./dist/share-sheet/demo/index\",\n    \"van-config-provider-demo\": \"./dist/config-provider/demo/index\",\n    \"van-cascader-demo\": \"./dist/cascader/demo/index\"\n  },\n  \"sitemapLocation\": \"sitemap.json\"\n}\n"
  },
  {
    "path": "example/app.wxss",
    "content": "page {\n  box-sizing: border-box;\n  min-height: 100vh;\n  padding: 0 0 100rpx;\n  color: #323233;\n  font-size: 16px;\n  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,\n    Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei',\n    sans-serif;\n  background: #f7f8fa;\n  -webkit-font-smoothing: antialiased;\n}\n\n.demo-margin-left {\n  margin-left: 10px;\n}\n\n.demo-margin-right {\n  margin-right: 10px;\n}\n\n.demo-margin-bottom {\n  display: block;\n  margin-bottom: 15px;\n}\n"
  },
  {
    "path": "example/common/page.js",
    "content": "export default function(options = {}) {\n  return Page({\n    onShareAppMessage() {\n      return {\n        title: 'Vant Weapp 组件库演示'\n      };\n    },\n    ...options\n  });\n}\n"
  },
  {
    "path": "example/components/demo-block/index.js",
    "content": "Component({\n  properties: {\n    title: String,\n    padding: Boolean,\n    card: Boolean,\n  },\n\n  externalClasses: ['custom-class'],\n});\n"
  },
  {
    "path": "example/components/demo-block/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "example/components/demo-block/index.wxml",
    "content": "<view class=\"custom-class demo-block van-clearfix {{ padding ? 'demo-block--padding' : '' }}\">\n  <view wx:if=\"{{ title }}\" class=\"demo-block__title\">{{ title }}</view>\n  <view class=\"demo-block__card\" wx:if=\"{{ card }}\">\n    <slot />\n  </view>\n <slot wx:else />\n</view>\n"
  },
  {
    "path": "example/components/demo-block/index.wxss",
    "content": "@import '../../dist/common/index.wxss';\n\n.demo-block__title {\n  margin: 0;\n  padding: 20px 15px 15px;\n  color: rgba(69, 90, 100, 0.6);\n  font-weight: 400;\n  font-size: 14px;\n}\n\n.demo-block__card {\n  overflow: hidden;\n  border-radius: 8px;\n}\n\n.demo-block--padding {\n  padding: 0 15px;\n}\n\n.demo-block--padding .demo-block__title {\n  padding-left: 0;\n}\n"
  },
  {
    "path": "example/components/demo-home/index.js",
    "content": "import list from '../../config';\n\nComponent({\n  data: {\n    list,\n  },\n});\n"
  },
  {
    "path": "example/components/demo-home/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"demo-home-nav\": \"../demo-home-nav/index\"\n  }\n}\n"
  },
  {
    "path": "example/components/demo-home/index.wxml",
    "content": "<view class=\"demo-home\">\n  <view\n    class=\"demo-home__title\"\n  >\n    <image mode=\"aspectFit\" class=\"demo-home__image\" src=\"https://img.yzcdn.cn/vant/logo.png\" />\n    <view class=\"demo-home__text\">Vant Weapp</view>\n  </view>\n  <view class=\"demo-home__desc\">\n    轻量、可靠的小程序 UI 组件库\n  </view>\n  <view\n    wx:for=\"{{ list }}\"\n    wx:for-item=\"group\"\n    wx:key=\"index\"\n  >\n    <demo-home-nav group=\"{{ group }}\" />\n  </view>\n</view>\n"
  },
  {
    "path": "example/components/demo-home/index.wxss",
    "content": ".demo-home {\n  box-sizing: border-box;\n  width: 100%;\n  min-height: 100vh;\n  padding: 46px 20px 20px;\n  background: #fff;\n}\n\n.demo-home__title,\n.demo-home__desc {\n  padding-left: 16px;\n  font-weight: normal;\n  line-height: 1;\n  user-select: none;\n}\n\n.demo-home__title {\n  margin: 0 0 16px;\n  font-size: 32px;\n}\n\n.demo-home__image,\n.demo-home__text {\n  display: inline-block;\n  vertical-align: middle;\n}\n\n.demo-home__image {\n  width: 32px;\n  height: 32px;\n}\n\n.demo-home__text {\n  margin-left: 16px;\n  font-weight: 500;\n}\n\n.demo-home__title .demo-home--small {\n  font-size: 24px;\n}\n\n.demo-home__desc {\n  margin: 0 0 40px;\n  color: rgba(69, 90, 100, 0.6);\n  font-size: 14px;\n}\n"
  },
  {
    "path": "example/components/demo-home-nav/index.js",
    "content": "Component({\n  properties: {\n    group: Object,\n  },\n\n  methods: {\n    onClick(event) {\n      const { url } = event.target.dataset;\n      if (getCurrentPages().length > 9) {\n        wx.redirectTo({ url });\n      } else {\n        wx.navigateTo({ url });\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "example/components/demo-home-nav/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../../dist/icon/index\"\n  }\n}\n"
  },
  {
    "path": "example/components/demo-home-nav/index.wxml",
    "content": "<view class=\"demo-home-nav\">\n  <view class=\"demo-home-nav__title\">{{ group.groupName }}</view>\n  <view class=\"demo-home-nav__group\">\n    <view\n      wx:for=\"{{ group.list }}\"\n      wx:key=\"title\"\n      class=\"demo-home-nav__block\"\n      data-url=\"/pages{{ item.path }}/index\"\n      bind:tap=\"onClick\"\n    >\n      {{ item.title }}\n      <van-icon name=\"arrow\" custom-class=\"demo-home-nav__icon\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "example/components/demo-home-nav/index.wxss",
    "content": ".demo-home-nav__title {\n  margin: 24px 0 8px 16px;\n  color: rgba(69, 90, 100, 0.6);\n  font-size: 14px;\n}\n\n.demo-home-nav__block {\n  position: relative;\n  display: flex;\n  margin: 0 0 12px;\n  padding-left: 20px;\n  color: #323233;\n  font-weight: 500;\n  font-size: 14px;\n  line-height: 40px;\n  background: #f7f8fa;\n  border-radius: 99px;\n  transition: background 0.3s;\n}\n\n.demo-home-nav__block:hover {\n  background: darken(#f7f8fa, 3%);\n}\n\n.demo-home-nav__block:active {\n  background: darken(#f7f8fa, 6%);\n}\n\n.demo-home-nav__icon {\n  position: absolute !important;\n  top: 50%;\n  right: 16px;\n  width: 16px;\n  height: 16px;\n  margin-top: -8px;\n  color: rgb(182, 195, 210);\n  font-weight: 900 !important;\n}\n"
  },
  {
    "path": "example/config.js",
    "content": "export default [\n  {\n    groupName: '基础组件',\n    icon: 'https://img.yzcdn.cn/vant/basic-0401.svg',\n    list: [\n      {\n        path: '/button',\n        title: 'Button 按钮',\n      },\n      {\n        path: '/cell',\n        title: 'Cell 单元格',\n      },\n      {\n        path: '/config-provider',\n        title: 'ConfigProvider 全局配置',\n      },\n      {\n        path: '/icon',\n        title: 'Icon 图标',\n      },\n      {\n        path: '/image',\n        title: 'Image 图片',\n      },\n      {\n        path: '/col',\n        title: 'Layout 布局',\n      },\n      {\n        path: '/popup',\n        title: 'Popup 弹出层',\n      },\n      {\n        path: '/transition',\n        title: 'Transition 动画',\n      },\n    ],\n  },\n  {\n    groupName: '表单组件',\n    icon: 'https://img.yzcdn.cn/vant/form-0401.svg',\n    list: [\n      {\n        path: '/calendar',\n        title: 'Calendar 日历',\n      },\n      {\n        path: '/cascader',\n        title: 'Cascader 级联选择',\n      },\n      {\n        path: '/checkbox',\n        title: 'Checkbox 复选框',\n      },\n      {\n        path: '/datetime-picker',\n        title: 'DatetimePicker 时间选择',\n      },\n      {\n        path: '/field',\n        title: 'Field 输入框',\n      },\n      {\n        path: '/picker',\n        title: 'Picker 选择器',\n      },\n      {\n        path: '/radio',\n        title: 'Radio 单选框',\n      },\n      {\n        path: '/rate',\n        title: 'Rate 评分',\n      },\n      {\n        path: '/search',\n        title: 'Search 搜索',\n      },\n      {\n        path: '/slider',\n        title: 'Slider 滑块',\n      },\n      {\n        path: '/stepper',\n        title: 'Stepper 步进器',\n      },\n      {\n        path: '/switch',\n        title: 'Switch 开关',\n      },\n      {\n        path: '/uploader',\n        title: 'Uploader 文件上传',\n      },\n    ],\n  },\n  {\n    groupName: '反馈组件',\n    icon: 'passed',\n    list: [\n      {\n        path: '/action-sheet',\n        title: 'ActionSheet 动作面板',\n      },\n      {\n        path: '/dialog',\n        title: 'Dialog 弹出框',\n      },\n      {\n        path: '/dropdown-menu',\n        title: 'DropdownMenu 下拉菜单',\n      },\n      {\n        path: '/loading',\n        title: 'Loading 加载',\n      },\n      {\n        path: '/notify',\n        title: 'Notify 消息通知',\n      },\n      {\n        path: '/overlay',\n        title: 'Overlay 遮罩层',\n      },\n      {\n        path: '/share-sheet',\n        title: 'ShareSheet 分享面板',\n      },\n      {\n        path: '/swipe-cell',\n        title: 'SwipeCell 滑动单元格',\n      },\n      {\n        path: '/toast',\n        title: 'Toast 轻提示',\n      },\n    ],\n  },\n  {\n    groupName: '展示组件',\n    icon: 'photo-o',\n    list: [\n      {\n        path: '/circle',\n        title: 'Circle 进度条',\n      },\n      {\n        path: '/collapse',\n        title: 'Collapse 折叠面板',\n      },\n      {\n        path: '/count-down',\n        title: 'CountDown 倒计时',\n      },\n      {\n        path: '/divider',\n        title: 'Divider 分割线',\n      },\n      {\n        path: '/empty',\n        title: 'Empty 空状态',\n      },\n      {\n        path: '/notice-bar',\n        title: 'NoticeBar 通知栏',\n      },\n      {\n        path: '/panel',\n        title: 'Panel 面板',\n      },\n      {\n        path: '/progress',\n        title: 'Progress 进度条',\n      },\n      {\n        path: '/skeleton',\n        title: 'Skeleton 骨架屏',\n      },\n      {\n        path: '/steps',\n        title: 'Steps 步骤条',\n      },\n      {\n        path: '/sticky',\n        title: 'Sticky 粘性布局',\n      },\n      {\n        path: '/tag',\n        title: 'Tag 标记',\n      },\n      {\n        path: '/tree-select',\n        title: 'TreeSelect 分类选择',\n      },\n    ],\n  },\n  {\n    groupName: '导航组件',\n    icon: 'https://img.yzcdn.cn/vant/nav-0401.svg',\n    list: [\n      {\n        path: '/grid',\n        title: 'Grid 宫格',\n      },\n      {\n        path: '/index-bar',\n        title: 'IndexBar 索引栏',\n      },\n      {\n        path: '/sidebar',\n        title: 'Sidebar 侧边导航',\n      },\n      {\n        path: '/nav-bar',\n        title: 'NavBar 导航栏',\n      },\n      {\n        path: '/tab',\n        title: 'Tab 标签页',\n      },\n      {\n        path: '/tabbar',\n        title: 'Tabbar 标签栏',\n      },\n    ],\n  },\n  {\n    groupName: '业务组件',\n    icon: 'ellipsis',\n    list: [\n      {\n        path: '/area',\n        title: 'Area 省市区选择',\n      },\n      {\n        path: '/card',\n        title: 'Card 商品卡片',\n      },\n      {\n        path: '/submit-bar',\n        title: 'SubmitBar 提交订单栏',\n      },\n      {\n        path: '/goods-action',\n        title: 'GoodsAction 商品导航',\n      },\n    ],\n  },\n];\n"
  },
  {
    "path": "example/database_area.json",
    "content": "{\"_id\":\"5e847ab25ebe5e8d00ff446445d71b47\",\n\"province_list\":{\n\"110000\":\"北京市\",\n\"120000\":\"天津市\",\n\"130000\":\"河北省\",\n\"140000\":\"山西省\",\n\"150000\":\"内蒙古自治区\",\n\"210000\":\"辽宁省\",\n\"220000\":\"吉林省\",\n\"230000\":\"黑龙江省\",\n\"310000\":\"上海市\",\n\"320000\":\"江苏省\",\n\"330000\":\"浙江省\",\n\"340000\":\"安徽省\",\n\"350000\":\"福建省\",\n\"360000\":\"江西省\",\n\"370000\":\"山东省\",\n\"410000\":\"河南省\",\n\"420000\":\"湖北省\",\n\"430000\":\"湖南省\",\n\"440000\":\"广东省\",\n\"450000\":\"广西壮族自治区\",\n\"460000\":\"海南省\",\n\"500000\":\"重庆市\",\n\"510000\":\"四川省\",\n\"520000\":\"贵州省\",\n\"530000\":\"云南省\",\n\"540000\":\"西藏自治区\",\n\"610000\":\"陕西省\",\n\"620000\":\"甘肃省\",\n\"630000\":\"青海省\",\n\"640000\":\"宁夏回族自治区\",\n\"650000\":\"新疆维吾尔自治区\",\n\"710000\":\"台湾省\",\n\"810000\":\"香港特别行政区\",\n\"820000\":\"澳门特别行政区\",\n\"900000\":\"海外\"\n},\n\"city_list\":{\n\"110100\":\"北京市\",\n\"120100\":\"天津市\",\n\"130100\":\"石家庄市\",\n\"130200\":\"唐山市\",\n\"130300\":\"秦皇岛市\",\n\"130400\":\"邯郸市\",\n\"130500\":\"邢台市\",\n\"130600\":\"保定市\",\n\"130700\":\"张家口市\",\n\"130800\":\"承德市\",\n\"130900\":\"沧州市\",\n\"131000\":\"廊坊市\",\n\"131100\":\"衡水市\",\n\"140100\":\"太原市\",\n\"140200\":\"大同市\",\n\"140300\":\"阳泉市\",\n\"140400\":\"长治市\",\n\"140500\":\"晋城市\",\n\"140600\":\"朔州市\",\n\"140700\":\"晋中市\",\n\"140800\":\"运城市\",\n\"140900\":\"忻州市\",\n\"141000\":\"临汾市\",\n\"141100\":\"吕梁市\",\n\"150100\":\"呼和浩特市\",\n\"150200\":\"包头市\",\n\"150300\":\"乌海市\",\n\"150400\":\"赤峰市\",\n\"150500\":\"通辽市\",\n\"150600\":\"鄂尔多斯市\",\n\"150700\":\"呼伦贝尔市\",\n\"150800\":\"巴彦淖尔市\",\n\"150900\":\"乌兰察布市\",\n\"152200\":\"兴安盟\",\n\"152500\":\"锡林郭勒盟\",\n\"152900\":\"阿拉善盟\",\n\"210100\":\"沈阳市\",\n\"210200\":\"大连市\",\n\"210300\":\"鞍山市\",\n\"210400\":\"抚顺市\",\n\"210500\":\"本溪市\",\n\"210600\":\"丹东市\",\n\"210700\":\"锦州市\",\n\"210800\":\"营口市\",\n\"210900\":\"阜新市\",\n\"211000\":\"辽阳市\",\n\"211100\":\"盘锦市\",\n\"211200\":\"铁岭市\",\n\"211300\":\"朝阳市\",\n\"211400\":\"葫芦岛市\",\n\"220100\":\"长春市\",\n\"220200\":\"吉林市\",\n\"220300\":\"四平市\",\n\"220400\":\"辽源市\",\n\"220500\":\"通化市\",\n\"220600\":\"白山市\",\n\"220700\":\"松原市\",\n\"220800\":\"白城市\",\n\"222400\":\"延边朝鲜族自治州\",\n\"230100\":\"哈尔滨市\",\n\"230200\":\"齐齐哈尔市\",\n\"230300\":\"鸡西市\",\n\"230400\":\"鹤岗市\",\n\"230500\":\"双鸭山市\",\n\"230600\":\"大庆市\",\n\"230700\":\"伊春市\",\n\"230800\":\"佳木斯市\",\n\"230900\":\"七台河市\",\n\"231000\":\"牡丹江市\",\n\"231100\":\"黑河市\",\n\"231200\":\"绥化市\",\n\"232700\":\"大兴安岭地区\",\n\"310100\":\"上海市\",\n\"320100\":\"南京市\",\n\"320200\":\"无锡市\",\n\"320300\":\"徐州市\",\n\"320400\":\"常州市\",\n\"320500\":\"苏州市\",\n\"320600\":\"南通市\",\n\"320700\":\"连云港市\",\n\"320800\":\"淮安市\",\n\"320900\":\"盐城市\",\n\"321000\":\"扬州市\",\n\"321100\":\"镇江市\",\n\"321200\":\"泰州市\",\n\"321300\":\"宿迁市\",\n\"330100\":\"杭州市\",\n\"330200\":\"宁波市\",\n\"330300\":\"温州市\",\n\"330400\":\"嘉兴市\",\n\"330500\":\"湖州市\",\n\"330600\":\"绍兴市\",\n\"330700\":\"金华市\",\n\"330800\":\"衢州市\",\n\"330900\":\"舟山市\",\n\"331000\":\"台州市\",\n\"331100\":\"丽水市\",\n\"340100\":\"合肥市\",\n\"340200\":\"芜湖市\",\n\"340300\":\"蚌埠市\",\n\"340400\":\"淮南市\",\n\"340500\":\"马鞍山市\",\n\"340600\":\"淮北市\",\n\"340700\":\"铜陵市\",\n\"340800\":\"安庆市\",\n\"341000\":\"黄山市\",\n\"341100\":\"滁州市\",\n\"341200\":\"阜阳市\",\n\"341300\":\"宿州市\",\n\"341500\":\"六安市\",\n\"341600\":\"亳州市\",\n\"341700\":\"池州市\",\n\"341800\":\"宣城市\",\n\"350100\":\"福州市\",\n\"350200\":\"厦门市\",\n\"350300\":\"莆田市\",\n\"350400\":\"三明市\",\n\"350500\":\"泉州市\",\n\"350600\":\"漳州市\",\n\"350700\":\"南平市\",\n\"350800\":\"龙岩市\",\n\"350900\":\"宁德市\",\n\"360100\":\"南昌市\",\n\"360200\":\"景德镇市\",\n\"360300\":\"萍乡市\",\n\"360400\":\"九江市\",\n\"360500\":\"新余市\",\n\"360600\":\"鹰潭市\",\n\"360700\":\"赣州市\",\n\"360800\":\"吉安市\",\n\"360900\":\"宜春市\",\n\"361000\":\"抚州市\",\n\"361100\":\"上饶市\",\n\"370100\":\"济南市\",\n\"370200\":\"青岛市\",\n\"370300\":\"淄博市\",\n\"370400\":\"枣庄市\",\n\"370500\":\"东营市\",\n\"370600\":\"烟台市\",\n\"370700\":\"潍坊市\",\n\"370800\":\"济宁市\",\n\"370900\":\"泰安市\",\n\"371000\":\"威海市\",\n\"371100\":\"日照市\",\n\"371300\":\"临沂市\",\n\"371400\":\"德州市\",\n\"371500\":\"聊城市\",\n\"371600\":\"滨州市\",\n\"371700\":\"菏泽市\",\n\"410100\":\"郑州市\",\n\"410200\":\"开封市\",\n\"410300\":\"洛阳市\",\n\"410400\":\"平顶山市\",\n\"410500\":\"安阳市\",\n\"410600\":\"鹤壁市\",\n\"410700\":\"新乡市\",\n\"410800\":\"焦作市\",\n\"410900\":\"濮阳市\",\n\"411000\":\"许昌市\",\n\"411100\":\"漯河市\",\n\"411200\":\"三门峡市\",\n\"411300\":\"南阳市\",\n\"411400\":\"商丘市\",\n\"411500\":\"信阳市\",\n\"411600\":\"周口市\",\n\"411700\":\"驻马店市\",\n\"419000\":\"省直辖县\",\n\"420100\":\"武汉市\",\n\"420200\":\"黄石市\",\n\"420300\":\"十堰市\",\n\"420500\":\"宜昌市\",\n\"420600\":\"襄阳市\",\n\"420700\":\"鄂州市\",\n\"420800\":\"荆门市\",\n\"420900\":\"孝感市\",\n\"421000\":\"荆州市\",\n\"421100\":\"黄冈市\",\n\"421200\":\"咸宁市\",\n\"421300\":\"随州市\",\n\"422800\":\"恩施土家族苗族自治州\",\n\"429000\":\"省直辖县\",\n\"430100\":\"长沙市\",\n\"430200\":\"株洲市\",\n\"430300\":\"湘潭市\",\n\"430400\":\"衡阳市\",\n\"430500\":\"邵阳市\",\n\"430600\":\"岳阳市\",\n\"430700\":\"常德市\",\n\"430800\":\"张家界市\",\n\"430900\":\"益阳市\",\n\"431000\":\"郴州市\",\n\"431100\":\"永州市\",\n\"431200\":\"怀化市\",\n\"431300\":\"娄底市\",\n\"433100\":\"湘西土家族苗族自治州\",\n\"440100\":\"广州市\",\n\"440200\":\"韶关市\",\n\"440300\":\"深圳市\",\n\"440400\":\"珠海市\",\n\"440500\":\"汕头市\",\n\"440600\":\"佛山市\",\n\"440700\":\"江门市\",\n\"440800\":\"湛江市\",\n\"440900\":\"茂名市\",\n\"441200\":\"肇庆市\",\n\"441300\":\"惠州市\",\n\"441400\":\"梅州市\",\n\"441500\":\"汕尾市\",\n\"441600\":\"河源市\",\n\"441700\":\"阳江市\",\n\"441800\":\"清远市\",\n\"441900\":\"东莞市\",\n\"442000\":\"中山市\",\n\"445100\":\"潮州市\",\n\"445200\":\"揭阳市\",\n\"445300\":\"云浮市\",\n\"450100\":\"南宁市\",\n\"450200\":\"柳州市\",\n\"450300\":\"桂林市\",\n\"450400\":\"梧州市\",\n\"450500\":\"北海市\",\n\"450600\":\"防城港市\",\n\"450700\":\"钦州市\",\n\"450800\":\"贵港市\",\n\"450900\":\"玉林市\",\n\"451000\":\"百色市\",\n\"451100\":\"贺州市\",\n\"451200\":\"河池市\",\n\"451300\":\"来宾市\",\n\"451400\":\"崇左市\",\n\"460100\":\"海口市\",\n\"460200\":\"三亚市\",\n\"460300\":\"三沙市\",\n\"460400\":\"儋州市\",\n\"469000\":\"省直辖县\",\n\"500100\":\"重庆市\",\n\"500200\":\"县\",\n\"510100\":\"成都市\",\n\"510300\":\"自贡市\",\n\"510400\":\"攀枝花市\",\n\"510500\":\"泸州市\",\n\"510600\":\"德阳市\",\n\"510700\":\"绵阳市\",\n\"510800\":\"广元市\",\n\"510900\":\"遂宁市\",\n\"511000\":\"内江市\",\n\"511100\":\"乐山市\",\n\"511300\":\"南充市\",\n\"511400\":\"眉山市\",\n\"511500\":\"宜宾市\",\n\"511600\":\"广安市\",\n\"511700\":\"达州市\",\n\"511800\":\"雅安市\",\n\"511900\":\"巴中市\",\n\"512000\":\"资阳市\",\n\"513200\":\"阿坝藏族羌族自治州\",\n\"513300\":\"甘孜藏族自治州\",\n\"513400\":\"凉山彝族自治州\",\n\"520100\":\"贵阳市\",\n\"520200\":\"六盘水市\",\n\"520300\":\"遵义市\",\n\"520400\":\"安顺市\",\n\"520500\":\"毕节市\",\n\"520600\":\"铜仁市\",\n\"522300\":\"黔西南布依族苗族自治州\",\n\"522600\":\"黔东南苗族侗族自治州\",\n\"522700\":\"黔南布依族苗族自治州\",\n\"530100\":\"昆明市\",\n\"530300\":\"曲靖市\",\n\"530400\":\"玉溪市\",\n\"530500\":\"保山市\",\n\"530600\":\"昭通市\",\n\"530700\":\"丽江市\",\n\"530800\":\"普洱市\",\n\"530900\":\"临沧市\",\n\"532300\":\"楚雄彝族自治州\",\n\"532500\":\"红河哈尼族彝族自治州\",\n\"532600\":\"文山壮族苗族自治州\",\n\"532800\":\"西双版纳傣族自治州\",\n\"532900\":\"大理白族自治州\",\n\"533100\":\"德宏傣族景颇族自治州\",\n\"533300\":\"怒江傈僳族自治州\",\n\"533400\":\"迪庆藏族自治州\",\n\"540100\":\"拉萨市\",\n\"540200\":\"日喀则市\",\n\"540300\":\"昌都市\",\n\"540400\":\"林芝市\",\n\"540500\":\"山南市\",\n\"540600\":\"那曲市\",\n\"542500\":\"阿里地区\",\n\"610100\":\"西安市\",\n\"610200\":\"铜川市\",\n\"610300\":\"宝鸡市\",\n\"610400\":\"咸阳市\",\n\"610500\":\"渭南市\",\n\"610600\":\"延安市\",\n\"610700\":\"汉中市\",\n\"610800\":\"榆林市\",\n\"610900\":\"安康市\",\n\"611000\":\"商洛市\",\n\"620100\":\"兰州市\",\n\"620200\":\"嘉峪关市\",\n\"620300\":\"金昌市\",\n\"620400\":\"白银市\",\n\"620500\":\"天水市\",\n\"620600\":\"武威市\",\n\"620700\":\"张掖市\",\n\"620800\":\"平凉市\",\n\"620900\":\"酒泉市\",\n\"621000\":\"庆阳市\",\n\"621100\":\"定西市\",\n\"621200\":\"陇南市\",\n\"622900\":\"临夏回族自治州\",\n\"623000\":\"甘南藏族自治州\",\n\"630100\":\"西宁市\",\n\"630200\":\"海东市\",\n\"632200\":\"海北藏族自治州\",\n\"632300\":\"黄南藏族自治州\",\n\"632500\":\"海南藏族自治州\",\n\"632600\":\"果洛藏族自治州\",\n\"632700\":\"玉树藏族自治州\",\n\"632800\":\"海西蒙古族藏族自治州\",\n\"640100\":\"银川市\",\n\"640200\":\"石嘴山市\",\n\"640300\":\"吴忠市\",\n\"640400\":\"固原市\",\n\"640500\":\"中卫市\",\n\"650100\":\"乌鲁木齐市\",\n\"650200\":\"克拉玛依市\",\n\"650400\":\"吐鲁番市\",\n\"650500\":\"哈密市\",\n\"652300\":\"昌吉回族自治州\",\n\"652700\":\"博尔塔拉蒙古自治州\",\n\"652800\":\"巴音郭楞蒙古自治州\",\n\"652900\":\"阿克苏地区\",\n\"653000\":\"克孜勒苏柯尔克孜自治州\",\n\"653100\":\"喀什地区\",\n\"653200\":\"和田地区\",\n\"654000\":\"伊犁哈萨克自治州\",\n\"654200\":\"塔城地区\",\n\"654300\":\"阿勒泰地区\",\n\"659000\":\"自治区直辖县级行政区划\",\n\"710100\":\"台北市\",\n\"710200\":\"高雄市\",\n\"710300\":\"台南市\",\n\"710400\":\"台中市\",\n\"710500\":\"金门县\",\n\"710600\":\"南投县\",\n\"710700\":\"基隆市\",\n\"710800\":\"新竹市\",\n\"710900\":\"嘉义市\",\n\"711100\":\"新北市\",\n\"711200\":\"宜兰县\",\n\"711300\":\"新竹县\",\n\"711400\":\"桃园县\",\n\"711500\":\"苗栗县\",\n\"711700\":\"彰化县\",\n\"711900\":\"嘉义县\",\n\"712100\":\"云林县\",\n\"712400\":\"屏东县\",\n\"712500\":\"台东县\",\n\"712600\":\"花莲县\",\n\"712700\":\"澎湖县\",\n\"712800\":\"连江县\",\n\"810100\":\"香港岛\",\n\"810200\":\"九龙\",\n\"810300\":\"新界\",\n\"820100\":\"澳门半岛\",\n\"820200\":\"离岛\",\n\"900400\":\"阿富汗\",\n\"900800\":\"阿尔巴尼亚\",\n\"901000\":\"南极洲\",\n\"901200\":\"阿尔及利亚\",\n\"901600\":\"美属萨摩亚\",\n\"902000\":\"安道尔\",\n\"902400\":\"安哥拉\",\n\"902800\":\"安提瓜和巴布达\",\n\"903100\":\"阿塞拜疆\",\n\"903200\":\"阿根廷\",\n\"903600\":\"澳大利亚\",\n\"904000\":\"奥地利\",\n\"904400\":\"巴哈马\",\n\"904800\":\"巴林\",\n\"905000\":\"孟加拉\",\n\"905100\":\"亚美尼亚\",\n\"905200\":\"巴巴多斯\",\n\"905600\":\"比利时\",\n\"906000\":\"百慕大\",\n\"906400\":\"不丹\",\n\"906800\":\"玻利维亚\",\n\"907000\":\"波黑\",\n\"907200\":\"博茨瓦纳\",\n\"907400\":\"布韦岛\",\n\"907600\":\"巴西\",\n\"908400\":\"伯利兹\",\n\"908600\":\"英属印度洋领地\",\n\"909000\":\"所罗门群岛\",\n\"909200\":\"英属维尔京群岛\",\n\"909600\":\"文莱\",\n\"910000\":\"保加利亚\",\n\"910400\":\"缅甸\",\n\"910800\":\"布隆迪\",\n\"911200\":\"白俄罗斯\",\n\"911600\":\"柬埔寨\",\n\"912000\":\"喀麦隆\",\n\"912400\":\"加拿大\",\n\"913200\":\"佛得角\",\n\"913600\":\"开曼群岛\",\n\"914000\":\"中非\",\n\"914400\":\"斯里兰卡\",\n\"914800\":\"乍得\",\n\"915200\":\"智利\",\n\"916200\":\"圣诞岛\",\n\"916600\":\"科科斯群岛\",\n\"917000\":\"哥伦比亚\",\n\"917400\":\"科摩罗\",\n\"917500\":\"马约特\",\n\"917800\":\"刚果（布）\",\n\"918000\":\"刚果（金）\",\n\"918400\":\"库克群岛\",\n\"918800\":\"哥斯达黎加\",\n\"919100\":\"克罗地亚\",\n\"919200\":\"古巴\",\n\"919600\":\"塞浦路斯\",\n\"920300\":\"捷克\",\n\"920400\":\"贝宁\",\n\"920800\":\"丹麦\",\n\"921200\":\"多米尼克\",\n\"921400\":\"多米尼加\",\n\"921800\":\"厄瓜多尔\",\n\"922200\":\"萨尔瓦多\",\n\"922600\":\"赤道几内亚\",\n\"923100\":\"埃塞俄比亚\",\n\"923200\":\"厄立特里亚\",\n\"923300\":\"爱沙尼亚\",\n\"923400\":\"法罗群岛\",\n\"923800\":\"马尔维纳斯群岛（福克兰）\",\n\"923900\":\"南乔治亚岛和南桑威奇群岛\",\n\"924200\":\"斐济群岛\",\n\"924600\":\"芬兰\",\n\"924800\":\"奥兰群岛\",\n\"925000\":\"法国\",\n\"925400\":\"法属圭亚那\",\n\"925800\":\"法属波利尼西亚\",\n\"926000\":\"法属南部领地\",\n\"926200\":\"吉布提\",\n\"926600\":\"加蓬\",\n\"926800\":\"格鲁吉亚\",\n\"927000\":\"冈比亚\",\n\"927500\":\"巴勒斯坦\",\n\"927600\":\"德国\",\n\"928800\":\"加纳\",\n\"929200\":\"直布罗陀\",\n\"929600\":\"基里巴斯\",\n\"930000\":\"希腊\",\n\"930400\":\"格陵兰\",\n\"930800\":\"格林纳达\",\n\"931200\":\"瓜德罗普\",\n\"931600\":\"关岛\",\n\"932000\":\"危地马拉\",\n\"932400\":\"几内亚\",\n\"932800\":\"圭亚那\",\n\"933200\":\"海地\",\n\"933400\":\"赫德岛和麦克唐纳群岛\",\n\"933600\":\"梵蒂冈\",\n\"934000\":\"洪都拉斯\",\n\"934800\":\"匈牙利\",\n\"935200\":\"冰岛\",\n\"935600\":\"印度\",\n\"936000\":\"印尼\",\n\"936400\":\"伊朗\",\n\"936800\":\"伊拉克\",\n\"937200\":\"爱尔兰\",\n\"937600\":\"以色列\",\n\"938000\":\"意大利\",\n\"938400\":\"科特迪瓦\",\n\"938800\":\"牙买加\",\n\"939200\":\"日本\",\n\"939800\":\"哈萨克斯坦\",\n\"940000\":\"约旦\",\n\"940400\":\"肯尼亚\",\n\"940800\":\"朝鲜（北朝鲜）\",\n\"941000\":\"韩国\",\n\"941400\":\"科威特\",\n\"941700\":\"吉尔吉斯斯坦\",\n\"941800\":\"老挝\",\n\"942200\":\"黎巴嫩\",\n\"942600\":\"莱索托\",\n\"942800\":\"拉脱维亚\",\n\"943000\":\"利比里亚\",\n\"943400\":\"利比亚\",\n\"943800\":\"列支敦士登\",\n\"944000\":\"立陶宛\",\n\"944200\":\"卢森堡\",\n\"945000\":\"马达加斯加\",\n\"945400\":\"马拉维\",\n\"945800\":\"马来西亚\",\n\"946200\":\"马尔代夫\",\n\"946600\":\"马里\",\n\"947000\":\"马耳他\",\n\"947400\":\"马提尼克\",\n\"947800\":\"毛里塔尼亚\",\n\"948000\":\"毛里求斯\",\n\"948400\":\"墨西哥\",\n\"949200\":\"摩纳哥\",\n\"949600\":\"蒙古国\",\n\"949800\":\"摩尔多瓦\",\n\"949900\":\"黑山\",\n\"950000\":\"蒙塞拉特岛\",\n\"950400\":\"摩洛哥\",\n\"950800\":\"莫桑比克\",\n\"951200\":\"阿曼\",\n\"951600\":\"纳米比亚\",\n\"952000\":\"瑙鲁\",\n\"952400\":\"尼泊尔\",\n\"952800\":\"荷兰\",\n\"953300\":\"阿鲁巴\",\n\"953500\":\"荷兰加勒比区\",\n\"954000\":\"新喀里多尼亚\",\n\"954800\":\"瓦努阿图\",\n\"955400\":\"新西兰\",\n\"955800\":\"尼加拉瓜\",\n\"956200\":\"尼日尔\",\n\"956600\":\"尼日利亚\",\n\"957000\":\"纽埃\",\n\"957400\":\"诺福克岛\",\n\"957800\":\"挪威\",\n\"958000\":\"北马里亚纳群岛\",\n\"958100\":\"美国本土外小岛屿\",\n\"958300\":\"密克罗尼西亚联邦\",\n\"958400\":\"马绍尔群岛\",\n\"958500\":\"帕劳\",\n\"958600\":\"巴基斯坦\",\n\"959100\":\"巴拿马\",\n\"959800\":\"巴布亚新几内亚\",\n\"960000\":\"巴拉圭\",\n\"960400\":\"秘鲁\",\n\"960800\":\"菲律宾\",\n\"961200\":\"皮特凯恩群岛\",\n\"961600\":\"波兰\",\n\"962000\":\"葡萄牙\",\n\"962400\":\"几内亚比绍\",\n\"962600\":\"东帝汶\",\n\"963000\":\"波多黎各\",\n\"963400\":\"卡塔尔\",\n\"963800\":\"留尼汪\",\n\"964200\":\"罗马尼亚\",\n\"964300\":\"俄罗斯\",\n\"964600\":\"卢旺达\",\n\"965200\":\"圣巴泰勒米岛\",\n\"965400\":\"圣赫勒拿\",\n\"965900\":\"圣基茨和尼维斯\",\n\"966000\":\"安圭拉\",\n\"966200\":\"圣卢西亚\",\n\"966300\":\"法属圣马丁\",\n\"966600\":\"圣皮埃尔和密克隆\",\n\"967000\":\"圣文森特和格林纳丁斯\",\n\"967400\":\"圣马力诺\",\n\"967800\":\"圣多美和普林西比\",\n\"968200\":\"沙特阿拉伯\",\n\"968600\":\"塞内加尔\",\n\"968800\":\"塞尔维亚\",\n\"969000\":\"塞舌尔\",\n\"969400\":\"塞拉利昂\",\n\"970200\":\"新加坡\",\n\"970300\":\"斯洛伐克\",\n\"970400\":\"越南\",\n\"970500\":\"斯洛文尼亚\",\n\"970600\":\"索马里\",\n\"971000\":\"南非\",\n\"971600\":\"津巴布韦\",\n\"972400\":\"西班牙\",\n\"972800\":\"南苏丹\",\n\"972900\":\"苏丹\",\n\"973200\":\"西撒哈拉\",\n\"974000\":\"苏里南\",\n\"974400\":\"斯瓦尔巴群岛和扬马延岛\",\n\"974800\":\"斯威士兰\",\n\"975200\":\"瑞典\",\n\"975600\":\"瑞士\",\n\"976000\":\"叙利亚\",\n\"976200\":\"塔吉克斯坦\",\n\"976400\":\"泰国\",\n\"976800\":\"多哥\",\n\"977200\":\"托克劳\",\n\"977600\":\"汤加\",\n\"978000\":\"特立尼达和多巴哥\",\n\"978400\":\"阿联酋\",\n\"978800\":\"突尼斯\",\n\"979200\":\"土耳其\",\n\"979500\":\"土库曼斯坦\",\n\"979600\":\"特克斯和凯科斯群岛\",\n\"979800\":\"图瓦卢\",\n\"980000\":\"乌干达\",\n\"980400\":\"乌克兰\",\n\"980700\":\"马其顿\",\n\"981800\":\"埃及\",\n\"982600\":\"英国\",\n\"983100\":\"根西岛\",\n\"983200\":\"泽西岛\",\n\"983300\":\"马恩岛\",\n\"983400\":\"坦桑尼亚\",\n\"984000\":\"美国\",\n\"985000\":\"美属维尔京群岛\",\n\"985400\":\"布基纳法索\",\n\"985800\":\"乌拉圭\",\n\"986000\":\"乌兹别克斯坦\",\n\"986200\":\"委内瑞拉\",\n\"987600\":\"瓦利斯和富图纳\",\n\"988200\":\"萨摩亚\",\n\"988700\":\"也门\",\n\"989400\":\"赞比亚\"\n},\n\"county_list\":{\n\"110101\":\"东城区\",\n\"110102\":\"西城区\",\n\"110105\":\"朝阳区\",\n\"110106\":\"丰台区\",\n\"110107\":\"石景山区\",\n\"110108\":\"海淀区\",\n\"110109\":\"门头沟区\",\n\"110111\":\"房山区\",\n\"110112\":\"通州区\",\n\"110113\":\"顺义区\",\n\"110114\":\"昌平区\",\n\"110115\":\"大兴区\",\n\"110116\":\"怀柔区\",\n\"110117\":\"平谷区\",\n\"110118\":\"密云区\",\n\"110119\":\"延庆区\",\n\"120101\":\"和平区\",\n\"120102\":\"河东区\",\n\"120103\":\"河西区\",\n\"120104\":\"南开区\",\n\"120105\":\"河北区\",\n\"120106\":\"红桥区\",\n\"120110\":\"东丽区\",\n\"120111\":\"西青区\",\n\"120112\":\"津南区\",\n\"120113\":\"北辰区\",\n\"120114\":\"武清区\",\n\"120115\":\"宝坻区\",\n\"120116\":\"滨海新区\",\n\"120117\":\"宁河区\",\n\"120118\":\"静海区\",\n\"120119\":\"蓟州区\",\n\"130102\":\"长安区\",\n\"130104\":\"桥西区\",\n\"130105\":\"新华区\",\n\"130107\":\"井陉矿区\",\n\"130108\":\"裕华区\",\n\"130109\":\"藁城区\",\n\"130110\":\"鹿泉区\",\n\"130111\":\"栾城区\",\n\"130121\":\"井陉县\",\n\"130123\":\"正定县\",\n\"130125\":\"行唐县\",\n\"130126\":\"灵寿县\",\n\"130127\":\"高邑县\",\n\"130128\":\"深泽县\",\n\"130129\":\"赞皇县\",\n\"130130\":\"无极县\",\n\"130131\":\"平山县\",\n\"130132\":\"元氏县\",\n\"130133\":\"赵县\",\n\"130181\":\"辛集市\",\n\"130183\":\"晋州市\",\n\"130184\":\"新乐市\",\n\"130202\":\"路南区\",\n\"130203\":\"路北区\",\n\"130204\":\"古冶区\",\n\"130205\":\"开平区\",\n\"130207\":\"丰南区\",\n\"130208\":\"丰润区\",\n\"130209\":\"曹妃甸区\",\n\"130224\":\"滦南县\",\n\"130225\":\"乐亭县\",\n\"130227\":\"迁西县\",\n\"130229\":\"玉田县\",\n\"130281\":\"遵化市\",\n\"130283\":\"迁安市\",\n\"130284\":\"滦州市\",\n\"130302\":\"海港区\",\n\"130303\":\"山海关区\",\n\"130304\":\"北戴河区\",\n\"130306\":\"抚宁区\",\n\"130321\":\"青龙满族自治县\",\n\"130322\":\"昌黎县\",\n\"130324\":\"卢龙县\",\n\"130390\":\"经济技术开发区\",\n\"130402\":\"邯山区\",\n\"130403\":\"丛台区\",\n\"130404\":\"复兴区\",\n\"130406\":\"峰峰矿区\",\n\"130407\":\"肥乡区\",\n\"130408\":\"永年区\",\n\"130423\":\"临漳县\",\n\"130424\":\"成安县\",\n\"130425\":\"大名县\",\n\"130426\":\"涉县\",\n\"130427\":\"磁县\",\n\"130430\":\"邱县\",\n\"130431\":\"鸡泽县\",\n\"130432\":\"广平县\",\n\"130433\":\"馆陶县\",\n\"130434\":\"魏县\",\n\"130435\":\"曲周县\",\n\"130481\":\"武安市\",\n\"130502\":\"桥东区\",\n\"130503\":\"桥西区\",\n\"130521\":\"邢台县\",\n\"130522\":\"临城县\",\n\"130523\":\"内丘县\",\n\"130524\":\"柏乡县\",\n\"130525\":\"隆尧县\",\n\"130526\":\"任县\",\n\"130527\":\"南和县\",\n\"130528\":\"宁晋县\",\n\"130529\":\"巨鹿县\",\n\"130530\":\"新河县\",\n\"130531\":\"广宗县\",\n\"130532\":\"平乡县\",\n\"130533\":\"威县\",\n\"130534\":\"清河县\",\n\"130535\":\"临西县\",\n\"130581\":\"南宫市\",\n\"130582\":\"沙河市\",\n\"130602\":\"竞秀区\",\n\"130606\":\"莲池区\",\n\"130607\":\"满城区\",\n\"130608\":\"清苑区\",\n\"130609\":\"徐水区\",\n\"130623\":\"涞水县\",\n\"130624\":\"阜平县\",\n\"130626\":\"定兴县\",\n\"130627\":\"唐县\",\n\"130628\":\"高阳县\",\n\"130629\":\"容城县\",\n\"130630\":\"涞源县\",\n\"130631\":\"望都县\",\n\"130632\":\"安新县\",\n\"130633\":\"易县\",\n\"130634\":\"曲阳县\",\n\"130635\":\"蠡县\",\n\"130636\":\"顺平县\",\n\"130637\":\"博野县\",\n\"130638\":\"雄县\",\n\"130681\":\"涿州市\",\n\"130682\":\"定州市\",\n\"130683\":\"安国市\",\n\"130684\":\"高碑店市\",\n\"130702\":\"桥东区\",\n\"130703\":\"桥西区\",\n\"130705\":\"宣化区\",\n\"130706\":\"下花园区\",\n\"130708\":\"万全区\",\n\"130709\":\"崇礼区\",\n\"130722\":\"张北县\",\n\"130723\":\"康保县\",\n\"130724\":\"沽源县\",\n\"130725\":\"尚义县\",\n\"130726\":\"蔚县\",\n\"130727\":\"阳原县\",\n\"130728\":\"怀安县\",\n\"130730\":\"怀来县\",\n\"130731\":\"涿鹿县\",\n\"130732\":\"赤城县\",\n\"130802\":\"双桥区\",\n\"130803\":\"双滦区\",\n\"130804\":\"鹰手营子矿区\",\n\"130821\":\"承德县\",\n\"130822\":\"兴隆县\",\n\"130824\":\"滦平县\",\n\"130825\":\"隆化县\",\n\"130826\":\"丰宁满族自治县\",\n\"130827\":\"宽城满族自治县\",\n\"130828\":\"围场满族蒙古族自治县\",\n\"130881\":\"平泉市\",\n\"130902\":\"新华区\",\n\"130903\":\"运河区\",\n\"130921\":\"沧县\",\n\"130922\":\"青县\",\n\"130923\":\"东光县\",\n\"130924\":\"海兴县\",\n\"130925\":\"盐山县\",\n\"130926\":\"肃宁县\",\n\"130927\":\"南皮县\",\n\"130928\":\"吴桥县\",\n\"130929\":\"献县\",\n\"130930\":\"孟村回族自治县\",\n\"130981\":\"泊头市\",\n\"130982\":\"任丘市\",\n\"130983\":\"黄骅市\",\n\"130984\":\"河间市\",\n\"131002\":\"安次区\",\n\"131003\":\"广阳区\",\n\"131022\":\"固安县\",\n\"131023\":\"永清县\",\n\"131024\":\"香河县\",\n\"131025\":\"大城县\",\n\"131026\":\"文安县\",\n\"131028\":\"大厂回族自治县\",\n\"131081\":\"霸州市\",\n\"131082\":\"三河市\",\n\"131090\":\"开发区\",\n\"131102\":\"桃城区\",\n\"131103\":\"冀州区\",\n\"131121\":\"枣强县\",\n\"131122\":\"武邑县\",\n\"131123\":\"武强县\",\n\"131124\":\"饶阳县\",\n\"131125\":\"安平县\",\n\"131126\":\"故城县\",\n\"131127\":\"景县\",\n\"131128\":\"阜城县\",\n\"131182\":\"深州市\",\n\"140105\":\"小店区\",\n\"140106\":\"迎泽区\",\n\"140107\":\"杏花岭区\",\n\"140108\":\"尖草坪区\",\n\"140109\":\"万柏林区\",\n\"140110\":\"晋源区\",\n\"140121\":\"清徐县\",\n\"140122\":\"阳曲县\",\n\"140123\":\"娄烦县\",\n\"140181\":\"古交市\",\n\"140212\":\"新荣区\",\n\"140213\":\"平城区\",\n\"140214\":\"云冈区\",\n\"140215\":\"云州区\",\n\"140221\":\"阳高县\",\n\"140222\":\"天镇县\",\n\"140223\":\"广灵县\",\n\"140224\":\"灵丘县\",\n\"140225\":\"浑源县\",\n\"140226\":\"左云县\",\n\"140302\":\"城区\",\n\"140303\":\"矿区\",\n\"140311\":\"郊区\",\n\"140321\":\"平定县\",\n\"140322\":\"盂县\",\n\"140403\":\"潞州区\",\n\"140404\":\"上党区\",\n\"140405\":\"屯留区\",\n\"140406\":\"潞城区\",\n\"140423\":\"襄垣县\",\n\"140425\":\"平顺县\",\n\"140426\":\"黎城县\",\n\"140427\":\"壶关县\",\n\"140428\":\"长子县\",\n\"140429\":\"武乡县\",\n\"140430\":\"沁县\",\n\"140431\":\"沁源县\",\n\"140502\":\"城区\",\n\"140521\":\"沁水县\",\n\"140522\":\"阳城县\",\n\"140524\":\"陵川县\",\n\"140525\":\"泽州县\",\n\"140581\":\"高平市\",\n\"140602\":\"朔城区\",\n\"140603\":\"平鲁区\",\n\"140621\":\"山阴县\",\n\"140622\":\"应县\",\n\"140623\":\"右玉县\",\n\"140681\":\"怀仁市\",\n\"140702\":\"榆次区\",\n\"140721\":\"榆社县\",\n\"140722\":\"左权县\",\n\"140723\":\"和顺县\",\n\"140724\":\"昔阳县\",\n\"140725\":\"寿阳县\",\n\"140726\":\"太谷县\",\n\"140727\":\"祁县\",\n\"140728\":\"平遥县\",\n\"140729\":\"灵石县\",\n\"140781\":\"介休市\",\n\"140802\":\"盐湖区\",\n\"140821\":\"临猗县\",\n\"140822\":\"万荣县\",\n\"140823\":\"闻喜县\",\n\"140824\":\"稷山县\",\n\"140825\":\"新绛县\",\n\"140826\":\"绛县\",\n\"140827\":\"垣曲县\",\n\"140828\":\"夏县\",\n\"140829\":\"平陆县\",\n\"140830\":\"芮城县\",\n\"140881\":\"永济市\",\n\"140882\":\"河津市\",\n\"140902\":\"忻府区\",\n\"140921\":\"定襄县\",\n\"140922\":\"五台县\",\n\"140923\":\"代县\",\n\"140924\":\"繁峙县\",\n\"140925\":\"宁武县\",\n\"140926\":\"静乐县\",\n\"140927\":\"神池县\",\n\"140928\":\"五寨县\",\n\"140929\":\"岢岚县\",\n\"140930\":\"河曲县\",\n\"140931\":\"保德县\",\n\"140932\":\"偏关县\",\n\"140981\":\"原平市\",\n\"141002\":\"尧都区\",\n\"141021\":\"曲沃县\",\n\"141022\":\"翼城县\",\n\"141023\":\"襄汾县\",\n\"141024\":\"洪洞县\",\n\"141025\":\"古县\",\n\"141026\":\"安泽县\",\n\"141027\":\"浮山县\",\n\"141028\":\"吉县\",\n\"141029\":\"乡宁县\",\n\"141030\":\"大宁县\",\n\"141031\":\"隰县\",\n\"141032\":\"永和县\",\n\"141033\":\"蒲县\",\n\"141034\":\"汾西县\",\n\"141081\":\"侯马市\",\n\"141082\":\"霍州市\",\n\"141102\":\"离石区\",\n\"141121\":\"文水县\",\n\"141122\":\"交城县\",\n\"141123\":\"兴县\",\n\"141124\":\"临县\",\n\"141125\":\"柳林县\",\n\"141126\":\"石楼县\",\n\"141127\":\"岚县\",\n\"141128\":\"方山县\",\n\"141129\":\"中阳县\",\n\"141130\":\"交口县\",\n\"141181\":\"孝义市\",\n\"141182\":\"汾阳市\",\n\"150102\":\"新城区\",\n\"150103\":\"回民区\",\n\"150104\":\"玉泉区\",\n\"150105\":\"赛罕区\",\n\"150121\":\"土默特左旗\",\n\"150122\":\"托克托县\",\n\"150123\":\"和林格尔县\",\n\"150124\":\"清水河县\",\n\"150125\":\"武川县\",\n\"150202\":\"东河区\",\n\"150203\":\"昆都仑区\",\n\"150204\":\"青山区\",\n\"150205\":\"石拐区\",\n\"150206\":\"白云鄂博矿区\",\n\"150207\":\"九原区\",\n\"150221\":\"土默特右旗\",\n\"150222\":\"固阳县\",\n\"150223\":\"达尔罕茂明安联合旗\",\n\"150302\":\"海勃湾区\",\n\"150303\":\"海南区\",\n\"150304\":\"乌达区\",\n\"150402\":\"红山区\",\n\"150403\":\"元宝山区\",\n\"150404\":\"松山区\",\n\"150421\":\"阿鲁科尔沁旗\",\n\"150422\":\"巴林左旗\",\n\"150423\":\"巴林右旗\",\n\"150424\":\"林西县\",\n\"150425\":\"克什克腾旗\",\n\"150426\":\"翁牛特旗\",\n\"150428\":\"喀喇沁旗\",\n\"150429\":\"宁城县\",\n\"150430\":\"敖汉旗\",\n\"150502\":\"科尔沁区\",\n\"150521\":\"科尔沁左翼中旗\",\n\"150522\":\"科尔沁左翼后旗\",\n\"150523\":\"开鲁县\",\n\"150524\":\"库伦旗\",\n\"150525\":\"奈曼旗\",\n\"150526\":\"扎鲁特旗\",\n\"150581\":\"霍林郭勒市\",\n\"150602\":\"东胜区\",\n\"150603\":\"康巴什区\",\n\"150621\":\"达拉特旗\",\n\"150622\":\"准格尔旗\",\n\"150623\":\"鄂托克前旗\",\n\"150624\":\"鄂托克旗\",\n\"150625\":\"杭锦旗\",\n\"150626\":\"乌审旗\",\n\"150627\":\"伊金霍洛旗\",\n\"150702\":\"海拉尔区\",\n\"150703\":\"扎赉诺尔区\",\n\"150721\":\"阿荣旗\",\n\"150722\":\"莫力达瓦达斡尔族自治旗\",\n\"150723\":\"鄂伦春自治旗\",\n\"150724\":\"鄂温克族自治旗\",\n\"150725\":\"陈巴尔虎旗\",\n\"150726\":\"新巴尔虎左旗\",\n\"150727\":\"新巴尔虎右旗\",\n\"150781\":\"满洲里市\",\n\"150782\":\"牙克石市\",\n\"150783\":\"扎兰屯市\",\n\"150784\":\"额尔古纳市\",\n\"150785\":\"根河市\",\n\"150802\":\"临河区\",\n\"150821\":\"五原县\",\n\"150822\":\"磴口县\",\n\"150823\":\"乌拉特前旗\",\n\"150824\":\"乌拉特中旗\",\n\"150825\":\"乌拉特后旗\",\n\"150826\":\"杭锦后旗\",\n\"150902\":\"集宁区\",\n\"150921\":\"卓资县\",\n\"150922\":\"化德县\",\n\"150923\":\"商都县\",\n\"150924\":\"兴和县\",\n\"150925\":\"凉城县\",\n\"150926\":\"察哈尔右翼前旗\",\n\"150927\":\"察哈尔右翼中旗\",\n\"150928\":\"察哈尔右翼后旗\",\n\"150929\":\"四子王旗\",\n\"150981\":\"丰镇市\",\n\"152201\":\"乌兰浩特市\",\n\"152202\":\"阿尔山市\",\n\"152221\":\"科尔沁右翼前旗\",\n\"152222\":\"科尔沁右翼中旗\",\n\"152223\":\"扎赉特旗\",\n\"152224\":\"突泉县\",\n\"152501\":\"二连浩特市\",\n\"152502\":\"锡林浩特市\",\n\"152522\":\"阿巴嘎旗\",\n\"152523\":\"苏尼特左旗\",\n\"152524\":\"苏尼特右旗\",\n\"152525\":\"东乌珠穆沁旗\",\n\"152526\":\"西乌珠穆沁旗\",\n\"152527\":\"太仆寺旗\",\n\"152528\":\"镶黄旗\",\n\"152529\":\"正镶白旗\",\n\"152530\":\"正蓝旗\",\n\"152531\":\"多伦县\",\n\"152921\":\"阿拉善左旗\",\n\"152922\":\"阿拉善右旗\",\n\"152923\":\"额济纳旗\",\n\"210102\":\"和平区\",\n\"210103\":\"沈河区\",\n\"210104\":\"大东区\",\n\"210105\":\"皇姑区\",\n\"210106\":\"铁西区\",\n\"210111\":\"苏家屯区\",\n\"210112\":\"浑南区\",\n\"210113\":\"沈北新区\",\n\"210114\":\"于洪区\",\n\"210115\":\"辽中区\",\n\"210123\":\"康平县\",\n\"210124\":\"法库县\",\n\"210181\":\"新民市\",\n\"210190\":\"经济技术开发区\",\n\"210202\":\"中山区\",\n\"210203\":\"西岗区\",\n\"210204\":\"沙河口区\",\n\"210211\":\"甘井子区\",\n\"210212\":\"旅顺口区\",\n\"210213\":\"金州区\",\n\"210214\":\"普兰店区\",\n\"210224\":\"长海县\",\n\"210281\":\"瓦房店市\",\n\"210283\":\"庄河市\",\n\"210302\":\"铁东区\",\n\"210303\":\"铁西区\",\n\"210304\":\"立山区\",\n\"210311\":\"千山区\",\n\"210321\":\"台安县\",\n\"210323\":\"岫岩满族自治县\",\n\"210381\":\"海城市\",\n\"210390\":\"高新区\",\n\"210402\":\"新抚区\",\n\"210403\":\"东洲区\",\n\"210404\":\"望花区\",\n\"210411\":\"顺城区\",\n\"210421\":\"抚顺县\",\n\"210422\":\"新宾满族自治县\",\n\"210423\":\"清原满族自治县\",\n\"210502\":\"平山区\",\n\"210503\":\"溪湖区\",\n\"210504\":\"明山区\",\n\"210505\":\"南芬区\",\n\"210521\":\"本溪满族自治县\",\n\"210522\":\"桓仁满族自治县\",\n\"210602\":\"元宝区\",\n\"210603\":\"振兴区\",\n\"210604\":\"振安区\",\n\"210624\":\"宽甸满族自治县\",\n\"210681\":\"东港市\",\n\"210682\":\"凤城市\",\n\"210702\":\"古塔区\",\n\"210703\":\"凌河区\",\n\"210711\":\"太和区\",\n\"210726\":\"黑山县\",\n\"210727\":\"义县\",\n\"210781\":\"凌海市\",\n\"210782\":\"北镇市\",\n\"210793\":\"经济技术开发区\",\n\"210802\":\"站前区\",\n\"210803\":\"西市区\",\n\"210804\":\"鲅鱼圈区\",\n\"210811\":\"老边区\",\n\"210881\":\"盖州市\",\n\"210882\":\"大石桥市\",\n\"210902\":\"海州区\",\n\"210903\":\"新邱区\",\n\"210904\":\"太平区\",\n\"210905\":\"清河门区\",\n\"210911\":\"细河区\",\n\"210921\":\"阜新蒙古族自治县\",\n\"210922\":\"彰武县\",\n\"211002\":\"白塔区\",\n\"211003\":\"文圣区\",\n\"211004\":\"宏伟区\",\n\"211005\":\"弓长岭区\",\n\"211011\":\"太子河区\",\n\"211021\":\"辽阳县\",\n\"211081\":\"灯塔市\",\n\"211102\":\"双台子区\",\n\"211103\":\"兴隆台区\",\n\"211104\":\"大洼区\",\n\"211122\":\"盘山县\",\n\"211202\":\"银州区\",\n\"211204\":\"清河区\",\n\"211221\":\"铁岭县\",\n\"211223\":\"西丰县\",\n\"211224\":\"昌图县\",\n\"211281\":\"调兵山市\",\n\"211282\":\"开原市\",\n\"211302\":\"双塔区\",\n\"211303\":\"龙城区\",\n\"211321\":\"朝阳县\",\n\"211322\":\"建平县\",\n\"211324\":\"喀喇沁左翼蒙古族自治县\",\n\"211381\":\"北票市\",\n\"211382\":\"凌源市\",\n\"211402\":\"连山区\",\n\"211403\":\"龙港区\",\n\"211404\":\"南票区\",\n\"211421\":\"绥中县\",\n\"211422\":\"建昌县\",\n\"211481\":\"兴城市\",\n\"220102\":\"南关区\",\n\"220103\":\"宽城区\",\n\"220104\":\"朝阳区\",\n\"220105\":\"二道区\",\n\"220106\":\"绿园区\",\n\"220112\":\"双阳区\",\n\"220113\":\"九台区\",\n\"220122\":\"农安县\",\n\"220182\":\"榆树市\",\n\"220183\":\"德惠市\",\n\"220192\":\"经济技术开发区\",\n\"220202\":\"昌邑区\",\n\"220203\":\"龙潭区\",\n\"220204\":\"船营区\",\n\"220211\":\"丰满区\",\n\"220221\":\"永吉县\",\n\"220281\":\"蛟河市\",\n\"220282\":\"桦甸市\",\n\"220283\":\"舒兰市\",\n\"220284\":\"磐石市\",\n\"220302\":\"铁西区\",\n\"220303\":\"铁东区\",\n\"220322\":\"梨树县\",\n\"220323\":\"伊通满族自治县\",\n\"220381\":\"公主岭市\",\n\"220382\":\"双辽市\",\n\"220402\":\"龙山区\",\n\"220403\":\"西安区\",\n\"220421\":\"东丰县\",\n\"220422\":\"东辽县\",\n\"220502\":\"东昌区\",\n\"220503\":\"二道江区\",\n\"220521\":\"通化县\",\n\"220523\":\"辉南县\",\n\"220524\":\"柳河县\",\n\"220581\":\"梅河口市\",\n\"220582\":\"集安市\",\n\"220602\":\"浑江区\",\n\"220605\":\"江源区\",\n\"220621\":\"抚松县\",\n\"220622\":\"靖宇县\",\n\"220623\":\"长白朝鲜族自治县\",\n\"220681\":\"临江市\",\n\"220702\":\"宁江区\",\n\"220721\":\"前郭尔罗斯蒙古族自治县\",\n\"220722\":\"长岭县\",\n\"220723\":\"乾安县\",\n\"220781\":\"扶余市\",\n\"220802\":\"洮北区\",\n\"220821\":\"镇赉县\",\n\"220822\":\"通榆县\",\n\"220881\":\"洮南市\",\n\"220882\":\"大安市\",\n\"222401\":\"延吉市\",\n\"222402\":\"图们市\",\n\"222403\":\"敦化市\",\n\"222404\":\"珲春市\",\n\"222405\":\"龙井市\",\n\"222406\":\"和龙市\",\n\"222424\":\"汪清县\",\n\"222426\":\"安图县\",\n\"230102\":\"道里区\",\n\"230103\":\"南岗区\",\n\"230104\":\"道外区\",\n\"230108\":\"平房区\",\n\"230109\":\"松北区\",\n\"230110\":\"香坊区\",\n\"230111\":\"呼兰区\",\n\"230112\":\"阿城区\",\n\"230113\":\"双城区\",\n\"230123\":\"依兰县\",\n\"230124\":\"方正县\",\n\"230125\":\"宾县\",\n\"230126\":\"巴彦县\",\n\"230127\":\"木兰县\",\n\"230128\":\"通河县\",\n\"230129\":\"延寿县\",\n\"230183\":\"尚志市\",\n\"230184\":\"五常市\",\n\"230202\":\"龙沙区\",\n\"230203\":\"建华区\",\n\"230204\":\"铁锋区\",\n\"230205\":\"昂昂溪区\",\n\"230206\":\"富拉尔基区\",\n\"230207\":\"碾子山区\",\n\"230208\":\"梅里斯达斡尔族区\",\n\"230221\":\"龙江县\",\n\"230223\":\"依安县\",\n\"230224\":\"泰来县\",\n\"230225\":\"甘南县\",\n\"230227\":\"富裕县\",\n\"230229\":\"克山县\",\n\"230230\":\"克东县\",\n\"230231\":\"拜泉县\",\n\"230281\":\"讷河市\",\n\"230302\":\"鸡冠区\",\n\"230303\":\"恒山区\",\n\"230304\":\"滴道区\",\n\"230305\":\"梨树区\",\n\"230306\":\"城子河区\",\n\"230307\":\"麻山区\",\n\"230321\":\"鸡东县\",\n\"230381\":\"虎林市\",\n\"230382\":\"密山市\",\n\"230402\":\"向阳区\",\n\"230403\":\"工农区\",\n\"230404\":\"南山区\",\n\"230405\":\"兴安区\",\n\"230406\":\"东山区\",\n\"230407\":\"兴山区\",\n\"230421\":\"萝北县\",\n\"230422\":\"绥滨县\",\n\"230502\":\"尖山区\",\n\"230503\":\"岭东区\",\n\"230505\":\"四方台区\",\n\"230506\":\"宝山区\",\n\"230521\":\"集贤县\",\n\"230522\":\"友谊县\",\n\"230523\":\"宝清县\",\n\"230524\":\"饶河县\",\n\"230602\":\"萨尔图区\",\n\"230603\":\"龙凤区\",\n\"230604\":\"让胡路区\",\n\"230605\":\"红岗区\",\n\"230606\":\"大同区\",\n\"230621\":\"肇州县\",\n\"230622\":\"肇源县\",\n\"230623\":\"林甸县\",\n\"230624\":\"杜尔伯特蒙古族自治县\",\n\"230702\":\"伊春区\",\n\"230703\":\"南岔区\",\n\"230704\":\"友好区\",\n\"230705\":\"西林区\",\n\"230706\":\"翠峦区\",\n\"230707\":\"新青区\",\n\"230708\":\"美溪区\",\n\"230709\":\"金山屯区\",\n\"230710\":\"五营区\",\n\"230711\":\"乌马河区\",\n\"230712\":\"汤旺河区\",\n\"230713\":\"带岭区\",\n\"230714\":\"乌伊岭区\",\n\"230715\":\"红星区\",\n\"230716\":\"上甘岭区\",\n\"230722\":\"嘉荫县\",\n\"230781\":\"铁力市\",\n\"230803\":\"向阳区\",\n\"230804\":\"前进区\",\n\"230805\":\"东风区\",\n\"230811\":\"郊区\",\n\"230822\":\"桦南县\",\n\"230826\":\"桦川县\",\n\"230828\":\"汤原县\",\n\"230881\":\"同江市\",\n\"230882\":\"富锦市\",\n\"230883\":\"抚远市\",\n\"230902\":\"新兴区\",\n\"230903\":\"桃山区\",\n\"230904\":\"茄子河区\",\n\"230921\":\"勃利县\",\n\"231002\":\"东安区\",\n\"231003\":\"阳明区\",\n\"231004\":\"爱民区\",\n\"231005\":\"西安区\",\n\"231025\":\"林口县\",\n\"231081\":\"绥芬河市\",\n\"231083\":\"海林市\",\n\"231084\":\"宁安市\",\n\"231085\":\"穆棱市\",\n\"231086\":\"东宁市\",\n\"231102\":\"爱辉区\",\n\"231121\":\"嫩江县\",\n\"231123\":\"逊克县\",\n\"231124\":\"孙吴县\",\n\"231181\":\"北安市\",\n\"231182\":\"五大连池市\",\n\"231202\":\"北林区\",\n\"231221\":\"望奎县\",\n\"231222\":\"兰西县\",\n\"231223\":\"青冈县\",\n\"231224\":\"庆安县\",\n\"231225\":\"明水县\",\n\"231226\":\"绥棱县\",\n\"231281\":\"安达市\",\n\"231282\":\"肇东市\",\n\"231283\":\"海伦市\",\n\"232701\":\"漠河市\",\n\"232721\":\"呼玛县\",\n\"232722\":\"塔河县\",\n\"232790\":\"松岭区\",\n\"232791\":\"呼中区\",\n\"232792\":\"加格达奇区\",\n\"232793\":\"新林区\",\n\"310101\":\"黄浦区\",\n\"310104\":\"徐汇区\",\n\"310105\":\"长宁区\",\n\"310106\":\"静安区\",\n\"310107\":\"普陀区\",\n\"310109\":\"虹口区\",\n\"310110\":\"杨浦区\",\n\"310112\":\"闵行区\",\n\"310113\":\"宝山区\",\n\"310114\":\"嘉定区\",\n\"310115\":\"浦东新区\",\n\"310116\":\"金山区\",\n\"310117\":\"松江区\",\n\"310118\":\"青浦区\",\n\"310120\":\"奉贤区\",\n\"310151\":\"崇明区\",\n\"320102\":\"玄武区\",\n\"320104\":\"秦淮区\",\n\"320105\":\"建邺区\",\n\"320106\":\"鼓楼区\",\n\"320111\":\"浦口区\",\n\"320113\":\"栖霞区\",\n\"320114\":\"雨花台区\",\n\"320115\":\"江宁区\",\n\"320116\":\"六合区\",\n\"320117\":\"溧水区\",\n\"320118\":\"高淳区\",\n\"320205\":\"锡山区\",\n\"320206\":\"惠山区\",\n\"320211\":\"滨湖区\",\n\"320213\":\"梁溪区\",\n\"320214\":\"新吴区\",\n\"320281\":\"江阴市\",\n\"320282\":\"宜兴市\",\n\"320302\":\"鼓楼区\",\n\"320303\":\"云龙区\",\n\"320305\":\"贾汪区\",\n\"320311\":\"泉山区\",\n\"320312\":\"铜山区\",\n\"320321\":\"丰县\",\n\"320322\":\"沛县\",\n\"320324\":\"睢宁县\",\n\"320381\":\"新沂市\",\n\"320382\":\"邳州市\",\n\"320391\":\"工业园区\",\n\"320402\":\"天宁区\",\n\"320404\":\"钟楼区\",\n\"320411\":\"新北区\",\n\"320412\":\"武进区\",\n\"320413\":\"金坛区\",\n\"320481\":\"溧阳市\",\n\"320505\":\"虎丘区\",\n\"320506\":\"吴中区\",\n\"320507\":\"相城区\",\n\"320508\":\"姑苏区\",\n\"320509\":\"吴江区\",\n\"320581\":\"常熟市\",\n\"320582\":\"张家港市\",\n\"320583\":\"昆山市\",\n\"320585\":\"太仓市\",\n\"320590\":\"工业园区\",\n\"320591\":\"高新区\",\n\"320602\":\"崇川区\",\n\"320611\":\"港闸区\",\n\"320612\":\"通州区\",\n\"320623\":\"如东县\",\n\"320681\":\"启东市\",\n\"320682\":\"如皋市\",\n\"320684\":\"海门市\",\n\"320685\":\"海安市\",\n\"320691\":\"高新区\",\n\"320703\":\"连云区\",\n\"320706\":\"海州区\",\n\"320707\":\"赣榆区\",\n\"320722\":\"东海县\",\n\"320723\":\"灌云县\",\n\"320724\":\"灌南县\",\n\"320803\":\"淮安区\",\n\"320804\":\"淮阴区\",\n\"320812\":\"清江浦区\",\n\"320813\":\"洪泽区\",\n\"320826\":\"涟水县\",\n\"320830\":\"盱眙县\",\n\"320831\":\"金湖县\",\n\"320890\":\"经济开发区\",\n\"320902\":\"亭湖区\",\n\"320903\":\"盐都区\",\n\"320904\":\"大丰区\",\n\"320921\":\"响水县\",\n\"320922\":\"滨海县\",\n\"320923\":\"阜宁县\",\n\"320924\":\"射阳县\",\n\"320925\":\"建湖县\",\n\"320981\":\"东台市\",\n\"321002\":\"广陵区\",\n\"321003\":\"邗江区\",\n\"321012\":\"江都区\",\n\"321023\":\"宝应县\",\n\"321081\":\"仪征市\",\n\"321084\":\"高邮市\",\n\"321090\":\"经济开发区\",\n\"321102\":\"京口区\",\n\"321111\":\"润州区\",\n\"321112\":\"丹徒区\",\n\"321181\":\"丹阳市\",\n\"321182\":\"扬中市\",\n\"321183\":\"句容市\",\n\"321202\":\"海陵区\",\n\"321203\":\"高港区\",\n\"321204\":\"姜堰区\",\n\"321281\":\"兴化市\",\n\"321282\":\"靖江市\",\n\"321283\":\"泰兴市\",\n\"321302\":\"宿城区\",\n\"321311\":\"宿豫区\",\n\"321322\":\"沭阳县\",\n\"321323\":\"泗阳县\",\n\"321324\":\"泗洪县\",\n\"330102\":\"上城区\",\n\"330103\":\"下城区\",\n\"330104\":\"江干区\",\n\"330105\":\"拱墅区\",\n\"330106\":\"西湖区\",\n\"330108\":\"滨江区\",\n\"330109\":\"萧山区\",\n\"330110\":\"余杭区\",\n\"330111\":\"富阳区\",\n\"330112\":\"临安区\",\n\"330122\":\"桐庐县\",\n\"330127\":\"淳安县\",\n\"330182\":\"建德市\",\n\"330203\":\"海曙区\",\n\"330205\":\"江北区\",\n\"330206\":\"北仑区\",\n\"330211\":\"镇海区\",\n\"330212\":\"鄞州区\",\n\"330213\":\"奉化区\",\n\"330225\":\"象山县\",\n\"330226\":\"宁海县\",\n\"330281\":\"余姚市\",\n\"330282\":\"慈溪市\",\n\"330302\":\"鹿城区\",\n\"330303\":\"龙湾区\",\n\"330304\":\"瓯海区\",\n\"330305\":\"洞头区\",\n\"330324\":\"永嘉县\",\n\"330326\":\"平阳县\",\n\"330327\":\"苍南县\",\n\"330328\":\"文成县\",\n\"330329\":\"泰顺县\",\n\"330381\":\"瑞安市\",\n\"330382\":\"乐清市\",\n\"330402\":\"南湖区\",\n\"330411\":\"秀洲区\",\n\"330421\":\"嘉善县\",\n\"330424\":\"海盐县\",\n\"330481\":\"海宁市\",\n\"330482\":\"平湖市\",\n\"330483\":\"桐乡市\",\n\"330502\":\"吴兴区\",\n\"330503\":\"南浔区\",\n\"330521\":\"德清县\",\n\"330522\":\"长兴县\",\n\"330523\":\"安吉县\",\n\"330602\":\"越城区\",\n\"330603\":\"柯桥区\",\n\"330604\":\"上虞区\",\n\"330624\":\"新昌县\",\n\"330681\":\"诸暨市\",\n\"330683\":\"嵊州市\",\n\"330702\":\"婺城区\",\n\"330703\":\"金东区\",\n\"330723\":\"武义县\",\n\"330726\":\"浦江县\",\n\"330727\":\"磐安县\",\n\"330781\":\"兰溪市\",\n\"330782\":\"义乌市\",\n\"330783\":\"东阳市\",\n\"330784\":\"永康市\",\n\"330802\":\"柯城区\",\n\"330803\":\"衢江区\",\n\"330822\":\"常山县\",\n\"330824\":\"开化县\",\n\"330825\":\"龙游县\",\n\"330881\":\"江山市\",\n\"330902\":\"定海区\",\n\"330903\":\"普陀区\",\n\"330921\":\"岱山县\",\n\"330922\":\"嵊泗县\",\n\"331002\":\"椒江区\",\n\"331003\":\"黄岩区\",\n\"331004\":\"路桥区\",\n\"331022\":\"三门县\",\n\"331023\":\"天台县\",\n\"331024\":\"仙居县\",\n\"331081\":\"温岭市\",\n\"331082\":\"临海市\",\n\"331083\":\"玉环市\",\n\"331102\":\"莲都区\",\n\"331121\":\"青田县\",\n\"331122\":\"缙云县\",\n\"331123\":\"遂昌县\",\n\"331124\":\"松阳县\",\n\"331125\":\"云和县\",\n\"331126\":\"庆元县\",\n\"331127\":\"景宁畲族自治县\",\n\"331181\":\"龙泉市\",\n\"340102\":\"瑶海区\",\n\"340103\":\"庐阳区\",\n\"340104\":\"蜀山区\",\n\"340111\":\"包河区\",\n\"340121\":\"长丰县\",\n\"340122\":\"肥东县\",\n\"340123\":\"肥西县\",\n\"340124\":\"庐江县\",\n\"340181\":\"巢湖市\",\n\"340190\":\"高新技术开发区\",\n\"340191\":\"经济技术开发区\",\n\"340202\":\"镜湖区\",\n\"340203\":\"弋江区\",\n\"340207\":\"鸠江区\",\n\"340208\":\"三山区\",\n\"340221\":\"芜湖县\",\n\"340222\":\"繁昌县\",\n\"340223\":\"南陵县\",\n\"340225\":\"无为县\",\n\"340302\":\"龙子湖区\",\n\"340303\":\"蚌山区\",\n\"340304\":\"禹会区\",\n\"340311\":\"淮上区\",\n\"340321\":\"怀远县\",\n\"340322\":\"五河县\",\n\"340323\":\"固镇县\",\n\"340402\":\"大通区\",\n\"340403\":\"田家庵区\",\n\"340404\":\"谢家集区\",\n\"340405\":\"八公山区\",\n\"340406\":\"潘集区\",\n\"340421\":\"凤台县\",\n\"340422\":\"寿县\",\n\"340503\":\"花山区\",\n\"340504\":\"雨山区\",\n\"340506\":\"博望区\",\n\"340521\":\"当涂县\",\n\"340522\":\"含山县\",\n\"340523\":\"和县\",\n\"340602\":\"杜集区\",\n\"340603\":\"相山区\",\n\"340604\":\"烈山区\",\n\"340621\":\"濉溪县\",\n\"340705\":\"铜官区\",\n\"340706\":\"义安区\",\n\"340711\":\"郊区\",\n\"340722\":\"枞阳县\",\n\"340802\":\"迎江区\",\n\"340803\":\"大观区\",\n\"340811\":\"宜秀区\",\n\"340822\":\"怀宁县\",\n\"340824\":\"潜山县\",\n\"340825\":\"太湖县\",\n\"340826\":\"宿松县\",\n\"340827\":\"望江县\",\n\"340828\":\"岳西县\",\n\"340881\":\"桐城市\",\n\"341002\":\"屯溪区\",\n\"341003\":\"黄山区\",\n\"341004\":\"徽州区\",\n\"341021\":\"歙县\",\n\"341022\":\"休宁县\",\n\"341023\":\"黟县\",\n\"341024\":\"祁门县\",\n\"341102\":\"琅琊区\",\n\"341103\":\"南谯区\",\n\"341122\":\"来安县\",\n\"341124\":\"全椒县\",\n\"341125\":\"定远县\",\n\"341126\":\"凤阳县\",\n\"341181\":\"天长市\",\n\"341182\":\"明光市\",\n\"341202\":\"颍州区\",\n\"341203\":\"颍东区\",\n\"341204\":\"颍泉区\",\n\"341221\":\"临泉县\",\n\"341222\":\"太和县\",\n\"341225\":\"阜南县\",\n\"341226\":\"颍上县\",\n\"341282\":\"界首市\",\n\"341302\":\"埇桥区\",\n\"341321\":\"砀山县\",\n\"341322\":\"萧县\",\n\"341323\":\"灵璧县\",\n\"341324\":\"泗县\",\n\"341390\":\"经济开发区\",\n\"341502\":\"金安区\",\n\"341503\":\"裕安区\",\n\"341504\":\"叶集区\",\n\"341522\":\"霍邱县\",\n\"341523\":\"舒城县\",\n\"341524\":\"金寨县\",\n\"341525\":\"霍山县\",\n\"341602\":\"谯城区\",\n\"341621\":\"涡阳县\",\n\"341622\":\"蒙城县\",\n\"341623\":\"利辛县\",\n\"341702\":\"贵池区\",\n\"341721\":\"东至县\",\n\"341722\":\"石台县\",\n\"341723\":\"青阳县\",\n\"341802\":\"宣州区\",\n\"341821\":\"郎溪县\",\n\"341822\":\"广德县\",\n\"341823\":\"泾县\",\n\"341824\":\"绩溪县\",\n\"341825\":\"旌德县\",\n\"341881\":\"宁国市\",\n\"350102\":\"鼓楼区\",\n\"350103\":\"台江区\",\n\"350104\":\"仓山区\",\n\"350105\":\"马尾区\",\n\"350111\":\"晋安区\",\n\"350112\":\"长乐区\",\n\"350121\":\"闽侯县\",\n\"350122\":\"连江县\",\n\"350123\":\"罗源县\",\n\"350124\":\"闽清县\",\n\"350125\":\"永泰县\",\n\"350128\":\"平潭县\",\n\"350181\":\"福清市\",\n\"350203\":\"思明区\",\n\"350205\":\"海沧区\",\n\"350206\":\"湖里区\",\n\"350211\":\"集美区\",\n\"350212\":\"同安区\",\n\"350213\":\"翔安区\",\n\"350302\":\"城厢区\",\n\"350303\":\"涵江区\",\n\"350304\":\"荔城区\",\n\"350305\":\"秀屿区\",\n\"350322\":\"仙游县\",\n\"350402\":\"梅列区\",\n\"350403\":\"三元区\",\n\"350421\":\"明溪县\",\n\"350423\":\"清流县\",\n\"350424\":\"宁化县\",\n\"350425\":\"大田县\",\n\"350426\":\"尤溪县\",\n\"350427\":\"沙县\",\n\"350428\":\"将乐县\",\n\"350429\":\"泰宁县\",\n\"350430\":\"建宁县\",\n\"350481\":\"永安市\",\n\"350502\":\"鲤城区\",\n\"350503\":\"丰泽区\",\n\"350504\":\"洛江区\",\n\"350505\":\"泉港区\",\n\"350521\":\"惠安县\",\n\"350524\":\"安溪县\",\n\"350525\":\"永春县\",\n\"350526\":\"德化县\",\n\"350527\":\"金门县\",\n\"350581\":\"石狮市\",\n\"350582\":\"晋江市\",\n\"350583\":\"南安市\",\n\"350602\":\"芗城区\",\n\"350603\":\"龙文区\",\n\"350622\":\"云霄县\",\n\"350623\":\"漳浦县\",\n\"350624\":\"诏安县\",\n\"350625\":\"长泰县\",\n\"350626\":\"东山县\",\n\"350627\":\"南靖县\",\n\"350628\":\"平和县\",\n\"350629\":\"华安县\",\n\"350681\":\"龙海市\",\n\"350702\":\"延平区\",\n\"350703\":\"建阳区\",\n\"350721\":\"顺昌县\",\n\"350722\":\"浦城县\",\n\"350723\":\"光泽县\",\n\"350724\":\"松溪县\",\n\"350725\":\"政和县\",\n\"350781\":\"邵武市\",\n\"350782\":\"武夷山市\",\n\"350783\":\"建瓯市\",\n\"350802\":\"新罗区\",\n\"350803\":\"永定区\",\n\"350821\":\"长汀县\",\n\"350823\":\"上杭县\",\n\"350824\":\"武平县\",\n\"350825\":\"连城县\",\n\"350881\":\"漳平市\",\n\"350902\":\"蕉城区\",\n\"350921\":\"霞浦县\",\n\"350922\":\"古田县\",\n\"350923\":\"屏南县\",\n\"350924\":\"寿宁县\",\n\"350925\":\"周宁县\",\n\"350926\":\"柘荣县\",\n\"350981\":\"福安市\",\n\"350982\":\"福鼎市\",\n\"360102\":\"东湖区\",\n\"360103\":\"西湖区\",\n\"360104\":\"青云谱区\",\n\"360105\":\"湾里区\",\n\"360111\":\"青山湖区\",\n\"360112\":\"新建区\",\n\"360121\":\"南昌县\",\n\"360123\":\"安义县\",\n\"360124\":\"进贤县\",\n\"360190\":\"经济技术开发区\",\n\"360192\":\"高新区\",\n\"360202\":\"昌江区\",\n\"360203\":\"珠山区\",\n\"360222\":\"浮梁县\",\n\"360281\":\"乐平市\",\n\"360302\":\"安源区\",\n\"360313\":\"湘东区\",\n\"360321\":\"莲花县\",\n\"360322\":\"上栗县\",\n\"360323\":\"芦溪县\",\n\"360402\":\"濂溪区\",\n\"360403\":\"浔阳区\",\n\"360404\":\"柴桑区\",\n\"360423\":\"武宁县\",\n\"360424\":\"修水县\",\n\"360425\":\"永修县\",\n\"360426\":\"德安县\",\n\"360428\":\"都昌县\",\n\"360429\":\"湖口县\",\n\"360430\":\"彭泽县\",\n\"360481\":\"瑞昌市\",\n\"360482\":\"共青城市\",\n\"360483\":\"庐山市\",\n\"360490\":\"经济技术开发区\",\n\"360502\":\"渝水区\",\n\"360521\":\"分宜县\",\n\"360602\":\"月湖区\",\n\"360603\":\"余江区\",\n\"360681\":\"贵溪市\",\n\"360702\":\"章贡区\",\n\"360703\":\"南康区\",\n\"360704\":\"赣县区\",\n\"360722\":\"信丰县\",\n\"360723\":\"大余县\",\n\"360724\":\"上犹县\",\n\"360725\":\"崇义县\",\n\"360726\":\"安远县\",\n\"360727\":\"龙南县\",\n\"360728\":\"定南县\",\n\"360729\":\"全南县\",\n\"360730\":\"宁都县\",\n\"360731\":\"于都县\",\n\"360732\":\"兴国县\",\n\"360733\":\"会昌县\",\n\"360734\":\"寻乌县\",\n\"360735\":\"石城县\",\n\"360781\":\"瑞金市\",\n\"360802\":\"吉州区\",\n\"360803\":\"青原区\",\n\"360821\":\"吉安县\",\n\"360822\":\"吉水县\",\n\"360823\":\"峡江县\",\n\"360824\":\"新干县\",\n\"360825\":\"永丰县\",\n\"360826\":\"泰和县\",\n\"360827\":\"遂川县\",\n\"360828\":\"万安县\",\n\"360829\":\"安福县\",\n\"360830\":\"永新县\",\n\"360881\":\"井冈山市\",\n\"360902\":\"袁州区\",\n\"360921\":\"奉新县\",\n\"360922\":\"万载县\",\n\"360923\":\"上高县\",\n\"360924\":\"宜丰县\",\n\"360925\":\"靖安县\",\n\"360926\":\"铜鼓县\",\n\"360981\":\"丰城市\",\n\"360982\":\"樟树市\",\n\"360983\":\"高安市\",\n\"361002\":\"临川区\",\n\"361003\":\"东乡区\",\n\"361021\":\"南城县\",\n\"361022\":\"黎川县\",\n\"361023\":\"南丰县\",\n\"361024\":\"崇仁县\",\n\"361025\":\"乐安县\",\n\"361026\":\"宜黄县\",\n\"361027\":\"金溪县\",\n\"361028\":\"资溪县\",\n\"361030\":\"广昌县\",\n\"361102\":\"信州区\",\n\"361103\":\"广丰区\",\n\"361121\":\"上饶县\",\n\"361123\":\"玉山县\",\n\"361124\":\"铅山县\",\n\"361125\":\"横峰县\",\n\"361126\":\"弋阳县\",\n\"361127\":\"余干县\",\n\"361128\":\"鄱阳县\",\n\"361129\":\"万年县\",\n\"361130\":\"婺源县\",\n\"361181\":\"德兴市\",\n\"370102\":\"历下区\",\n\"370103\":\"市中区\",\n\"370104\":\"槐荫区\",\n\"370105\":\"天桥区\",\n\"370112\":\"历城区\",\n\"370113\":\"长清区\",\n\"370114\":\"章丘区\",\n\"370115\":\"济阳区\",\n\"370116\":\"莱芜区\",\n\"370117\":\"钢城区\",\n\"370124\":\"平阴县\",\n\"370126\":\"商河县\",\n\"370190\":\"高新区\",\n\"370202\":\"市南区\",\n\"370203\":\"市北区\",\n\"370211\":\"黄岛区\",\n\"370212\":\"崂山区\",\n\"370213\":\"李沧区\",\n\"370214\":\"城阳区\",\n\"370215\":\"即墨区\",\n\"370281\":\"胶州市\",\n\"370283\":\"平度市\",\n\"370285\":\"莱西市\",\n\"370290\":\"开发区\",\n\"370302\":\"淄川区\",\n\"370303\":\"张店区\",\n\"370304\":\"博山区\",\n\"370305\":\"临淄区\",\n\"370306\":\"周村区\",\n\"370321\":\"桓台县\",\n\"370322\":\"高青县\",\n\"370323\":\"沂源县\",\n\"370402\":\"市中区\",\n\"370403\":\"薛城区\",\n\"370404\":\"峄城区\",\n\"370405\":\"台儿庄区\",\n\"370406\":\"山亭区\",\n\"370481\":\"滕州市\",\n\"370502\":\"东营区\",\n\"370503\":\"河口区\",\n\"370505\":\"垦利区\",\n\"370522\":\"利津县\",\n\"370523\":\"广饶县\",\n\"370602\":\"芝罘区\",\n\"370611\":\"福山区\",\n\"370612\":\"牟平区\",\n\"370613\":\"莱山区\",\n\"370634\":\"长岛县\",\n\"370681\":\"龙口市\",\n\"370682\":\"莱阳市\",\n\"370683\":\"莱州市\",\n\"370684\":\"蓬莱市\",\n\"370685\":\"招远市\",\n\"370686\":\"栖霞市\",\n\"370687\":\"海阳市\",\n\"370690\":\"开发区\",\n\"370702\":\"潍城区\",\n\"370703\":\"寒亭区\",\n\"370704\":\"坊子区\",\n\"370705\":\"奎文区\",\n\"370724\":\"临朐县\",\n\"370725\":\"昌乐县\",\n\"370781\":\"青州市\",\n\"370782\":\"诸城市\",\n\"370783\":\"寿光市\",\n\"370784\":\"安丘市\",\n\"370785\":\"高密市\",\n\"370786\":\"昌邑市\",\n\"370790\":\"开发区\",\n\"370791\":\"高新区\",\n\"370811\":\"任城区\",\n\"370812\":\"兖州区\",\n\"370826\":\"微山县\",\n\"370827\":\"鱼台县\",\n\"370828\":\"金乡县\",\n\"370829\":\"嘉祥县\",\n\"370830\":\"汶上县\",\n\"370831\":\"泗水县\",\n\"370832\":\"梁山县\",\n\"370881\":\"曲阜市\",\n\"370883\":\"邹城市\",\n\"370890\":\"高新区\",\n\"370902\":\"泰山区\",\n\"370911\":\"岱岳区\",\n\"370921\":\"宁阳县\",\n\"370923\":\"东平县\",\n\"370982\":\"新泰市\",\n\"370983\":\"肥城市\",\n\"371002\":\"环翠区\",\n\"371003\":\"文登区\",\n\"371082\":\"荣成市\",\n\"371083\":\"乳山市\",\n\"371091\":\"经济技术开发区\",\n\"371102\":\"东港区\",\n\"371103\":\"岚山区\",\n\"371121\":\"五莲县\",\n\"371122\":\"莒县\",\n\"371302\":\"兰山区\",\n\"371311\":\"罗庄区\",\n\"371312\":\"河东区\",\n\"371321\":\"沂南县\",\n\"371322\":\"郯城县\",\n\"371323\":\"沂水县\",\n\"371324\":\"兰陵县\",\n\"371325\":\"费县\",\n\"371326\":\"平邑县\",\n\"371327\":\"莒南县\",\n\"371328\":\"蒙阴县\",\n\"371329\":\"临沭县\",\n\"371402\":\"德城区\",\n\"371403\":\"陵城区\",\n\"371422\":\"宁津县\",\n\"371423\":\"庆云县\",\n\"371424\":\"临邑县\",\n\"371425\":\"齐河县\",\n\"371426\":\"平原县\",\n\"371427\":\"夏津县\",\n\"371428\":\"武城县\",\n\"371481\":\"乐陵市\",\n\"371482\":\"禹城市\",\n\"371502\":\"东昌府区\",\n\"371521\":\"阳谷县\",\n\"371522\":\"莘县\",\n\"371523\":\"茌平县\",\n\"371524\":\"东阿县\",\n\"371525\":\"冠县\",\n\"371526\":\"高唐县\",\n\"371581\":\"临清市\",\n\"371602\":\"滨城区\",\n\"371603\":\"沾化区\",\n\"371621\":\"惠民县\",\n\"371622\":\"阳信县\",\n\"371623\":\"无棣县\",\n\"371625\":\"博兴县\",\n\"371681\":\"邹平市\",\n\"371702\":\"牡丹区\",\n\"371703\":\"定陶区\",\n\"371721\":\"曹县\",\n\"371722\":\"单县\",\n\"371723\":\"成武县\",\n\"371724\":\"巨野县\",\n\"371725\":\"郓城县\",\n\"371726\":\"鄄城县\",\n\"371728\":\"东明县\",\n\"410102\":\"中原区\",\n\"410103\":\"二七区\",\n\"410104\":\"管城回族区\",\n\"410105\":\"金水区\",\n\"410106\":\"上街区\",\n\"410108\":\"惠济区\",\n\"410122\":\"中牟县\",\n\"410181\":\"巩义市\",\n\"410182\":\"荥阳市\",\n\"410183\":\"新密市\",\n\"410184\":\"新郑市\",\n\"410185\":\"登封市\",\n\"410190\":\"高新技术开发区\",\n\"410191\":\"经济技术开发区\",\n\"410202\":\"龙亭区\",\n\"410203\":\"顺河回族区\",\n\"410204\":\"鼓楼区\",\n\"410205\":\"禹王台区\",\n\"410212\":\"祥符区\",\n\"410221\":\"杞县\",\n\"410222\":\"通许县\",\n\"410223\":\"尉氏县\",\n\"410225\":\"兰考县\",\n\"410302\":\"老城区\",\n\"410303\":\"西工区\",\n\"410304\":\"瀍河回族区\",\n\"410305\":\"涧西区\",\n\"410306\":\"吉利区\",\n\"410311\":\"洛龙区\",\n\"410322\":\"孟津县\",\n\"410323\":\"新安县\",\n\"410324\":\"栾川县\",\n\"410325\":\"嵩县\",\n\"410326\":\"汝阳县\",\n\"410327\":\"宜阳县\",\n\"410328\":\"洛宁县\",\n\"410329\":\"伊川县\",\n\"410381\":\"偃师市\",\n\"410402\":\"新华区\",\n\"410403\":\"卫东区\",\n\"410404\":\"石龙区\",\n\"410411\":\"湛河区\",\n\"410421\":\"宝丰县\",\n\"410422\":\"叶县\",\n\"410423\":\"鲁山县\",\n\"410425\":\"郏县\",\n\"410481\":\"舞钢市\",\n\"410482\":\"汝州市\",\n\"410502\":\"文峰区\",\n\"410503\":\"北关区\",\n\"410505\":\"殷都区\",\n\"410506\":\"龙安区\",\n\"410522\":\"安阳县\",\n\"410523\":\"汤阴县\",\n\"410526\":\"滑县\",\n\"410527\":\"内黄县\",\n\"410581\":\"林州市\",\n\"410590\":\"开发区\",\n\"410602\":\"鹤山区\",\n\"410603\":\"山城区\",\n\"410611\":\"淇滨区\",\n\"410621\":\"浚县\",\n\"410622\":\"淇县\",\n\"410702\":\"红旗区\",\n\"410703\":\"卫滨区\",\n\"410704\":\"凤泉区\",\n\"410711\":\"牧野区\",\n\"410721\":\"新乡县\",\n\"410724\":\"获嘉县\",\n\"410725\":\"原阳县\",\n\"410726\":\"延津县\",\n\"410727\":\"封丘县\",\n\"410728\":\"长垣县\",\n\"410781\":\"卫辉市\",\n\"410782\":\"辉县市\",\n\"410802\":\"解放区\",\n\"410803\":\"中站区\",\n\"410804\":\"马村区\",\n\"410811\":\"山阳区\",\n\"410821\":\"修武县\",\n\"410822\":\"博爱县\",\n\"410823\":\"武陟县\",\n\"410825\":\"温县\",\n\"410882\":\"沁阳市\",\n\"410883\":\"孟州市\",\n\"410902\":\"华龙区\",\n\"410922\":\"清丰县\",\n\"410923\":\"南乐县\",\n\"410926\":\"范县\",\n\"410927\":\"台前县\",\n\"410928\":\"濮阳县\",\n\"411002\":\"魏都区\",\n\"411003\":\"建安区\",\n\"411024\":\"鄢陵县\",\n\"411025\":\"襄城县\",\n\"411081\":\"禹州市\",\n\"411082\":\"长葛市\",\n\"411102\":\"源汇区\",\n\"411103\":\"郾城区\",\n\"411104\":\"召陵区\",\n\"411121\":\"舞阳县\",\n\"411122\":\"临颍县\",\n\"411202\":\"湖滨区\",\n\"411203\":\"陕州区\",\n\"411221\":\"渑池县\",\n\"411224\":\"卢氏县\",\n\"411281\":\"义马市\",\n\"411282\":\"灵宝市\",\n\"411302\":\"宛城区\",\n\"411303\":\"卧龙区\",\n\"411321\":\"南召县\",\n\"411322\":\"方城县\",\n\"411323\":\"西峡县\",\n\"411324\":\"镇平县\",\n\"411325\":\"内乡县\",\n\"411326\":\"淅川县\",\n\"411327\":\"社旗县\",\n\"411328\":\"唐河县\",\n\"411329\":\"新野县\",\n\"411330\":\"桐柏县\",\n\"411381\":\"邓州市\",\n\"411402\":\"梁园区\",\n\"411403\":\"睢阳区\",\n\"411421\":\"民权县\",\n\"411422\":\"睢县\",\n\"411423\":\"宁陵县\",\n\"411424\":\"柘城县\",\n\"411425\":\"虞城县\",\n\"411426\":\"夏邑县\",\n\"411481\":\"永城市\",\n\"411502\":\"浉河区\",\n\"411503\":\"平桥区\",\n\"411521\":\"罗山县\",\n\"411522\":\"光山县\",\n\"411523\":\"新县\",\n\"411524\":\"商城县\",\n\"411525\":\"固始县\",\n\"411526\":\"潢川县\",\n\"411527\":\"淮滨县\",\n\"411528\":\"息县\",\n\"411602\":\"川汇区\",\n\"411621\":\"扶沟县\",\n\"411622\":\"西华县\",\n\"411623\":\"商水县\",\n\"411624\":\"沈丘县\",\n\"411625\":\"郸城县\",\n\"411626\":\"淮阳县\",\n\"411627\":\"太康县\",\n\"411628\":\"鹿邑县\",\n\"411681\":\"项城市\",\n\"411690\":\"经济开发区\",\n\"411702\":\"驿城区\",\n\"411721\":\"西平县\",\n\"411722\":\"上蔡县\",\n\"411723\":\"平舆县\",\n\"411724\":\"正阳县\",\n\"411725\":\"确山县\",\n\"411726\":\"泌阳县\",\n\"411727\":\"汝南县\",\n\"411728\":\"遂平县\",\n\"411729\":\"新蔡县\",\n\"419001\":\"济源市\",\n\"420102\":\"江岸区\",\n\"420103\":\"江汉区\",\n\"420104\":\"硚口区\",\n\"420105\":\"汉阳区\",\n\"420106\":\"武昌区\",\n\"420107\":\"青山区\",\n\"420111\":\"洪山区\",\n\"420112\":\"东西湖区\",\n\"420113\":\"汉南区\",\n\"420114\":\"蔡甸区\",\n\"420115\":\"江夏区\",\n\"420116\":\"黄陂区\",\n\"420117\":\"新洲区\",\n\"420202\":\"黄石港区\",\n\"420203\":\"西塞山区\",\n\"420204\":\"下陆区\",\n\"420205\":\"铁山区\",\n\"420222\":\"阳新县\",\n\"420281\":\"大冶市\",\n\"420302\":\"茅箭区\",\n\"420303\":\"张湾区\",\n\"420304\":\"郧阳区\",\n\"420322\":\"郧西县\",\n\"420323\":\"竹山县\",\n\"420324\":\"竹溪县\",\n\"420325\":\"房县\",\n\"420381\":\"丹江口市\",\n\"420502\":\"西陵区\",\n\"420503\":\"伍家岗区\",\n\"420504\":\"点军区\",\n\"420505\":\"猇亭区\",\n\"420506\":\"夷陵区\",\n\"420525\":\"远安县\",\n\"420526\":\"兴山县\",\n\"420527\":\"秭归县\",\n\"420528\":\"长阳土家族自治县\",\n\"420529\":\"五峰土家族自治县\",\n\"420581\":\"宜都市\",\n\"420582\":\"当阳市\",\n\"420583\":\"枝江市\",\n\"420590\":\"经济开发区\",\n\"420602\":\"襄城区\",\n\"420606\":\"樊城区\",\n\"420607\":\"襄州区\",\n\"420624\":\"南漳县\",\n\"420625\":\"谷城县\",\n\"420626\":\"保康县\",\n\"420682\":\"老河口市\",\n\"420683\":\"枣阳市\",\n\"420684\":\"宜城市\",\n\"420702\":\"梁子湖区\",\n\"420703\":\"华容区\",\n\"420704\":\"鄂城区\",\n\"420802\":\"东宝区\",\n\"420804\":\"掇刀区\",\n\"420822\":\"沙洋县\",\n\"420881\":\"钟祥市\",\n\"420882\":\"京山市\",\n\"420902\":\"孝南区\",\n\"420921\":\"孝昌县\",\n\"420922\":\"大悟县\",\n\"420923\":\"云梦县\",\n\"420981\":\"应城市\",\n\"420982\":\"安陆市\",\n\"420984\":\"汉川市\",\n\"421002\":\"沙市区\",\n\"421003\":\"荆州区\",\n\"421022\":\"公安县\",\n\"421023\":\"监利县\",\n\"421024\":\"江陵县\",\n\"421081\":\"石首市\",\n\"421083\":\"洪湖市\",\n\"421087\":\"松滋市\",\n\"421102\":\"黄州区\",\n\"421121\":\"团风县\",\n\"421122\":\"红安县\",\n\"421123\":\"罗田县\",\n\"421124\":\"英山县\",\n\"421125\":\"浠水县\",\n\"421126\":\"蕲春县\",\n\"421127\":\"黄梅县\",\n\"421181\":\"麻城市\",\n\"421182\":\"武穴市\",\n\"421202\":\"咸安区\",\n\"421221\":\"嘉鱼县\",\n\"421222\":\"通城县\",\n\"421223\":\"崇阳县\",\n\"421224\":\"通山县\",\n\"421281\":\"赤壁市\",\n\"421303\":\"曾都区\",\n\"421321\":\"随县\",\n\"421381\":\"广水市\",\n\"422801\":\"恩施市\",\n\"422802\":\"利川市\",\n\"422822\":\"建始县\",\n\"422823\":\"巴东县\",\n\"422825\":\"宣恩县\",\n\"422826\":\"咸丰县\",\n\"422827\":\"来凤县\",\n\"422828\":\"鹤峰县\",\n\"429004\":\"仙桃市\",\n\"429005\":\"潜江市\",\n\"429006\":\"天门市\",\n\"429021\":\"神农架林区\",\n\"430102\":\"芙蓉区\",\n\"430103\":\"天心区\",\n\"430104\":\"岳麓区\",\n\"430105\":\"开福区\",\n\"430111\":\"雨花区\",\n\"430112\":\"望城区\",\n\"430121\":\"长沙县\",\n\"430181\":\"浏阳市\",\n\"430182\":\"宁乡市\",\n\"430202\":\"荷塘区\",\n\"430203\":\"芦淞区\",\n\"430204\":\"石峰区\",\n\"430211\":\"天元区\",\n\"430212\":\"渌口区\",\n\"430223\":\"攸县\",\n\"430224\":\"茶陵县\",\n\"430225\":\"炎陵县\",\n\"430281\":\"醴陵市\",\n\"430302\":\"雨湖区\",\n\"430304\":\"岳塘区\",\n\"430321\":\"湘潭县\",\n\"430381\":\"湘乡市\",\n\"430382\":\"韶山市\",\n\"430405\":\"珠晖区\",\n\"430406\":\"雁峰区\",\n\"430407\":\"石鼓区\",\n\"430408\":\"蒸湘区\",\n\"430412\":\"南岳区\",\n\"430421\":\"衡阳县\",\n\"430422\":\"衡南县\",\n\"430423\":\"衡山县\",\n\"430424\":\"衡东县\",\n\"430426\":\"祁东县\",\n\"430481\":\"耒阳市\",\n\"430482\":\"常宁市\",\n\"430502\":\"双清区\",\n\"430503\":\"大祥区\",\n\"430511\":\"北塔区\",\n\"430521\":\"邵东县\",\n\"430522\":\"新邵县\",\n\"430523\":\"邵阳县\",\n\"430524\":\"隆回县\",\n\"430525\":\"洞口县\",\n\"430527\":\"绥宁县\",\n\"430528\":\"新宁县\",\n\"430529\":\"城步苗族自治县\",\n\"430581\":\"武冈市\",\n\"430602\":\"岳阳楼区\",\n\"430603\":\"云溪区\",\n\"430611\":\"君山区\",\n\"430621\":\"岳阳县\",\n\"430623\":\"华容县\",\n\"430624\":\"湘阴县\",\n\"430626\":\"平江县\",\n\"430681\":\"汨罗市\",\n\"430682\":\"临湘市\",\n\"430702\":\"武陵区\",\n\"430703\":\"鼎城区\",\n\"430721\":\"安乡县\",\n\"430722\":\"汉寿县\",\n\"430723\":\"澧县\",\n\"430724\":\"临澧县\",\n\"430725\":\"桃源县\",\n\"430726\":\"石门县\",\n\"430781\":\"津市市\",\n\"430802\":\"永定区\",\n\"430811\":\"武陵源区\",\n\"430821\":\"慈利县\",\n\"430822\":\"桑植县\",\n\"430902\":\"资阳区\",\n\"430903\":\"赫山区\",\n\"430921\":\"南县\",\n\"430922\":\"桃江县\",\n\"430923\":\"安化县\",\n\"430981\":\"沅江市\",\n\"431002\":\"北湖区\",\n\"431003\":\"苏仙区\",\n\"431021\":\"桂阳县\",\n\"431022\":\"宜章县\",\n\"431023\":\"永兴县\",\n\"431024\":\"嘉禾县\",\n\"431025\":\"临武县\",\n\"431026\":\"汝城县\",\n\"431027\":\"桂东县\",\n\"431028\":\"安仁县\",\n\"431081\":\"资兴市\",\n\"431102\":\"零陵区\",\n\"431103\":\"冷水滩区\",\n\"431121\":\"祁阳县\",\n\"431122\":\"东安县\",\n\"431123\":\"双牌县\",\n\"431124\":\"道县\",\n\"431125\":\"江永县\",\n\"431126\":\"宁远县\",\n\"431127\":\"蓝山县\",\n\"431128\":\"新田县\",\n\"431129\":\"江华瑶族自治县\",\n\"431202\":\"鹤城区\",\n\"431221\":\"中方县\",\n\"431222\":\"沅陵县\",\n\"431223\":\"辰溪县\",\n\"431224\":\"溆浦县\",\n\"431225\":\"会同县\",\n\"431226\":\"麻阳苗族自治县\",\n\"431227\":\"新晃侗族自治县\",\n\"431228\":\"芷江侗族自治县\",\n\"431229\":\"靖州苗族侗族自治县\",\n\"431230\":\"通道侗族自治县\",\n\"431281\":\"洪江市\",\n\"431302\":\"娄星区\",\n\"431321\":\"双峰县\",\n\"431322\":\"新化县\",\n\"431381\":\"冷水江市\",\n\"431382\":\"涟源市\",\n\"433101\":\"吉首市\",\n\"433122\":\"泸溪县\",\n\"433123\":\"凤凰县\",\n\"433124\":\"花垣县\",\n\"433125\":\"保靖县\",\n\"433126\":\"古丈县\",\n\"433127\":\"永顺县\",\n\"433130\":\"龙山县\",\n\"440103\":\"荔湾区\",\n\"440104\":\"越秀区\",\n\"440105\":\"海珠区\",\n\"440106\":\"天河区\",\n\"440111\":\"白云区\",\n\"440112\":\"黄埔区\",\n\"440113\":\"番禺区\",\n\"440114\":\"花都区\",\n\"440115\":\"南沙区\",\n\"440117\":\"从化区\",\n\"440118\":\"增城区\",\n\"440203\":\"武江区\",\n\"440204\":\"浈江区\",\n\"440205\":\"曲江区\",\n\"440222\":\"始兴县\",\n\"440224\":\"仁化县\",\n\"440229\":\"翁源县\",\n\"440232\":\"乳源瑶族自治县\",\n\"440233\":\"新丰县\",\n\"440281\":\"乐昌市\",\n\"440282\":\"南雄市\",\n\"440303\":\"罗湖区\",\n\"440304\":\"福田区\",\n\"440305\":\"南山区\",\n\"440306\":\"宝安区\",\n\"440307\":\"龙岗区\",\n\"440308\":\"盐田区\",\n\"440309\":\"龙华区\",\n\"440310\":\"坪山区\",\n\"440311\":\"光明区\",\n\"440402\":\"香洲区\",\n\"440403\":\"斗门区\",\n\"440404\":\"金湾区\",\n\"440507\":\"龙湖区\",\n\"440511\":\"金平区\",\n\"440512\":\"濠江区\",\n\"440513\":\"潮阳区\",\n\"440514\":\"潮南区\",\n\"440515\":\"澄海区\",\n\"440523\":\"南澳县\",\n\"440604\":\"禅城区\",\n\"440605\":\"南海区\",\n\"440606\":\"顺德区\",\n\"440607\":\"三水区\",\n\"440608\":\"高明区\",\n\"440703\":\"蓬江区\",\n\"440704\":\"江海区\",\n\"440705\":\"新会区\",\n\"440781\":\"台山市\",\n\"440783\":\"开平市\",\n\"440784\":\"鹤山市\",\n\"440785\":\"恩平市\",\n\"440802\":\"赤坎区\",\n\"440803\":\"霞山区\",\n\"440804\":\"坡头区\",\n\"440811\":\"麻章区\",\n\"440823\":\"遂溪县\",\n\"440825\":\"徐闻县\",\n\"440881\":\"廉江市\",\n\"440882\":\"雷州市\",\n\"440883\":\"吴川市\",\n\"440890\":\"经济技术开发区\",\n\"440902\":\"茂南区\",\n\"440904\":\"电白区\",\n\"440981\":\"高州市\",\n\"440982\":\"化州市\",\n\"440983\":\"信宜市\",\n\"441202\":\"端州区\",\n\"441203\":\"鼎湖区\",\n\"441204\":\"高要区\",\n\"441223\":\"广宁县\",\n\"441224\":\"怀集县\",\n\"441225\":\"封开县\",\n\"441226\":\"德庆县\",\n\"441284\":\"四会市\",\n\"441302\":\"惠城区\",\n\"441303\":\"惠阳区\",\n\"441322\":\"博罗县\",\n\"441323\":\"惠东县\",\n\"441324\":\"龙门县\",\n\"441402\":\"梅江区\",\n\"441403\":\"梅县区\",\n\"441422\":\"大埔县\",\n\"441423\":\"丰顺县\",\n\"441424\":\"五华县\",\n\"441426\":\"平远县\",\n\"441427\":\"蕉岭县\",\n\"441481\":\"兴宁市\",\n\"441502\":\"城区\",\n\"441521\":\"海丰县\",\n\"441523\":\"陆河县\",\n\"441581\":\"陆丰市\",\n\"441602\":\"源城区\",\n\"441621\":\"紫金县\",\n\"441622\":\"龙川县\",\n\"441623\":\"连平县\",\n\"441624\":\"和平县\",\n\"441625\":\"东源县\",\n\"441702\":\"江城区\",\n\"441704\":\"阳东区\",\n\"441721\":\"阳西县\",\n\"441781\":\"阳春市\",\n\"441802\":\"清城区\",\n\"441803\":\"清新区\",\n\"441821\":\"佛冈县\",\n\"441823\":\"阳山县\",\n\"441825\":\"连山壮族瑶族自治县\",\n\"441826\":\"连南瑶族自治县\",\n\"441881\":\"英德市\",\n\"441882\":\"连州市\",\n\"441901\":\"中堂镇\",\n\"441903\":\"南城街道办事处\",\n\"441904\":\"长安镇\",\n\"441905\":\"东坑镇\",\n\"441906\":\"樟木头镇\",\n\"441907\":\"莞城街道办事处\",\n\"441908\":\"石龙镇\",\n\"441909\":\"桥头镇\",\n\"441910\":\"万江街道办事处\",\n\"441911\":\"麻涌镇\",\n\"441912\":\"虎门镇\",\n\"441913\":\"谢岗镇\",\n\"441914\":\"石碣镇\",\n\"441915\":\"茶山镇\",\n\"441916\":\"东城街道办事处\",\n\"441917\":\"洪梅镇\",\n\"441918\":\"道滘镇\",\n\"441919\":\"高埗镇\",\n\"441920\":\"企石镇\",\n\"441921\":\"凤岗镇\",\n\"441922\":\"大岭山镇\",\n\"441923\":\"松山湖管委会\",\n\"441924\":\"清溪镇\",\n\"441925\":\"望牛墩镇\",\n\"441926\":\"厚街镇\",\n\"441927\":\"常平镇\",\n\"441928\":\"寮步镇\",\n\"441929\":\"石排镇\",\n\"441930\":\"横沥镇\",\n\"441931\":\"塘厦镇\",\n\"441932\":\"黄江镇\",\n\"441933\":\"大朗镇\",\n\"441934\":\"东莞港\",\n\"441935\":\"东莞生态园\",\n\"441990\":\"沙田镇\",\n\"442001\":\"南头镇\",\n\"442002\":\"神湾镇\",\n\"442003\":\"东凤镇\",\n\"442004\":\"五桂山街道办事处\",\n\"442005\":\"黄圃镇\",\n\"442006\":\"小榄镇\",\n\"442007\":\"石岐区街道办事处\",\n\"442008\":\"横栏镇\",\n\"442009\":\"三角镇\",\n\"442010\":\"三乡镇\",\n\"442011\":\"港口镇\",\n\"442012\":\"沙溪镇\",\n\"442013\":\"板芙镇\",\n\"442015\":\"东升镇\",\n\"442016\":\"阜沙镇\",\n\"442017\":\"民众镇\",\n\"442018\":\"东区街道办事处\",\n\"442019\":\"火炬开发区街道办事处\",\n\"442020\":\"西区街道办事处\",\n\"442021\":\"南区街道办事处\",\n\"442022\":\"古镇镇\",\n\"442023\":\"坦洲镇\",\n\"442024\":\"大涌镇\",\n\"442025\":\"南朗镇\",\n\"445102\":\"湘桥区\",\n\"445103\":\"潮安区\",\n\"445122\":\"饶平县\",\n\"445202\":\"榕城区\",\n\"445203\":\"揭东区\",\n\"445222\":\"揭西县\",\n\"445224\":\"惠来县\",\n\"445281\":\"普宁市\",\n\"445302\":\"云城区\",\n\"445303\":\"云安区\",\n\"445321\":\"新兴县\",\n\"445322\":\"郁南县\",\n\"445381\":\"罗定市\",\n\"450102\":\"兴宁区\",\n\"450103\":\"青秀区\",\n\"450105\":\"江南区\",\n\"450107\":\"西乡塘区\",\n\"450108\":\"良庆区\",\n\"450109\":\"邕宁区\",\n\"450110\":\"武鸣区\",\n\"450123\":\"隆安县\",\n\"450124\":\"马山县\",\n\"450125\":\"上林县\",\n\"450126\":\"宾阳县\",\n\"450127\":\"横县\",\n\"450202\":\"城中区\",\n\"450203\":\"鱼峰区\",\n\"450204\":\"柳南区\",\n\"450205\":\"柳北区\",\n\"450206\":\"柳江区\",\n\"450222\":\"柳城县\",\n\"450223\":\"鹿寨县\",\n\"450224\":\"融安县\",\n\"450225\":\"融水苗族自治县\",\n\"450226\":\"三江侗族自治县\",\n\"450302\":\"秀峰区\",\n\"450303\":\"叠彩区\",\n\"450304\":\"象山区\",\n\"450305\":\"七星区\",\n\"450311\":\"雁山区\",\n\"450312\":\"临桂区\",\n\"450321\":\"阳朔县\",\n\"450323\":\"灵川县\",\n\"450324\":\"全州县\",\n\"450325\":\"兴安县\",\n\"450326\":\"永福县\",\n\"450327\":\"灌阳县\",\n\"450328\":\"龙胜各族自治县\",\n\"450329\":\"资源县\",\n\"450330\":\"平乐县\",\n\"450332\":\"恭城瑶族自治县\",\n\"450381\":\"荔浦市\",\n\"450403\":\"万秀区\",\n\"450405\":\"长洲区\",\n\"450406\":\"龙圩区\",\n\"450421\":\"苍梧县\",\n\"450422\":\"藤县\",\n\"450423\":\"蒙山县\",\n\"450481\":\"岑溪市\",\n\"450502\":\"海城区\",\n\"450503\":\"银海区\",\n\"450512\":\"铁山港区\",\n\"450521\":\"合浦县\",\n\"450602\":\"港口区\",\n\"450603\":\"防城区\",\n\"450621\":\"上思县\",\n\"450681\":\"东兴市\",\n\"450702\":\"钦南区\",\n\"450703\":\"钦北区\",\n\"450721\":\"灵山县\",\n\"450722\":\"浦北县\",\n\"450802\":\"港北区\",\n\"450803\":\"港南区\",\n\"450804\":\"覃塘区\",\n\"450821\":\"平南县\",\n\"450881\":\"桂平市\",\n\"450902\":\"玉州区\",\n\"450903\":\"福绵区\",\n\"450921\":\"容县\",\n\"450922\":\"陆川县\",\n\"450923\":\"博白县\",\n\"450924\":\"兴业县\",\n\"450981\":\"北流市\",\n\"451002\":\"右江区\",\n\"451021\":\"田阳县\",\n\"451022\":\"田东县\",\n\"451023\":\"平果县\",\n\"451024\":\"德保县\",\n\"451026\":\"那坡县\",\n\"451027\":\"凌云县\",\n\"451028\":\"乐业县\",\n\"451029\":\"田林县\",\n\"451030\":\"西林县\",\n\"451031\":\"隆林各族自治县\",\n\"451081\":\"靖西市\",\n\"451102\":\"八步区\",\n\"451103\":\"平桂区\",\n\"451121\":\"昭平县\",\n\"451122\":\"钟山县\",\n\"451123\":\"富川瑶族自治县\",\n\"451202\":\"金城江区\",\n\"451203\":\"宜州区\",\n\"451221\":\"南丹县\",\n\"451222\":\"天峨县\",\n\"451223\":\"凤山县\",\n\"451224\":\"东兰县\",\n\"451225\":\"罗城仫佬族自治县\",\n\"451226\":\"环江毛南族自治县\",\n\"451227\":\"巴马瑶族自治县\",\n\"451228\":\"都安瑶族自治县\",\n\"451229\":\"大化瑶族自治县\",\n\"451302\":\"兴宾区\",\n\"451321\":\"忻城县\",\n\"451322\":\"象州县\",\n\"451323\":\"武宣县\",\n\"451324\":\"金秀瑶族自治县\",\n\"451381\":\"合山市\",\n\"451402\":\"江州区\",\n\"451421\":\"扶绥县\",\n\"451422\":\"宁明县\",\n\"451423\":\"龙州县\",\n\"451424\":\"大新县\",\n\"451425\":\"天等县\",\n\"451481\":\"凭祥市\",\n\"460105\":\"秀英区\",\n\"460106\":\"龙华区\",\n\"460107\":\"琼山区\",\n\"460108\":\"美兰区\",\n\"460202\":\"海棠区\",\n\"460203\":\"吉阳区\",\n\"460204\":\"天涯区\",\n\"460205\":\"崖州区\",\n\"460321\":\"西沙群岛\",\n\"460322\":\"南沙群岛\",\n\"460323\":\"中沙群岛的岛礁及其海域\",\n\"460401\":\"那大镇\",\n\"460402\":\"和庆镇\",\n\"460403\":\"南丰镇\",\n\"460404\":\"大成镇\",\n\"460405\":\"雅星镇\",\n\"460406\":\"兰洋镇\",\n\"460407\":\"光村镇\",\n\"460408\":\"木棠镇\",\n\"460409\":\"海头镇\",\n\"460410\":\"峨蔓镇\",\n\"460411\":\"王五镇\",\n\"460412\":\"白马井镇\",\n\"460413\":\"中和镇\",\n\"460414\":\"排浦镇\",\n\"460415\":\"东成镇\",\n\"460416\":\"新州镇\",\n\"460417\":\"洋浦经济开发区\",\n\"460418\":\"华南热作学院\",\n\"469001\":\"五指山市\",\n\"469002\":\"琼海市\",\n\"469005\":\"文昌市\",\n\"469006\":\"万宁市\",\n\"469007\":\"东方市\",\n\"469021\":\"定安县\",\n\"469022\":\"屯昌县\",\n\"469023\":\"澄迈县\",\n\"469024\":\"临高县\",\n\"469025\":\"白沙黎族自治县\",\n\"469026\":\"昌江黎族自治县\",\n\"469027\":\"乐东黎族自治县\",\n\"469028\":\"陵水黎族自治县\",\n\"469029\":\"保亭黎族苗族自治县\",\n\"469030\":\"琼中黎族苗族自治县\",\n\"500101\":\"万州区\",\n\"500102\":\"涪陵区\",\n\"500103\":\"渝中区\",\n\"500104\":\"大渡口区\",\n\"500105\":\"江北区\",\n\"500106\":\"沙坪坝区\",\n\"500107\":\"九龙坡区\",\n\"500108\":\"南岸区\",\n\"500109\":\"北碚区\",\n\"500110\":\"綦江区\",\n\"500111\":\"大足区\",\n\"500112\":\"渝北区\",\n\"500113\":\"巴南区\",\n\"500114\":\"黔江区\",\n\"500115\":\"长寿区\",\n\"500116\":\"江津区\",\n\"500117\":\"合川区\",\n\"500118\":\"永川区\",\n\"500119\":\"南川区\",\n\"500120\":\"璧山区\",\n\"500151\":\"铜梁区\",\n\"500152\":\"潼南区\",\n\"500153\":\"荣昌区\",\n\"500154\":\"开州区\",\n\"500155\":\"梁平区\",\n\"500156\":\"武隆区\",\n\"500229\":\"城口县\",\n\"500230\":\"丰都县\",\n\"500231\":\"垫江县\",\n\"500233\":\"忠县\",\n\"500235\":\"云阳县\",\n\"500236\":\"奉节县\",\n\"500237\":\"巫山县\",\n\"500238\":\"巫溪县\",\n\"500240\":\"石柱土家族自治县\",\n\"500241\":\"秀山土家族苗族自治县\",\n\"500242\":\"酉阳土家族苗族自治县\",\n\"500243\":\"彭水苗族土家族自治县\",\n\"510104\":\"锦江区\",\n\"510105\":\"青羊区\",\n\"510106\":\"金牛区\",\n\"510107\":\"武侯区\",\n\"510108\":\"成华区\",\n\"510112\":\"龙泉驿区\",\n\"510113\":\"青白江区\",\n\"510114\":\"新都区\",\n\"510115\":\"温江区\",\n\"510116\":\"双流区\",\n\"510117\":\"郫都区\",\n\"510121\":\"金堂县\",\n\"510129\":\"大邑县\",\n\"510131\":\"蒲江县\",\n\"510132\":\"新津县\",\n\"510181\":\"都江堰市\",\n\"510182\":\"彭州市\",\n\"510183\":\"邛崃市\",\n\"510184\":\"崇州市\",\n\"510185\":\"简阳市\",\n\"510191\":\"高新区\",\n\"510302\":\"自流井区\",\n\"510303\":\"贡井区\",\n\"510304\":\"大安区\",\n\"510311\":\"沿滩区\",\n\"510321\":\"荣县\",\n\"510322\":\"富顺县\",\n\"510402\":\"东区\",\n\"510403\":\"西区\",\n\"510411\":\"仁和区\",\n\"510421\":\"米易县\",\n\"510422\":\"盐边县\",\n\"510502\":\"江阳区\",\n\"510503\":\"纳溪区\",\n\"510504\":\"龙马潭区\",\n\"510521\":\"泸县\",\n\"510522\":\"合江县\",\n\"510524\":\"叙永县\",\n\"510525\":\"古蔺县\",\n\"510603\":\"旌阳区\",\n\"510604\":\"罗江区\",\n\"510623\":\"中江县\",\n\"510681\":\"广汉市\",\n\"510682\":\"什邡市\",\n\"510683\":\"绵竹市\",\n\"510703\":\"涪城区\",\n\"510704\":\"游仙区\",\n\"510705\":\"安州区\",\n\"510722\":\"三台县\",\n\"510723\":\"盐亭县\",\n\"510725\":\"梓潼县\",\n\"510726\":\"北川羌族自治县\",\n\"510727\":\"平武县\",\n\"510781\":\"江油市\",\n\"510791\":\"高新区\",\n\"510802\":\"利州区\",\n\"510811\":\"昭化区\",\n\"510812\":\"朝天区\",\n\"510821\":\"旺苍县\",\n\"510822\":\"青川县\",\n\"510823\":\"剑阁县\",\n\"510824\":\"苍溪县\",\n\"510903\":\"船山区\",\n\"510904\":\"安居区\",\n\"510921\":\"蓬溪县\",\n\"510922\":\"射洪县\",\n\"510923\":\"大英县\",\n\"511002\":\"市中区\",\n\"511011\":\"东兴区\",\n\"511024\":\"威远县\",\n\"511025\":\"资中县\",\n\"511083\":\"隆昌市\",\n\"511102\":\"市中区\",\n\"511111\":\"沙湾区\",\n\"511112\":\"五通桥区\",\n\"511113\":\"金口河区\",\n\"511123\":\"犍为县\",\n\"511124\":\"井研县\",\n\"511126\":\"夹江县\",\n\"511129\":\"沐川县\",\n\"511132\":\"峨边彝族自治县\",\n\"511133\":\"马边彝族自治县\",\n\"511181\":\"峨眉山市\",\n\"511302\":\"顺庆区\",\n\"511303\":\"高坪区\",\n\"511304\":\"嘉陵区\",\n\"511321\":\"南部县\",\n\"511322\":\"营山县\",\n\"511323\":\"蓬安县\",\n\"511324\":\"仪陇县\",\n\"511325\":\"西充县\",\n\"511381\":\"阆中市\",\n\"511402\":\"东坡区\",\n\"511403\":\"彭山区\",\n\"511421\":\"仁寿县\",\n\"511423\":\"洪雅县\",\n\"511424\":\"丹棱县\",\n\"511425\":\"青神县\",\n\"511502\":\"翠屏区\",\n\"511503\":\"南溪区\",\n\"511504\":\"叙州区\",\n\"511523\":\"江安县\",\n\"511524\":\"长宁县\",\n\"511525\":\"高县\",\n\"511526\":\"珙县\",\n\"511527\":\"筠连县\",\n\"511528\":\"兴文县\",\n\"511529\":\"屏山县\",\n\"511602\":\"广安区\",\n\"511603\":\"前锋区\",\n\"511621\":\"岳池县\",\n\"511622\":\"武胜县\",\n\"511623\":\"邻水县\",\n\"511681\":\"华蓥市\",\n\"511702\":\"通川区\",\n\"511703\":\"达川区\",\n\"511722\":\"宣汉县\",\n\"511723\":\"开江县\",\n\"511724\":\"大竹县\",\n\"511725\":\"渠县\",\n\"511781\":\"万源市\",\n\"511802\":\"雨城区\",\n\"511803\":\"名山区\",\n\"511822\":\"荥经县\",\n\"511823\":\"汉源县\",\n\"511824\":\"石棉县\",\n\"511825\":\"天全县\",\n\"511826\":\"芦山县\",\n\"511827\":\"宝兴县\",\n\"511902\":\"巴州区\",\n\"511903\":\"恩阳区\",\n\"511921\":\"通江县\",\n\"511922\":\"南江县\",\n\"511923\":\"平昌县\",\n\"512002\":\"雁江区\",\n\"512021\":\"安岳县\",\n\"512022\":\"乐至县\",\n\"513201\":\"马尔康市\",\n\"513221\":\"汶川县\",\n\"513222\":\"理县\",\n\"513223\":\"茂县\",\n\"513224\":\"松潘县\",\n\"513225\":\"九寨沟县\",\n\"513226\":\"金川县\",\n\"513227\":\"小金县\",\n\"513228\":\"黑水县\",\n\"513230\":\"壤塘县\",\n\"513231\":\"阿坝县\",\n\"513232\":\"若尔盖县\",\n\"513233\":\"红原县\",\n\"513301\":\"康定市\",\n\"513322\":\"泸定县\",\n\"513323\":\"丹巴县\",\n\"513324\":\"九龙县\",\n\"513325\":\"雅江县\",\n\"513326\":\"道孚县\",\n\"513327\":\"炉霍县\",\n\"513328\":\"甘孜县\",\n\"513329\":\"新龙县\",\n\"513330\":\"德格县\",\n\"513331\":\"白玉县\",\n\"513332\":\"石渠县\",\n\"513333\":\"色达县\",\n\"513334\":\"理塘县\",\n\"513335\":\"巴塘县\",\n\"513336\":\"乡城县\",\n\"513337\":\"稻城县\",\n\"513338\":\"得荣县\",\n\"513401\":\"西昌市\",\n\"513422\":\"木里藏族自治县\",\n\"513423\":\"盐源县\",\n\"513424\":\"德昌县\",\n\"513425\":\"会理县\",\n\"513426\":\"会东县\",\n\"513427\":\"宁南县\",\n\"513428\":\"普格县\",\n\"513429\":\"布拖县\",\n\"513430\":\"金阳县\",\n\"513431\":\"昭觉县\",\n\"513432\":\"喜德县\",\n\"513433\":\"冕宁县\",\n\"513434\":\"越西县\",\n\"513435\":\"甘洛县\",\n\"513436\":\"美姑县\",\n\"513437\":\"雷波县\",\n\"520102\":\"南明区\",\n\"520103\":\"云岩区\",\n\"520111\":\"花溪区\",\n\"520112\":\"乌当区\",\n\"520113\":\"白云区\",\n\"520115\":\"观山湖区\",\n\"520121\":\"开阳县\",\n\"520122\":\"息烽县\",\n\"520123\":\"修文县\",\n\"520181\":\"清镇市\",\n\"520201\":\"钟山区\",\n\"520203\":\"六枝特区\",\n\"520221\":\"水城县\",\n\"520281\":\"盘州市\",\n\"520302\":\"红花岗区\",\n\"520303\":\"汇川区\",\n\"520304\":\"播州区\",\n\"520322\":\"桐梓县\",\n\"520323\":\"绥阳县\",\n\"520324\":\"正安县\",\n\"520325\":\"道真仡佬族苗族自治县\",\n\"520326\":\"务川仡佬族苗族自治县\",\n\"520327\":\"凤冈县\",\n\"520328\":\"湄潭县\",\n\"520329\":\"余庆县\",\n\"520330\":\"习水县\",\n\"520381\":\"赤水市\",\n\"520382\":\"仁怀市\",\n\"520402\":\"西秀区\",\n\"520403\":\"平坝区\",\n\"520422\":\"普定县\",\n\"520423\":\"镇宁布依族苗族自治县\",\n\"520424\":\"关岭布依族苗族自治县\",\n\"520425\":\"紫云苗族布依族自治县\",\n\"520502\":\"七星关区\",\n\"520521\":\"大方县\",\n\"520522\":\"黔西县\",\n\"520523\":\"金沙县\",\n\"520524\":\"织金县\",\n\"520525\":\"纳雍县\",\n\"520526\":\"威宁彝族回族苗族自治县\",\n\"520527\":\"赫章县\",\n\"520602\":\"碧江区\",\n\"520603\":\"万山区\",\n\"520621\":\"江口县\",\n\"520622\":\"玉屏侗族自治县\",\n\"520623\":\"石阡县\",\n\"520624\":\"思南县\",\n\"520625\":\"印江土家族苗族自治县\",\n\"520626\":\"德江县\",\n\"520627\":\"沿河土家族自治县\",\n\"520628\":\"松桃苗族自治县\",\n\"522301\":\"兴义市\",\n\"522302\":\"兴仁市\",\n\"522323\":\"普安县\",\n\"522324\":\"晴隆县\",\n\"522325\":\"贞丰县\",\n\"522326\":\"望谟县\",\n\"522327\":\"册亨县\",\n\"522328\":\"安龙县\",\n\"522601\":\"凯里市\",\n\"522622\":\"黄平县\",\n\"522623\":\"施秉县\",\n\"522624\":\"三穗县\",\n\"522625\":\"镇远县\",\n\"522626\":\"岑巩县\",\n\"522627\":\"天柱县\",\n\"522628\":\"锦屏县\",\n\"522629\":\"剑河县\",\n\"522630\":\"台江县\",\n\"522631\":\"黎平县\",\n\"522632\":\"榕江县\",\n\"522633\":\"从江县\",\n\"522634\":\"雷山县\",\n\"522635\":\"麻江县\",\n\"522636\":\"丹寨县\",\n\"522701\":\"都匀市\",\n\"522702\":\"福泉市\",\n\"522722\":\"荔波县\",\n\"522723\":\"贵定县\",\n\"522725\":\"瓮安县\",\n\"522726\":\"独山县\",\n\"522727\":\"平塘县\",\n\"522728\":\"罗甸县\",\n\"522729\":\"长顺县\",\n\"522730\":\"龙里县\",\n\"522731\":\"惠水县\",\n\"522732\":\"三都水族自治县\",\n\"530102\":\"五华区\",\n\"530103\":\"盘龙区\",\n\"530111\":\"官渡区\",\n\"530112\":\"西山区\",\n\"530113\":\"东川区\",\n\"530114\":\"呈贡区\",\n\"530115\":\"晋宁区\",\n\"530124\":\"富民县\",\n\"530125\":\"宜良县\",\n\"530126\":\"石林彝族自治县\",\n\"530127\":\"嵩明县\",\n\"530128\":\"禄劝彝族苗族自治县\",\n\"530129\":\"寻甸回族彝族自治县\",\n\"530181\":\"安宁市\",\n\"530302\":\"麒麟区\",\n\"530303\":\"沾益区\",\n\"530304\":\"马龙区\",\n\"530322\":\"陆良县\",\n\"530323\":\"师宗县\",\n\"530324\":\"罗平县\",\n\"530325\":\"富源县\",\n\"530326\":\"会泽县\",\n\"530381\":\"宣威市\",\n\"530402\":\"红塔区\",\n\"530403\":\"江川区\",\n\"530422\":\"澄江县\",\n\"530423\":\"通海县\",\n\"530424\":\"华宁县\",\n\"530425\":\"易门县\",\n\"530426\":\"峨山彝族自治县\",\n\"530427\":\"新平彝族傣族自治县\",\n\"530428\":\"元江哈尼族彝族傣族自治县\",\n\"530502\":\"隆阳区\",\n\"530521\":\"施甸县\",\n\"530523\":\"龙陵县\",\n\"530524\":\"昌宁县\",\n\"530581\":\"腾冲市\",\n\"530602\":\"昭阳区\",\n\"530621\":\"鲁甸县\",\n\"530622\":\"巧家县\",\n\"530623\":\"盐津县\",\n\"530624\":\"大关县\",\n\"530625\":\"永善县\",\n\"530626\":\"绥江县\",\n\"530627\":\"镇雄县\",\n\"530628\":\"彝良县\",\n\"530629\":\"威信县\",\n\"530681\":\"水富市\",\n\"530702\":\"古城区\",\n\"530721\":\"玉龙纳西族自治县\",\n\"530722\":\"永胜县\",\n\"530723\":\"华坪县\",\n\"530724\":\"宁蒗彝族自治县\",\n\"530802\":\"思茅区\",\n\"530821\":\"宁洱哈尼族彝族自治县\",\n\"530822\":\"墨江哈尼族自治县\",\n\"530823\":\"景东彝族自治县\",\n\"530824\":\"景谷傣族彝族自治县\",\n\"530825\":\"镇沅彝族哈尼族拉祜族自治县\",\n\"530826\":\"江城哈尼族彝族自治县\",\n\"530827\":\"孟连傣族拉祜族佤族自治县\",\n\"530828\":\"澜沧拉祜族自治县\",\n\"530829\":\"西盟佤族自治县\",\n\"530902\":\"临翔区\",\n\"530921\":\"凤庆县\",\n\"530922\":\"云县\",\n\"530923\":\"永德县\",\n\"530924\":\"镇康县\",\n\"530925\":\"双江拉祜族佤族布朗族傣族自治县\",\n\"530926\":\"耿马傣族佤族自治县\",\n\"530927\":\"沧源佤族自治县\",\n\"532301\":\"楚雄市\",\n\"532322\":\"双柏县\",\n\"532323\":\"牟定县\",\n\"532324\":\"南华县\",\n\"532325\":\"姚安县\",\n\"532326\":\"大姚县\",\n\"532327\":\"永仁县\",\n\"532328\":\"元谋县\",\n\"532329\":\"武定县\",\n\"532331\":\"禄丰县\",\n\"532501\":\"个旧市\",\n\"532502\":\"开远市\",\n\"532503\":\"蒙自市\",\n\"532504\":\"弥勒市\",\n\"532523\":\"屏边苗族自治县\",\n\"532524\":\"建水县\",\n\"532525\":\"石屏县\",\n\"532527\":\"泸西县\",\n\"532528\":\"元阳县\",\n\"532529\":\"红河县\",\n\"532530\":\"金平苗族瑶族傣族自治县\",\n\"532531\":\"绿春县\",\n\"532532\":\"河口瑶族自治县\",\n\"532601\":\"文山市\",\n\"532622\":\"砚山县\",\n\"532623\":\"西畴县\",\n\"532624\":\"麻栗坡县\",\n\"532625\":\"马关县\",\n\"532626\":\"丘北县\",\n\"532627\":\"广南县\",\n\"532628\":\"富宁县\",\n\"532801\":\"景洪市\",\n\"532822\":\"勐海县\",\n\"532823\":\"勐腊县\",\n\"532901\":\"大理市\",\n\"532922\":\"漾濞彝族自治县\",\n\"532923\":\"祥云县\",\n\"532924\":\"宾川县\",\n\"532925\":\"弥渡县\",\n\"532926\":\"南涧彝族自治县\",\n\"532927\":\"巍山彝族回族自治县\",\n\"532928\":\"永平县\",\n\"532929\":\"云龙县\",\n\"532930\":\"洱源县\",\n\"532931\":\"剑川县\",\n\"532932\":\"鹤庆县\",\n\"533102\":\"瑞丽市\",\n\"533103\":\"芒市\",\n\"533122\":\"梁河县\",\n\"533123\":\"盈江县\",\n\"533124\":\"陇川县\",\n\"533301\":\"泸水市\",\n\"533323\":\"福贡县\",\n\"533324\":\"贡山独龙族怒族自治县\",\n\"533325\":\"兰坪白族普米族自治县\",\n\"533401\":\"香格里拉市\",\n\"533422\":\"德钦县\",\n\"533423\":\"维西傈僳族自治县\",\n\"540102\":\"城关区\",\n\"540103\":\"堆龙德庆区\",\n\"540104\":\"达孜区\",\n\"540121\":\"林周县\",\n\"540122\":\"当雄县\",\n\"540123\":\"尼木县\",\n\"540124\":\"曲水县\",\n\"540127\":\"墨竹工卡县\",\n\"540202\":\"桑珠孜区\",\n\"540221\":\"南木林县\",\n\"540222\":\"江孜县\",\n\"540223\":\"定日县\",\n\"540224\":\"萨迦县\",\n\"540225\":\"拉孜县\",\n\"540226\":\"昂仁县\",\n\"540227\":\"谢通门县\",\n\"540228\":\"白朗县\",\n\"540229\":\"仁布县\",\n\"540230\":\"康马县\",\n\"540231\":\"定结县\",\n\"540232\":\"仲巴县\",\n\"540233\":\"亚东县\",\n\"540234\":\"吉隆县\",\n\"540235\":\"聂拉木县\",\n\"540236\":\"萨嘎县\",\n\"540237\":\"岗巴县\",\n\"540302\":\"卡若区\",\n\"540321\":\"江达县\",\n\"540322\":\"贡觉县\",\n\"540323\":\"类乌齐县\",\n\"540324\":\"丁青县\",\n\"540325\":\"察雅县\",\n\"540326\":\"八宿县\",\n\"540327\":\"左贡县\",\n\"540328\":\"芒康县\",\n\"540329\":\"洛隆县\",\n\"540330\":\"边坝县\",\n\"540402\":\"巴宜区\",\n\"540421\":\"工布江达县\",\n\"540422\":\"米林县\",\n\"540423\":\"墨脱县\",\n\"540424\":\"波密县\",\n\"540425\":\"察隅县\",\n\"540426\":\"朗县\",\n\"540502\":\"乃东区\",\n\"540521\":\"扎囊县\",\n\"540522\":\"贡嘎县\",\n\"540523\":\"桑日县\",\n\"540524\":\"琼结县\",\n\"540525\":\"曲松县\",\n\"540526\":\"措美县\",\n\"540527\":\"洛扎县\",\n\"540528\":\"加查县\",\n\"540529\":\"隆子县\",\n\"540530\":\"错那县\",\n\"540531\":\"浪卡子县\",\n\"540602\":\"色尼区\",\n\"540621\":\"嘉黎县\",\n\"540622\":\"比如县\",\n\"540623\":\"聂荣县\",\n\"540624\":\"安多县\",\n\"540625\":\"申扎县\",\n\"540626\":\"索县\",\n\"540627\":\"班戈县\",\n\"540628\":\"巴青县\",\n\"540629\":\"尼玛县\",\n\"540630\":\"双湖县\",\n\"542521\":\"普兰县\",\n\"542522\":\"札达县\",\n\"542523\":\"噶尔县\",\n\"542524\":\"日土县\",\n\"542525\":\"革吉县\",\n\"542526\":\"改则县\",\n\"542527\":\"措勤县\",\n\"610102\":\"新城区\",\n\"610103\":\"碑林区\",\n\"610104\":\"莲湖区\",\n\"610111\":\"灞桥区\",\n\"610112\":\"未央区\",\n\"610113\":\"雁塔区\",\n\"610114\":\"阎良区\",\n\"610115\":\"临潼区\",\n\"610116\":\"长安区\",\n\"610117\":\"高陵区\",\n\"610118\":\"鄠邑区\",\n\"610122\":\"蓝田县\",\n\"610124\":\"周至县\",\n\"610202\":\"王益区\",\n\"610203\":\"印台区\",\n\"610204\":\"耀州区\",\n\"610222\":\"宜君县\",\n\"610302\":\"渭滨区\",\n\"610303\":\"金台区\",\n\"610304\":\"陈仓区\",\n\"610322\":\"凤翔县\",\n\"610323\":\"岐山县\",\n\"610324\":\"扶风县\",\n\"610326\":\"眉县\",\n\"610327\":\"陇县\",\n\"610328\":\"千阳县\",\n\"610329\":\"麟游县\",\n\"610330\":\"凤县\",\n\"610331\":\"太白县\",\n\"610402\":\"秦都区\",\n\"610403\":\"杨陵区\",\n\"610404\":\"渭城区\",\n\"610422\":\"三原县\",\n\"610423\":\"泾阳县\",\n\"610424\":\"乾县\",\n\"610425\":\"礼泉县\",\n\"610426\":\"永寿县\",\n\"610428\":\"长武县\",\n\"610429\":\"旬邑县\",\n\"610430\":\"淳化县\",\n\"610431\":\"武功县\",\n\"610481\":\"兴平市\",\n\"610482\":\"彬州市\",\n\"610502\":\"临渭区\",\n\"610503\":\"华州区\",\n\"610522\":\"潼关县\",\n\"610523\":\"大荔县\",\n\"610524\":\"合阳县\",\n\"610525\":\"澄城县\",\n\"610526\":\"蒲城县\",\n\"610527\":\"白水县\",\n\"610528\":\"富平县\",\n\"610581\":\"韩城市\",\n\"610582\":\"华阴市\",\n\"610602\":\"宝塔区\",\n\"610603\":\"安塞区\",\n\"610621\":\"延长县\",\n\"610622\":\"延川县\",\n\"610623\":\"子长县\",\n\"610625\":\"志丹县\",\n\"610626\":\"吴起县\",\n\"610627\":\"甘泉县\",\n\"610628\":\"富县\",\n\"610629\":\"洛川县\",\n\"610630\":\"宜川县\",\n\"610631\":\"黄龙县\",\n\"610632\":\"黄陵县\",\n\"610702\":\"汉台区\",\n\"610703\":\"南郑区\",\n\"610722\":\"城固县\",\n\"610723\":\"洋县\",\n\"610724\":\"西乡县\",\n\"610725\":\"勉县\",\n\"610726\":\"宁强县\",\n\"610727\":\"略阳县\",\n\"610728\":\"镇巴县\",\n\"610729\":\"留坝县\",\n\"610730\":\"佛坪县\",\n\"610802\":\"榆阳区\",\n\"610803\":\"横山区\",\n\"610822\":\"府谷县\",\n\"610824\":\"靖边县\",\n\"610825\":\"定边县\",\n\"610826\":\"绥德县\",\n\"610827\":\"米脂县\",\n\"610828\":\"佳县\",\n\"610829\":\"吴堡县\",\n\"610830\":\"清涧县\",\n\"610831\":\"子洲县\",\n\"610881\":\"神木市\",\n\"610902\":\"汉滨区\",\n\"610921\":\"汉阴县\",\n\"610922\":\"石泉县\",\n\"610923\":\"宁陕县\",\n\"610924\":\"紫阳县\",\n\"610925\":\"岚皋县\",\n\"610926\":\"平利县\",\n\"610927\":\"镇坪县\",\n\"610928\":\"旬阳县\",\n\"610929\":\"白河县\",\n\"611002\":\"商州区\",\n\"611021\":\"洛南县\",\n\"611022\":\"丹凤县\",\n\"611023\":\"商南县\",\n\"611024\":\"山阳县\",\n\"611025\":\"镇安县\",\n\"611026\":\"柞水县\",\n\"620102\":\"城关区\",\n\"620103\":\"七里河区\",\n\"620104\":\"西固区\",\n\"620105\":\"安宁区\",\n\"620111\":\"红古区\",\n\"620121\":\"永登县\",\n\"620122\":\"皋兰县\",\n\"620123\":\"榆中县\",\n\"620201\":\"市辖区\",\n\"620290\":\"雄关区\",\n\"620291\":\"长城区\",\n\"620292\":\"镜铁区\",\n\"620293\":\"新城镇\",\n\"620294\":\"峪泉镇\",\n\"620295\":\"文殊镇\",\n\"620302\":\"金川区\",\n\"620321\":\"永昌县\",\n\"620402\":\"白银区\",\n\"620403\":\"平川区\",\n\"620421\":\"靖远县\",\n\"620422\":\"会宁县\",\n\"620423\":\"景泰县\",\n\"620502\":\"秦州区\",\n\"620503\":\"麦积区\",\n\"620521\":\"清水县\",\n\"620522\":\"秦安县\",\n\"620523\":\"甘谷县\",\n\"620524\":\"武山县\",\n\"620525\":\"张家川回族自治县\",\n\"620602\":\"凉州区\",\n\"620621\":\"民勤县\",\n\"620622\":\"古浪县\",\n\"620623\":\"天祝藏族自治县\",\n\"620702\":\"甘州区\",\n\"620721\":\"肃南裕固族自治县\",\n\"620722\":\"民乐县\",\n\"620723\":\"临泽县\",\n\"620724\":\"高台县\",\n\"620725\":\"山丹县\",\n\"620802\":\"崆峒区\",\n\"620821\":\"泾川县\",\n\"620822\":\"灵台县\",\n\"620823\":\"崇信县\",\n\"620825\":\"庄浪县\",\n\"620826\":\"静宁县\",\n\"620881\":\"华亭市\",\n\"620902\":\"肃州区\",\n\"620921\":\"金塔县\",\n\"620922\":\"瓜州县\",\n\"620923\":\"肃北蒙古族自治县\",\n\"620924\":\"阿克塞哈萨克族自治县\",\n\"620981\":\"玉门市\",\n\"620982\":\"敦煌市\",\n\"621002\":\"西峰区\",\n\"621021\":\"庆城县\",\n\"621022\":\"环县\",\n\"621023\":\"华池县\",\n\"621024\":\"合水县\",\n\"621025\":\"正宁县\",\n\"621026\":\"宁县\",\n\"621027\":\"镇原县\",\n\"621102\":\"安定区\",\n\"621121\":\"通渭县\",\n\"621122\":\"陇西县\",\n\"621123\":\"渭源县\",\n\"621124\":\"临洮县\",\n\"621125\":\"漳县\",\n\"621126\":\"岷县\",\n\"621202\":\"武都区\",\n\"621221\":\"成县\",\n\"621222\":\"文县\",\n\"621223\":\"宕昌县\",\n\"621224\":\"康县\",\n\"621225\":\"西和县\",\n\"621226\":\"礼县\",\n\"621227\":\"徽县\",\n\"621228\":\"两当县\",\n\"622901\":\"临夏市\",\n\"622921\":\"临夏县\",\n\"622922\":\"康乐县\",\n\"622923\":\"永靖县\",\n\"622924\":\"广河县\",\n\"622925\":\"和政县\",\n\"622926\":\"东乡族自治县\",\n\"622927\":\"积石山保安族东乡族撒拉族自治县\",\n\"623001\":\"合作市\",\n\"623021\":\"临潭县\",\n\"623022\":\"卓尼县\",\n\"623023\":\"舟曲县\",\n\"623024\":\"迭部县\",\n\"623025\":\"玛曲县\",\n\"623026\":\"碌曲县\",\n\"623027\":\"夏河县\",\n\"630102\":\"城东区\",\n\"630103\":\"城中区\",\n\"630104\":\"城西区\",\n\"630105\":\"城北区\",\n\"630121\":\"大通回族土族自治县\",\n\"630122\":\"湟中县\",\n\"630123\":\"湟源县\",\n\"630202\":\"乐都区\",\n\"630203\":\"平安区\",\n\"630222\":\"民和回族土族自治县\",\n\"630223\":\"互助土族自治县\",\n\"630224\":\"化隆回族自治县\",\n\"630225\":\"循化撒拉族自治县\",\n\"632221\":\"门源回族自治县\",\n\"632222\":\"祁连县\",\n\"632223\":\"海晏县\",\n\"632224\":\"刚察县\",\n\"632321\":\"同仁县\",\n\"632322\":\"尖扎县\",\n\"632323\":\"泽库县\",\n\"632324\":\"河南蒙古族自治县\",\n\"632521\":\"共和县\",\n\"632522\":\"同德县\",\n\"632523\":\"贵德县\",\n\"632524\":\"兴海县\",\n\"632525\":\"贵南县\",\n\"632621\":\"玛沁县\",\n\"632622\":\"班玛县\",\n\"632623\":\"甘德县\",\n\"632624\":\"达日县\",\n\"632625\":\"久治县\",\n\"632626\":\"玛多县\",\n\"632701\":\"玉树市\",\n\"632722\":\"杂多县\",\n\"632723\":\"称多县\",\n\"632724\":\"治多县\",\n\"632725\":\"囊谦县\",\n\"632726\":\"曲麻莱县\",\n\"632801\":\"格尔木市\",\n\"632802\":\"德令哈市\",\n\"632803\":\"茫崖市\",\n\"632821\":\"乌兰县\",\n\"632822\":\"都兰县\",\n\"632823\":\"天峻县\",\n\"640104\":\"兴庆区\",\n\"640105\":\"西夏区\",\n\"640106\":\"金凤区\",\n\"640121\":\"永宁县\",\n\"640122\":\"贺兰县\",\n\"640181\":\"灵武市\",\n\"640202\":\"大武口区\",\n\"640205\":\"惠农区\",\n\"640221\":\"平罗县\",\n\"640302\":\"利通区\",\n\"640303\":\"红寺堡区\",\n\"640323\":\"盐池县\",\n\"640324\":\"同心县\",\n\"640381\":\"青铜峡市\",\n\"640402\":\"原州区\",\n\"640422\":\"西吉县\",\n\"640423\":\"隆德县\",\n\"640424\":\"泾源县\",\n\"640425\":\"彭阳县\",\n\"640502\":\"沙坡头区\",\n\"640521\":\"中宁县\",\n\"640522\":\"海原县\",\n\"650102\":\"天山区\",\n\"650103\":\"沙依巴克区\",\n\"650104\":\"新市区\",\n\"650105\":\"水磨沟区\",\n\"650106\":\"头屯河区\",\n\"650107\":\"达坂城区\",\n\"650109\":\"米东区\",\n\"650121\":\"乌鲁木齐县\",\n\"650202\":\"独山子区\",\n\"650203\":\"克拉玛依区\",\n\"650204\":\"白碱滩区\",\n\"650205\":\"乌尔禾区\",\n\"650402\":\"高昌区\",\n\"650421\":\"鄯善县\",\n\"650422\":\"托克逊县\",\n\"650502\":\"伊州区\",\n\"650521\":\"巴里坤哈萨克自治县\",\n\"650522\":\"伊吾县\",\n\"652301\":\"昌吉市\",\n\"652302\":\"阜康市\",\n\"652323\":\"呼图壁县\",\n\"652324\":\"玛纳斯县\",\n\"652325\":\"奇台县\",\n\"652327\":\"吉木萨尔县\",\n\"652328\":\"木垒哈萨克自治县\",\n\"652701\":\"博乐市\",\n\"652702\":\"阿拉山口市\",\n\"652722\":\"精河县\",\n\"652723\":\"温泉县\",\n\"652801\":\"库尔勒市\",\n\"652822\":\"轮台县\",\n\"652823\":\"尉犁县\",\n\"652824\":\"若羌县\",\n\"652825\":\"且末县\",\n\"652826\":\"焉耆回族自治县\",\n\"652827\":\"和静县\",\n\"652828\":\"和硕县\",\n\"652829\":\"博湖县\",\n\"652901\":\"阿克苏市\",\n\"652922\":\"温宿县\",\n\"652923\":\"库车县\",\n\"652924\":\"沙雅县\",\n\"652925\":\"新和县\",\n\"652926\":\"拜城县\",\n\"652927\":\"乌什县\",\n\"652928\":\"阿瓦提县\",\n\"652929\":\"柯坪县\",\n\"653001\":\"阿图什市\",\n\"653022\":\"阿克陶县\",\n\"653023\":\"阿合奇县\",\n\"653024\":\"乌恰县\",\n\"653101\":\"喀什市\",\n\"653121\":\"疏附县\",\n\"653122\":\"疏勒县\",\n\"653123\":\"英吉沙县\",\n\"653124\":\"泽普县\",\n\"653125\":\"莎车县\",\n\"653126\":\"叶城县\",\n\"653127\":\"麦盖提县\",\n\"653128\":\"岳普湖县\",\n\"653129\":\"伽师县\",\n\"653130\":\"巴楚县\",\n\"653131\":\"塔什库尔干塔吉克自治县\",\n\"653201\":\"和田市\",\n\"653221\":\"和田县\",\n\"653222\":\"墨玉县\",\n\"653223\":\"皮山县\",\n\"653224\":\"洛浦县\",\n\"653225\":\"策勒县\",\n\"653226\":\"于田县\",\n\"653227\":\"民丰县\",\n\"654002\":\"伊宁市\",\n\"654003\":\"奎屯市\",\n\"654004\":\"霍尔果斯市\",\n\"654021\":\"伊宁县\",\n\"654022\":\"察布查尔锡伯自治县\",\n\"654023\":\"霍城县\",\n\"654024\":\"巩留县\",\n\"654025\":\"新源县\",\n\"654026\":\"昭苏县\",\n\"654027\":\"特克斯县\",\n\"654028\":\"尼勒克县\",\n\"654201\":\"塔城市\",\n\"654202\":\"乌苏市\",\n\"654221\":\"额敏县\",\n\"654223\":\"沙湾县\",\n\"654224\":\"托里县\",\n\"654225\":\"裕民县\",\n\"654226\":\"和布克赛尔蒙古自治县\",\n\"654301\":\"阿勒泰市\",\n\"654321\":\"布尔津县\",\n\"654322\":\"富蕴县\",\n\"654323\":\"福海县\",\n\"654324\":\"哈巴河县\",\n\"654325\":\"青河县\",\n\"654326\":\"吉木乃县\",\n\"659001\":\"石河子市\",\n\"659002\":\"阿拉尔市\",\n\"659003\":\"图木舒克市\",\n\"659004\":\"五家渠市\",\n\"659005\":\"北屯市\",\n\"659006\":\"铁门关市\",\n\"659007\":\"双河市\",\n\"659008\":\"可克达拉市\",\n\"659009\":\"昆玉市\",\n\"710101\":\"中正区\",\n\"710102\":\"大同区\",\n\"710103\":\"中山区\",\n\"710104\":\"松山区\",\n\"710105\":\"大安区\",\n\"710106\":\"万华区\",\n\"710107\":\"信义区\",\n\"710108\":\"士林区\",\n\"710109\":\"北投区\",\n\"710110\":\"内湖区\",\n\"710111\":\"南港区\",\n\"710112\":\"文山区\",\n\"710199\":\"其它区\",\n\"710201\":\"新兴区\",\n\"710202\":\"前金区\",\n\"710203\":\"芩雅区\",\n\"710204\":\"盐埕区\",\n\"710205\":\"鼓山区\",\n\"710206\":\"旗津区\",\n\"710207\":\"前镇区\",\n\"710208\":\"三民区\",\n\"710209\":\"左营区\",\n\"710210\":\"楠梓区\",\n\"710211\":\"小港区\",\n\"710241\":\"苓雅区\",\n\"710242\":\"仁武区\",\n\"710243\":\"大社区\",\n\"710244\":\"冈山区\",\n\"710245\":\"路竹区\",\n\"710246\":\"阿莲区\",\n\"710247\":\"田寮区\",\n\"710248\":\"燕巢区\",\n\"710249\":\"桥头区\",\n\"710250\":\"梓官区\",\n\"710251\":\"弥陀区\",\n\"710252\":\"永安区\",\n\"710253\":\"湖内区\",\n\"710254\":\"凤山区\",\n\"710255\":\"大寮区\",\n\"710256\":\"林园区\",\n\"710257\":\"鸟松区\",\n\"710258\":\"大树区\",\n\"710259\":\"旗山区\",\n\"710260\":\"美浓区\",\n\"710261\":\"六龟区\",\n\"710262\":\"内门区\",\n\"710263\":\"杉林区\",\n\"710264\":\"甲仙区\",\n\"710265\":\"桃源区\",\n\"710266\":\"那玛夏区\",\n\"710267\":\"茂林区\",\n\"710268\":\"茄萣区\",\n\"710299\":\"其它区\",\n\"710301\":\"中西区\",\n\"710302\":\"东区\",\n\"710303\":\"南区\",\n\"710304\":\"北区\",\n\"710305\":\"安平区\",\n\"710306\":\"安南区\",\n\"710339\":\"永康区\",\n\"710340\":\"归仁区\",\n\"710341\":\"新化区\",\n\"710342\":\"左镇区\",\n\"710343\":\"玉井区\",\n\"710344\":\"楠西区\",\n\"710345\":\"南化区\",\n\"710346\":\"仁德区\",\n\"710347\":\"关庙区\",\n\"710348\":\"龙崎区\",\n\"710349\":\"官田区\",\n\"710350\":\"麻豆区\",\n\"710351\":\"佳里区\",\n\"710352\":\"西港区\",\n\"710353\":\"七股区\",\n\"710354\":\"将军区\",\n\"710355\":\"学甲区\",\n\"710356\":\"北门区\",\n\"710357\":\"新营区\",\n\"710358\":\"后壁区\",\n\"710359\":\"白河区\",\n\"710360\":\"东山区\",\n\"710361\":\"六甲区\",\n\"710362\":\"下营区\",\n\"710363\":\"柳营区\",\n\"710364\":\"盐水区\",\n\"710365\":\"善化区\",\n\"710366\":\"大内区\",\n\"710367\":\"山上区\",\n\"710368\":\"新市区\",\n\"710369\":\"安定区\",\n\"710399\":\"其它区\",\n\"710401\":\"中区\",\n\"710402\":\"东区\",\n\"710403\":\"南区\",\n\"710404\":\"西区\",\n\"710405\":\"北区\",\n\"710406\":\"北屯区\",\n\"710407\":\"西屯区\",\n\"710408\":\"南屯区\",\n\"710431\":\"太平区\",\n\"710432\":\"大里区\",\n\"710433\":\"雾峰区\",\n\"710434\":\"乌日区\",\n\"710435\":\"丰原区\",\n\"710436\":\"后里区\",\n\"710437\":\"石冈区\",\n\"710438\":\"东势区\",\n\"710439\":\"和平区\",\n\"710440\":\"新社区\",\n\"710441\":\"潭子区\",\n\"710442\":\"大雅区\",\n\"710443\":\"神冈区\",\n\"710444\":\"大肚区\",\n\"710445\":\"沙鹿区\",\n\"710446\":\"龙井区\",\n\"710447\":\"梧栖区\",\n\"710448\":\"清水区\",\n\"710449\":\"大甲区\",\n\"710450\":\"外埔区\",\n\"710451\":\"大安区\",\n\"710499\":\"其它区\",\n\"710507\":\"金沙镇\",\n\"710508\":\"金湖镇\",\n\"710509\":\"金宁乡\",\n\"710510\":\"金城镇\",\n\"710511\":\"烈屿乡\",\n\"710512\":\"乌坵乡\",\n\"710614\":\"南投市\",\n\"710615\":\"中寮乡\",\n\"710616\":\"草屯镇\",\n\"710617\":\"国姓乡\",\n\"710618\":\"埔里镇\",\n\"710619\":\"仁爱乡\",\n\"710620\":\"名间乡\",\n\"710621\":\"集集镇\",\n\"710622\":\"水里乡\",\n\"710623\":\"鱼池乡\",\n\"710624\":\"信义乡\",\n\"710625\":\"竹山镇\",\n\"710626\":\"鹿谷乡\",\n\"710701\":\"仁爱区\",\n\"710702\":\"信义区\",\n\"710703\":\"中正区\",\n\"710704\":\"中山区\",\n\"710705\":\"安乐区\",\n\"710706\":\"暖暖区\",\n\"710707\":\"七堵区\",\n\"710799\":\"其它区\",\n\"710801\":\"东区\",\n\"710802\":\"北区\",\n\"710803\":\"香山区\",\n\"710899\":\"其它区\",\n\"710901\":\"东区\",\n\"710902\":\"西区\",\n\"710999\":\"其它区\",\n\"711130\":\"万里区\",\n\"711132\":\"板桥区\",\n\"711133\":\"汐止区\",\n\"711134\":\"深坑区\",\n\"711135\":\"石碇区\",\n\"711136\":\"瑞芳区\",\n\"711137\":\"平溪区\",\n\"711138\":\"双溪区\",\n\"711139\":\"贡寮区\",\n\"711140\":\"新店区\",\n\"711141\":\"坪林区\",\n\"711142\":\"乌来区\",\n\"711143\":\"永和区\",\n\"711144\":\"中和区\",\n\"711145\":\"土城区\",\n\"711146\":\"三峡区\",\n\"711147\":\"树林区\",\n\"711148\":\"莺歌区\",\n\"711149\":\"三重区\",\n\"711150\":\"新庄区\",\n\"711151\":\"泰山区\",\n\"711152\":\"林口区\",\n\"711153\":\"芦洲区\",\n\"711154\":\"五股区\",\n\"711155\":\"八里区\",\n\"711156\":\"淡水区\",\n\"711157\":\"三芝区\",\n\"711158\":\"石门区\",\n\"711287\":\"宜兰市\",\n\"711288\":\"头城镇\",\n\"711289\":\"礁溪乡\",\n\"711290\":\"壮围乡\",\n\"711291\":\"员山乡\",\n\"711292\":\"罗东镇\",\n\"711293\":\"三星乡\",\n\"711294\":\"大同乡\",\n\"711295\":\"五结乡\",\n\"711296\":\"冬山乡\",\n\"711297\":\"苏澳镇\",\n\"711298\":\"南澳乡\",\n\"711299\":\"钓鱼台\",\n\"711387\":\"竹北市\",\n\"711388\":\"湖口乡\",\n\"711389\":\"新丰乡\",\n\"711390\":\"新埔镇\",\n\"711391\":\"关西镇\",\n\"711392\":\"芎林乡\",\n\"711393\":\"宝山乡\",\n\"711394\":\"竹东镇\",\n\"711395\":\"五峰乡\",\n\"711396\":\"横山乡\",\n\"711397\":\"尖石乡\",\n\"711398\":\"北埔乡\",\n\"711399\":\"峨眉乡\",\n\"711414\":\"中坜区\",\n\"711415\":\"平镇区\",\n\"711417\":\"杨梅区\",\n\"711418\":\"新屋区\",\n\"711419\":\"观音区\",\n\"711420\":\"桃园区\",\n\"711421\":\"龟山区\",\n\"711422\":\"八德区\",\n\"711423\":\"大溪区\",\n\"711425\":\"大园区\",\n\"711426\":\"芦竹区\",\n\"711487\":\"中坜市\",\n\"711488\":\"平镇市\",\n\"711489\":\"龙潭乡\",\n\"711490\":\"杨梅市\",\n\"711491\":\"新屋乡\",\n\"711492\":\"观音乡\",\n\"711493\":\"桃园市\",\n\"711494\":\"龟山乡\",\n\"711495\":\"八德市\",\n\"711496\":\"大溪镇\",\n\"711497\":\"复兴乡\",\n\"711498\":\"大园乡\",\n\"711499\":\"芦竹乡\",\n\"711520\":\"头份市\",\n\"711582\":\"竹南镇\",\n\"711583\":\"头份镇\",\n\"711584\":\"三湾乡\",\n\"711585\":\"南庄乡\",\n\"711586\":\"狮潭乡\",\n\"711587\":\"后龙镇\",\n\"711588\":\"通霄镇\",\n\"711589\":\"苑里镇\",\n\"711590\":\"苗栗市\",\n\"711591\":\"造桥乡\",\n\"711592\":\"头屋乡\",\n\"711593\":\"公馆乡\",\n\"711594\":\"大湖乡\",\n\"711595\":\"泰安乡\",\n\"711596\":\"铜锣乡\",\n\"711597\":\"三义乡\",\n\"711598\":\"西湖乡\",\n\"711599\":\"卓兰镇\",\n\"711736\":\"员林市\",\n\"711774\":\"彰化市\",\n\"711775\":\"芬园乡\",\n\"711776\":\"花坛乡\",\n\"711777\":\"秀水乡\",\n\"711778\":\"鹿港镇\",\n\"711779\":\"福兴乡\",\n\"711780\":\"线西乡\",\n\"711781\":\"和美镇\",\n\"711782\":\"伸港乡\",\n\"711783\":\"员林镇\",\n\"711784\":\"社头乡\",\n\"711785\":\"永靖乡\",\n\"711786\":\"埔心乡\",\n\"711787\":\"溪湖镇\",\n\"711788\":\"大村乡\",\n\"711789\":\"埔盐乡\",\n\"711790\":\"田中镇\",\n\"711791\":\"北斗镇\",\n\"711792\":\"田尾乡\",\n\"711793\":\"埤头乡\",\n\"711794\":\"溪州乡\",\n\"711795\":\"竹塘乡\",\n\"711796\":\"二林镇\",\n\"711797\":\"大城乡\",\n\"711798\":\"芳苑乡\",\n\"711799\":\"二水乡\",\n\"711982\":\"番路乡\",\n\"711983\":\"梅山乡\",\n\"711984\":\"竹崎乡\",\n\"711985\":\"阿里山乡\",\n\"711986\":\"中埔乡\",\n\"711987\":\"大埔乡\",\n\"711988\":\"水上乡\",\n\"711989\":\"鹿草乡\",\n\"711990\":\"太保市\",\n\"711991\":\"朴子市\",\n\"711992\":\"东石乡\",\n\"711993\":\"六脚乡\",\n\"711994\":\"新港乡\",\n\"711995\":\"民雄乡\",\n\"711996\":\"大林镇\",\n\"711997\":\"溪口乡\",\n\"711998\":\"义竹乡\",\n\"711999\":\"布袋镇\",\n\"712180\":\"斗南镇\",\n\"712181\":\"大埤乡\",\n\"712182\":\"虎尾镇\",\n\"712183\":\"土库镇\",\n\"712184\":\"褒忠乡\",\n\"712185\":\"东势乡\",\n\"712186\":\"台西乡\",\n\"712187\":\"仑背乡\",\n\"712188\":\"麦寮乡\",\n\"712189\":\"斗六市\",\n\"712190\":\"林内乡\",\n\"712191\":\"古坑乡\",\n\"712192\":\"莿桐乡\",\n\"712193\":\"西螺镇\",\n\"712194\":\"二仑乡\",\n\"712195\":\"北港镇\",\n\"712196\":\"水林乡\",\n\"712197\":\"口湖乡\",\n\"712198\":\"四湖乡\",\n\"712199\":\"元长乡\",\n\"712451\":\"崁顶乡\",\n\"712467\":\"屏东市\",\n\"712468\":\"三地门乡\",\n\"712469\":\"雾台乡\",\n\"712470\":\"玛家乡\",\n\"712471\":\"九如乡\",\n\"712472\":\"里港乡\",\n\"712473\":\"高树乡\",\n\"712474\":\"盐埔乡\",\n\"712475\":\"长治乡\",\n\"712476\":\"麟洛乡\",\n\"712477\":\"竹田乡\",\n\"712478\":\"内埔乡\",\n\"712479\":\"万丹乡\",\n\"712480\":\"潮州镇\",\n\"712481\":\"泰武乡\",\n\"712482\":\"来义乡\",\n\"712483\":\"万峦乡\",\n\"712484\":\"莰顶乡\",\n\"712485\":\"新埤乡\",\n\"712486\":\"南州乡\",\n\"712487\":\"林边乡\",\n\"712488\":\"东港镇\",\n\"712489\":\"琉球乡\",\n\"712490\":\"佳冬乡\",\n\"712491\":\"新园乡\",\n\"712492\":\"枋寮乡\",\n\"712493\":\"枋山乡\",\n\"712494\":\"春日乡\",\n\"712495\":\"狮子乡\",\n\"712496\":\"车城乡\",\n\"712497\":\"牡丹乡\",\n\"712498\":\"恒春镇\",\n\"712499\":\"满州乡\",\n\"712584\":\"台东市\",\n\"712585\":\"绿岛乡\",\n\"712586\":\"兰屿乡\",\n\"712587\":\"延平乡\",\n\"712588\":\"卑南乡\",\n\"712589\":\"鹿野乡\",\n\"712590\":\"关山镇\",\n\"712591\":\"海端乡\",\n\"712592\":\"池上乡\",\n\"712593\":\"东河乡\",\n\"712594\":\"成功镇\",\n\"712595\":\"长滨乡\",\n\"712596\":\"金峰乡\",\n\"712597\":\"大武乡\",\n\"712598\":\"达仁乡\",\n\"712599\":\"太麻里乡\",\n\"712686\":\"花莲市\",\n\"712687\":\"新城乡\",\n\"712688\":\"太鲁阁\",\n\"712689\":\"秀林乡\",\n\"712690\":\"吉安乡\",\n\"712691\":\"寿丰乡\",\n\"712692\":\"凤林镇\",\n\"712693\":\"光复乡\",\n\"712694\":\"丰滨乡\",\n\"712695\":\"瑞穗乡\",\n\"712696\":\"万荣乡\",\n\"712697\":\"玉里镇\",\n\"712698\":\"卓溪乡\",\n\"712699\":\"富里乡\",\n\"712794\":\"马公市\",\n\"712795\":\"西屿乡\",\n\"712796\":\"望安乡\",\n\"712797\":\"七美乡\",\n\"712798\":\"白沙乡\",\n\"712799\":\"湖西乡\",\n\"712896\":\"南竿乡\",\n\"712897\":\"北竿乡\",\n\"712898\":\"东引乡\",\n\"712899\":\"莒光乡\",\n\"810101\":\"中西区\",\n\"810102\":\"湾仔区\",\n\"810103\":\"东区\",\n\"810104\":\"南区\",\n\"810201\":\"九龙城区\",\n\"810202\":\"油尖旺区\",\n\"810203\":\"深水埗区\",\n\"810204\":\"黄大仙区\",\n\"810205\":\"观塘区\",\n\"810301\":\"北区\",\n\"810302\":\"大埔区\",\n\"810303\":\"沙田区\",\n\"810304\":\"西贡区\",\n\"810305\":\"元朗区\",\n\"810306\":\"屯门区\",\n\"810307\":\"荃湾区\",\n\"810308\":\"葵青区\",\n\"810309\":\"离岛区\",\n\"820101\":\"澳门半岛\",\n\"820201\":\"离岛\"\n}\n}\n"
  },
  {
    "path": "example/functions/foo/index.js",
    "content": "// 这是一个测试用的云函数\nconst cloud = require('wx-server-sdk');\n\ncloud.init();\n\n// 云函数入口函数\nexports.main = async event => {\n  const wxContext = cloud.getWXContext();\n\n  return {\n    event,\n    openid: wxContext.OPENID,\n    appid: wxContext.APPID,\n    unionid: wxContext.UNIONID\n  };\n};\n"
  },
  {
    "path": "example/functions/foo/package.json",
    "content": "{\n  \"name\": \"foo\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"wx-server-sdk\": \"latest\"\n  }\n}\n"
  },
  {
    "path": "example/pages/action-sheet/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/action-sheet/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"ActionSheet 动作面板\"\n}\n"
  },
  {
    "path": "example/pages/action-sheet/index.wxml",
    "content": "<van-action-sheet-demo />"
  },
  {
    "path": "example/pages/area/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/area/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Area 省市区选择\"\n}\n"
  },
  {
    "path": "example/pages/area/index.wxml",
    "content": "<van-area-demo />"
  },
  {
    "path": "example/pages/button/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/button/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Button 按钮\"\n}\n"
  },
  {
    "path": "example/pages/button/index.wxml",
    "content": "<van-button-demo />"
  },
  {
    "path": "example/pages/calendar/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/calendar/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Calendar 日历\"\n}\n"
  },
  {
    "path": "example/pages/calendar/index.wxml",
    "content": "<van-calendar-demo />"
  },
  {
    "path": "example/pages/card/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/card/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Card 商品卡片\"\n}\n"
  },
  {
    "path": "example/pages/card/index.wxml",
    "content": "<van-card-demo />"
  },
  {
    "path": "example/pages/cascader/index.js",
    "content": "import Page from '../../common/page';\n\nPage();\n"
  },
  {
    "path": "example/pages/cascader/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Cascader 级联选择\"\n}"
  },
  {
    "path": "example/pages/cascader/index.wxml",
    "content": "<van-cascader-demo />"
  },
  {
    "path": "example/pages/cell/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/cell/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Cell 单元格\"\n}\n"
  },
  {
    "path": "example/pages/cell/index.wxml",
    "content": "<van-cell-demo />"
  },
  {
    "path": "example/pages/checkbox/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/checkbox/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Checkbox 复选框\"\n}\n"
  },
  {
    "path": "example/pages/checkbox/index.wxml",
    "content": "<van-checkbox-demo />"
  },
  {
    "path": "example/pages/circle/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/circle/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Circle 进度条\"\n}\n"
  },
  {
    "path": "example/pages/circle/index.wxml",
    "content": "<van-circle-demo />"
  },
  {
    "path": "example/pages/col/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/col/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Layout 布局\"\n}\n"
  },
  {
    "path": "example/pages/col/index.wxml",
    "content": "<van-col-demo />"
  },
  {
    "path": "example/pages/collapse/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/collapse/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Collapse 折叠面板\"\n}\n"
  },
  {
    "path": "example/pages/collapse/index.wxml",
    "content": "<van-collapse-demo />"
  },
  {
    "path": "example/pages/config-provider/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/config-provider/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"ConfigProvider 全局配置\"\n}\n"
  },
  {
    "path": "example/pages/config-provider/index.wxml",
    "content": "<van-config-provider-demo />"
  },
  {
    "path": "example/pages/count-down/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/count-down/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"CountDown 倒计时\"\n}\n"
  },
  {
    "path": "example/pages/count-down/index.wxml",
    "content": "<van-count-down-demo />"
  },
  {
    "path": "example/pages/dashboard/index.js",
    "content": "import list from '../../config';\nimport Page from '../../common/page';\n\nPage({\n  data: {\n    list,\n  },\n});\n"
  },
  {
    "path": "example/pages/dashboard/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Vant Weapp\",\n  \"usingComponents\": {\n    \"demo-home\": \"../../components/demo-home/index\"\n  }\n}\n"
  },
  {
    "path": "example/pages/dashboard/index.wxml",
    "content": "<demo-home list=\"{{ list }}\" />\n"
  },
  {
    "path": "example/pages/datetime-picker/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/datetime-picker/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"DatetimePicker 时间选择\"\n}\n"
  },
  {
    "path": "example/pages/datetime-picker/index.wxml",
    "content": "<van-datetime-picker-demo />"
  },
  {
    "path": "example/pages/dialog/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/dialog/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Dialog 弹出框\"\n}\n"
  },
  {
    "path": "example/pages/dialog/index.wxml",
    "content": "<van-dialog-demo />"
  },
  {
    "path": "example/pages/divider/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/divider/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Divider 分割线\"\n}\n"
  },
  {
    "path": "example/pages/divider/index.wxml",
    "content": "<van-divider-demo />"
  },
  {
    "path": "example/pages/dropdown-menu/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/dropdown-menu/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Dropdown Menu\"\n}\n"
  },
  {
    "path": "example/pages/dropdown-menu/index.wxml",
    "content": "<van-dropdown-menu-demo />"
  },
  {
    "path": "example/pages/empty/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/empty/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Empty 空状态\"\n}\n"
  },
  {
    "path": "example/pages/empty/index.wxml",
    "content": "<van-empty-demo />"
  },
  {
    "path": "example/pages/field/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/field/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Field 输入框\"\n}\n"
  },
  {
    "path": "example/pages/field/index.wxml",
    "content": "<van-field-demo />"
  },
  {
    "path": "example/pages/goods-action/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/goods-action/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"GoodsAction 商品导航\"\n}\n"
  },
  {
    "path": "example/pages/goods-action/index.wxml",
    "content": "<van-goods-action-demo />"
  },
  {
    "path": "example/pages/grid/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/grid/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Grid 宫格\"\n}\n"
  },
  {
    "path": "example/pages/grid/index.wxml",
    "content": "<van-grid-demo />"
  },
  {
    "path": "example/pages/icon/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/icon/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Icon 图标\"\n}\n"
  },
  {
    "path": "example/pages/icon/index.wxml",
    "content": "<van-icon-demo />"
  },
  {
    "path": "example/pages/image/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/image/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Image 图片\"\n}\n"
  },
  {
    "path": "example/pages/image/index.wxml",
    "content": "<van-image-demo />"
  },
  {
    "path": "example/pages/index-bar/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/index-bar/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"IndexBar 索引栏\"\n}\n"
  },
  {
    "path": "example/pages/index-bar/index.wxml",
    "content": "<van-index-bar-demo />"
  },
  {
    "path": "example/pages/loading/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/loading/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Loading 加载\"\n}\n"
  },
  {
    "path": "example/pages/loading/index.wxml",
    "content": "<van-loading-demo />"
  },
  {
    "path": "example/pages/nav-bar/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/nav-bar/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"NavBar 导航栏\"\n}\n"
  },
  {
    "path": "example/pages/nav-bar/index.wxml",
    "content": "<van-nav-bar-demo />"
  },
  {
    "path": "example/pages/notice-bar/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/notice-bar/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"NoticeBar 通知栏\"\n}\n"
  },
  {
    "path": "example/pages/notice-bar/index.wxml",
    "content": "<van-notice-bar-demo />"
  },
  {
    "path": "example/pages/notify/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/notify/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Notify 消息通知\"\n}\n"
  },
  {
    "path": "example/pages/notify/index.wxml",
    "content": "<van-notify-demo />"
  },
  {
    "path": "example/pages/overlay/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/overlay/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Overlay 遮罩层\"\n}\n"
  },
  {
    "path": "example/pages/overlay/index.wxml",
    "content": "<van-overlay-demo />"
  },
  {
    "path": "example/pages/panel/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/panel/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Panel 面板\"\n}\n"
  },
  {
    "path": "example/pages/panel/index.wxml",
    "content": "<van-panel-demo />"
  },
  {
    "path": "example/pages/picker/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/picker/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Picker 选择器\"\n}\n"
  },
  {
    "path": "example/pages/picker/index.wxml",
    "content": "<van-picker-demo />"
  },
  {
    "path": "example/pages/popup/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/popup/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Popup 弹出层\"\n}\n"
  },
  {
    "path": "example/pages/popup/index.wxml",
    "content": "<van-popup-demo />"
  },
  {
    "path": "example/pages/popup/index.wxss",
    "content": ":host {\n  font-size: 16px;\n}\n"
  },
  {
    "path": "example/pages/progress/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/progress/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Progress 进度条\"\n}\n"
  },
  {
    "path": "example/pages/progress/index.wxml",
    "content": "<van-progress-demo />"
  },
  {
    "path": "example/pages/radio/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/radio/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Radio 单选框\"\n}\n"
  },
  {
    "path": "example/pages/radio/index.wxml",
    "content": "<van-radio-demo />"
  },
  {
    "path": "example/pages/rate/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/rate/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Rate 评分\"\n}\n"
  },
  {
    "path": "example/pages/rate/index.wxml",
    "content": "<van-rate-demo />"
  },
  {
    "path": "example/pages/rate/index.wxss",
    "content": ""
  },
  {
    "path": "example/pages/search/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/search/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Search 搜索\"\n}\n"
  },
  {
    "path": "example/pages/search/index.wxml",
    "content": "<van-search-demo />"
  },
  {
    "path": "example/pages/share-sheet/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/share-sheet/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"ShareSheet 分享面板\"\n}\n"
  },
  {
    "path": "example/pages/share-sheet/index.wxml",
    "content": "<van-share-sheet-demo />"
  },
  {
    "path": "example/pages/sidebar/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/sidebar/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Sidebar 侧边导航\"\n}\n"
  },
  {
    "path": "example/pages/sidebar/index.wxml",
    "content": "<van-sidebar-demo />"
  },
  {
    "path": "example/pages/sidebar/index.wxss",
    "content": "page {\n  background-color: #fff;\n}\n"
  },
  {
    "path": "example/pages/skeleton/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/skeleton/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Skeleton 骨架屏\"\n}\n"
  },
  {
    "path": "example/pages/skeleton/index.wxml",
    "content": "<van-skeleton-demo />"
  },
  {
    "path": "example/pages/slider/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/slider/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Slider 滑块\"\n}\n"
  },
  {
    "path": "example/pages/slider/index.wxml",
    "content": "<van-slider-demo />"
  },
  {
    "path": "example/pages/stepper/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/stepper/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Stepper 步进器\"\n}\n"
  },
  {
    "path": "example/pages/stepper/index.wxml",
    "content": "<van-stepper-demo />"
  },
  {
    "path": "example/pages/steps/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/steps/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Steps 步骤条\"\n}\n"
  },
  {
    "path": "example/pages/steps/index.wxml",
    "content": "<van-steps-demo />"
  },
  {
    "path": "example/pages/sticky/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/sticky/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Sticky 粘性布局\"\n}\n"
  },
  {
    "path": "example/pages/sticky/index.wxml",
    "content": "<van-sticky-demo />"
  },
  {
    "path": "example/pages/sticky/index.wxss",
    "content": "page {\n  height: 200vh;\n}\n"
  },
  {
    "path": "example/pages/submit-bar/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/submit-bar/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"SubmitBar 提交订单栏\"\n}\n"
  },
  {
    "path": "example/pages/submit-bar/index.wxml",
    "content": "<van-submit-bar-demo />"
  },
  {
    "path": "example/pages/swipe-cell/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/swipe-cell/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"SwipeCell 滑动单元格\"\n}\n"
  },
  {
    "path": "example/pages/swipe-cell/index.wxml",
    "content": "<van-swipe-cell-demo />"
  },
  {
    "path": "example/pages/switch/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/switch/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Switch 开关\"\n}\n"
  },
  {
    "path": "example/pages/switch/index.wxml",
    "content": "<van-switch-demo />"
  },
  {
    "path": "example/pages/tab/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/tab/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Tab 标签页\"\n}\n"
  },
  {
    "path": "example/pages/tab/index.wxml",
    "content": "<van-tab-demo />"
  },
  {
    "path": "example/pages/tabbar/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/tabbar/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Tabbar 标签栏\"\n}\n"
  },
  {
    "path": "example/pages/tabbar/index.wxml",
    "content": "<van-tabbar-demo />"
  },
  {
    "path": "example/pages/tag/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/tag/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Tag 标记\"\n}\n"
  },
  {
    "path": "example/pages/tag/index.wxml",
    "content": "<van-tag-demo />"
  },
  {
    "path": "example/pages/toast/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/toast/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Toast 轻提示\"\n}\n"
  },
  {
    "path": "example/pages/toast/index.wxml",
    "content": "<van-toast-demo />"
  },
  {
    "path": "example/pages/transition/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/transition/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Transition 动画\"\n}\n"
  },
  {
    "path": "example/pages/transition/index.wxml",
    "content": "<van-transition-demo />"
  },
  {
    "path": "example/pages/tree-select/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/tree-select/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"TreeSelect 分类选择\"\n}\n"
  },
  {
    "path": "example/pages/tree-select/index.wxml",
    "content": "<van-tree-select-demo />"
  },
  {
    "path": "example/pages/uploader/index.js",
    "content": "import Page from '../../common/page';\n\nPage();"
  },
  {
    "path": "example/pages/uploader/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"Uploader 文件上传\"\n}\n"
  },
  {
    "path": "example/pages/uploader/index.wxml",
    "content": "<van-uploader-demo />"
  },
  {
    "path": "example/pages/uploader/index.wxss",
    "content": "page {\n  background-color: #fff;\n}\n"
  },
  {
    "path": "example/project.config.json",
    "content": "{\n  \"description\": \"项目配置文件\",\n  \"packOptions\": {\n    \"ignore\": [],\n    \"include\": []\n  },\n  \"setting\": {\n    \"urlCheck\": false,\n    \"es6\": true,\n    \"enhance\": true,\n    \"postcss\": false,\n    \"preloadBackgroundData\": false,\n    \"minified\": true,\n    \"newFeature\": false,\n    \"coverView\": true,\n    \"nodeModules\": false,\n    \"autoAudits\": false,\n    \"showShadowRootInWxmlPanel\": true,\n    \"scopeDataCheck\": false,\n    \"uglifyFileName\": false,\n    \"checkInvalidKey\": true,\n    \"checkSiteMap\": true,\n    \"uploadWithSourceMap\": true,\n    \"compileHotReLoad\": false,\n    \"lazyloadPlaceholderEnable\": false,\n    \"useMultiFrameRuntime\": true,\n    \"useApiHook\": true,\n    \"useApiHostProcess\": false,\n    \"babelSetting\": {\n      \"ignore\": [],\n      \"disablePlugins\": [],\n      \"outputPath\": \"\"\n    },\n    \"enableEngineNative\": false,\n    \"useIsolateContext\": true,\n    \"userConfirmedBundleSwitch\": false,\n    \"packNpmManually\": false,\n    \"packNpmRelationList\": [],\n    \"minifyWXSS\": true,\n    \"showES6CompileOption\": false,\n    \"ignoreUploadUnusedFiles\": true,\n    \"condition\": false\n  },\n  \"compileType\": \"miniprogram\",\n  \"libVersion\": \"2.27.3\",\n  \"appid\": \"wx1c01b35002d3ba14\",\n  \"projectname\": \"vant-weapp\",\n  \"condition\": {\n    \"miniprogram\": {\n      \"list\": [\n        {\n          \"name\": \"button\",\n          \"pathName\": \"pages/button/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"loading\",\n          \"pathName\": \"pages/loading/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"icon\",\n          \"pathName\": \"pages/icon/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"layout\",\n          \"pathName\": \"pages/col/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"cell\",\n          \"pathName\": \"pages/cell/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"config-provider\",\n          \"pathName\": \"pages/config-provider/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"card\",\n          \"pathName\": \"pages/card/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"stepper\",\n          \"pathName\": \"pages/stepper/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"switch\",\n          \"pathName\": \"pages/switch/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"tag\",\n          \"pathName\": \"pages/tag/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"notice-bar\",\n          \"pathName\": \"pages/notice-bar/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"tree-select\",\n          \"pathName\": \"pages/tree-select/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"select\",\n          \"pathName\": \"pages/select/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"field\",\n          \"pathName\": \"pages/field/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"sidebar\",\n          \"pathName\": \"pages/sidebar/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"panel\",\n          \"pathName\": \"pages/panel/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"popup\",\n          \"pathName\": \"pages/popup/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"action-sheet\",\n          \"pathName\": \"pages/action-sheet/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"steps\",\n          \"pathName\": \"pages/steps/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"search\",\n          \"pathName\": \"pages/search/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"nav-bar\",\n          \"pathName\": \"pages/nav-bar/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"notify\",\n          \"pathName\": \"pages/notify/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"toast\",\n          \"pathName\": \"pages/toast/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"tabbar\",\n          \"pathName\": \"pages/tabbar/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"transition\",\n          \"pathName\": \"pages/transition/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"slider\",\n          \"pathName\": \"pages/slider/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"progress\",\n          \"pathName\": \"pages/progress/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"area\",\n          \"pathName\": \"pages/area/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"tab\",\n          \"pathName\": \"pages/tab/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"dialog\",\n          \"pathName\": \"pages/dialog/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"submit-bar\",\n          \"pathName\": \"pages/submit-bar/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"checkbox\",\n          \"pathName\": \"pages/checkbox/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"goods-action\",\n          \"pathName\": \"pages/goods-action/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"radio\",\n          \"pathName\": \"pages/radio/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"swipe-cell\",\n          \"pathName\": \"pages/swipe-cell/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"rate\",\n          \"pathName\": \"pages/rate/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"collapse\",\n          \"pathName\": \"pages/collapse/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"datetime-picker\",\n          \"pathName\": \"pages/datetime-picker/index\",\n          \"query\": \"\"\n        },\n        {\n          \"name\": \"sticky\",\n          \"pathName\": \"pages/sticky/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"picker\",\n          \"pathName\": \"pages/picker/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"overlay\",\n          \"pathName\": \"pages/overlay/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"circle\",\n          \"pathName\": \"pages/circle/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"grid\",\n          \"pathName\": \"pages/grid/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"count-down\",\n          \"pathName\": \"pages/count-down/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"image\",\n          \"pathName\": \"pages/image/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"skeleton\",\n          \"pathName\": \"pages/skeleton/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"uploader\",\n          \"pathName\": \"pages/uploader/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"dropdown-menu\",\n          \"pathName\": \"pages/dropdown-menu/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"calendar\",\n          \"pathName\": \"pages/calendar/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"index-bar\",\n          \"pathName\": \"pages/index-bar/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"empty\",\n          \"pathName\": \"pages/empty/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"share-sheet\",\n          \"pathName\": \"pages/share-sheet/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"col\",\n          \"pathName\": \"pages/col/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"divider\",\n          \"pathName\": \"pages/divider/index\",\n          \"query\": \"\",\n          \"scene\": null\n        },\n        {\n          \"name\": \"cascader\",\n          \"pathName\": \"pages/cascader/index\",\n          \"query\": \"\",\n          \"scene\": null\n        }\n      ]\n    }\n  },\n  \"editorSetting\": {\n    \"tabIndent\": \"insertSpaces\",\n    \"tabSize\": 2\n  }\n}"
  },
  {
    "path": "example/sitemap.json",
    "content": "{\n  \"desc\": \"关于本文件的更多信息，请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html\",\n  \"rules\": [{\n  \"action\": \"allow\",\n  \"page\": \"*\"\n  }]\n}"
  },
  {
    "path": "jest.config.js",
    "content": "module.exports = {\n  bail: 1,\n  verbose: true,\n  testEnvironment: 'jsdom',\n  testURL: 'https://jest.test',\n  moduleFileExtensions: ['js', 'ts'],\n  testMatch: ['<rootDir>/packages/**/test/**/*.spec.{js,ts}'],\n  transformIgnorePatterns: [\"/node_modules/(?!@vant/)\"],\n  transform: {\n    \"^.+\\\\.js?$\": \"babel-jest\", // Adding this line solved the issue\n    \"^.+\\\\.ts?$\": \"ts-jest\"\n  },\n  collectCoverageFrom: [\n    '<rootDir>/packages/**/*.{js,ts}',\n    '!**/test/**'\n  ],\n  preset: \"ts-jest\",\n  snapshotSerializers: ['miniprogram-simulate/jest-snapshot-plugin']\n}\n"
  },
  {
    "path": "lib/action-sheet/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/action-sheet/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\n(0, component_1.VantComponent)({\n    classes: ['list-class'],\n    mixins: [button_1.button],\n    props: {\n        show: Boolean,\n        title: String,\n        cancelText: String,\n        description: String,\n        round: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        actions: {\n            type: Array,\n            value: [],\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickAction: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onSelect: function (event) {\n            var _this = this;\n            var index = event.currentTarget.dataset.index;\n            var _a = this.data, actions = _a.actions, closeOnClickAction = _a.closeOnClickAction, canIUseGetUserProfile = _a.canIUseGetUserProfile;\n            var item = actions[index];\n            if (item) {\n                this.$emit('select', item);\n                if (closeOnClickAction) {\n                    this.onClose();\n                }\n                if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {\n                    wx.getUserProfile({\n                        desc: item.getUserProfileDesc || '  ',\n                        complete: function (userProfile) {\n                            _this.$emit('getuserinfo', userProfile);\n                        },\n                    });\n                }\n            }\n        },\n        onCancel: function () {\n            this.$emit('cancel');\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n        onClickOverlay: function () {\n            this.$emit('click-overlay');\n            this.onClose();\n        },\n    },\n});\n"
  },
  {
    "path": "lib/action-sheet/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-popup\": \"../popup/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "lib/action-sheet/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<van-popup\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  round=\"{{ round }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay=\"{{ overlay }}\"\n  custom-class=\"van-action-sheet custom-class\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClickOverlay\"\n>\n  <view wx:if=\"{{ title }}\" class=\"van-action-sheet__header\">\n    {{ title }}\n    <van-icon\n      name=\"cross\"\n      custom-class=\"van-action-sheet__close\"\n      bind:click=\"onClose\"\n    />\n  </view>\n  <view wx:if=\"{{ description }}\" class=\"van-action-sheet__description van-hairline--bottom\">\n    {{ description }}\n  </view>\n  <view wx:if=\"{{ actions && actions.length }}\" class=\"list-class\">\n    <!-- button外包一层view，防止actions动态变化，导致渲染时button被打散 -->\n    <button\n      wx:for=\"{{ actions }}\"\n      wx:key=\"index\"\n      open-type=\"{{ item.disabled || item.loading || (canIUseGetUserProfile && item.openType === 'getUserInfo') ? '' : item.openType }}\"\n      style=\"{{ item.color ? 'color: ' + item.color : '' }}\"\n      class=\"{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}\"\n      hover-class=\"van-action-sheet__item--hover\"\n      data-index=\"{{ index }}\"\n      bindtap=\"{{ item.disabled || item.loading ? '' : 'onSelect' }}\"\n      bindgetuserinfo=\"onGetUserInfo\"\n      bindcontact=\"onContact\"\n      bindgetphonenumber=\"onGetPhoneNumber\"\n      binderror=\"onError\"\n      bindlaunchapp=\"onLaunchApp\"\n      bindopensetting=\"onOpenSetting\"\n      lang=\"{{ lang }}\"\n      session-from=\"{{ sessionFrom }}\"\n      send-message-title=\"{{ sendMessageTitle }}\"\n      send-message-path=\"{{ sendMessagePath }}\"\n      send-message-img=\"{{ sendMessageImg }}\"\n      show-message-card=\"{{ showMessageCard }}\"\n      app-parameter=\"{{ appParameter }}\"\n    >\n      <block wx:if=\"{{ !item.loading }}\">\n        {{ item.name }}\n        <view wx:if=\"{{ item.subname }}\" class=\"van-action-sheet__subname\" >{{ item.subname }}</view>\n      </block>\n      <van-loading wx:else custom-class=\"van-action-sheet__loading\" size=\"22px\" />\n    </button>\n  </view>\n  <slot />\n  <block wx:if=\"{{ cancelText }}\">\n    <view class=\"van-action-sheet__gap\" />\n    <view\n      class=\"van-action-sheet__cancel\"\n      hover-class=\"van-action-sheet__cancel--hover\"\n      hover-stay-time=\"70\"\n      bind:tap=\"onCancel\"\n    >\n      {{ cancelText }}\n    </view>\n  </block>\n</van-popup>\n"
  },
  {
    "path": "lib/action-sheet/index.wxss",
    "content": "@import '../common/index.wxss';.van-action-sheet{color:var(--action-sheet-item-text-color,#323233);max-height:var(--action-sheet-max-height,90%)!important}.van-action-sheet__cancel,.van-action-sheet__item{background-color:var(--action-sheet-item-background,#fff);font-size:var(--action-sheet-item-font-size,16px);line-height:var(--action-sheet-item-line-height,22px);padding:14px 16px;text-align:center}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{background-color:var(--action-sheet-cancel-padding-color,#f7f8fa);display:block;height:var(--action-sheet-cancel-padding-top,8px)}.van-action-sheet__item--disabled{color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{color:var(--action-sheet-subname-color,#969799);font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.van-action-sheet__header{font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--font-weight-bold,500);line-height:var(--action-sheet-header-height,48px);text-align:center}.van-action-sheet__description{color:var(--action-sheet-description-color,#969799);font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.van-action-sheet__close{color:var(--action-sheet-close-icon-color,#c8c9cc);font-size:var(--action-sheet-close-icon-size,22px)!important;line-height:inherit!important;padding:var(--action-sheet-close-icon-padding,0 16px);position:absolute!important;right:0;top:0}.van-action-sheet__loading{display:flex!important}"
  },
  {
    "path": "lib/area/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/area/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar shared_1 = require(\"../picker/shared\");\nvar utils_1 = require(\"../common/utils\");\nvar EMPTY_CODE = '000000';\n(0, component_1.VantComponent)({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: __assign(__assign({}, shared_1.pickerProps), { showToolbar: {\n            type: Boolean,\n            value: true,\n        }, value: {\n            type: String,\n            observer: function (value) {\n                this.code = value;\n                this.setValues();\n            },\n        }, areaList: {\n            type: Object,\n            value: {},\n            observer: 'setValues',\n        }, columnsNum: {\n            type: null,\n            value: 3,\n        }, columnsPlaceholder: {\n            type: Array,\n            observer: function (val) {\n                this.setData({\n                    typeToColumnsPlaceholder: {\n                        province: val[0] || '',\n                        city: val[1] || '',\n                        county: val[2] || '',\n                    },\n                });\n            },\n        } }),\n    data: {\n        columns: [{ values: [] }, { values: [] }, { values: [] }],\n        typeToColumnsPlaceholder: {},\n    },\n    mounted: function () {\n        var _this = this;\n        (0, utils_1.requestAnimationFrame)(function () {\n            _this.setValues();\n        });\n    },\n    methods: {\n        getPicker: function () {\n            if (this.picker == null) {\n                this.picker = this.selectComponent('.van-area__picker');\n            }\n            return this.picker;\n        },\n        onCancel: function (event) {\n            this.emit('cancel', event.detail);\n        },\n        onConfirm: function (event) {\n            var index = event.detail.index;\n            var value = event.detail.value;\n            value = this.parseValues(value);\n            this.emit('confirm', { value: value, index: index });\n        },\n        emit: function (type, detail) {\n            detail.values = detail.value;\n            delete detail.value;\n            this.$emit(type, detail);\n        },\n        parseValues: function (values) {\n            var columnsPlaceholder = this.data.columnsPlaceholder;\n            return values.map(function (value, index) {\n                if (value &&\n                    (!value.code || value.name === columnsPlaceholder[index])) {\n                    return __assign(__assign({}, value), { code: '', name: '' });\n                }\n                return value;\n            });\n        },\n        onChange: function (event) {\n            var _this = this;\n            var _a;\n            var _b = event.detail, index = _b.index, picker = _b.picker, value = _b.value;\n            this.code = value[index].code;\n            (_a = this.setValues()) === null || _a === void 0 ? void 0 : _a.then(function () {\n                _this.$emit('change', {\n                    picker: picker,\n                    values: _this.parseValues(picker.getValues()),\n                    index: index,\n                });\n            });\n        },\n        getConfig: function (type) {\n            var areaList = this.data.areaList;\n            return (areaList && areaList[\"\".concat(type, \"_list\")]) || {};\n        },\n        getList: function (type, code) {\n            if (type !== 'province' && !code) {\n                return [];\n            }\n            var typeToColumnsPlaceholder = this.data.typeToColumnsPlaceholder;\n            var list = this.getConfig(type);\n            var result = Object.keys(list).map(function (code) { return ({\n                code: code,\n                name: list[code],\n            }); });\n            if (code != null) {\n                // oversea code\n                if (code[0] === '9' && type === 'city') {\n                    code = '9';\n                }\n                result = result.filter(function (item) { return item.code.indexOf(code) === 0; });\n            }\n            if (typeToColumnsPlaceholder[type] && result.length) {\n                // set columns placeholder\n                var codeFill = type === 'province'\n                    ? ''\n                    : type === 'city'\n                        ? EMPTY_CODE.slice(2, 4)\n                        : EMPTY_CODE.slice(4, 6);\n                result.unshift({\n                    code: \"\".concat(code).concat(codeFill),\n                    name: typeToColumnsPlaceholder[type],\n                });\n            }\n            return result;\n        },\n        getIndex: function (type, code) {\n            var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;\n            var list = this.getList(type, code.slice(0, compareNum - 2));\n            // oversea code\n            if (code[0] === '9' && type === 'province') {\n                compareNum = 1;\n            }\n            code = code.slice(0, compareNum);\n            for (var i = 0; i < list.length; i++) {\n                if (list[i].code.slice(0, compareNum) === code) {\n                    return i;\n                }\n            }\n            return 0;\n        },\n        setValues: function () {\n            var picker = this.getPicker();\n            if (!picker) {\n                return;\n            }\n            var code = this.code || this.getDefaultCode();\n            var provinceList = this.getList('province');\n            var cityList = this.getList('city', code.slice(0, 2));\n            var stack = [];\n            var indexes = [];\n            var columnsNum = this.data.columnsNum;\n            if (columnsNum >= 1) {\n                stack.push(picker.setColumnValues(0, provinceList, false));\n                indexes.push(this.getIndex('province', code));\n            }\n            if (columnsNum >= 2) {\n                stack.push(picker.setColumnValues(1, cityList, false));\n                indexes.push(this.getIndex('city', code));\n                if (cityList.length && code.slice(2, 4) === '00') {\n                    code = cityList[0].code;\n                }\n            }\n            if (columnsNum === 3) {\n                stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false));\n                indexes.push(this.getIndex('county', code));\n            }\n            return Promise.all(stack)\n                .catch(function () { })\n                .then(function () { return picker.setIndexes(indexes); })\n                .catch(function () { });\n        },\n        getDefaultCode: function () {\n            var columnsPlaceholder = this.data.columnsPlaceholder;\n            if (columnsPlaceholder.length) {\n                return EMPTY_CODE;\n            }\n            var countyCodes = Object.keys(this.getConfig('county'));\n            if (countyCodes[0]) {\n                return countyCodes[0];\n            }\n            var cityCodes = Object.keys(this.getConfig('city'));\n            if (cityCodes[0]) {\n                return cityCodes[0];\n            }\n            return '';\n        },\n        getValues: function () {\n            var picker = this.getPicker();\n            if (!picker) {\n                return [];\n            }\n            return this.parseValues(picker.getValues().filter(function (value) { return !!value; }));\n        },\n        getDetail: function () {\n            var values = this.getValues();\n            var area = {\n                code: '',\n                country: '',\n                province: '',\n                city: '',\n                county: '',\n            };\n            if (!values.length) {\n                return area;\n            }\n            var names = values.map(function (item) { return item.name; });\n            area.code = values[values.length - 1].code;\n            if (area.code[0] === '9') {\n                area.country = names[1] || '';\n                area.province = names[2] || '';\n            }\n            else {\n                area.province = names[0] || '';\n                area.city = names[1] || '';\n                area.county = names[2] || '';\n            }\n            return area;\n        },\n        reset: function (code) {\n            this.code = code || '';\n            return this.setValues();\n        },\n    },\n});\n"
  },
  {
    "path": "lib/area/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-picker\": \"../picker/index\"\n  }\n}\n"
  },
  {
    "path": "lib/area/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-picker\n  class=\"van-area__picker\"\n  active-class=\"active-class\"\n  toolbar-class=\"toolbar-class\"\n  column-class=\"column-class\"\n  show-toolbar=\"{{ showToolbar }}\"\n  value-key=\"name\"\n  title=\"{{ title }}\"\n  loading=\"{{ loading }}\"\n  columns=\"{{ computed.displayColumns(columns, columnsNum) }}\"\n  item-height=\"{{ itemHeight }}\"\n  visible-item-count=\"{{ visibleItemCount }}\"\n  cancel-button-text=\"{{ cancelButtonText }}\"\n  confirm-button-text=\"{{ confirmButtonText }}\"\n  bind:change=\"onChange\"\n  bind:confirm=\"onConfirm\"\n  bind:cancel=\"onCancel\"\n/>\n"
  },
  {
    "path": "lib/area/index.wxs",
    "content": "/* eslint-disable */\nfunction displayColumns(columns, columnsNum) {\n  return columns.slice(0, +columnsNum);\n}\n\nmodule.exports = {\n  displayColumns: displayColumns,\n};\n"
  },
  {
    "path": "lib/area/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "lib/button/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/button/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\nvar version_1 = require(\"../common/version\");\nvar mixins = [button_1.button];\nif ((0, version_1.canIUseFormFieldButton)()) {\n    mixins.push('wx://form-field-button');\n}\n(0, component_1.VantComponent)({\n    mixins: mixins,\n    classes: ['hover-class', 'loading-class'],\n    data: {\n        baseStyle: '',\n    },\n    props: {\n        formType: String,\n        icon: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        plain: Boolean,\n        block: Boolean,\n        round: Boolean,\n        square: Boolean,\n        loading: Boolean,\n        hairline: Boolean,\n        disabled: Boolean,\n        loadingText: String,\n        customStyle: String,\n        loadingType: {\n            type: String,\n            value: 'circular',\n        },\n        type: {\n            type: String,\n            value: 'default',\n        },\n        dataset: null,\n        size: {\n            type: String,\n            value: 'normal',\n        },\n        loadingSize: {\n            type: String,\n            value: '20px',\n        },\n        color: String,\n    },\n    methods: {\n        onClick: function (event) {\n            var _this = this;\n            this.$emit('click', event);\n            var _a = this.data, canIUseGetUserProfile = _a.canIUseGetUserProfile, openType = _a.openType, getUserProfileDesc = _a.getUserProfileDesc, lang = _a.lang;\n            if (openType === 'getUserInfo' && canIUseGetUserProfile) {\n                wx.getUserProfile({\n                    desc: getUserProfileDesc || '  ',\n                    lang: lang || 'en',\n                    complete: function (userProfile) {\n                        _this.$emit('getuserinfo', userProfile);\n                    },\n                });\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/button/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "lib/button/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<button\n  id=\"{{ id || buttonId }}\"\n  data-detail=\"{{ dataset }}\"\n  class=\"custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}\"\n  hover-class=\"{{ disabled || loading ? '' : 'van-button--active hover-class'}}\"\n  lang=\"{{ lang }}\"\n  form-type=\"{{ formType }}\"\n  style=\"{{ computed.rootStyle({ plain, color, customStyle }) }}\"\n  open-type=\"{{ disabled || loading || (canIUseGetUserProfile && openType === 'getUserInfo') ? '' : openType }}\"\n  business-id=\"{{ businessId }}\"\n  session-from=\"{{ sessionFrom }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  app-parameter=\"{{ appParameter }}\"\n  aria-label=\"{{ ariaLabel }}\"\n  bindtap=\"{{ disabled || loading ? '' : 'onClick' }}\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindcontact=\"onContact\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindgetrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n  bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n  binderror=\"onError\"\n  bindlaunchapp=\"onLaunchApp\"\n  bindopensetting=\"onOpenSetting\"\n  bindchooseavatar=\"onChooseAvatar\"\n>\n  <block wx:if=\"{{ loading }}\">\n    <van-loading\n      custom-class=\"loading-class\"\n      size=\"{{ loadingSize }}\"\n      type=\"{{ loadingType }}\"\n      color=\"{{ computed.loadingColor({ type, color, plain }) }}\"\n    />\n    <view wx:if=\"{{ loadingText }}\" class=\"van-button__loading-text\">\n      {{ loadingText }}\n    </view>\n  </block>\n  <block wx:else>\n    <van-icon\n      wx:if=\"{{ icon }}\"\n      size=\"1.2em\"\n      name=\"{{ icon }}\"\n      class-prefix=\"{{ classPrefix }}\"\n      class=\"van-button__icon\"\n      custom-style=\"line-height: inherit;\"\n    />\n    <view class=\"van-button__text\">\n      <slot />\n    </view>\n  </block>\n</button>\n"
  },
  {
    "path": "lib/button/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  if (!data.color) {\n    return data.customStyle;\n  }\n\n  var properties = {\n    color: data.plain ? data.color : '#fff',\n    background: data.plain ? null : data.color,\n  };\n\n  // hide border when color is linear-gradient\n  if (data.color.indexOf('gradient') !== -1) {\n    properties.border = 0;\n  } else {\n    properties['border-color'] = data.color;\n  }\n\n  return style([properties, data.customStyle]);\n}\n\nfunction loadingColor(data) {\n  if (data.plain) {\n    return data.color ? data.color : '#c9c9c9';\n  }\n\n  if (data.type === 'default') {\n    return '#c9c9c9';\n  }\n\n  return '#fff';\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  loadingColor: loadingColor,\n};\n"
  },
  {
    "path": "lib/button/index.wxss",
    "content": "@import '../common/index.wxss';.van-button{-webkit-text-size-adjust:100%;align-items:center;-webkit-appearance:none;border-radius:var(--button-border-radius,2px);box-sizing:border-box;display:inline-flex;font-size:var(--button-default-font-size,16px);height:var(--button-default-height,44px);justify-content:center;line-height:var(--button-line-height,20px);padding:0;position:relative;text-align:center;transition:opacity .2s;vertical-align:middle}.van-button:before{background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:\" \";height:100%;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{background:var(--button-default-background-color,#fff);border:var(--button-border-width,1px) solid var(--button-default-border-color,#ebedf0);color:var(--button-default-color,#323233)}.van-button--primary{background:var(--button-primary-background-color,#07c160);border:var(--button-border-width,1px) solid var(--button-primary-border-color,#07c160);color:var(--button-primary-color,#fff)}.van-button--info{background:var(--button-info-background-color,#1989fa);border:var(--button-border-width,1px) solid var(--button-info-border-color,#1989fa);color:var(--button-info-color,#fff)}.van-button--danger{background:var(--button-danger-background-color,#ee0a24);border:var(--button-border-width,1px) solid var(--button-danger-border-color,#ee0a24);color:var(--button-danger-color,#fff)}.van-button--warning{background:var(--button-warning-background-color,#ff976a);border:var(--button-border-width,1px) solid var(--button-warning-border-color,#ff976a);color:var(--button-warning-color,#fff)}.van-button--plain{background:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:var(--button-warning-background-color,#ff976a)}.van-button--large{height:var(--button-large-height,50px);width:100%}.van-button--normal{font-size:var(--button-normal-font-size,14px);padding:0 15px}.van-button--small{font-size:var(--button-small-font-size,12px);height:var(--button-small-height,30px);min-width:var(--button-small-min-width,60px);padding:0 var(--padding-xs,8px)}.van-button--mini{display:inline-block;font-size:var(--button-mini-font-size,10px);height:var(--button-mini-height,22px);min-width:var(--button-mini-min-width,50px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:flex;width:100%}.van-button--round{border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{line-height:inherit!important;min-width:1em;vertical-align:top}.van-button--hairline{border-width:0;padding-top:1px}.van-button--hairline:after{border-color:inherit;border-radius:calc(var(--button-border-radius, 2px)*2);border-width:1px}.van-button--hairline.van-button--round:after{border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}"
  },
  {
    "path": "lib/calendar/calendar.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<view class=\"van-calendar\">\n  <header\n    title=\"{{ title }}\"\n    showTitle=\"{{ showTitle }}\"\n    subtitle=\"{{ subtitle }}\"\n    showSubtitle=\"{{ showSubtitle }}\"\n    firstDayOfWeek=\"{{ firstDayOfWeek }}\"\n    bind:click-subtitle=\"onClickSubtitle\"\n  >\n    <slot name=\"title\" slot=\"title\"></slot>\n  </header>\n\n  <scroll-view\n    class=\"van-calendar__body\"\n    scroll-y\n    scroll-into-view=\"{{ scrollIntoView }}\"\n  >\n    <month\n      wx:for=\"{{ computed.getMonths(minDate, maxDate) }}\"\n      wx:key=\"index\"\n      id=\"month{{ index }}\"\n      class=\"month\"\n      data-date=\"{{ item }}\"\n      date=\"{{ item }}\"\n      type=\"{{ type }}\"\n      color=\"{{ color }}\"\n      minDate=\"{{ minDate }}\"\n      maxDate=\"{{ maxDate }}\"\n      showMark=\"{{ showMark }}\"\n      formatter=\"{{ formatter }}\"\n      rowHeight=\"{{ rowHeight }}\"\n      currentDate=\"{{ currentDate }}\"\n      showSubtitle=\"{{ showSubtitle }}\"\n      allowSameDay=\"{{ allowSameDay }}\"\n      showMonthTitle=\"{{ index !== 0 || !showSubtitle }}\"\n      firstDayOfWeek=\"{{ firstDayOfWeek }}\"\n      bind:click=\"onClickDay\"\n    />\n  </scroll-view>\n\n  <view\n    class=\"{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}\"\n  >\n    <slot name=\"footer\"></slot>\n  </view>\n\n  <view\n    class=\"{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}\"\n  >\n    <van-button\n      wx:if=\"{{ showConfirm }}\"\n      round\n      block\n      type=\"danger\"\n      color=\"{{ color }}\"\n      custom-class=\"van-calendar__confirm\"\n      disabled=\"{{ computed.getButtonDisabled(type, currentDate, minRange) }}\"\n      nativeType=\"text\"\n      bind:click=\"onConfirm\"\n    >\n      {{\n        computed.getButtonDisabled(type, currentDate, minRange)\n          ? confirmDisabledText\n          : confirmText\n      }}\n    </van-button>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/calendar/components/header/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/calendar/components/header/index.js",
    "content": "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../../../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        title: {\n            type: String,\n            value: '日期选择',\n        },\n        subtitle: String,\n        showTitle: Boolean,\n        showSubtitle: Boolean,\n        firstDayOfWeek: {\n            type: Number,\n            observer: 'initWeekDay',\n        },\n    },\n    data: {\n        weekdays: [],\n    },\n    created: function () {\n        this.initWeekDay();\n    },\n    methods: {\n        initWeekDay: function () {\n            var defaultWeeks = ['日', '一', '二', '三', '四', '五', '六'];\n            var firstDayOfWeek = this.data.firstDayOfWeek || 0;\n            this.setData({\n                weekdays: __spreadArray(__spreadArray([], defaultWeeks.slice(firstDayOfWeek, 7), true), defaultWeeks.slice(0, firstDayOfWeek), true),\n            });\n        },\n        onClickSubtitle: function (event) {\n            this.$emit('click-subtitle', event);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/calendar/components/header/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/calendar/components/header/index.wxml",
    "content": "<view class=\"van-calendar__header\">\n  <block wx:if=\"{{ showTitle }}\">\n    <view class=\"van-calendar__header-title\"><slot name=\"title\"></slot></view>\n    <view class=\"van-calendar__header-title\">{{ title }}</view>\n  </block>\n\n  <view wx:if=\"{{ showSubtitle }}\" class=\"van-calendar__header-subtitle\" bind:tap=\"onClickSubtitle\">\n    {{ subtitle }}\n  </view>\n\n  <view class=\"van-calendar__weekdays\">\n    <view wx:for=\"{{ weekdays }}\" wx:key=\"index\" class=\"van-calendar__weekday\">\n      {{ item }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/calendar/components/header/index.wxss",
    "content": "@import '../../../common/index.wxss';.van-calendar__header{box-shadow:var(--calendar-header-box-shadow,0 2px 10px hsla(220,1%,50%,.16));flex-shrink:0}.van-calendar__header-subtitle,.van-calendar__header-title{font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.van-calendar__header-title+.van-calendar__header-title,.van-calendar__header-title:empty{display:none}.van-calendar__header-title:empty+.van-calendar__header-title{display:block!important}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--calendar-weekdays-font-size,12px);line-height:var(--calendar-weekdays-height,30px);text-align:center}"
  },
  {
    "path": "lib/calendar/components/month/index.d.ts",
    "content": "export interface Day {\n    date: Date;\n    type: string;\n    text: number;\n    bottomInfo?: string;\n}\n"
  },
  {
    "path": "lib/calendar/components/month/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../../../common/component\");\nvar utils_1 = require(\"../../utils\");\n(0, component_1.VantComponent)({\n    props: {\n        date: {\n            type: null,\n            observer: 'setDays',\n        },\n        type: {\n            type: String,\n            observer: 'setDays',\n        },\n        color: String,\n        minDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        maxDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        showMark: Boolean,\n        rowHeight: null,\n        formatter: {\n            type: null,\n            observer: 'setDays',\n        },\n        currentDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        firstDayOfWeek: {\n            type: Number,\n            observer: 'setDays',\n        },\n        allowSameDay: Boolean,\n        showSubtitle: Boolean,\n        showMonthTitle: Boolean,\n    },\n    data: {\n        visible: true,\n        days: [],\n    },\n    methods: {\n        onClick: function (event) {\n            var index = event.currentTarget.dataset.index;\n            var item = this.data.days[index];\n            if (item.type !== 'disabled') {\n                this.$emit('click', item);\n            }\n        },\n        setDays: function () {\n            var days = [];\n            var startDate = new Date(this.data.date);\n            var year = startDate.getFullYear();\n            var month = startDate.getMonth();\n            var totalDay = (0, utils_1.getMonthEndDay)(startDate.getFullYear(), startDate.getMonth() + 1);\n            for (var day = 1; day <= totalDay; day++) {\n                var date = new Date(year, month, day);\n                var type = this.getDayType(date);\n                var config = {\n                    date: date,\n                    type: type,\n                    text: day,\n                    bottomInfo: this.getBottomInfo(type),\n                };\n                if (this.data.formatter) {\n                    config = this.data.formatter(config);\n                }\n                days.push(config);\n            }\n            this.setData({ days: days });\n        },\n        getMultipleDayType: function (day) {\n            var currentDate = this.data.currentDate;\n            if (!Array.isArray(currentDate)) {\n                return '';\n            }\n            var isSelected = function (date) {\n                return currentDate.some(function (item) { return (0, utils_1.compareDay)(item, date) === 0; });\n            };\n            if (isSelected(day)) {\n                var prevDay = (0, utils_1.getPrevDay)(day);\n                var nextDay = (0, utils_1.getNextDay)(day);\n                var prevSelected = isSelected(prevDay);\n                var nextSelected = isSelected(nextDay);\n                if (prevSelected && nextSelected) {\n                    return 'multiple-middle';\n                }\n                if (prevSelected) {\n                    return 'end';\n                }\n                return nextSelected ? 'start' : 'multiple-selected';\n            }\n            return '';\n        },\n        getRangeDayType: function (day) {\n            var _a = this.data, currentDate = _a.currentDate, allowSameDay = _a.allowSameDay;\n            if (!Array.isArray(currentDate)) {\n                return '';\n            }\n            var startDay = currentDate[0], endDay = currentDate[1];\n            if (!startDay) {\n                return '';\n            }\n            var compareToStart = (0, utils_1.compareDay)(day, startDay);\n            if (!endDay) {\n                return compareToStart === 0 ? 'start' : '';\n            }\n            var compareToEnd = (0, utils_1.compareDay)(day, endDay);\n            if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) {\n                return 'start-end';\n            }\n            if (compareToStart === 0) {\n                return 'start';\n            }\n            if (compareToEnd === 0) {\n                return 'end';\n            }\n            if (compareToStart > 0 && compareToEnd < 0) {\n                return 'middle';\n            }\n            return '';\n        },\n        getDayType: function (day) {\n            var _a = this.data, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate, currentDate = _a.currentDate;\n            if ((0, utils_1.compareDay)(day, minDate) < 0 || (0, utils_1.compareDay)(day, maxDate) > 0) {\n                return 'disabled';\n            }\n            if (type === 'single') {\n                return (0, utils_1.compareDay)(day, currentDate) === 0 ? 'selected' : '';\n            }\n            if (type === 'multiple') {\n                return this.getMultipleDayType(day);\n            }\n            /* istanbul ignore else */\n            if (type === 'range') {\n                return this.getRangeDayType(day);\n            }\n            return '';\n        },\n        getBottomInfo: function (type) {\n            if (this.data.type === 'range') {\n                if (type === 'start') {\n                    return '开始';\n                }\n                if (type === 'end') {\n                    return '结束';\n                }\n                if (type === 'start-end') {\n                    return '开始/结束';\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/calendar/components/month/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/calendar/components/month/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\"></wxs>\n<wxs src=\"../../../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-calendar__month\" style=\"{{ computed.getMonthStyle(visible, date, rowHeight) }}\">\n  <view wx:if=\"{{ showMonthTitle }}\" class=\"van-calendar__month-title\">\n    {{ computed.formatMonthTitle(date) }}\n  </view>\n\n  <view wx:if=\"{{ visible }}\" class=\"van-calendar__days\">\n    <view wx:if=\"{{ showMark }}\" class=\"van-calendar__month-mark\">\n      {{ computed.getMark(date) }}\n    </view>\n\n    <view\n      wx:for=\"{{ days }}\"\n      wx:key=\"index\"\n      style=\"{{ computed.getDayStyle(item.type, index, date, rowHeight, color, firstDayOfWeek) }}\"\n      class=\"{{ utils.bem('calendar__day', [item.type]) }} {{ item.className }}\"\n      data-index=\"{{ index }}\"\n      bindtap=\"onClick\"\n    >\n      <view wx:if=\"{{ item.type === 'selected' }}\" class=\"van-calendar__selected-day\" style=\"width: {{ rowHeight }}px; height: {{ rowHeight }}px; background: {{ color }}\">\n        <view wx:if=\"{{ item.topInfo }}\" class=\"van-calendar__top-info\">{{ item.topInfo }}</view>\n        {{ item.text }}\n        <view wx:if=\"{{ item.bottomInfo }}\" class=\"van-calendar__bottom-info\">\n          {{ item.bottomInfo }}\n        </view>\n      </view>\n\n      <view wx:else>\n        <view wx:if=\"{{ item.topInfo }}\" class=\"van-calendar__top-info\">{{ item.topInfo }}</view>\n        {{ item.text }}\n        <view wx:if=\"{{ item.bottomInfo }}\" class=\"van-calendar__bottom-info\">\n          {{ item.bottomInfo }}\n        </view>\n      </view>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/calendar/components/month/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../../utils.wxs');\n\nfunction getMark(date) {\n  return getDate(date).getMonth() + 1;\n}\n\nvar ROW_HEIGHT = 64;\n\nfunction getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {\n  var style = [];\n  var current = getDate(date).getDay() || 7;\n  var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) :\n               current === 7 && firstDayOfWeek === 0 ? 0 :\n               (current - firstDayOfWeek);\n\n  if (index === 0) {\n    style.push(['margin-left', (100 * offset) / 7 + '%']);\n  }\n\n  if (rowHeight !== ROW_HEIGHT) {\n    style.push(['height', rowHeight + 'px']);\n  }\n\n  if (color) {\n    if (\n      type === 'start' ||\n      type === 'end' ||\n      type === 'start-end' ||\n      type === 'multiple-selected' ||\n      type === 'multiple-middle'\n    ) {\n      style.push(['background', color]);\n    } else if (type === 'middle') {\n      style.push(['color', color]);\n    }\n  }\n\n  return style\n    .map(function(item) {\n      return item.join(':');\n    })\n    .join(';');\n}\n\nfunction formatMonthTitle(date) {\n  date = getDate(date);\n  return date.getFullYear() + '年' + (date.getMonth() + 1) + '月';\n}\n\nfunction getMonthStyle(visible, date, rowHeight) {\n  if (!visible) {\n    date = getDate(date);\n\n    var totalDay = utils.getMonthEndDay(\n      date.getFullYear(),\n      date.getMonth() + 1\n    );\n    var offset = getDate(date).getDay();\n    var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;\n\n    return 'padding-bottom:' + padding + 'px';\n  }\n}\n\nmodule.exports = {\n  getMark: getMark,\n  getDayStyle: getDayStyle,\n  formatMonthTitle: formatMonthTitle,\n  getMonthStyle: getMonthStyle\n};\n"
  },
  {
    "path": "lib/calendar/components/month/index.wxss",
    "content": "@import '../../../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:100%}.van-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.van-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{color:var(--calendar-month-mark-color,rgba(242,243,245,.8));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.van-calendar__day,.van-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.van-calendar__day{font-size:var(--calendar-day-font-size,16px);height:var(--calendar-day-height,64px);position:relative;width:14.285%}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#ee0a24);color:var(--calendar-range-edge-color,#fff)}.van-calendar__day--start{border-radius:4px 0 0 4px}.van-calendar__day--end{border-radius:0 4px 4px 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px}.van-calendar__day--middle{color:var(--calendar-range-middle-color,#ee0a24)}.van-calendar__day--middle:after{background-color:currentColor;bottom:0;content:\"\";left:0;opacity:var(--calendar-range-middle-background-opacity,.1);position:absolute;right:0;top:0}.van-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,54px);width:var(--calendar-selected-day-size,54px)}"
  },
  {
    "path": "lib/calendar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/calendar/index.js",
    "content": "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"./utils\");\nvar toast_1 = __importDefault(require(\"../toast/toast\"));\nvar utils_2 = require(\"../common/utils\");\nvar initialMinDate = (0, utils_1.getToday)().getTime();\nvar initialMaxDate = (function () {\n    var now = (0, utils_1.getToday)();\n    return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()).getTime();\n})();\nvar getTime = function (date) {\n    return date instanceof Date ? date.getTime() : date;\n};\n(0, component_1.VantComponent)({\n    props: {\n        title: {\n            type: String,\n            value: '日期选择',\n        },\n        color: String,\n        show: {\n            type: Boolean,\n            observer: function (val) {\n                if (val) {\n                    this.initRect();\n                    this.scrollIntoView();\n                }\n            },\n        },\n        formatter: null,\n        confirmText: {\n            type: String,\n            value: '确定',\n        },\n        confirmDisabledText: {\n            type: String,\n            value: '确定',\n        },\n        rangePrompt: String,\n        showRangePrompt: {\n            type: Boolean,\n            value: true,\n        },\n        defaultDate: {\n            type: null,\n            value: (0, utils_1.getToday)().getTime(),\n            observer: function (val) {\n                this.setData({ currentDate: val });\n                this.scrollIntoView();\n            },\n        },\n        allowSameDay: Boolean,\n        type: {\n            type: String,\n            value: 'single',\n            observer: 'reset',\n        },\n        minDate: {\n            type: Number,\n            value: initialMinDate,\n        },\n        maxDate: {\n            type: Number,\n            value: initialMaxDate,\n        },\n        position: {\n            type: String,\n            value: 'bottom',\n        },\n        rowHeight: {\n            type: null,\n            value: utils_1.ROW_HEIGHT,\n        },\n        round: {\n            type: Boolean,\n            value: true,\n        },\n        poppable: {\n            type: Boolean,\n            value: true,\n        },\n        showMark: {\n            type: Boolean,\n            value: true,\n        },\n        showTitle: {\n            type: Boolean,\n            value: true,\n        },\n        showConfirm: {\n            type: Boolean,\n            value: true,\n        },\n        showSubtitle: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        maxRange: {\n            type: null,\n            value: null,\n        },\n        minRange: {\n            type: Number,\n            value: 1,\n        },\n        firstDayOfWeek: {\n            type: Number,\n            value: 0,\n        },\n        readonly: Boolean,\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        subtitle: '',\n        currentDate: null,\n        scrollIntoView: '',\n    },\n    watch: {\n        minDate: function () {\n            this.initRect();\n        },\n        maxDate: function () {\n            this.initRect();\n        },\n    },\n    created: function () {\n        this.setData({\n            currentDate: this.getInitialDate(this.data.defaultDate),\n        });\n    },\n    mounted: function () {\n        if (this.data.show || !this.data.poppable) {\n            this.initRect();\n            this.scrollIntoView();\n        }\n    },\n    methods: {\n        reset: function () {\n            this.setData({ currentDate: this.getInitialDate(this.data.defaultDate) });\n            this.scrollIntoView();\n        },\n        initRect: function () {\n            var _this = this;\n            if (this.contentObserver != null) {\n                this.contentObserver.disconnect();\n            }\n            var contentObserver = this.createIntersectionObserver({\n                thresholds: [0, 0.1, 0.9, 1],\n                observeAll: true,\n            });\n            this.contentObserver = contentObserver;\n            contentObserver.relativeTo('.van-calendar__body');\n            contentObserver.observe('.month', function (res) {\n                if (res.boundingClientRect.top <= res.relativeRect.top) {\n                    // @ts-ignore\n                    _this.setData({ subtitle: (0, utils_1.formatMonthTitle)(res.dataset.date) });\n                }\n            });\n        },\n        limitDateRange: function (date, minDate, maxDate) {\n            if (minDate === void 0) { minDate = null; }\n            if (maxDate === void 0) { maxDate = null; }\n            minDate = minDate || this.data.minDate;\n            maxDate = maxDate || this.data.maxDate;\n            if ((0, utils_1.compareDay)(date, minDate) === -1) {\n                return minDate;\n            }\n            if ((0, utils_1.compareDay)(date, maxDate) === 1) {\n                return maxDate;\n            }\n            return date;\n        },\n        getInitialDate: function (defaultDate) {\n            var _this = this;\n            if (defaultDate === void 0) { defaultDate = null; }\n            var _a = this.data, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate, allowSameDay = _a.allowSameDay;\n            if (!defaultDate)\n                return [];\n            var now = (0, utils_1.getToday)().getTime();\n            if (type === 'range') {\n                if (!Array.isArray(defaultDate)) {\n                    defaultDate = [];\n                }\n                var _b = defaultDate || [], startDay = _b[0], endDay = _b[1];\n                var startDate = getTime(startDay || now);\n                var start = this.limitDateRange(startDate, minDate, allowSameDay ? startDate : (0, utils_1.getPrevDay)(new Date(maxDate)).getTime());\n                var date = getTime(endDay || now);\n                var end = this.limitDateRange(date, allowSameDay ? date : (0, utils_1.getNextDay)(new Date(minDate)).getTime());\n                return [start, end];\n            }\n            if (type === 'multiple') {\n                if (Array.isArray(defaultDate)) {\n                    return defaultDate.map(function (date) { return _this.limitDateRange(date); });\n                }\n                return [this.limitDateRange(now)];\n            }\n            if (!defaultDate || Array.isArray(defaultDate)) {\n                defaultDate = now;\n            }\n            return this.limitDateRange(defaultDate);\n        },\n        scrollIntoView: function () {\n            var _this = this;\n            (0, utils_2.requestAnimationFrame)(function () {\n                var _a = _this.data, currentDate = _a.currentDate, type = _a.type, show = _a.show, poppable = _a.poppable, minDate = _a.minDate, maxDate = _a.maxDate;\n                if (!currentDate)\n                    return;\n                // @ts-ignore\n                var targetDate = type === 'single' ? currentDate : currentDate[0];\n                var displayed = show || !poppable;\n                if (!targetDate || !displayed) {\n                    return;\n                }\n                var months = (0, utils_1.getMonths)(minDate, maxDate);\n                months.some(function (month, index) {\n                    if ((0, utils_1.compareMonth)(month, targetDate) === 0) {\n                        _this.setData({ scrollIntoView: \"month\".concat(index) });\n                        return true;\n                    }\n                    return false;\n                });\n            });\n        },\n        onOpen: function () {\n            this.$emit('open');\n        },\n        onOpened: function () {\n            this.$emit('opened');\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n        onClosed: function () {\n            this.$emit('closed');\n        },\n        onClickDay: function (event) {\n            if (this.data.readonly) {\n                return;\n            }\n            var date = event.detail.date;\n            var _a = this.data, type = _a.type, currentDate = _a.currentDate, allowSameDay = _a.allowSameDay;\n            if (type === 'range') {\n                // @ts-ignore\n                var startDay_1 = currentDate[0], endDay = currentDate[1];\n                if (startDay_1 && !endDay) {\n                    var compareToStart = (0, utils_1.compareDay)(date, startDay_1);\n                    if (compareToStart === 1) {\n                        var days_1 = this.selectComponent('.month').data.days;\n                        days_1.some(function (day, index) {\n                            var isDisabled = day.type === 'disabled' &&\n                                getTime(startDay_1) < getTime(day.date) &&\n                                getTime(day.date) < getTime(date);\n                            if (isDisabled) {\n                                (date = days_1[index - 1].date);\n                            }\n                            return isDisabled;\n                        });\n                        this.select([startDay_1, date], true);\n                    }\n                    else if (compareToStart === -1) {\n                        this.select([date, null]);\n                    }\n                    else if (allowSameDay) {\n                        this.select([date, date], true);\n                    }\n                }\n                else {\n                    this.select([date, null]);\n                }\n            }\n            else if (type === 'multiple') {\n                var selectedIndex_1;\n                // @ts-ignore\n                var selected = currentDate.some(function (dateItem, index) {\n                    var equal = (0, utils_1.compareDay)(dateItem, date) === 0;\n                    if (equal) {\n                        selectedIndex_1 = index;\n                    }\n                    return equal;\n                });\n                if (selected) {\n                    // @ts-ignore\n                    var cancelDate = currentDate.splice(selectedIndex_1, 1);\n                    this.setData({ currentDate: currentDate });\n                    this.unselect(cancelDate);\n                }\n                else {\n                    // @ts-ignore\n                    this.select(__spreadArray(__spreadArray([], currentDate, true), [date], false));\n                }\n            }\n            else {\n                this.select(date, true);\n            }\n        },\n        unselect: function (dateArray) {\n            var date = dateArray[0];\n            if (date) {\n                this.$emit('unselect', (0, utils_1.copyDates)(date));\n            }\n        },\n        select: function (date, complete) {\n            if (complete && this.data.type === 'range') {\n                var valid = this.checkRange(date);\n                if (!valid) {\n                    // auto selected to max range if showConfirm\n                    if (this.data.showConfirm) {\n                        this.emit([\n                            date[0],\n                            (0, utils_1.getDayByOffset)(date[0], this.data.maxRange - 1),\n                        ]);\n                    }\n                    else {\n                        this.emit(date);\n                    }\n                    return;\n                }\n            }\n            this.emit(date);\n            if (complete && !this.data.showConfirm) {\n                this.onConfirm();\n            }\n        },\n        emit: function (date) {\n            this.setData({\n                currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),\n            });\n            this.$emit('select', (0, utils_1.copyDates)(date));\n        },\n        checkRange: function (date) {\n            var _a = this.data, maxRange = _a.maxRange, rangePrompt = _a.rangePrompt, showRangePrompt = _a.showRangePrompt;\n            if (maxRange && (0, utils_1.calcDateNum)(date) > maxRange) {\n                if (showRangePrompt) {\n                    (0, toast_1.default)({\n                        context: this,\n                        message: rangePrompt || \"\\u9009\\u62E9\\u5929\\u6570\\u4E0D\\u80FD\\u8D85\\u8FC7 \".concat(maxRange, \" \\u5929\"),\n                    });\n                }\n                this.$emit('over-range');\n                return false;\n            }\n            return true;\n        },\n        onConfirm: function () {\n            var _this = this;\n            if (this.data.type === 'range' &&\n                !this.checkRange(this.data.currentDate)) {\n                return;\n            }\n            wx.nextTick(function () {\n                // @ts-ignore\n                _this.$emit('confirm', (0, utils_1.copyDates)(_this.data.currentDate));\n            });\n        },\n        onClickSubtitle: function (event) {\n            this.$emit('click-subtitle', event);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/calendar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"header\": \"./components/header/index\",\n    \"month\": \"./components/month/index\",\n    \"van-button\": \"../button/index\",\n    \"van-popup\": \"../popup/index\",\n    \"van-toast\": \"../toast/index\"\n  }\n}\n"
  },
  {
    "path": "lib/calendar/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<import src=\"./calendar.wxml\" />\n\n<van-popup\n  wx:if=\"{{ poppable }}\"\n  custom-class=\"van-calendar__popup--{{ position }}\"\n  close-icon-class=\"van-calendar__close-icon\"\n  show=\"{{ show }}\"\n  round=\"{{ round }}\"\n  position=\"{{ position }}\"\n  closeable=\"{{ showTitle || showSubtitle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:enter=\"onOpen\"\n  bind:close=\"onClose\"\n  bind:after-enter=\"onOpened\"\n  bind:after-leave=\"onClosed\"\n>\n  <include src=\"./calendar.wxml\" />\n</van-popup>\n\n<include wx:else src=\"./calendar.wxml\" />\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "lib/calendar/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('./utils.wxs');\n\nfunction getMonths(minDate, maxDate) {\n  var months = [];\n  var cursor = getDate(minDate);\n\n  cursor.setDate(1);\n\n  do {\n    months.push(cursor.getTime());\n    cursor.setMonth(cursor.getMonth() + 1);\n  } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);\n\n  return months;\n}\n\nfunction getButtonDisabled(type, currentDate, minRange) {\n  if (currentDate == null) {\n    return true;\n  }\n\n  if (type === 'range') {\n    return !currentDate[0] || !currentDate[1];\n  }\n\n  if (type === 'multiple') {\n    return currentDate.length < minRange;\n  }\n\n  return !currentDate;\n}\n\nmodule.exports = {\n  getMonths: getMonths,\n  getButtonDisabled: getButtonDisabled\n};\n"
  },
  {
    "path": "lib/calendar/index.wxss",
    "content": "@import '../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:var(--calendar-height,100%)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:var(--calendar-popup-height,90%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.van-calendar__footer{flex-shrink:0;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:var(--calendar-confirm-button-height,36px)!important;line-height:var(--calendar-confirm-button-line-height,34px)!important;margin:var(--calendar-confirm-button-margin,7px 0)!important}"
  },
  {
    "path": "lib/calendar/utils.d.ts",
    "content": "export declare const ROW_HEIGHT = 64;\nexport declare function formatMonthTitle(date: Date): string;\nexport declare function compareMonth(date1: Date | number, date2: Date | number): 0 | 1 | -1;\nexport declare function compareDay(day1: Date | number, day2: Date | number): 0 | 1 | -1;\nexport declare function getDayByOffset(date: Date, offset: number): Date;\nexport declare function getPrevDay(date: Date): Date;\nexport declare function getNextDay(date: Date): Date;\nexport declare function getToday(): Date;\nexport declare function calcDateNum(date: [Date, Date]): number;\nexport declare function copyDates(dates: Date | Date[]): Date | Date[];\nexport declare function getMonthEndDay(year: number, month: number): number;\nexport declare function getMonths(minDate: number, maxDate: number): number[];\n"
  },
  {
    "path": "lib/calendar/utils.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMonths = exports.getMonthEndDay = exports.copyDates = exports.calcDateNum = exports.getToday = exports.getNextDay = exports.getPrevDay = exports.getDayByOffset = exports.compareDay = exports.compareMonth = exports.formatMonthTitle = exports.ROW_HEIGHT = void 0;\nexports.ROW_HEIGHT = 64;\nfunction formatMonthTitle(date) {\n    if (!(date instanceof Date)) {\n        date = new Date(date);\n    }\n    return \"\".concat(date.getFullYear(), \"\\u5E74\").concat(date.getMonth() + 1, \"\\u6708\");\n}\nexports.formatMonthTitle = formatMonthTitle;\nfunction compareMonth(date1, date2) {\n    if (!(date1 instanceof Date)) {\n        date1 = new Date(date1);\n    }\n    if (!(date2 instanceof Date)) {\n        date2 = new Date(date2);\n    }\n    var year1 = date1.getFullYear();\n    var year2 = date2.getFullYear();\n    var month1 = date1.getMonth();\n    var month2 = date2.getMonth();\n    if (year1 === year2) {\n        return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;\n    }\n    return year1 > year2 ? 1 : -1;\n}\nexports.compareMonth = compareMonth;\nfunction compareDay(day1, day2) {\n    if (!(day1 instanceof Date)) {\n        day1 = new Date(day1);\n    }\n    if (!(day2 instanceof Date)) {\n        day2 = new Date(day2);\n    }\n    var compareMonthResult = compareMonth(day1, day2);\n    if (compareMonthResult === 0) {\n        var date1 = day1.getDate();\n        var date2 = day2.getDate();\n        return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;\n    }\n    return compareMonthResult;\n}\nexports.compareDay = compareDay;\nfunction getDayByOffset(date, offset) {\n    date = new Date(date);\n    date.setDate(date.getDate() + offset);\n    return date;\n}\nexports.getDayByOffset = getDayByOffset;\nfunction getPrevDay(date) {\n    return getDayByOffset(date, -1);\n}\nexports.getPrevDay = getPrevDay;\nfunction getNextDay(date) {\n    return getDayByOffset(date, 1);\n}\nexports.getNextDay = getNextDay;\nfunction getToday() {\n    var today = new Date();\n    today.setHours(0, 0, 0, 0);\n    return today;\n}\nexports.getToday = getToday;\nfunction calcDateNum(date) {\n    var day1 = new Date(date[0]).getTime();\n    var day2 = new Date(date[1]).getTime();\n    return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;\n}\nexports.calcDateNum = calcDateNum;\nfunction copyDates(dates) {\n    if (Array.isArray(dates)) {\n        return dates.map(function (date) {\n            if (date === null) {\n                return date;\n            }\n            return new Date(date);\n        });\n    }\n    return new Date(dates);\n}\nexports.copyDates = copyDates;\nfunction getMonthEndDay(year, month) {\n    return 32 - new Date(year, month - 1, 32).getDate();\n}\nexports.getMonthEndDay = getMonthEndDay;\nfunction getMonths(minDate, maxDate) {\n    var months = [];\n    var cursor = new Date(minDate);\n    cursor.setDate(1);\n    do {\n        months.push(cursor.getTime());\n        cursor.setMonth(cursor.getMonth() + 1);\n    } while (compareMonth(cursor, maxDate) !== 1);\n    return months;\n}\nexports.getMonths = getMonths;\n"
  },
  {
    "path": "lib/calendar/utils.wxs",
    "content": "/* eslint-disable */\nfunction getMonthEndDay(year, month) {\n  return 32 -  getDate(year, month - 1, 32).getDate();\n}\n\nfunction compareMonth(date1, date2) {\n  date1 = getDate(date1);\n  date2 = getDate(date2);\n\n  var year1 = date1.getFullYear();\n  var year2 = date2.getFullYear();\n  var month1 = date1.getMonth();\n  var month2 = date2.getMonth();\n\n  if (year1 === year2) {\n    return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;\n  }\n\n  return year1 > year2 ? 1 : -1;\n}\n\nmodule.exports = {\n  getMonthEndDay: getMonthEndDay,\n  compareMonth: compareMonth\n};\n"
  },
  {
    "path": "lib/card/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/card/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar link_1 = require(\"../mixins/link\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: [\n        'num-class',\n        'desc-class',\n        'thumb-class',\n        'title-class',\n        'price-class',\n        'origin-price-class',\n    ],\n    mixins: [link_1.link],\n    props: {\n        tag: String,\n        num: String,\n        desc: String,\n        thumb: String,\n        title: String,\n        price: {\n            type: String,\n            observer: 'updatePrice',\n        },\n        centered: Boolean,\n        lazyLoad: Boolean,\n        thumbLink: String,\n        originPrice: String,\n        thumbMode: {\n            type: String,\n            value: 'aspectFit',\n        },\n        currency: {\n            type: String,\n            value: '¥',\n        },\n    },\n    methods: {\n        updatePrice: function () {\n            var price = this.data.price;\n            var priceArr = price.toString().split('.');\n            this.setData({\n                integerStr: priceArr[0],\n                decimalStr: priceArr[1] ? \".\".concat(priceArr[1]) : '',\n            });\n        },\n        onClickThumb: function () {\n            this.jumpLink('thumbLink');\n        },\n    },\n});\n"
  },
  {
    "path": "lib/card/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tag\": \"../tag/index\"\n  }\n}\n"
  },
  {
    "path": "lib/card/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class van-card\">\n  <view class=\"{{ utils.bem('card__header', { center: centered }) }}\">\n    <view class=\"van-card__thumb\" bind:tap=\"onClickThumb\">\n      <image\n        wx:if=\"{{ thumb }}\"\n        src=\"{{ thumb }}\"\n        mode=\"{{ thumbMode }}\"\n        lazy-load=\"{{ lazyLoad }}\"\n        class=\"van-card__img thumb-class\"\n      />\n      <slot wx:else name=\"thumb\" />\n      <van-tag\n        wx:if=\"{{ tag }}\"\n        mark\n        type=\"danger\"\n        custom-class=\"van-card__tag\"\n      >\n        {{ tag }}\n      </van-tag>\n      <slot wx:else name=\"tag\" />\n    </view>\n\n    <view class=\"van-card__content {{ utils.bem('card__content', { center: centered }) }}\">\n      <view>\n        <view wx:if=\"{{ title }}\" class=\"van-card__title title-class\">{{ title }}</view>\n        <slot wx:else name=\"title\" />\n\n        <view wx:if=\"{{ desc }}\" class=\"van-card__desc desc-class\">{{ desc }}</view>\n        <slot wx:else name=\"desc\" />\n\n        <slot name=\"tags\" />\n      </view>\n\n      <view class=\"van-card__bottom\">\n        <slot name=\"price-top\" />\n        <view wx:if=\"{{ price || price === 0 }}\" class=\"van-card__price price-class\">\n          <text>{{ currency }}</text>\n          <text class=\"van-card__price-integer\">{{ integerStr }}</text>\n          <text class=\"van-card__price-decimal\">{{ decimalStr }}</text>\n        </view>\n        <slot wx:else name=\"price\" />\n        <view wx:if=\"{{ originPrice || originPrice === 0 }}\" class=\"van-card__origin-price origin-price-class\">{{ currency }} {{ originPrice }}</view>\n        <slot wx:else name=\"origin-price\" />\n        <view wx:if=\"{{ num }}\" class=\"van-card__num num-class\">x {{ num }}</view>\n        <slot wx:else  name=\"num\" />\n        <slot name=\"bottom\" />\n      </view>\n    </view>\n  </view>\n\n  <view class=\"van-card__footer\">\n    <slot name=\"footer\" />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/card/index.wxss",
    "content": "@import '../common/index.wxss';.van-card{background-color:var(--card-background-color,#fafafa);box-sizing:border-box;color:var(--card-text-color,#323233);font-size:var(--card-font-size,12px);padding:var(--card-padding,8px 16px);position:relative}.van-card__header{display:flex}.van-card__header--center{align-items:center;justify-content:center}.van-card__thumb{flex:none;height:var(--card-thumb-size,88px);margin-right:var(--padding-xs,8px);position:relative;width:var(--card-thumb-size,88px)}.van-card__thumb:empty{display:none}.van-card__img{border-radius:8px;height:100%;width:100%}.van-card__content{display:flex;flex:1;flex-direction:column;justify-content:space-between;min-height:var(--card-thumb-size,88px);min-width:0;position:relative}.van-card__content--center{justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{font-weight:700;line-height:var(--card-title-line-height,16px)}.van-card__desc{color:var(--card-desc-color,#646566);line-height:var(--card-desc-line-height,20px)}.van-card__bottom{line-height:20px}.van-card__price{color:var(--card-price-color,#ee0a24);display:inline-block;font-size:var(--card-price-font-size,12px);font-weight:700}.van-card__price-integer{font-size:var(--card-price-integer-font-size,16px)}.van-card__price-decimal,.van-card__price-integer{font-family:var(--card-price-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif)}.van-card__origin-price{color:var(--card-origin-price-color,#646566);display:inline-block;font-size:var(--card-origin-price-font-size,10px);margin-left:5px;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{left:0;position:absolute!important;top:2px}.van-card__footer{flex:none;text-align:right;width:100%}"
  },
  {
    "path": "lib/cascader/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/cascader/index.js",
    "content": "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar FieldName;\n(function (FieldName) {\n    FieldName[\"TEXT\"] = \"text\";\n    FieldName[\"VALUE\"] = \"value\";\n    FieldName[\"CHILDREN\"] = \"children\";\n})(FieldName || (FieldName = {}));\nvar defaultFieldNames = {\n    text: FieldName.TEXT,\n    value: FieldName.VALUE,\n    children: FieldName.CHILDREN,\n};\n(0, component_1.VantComponent)({\n    props: {\n        title: String,\n        value: {\n            type: String,\n        },\n        placeholder: {\n            type: String,\n            value: '请选择',\n        },\n        activeColor: {\n            type: String,\n            value: '#1989fa',\n        },\n        options: {\n            type: Array,\n            value: [],\n        },\n        swipeable: {\n            type: Boolean,\n            value: false,\n        },\n        closeable: {\n            type: Boolean,\n            value: true,\n        },\n        ellipsis: {\n            type: Boolean,\n            value: true,\n        },\n        showHeader: {\n            type: Boolean,\n            value: true,\n        },\n        closeIcon: {\n            type: String,\n            value: 'cross',\n        },\n        fieldNames: {\n            type: Object,\n            value: defaultFieldNames,\n            observer: 'updateFieldNames',\n        },\n        useTitleSlot: Boolean,\n    },\n    data: {\n        tabs: [],\n        activeTab: 0,\n        textKey: FieldName.TEXT,\n        valueKey: FieldName.VALUE,\n        childrenKey: FieldName.CHILDREN,\n        innerValue: '',\n    },\n    watch: {\n        options: function () {\n            this.updateTabs();\n        },\n        value: function (newVal) {\n            this.updateValue(newVal);\n        },\n    },\n    created: function () {\n        this.updateTabs();\n    },\n    methods: {\n        updateValue: function (val) {\n            var _this = this;\n            if (val !== undefined) {\n                var values = this.data.tabs.map(function (tab) { return tab.selected && tab.selected[_this.data.valueKey]; });\n                if (values.indexOf(val) > -1) {\n                    return;\n                }\n            }\n            this.innerValue = val;\n            this.updateTabs();\n        },\n        updateFieldNames: function () {\n            var _a = this.data.fieldNames || defaultFieldNames, _b = _a.text, text = _b === void 0 ? 'text' : _b, _c = _a.value, value = _c === void 0 ? 'value' : _c, _d = _a.children, children = _d === void 0 ? 'children' : _d;\n            this.setData({\n                textKey: text,\n                valueKey: value,\n                childrenKey: children,\n            });\n        },\n        getSelectedOptionsByValue: function (options, value) {\n            for (var i = 0; i < options.length; i++) {\n                var option = options[i];\n                if (option[this.data.valueKey] === value) {\n                    return [option];\n                }\n                if (option[this.data.childrenKey]) {\n                    var selectedOptions = this.getSelectedOptionsByValue(option[this.data.childrenKey], value);\n                    if (selectedOptions) {\n                        return __spreadArray([option], selectedOptions, true);\n                    }\n                }\n            }\n        },\n        updateTabs: function () {\n            var _this = this;\n            var options = this.data.options;\n            var innerValue = this.innerValue;\n            if (!options.length) {\n                return;\n            }\n            if (innerValue !== undefined) {\n                var selectedOptions = this.getSelectedOptionsByValue(options, innerValue);\n                if (selectedOptions) {\n                    var optionsCursor_1 = options;\n                    var tabs_1 = selectedOptions.map(function (option) {\n                        var tab = {\n                            options: optionsCursor_1,\n                            selected: option,\n                        };\n                        var next = optionsCursor_1.find(function (item) { return item[_this.data.valueKey] === option[_this.data.valueKey]; });\n                        if (next) {\n                            optionsCursor_1 = next[_this.data.childrenKey];\n                        }\n                        return tab;\n                    });\n                    if (optionsCursor_1) {\n                        tabs_1.push({\n                            options: optionsCursor_1,\n                            selected: null,\n                        });\n                    }\n                    this.setData({\n                        tabs: tabs_1,\n                    });\n                    wx.nextTick(function () {\n                        _this.setData({\n                            activeTab: tabs_1.length - 1,\n                        });\n                    });\n                    return;\n                }\n            }\n            this.setData({\n                tabs: [\n                    {\n                        options: options,\n                        selected: null,\n                    },\n                ],\n                activeTab: 0,\n            });\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n        onClickTab: function (e) {\n            var _a = e.detail, tabIndex = _a.index, title = _a.title;\n            this.$emit('click-tab', { title: title, tabIndex: tabIndex });\n            this.setData({\n                activeTab: tabIndex,\n            });\n        },\n        // 选中\n        onSelect: function (e) {\n            var _this = this;\n            var _a = e.currentTarget.dataset, option = _a.option, tabIndex = _a.tabIndex;\n            if (option && option.disabled) {\n                return;\n            }\n            var _b = this.data, valueKey = _b.valueKey, childrenKey = _b.childrenKey;\n            var tabs = this.data.tabs;\n            tabs[tabIndex].selected = option;\n            if (tabs.length > tabIndex + 1) {\n                tabs = tabs.slice(0, tabIndex + 1);\n            }\n            if (option[childrenKey]) {\n                var nextTab = {\n                    options: option[childrenKey],\n                    selected: null,\n                };\n                if (tabs[tabIndex + 1]) {\n                    tabs[tabIndex + 1] = nextTab;\n                }\n                else {\n                    tabs.push(nextTab);\n                }\n                wx.nextTick(function () {\n                    _this.setData({\n                        activeTab: tabIndex + 1,\n                    });\n                });\n            }\n            this.setData({\n                tabs: tabs,\n            });\n            var selectedOptions = tabs.map(function (tab) { return tab.selected; }).filter(Boolean);\n            var value = option[valueKey];\n            var params = {\n                value: value,\n                tabIndex: tabIndex,\n                selectedOptions: selectedOptions,\n            };\n            this.innerValue = value;\n            this.$emit('change', params);\n            if (!option[childrenKey]) {\n                this.$emit('finish', params);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/cascader/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-tab\":  \"../tab/index\",\n    \"van-tabs\": \"../tabs/index\"\n  }\n}"
  },
  {
    "path": "lib/cascader/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"utils\" />\n\n<view wx:if=\"{{ showHeader }}\" class=\"van-cascader__header\">\n  <slot name=\"title\" wx:if=\"{{ useTitleSlot }}\"></slot>\n  <text class=\"van-cascader__title\" wx:else>{{ title }}</text>\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"{{ closeIcon }}\"\n    class=\"van-cascader__close-icon\"\n    bind:tap=\"onClose\"\n  />\n</view>\n\n<van-tabs\n  active=\"{{ activeTab }}\"\n  custom-class=\"van-cascader__tabs\"\n  wrap-class=\"van-cascader__tabs-wrap\"\n  tab-class=\"van-cascader__tab\"\n  color=\"{{ activeColor }}\"\n  border=\"{{ false }}\"\n  swipeable=\"{{ swipeable }}\"\n  ellipsis=\"{{ ellipsis }}\"\n  bind:click=\"onClickTab\"\n>\n  <van-tab\n    wx:for=\"{{ tabs }}\"\n    wx:for-item=\"tab\"\n    wx:for-index=\"tabIndex\"\n    wx:key=\"tabIndex\"\n    title=\"{{ tab.selected ? tab.selected[textKey] : placeholder }}\"\n    style=\"width: 100%;\"\n    title-style=\"{{ !tab.selected ? 'color: #969799;font-weight:normal;' : '' }}\"\n  >\n    <!-- 暂不支持 -->\n    <!-- <slot name=\"options-top\"></slot> -->\n\n    <view class=\"van-cascader__options\">\n      <view\n        wx:for=\"{{ tab.options }}\"\n        wx:for-item=\"option\"\n        wx:key=\"index\"\n        class=\"{{ option.className }} {{ utils.optionClass(tab, valueKey, option) }}\"\n        style=\"{{ utils.optionStyle({ tab, valueKey, option, activeColor }) }}\"\n        data-option=\"{{ option }}\"\n        data-tab-index=\"{{ tabIndex }}\"\n        bind:tap=\"onSelect\"\n      >\n        <text>{{ option[textKey] }}</text>\n        <van-icon wx:if=\"{{ utils.isSelected(tab, valueKey, option) }}\" name=\"success\" size=\"18\" />\n      </view>\n    </view>\n    <!-- 暂不支持 -->\n    <!-- <slot name=\"options-bottom\"></slot> -->\n  </van-tab>\n</van-tabs>\n"
  },
  {
    "path": "lib/cascader/index.wxs",
    "content": "var utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction isSelected(tab, valueKey, option) {\n  return tab.selected && tab.selected[valueKey] === option[valueKey]\n}\n\nfunction optionClass(tab, valueKey, option) {\n  return utils.bem('cascader__option', { selected: isSelected(tab, valueKey, option), disabled: option.disabled })\n}\n\nfunction optionStyle(data) {\n  var color = data.option.color || (isSelected(data.tab, data.valueKey, data.option) ? data.activeColor : undefined);\n  return style({\n    color\n  });\n}\n\n\nmodule.exports = {\n  isSelected: isSelected,\n  optionClass: optionClass,\n  optionStyle: optionStyle,\n};"
  },
  {
    "path": "lib/cascader/index.wxss",
    "content": "@import '../common/index.wxss';.van-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.van-cascader__title{font-size:16px;font-weight:600;line-height:20px}.van-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.van-cascader__tabs-wrap{height:48px!important;padding:0 8px}.van-cascader__tab{color:#323233!important;flex:none!important;font-weight:600!important;padding:0 8px!important}.van-cascader__tab--unselected{color:#969799!important;font-weight:400!important}.van-cascader__option{align-items:center;cursor:pointer;display:flex;font-size:14px;justify-content:space-between;line-height:20px;padding:10px 16px}.van-cascader__option:active{background-color:#f2f3f5}.van-cascader__option--selected{color:#1989fa;font-weight:600}.van-cascader__option--disabled{color:#c8c9cc;cursor:not-allowed}.van-cascader__option--disabled:active{background-color:initial}.van-cascader__options{-webkit-overflow-scrolling:touch;box-sizing:border-box;height:384px;overflow-y:auto;padding-top:6px}"
  },
  {
    "path": "lib/cell/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/cell/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar link_1 = require(\"../mixins/link\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: [\n        'title-class',\n        'label-class',\n        'value-class',\n        'right-icon-class',\n        'hover-class',\n    ],\n    mixins: [link_1.link],\n    props: {\n        title: null,\n        value: null,\n        icon: String,\n        size: String,\n        label: String,\n        center: Boolean,\n        isLink: Boolean,\n        required: Boolean,\n        clickable: Boolean,\n        titleWidth: String,\n        customStyle: String,\n        arrowDirection: String,\n        useLabelSlot: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        titleStyle: String,\n    },\n    methods: {\n        onClick: function (event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "lib/cell/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/cell/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('cell', [size, { center, required, borderless: !border, clickable: isLink || clickable }]) }}\"\n  hover-class=\"van-cell--hover hover-class\"\n  hover-stay-time=\"70\"\n  style=\"{{ customStyle }}\"\n  bind:tap=\"onClick\"\n>\n  <van-icon\n    wx:if=\"{{ icon }}\"\n    name=\"{{ icon }}\"\n    class=\"van-cell__left-icon-wrap\"\n    custom-class=\"van-cell__left-icon\"\n  />\n  <slot wx:else name=\"icon\" />\n\n  <view\n    style=\"{{ computed.titleStyle({ titleWidth, titleStyle }) }}\"\n    class=\"van-cell__title title-class\"\n  >\n\n    <block wx:if=\"{{ title }}\">{{ title }}</block>\n    <slot wx:else name=\"title\" />\n\n    <view wx:if=\"{{ label || useLabelSlot }}\" class=\"van-cell__label label-class\">\n      <slot wx:if=\"{{ useLabelSlot }}\" name=\"label\" />\n      <block wx:elif=\"{{ label }}\">{{ label }}</block>\n    </view>\n  </view>\n\n  <view class=\"van-cell__value value-class\">\n    <block wx:if=\"{{ value || value === 0 }}\">{{ value }}</block>\n    <slot wx:else />\n  </view>\n\n  <van-icon\n    wx:if=\"{{ isLink }}\"\n    name=\"{{ arrowDirection ? 'arrow' + '-' + arrowDirection : 'arrow' }}\"\n    class=\"van-cell__right-icon-wrap right-icon-class\"\n    custom-class=\"van-cell__right-icon\"\n  />\n  <slot wx:else name=\"right-icon\" />\n\n  <slot name=\"extra\" />\n</view>\n"
  },
  {
    "path": "lib/cell/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction titleStyle(data) {\n  return style([\n    {\n      'max-width': addUnit(data.titleWidth),\n      'min-width': addUnit(data.titleWidth),\n    },\n    data.titleStyle,\n  ]);\n}\n\nmodule.exports = {\n  titleStyle: titleStyle,\n};\n"
  },
  {
    "path": "lib/cell/index.wxss",
    "content": "@import '../common/index.wxss';.van-cell{background-color:var(--cell-background-color,#fff);box-sizing:border-box;color:var(--cell-text-color,#323233);display:flex;font-size:var(--cell-font-size,14px);line-height:var(--cell-line-height,24px);padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);position:relative;width:100%}.van-cell:after{border-bottom:1px solid #ebedf0;bottom:0;box-sizing:border-box;content:\" \";left:16px;pointer-events:none;position:absolute;right:16px;transform:scaleY(.5);transform-origin:center}.van-cell--borderless:after{display:none}.van-cell-group{background-color:var(--cell-background-color,#fff)}.van-cell__label{color:var(--cell-label-color,#969799);font-size:var(--cell-label-font-size,12px);line-height:var(--cell-label-line-height,18px);margin-top:var(--cell-label-margin-top,3px)}.van-cell__value{color:var(--cell-value-color,#969799);overflow:hidden;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{align-items:center;display:flex;font-size:var(--cell-icon-size,16px);height:var(--cell-line-height,24px)}.van-cell__left-icon-wrap{margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{color:var(--cell-right-icon-color,#969799);margin-left:var(--padding-base,4px)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{color:var(--cell-required-color,#ee0a24);content:\"*\";font-size:var(--cell-font-size,14px);left:var(--padding-xs,8px);position:absolute}.van-cell--center{align-items:center}.van-cell--large{padding-bottom:var(--cell-large-vertical-padding,12px);padding-top:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:var(--cell-large-label-font-size,14px)}"
  },
  {
    "path": "lib/cell-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/cell-group/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        title: String,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        inset: Boolean,\n    },\n});\n"
  },
  {
    "path": "lib/cell-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/cell-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ title }}\"\n  class=\"{{ utils.bem('cell-group__title', { inset }) }}\"\n>\n  {{ title }}\n</view>\n<view class=\"custom-class {{ utils.bem('cell-group', { inset }) }} {{ border ? 'van-hairline--top-bottom' : '' }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/cell-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-cell-group--inset{border-radius:var(--cell-group-inset-border-radius,8px);margin:var(--cell-group-inset-padding,0 16px);overflow:hidden}.van-cell-group__title{color:var(--cell-group-title-color,#969799);font-size:var(--cell-group-title-font-size,14px);line-height:var(--cell-group-title-line-height,16px);padding:var(--cell-group-title-padding,16px 16px 8px)}.van-cell-group__title--inset{padding:var(--cell-group-inset-title-padding,16px 16px 8px 32px)}"
  },
  {
    "path": "lib/checkbox/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/checkbox/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\nfunction emit(target, value) {\n    target.$emit('input', value);\n    target.$emit('change', value);\n}\n(0, component_1.VantComponent)({\n    field: true,\n    relation: (0, relation_1.useParent)('checkbox-group'),\n    classes: ['icon-class', 'label-class'],\n    props: {\n        value: Boolean,\n        disabled: Boolean,\n        useIconSlot: Boolean,\n        checkedColor: String,\n        labelPosition: {\n            type: String,\n            value: 'right',\n        },\n        labelDisabled: Boolean,\n        shape: {\n            type: String,\n            value: 'round',\n        },\n        iconSize: {\n            type: null,\n            value: 20,\n        },\n    },\n    data: {\n        parentDisabled: false,\n        direction: 'vertical',\n    },\n    methods: {\n        emitChange: function (value) {\n            if (this.parent) {\n                this.setParentValue(this.parent, value);\n            }\n            else {\n                emit(this, value);\n            }\n        },\n        toggle: function () {\n            var _a = this.data, parentDisabled = _a.parentDisabled, disabled = _a.disabled, value = _a.value;\n            if (!disabled && !parentDisabled) {\n                this.emitChange(!value);\n            }\n        },\n        onClickLabel: function () {\n            var _a = this.data, labelDisabled = _a.labelDisabled, parentDisabled = _a.parentDisabled, disabled = _a.disabled, value = _a.value;\n            if (!disabled && !labelDisabled && !parentDisabled) {\n                this.emitChange(!value);\n            }\n        },\n        setParentValue: function (parent, value) {\n            var parentValue = parent.data.value.slice();\n            var name = this.data.name;\n            var max = parent.data.max;\n            if (value) {\n                if (max && parentValue.length >= max) {\n                    return;\n                }\n                if (parentValue.indexOf(name) === -1) {\n                    parentValue.push(name);\n                    emit(parent, parentValue);\n                }\n            }\n            else {\n                var index = parentValue.indexOf(name);\n                if (index !== -1) {\n                    parentValue.splice(index, 1);\n                    emit(parent, parentValue);\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/checkbox/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/checkbox/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('checkbox', [{ horizontal: direction === 'horizontal' }]) }} custom-class\">\n  <view\n    wx:if=\"{{ labelPosition === 'left' }}\"\n    class=\"label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n  <view class=\"van-checkbox__icon-wrap\" bindtap=\"toggle\">\n    <slot wx:if=\"{{ useIconSlot }}\" name=\"icon\" />\n    <van-icon\n      wx:else\n      name=\"success\"\n      size=\"0.8em\"\n      class=\"{{ utils.bem('checkbox__icon', [shape, { disabled: disabled || parentDisabled, checked: value }]) }}\"\n      style=\"{{ computed.iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) }}\"\n      custom-class=\"icon-class\"\n      custom-style=\"line-height: 1.25em;\"\n    />\n  </view>\n  <view\n    wx:if=\"{{ labelPosition === 'right' }}\"\n    class=\"label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/checkbox/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {\n  var styles = {\n    'font-size': addUnit(iconSize),\n  };\n\n  if (checkedColor && value && !disabled && !parentDisabled) {\n    styles['border-color'] = checkedColor;\n    styles['background-color'] = checkedColor;\n  }\n\n  return style(styles);\n}\n\nmodule.exports = {\n  iconStyle: iconStyle,\n};\n"
  },
  {
    "path": "lib/checkbox/index.wxss",
    "content": "@import '../common/index.wxss';.van-checkbox{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{flex:none}.van-checkbox__icon{align-items:center;border:1px solid var(--checkbox-border-color,#c8c9cc);box-sizing:border-box;color:transparent;display:flex;font-size:var(--checkbox-size,20px);height:1em;justify-content:center;text-align:center;transition-duration:var(--checkbox-transition-duration,.2s);transition-property:color,border-color,background-color;width:1em}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:var(--checkbox-checked-icon-color,#1989fa);color:#fff}.van-checkbox__icon--disabled{background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;color:var(--checkbox-label-color,#323233);padding-left:var(--checkbox-label-margin,10px)}.van-checkbox__label--left{float:left;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}"
  },
  {
    "path": "lib/checkbox-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/checkbox-group/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    field: true,\n    relation: (0, relation_1.useChildren)('checkbox', function (target) {\n        this.updateChild(target);\n    }),\n    props: {\n        max: Number,\n        value: {\n            type: Array,\n            observer: 'updateChildren',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        direction: {\n            type: String,\n            value: 'vertical',\n        },\n    },\n    methods: {\n        updateChildren: function () {\n            var _this = this;\n            this.children.forEach(function (child) { return _this.updateChild(child); });\n        },\n        updateChild: function (child) {\n            var _a = this.data, value = _a.value, disabled = _a.disabled, direction = _a.direction;\n            child.setData({\n                value: value.indexOf(child.data.name) !== -1,\n                parentDisabled: disabled,\n                direction: direction,\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/checkbox-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/checkbox-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"{{ utils.bem('checkbox-group', [{ horizontal: direction === 'horizontal' }]) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/checkbox-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}"
  },
  {
    "path": "lib/circle/canvas.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ntype CanvasContext = WechatMiniprogram.CanvasContext;\nexport declare function adaptor(ctx: CanvasContext & Record<string, unknown>): CanvasContext;\nexport {};\n"
  },
  {
    "path": "lib/circle/canvas.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.adaptor = void 0;\nfunction adaptor(ctx) {\n    // @ts-ignore\n    return Object.assign(ctx, {\n        setStrokeStyle: function (val) {\n            ctx.strokeStyle = val;\n        },\n        setLineWidth: function (val) {\n            ctx.lineWidth = val;\n        },\n        setLineCap: function (val) {\n            ctx.lineCap = val;\n        },\n        setFillStyle: function (val) {\n            ctx.fillStyle = val;\n        },\n        setFontSize: function (val) {\n            ctx.font = String(val);\n        },\n        setGlobalAlpha: function (val) {\n            ctx.globalAlpha = val;\n        },\n        setLineJoin: function (val) {\n            ctx.lineJoin = val;\n        },\n        setTextAlign: function (val) {\n            ctx.textAlign = val;\n        },\n        setMiterLimit: function (val) {\n            ctx.miterLimit = val;\n        },\n        setShadow: function (offsetX, offsetY, blur, color) {\n            ctx.shadowOffsetX = offsetX;\n            ctx.shadowOffsetY = offsetY;\n            ctx.shadowBlur = blur;\n            ctx.shadowColor = color;\n        },\n        setTextBaseline: function (val) {\n            ctx.textBaseline = val;\n        },\n        createCircularGradient: function () { },\n        draw: function () { },\n    });\n}\nexports.adaptor = adaptor;\n"
  },
  {
    "path": "lib/circle/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/circle/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../common/color\");\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nvar version_1 = require(\"../common/version\");\nvar canvas_1 = require(\"./canvas\");\nfunction format(rate) {\n    return Math.min(Math.max(rate, 0), 100);\n}\nvar PERIMETER = 2 * Math.PI;\nvar BEGIN_ANGLE = -Math.PI / 2;\nvar STEP = 1;\n(0, component_1.VantComponent)({\n    props: {\n        text: String,\n        lineCap: {\n            type: String,\n            value: 'round',\n        },\n        value: {\n            type: Number,\n            value: 0,\n            observer: 'reRender',\n        },\n        speed: {\n            type: Number,\n            value: 50,\n        },\n        size: {\n            type: Number,\n            value: 100,\n            observer: function () {\n                this.drawCircle(this.currentValue);\n            },\n        },\n        fill: String,\n        layerColor: {\n            type: String,\n            value: color_1.WHITE,\n        },\n        color: {\n            type: null,\n            value: color_1.BLUE,\n            observer: function () {\n                var _this = this;\n                this.setHoverColor().then(function () {\n                    _this.drawCircle(_this.currentValue);\n                });\n            },\n        },\n        type: {\n            type: String,\n            value: '',\n        },\n        strokeWidth: {\n            type: Number,\n            value: 4,\n        },\n        clockwise: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        hoverColor: color_1.BLUE,\n    },\n    methods: {\n        getContext: function () {\n            var _this = this;\n            var _a = this.data, type = _a.type, size = _a.size;\n            if (type === '' || !(0, version_1.canIUseCanvas2d)()) {\n                var ctx = wx.createCanvasContext('van-circle', this);\n                return Promise.resolve(ctx);\n            }\n            var dpr = (0, utils_1.getSystemInfoSync)().pixelRatio;\n            return new Promise(function (resolve) {\n                wx.createSelectorQuery()\n                    .in(_this)\n                    .select('#van-circle')\n                    .node()\n                    .exec(function (res) {\n                    var canvas = res[0].node;\n                    var ctx = canvas.getContext(type);\n                    if (!_this.inited) {\n                        _this.inited = true;\n                        canvas.width = size * dpr;\n                        canvas.height = size * dpr;\n                        ctx.scale(dpr, dpr);\n                    }\n                    resolve((0, canvas_1.adaptor)(ctx));\n                });\n            });\n        },\n        setHoverColor: function () {\n            var _this = this;\n            var _a = this.data, color = _a.color, size = _a.size;\n            if ((0, validator_1.isObj)(color)) {\n                return this.getContext().then(function (context) {\n                    if (!context)\n                        return;\n                    var LinearColor = context.createLinearGradient(size, 0, 0, 0);\n                    Object.keys(color)\n                        .sort(function (a, b) { return parseFloat(a) - parseFloat(b); })\n                        .map(function (key) {\n                        return LinearColor.addColorStop(parseFloat(key) / 100, color[key]);\n                    });\n                    _this.hoverColor = LinearColor;\n                });\n            }\n            this.hoverColor = color;\n            return Promise.resolve();\n        },\n        presetCanvas: function (context, strokeStyle, beginAngle, endAngle, fill) {\n            var _a = this.data, strokeWidth = _a.strokeWidth, lineCap = _a.lineCap, clockwise = _a.clockwise, size = _a.size;\n            var position = size / 2;\n            var radius = position - strokeWidth / 2;\n            context.setStrokeStyle(strokeStyle);\n            context.setLineWidth(strokeWidth);\n            context.setLineCap(lineCap);\n            context.beginPath();\n            context.arc(position, position, radius, beginAngle, endAngle, !clockwise);\n            context.stroke();\n            if (fill) {\n                context.setFillStyle(fill);\n                context.fill();\n            }\n        },\n        renderLayerCircle: function (context) {\n            var _a = this.data, layerColor = _a.layerColor, fill = _a.fill;\n            this.presetCanvas(context, layerColor, 0, PERIMETER, fill);\n        },\n        renderHoverCircle: function (context, formatValue) {\n            var clockwise = this.data.clockwise;\n            // 结束角度\n            var progress = PERIMETER * (formatValue / 100);\n            var endAngle = clockwise\n                ? BEGIN_ANGLE + progress\n                : 3 * Math.PI - (BEGIN_ANGLE + progress);\n            this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle);\n        },\n        drawCircle: function (currentValue) {\n            var _this = this;\n            var size = this.data.size;\n            this.getContext().then(function (context) {\n                if (!context)\n                    return;\n                context.clearRect(0, 0, size, size);\n                _this.renderLayerCircle(context);\n                var formatValue = format(currentValue);\n                if (formatValue !== 0) {\n                    _this.renderHoverCircle(context, formatValue);\n                }\n                context.draw();\n            });\n        },\n        reRender: function () {\n            var _this = this;\n            // tofector 动画暂时没有想到好的解决方案\n            var _a = this.data, value = _a.value, speed = _a.speed;\n            if (speed <= 0 || speed > 1000) {\n                this.drawCircle(value);\n                return;\n            }\n            this.clearMockInterval();\n            this.currentValue = this.currentValue || 0;\n            var run = function () {\n                _this.interval = setTimeout(function () {\n                    if (_this.currentValue !== value) {\n                        if (Math.abs(_this.currentValue - value) < STEP) {\n                            _this.currentValue = value;\n                        }\n                        else if (_this.currentValue < value) {\n                            _this.currentValue += STEP;\n                        }\n                        else {\n                            _this.currentValue -= STEP;\n                        }\n                        _this.drawCircle(_this.currentValue);\n                        run();\n                    }\n                    else {\n                        _this.clearMockInterval();\n                    }\n                }, 1000 / speed);\n            };\n            run();\n        },\n        clearMockInterval: function () {\n            if (this.interval) {\n                clearTimeout(this.interval);\n                this.interval = null;\n            }\n        },\n    },\n    mounted: function () {\n        var _this = this;\n        this.currentValue = this.data.value;\n        this.setHoverColor().then(function () {\n            _this.drawCircle(_this.currentValue);\n        });\n    },\n    destroyed: function () {\n        this.clearMockInterval();\n    },\n});\n"
  },
  {
    "path": "lib/circle/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/circle/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-circle\">\n  <canvas class=\"van-circle__canvas\" type=\"{{ type }}\" style=\"width: {{ utils.addUnit(size) }};height:{{ utils.addUnit(size) }}\" id=\"van-circle\" canvas-id=\"van-circle\"></canvas>\n  <view wx:if=\"{{ !text }}\" class=\"van-circle__text\">\n    <slot></slot>\n  </view>\n  <cover-view wx:else class=\"van-circle__text\">{{ text }}</cover-view>\n</view>\n"
  },
  {
    "path": "lib/circle/index.wxss",
    "content": "@import '../common/index.wxss';.van-circle{display:inline-block;position:relative;text-align:center}.van-circle__text{color:var(--circle-text-color,#323233);left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%}"
  },
  {
    "path": "lib/col/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/col/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useParent)('row'),\n    props: {\n        span: Number,\n        offset: Number,\n    },\n});\n"
  },
  {
    "path": "lib/col/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/col/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('col', [span]) }} {{ offset ? 'van-col--offset-' + offset : '' }}\"\n  style=\"{{ computed.rootStyle({ gutter }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/col/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  if (!data.gutter) {\n    return '';\n  }\n\n  return style({\n    'padding-right': addUnit(data.gutter / 2),\n    'padding-left': addUnit(data.gutter / 2),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "lib/col/index.wxss",
    "content": "@import '../common/index.wxss';.van-col{box-sizing:border-box;float:left}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}"
  },
  {
    "path": "lib/collapse/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/collapse/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('collapse-item'),\n    props: {\n        value: {\n            type: null,\n            observer: 'updateExpanded',\n        },\n        accordion: {\n            type: Boolean,\n            observer: 'updateExpanded',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    methods: {\n        updateExpanded: function () {\n            this.children.forEach(function (child) {\n                child.updateExpanded();\n            });\n        },\n        switch: function (name, expanded) {\n            var _a = this.data, accordion = _a.accordion, value = _a.value;\n            var changeItem = name;\n            if (!accordion) {\n                name = expanded\n                    ? (value || []).concat(name)\n                    : (value || []).filter(function (activeName) { return activeName !== name; });\n            }\n            else {\n                name = expanded ? name : '';\n            }\n            if (expanded) {\n                this.$emit('open', changeItem);\n            }\n            else {\n                this.$emit('close', changeItem);\n            }\n            this.$emit('change', name);\n            this.$emit('input', name);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/collapse/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/collapse/index.wxml",
    "content": "<view class=\"custom-class van-collapse {{ border ? 'van-hairline--top-bottom' : '' }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/collapse/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "lib/collapse-item/animate.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nexport declare function setContentAnimate(context: WechatMiniprogram.Component.TrivialInstance, expanded: boolean, mounted: boolean): void;\n"
  },
  {
    "path": "lib/collapse-item/animate.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setContentAnimate = void 0;\nvar utils_1 = require(\"../common/utils\");\nfunction useAnimation(context, expanded, mounted, height) {\n    var animation = wx.createAnimation({\n        duration: 0,\n        timingFunction: 'ease-in-out',\n    });\n    if (expanded) {\n        if (height === 0) {\n            animation.height('auto').top(1).step();\n        }\n        else {\n            animation\n                .height(height)\n                .top(1)\n                .step({\n                duration: mounted ? 300 : 1,\n            })\n                .height('auto')\n                .step();\n        }\n        context.setData({\n            animation: animation.export(),\n        });\n        return;\n    }\n    animation.height(height).top(0).step({ duration: 1 }).height(0).step({\n        duration: 300,\n    });\n    context.setData({\n        animation: animation.export(),\n    });\n}\nfunction setContentAnimate(context, expanded, mounted) {\n    (0, utils_1.getRect)(context, '.van-collapse-item__content')\n        .then(function (rect) { return rect.height; })\n        .then(function (height) {\n        useAnimation(context, expanded, mounted, height);\n    });\n}\nexports.setContentAnimate = setContentAnimate;\n"
  },
  {
    "path": "lib/collapse-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/collapse-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar animate_1 = require(\"./animate\");\n(0, component_1.VantComponent)({\n    classes: ['title-class', 'content-class'],\n    relation: (0, relation_1.useParent)('collapse'),\n    props: {\n        size: String,\n        name: null,\n        title: null,\n        value: null,\n        icon: String,\n        label: String,\n        disabled: Boolean,\n        clickable: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        isLink: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        expanded: false,\n        parentBorder: true,\n    },\n    mounted: function () {\n        this.updateExpanded();\n        this.mounted = true;\n    },\n    methods: {\n        updateExpanded: function () {\n            if (!this.parent) {\n                return;\n            }\n            var _a = this.parent.data, value = _a.value, accordion = _a.accordion, border = _a.border;\n            var _b = this.parent.children, children = _b === void 0 ? [] : _b;\n            var name = this.data.name;\n            var index = children.indexOf(this);\n            var currentName = name == null ? index : name;\n            var expanded = accordion\n                ? value === currentName\n                : (value || []).some(function (name) { return name === currentName; });\n            if (expanded !== this.data.expanded) {\n                (0, animate_1.setContentAnimate)(this, expanded, this.mounted);\n            }\n            this.setData({ index: index, expanded: expanded, parentBorder: border });\n        },\n        onClick: function () {\n            if (this.data.disabled) {\n                return;\n            }\n            var _a = this.data, name = _a.name, expanded = _a.expanded;\n            var index = this.parent.children.indexOf(this);\n            var currentName = name == null ? index : name;\n            this.parent.switch(currentName, !expanded);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/collapse-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\"\n  }\n}\n"
  },
  {
    "path": "lib/collapse-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-collapse-item custom-class {{ index !== 0 && parentBorder ? 'van-hairline--top' : '' }}\">\n  <van-cell\n    size=\"{{ size }}\"\n    title=\"{{ title }}\"\n    title-class=\"title-class\"\n    icon=\"{{ icon }}\"\n    value=\"{{ value }}\"\n    label=\"{{ label }}\"\n    is-link=\"{{ isLink }}\"\n    clickable=\"{{ clickable }}\"\n    border=\"{{ border && expanded }}\"\n    class=\"{{ utils.bem('collapse-item__title', { disabled, expanded }) }}\"\n    right-icon-class=\"van-cell__right-icon\"\n    custom-class=\"van-cell\"\n    hover-class=\"van-cell--hover\"\n    bind:click=\"onClick\"\n  >\n    <slot\n      name=\"title\"\n      slot=\"title\"\n    />\n    <slot\n      name=\"icon\"\n      slot=\"icon\"\n    />\n    <slot name=\"value\" />\n    <slot\n      name=\"right-icon\"\n      slot=\"right-icon\"\n    />\n  </van-cell>\n  <view\n    class=\"{{ utils.bem('collapse-item__wrapper') }}\"\n    style=\"height: 0;\"\n    animation=\"{{ animation }}\"\n  >\n    <view\n      class=\"van-collapse-item__content content-class\"\n    >\n      <slot />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/collapse-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{transform:rotate(90deg);transition:transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{background-color:var(--collapse-item-content-background-color,#fff);color:var(--collapse-item-content-text-color,#969799);font-size:var(--collapse-item-content-font-size,13px);line-height:var(--collapse-item-content-line-height,1.5);padding:var(--collapse-item-content-padding,15px)}"
  },
  {
    "path": "lib/common/color.d.ts",
    "content": "export declare const RED = \"#ee0a24\";\nexport declare const BLUE = \"#1989fa\";\nexport declare const WHITE = \"#fff\";\nexport declare const GREEN = \"#07c160\";\nexport declare const ORANGE = \"#ff976a\";\nexport declare const GRAY = \"#323233\";\nexport declare const GRAY_DARK = \"#969799\";\n"
  },
  {
    "path": "lib/common/color.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GRAY_DARK = exports.GRAY = exports.ORANGE = exports.GREEN = exports.WHITE = exports.BLUE = exports.RED = void 0;\nexports.RED = '#ee0a24';\nexports.BLUE = '#1989fa';\nexports.WHITE = '#fff';\nexports.GREEN = '#07c160';\nexports.ORANGE = '#ff976a';\nexports.GRAY = '#323233';\nexports.GRAY_DARK = '#969799';\n"
  },
  {
    "path": "lib/common/component.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nimport { VantComponentOptions } from 'definitions/index';\ndeclare function VantComponent<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption>(vantOptions: VantComponentOptions<Data, Props, Methods>): void;\nexport { VantComponent };\n"
  },
  {
    "path": "lib/common/component.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VantComponent = void 0;\nvar basic_1 = require(\"../mixins/basic\");\nfunction mapKeys(source, target, map) {\n    Object.keys(map).forEach(function (key) {\n        if (source[key]) {\n            target[map[key]] = source[key];\n        }\n    });\n}\nfunction VantComponent(vantOptions) {\n    var options = {};\n    mapKeys(vantOptions, options, {\n        data: 'data',\n        props: 'properties',\n        watch: 'observers',\n        mixins: 'behaviors',\n        methods: 'methods',\n        beforeCreate: 'created',\n        created: 'attached',\n        mounted: 'ready',\n        destroyed: 'detached',\n        classes: 'externalClasses',\n    });\n    // add default externalClasses\n    options.externalClasses = options.externalClasses || [];\n    options.externalClasses.push('custom-class');\n    // add default behaviors\n    options.behaviors = options.behaviors || [];\n    options.behaviors.push(basic_1.basic);\n    // add relations\n    var relation = vantOptions.relation;\n    if (relation) {\n        options.relations = relation.relations;\n        options.behaviors.push(relation.mixin);\n    }\n    // map field to form-field behavior\n    if (vantOptions.field) {\n        options.behaviors.push('wx://form-field');\n    }\n    // add default options\n    options.options = {\n        multipleSlots: true,\n        addGlobalClass: true,\n    };\n    Component(options);\n}\nexports.VantComponent = VantComponent;\n"
  },
  {
    "path": "lib/common/index.wxss",
    "content": ".van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{clear:both;content:\"\";display:table}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:\" \";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}"
  },
  {
    "path": "lib/common/relation.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ntype TrivialInstance = WechatMiniprogram.Component.TrivialInstance;\nexport declare function useParent(name: string, onEffect?: (this: TrivialInstance) => void): {\n    relations: {\n        [x: string]: WechatMiniprogram.Component.RelationOption;\n    };\n    mixin: string;\n};\nexport declare function useChildren(name: string, onEffect?: (this: TrivialInstance, target: TrivialInstance) => void): {\n    relations: {\n        [x: string]: WechatMiniprogram.Component.RelationOption;\n    };\n    mixin: string;\n};\nexport {};\n"
  },
  {
    "path": "lib/common/relation.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useChildren = exports.useParent = void 0;\nfunction useParent(name, onEffect) {\n    var _a;\n    var path = \"../\".concat(name, \"/index\");\n    return {\n        relations: (_a = {},\n            _a[path] = {\n                type: 'ancestor',\n                linked: function () {\n                    onEffect && onEffect.call(this);\n                },\n                linkChanged: function () {\n                    onEffect && onEffect.call(this);\n                },\n                unlinked: function () {\n                    onEffect && onEffect.call(this);\n                },\n            },\n            _a),\n        mixin: Behavior({\n            created: function () {\n                var _this = this;\n                Object.defineProperty(this, 'parent', {\n                    get: function () { return _this.getRelationNodes(path)[0]; },\n                });\n                Object.defineProperty(this, 'index', {\n                    // @ts-ignore\n                    get: function () { var _a, _b; return (_b = (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.indexOf(_this); },\n                });\n            },\n        }),\n    };\n}\nexports.useParent = useParent;\nfunction useChildren(name, onEffect) {\n    var _a;\n    var path = \"../\".concat(name, \"/index\");\n    return {\n        relations: (_a = {},\n            _a[path] = {\n                type: 'descendant',\n                linked: function (target) {\n                    onEffect && onEffect.call(this, target);\n                },\n                linkChanged: function (target) {\n                    onEffect && onEffect.call(this, target);\n                },\n                unlinked: function (target) {\n                    onEffect && onEffect.call(this, target);\n                },\n            },\n            _a),\n        mixin: Behavior({\n            created: function () {\n                var _this = this;\n                Object.defineProperty(this, 'children', {\n                    get: function () { return _this.getRelationNodes(path) || []; },\n                });\n            },\n        }),\n    };\n}\nexports.useChildren = useChildren;\n"
  },
  {
    "path": "lib/common/style/clearfix.wxss",
    "content": ".van-clearfix:after{clear:both;content:\"\";display:table}"
  },
  {
    "path": "lib/common/style/ellipsis.wxss",
    "content": ".van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3}"
  },
  {
    "path": "lib/common/style/hairline.wxss",
    "content": ".van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:\" \";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}"
  },
  {
    "path": "lib/common/style/mixins/clearfix.wxss",
    "content": ""
  },
  {
    "path": "lib/common/style/mixins/ellipsis.wxss",
    "content": ""
  },
  {
    "path": "lib/common/style/mixins/hairline.wxss",
    "content": ""
  },
  {
    "path": "lib/common/style/var.wxss",
    "content": ""
  },
  {
    "path": "lib/common/utils.d.ts",
    "content": "/// <reference types=\"node\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\nexport { isDef } from './validator';\nexport { getSystemInfoSync } from './version';\nexport declare function range(num: number, min: number, max: number): number;\nexport declare function nextTick(cb: (...args: any[]) => void): void;\nexport declare function addUnit(value?: string | number): string | undefined;\nexport declare function requestAnimationFrame(cb: () => void): NodeJS.Timeout;\nexport declare function pickExclude(obj: unknown, keys: string[]): {};\nexport declare function getRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;\nexport declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;\nexport declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void;\nexport declare function toPromise(promiseLike: Promise<unknown> | unknown): Promise<unknown>;\nexport declare function addNumber(num1: any, num2: any): number;\nexport declare const clamp: (num: any, min: any, max: any) => number;\nexport declare function getCurrentPage<T>(): T & WechatMiniprogram.OptionalInterface<WechatMiniprogram.Page.ILifetime> & WechatMiniprogram.Page.InstanceProperties & WechatMiniprogram.Page.InstanceMethods<WechatMiniprogram.IAnyObject> & WechatMiniprogram.Page.Data<WechatMiniprogram.IAnyObject> & WechatMiniprogram.IAnyObject;\nexport declare const isPC: boolean;\nexport declare const isWxWork: boolean;\n"
  },
  {
    "path": "lib/common/utils.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWxWork = exports.isPC = exports.getCurrentPage = exports.clamp = exports.addNumber = exports.toPromise = exports.groupSetData = exports.getAllRect = exports.getRect = exports.pickExclude = exports.requestAnimationFrame = exports.addUnit = exports.nextTick = exports.range = exports.getSystemInfoSync = exports.isDef = void 0;\nvar validator_1 = require(\"./validator\");\nvar version_1 = require(\"./version\");\nvar validator_2 = require(\"./validator\");\nObject.defineProperty(exports, \"isDef\", { enumerable: true, get: function () { return validator_2.isDef; } });\nvar version_2 = require(\"./version\");\nObject.defineProperty(exports, \"getSystemInfoSync\", { enumerable: true, get: function () { return version_2.getSystemInfoSync; } });\nfunction range(num, min, max) {\n    return Math.min(Math.max(num, min), max);\n}\nexports.range = range;\nfunction nextTick(cb) {\n    if ((0, version_1.canIUseNextTick)()) {\n        wx.nextTick(cb);\n    }\n    else {\n        setTimeout(function () {\n            cb();\n        }, 1000 / 30);\n    }\n}\nexports.nextTick = nextTick;\nfunction addUnit(value) {\n    if (!(0, validator_1.isDef)(value)) {\n        return undefined;\n    }\n    value = String(value);\n    return (0, validator_1.isNumber)(value) ? \"\".concat(value, \"px\") : value;\n}\nexports.addUnit = addUnit;\nfunction requestAnimationFrame(cb) {\n    return setTimeout(function () {\n        cb();\n    }, 1000 / 30);\n}\nexports.requestAnimationFrame = requestAnimationFrame;\nfunction pickExclude(obj, keys) {\n    if (!(0, validator_1.isPlainObject)(obj)) {\n        return {};\n    }\n    return Object.keys(obj).reduce(function (prev, key) {\n        if (!keys.includes(key)) {\n            prev[key] = obj[key];\n        }\n        return prev;\n    }, {});\n}\nexports.pickExclude = pickExclude;\nfunction getRect(context, selector) {\n    return new Promise(function (resolve) {\n        wx.createSelectorQuery()\n            .in(context)\n            .select(selector)\n            .boundingClientRect()\n            .exec(function (rect) {\n            if (rect === void 0) { rect = []; }\n            return resolve(rect[0]);\n        });\n    });\n}\nexports.getRect = getRect;\nfunction getAllRect(context, selector) {\n    return new Promise(function (resolve) {\n        wx.createSelectorQuery()\n            .in(context)\n            .selectAll(selector)\n            .boundingClientRect()\n            .exec(function (rect) {\n            if (rect === void 0) { rect = []; }\n            return resolve(rect[0]);\n        });\n    });\n}\nexports.getAllRect = getAllRect;\nfunction groupSetData(context, cb) {\n    if ((0, version_1.canIUseGroupSetData)()) {\n        context.groupSetData(cb);\n    }\n    else {\n        cb();\n    }\n}\nexports.groupSetData = groupSetData;\nfunction toPromise(promiseLike) {\n    if ((0, validator_1.isPromise)(promiseLike)) {\n        return promiseLike;\n    }\n    return Promise.resolve(promiseLike);\n}\nexports.toPromise = toPromise;\n// 浮点数精度处理\nfunction addNumber(num1, num2) {\n    var cardinal = Math.pow(10, 10);\n    return Math.round((num1 + num2) * cardinal) / cardinal;\n}\nexports.addNumber = addNumber;\n// 限制value在[min, max]之间\nvar clamp = function (num, min, max) { return Math.min(Math.max(num, min), max); };\nexports.clamp = clamp;\nfunction getCurrentPage() {\n    var pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nexports.getCurrentPage = getCurrentPage;\nexports.isPC = ['mac', 'windows'].includes((0, version_1.getSystemInfoSync)().platform);\n// 是否企业微信\nexports.isWxWork = (0, version_1.getSystemInfoSync)().environment === 'wxwork';\n"
  },
  {
    "path": "lib/common/validator.d.ts",
    "content": "export declare function isFunction(val: unknown): val is Function;\nexport declare function isPlainObject(val: unknown): val is Record<string, unknown>;\nexport declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;\nexport declare function isDef(value: unknown): boolean;\nexport declare function isObj(x: unknown): x is Record<string, unknown>;\nexport declare function isNumber(value: string): boolean;\nexport declare function isBoolean(value: unknown): value is boolean;\nexport declare function isImageUrl(url: string): boolean;\nexport declare function isVideoUrl(url: string): boolean;\n"
  },
  {
    "path": "lib/common/validator.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isVideoUrl = exports.isImageUrl = exports.isBoolean = exports.isNumber = exports.isObj = exports.isDef = exports.isPromise = exports.isPlainObject = exports.isFunction = void 0;\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isFunction(val) {\n    return typeof val === 'function';\n}\nexports.isFunction = isFunction;\nfunction isPlainObject(val) {\n    return val !== null && typeof val === 'object' && !Array.isArray(val);\n}\nexports.isPlainObject = isPlainObject;\nfunction isPromise(val) {\n    return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch);\n}\nexports.isPromise = isPromise;\nfunction isDef(value) {\n    return value !== undefined && value !== null;\n}\nexports.isDef = isDef;\nfunction isObj(x) {\n    var type = typeof x;\n    return x !== null && (type === 'object' || type === 'function');\n}\nexports.isObj = isObj;\nfunction isNumber(value) {\n    return /^\\d+(\\.\\d+)?$/.test(value);\n}\nexports.isNumber = isNumber;\nfunction isBoolean(value) {\n    return typeof value === 'boolean';\n}\nexports.isBoolean = isBoolean;\nvar IMAGE_REGEXP = /\\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;\nvar VIDEO_REGEXP = /\\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i;\nfunction isImageUrl(url) {\n    return IMAGE_REGEXP.test(url);\n}\nexports.isImageUrl = isImageUrl;\nfunction isVideoUrl(url) {\n    return VIDEO_REGEXP.test(url);\n}\nexports.isVideoUrl = isVideoUrl;\n"
  },
  {
    "path": "lib/common/version.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ninterface WxWorkSystemInfo extends WechatMiniprogram.SystemInfo {\n    environment?: 'wxwork';\n}\ninterface SystemInfo extends WxWorkSystemInfo, WechatMiniprogram.SystemInfo {\n}\nexport declare function getSystemInfoSync(): SystemInfo;\nexport declare function canIUseModel(): boolean;\nexport declare function canIUseFormFieldButton(): boolean;\nexport declare function canIUseAnimate(): boolean;\nexport declare function canIUseGroupSetData(): boolean;\nexport declare function canIUseNextTick(): boolean;\nexport declare function canIUseCanvas2d(): boolean;\nexport declare function canIUseGetUserProfile(): boolean;\nexport {};\n"
  },
  {
    "path": "lib/common/version.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.canIUseGetUserProfile = exports.canIUseCanvas2d = exports.canIUseNextTick = exports.canIUseGroupSetData = exports.canIUseAnimate = exports.canIUseFormFieldButton = exports.canIUseModel = exports.getSystemInfoSync = void 0;\nvar systemInfo;\nfunction getSystemInfoSync() {\n    if (systemInfo == null) {\n        systemInfo = wx.getSystemInfoSync();\n    }\n    return systemInfo;\n}\nexports.getSystemInfoSync = getSystemInfoSync;\nfunction compareVersion(v1, v2) {\n    v1 = v1.split('.');\n    v2 = v2.split('.');\n    var len = Math.max(v1.length, v2.length);\n    while (v1.length < len) {\n        v1.push('0');\n    }\n    while (v2.length < len) {\n        v2.push('0');\n    }\n    for (var i = 0; i < len; i++) {\n        var num1 = parseInt(v1[i], 10);\n        var num2 = parseInt(v2[i], 10);\n        if (num1 > num2) {\n            return 1;\n        }\n        if (num1 < num2) {\n            return -1;\n        }\n    }\n    return 0;\n}\nfunction gte(version) {\n    var system = getSystemInfoSync();\n    return compareVersion(system.SDKVersion, version) >= 0;\n}\nfunction canIUseModel() {\n    return gte('2.9.3');\n}\nexports.canIUseModel = canIUseModel;\nfunction canIUseFormFieldButton() {\n    return gte('2.10.3');\n}\nexports.canIUseFormFieldButton = canIUseFormFieldButton;\nfunction canIUseAnimate() {\n    return gte('2.9.0');\n}\nexports.canIUseAnimate = canIUseAnimate;\nfunction canIUseGroupSetData() {\n    return gte('2.4.0');\n}\nexports.canIUseGroupSetData = canIUseGroupSetData;\nfunction canIUseNextTick() {\n    try {\n        return wx.canIUse('nextTick');\n    }\n    catch (e) {\n        return gte('2.7.1');\n    }\n}\nexports.canIUseNextTick = canIUseNextTick;\nfunction canIUseCanvas2d() {\n    return gte('2.9.0');\n}\nexports.canIUseCanvas2d = canIUseCanvas2d;\nfunction canIUseGetUserProfile() {\n    return !!wx.getUserProfile;\n}\nexports.canIUseGetUserProfile = canIUseGetUserProfile;\n"
  },
  {
    "path": "lib/config-provider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/config-provider/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        themeVars: {\n            type: Object,\n            value: {},\n        },\n    },\n});\n"
  },
  {
    "path": "lib/config-provider/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/config-provider/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-config-provider\" style=\"{{ computed.mapThemeVarsToCSSVars(themeVars) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/config-provider/index.wxs",
    "content": "/* eslint-disable */\nvar object = require('../wxs/object.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction kebabCase(word) {\n  var newWord = word\n    .replace(getRegExp(\"[A-Z]\", 'g'), function (i) {\n      return '-' + i;\n    })\n    .toLowerCase()\n    .replace(getRegExp(\"^-\"), '');\n\n  return newWord;\n}\n\nfunction mapThemeVarsToCSSVars(themeVars) {\n  var cssVars = {};\n  object.keys(themeVars).forEach(function (key) {\n    var cssVarsKey = '--' + kebabCase(key);\n    cssVars[cssVarsKey] = themeVars[key];\n  });\n\n  return style(cssVars);\n}\n\nmodule.exports = {\n  kebabCase: kebabCase,\n  mapThemeVarsToCSSVars: mapThemeVarsToCSSVars,\n};\n"
  },
  {
    "path": "lib/count-down/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/count-down/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"./utils\");\nfunction simpleTick(fn) {\n    return setTimeout(fn, 30);\n}\n(0, component_1.VantComponent)({\n    props: {\n        useSlot: Boolean,\n        millisecond: Boolean,\n        time: {\n            type: Number,\n            observer: 'reset',\n        },\n        format: {\n            type: String,\n            value: 'HH:mm:ss',\n        },\n        autoStart: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        timeData: (0, utils_1.parseTimeData)(0),\n        formattedTime: '0',\n    },\n    destroyed: function () {\n        clearTimeout(this.tid);\n        this.tid = null;\n    },\n    methods: {\n        // 开始\n        start: function () {\n            if (this.counting) {\n                return;\n            }\n            this.counting = true;\n            this.endTime = Date.now() + this.remain;\n            this.tick();\n        },\n        // 暂停\n        pause: function () {\n            this.counting = false;\n            clearTimeout(this.tid);\n        },\n        // 重置\n        reset: function () {\n            this.pause();\n            this.remain = this.data.time;\n            this.setRemain(this.remain);\n            if (this.data.autoStart) {\n                this.start();\n            }\n        },\n        tick: function () {\n            if (this.data.millisecond) {\n                this.microTick();\n            }\n            else {\n                this.macroTick();\n            }\n        },\n        microTick: function () {\n            var _this = this;\n            this.tid = simpleTick(function () {\n                _this.setRemain(_this.getRemain());\n                if (_this.remain !== 0) {\n                    _this.microTick();\n                }\n            });\n        },\n        macroTick: function () {\n            var _this = this;\n            this.tid = simpleTick(function () {\n                var remain = _this.getRemain();\n                if (!(0, utils_1.isSameSecond)(remain, _this.remain) || remain === 0) {\n                    _this.setRemain(remain);\n                }\n                if (_this.remain !== 0) {\n                    _this.macroTick();\n                }\n            });\n        },\n        getRemain: function () {\n            return Math.max(this.endTime - Date.now(), 0);\n        },\n        setRemain: function (remain) {\n            this.remain = remain;\n            var timeData = (0, utils_1.parseTimeData)(remain);\n            if (this.data.useSlot) {\n                this.$emit('change', timeData);\n            }\n            this.setData({\n                formattedTime: (0, utils_1.parseFormat)(this.data.format, timeData),\n            });\n            if (remain === 0) {\n                this.pause();\n                this.$emit('finish');\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/count-down/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/count-down/index.wxml",
    "content": "<view class=\"van-count-down\">\n  <slot wx:if=\"{{ useSlot }}\"/>\n  <block wx:else>{{ formattedTime }}</block>\n</view>\n"
  },
  {
    "path": "lib/count-down/index.wxss",
    "content": "@import '../common/index.wxss';.van-count-down{color:var(--count-down-text-color,#323233);font-size:var(--count-down-font-size,14px);line-height:var(--count-down-line-height,20px)}"
  },
  {
    "path": "lib/count-down/utils.d.ts",
    "content": "export type TimeData = {\n    days: number;\n    hours: number;\n    minutes: number;\n    seconds: number;\n    milliseconds: number;\n};\nexport declare function parseTimeData(time: number): TimeData;\nexport declare function parseFormat(format: string, timeData: TimeData): string;\nexport declare function isSameSecond(time1: number, time2: number): boolean;\n"
  },
  {
    "path": "lib/count-down/utils.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isSameSecond = exports.parseFormat = exports.parseTimeData = void 0;\nfunction padZero(num, targetLength) {\n    if (targetLength === void 0) { targetLength = 2; }\n    var str = num + '';\n    while (str.length < targetLength) {\n        str = '0' + str;\n    }\n    return str;\n}\nvar SECOND = 1000;\nvar MINUTE = 60 * SECOND;\nvar HOUR = 60 * MINUTE;\nvar DAY = 24 * HOUR;\nfunction parseTimeData(time) {\n    var days = Math.floor(time / DAY);\n    var hours = Math.floor((time % DAY) / HOUR);\n    var minutes = Math.floor((time % HOUR) / MINUTE);\n    var seconds = Math.floor((time % MINUTE) / SECOND);\n    var milliseconds = Math.floor(time % SECOND);\n    return {\n        days: days,\n        hours: hours,\n        minutes: minutes,\n        seconds: seconds,\n        milliseconds: milliseconds,\n    };\n}\nexports.parseTimeData = parseTimeData;\nfunction parseFormat(format, timeData) {\n    var days = timeData.days;\n    var hours = timeData.hours, minutes = timeData.minutes, seconds = timeData.seconds, milliseconds = timeData.milliseconds;\n    if (format.indexOf('DD') === -1) {\n        hours += days * 24;\n    }\n    else {\n        format = format.replace('DD', padZero(days));\n    }\n    if (format.indexOf('HH') === -1) {\n        minutes += hours * 60;\n    }\n    else {\n        format = format.replace('HH', padZero(hours));\n    }\n    if (format.indexOf('mm') === -1) {\n        seconds += minutes * 60;\n    }\n    else {\n        format = format.replace('mm', padZero(minutes));\n    }\n    if (format.indexOf('ss') === -1) {\n        milliseconds += seconds * 1000;\n    }\n    else {\n        format = format.replace('ss', padZero(seconds));\n    }\n    return format.replace('SSS', padZero(milliseconds, 3));\n}\nexports.parseFormat = parseFormat;\nfunction isSameSecond(time1, time2) {\n    return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);\n}\nexports.isSameSecond = isSameSecond;\n"
  },
  {
    "path": "lib/datetime-picker/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/datetime-picker/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar validator_1 = require(\"../common/validator\");\nvar shared_1 = require(\"../picker/shared\");\nvar currentYear = new Date().getFullYear();\nfunction isValidDate(date) {\n    return (0, validator_1.isDef)(date) && !isNaN(new Date(date).getTime());\n}\nfunction range(num, min, max) {\n    return Math.min(Math.max(num, min), max);\n}\nfunction padZero(val) {\n    return \"00\".concat(val).slice(-2);\n}\nfunction times(n, iteratee) {\n    var index = -1;\n    var result = Array(n < 0 ? 0 : n);\n    while (++index < n) {\n        result[index] = iteratee(index);\n    }\n    return result;\n}\nfunction getTrueValue(formattedValue) {\n    if (formattedValue === undefined) {\n        formattedValue = '1';\n    }\n    while (isNaN(parseInt(formattedValue, 10))) {\n        formattedValue = formattedValue.slice(1);\n    }\n    return parseInt(formattedValue, 10);\n}\nfunction getMonthEndDay(year, month) {\n    return 32 - new Date(year, month - 1, 32).getDate();\n}\nvar defaultFormatter = function (type, value) { return value; };\n(0, component_1.VantComponent)({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: __assign(__assign({}, shared_1.pickerProps), { value: {\n            type: null,\n            observer: 'updateValue',\n        }, filter: null, type: {\n            type: String,\n            value: 'datetime',\n            observer: 'updateValue',\n        }, showToolbar: {\n            type: Boolean,\n            value: true,\n        }, formatter: {\n            type: null,\n            value: defaultFormatter,\n        }, minDate: {\n            type: Number,\n            value: new Date(currentYear - 10, 0, 1).getTime(),\n            observer: 'updateValue',\n        }, maxDate: {\n            type: Number,\n            value: new Date(currentYear + 10, 11, 31).getTime(),\n            observer: 'updateValue',\n        }, minHour: {\n            type: Number,\n            value: 0,\n            observer: 'updateValue',\n        }, maxHour: {\n            type: Number,\n            value: 23,\n            observer: 'updateValue',\n        }, minMinute: {\n            type: Number,\n            value: 0,\n            observer: 'updateValue',\n        }, maxMinute: {\n            type: Number,\n            value: 59,\n            observer: 'updateValue',\n        } }),\n    data: {\n        innerValue: Date.now(),\n        columns: [],\n    },\n    methods: {\n        updateValue: function () {\n            var _this = this;\n            var data = this.data;\n            var val = this.correctValue(data.value);\n            var isEqual = val === data.innerValue;\n            this.updateColumnValue(val).then(function () {\n                if (!isEqual) {\n                    _this.$emit('input', val);\n                }\n            });\n        },\n        getPicker: function () {\n            if (this.picker == null) {\n                this.picker = this.selectComponent('.van-datetime-picker');\n                var picker_1 = this.picker;\n                var setColumnValues_1 = picker_1.setColumnValues;\n                picker_1.setColumnValues = function () {\n                    var args = [];\n                    for (var _i = 0; _i < arguments.length; _i++) {\n                        args[_i] = arguments[_i];\n                    }\n                    return setColumnValues_1.apply(picker_1, __spreadArray(__spreadArray([], args, true), [false], false));\n                };\n            }\n            return this.picker;\n        },\n        updateColumns: function () {\n            var _a = this.data.formatter, formatter = _a === void 0 ? defaultFormatter : _a;\n            var results = this.getOriginColumns().map(function (column) { return ({\n                values: column.values.map(function (value) { return formatter(column.type, value); }),\n            }); });\n            return this.set({ columns: results });\n        },\n        getOriginColumns: function () {\n            var filter = this.data.filter;\n            var results = this.getRanges().map(function (_a) {\n                var type = _a.type, range = _a.range;\n                var values = times(range[1] - range[0] + 1, function (index) {\n                    var value = range[0] + index;\n                    return type === 'year' ? \"\".concat(value) : padZero(value);\n                });\n                if (filter) {\n                    values = filter(type, values);\n                }\n                return { type: type, values: values };\n            });\n            return results;\n        },\n        getRanges: function () {\n            var data = this.data;\n            if (data.type === 'time') {\n                return [\n                    {\n                        type: 'hour',\n                        range: [data.minHour, data.maxHour],\n                    },\n                    {\n                        type: 'minute',\n                        range: [data.minMinute, data.maxMinute],\n                    },\n                ];\n            }\n            var _a = this.getBoundary('max', data.innerValue), maxYear = _a.maxYear, maxDate = _a.maxDate, maxMonth = _a.maxMonth, maxHour = _a.maxHour, maxMinute = _a.maxMinute;\n            var _b = this.getBoundary('min', data.innerValue), minYear = _b.minYear, minDate = _b.minDate, minMonth = _b.minMonth, minHour = _b.minHour, minMinute = _b.minMinute;\n            var result = [\n                {\n                    type: 'year',\n                    range: [minYear, maxYear],\n                },\n                {\n                    type: 'month',\n                    range: [minMonth, maxMonth],\n                },\n                {\n                    type: 'day',\n                    range: [minDate, maxDate],\n                },\n                {\n                    type: 'hour',\n                    range: [minHour, maxHour],\n                },\n                {\n                    type: 'minute',\n                    range: [minMinute, maxMinute],\n                },\n            ];\n            if (data.type === 'date')\n                result.splice(3, 2);\n            if (data.type === 'year-month')\n                result.splice(2, 3);\n            return result;\n        },\n        correctValue: function (value) {\n            var data = this.data;\n            // validate value\n            var isDateType = data.type !== 'time';\n            if (isDateType && !isValidDate(value)) {\n                value = data.minDate;\n            }\n            else if (!isDateType && !value) {\n                var minHour = data.minHour;\n                value = \"\".concat(padZero(minHour), \":00\");\n            }\n            // time type\n            if (!isDateType) {\n                var _a = value.split(':'), hour = _a[0], minute = _a[1];\n                hour = padZero(range(hour, data.minHour, data.maxHour));\n                minute = padZero(range(minute, data.minMinute, data.maxMinute));\n                return \"\".concat(hour, \":\").concat(minute);\n            }\n            // date type\n            value = Math.max(value, data.minDate);\n            value = Math.min(value, data.maxDate);\n            return value;\n        },\n        getBoundary: function (type, innerValue) {\n            var _a;\n            var value = new Date(innerValue);\n            var boundary = new Date(this.data[\"\".concat(type, \"Date\")]);\n            var year = boundary.getFullYear();\n            var month = 1;\n            var date = 1;\n            var hour = 0;\n            var minute = 0;\n            if (type === 'max') {\n                month = 12;\n                date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);\n                hour = 23;\n                minute = 59;\n            }\n            if (value.getFullYear() === year) {\n                month = boundary.getMonth() + 1;\n                if (value.getMonth() + 1 === month) {\n                    date = boundary.getDate();\n                    if (value.getDate() === date) {\n                        hour = boundary.getHours();\n                        if (value.getHours() === hour) {\n                            minute = boundary.getMinutes();\n                        }\n                    }\n                }\n            }\n            return _a = {},\n                _a[\"\".concat(type, \"Year\")] = year,\n                _a[\"\".concat(type, \"Month\")] = month,\n                _a[\"\".concat(type, \"Date\")] = date,\n                _a[\"\".concat(type, \"Hour\")] = hour,\n                _a[\"\".concat(type, \"Minute\")] = minute,\n                _a;\n        },\n        onCancel: function () {\n            this.$emit('cancel');\n        },\n        onConfirm: function () {\n            this.$emit('confirm', this.data.innerValue);\n        },\n        onChange: function () {\n            var _this = this;\n            var data = this.data;\n            var value;\n            var picker = this.getPicker();\n            var originColumns = this.getOriginColumns();\n            if (data.type === 'time') {\n                var indexes = picker.getIndexes();\n                value = \"\".concat(+originColumns[0].values[indexes[0]], \":\").concat(+originColumns[1]\n                    .values[indexes[1]]);\n            }\n            else {\n                var indexes = picker.getIndexes();\n                var values = indexes.map(function (value, index) { return originColumns[index].values[value]; });\n                var year = getTrueValue(values[0]);\n                var month = getTrueValue(values[1]);\n                var maxDate = getMonthEndDay(year, month);\n                var date = getTrueValue(values[2]);\n                if (data.type === 'year-month') {\n                    date = 1;\n                }\n                date = date > maxDate ? maxDate : date;\n                var hour = 0;\n                var minute = 0;\n                if (data.type === 'datetime') {\n                    hour = getTrueValue(values[3]);\n                    minute = getTrueValue(values[4]);\n                }\n                value = new Date(year, month - 1, date, hour, minute);\n            }\n            value = this.correctValue(value);\n            this.updateColumnValue(value).then(function () {\n                _this.$emit('input', value);\n                _this.$emit('change', picker);\n            });\n        },\n        updateColumnValue: function (value) {\n            var _this = this;\n            var values = [];\n            var type = this.data.type;\n            var formatter = this.data.formatter || defaultFormatter;\n            var picker = this.getPicker();\n            if (type === 'time') {\n                var pair = value.split(':');\n                values = [formatter('hour', pair[0]), formatter('minute', pair[1])];\n            }\n            else {\n                var date = new Date(value);\n                values = [\n                    formatter('year', \"\".concat(date.getFullYear())),\n                    formatter('month', padZero(date.getMonth() + 1)),\n                ];\n                if (type === 'date') {\n                    values.push(formatter('day', padZero(date.getDate())));\n                }\n                if (type === 'datetime') {\n                    values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes())));\n                }\n            }\n            return this.set({ innerValue: value })\n                .then(function () { return _this.updateColumns(); })\n                .then(function () { return picker.setValues(values); });\n        },\n    },\n    created: function () {\n        var _this = this;\n        var innerValue = this.correctValue(this.data.value);\n        this.updateColumnValue(innerValue).then(function () {\n            _this.$emit('input', innerValue);\n        });\n    },\n});\n"
  },
  {
    "path": "lib/datetime-picker/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-picker\": \"../picker/index\"\n  }\n}\n"
  },
  {
    "path": "lib/datetime-picker/index.wxml",
    "content": "<van-picker\n  class=\"van-datetime-picker\"\n  active-class=\"active-class\"\n  toolbar-class=\"toolbar-class\"\n  column-class=\"column-class\"\n  title=\"{{ title }}\"\n  columns=\"{{ columns }}\"\n  item-height=\"{{ itemHeight }}\"\n  show-toolbar=\"{{ showToolbar }}\"\n  visible-item-count=\"{{ visibleItemCount }}\"\n  confirm-button-text=\"{{ confirmButtonText }}\"\n  cancel-button-text=\"{{ cancelButtonText }}\"\n  bind:change=\"onChange\"\n  bind:confirm=\"onConfirm\"\n  bind:cancel=\"onCancel\"\n/>\n"
  },
  {
    "path": "lib/datetime-picker/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "lib/definitions/index.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ninterface VantComponentInstance {\n    parent: WechatMiniprogram.Component.TrivialInstance;\n    children: WechatMiniprogram.Component.TrivialInstance[];\n    index: number;\n    $emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;\n    setView: (value: Record<string, any>, callback?: () => void) => void;\n}\nexport type VantComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {\n    data?: Data;\n    field?: boolean;\n    classes?: string[];\n    mixins?: string[];\n    props?: Props;\n    relation?: {\n        relations: Record<string, WechatMiniprogram.Component.RelationOption>;\n        mixin: string;\n    };\n    watch?: Record<string, (...args: any[]) => any>;\n    methods?: Methods;\n    beforeCreate?: () => void;\n    created?: () => void;\n    mounted?: () => void;\n    destroyed?: () => void;\n} & ThisType<VantComponentInstance & WechatMiniprogram.Component.Instance<Data & {\n    name: string;\n    value: any;\n} & Record<string, any>, Props, Methods> & Record<string, any>>;\nexport {};\n"
  },
  {
    "path": "lib/definitions/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"
  },
  {
    "path": "lib/dialog/dialog.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\nexport type Action = 'confirm' | 'cancel' | 'overlay';\ntype DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;\ninterface DialogOptions {\n    lang?: string;\n    show?: boolean;\n    title?: string;\n    width?: string | number | null;\n    zIndex?: number;\n    theme?: string;\n    context?: (() => DialogContext) | DialogContext;\n    message?: string;\n    overlay?: boolean;\n    selector?: string;\n    ariaLabel?: string;\n    /**\n     * @deprecated use custom-class instead\n     */\n    className?: string;\n    customStyle?: string;\n    transition?: string;\n    /**\n     * @deprecated use beforeClose instead\n     */\n    asyncClose?: boolean;\n    beforeClose?: null | ((action: Action) => Promise<void | boolean> | void);\n    businessId?: number;\n    sessionFrom?: string;\n    overlayStyle?: string;\n    appParameter?: string;\n    messageAlign?: string;\n    sendMessageImg?: string;\n    showMessageCard?: boolean;\n    sendMessagePath?: string;\n    sendMessageTitle?: string;\n    confirmButtonText?: string;\n    cancelButtonText?: string;\n    showConfirmButton?: boolean;\n    showCancelButton?: boolean;\n    closeOnClickOverlay?: boolean;\n    confirmButtonOpenType?: string;\n}\ndeclare const Dialog: {\n    (options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    alert(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    confirm(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    close(): void;\n    stopLoading(): void;\n    currentOptions: DialogOptions;\n    defaultOptions: DialogOptions;\n    setDefaultOptions(options: DialogOptions): void;\n    resetDefaultOptions(): void;\n};\nexport default Dialog;\n"
  },
  {
    "path": "lib/dialog/dialog.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar queue = [];\nvar defaultOptions = {\n    show: false,\n    title: '',\n    width: null,\n    theme: 'default',\n    message: '',\n    zIndex: 100,\n    overlay: true,\n    selector: '#van-dialog',\n    className: '',\n    asyncClose: false,\n    beforeClose: null,\n    transition: 'scale',\n    customStyle: '',\n    messageAlign: '',\n    overlayStyle: '',\n    confirmButtonText: '确认',\n    cancelButtonText: '取消',\n    showConfirmButton: true,\n    showCancelButton: false,\n    closeOnClickOverlay: false,\n    confirmButtonOpenType: '',\n};\nvar currentOptions = __assign({}, defaultOptions);\nfunction getContext() {\n    var pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nvar Dialog = function (options) {\n    options = __assign(__assign({}, currentOptions), options);\n    return new Promise(function (resolve, reject) {\n        var context = (typeof options.context === 'function'\n            ? options.context()\n            : options.context) || getContext();\n        var dialog = context.selectComponent(options.selector);\n        delete options.context;\n        delete options.selector;\n        if (dialog) {\n            dialog.setData(__assign({ callback: function (action, instance) {\n                    action === 'confirm' ? resolve(instance) : reject(instance);\n                } }, options));\n            wx.nextTick(function () {\n                dialog.setData({ show: true });\n            });\n            queue.push(dialog);\n        }\n        else {\n            console.warn('未找到 van-dialog 节点，请确认 selector 及 context 是否正确');\n        }\n    });\n};\nDialog.alert = function (options) { return Dialog(options); };\nDialog.confirm = function (options) {\n    return Dialog(__assign({ showCancelButton: true }, options));\n};\nDialog.close = function () {\n    queue.forEach(function (dialog) {\n        dialog.close();\n    });\n    queue = [];\n};\nDialog.stopLoading = function () {\n    queue.forEach(function (dialog) {\n        dialog.stopLoading();\n    });\n};\nDialog.currentOptions = currentOptions;\nDialog.defaultOptions = defaultOptions;\nDialog.setDefaultOptions = function (options) {\n    currentOptions = __assign(__assign({}, currentOptions), options);\n    Dialog.currentOptions = currentOptions;\n};\nDialog.resetDefaultOptions = function () {\n    currentOptions = __assign({}, defaultOptions);\n    Dialog.currentOptions = currentOptions;\n};\nDialog.resetDefaultOptions();\nexports.default = Dialog;\n"
  },
  {
    "path": "lib/dialog/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/dialog/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\nvar color_1 = require(\"../common/color\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    mixins: [button_1.button],\n    classes: ['cancle-button-class', 'confirm-button-class'],\n    props: {\n        show: {\n            type: Boolean,\n            observer: function (show) {\n                !show && this.stopLoading();\n            },\n        },\n        title: String,\n        message: String,\n        theme: {\n            type: String,\n            value: 'default',\n        },\n        confirmButtonId: String,\n        className: String,\n        customStyle: String,\n        asyncClose: Boolean,\n        messageAlign: String,\n        beforeClose: null,\n        overlayStyle: String,\n        useSlot: Boolean,\n        useTitleSlot: Boolean,\n        useConfirmButtonSlot: Boolean,\n        useCancelButtonSlot: Boolean,\n        showCancelButton: Boolean,\n        closeOnClickOverlay: Boolean,\n        confirmButtonOpenType: String,\n        width: null,\n        zIndex: {\n            type: Number,\n            value: 2000,\n        },\n        confirmButtonText: {\n            type: String,\n            value: '确认',\n        },\n        cancelButtonText: {\n            type: String,\n            value: '取消',\n        },\n        confirmButtonColor: {\n            type: String,\n            value: color_1.RED,\n        },\n        cancelButtonColor: {\n            type: String,\n            value: color_1.GRAY,\n        },\n        showConfirmButton: {\n            type: Boolean,\n            value: true,\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        transition: {\n            type: String,\n            value: 'scale',\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        loading: {\n            confirm: false,\n            cancel: false,\n        },\n        callback: (function () { }),\n    },\n    methods: {\n        onConfirm: function () {\n            this.handleAction('confirm');\n        },\n        onCancel: function () {\n            this.handleAction('cancel');\n        },\n        onClickOverlay: function () {\n            this.close('overlay');\n        },\n        close: function (action) {\n            this.setData({ show: false });\n            this.closeAction = action;\n        },\n        onAfterLeave: function () {\n            var action = this.closeAction;\n            this.$emit('close', action);\n            var callback = this.data.callback;\n            if (callback) {\n                callback(action, this);\n            }\n        },\n        stopLoading: function () {\n            this.setData({\n                loading: {\n                    confirm: false,\n                    cancel: false,\n                },\n            });\n        },\n        handleAction: function (action) {\n            var _a;\n            var _this = this;\n            this.$emit(action, { dialog: this });\n            var _b = this.data, asyncClose = _b.asyncClose, beforeClose = _b.beforeClose;\n            if (!asyncClose && !beforeClose) {\n                this.close(action);\n                return;\n            }\n            this.setData((_a = {},\n                _a[\"loading.\".concat(action)] = true,\n                _a));\n            if (beforeClose) {\n                (0, utils_1.toPromise)(beforeClose(action)).then(function (value) {\n                    if (value) {\n                        _this.close(action);\n                    }\n                    else {\n                        _this.stopLoading();\n                    }\n                });\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/dialog/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"van-button\": \"../button/index\",\n    \"van-goods-action\": \"../goods-action/index\",\n    \"van-goods-action-button\": \"../goods-action-button/index\"\n  }\n}\n"
  },
  {
    "path": "lib/dialog/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<van-popup\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay=\"{{ overlay }}\"\n  transition=\"{{ transition }}\"\n  custom-class=\"van-dialog van-dialog--{{ theme }}{{ className }} custom-class\"\n  custom-style=\"width: {{ utils.addUnit(width) }};{{ customStyle }}\"\n  overlay-style=\"{{ overlayStyle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClickOverlay\"\n  bind:after-leave=\"onAfterLeave\"\n>\n  <view\n    wx:if=\"{{ title || useTitleSlot  }}\"\n    class=\"{{ utils.bem('dialog__header', { isolated: !(message || useSlot) }) }}\"\n  >\n    <slot wx:if=\"{{ useTitleSlot }}\" name=\"title\" />\n    <block wx:elif=\"{{ title }}\">{{ title }}</block>\n  </view>\n\n  <slot wx:if=\"{{ useSlot }}\" />\n  <view\n    wx:elif=\"{{ message }}\"\n    class=\"{{ utils.bem('dialog__message', [theme, messageAlign, { hasTitle: title }]) }}\"\n  >\n    <text class=\"van-dialog__message-text\">{{ message }}</text>\n  </view>\n\n  <van-goods-action wx:if=\"{{ theme === 'round-button' }}\" custom-class=\"van-dialog__footer--round-button\">\n    <van-goods-action-button\n      wx:if=\"{{ showCancelButton }}\"\n      size=\"large\"\n      loading=\"{{ loading.cancel }}\"\n      class=\"van-dialog__button van-hairline--right\"\n      custom-class=\"van-dialog__cancel cancle-button-class\"\n      custom-style=\"color: {{ cancelButtonColor }}\"\n      bind:click=\"onCancel\"\n    >\n      {{ cancelButtonText }}\n    </van-goods-action-button>\n    <van-goods-action-button\n      wx:if=\"{{ showConfirmButton }}\"\n      size=\"large\"\n      class=\"van-dialog__button\"\n      loading=\"{{ loading.confirm }}\"\n      custom-class=\"van-dialog__confirm confirm-button-class\"\n      custom-style=\"color: {{ confirmButtonColor }}\"\n      button-id=\"{{ confirmButtonId }}\"\n      open-type=\"{{ confirmButtonOpenType }}\"\n      lang=\"{{ lang }}\"\n      business-id=\"{{ businessId }}\"\n      session-from=\"{{ sessionFrom }}\"\n      send-message-title=\"{{ sendMessageTitle }}\"\n      send-message-path=\"{{ sendMessagePath }}\"\n      send-message-img=\"{{ sendMessageImg }}\"\n      show-message-card=\"{{ showMessageCard }}\"\n      app-parameter=\"{{ appParameter }}\"\n      bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n      bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n      bind:click=\"onConfirm\"\n      bindgetuserinfo=\"onGetUserInfo\"\n      bindcontact=\"onContact\"\n      bindgetphonenumber=\"onGetPhoneNumber\"\n      binderror=\"onError\"\n      bindlaunchapp=\"onLaunchApp\"\n      bindopensetting=\"onOpenSetting\"\n    >\n      {{ confirmButtonText }}\n    </van-goods-action-button>\n  </van-goods-action>\n\n  <view wx:elif=\"{{ showCancelButton || showConfirmButton }}\" class=\"van-hairline--top van-dialog__footer\">\n    <block wx:if=\"{{ showCancelButton }}\">\n      <slot wx:if=\"{{ useCancelButtonSlot }}\" name=\"cancel-button\" />\n\n      <van-button\n        wx:else\n        size=\"large\"\n        loading=\"{{ loading.cancel }}\"\n        class=\"van-dialog__button van-hairline--right\"\n        custom-class=\"van-dialog__cancel cancle-button-class\"\n        custom-style=\"color: {{ cancelButtonColor }}\"\n        bind:click=\"onCancel\"\n      >\n        {{ cancelButtonText }}\n      </van-button>\n    </block>\n\n    <block wx:if=\"{{ showConfirmButton }}\">\n      <slot wx:if=\"{{ useConfirmButtonSlot }}\" name=\"confirm-button\" />\n\n      <van-button\n        wx:else\n        size=\"large\"\n        class=\"van-dialog__button\"\n        loading=\"{{ loading.confirm }}\"\n        custom-class=\"van-dialog__confirm confirm-button-class\"\n        custom-style=\"color: {{ confirmButtonColor }}\"\n        button-id=\"{{ confirmButtonId }}\"\n        open-type=\"{{ confirmButtonOpenType }}\"\n        lang=\"{{ lang }}\"\n        business-id=\"{{ businessId }}\"\n        session-from=\"{{ sessionFrom }}\"\n        send-message-title=\"{{ sendMessageTitle }}\"\n        send-message-path=\"{{ sendMessagePath }}\"\n        send-message-img=\"{{ sendMessageImg }}\"\n        show-message-card=\"{{ showMessageCard }}\"\n        app-parameter=\"{{ appParameter }}\"\n        bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n        bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n        bind:click=\"onConfirm\"\n        bindgetuserinfo=\"onGetUserInfo\"\n        bindcontact=\"onContact\"\n        bindgetphonenumber=\"onGetPhoneNumber\"\n        binderror=\"onError\"\n        bindlaunchapp=\"onLaunchApp\"\n        bindopensetting=\"onOpenSetting\"\n      >\n        {{ confirmButtonText }}\n      </van-button>\n    </block>\n  </view>\n</van-popup>\n"
  },
  {
    "path": "lib/dialog/index.wxss",
    "content": "@import '../common/index.wxss';.van-dialog{background-color:var(--dialog-background-color,#fff);border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,320px)}@media (max-width:321px){.van-dialog{width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{font-weight:var(--dialog-header-font-weight,500);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.van-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{-webkit-overflow-scrolling:touch;font-size:var(--dialog-message-font-size,14px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,#646566);padding-top:var(--dialog-has-title-message-padding-top,8px)}.van-dialog__message--round-button{color:#323233;padding-bottom:16px}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex}.van-dialog__footer--round-button{padding:8px 24px 16px!important;position:relative!important}.van-dialog__button{flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}"
  },
  {
    "path": "lib/divider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/divider/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        dashed: Boolean,\n        hairline: Boolean,\n        contentPosition: String,\n        fontSize: String,\n        borderColor: String,\n        textColor: String,\n        customStyle: String,\n    },\n});\n"
  },
  {
    "path": "lib/divider/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "lib/divider/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('divider', [{ dashed, hairline }, contentPosition]) }}\"\n  style=\"{{ computed.rootStyle({ borderColor, textColor, fontSize, customStyle }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/divider/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      'border-color': data.borderColor,\n      color: data.textColor,\n      'font-size': addUnit(data.fontSize),\n    },\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "lib/divider/index.wxss",
    "content": "@import '../common/index.wxss';.van-divider{align-items:center;border:0 solid var(--divider-border-color,#ebedf0);color:var(--divider-text-color,#969799);display:flex;font-size:var(--divider-font-size,14px);line-height:var(--divider-line-height,24px);margin:var(--divider-margin,16px 0)}.van-divider:after,.van-divider:before{border-color:inherit;border-style:inherit;border-width:1px 0 0;box-sizing:border-box;display:block;flex:1;height:1px}.van-divider:before{content:\"\"}.van-divider--hairline:after,.van-divider--hairline:before{transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:\"\";margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:var(--divider-content-right-width,10%)}"
  },
  {
    "path": "lib/dropdown-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/dropdown-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['item-title-class'],\n    field: true,\n    relation: (0, relation_1.useParent)('dropdown-menu', function () {\n        this.updateDataFromParent();\n    }),\n    props: {\n        value: {\n            type: null,\n            observer: 'rerender',\n        },\n        title: {\n            type: String,\n            observer: 'rerender',\n        },\n        disabled: Boolean,\n        titleClass: {\n            type: String,\n            observer: 'rerender',\n        },\n        options: {\n            type: Array,\n            value: [],\n            observer: 'rerender',\n        },\n        popupStyle: String,\n        useBeforeToggle: {\n            type: Boolean,\n            value: false,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        transition: true,\n        showPopup: false,\n        showWrapper: false,\n        displayTitle: '',\n        safeAreaTabBar: false,\n    },\n    methods: {\n        rerender: function () {\n            var _this = this;\n            wx.nextTick(function () {\n                var _a;\n                (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateItemListData();\n            });\n        },\n        updateDataFromParent: function () {\n            if (this.parent) {\n                var _a = this.parent.data, overlay = _a.overlay, duration = _a.duration, activeColor = _a.activeColor, closeOnClickOverlay = _a.closeOnClickOverlay, direction = _a.direction, safeAreaTabBar = _a.safeAreaTabBar;\n                this.setData({\n                    overlay: overlay,\n                    duration: duration,\n                    activeColor: activeColor,\n                    closeOnClickOverlay: closeOnClickOverlay,\n                    direction: direction,\n                    safeAreaTabBar: safeAreaTabBar,\n                });\n            }\n        },\n        onOpen: function () {\n            this.$emit('open');\n        },\n        onOpened: function () {\n            this.$emit('opened');\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n        onClosed: function () {\n            this.$emit('closed');\n            this.setData({ showWrapper: false });\n        },\n        onOptionTap: function (event) {\n            var option = event.currentTarget.dataset.option;\n            var value = option.value;\n            var shouldEmitChange = this.data.value !== value;\n            this.setData({ showPopup: false, value: value });\n            this.$emit('close');\n            this.rerender();\n            if (shouldEmitChange) {\n                this.$emit('change', value);\n            }\n        },\n        toggle: function (show, options) {\n            var _this = this;\n            if (options === void 0) { options = {}; }\n            var showPopup = this.data.showPopup;\n            if (typeof show !== 'boolean') {\n                show = !showPopup;\n            }\n            if (show === showPopup) {\n                return;\n            }\n            this.onBeforeToggle(show).then(function (status) {\n                var _a;\n                if (!status) {\n                    return;\n                }\n                _this.setData({\n                    transition: !options.immediate,\n                    showPopup: show,\n                });\n                if (show) {\n                    (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.getChildWrapperStyle().then(function (wrapperStyle) {\n                        _this.setData({ wrapperStyle: wrapperStyle, showWrapper: true });\n                        _this.rerender();\n                    });\n                }\n                else {\n                    _this.rerender();\n                }\n            });\n        },\n        onBeforeToggle: function (status) {\n            var _this = this;\n            var useBeforeToggle = this.data.useBeforeToggle;\n            if (!useBeforeToggle) {\n                return Promise.resolve(true);\n            }\n            return new Promise(function (resolve) {\n                _this.$emit('before-toggle', {\n                    status: status,\n                    callback: function (value) { return resolve(value); },\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/dropdown-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"van-cell\": \"../cell/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/dropdown-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ showWrapper }}\"\n  class=\"{{ utils.bem('dropdown-item', direction) }} custom-class\"\n  style=\"{{ wrapperStyle }}\"\n>\n  <van-popup\n    show=\"{{ showPopup }}\"\n    custom-style=\"position: absolute;{{ popupStyle }}\"\n    overlay-style=\"position: absolute;\"\n    overlay=\"{{ overlay }}\"\n    position=\"{{ direction === 'down' ? 'top' : 'bottom' }}\"\n    duration=\"{{ transition ? duration : 0 }}\"\n    safe-area-tab-bar=\"{{ safeAreaTabBar }}\"\n    close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n    rootPortal=\"{{ rootPortal }}\"\n    bind:enter=\"onOpen\"\n    bind:leave=\"onClose\"\n    bind:close=\"toggle\"\n    bind:after-enter=\"onOpened\"\n    bind:after-leave=\"onClosed\"\n  >\n    <van-cell\n      wx:for=\"{{ options }}\"\n      wx:key=\"value\"\n      data-option=\"{{ item }}\"\n      class=\"{{ utils.bem('dropdown-item__option', { active: item.value === value } ) }}\"\n      clickable\n      icon=\"{{ item.icon }}\"\n      bind:tap=\"onOptionTap\"\n    >\n      <view\n        slot=\"title\"\n        class=\"van-dropdown-item__title item-title-class\"\n        style=\"{{ item.value === value  ? 'color:' + activeColor : '' }}\"\n      >\n        {{ item.text }}\n      </view>\n      <van-icon\n        wx:if=\"{{ item.value === value }}\"\n        name=\"success\"\n        class=\"van-dropdown-item__icon\"\n        color=\"{{ activeColor }}\"\n      />\n    </van-cell>\n\n    <slot />\n  </van-popup>\n</view>\n"
  },
  {
    "path": "lib/dropdown-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-dropdown-item{left:0;overflow:hidden;position:fixed;right:0}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}"
  },
  {
    "path": "lib/dropdown-item/shared.d.ts",
    "content": "export interface Option {\n    text: string;\n    value: string | number;\n    icon: string;\n}\n"
  },
  {
    "path": "lib/dropdown-item/shared.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"
  },
  {
    "path": "lib/dropdown-menu/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/dropdown-menu/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar utils_1 = require(\"../common/utils\");\nvar ARRAY = [];\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['title-class'],\n    relation: (0, relation_1.useChildren)('dropdown-item', function () {\n        this.updateItemListData();\n    }),\n    props: {\n        activeColor: {\n            type: String,\n            observer: 'updateChildrenData',\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildrenData',\n        },\n        zIndex: {\n            type: Number,\n            value: 10,\n        },\n        duration: {\n            type: Number,\n            value: 200,\n            observer: 'updateChildrenData',\n        },\n        direction: {\n            type: String,\n            value: 'down',\n            observer: 'updateChildrenData',\n        },\n        safeAreaTabBar: {\n            type: Boolean,\n            value: false,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildrenData',\n        },\n        closeOnClickOutside: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        itemListData: [],\n    },\n    beforeCreate: function () {\n        var windowHeight = (0, utils_1.getSystemInfoSync)().windowHeight;\n        this.windowHeight = windowHeight;\n        ARRAY.push(this);\n    },\n    destroyed: function () {\n        var _this = this;\n        ARRAY = ARRAY.filter(function (item) { return item !== _this; });\n    },\n    methods: {\n        updateItemListData: function () {\n            this.setData({\n                itemListData: this.children.map(function (child) { return child.data; }),\n            });\n        },\n        updateChildrenData: function () {\n            this.children.forEach(function (child) {\n                child.updateDataFromParent();\n            });\n        },\n        toggleItem: function (active) {\n            this.children.forEach(function (item, index) {\n                var showPopup = item.data.showPopup;\n                if (index === active) {\n                    item.toggle();\n                }\n                else if (showPopup) {\n                    item.toggle(false, { immediate: true });\n                }\n            });\n        },\n        close: function () {\n            this.children.forEach(function (child) {\n                child.toggle(false, { immediate: true });\n            });\n        },\n        getChildWrapperStyle: function () {\n            var _this = this;\n            var _a = this.data, zIndex = _a.zIndex, direction = _a.direction;\n            return (0, utils_1.getRect)(this, '.van-dropdown-menu').then(function (rect) {\n                var _a = rect.top, top = _a === void 0 ? 0 : _a, _b = rect.bottom, bottom = _b === void 0 ? 0 : _b;\n                var offset = direction === 'down' ? bottom : _this.windowHeight - top;\n                var wrapperStyle = \"z-index: \".concat(zIndex, \";\");\n                if (direction === 'down') {\n                    wrapperStyle += \"top: \".concat((0, utils_1.addUnit)(offset), \";\");\n                }\n                else {\n                    wrapperStyle += \"bottom: \".concat((0, utils_1.addUnit)(offset), \";\");\n                }\n                return wrapperStyle;\n            });\n        },\n        onTitleTap: function (event) {\n            var _this = this;\n            var index = event.currentTarget.dataset.index;\n            var child = this.children[index];\n            if (!child.data.disabled) {\n                ARRAY.forEach(function (menuItem) {\n                    if (menuItem &&\n                        menuItem.data.closeOnClickOutside &&\n                        menuItem !== _this) {\n                        menuItem.close();\n                    }\n                });\n                this.toggleItem(index);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/dropdown-menu/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/dropdown-menu/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\">\n  <view\n    wx:for=\"{{ itemListData }}\"\n    wx:key=\"index\"\n    data-index=\"{{ index }}\"\n    class=\"{{ utils.bem('dropdown-menu__item', { disabled: item.disabled }) }}\"\n    bind:tap=\"onTitleTap\"\n  >\n    <view\n      class=\"{{ item.titleClass }} {{ utils.bem('dropdown-menu__title', { active: item.showPopup, down: item.showPopup === (direction === 'down') }) }} title-class\"\n      style=\"{{ item.showPopup ? 'color:' + activeColor : '' }}\"\n    >\n      <view class=\"van-ellipsis\">\n        {{ computed.displayTitle(item) }}\n      </view>\n    </view>\n  </view>\n\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/dropdown-menu/index.wxs",
    "content": "/* eslint-disable */\nfunction displayTitle(item) {\n  if (item.title) {\n    return item.title;\n  }\n\n  var match = item.options.filter(function(option) {\n    return option.value === item.value;\n  });\n  var displayTitle = match.length ? match[0].text : '';\n  return displayTitle;\n}\n\nmodule.exports = {\n  displayTitle: displayTitle\n};\n"
  },
  {
    "path": "lib/dropdown-menu/index.wxss",
    "content": "@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:var(--dropdown-menu-box-shadow,0 2px 12px hsla(210,1%,40%,.12));display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 24px 0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:\"\";margin-top:-5px;opacity:.8;position:absolute;right:11px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}"
  },
  {
    "path": "lib/empty/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/empty/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        description: String,\n        image: {\n            type: String,\n            value: 'default',\n        },\n    },\n});\n"
  },
  {
    "path": "lib/empty/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "lib/empty/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class van-empty\">\n  <view class=\"van-empty__image\">\n    <slot name=\"image\"></slot>\n  </view>\n  <view class=\"van-empty__image\">\n    <image wx:if=\"{{ image }}\" class=\"van-empty__image__img\" src=\"{{ computed.imageUrl(image) }}\" />\n  </view>\n\n  <view class=\"van-empty__description\">\n    <slot name=\"description\"></slot>\n  </view>\n  <view class=\"van-empty__description\">\n    {{ description }}\n  </view>\n\n  <view class=\"van-empty__bottom\">\n    <slot></slot>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/empty/index.wxs",
    "content": "/* eslint-disable */\nvar PRESETS = ['error', 'search', 'default', 'network'];\n\nfunction imageUrl(image) {\n  if (PRESETS.indexOf(image) !== -1) {\n    return 'https://img.yzcdn.cn/vant/empty-image-' + image + '.png';\n  }\n\n  return image;\n}\n\nmodule.exports = {\n  imageUrl: imageUrl,\n};\n\n"
  },
  {
    "path": "lib/empty/index.wxss",
    "content": "@import '../common/index.wxss';.van-empty{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:32px 0}.van-empty__image{height:160px;width:160px}.van-empty__image:empty{display:none}.van-empty__image__img{height:100%;width:100%}.van-empty__image:not(:empty)+.van-empty__image{display:none}.van-empty__description{color:#969799;font-size:14px;line-height:20px;margin-top:16px;padding:0 60px}.van-empty__description:empty,.van-empty__description:not(:empty)+.van-empty__description{display:none}.van-empty__bottom{margin-top:24px}"
  },
  {
    "path": "lib/field/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/field/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"../common/utils\");\nvar component_1 = require(\"../common/component\");\nvar props_1 = require(\"./props\");\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['input-class', 'right-icon-class', 'label-class'],\n    props: __assign(__assign(__assign(__assign({}, props_1.commonProps), props_1.inputProps), props_1.textareaProps), { size: String, icon: String, label: String, error: Boolean, center: Boolean, isLink: Boolean, leftIcon: String, rightIcon: String, autosize: null, required: Boolean, iconClass: String, clickable: Boolean, inputAlign: String, customStyle: String, errorMessage: String, arrowDirection: String, showWordLimit: Boolean, errorMessageAlign: String, readonly: {\n            type: Boolean,\n            observer: 'setShowClear',\n        }, clearable: {\n            type: Boolean,\n            observer: 'setShowClear',\n        }, clearTrigger: {\n            type: String,\n            value: 'focus',\n        }, border: {\n            type: Boolean,\n            value: true,\n        }, titleWidth: {\n            type: String,\n            value: '6.2em',\n        }, clearIcon: {\n            type: String,\n            value: 'clear',\n        }, extraEventParams: {\n            type: Boolean,\n            value: false,\n        } }),\n    data: {\n        focused: false,\n        innerValue: '',\n        showClear: false,\n    },\n    watch: {\n        value: function (value) {\n            if (value !== this.value) {\n                this.setData({ innerValue: value });\n                this.value = value;\n                this.setShowClear();\n            }\n        },\n        clearTrigger: function () {\n            this.setShowClear();\n        },\n    },\n    created: function () {\n        this.value = this.data.value;\n        this.setData({ innerValue: this.value });\n    },\n    methods: {\n        formatValue: function (value) {\n            var maxlength = this.data.maxlength;\n            if (maxlength !== -1 && value.length > maxlength) {\n                return value.slice(0, maxlength);\n            }\n            return value;\n        },\n        onInput: function (event) {\n            var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;\n            var formatValue = this.formatValue(value);\n            this.value = formatValue;\n            this.setShowClear();\n            return this.emitChange(__assign(__assign({}, event.detail), { value: formatValue }));\n        },\n        onFocus: function (event) {\n            this.focused = true;\n            this.setShowClear();\n            this.$emit('focus', event.detail);\n        },\n        onBlur: function (event) {\n            this.focused = false;\n            this.setShowClear();\n            this.$emit('blur', event.detail);\n        },\n        onClickIcon: function () {\n            this.$emit('click-icon');\n        },\n        onClickInput: function (event) {\n            this.$emit('click-input', event.detail);\n        },\n        onClear: function () {\n            var _this = this;\n            this.setData({ innerValue: '' });\n            this.value = '';\n            this.setShowClear();\n            (0, utils_1.nextTick)(function () {\n                _this.emitChange({ value: '' });\n                _this.$emit('clear', '');\n            });\n        },\n        onConfirm: function (event) {\n            var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;\n            this.value = value;\n            this.setShowClear();\n            this.$emit('confirm', value);\n        },\n        setValue: function (value) {\n            this.value = value;\n            this.setShowClear();\n            if (value === '') {\n                this.setData({ innerValue: '' });\n            }\n            this.emitChange({ value: value });\n        },\n        onLineChange: function (event) {\n            this.$emit('linechange', event.detail);\n        },\n        onKeyboardHeightChange: function (event) {\n            this.$emit('keyboardheightchange', event.detail);\n        },\n        onBindNicknameReview: function (event) {\n            this.$emit('nicknamereview', event.detail);\n        },\n        emitChange: function (detail) {\n            var extraEventParams = this.data.extraEventParams;\n            this.setData({ value: detail.value });\n            var result;\n            var data = extraEventParams\n                ? __assign(__assign({}, detail), { callback: function (data) {\n                        result = data;\n                    } }) : detail.value;\n            this.$emit('input', data);\n            this.$emit('change', data);\n            return result;\n        },\n        setShowClear: function () {\n            var _a = this.data, clearable = _a.clearable, readonly = _a.readonly, clearTrigger = _a.clearTrigger;\n            var _b = this, focused = _b.focused, value = _b.value;\n            var showClear = false;\n            if (clearable && !readonly) {\n                var hasValue = !!value;\n                var trigger = clearTrigger === 'always' || (clearTrigger === 'focus' && focused);\n                showClear = hasValue && trigger;\n            }\n            this.setView({ showClear: showClear });\n        },\n        noop: function () { },\n    },\n});\n"
  },
  {
    "path": "lib/field/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/field/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-cell\n  size=\"{{ size }}\"\n  icon=\"{{ leftIcon }}\"\n  center=\"{{ center }}\"\n  border=\"{{ border }}\"\n  is-link=\"{{ isLink }}\"\n  required=\"{{ required }}\"\n  clickable=\"{{ clickable }}\"\n  title-width=\"{{ titleWidth }}\"\n  title-style=\"margin-right: 12px;\"\n  custom-style=\"{{ customStyle }}\"\n  arrow-direction=\"{{ arrowDirection }}\"\n  custom-class=\"custom-class van-field\"\n>\n  <slot name=\"left-icon\" slot=\"icon\" />\n  <label for=\"{{ name }}\" wx:if=\"{{ label }}\" class=\"label-class {{ utils.bem('field__label', { disabled }) }}\" slot=\"title\">\n    {{ label }}\n  </label>\n  <slot wx:else name=\"label\" slot=\"title\" />\n  <view class=\"{{ utils.bem('field__body', [type]) }}\">\n    <view class=\"{{ utils.bem('field__control', [inputAlign, 'custom']) }}\" bindtap=\"onClickInput\">\n      <slot name=\"input\" />\n    </view>\n    <include wx:if=\"{{ type === 'textarea' }}\" src=\"./textarea.wxml\" />\n    <include wx:else src=\"./input.wxml\" />\n\n    <van-icon\n      wx:if=\"{{ showClear }}\"\n      name=\"{{ clearIcon }}\"\n      class=\"van-field__clear-root van-field__icon-root\"\n      catch:touchstart=\"onClear\"\n    />\n    <view class=\"van-field__icon-container\" bind:tap=\"onClickIcon\">\n      <van-icon\n        wx:if=\"{{ rightIcon || icon }}\"\n        name=\"{{ rightIcon || icon }}\"\n        class=\"van-field__icon-root {{ iconClass }}\"\n        custom-class=\"right-icon-class\"\n      />\n      <slot name=\"right-icon\" />\n      <slot name=\"icon\" />\n    </view>\n    <view class=\"van-field__button\">\n      <slot name=\"button\" />\n    </view>\n  </view>\n  <label for=\"{{ name }}\" wx:if=\"{{ showWordLimit && maxlength }}\" class=\"van-field__word-limit\">\n    <view class=\"{{ utils.bem('field__word-num', { full: value.length >= maxlength }) }}\">{{ value.length >= maxlength ? maxlength : value.length }}</view>/{{ maxlength }}\n  </label>\n  <label for=\"{{ name }}\"  wx:if=\"{{ errorMessage }}\" class=\"{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}\">\n    {{ errorMessage }}\n  </label>\n</van-cell>\n"
  },
  {
    "path": "lib/field/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction inputStyle(autosize) {\n  if (autosize && autosize.constructor === 'Object') {\n    return style({\n      'min-height': addUnit(autosize.minHeight),\n      'max-height': addUnit(autosize.maxHeight),\n    });\n  }\n\n  return '';\n}\n\nmodule.exports = {\n  inputStyle: inputStyle,\n};\n"
  },
  {
    "path": "lib/field/index.wxss",
    "content": "@import '../common/index.wxss';.van-field{--cell-icon-size:var(--field-icon-size,16px)}.van-field__label{color:var(--field-label-color,#646566)}.van-field__label--disabled{color:var(--field-disabled-text-color,#c8c9cc)}.van-field__body{align-items:center;display:flex}.van-field__body--textarea{box-sizing:border-box;line-height:1.2em;min-height:var(--cell-line-height,24px);padding:3.6px 0}.van-field__control:empty+.van-field__control{display:block}.van-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,#323233);display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:left;width:100%}.van-field__control:empty{display:none}.van-field__control--textarea{height:var(--field-text-area-min-height,18px);min-height:var(--field-text-area-min-height,18px)}.van-field__control--error{color:var(--field-input-error-text-color,#ee0a24)}.van-field__control--disabled{background-color:initial;color:var(--field-input-disabled-text-color,#c8c9cc);opacity:1}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__control--custom{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__placeholder{color:var(--field-placeholder-text-color,#c8c9cc);left:0;pointer-events:none;position:absolute;right:0;top:0}.van-field__placeholder--error{color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{flex-shrink:0}.van-field__clear-root{color:var(--field-clear-icon-color,#c8c9cc);font-size:var(--field-clear-icon-size,16px)}.van-field__icon-container{color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{color:var(--field-error-message-color,#ee0a24);display:block;font-size:var(--field-error-message-text-font-size,12px);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{color:var(--field-word-limit-color,#646566);font-size:var(--field-word-limit-font-size,12px);line-height:var(--field-word-limit-line-height,16px);margin-top:var(--padding-base,4px);text-align:right}.van-field__word-num{display:inline}.van-field__word-num--full{color:var(--field-word-num-full-color,#ee0a24)}"
  },
  {
    "path": "lib/field/input.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<input\n  id=\"{{ name }}\"\n  class=\"{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class\"\n  type=\"{{ type }}\"\n  focus=\"{{ focus }}\"\n  cursor=\"{{ cursor }}\"\n  value=\"{{ innerValue }}\"\n  auto-focus=\"{{ autoFocus }}\"\n  disabled=\"{{ disabled || readonly }}\"\n  maxlength=\"{{ maxlength }}\"\n  placeholder=\"{{ placeholder }}\"\n  placeholder-style=\"{{ placeholderStyle }}\"\n  placeholder-class=\"{{ utils.bem('field__placeholder', { error }) }}\"\n  confirm-type=\"{{ confirmType }}\"\n  confirm-hold=\"{{ confirmHold }}\"\n  hold-keyboard=\"{{ holdKeyboard }}\"\n  cursor-spacing=\"{{ cursorSpacing }}\"\n  adjust-position=\"{{ adjustPosition }}\"\n  selection-end=\"{{ selectionEnd }}\"\n  selection-start=\"{{ selectionStart }}\"\n  always-embed=\"{{ alwaysEmbed }}\"\n  password=\"{{ password || type === 'password' }}\"\n  bindinput=\"onInput\"\n  bindtap=\"onClickInput\"\n  bindblur=\"onBlur\"\n  bindfocus=\"onFocus\"\n  bindconfirm=\"onConfirm\"\n  bindkeyboardheightchange=\"onKeyboardHeightChange\"\n  bindnicknamereview=\"onBindNicknameReview\"\n/>\n"
  },
  {
    "path": "lib/field/props.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nexport declare const commonProps: WechatMiniprogram.Component.PropertyOption;\nexport declare const inputProps: WechatMiniprogram.Component.PropertyOption;\nexport declare const textareaProps: WechatMiniprogram.Component.PropertyOption;\n"
  },
  {
    "path": "lib/field/props.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.textareaProps = exports.inputProps = exports.commonProps = void 0;\nexports.commonProps = {\n    value: String,\n    placeholder: String,\n    placeholderStyle: String,\n    placeholderClass: String,\n    disabled: Boolean,\n    maxlength: {\n        type: Number,\n        value: -1,\n    },\n    cursorSpacing: {\n        type: Number,\n        value: 50,\n    },\n    autoFocus: Boolean,\n    focus: Boolean,\n    cursor: {\n        type: Number,\n        value: -1,\n    },\n    selectionStart: {\n        type: Number,\n        value: -1,\n    },\n    selectionEnd: {\n        type: Number,\n        value: -1,\n    },\n    adjustPosition: {\n        type: Boolean,\n        value: true,\n    },\n    holdKeyboard: Boolean,\n};\nexports.inputProps = {\n    type: {\n        type: String,\n        value: 'text',\n    },\n    password: Boolean,\n    confirmType: String,\n    confirmHold: Boolean,\n    alwaysEmbed: Boolean,\n};\nexports.textareaProps = {\n    autoHeight: Boolean,\n    fixed: Boolean,\n    showConfirmBar: {\n        type: Boolean,\n        value: true,\n    },\n    disableDefaultPadding: {\n        type: Boolean,\n        value: true,\n    },\n};\n"
  },
  {
    "path": "lib/field/textarea.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n<textarea\n  id=\"{{ name }}\"\n  class=\"{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class\"\n  fixed=\"{{ fixed }}\"\n  focus=\"{{ focus }}\"\n  cursor=\"{{ cursor }}\"\n  value=\"{{ innerValue }}\"\n  auto-focus=\"{{ autoFocus }}\"\n  disabled=\"{{ disabled || readonly }}\"\n  maxlength=\"{{ maxlength }}\"\n  placeholder=\"{{ placeholder }}\"\n  placeholder-style=\"{{ placeholderStyle }}\"\n  placeholder-class=\"{{ utils.bem('field__placeholder', { error, disabled }) }}\"\n  auto-height=\"{{ !!autosize }}\"\n  style=\"{{ computed.inputStyle(autosize) }}\"\n  cursor-spacing=\"{{ cursorSpacing }}\"\n  adjust-position=\"{{ adjustPosition }}\"\n  show-confirm-bar=\"{{ showConfirmBar }}\"\n  hold-keyboard=\"{{ holdKeyboard }}\"\n  selection-end=\"{{ selectionEnd }}\"\n  selection-start=\"{{ selectionStart }}\"\n  disable-default-padding=\"{{ disableDefaultPadding }}\"\n  bindinput=\"onInput\"\n  bindtap=\"onClickInput\"\n  bindblur=\"onBlur\"\n  bindfocus=\"onFocus\"\n  bindconfirm=\"onConfirm\"\n  bindlinechange=\"onLineChange\"\n  bindkeyboardheightchange=\"onKeyboardHeightChange\"\n/>\n"
  },
  {
    "path": "lib/field/types.d.ts",
    "content": "export interface InputDetails {\n    /** 输入框内容 */\n    value: string;\n    /** 光标位置 */\n    cursor?: number;\n    /** keyCode 为键值 (目前工具还不支持返回keyCode参数) `2.1.0` 起支持 */\n    keyCode?: number;\n}\n"
  },
  {
    "path": "lib/field/types.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"
  },
  {
    "path": "lib/goods-action/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/goods-action/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('goods-action-button', function () {\n        this.children.forEach(function (item) {\n            item.updateStyle();\n        });\n    }),\n    props: {\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n});\n"
  },
  {
    "path": "lib/goods-action/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/goods-action/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class {{ utils.bem('goods-action', { safe: safeAreaInsetBottom }) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/goods-action/index.wxss",
    "content": "@import '../common/index.wxss';.van-goods-action{align-items:center;background-color:var(--goods-action-background-color,#fff);bottom:0;box-sizing:initial;display:flex;height:var(--goods-action-height,50px);left:0;position:fixed;right:0}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}"
  },
  {
    "path": "lib/goods-action-button/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/goods-action-button/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar button_1 = require(\"../mixins/button\");\nvar link_1 = require(\"../mixins/link\");\n(0, component_1.VantComponent)({\n    mixins: [link_1.link, button_1.button],\n    relation: (0, relation_1.useParent)('goods-action'),\n    props: {\n        text: String,\n        color: String,\n        size: {\n            type: String,\n            value: 'normal',\n        },\n        loading: Boolean,\n        disabled: Boolean,\n        plain: Boolean,\n        type: {\n            type: String,\n            value: 'danger',\n        },\n        customStyle: {\n            type: String,\n            value: '',\n        },\n    },\n    methods: {\n        onClick: function (event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n        updateStyle: function () {\n            if (this.parent == null) {\n                return;\n            }\n            var index = this.index;\n            var _a = this.parent.children, children = _a === void 0 ? [] : _a;\n            this.setData({\n                isFirst: index === 0,\n                isLast: index === children.length - 1,\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/goods-action-button/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../button/index\"\n  }\n}\n"
  },
  {
    "path": "lib/goods-action-button/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<van-button\n  id=\"{{ id }}\"\n  button-id=\"{{ buttonId }}\"\n  lang=\"{{ lang }}\"\n  type=\"{{ type }}\"\n  size=\"{{ size }}\"\n  color=\"{{ color }}\"\n  plain=\"{{ plain }}\"\n  loading=\"{{ loading }}\"\n  disabled=\"{{ disabled }}\"\n  open-type=\"{{ openType }}\"\n  class=\"{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}\"\n  custom-class=\"van-goods-action-button__inner custom-class\"\n  custom-style=\"{{customStyle}}\"\n  business-id=\"{{ businessId }}\"\n  session-from=\"{{ sessionFrom }}\"\n  app-parameter=\"{{ appParameter }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  bind:click=\"onClick\"\n  binderror=\"onError\"\n  bindcontact=\"onContact\"\n  bindopensetting=\"onOpenSetting\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n  bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindlaunchapp=\"onLaunchApp\"\n>\n  {{ text }}\n  <slot></slot>\n</van-button>\n"
  },
  {
    "path": "lib/goods-action-button/index.wxss",
    "content": "@import '../common/index.wxss';:host{flex:1}.van-goods-action-button{--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(to right,#ffd01e,#ff8917));--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(to right,#ff6034,#ee0a24));--button-default-height:var(--goods-action-button-height,40px);--button-line-height:var(--goods-action-button-line-height,20px);--button-plain-background-color:var(--goods-action-button-plain-color,#fff);--button-border-width:0;display:block}.van-goods-action-button--first{--button-border-radius:999px 0 0 var(--goods-action-button-border-radius,999px);margin-left:5px}.van-goods-action-button--last{--button-border-radius:0 999px var(--goods-action-button-border-radius,999px) 0;margin-right:5px}.van-goods-action-button--first.van-goods-action-button--last{--button-border-radius:var(--goods-action-button-border-radius,999px)}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{font-weight:var(--font-weight-bold,500)!important;width:100%}@media (max-width:321px){.van-goods-action-button{font-size:13px}}"
  },
  {
    "path": "lib/goods-action-icon/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/goods-action-icon/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\nvar link_1 = require(\"../mixins/link\");\n(0, component_1.VantComponent)({\n    classes: ['icon-class', 'text-class', 'info-class'],\n    mixins: [link_1.link, button_1.button],\n    props: {\n        text: String,\n        dot: Boolean,\n        info: String,\n        icon: String,\n        size: String,\n        color: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        disabled: Boolean,\n        loading: Boolean,\n    },\n    methods: {\n        onClick: function (event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "lib/goods-action-icon/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-button\": \"../button/index\"\n  }\n}\n"
  },
  {
    "path": "lib/goods-action-icon/index.wxml",
    "content": "<van-button\n  square\n  id=\"{{ id }}\"\n  size=\"large\"\n  lang=\"{{ lang }}\"\n  loading=\"{{ loading }}\"\n  disabled=\"{{ disabled }}\"\n  open-type=\"{{ openType }}\"\n  business-id=\"{{ businessId }}\"\n  custom-class=\"van-goods-action-icon\"\n  session-from=\"{{ sessionFrom }}\"\n  app-parameter=\"{{ appParameter }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  bind:click=\"onClick\"\n  binderror=\"onError\"\n  bindcontact=\"onContact\"\n  bindopensetting=\"onOpenSetting\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindlaunchapp=\"onLaunchApp\"\n>\n  <van-icon\n    wx:if=\"{{ icon }}\"\n    name=\"{{ icon }}\"\n    dot=\"{{ dot }}\"\n    info=\"{{ info }}\"\n    size=\"{{ size }}\"\n    color=\"{{ color }}\"\n    class-prefix=\"{{ classPrefix }}\"\n    class=\"van-goods-action-icon__icon\"\n    custom-class=\"icon-class\"\n    info-class=\"info-class\"\n  />\n  <view wx:else>\n    <slot name=\"icon\" />\n  </view>\n  <text class=\"text-class\">{{ text }}</text>\n</van-button>\n"
  },
  {
    "path": "lib/goods-action-icon/index.wxss",
    "content": "@import '../common/index.wxss';.van-goods-action-icon{border:none!important;color:var(--goods-action-icon-text-color,#646566)!important;display:flex!important;flex-direction:column;font-size:var(--goods-action-icon-font-size,10px)!important;height:var(--goods-action-icon-height,50px)!important;justify-content:center!important;line-height:1!important;min-width:var(--goods-action-icon-width,48px)}.van-goods-action-icon__icon{color:var(--goods-action-icon-color,#323233);display:flex;font-size:var(--goods-action-icon-size,18px);margin:0 auto 5px}"
  },
  {
    "path": "lib/grid/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/grid/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('grid-item'),\n    props: {\n        square: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        gutter: {\n            type: null,\n            value: 0,\n            observer: 'updateChildren',\n        },\n        clickable: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        columnNum: {\n            type: Number,\n            value: 4,\n            observer: 'updateChildren',\n        },\n        center: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildren',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildren',\n        },\n        direction: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        iconSize: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        reverse: {\n            type: Boolean,\n            value: false,\n            observer: 'updateChildren',\n        },\n    },\n    methods: {\n        updateChildren: function () {\n            this.children.forEach(function (child) {\n                child.updateStyle();\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/grid/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/grid/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-grid custom-class {{ border && !gutter ? 'van-hairline--top' : '' }}\"\n  style=\"{{ computed.rootStyle({ gutter }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/grid/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'padding-left': addUnit(data.gutter),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "lib/grid/index.wxss",
    "content": "@import '../common/index.wxss';.van-grid{box-sizing:border-box;overflow:hidden;position:relative}"
  },
  {
    "path": "lib/grid-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/grid-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar link_1 = require(\"../mixins/link\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useParent)('grid'),\n    classes: ['content-class', 'icon-class', 'text-class'],\n    mixins: [link_1.link],\n    props: {\n        icon: String,\n        iconColor: String,\n        iconPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        dot: Boolean,\n        info: null,\n        badge: null,\n        text: String,\n        useSlot: Boolean,\n    },\n    data: {\n        viewStyle: '',\n    },\n    mounted: function () {\n        this.updateStyle();\n    },\n    methods: {\n        updateStyle: function () {\n            if (!this.parent) {\n                return;\n            }\n            var _a = this.parent, data = _a.data, children = _a.children;\n            var columnNum = data.columnNum, border = data.border, square = data.square, gutter = data.gutter, clickable = data.clickable, center = data.center, direction = data.direction, reverse = data.reverse, iconSize = data.iconSize;\n            this.setData({\n                center: center,\n                border: border,\n                square: square,\n                gutter: gutter,\n                clickable: clickable,\n                direction: direction,\n                reverse: reverse,\n                iconSize: iconSize,\n                index: children.indexOf(this),\n                columnNum: columnNum,\n            });\n        },\n        onClick: function () {\n            this.$emit('click');\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "lib/grid-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/grid-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('grid-item', { square }) }}\"\n  style=\"{{ computed.wrapperStyle({ square, gutter, columnNum, index }) }}\"\n  bindtap=\"onClick\"\n>\n  <view\n    class=\"content-class {{ utils.bem('grid-item__content', [direction, { center, square, reverse, clickable, surround: border && gutter }]) }} {{ border ? 'van-hairline--surround' : '' }}\"\n    style=\"{{ computed.contentStyle({ square, gutter }) }}\"\n  >\n    <block wx:if=\"{{ useSlot }}\">\n      <slot />\n    </block>\n    <block wx:else>\n      <view class=\"van-grid-item__icon icon-class\">\n        <van-icon wx:if=\"{{ icon }}\" name=\"{{ icon }}\" color=\"{{ iconColor }}\" class-prefix=\"{{ iconPrefix }}\" dot=\"{{ dot }}\" info=\"{{ badge || info }}\" size=\"{{ iconSize }}\" />\n        <slot wx:else name=\"icon\"></slot>\n      </view>\n      <view class=\"van-grid-item__text text-class\">\n        <text wx:if=\"{{ text }}\">{{ text }}</text>\n        <slot wx:else name=\"text\"></slot>\n      </view>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/grid-item/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction wrapperStyle(data) {\n  var width = 100 / data.columnNum + '%';\n\n  return style({\n    width: width,\n    'padding-top': data.square ? width : null,\n    'padding-right': addUnit(data.gutter),\n    'margin-top':\n      data.index >= data.columnNum && !data.square\n        ? addUnit(data.gutter)\n        : null,\n  });\n}\n\nfunction contentStyle(data) {\n  return data.square\n    ? style({\n        right: addUnit(data.gutter),\n        bottom: addUnit(data.gutter),\n        height: 'auto',\n      })\n    : '';\n}\n\nmodule.exports = {\n  wrapperStyle: wrapperStyle,\n  contentStyle: contentStyle,\n};\n"
  },
  {
    "path": "lib/grid-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-grid-item{box-sizing:border-box;float:left;position:relative}.van-grid-item--square{height:0}.van-grid-item__content{background-color:var(--grid-item-content-background-color,#fff);box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:var(--grid-item-content-padding,16px 8px)}.van-grid-item__content:after{border-width:0 1px 1px 0;z-index:1}.van-grid-item__content--surround:after{border-width:1px}.van-grid-item__content--center{align-items:center;justify-content:center}.van-grid-item__content--square{left:0;position:absolute;right:0;top:0}.van-grid-item__content--horizontal{flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__text{margin:0 0 0 8px}.van-grid-item__content--reverse{flex-direction:column-reverse}.van-grid-item__content--reverse .van-grid-item__text{margin:0 0 8px}.van-grid-item__content--horizontal.van-grid-item__content--reverse{flex-direction:row-reverse}.van-grid-item__content--horizontal.van-grid-item__content--reverse .van-grid-item__text{margin:0 8px 0 0}.van-grid-item__content--clickable:active{background-color:var(--grid-item-content-active-color,#f2f3f5)}.van-grid-item__icon{align-items:center;display:flex;font-size:var(--grid-item-icon-size,26px);height:var(--grid-item-icon-size,26px)}.van-grid-item__text{word-wrap:break-word;color:var(--grid-item-text-color,#646566);font-size:var(--grid-item-text-font-size,12px)}.van-grid-item__icon+.van-grid-item__text{margin-top:8px}"
  },
  {
    "path": "lib/icon/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/icon/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['info-class'],\n    props: {\n        dot: Boolean,\n        info: null,\n        size: null,\n        color: String,\n        customStyle: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        name: String,\n    },\n    methods: {\n        onClick: function () {\n            this.$emit('click');\n        },\n    },\n});\n"
  },
  {
    "path": "lib/icon/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "lib/icon/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"{{ computed.rootClass({ classPrefix, name }) }}\"\n  style=\"{{ computed.rootStyle({ customStyle, color, size }) }}\"\n  bindtap=\"onClick\"\n>\n  <van-info\n    wx:if=\"{{ info !== null || dot }}\"\n    dot=\"{{ dot }}\"\n    info=\"{{ info }}\"\n    custom-class=\"van-icon__info info-class\"\n  />\n  <image\n    wx:if=\"{{ computed.isImage(name) }}\"\n    src=\"{{ name }}\"\n    mode=\"aspectFit\"\n    class=\"van-icon__image\"\n  />\n</view>\n"
  },
  {
    "path": "lib/icon/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction isImage(name) {\n  return name.indexOf('/') !== -1;\n}\n\nfunction rootClass(data) {\n  var classes = ['custom-class'];\n\n  if (data.classPrefix !== 'van-icon') {\n    classes.push('van-icon--custom')\n  }\n\n  if (data.classPrefix != null) {\n    classes.push(data.classPrefix);\n  }\n\n  if (isImage(data.name)) {\n    classes.push('van-icon--image');\n  } else if (data.classPrefix != null) {\n    classes.push(data.classPrefix + '-' + data.name);\n  }\n\n  return classes.join(' ');\n}\n\nfunction rootStyle(data) {\n  return style([\n    {\n      color: data.color,\n      'font-size': addUnit(data.size),\n    },\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  isImage: isImage,\n  rootClass: rootClass,\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "lib/icon/index.wxss",
    "content": "@import '../common/index.wxss';.van-icon{text-rendering:auto;-webkit-font-smoothing:antialiased;font:normal normal normal 14px/1 vant-icon;font:normal normal normal 14px/1 var(--van-icon-font-family,\"vant-icon\");font-size:inherit;position:relative}.van-icon,.van-icon:before{display:inline-block}.van-icon-contact:before{content:\"\\e753\"}.van-icon-notes:before{content:\"\\e63c\"}.van-icon-records:before{content:\"\\e63d\"}.van-icon-cash-back-record:before{content:\"\\e63e\"}.van-icon-newspaper:before{content:\"\\e63f\"}.van-icon-discount:before{content:\"\\e640\"}.van-icon-completed:before{content:\"\\e641\"}.van-icon-user:before{content:\"\\e642\"}.van-icon-description:before{content:\"\\e643\"}.van-icon-list-switch:before{content:\"\\e6ad\"}.van-icon-list-switching:before{content:\"\\e65a\"}.van-icon-link-o:before{content:\"\\e751\"}.van-icon-miniprogram-o:before{content:\"\\e752\"}.van-icon-qq:before{content:\"\\e74e\"}.van-icon-wechat-moments:before{content:\"\\e74f\"}.van-icon-weibo:before{content:\"\\e750\"}.van-icon-cash-o:before{content:\"\\e74d\"}.van-icon-guide-o:before{content:\"\\e74c\"}.van-icon-invitation:before{content:\"\\e6d6\"}.van-icon-shield-o:before{content:\"\\e74b\"}.van-icon-exchange:before{content:\"\\e6af\"}.van-icon-eye:before{content:\"\\e6b0\"}.van-icon-enlarge:before{content:\"\\e6b1\"}.van-icon-expand-o:before{content:\"\\e6b2\"}.van-icon-eye-o:before{content:\"\\e6b3\"}.van-icon-expand:before{content:\"\\e6b4\"}.van-icon-filter-o:before{content:\"\\e6b5\"}.van-icon-fire:before{content:\"\\e6b6\"}.van-icon-fail:before{content:\"\\e6b7\"}.van-icon-failure:before{content:\"\\e6b8\"}.van-icon-fire-o:before{content:\"\\e6b9\"}.van-icon-flag-o:before{content:\"\\e6ba\"}.van-icon-font:before{content:\"\\e6bb\"}.van-icon-font-o:before{content:\"\\e6bc\"}.van-icon-gem-o:before{content:\"\\e6bd\"}.van-icon-flower-o:before{content:\"\\e6be\"}.van-icon-gem:before{content:\"\\e6bf\"}.van-icon-gift-card:before{content:\"\\e6c0\"}.van-icon-friends:before{content:\"\\e6c1\"}.van-icon-friends-o:before{content:\"\\e6c2\"}.van-icon-gold-coin:before{content:\"\\e6c3\"}.van-icon-gold-coin-o:before{content:\"\\e6c4\"}.van-icon-good-job-o:before{content:\"\\e6c5\"}.van-icon-gift:before{content:\"\\e6c6\"}.van-icon-gift-o:before{content:\"\\e6c7\"}.van-icon-gift-card-o:before{content:\"\\e6c8\"}.van-icon-good-job:before{content:\"\\e6c9\"}.van-icon-home-o:before{content:\"\\e6ca\"}.van-icon-goods-collect:before{content:\"\\e6cb\"}.van-icon-graphic:before{content:\"\\e6cc\"}.van-icon-goods-collect-o:before{content:\"\\e6cd\"}.van-icon-hot-o:before{content:\"\\e6ce\"}.van-icon-info:before{content:\"\\e6cf\"}.van-icon-hotel-o:before{content:\"\\e6d0\"}.van-icon-info-o:before{content:\"\\e6d1\"}.van-icon-hot-sale-o:before{content:\"\\e6d2\"}.van-icon-hot:before{content:\"\\e6d3\"}.van-icon-like:before{content:\"\\e6d4\"}.van-icon-idcard:before{content:\"\\e6d5\"}.van-icon-like-o:before{content:\"\\e6d7\"}.van-icon-hot-sale:before{content:\"\\e6d8\"}.van-icon-location-o:before{content:\"\\e6d9\"}.van-icon-location:before{content:\"\\e6da\"}.van-icon-label:before{content:\"\\e6db\"}.van-icon-lock:before{content:\"\\e6dc\"}.van-icon-label-o:before{content:\"\\e6dd\"}.van-icon-map-marked:before{content:\"\\e6de\"}.van-icon-logistics:before{content:\"\\e6df\"}.van-icon-manager:before{content:\"\\e6e0\"}.van-icon-more:before{content:\"\\e6e1\"}.van-icon-live:before{content:\"\\e6e2\"}.van-icon-manager-o:before{content:\"\\e6e3\"}.van-icon-medal:before{content:\"\\e6e4\"}.van-icon-more-o:before{content:\"\\e6e5\"}.van-icon-music-o:before{content:\"\\e6e6\"}.van-icon-music:before{content:\"\\e6e7\"}.van-icon-new-arrival-o:before{content:\"\\e6e8\"}.van-icon-medal-o:before{content:\"\\e6e9\"}.van-icon-new-o:before{content:\"\\e6ea\"}.van-icon-free-postage:before{content:\"\\e6eb\"}.van-icon-newspaper-o:before{content:\"\\e6ec\"}.van-icon-new-arrival:before{content:\"\\e6ed\"}.van-icon-minus:before{content:\"\\e6ee\"}.van-icon-orders-o:before{content:\"\\e6ef\"}.van-icon-new:before{content:\"\\e6f0\"}.van-icon-paid:before{content:\"\\e6f1\"}.van-icon-notes-o:before{content:\"\\e6f2\"}.van-icon-other-pay:before{content:\"\\e6f3\"}.van-icon-pause-circle:before{content:\"\\e6f4\"}.van-icon-pause:before{content:\"\\e6f5\"}.van-icon-pause-circle-o:before{content:\"\\e6f6\"}.van-icon-peer-pay:before{content:\"\\e6f7\"}.van-icon-pending-payment:before{content:\"\\e6f8\"}.van-icon-passed:before{content:\"\\e6f9\"}.van-icon-plus:before{content:\"\\e6fa\"}.van-icon-phone-circle-o:before{content:\"\\e6fb\"}.van-icon-phone-o:before{content:\"\\e6fc\"}.van-icon-printer:before{content:\"\\e6fd\"}.van-icon-photo-fail:before{content:\"\\e6fe\"}.van-icon-phone:before{content:\"\\e6ff\"}.van-icon-photo-o:before{content:\"\\e700\"}.van-icon-play-circle:before{content:\"\\e701\"}.van-icon-play:before{content:\"\\e702\"}.van-icon-phone-circle:before{content:\"\\e703\"}.van-icon-point-gift-o:before{content:\"\\e704\"}.van-icon-point-gift:before{content:\"\\e705\"}.van-icon-play-circle-o:before{content:\"\\e706\"}.van-icon-shrink:before{content:\"\\e707\"}.van-icon-photo:before{content:\"\\e708\"}.van-icon-qr:before{content:\"\\e709\"}.van-icon-qr-invalid:before{content:\"\\e70a\"}.van-icon-question-o:before{content:\"\\e70b\"}.van-icon-revoke:before{content:\"\\e70c\"}.van-icon-replay:before{content:\"\\e70d\"}.van-icon-service:before{content:\"\\e70e\"}.van-icon-question:before{content:\"\\e70f\"}.van-icon-search:before{content:\"\\e710\"}.van-icon-refund-o:before{content:\"\\e711\"}.van-icon-service-o:before{content:\"\\e712\"}.van-icon-scan:before{content:\"\\e713\"}.van-icon-share:before{content:\"\\e714\"}.van-icon-send-gift-o:before{content:\"\\e715\"}.van-icon-share-o:before{content:\"\\e716\"}.van-icon-setting:before{content:\"\\e717\"}.van-icon-points:before{content:\"\\e718\"}.van-icon-photograph:before{content:\"\\e719\"}.van-icon-shop:before{content:\"\\e71a\"}.van-icon-shop-o:before{content:\"\\e71b\"}.van-icon-shop-collect-o:before{content:\"\\e71c\"}.van-icon-shop-collect:before{content:\"\\e71d\"}.van-icon-smile:before{content:\"\\e71e\"}.van-icon-shopping-cart-o:before{content:\"\\e71f\"}.van-icon-sign:before{content:\"\\e720\"}.van-icon-sort:before{content:\"\\e721\"}.van-icon-star-o:before{content:\"\\e722\"}.van-icon-smile-comment-o:before{content:\"\\e723\"}.van-icon-stop:before{content:\"\\e724\"}.van-icon-stop-circle-o:before{content:\"\\e725\"}.van-icon-smile-o:before{content:\"\\e726\"}.van-icon-star:before{content:\"\\e727\"}.van-icon-success:before{content:\"\\e728\"}.van-icon-stop-circle:before{content:\"\\e729\"}.van-icon-records-o:before{content:\"\\e72a\"}.van-icon-shopping-cart:before{content:\"\\e72b\"}.van-icon-tosend:before{content:\"\\e72c\"}.van-icon-todo-list:before{content:\"\\e72d\"}.van-icon-thumb-circle-o:before{content:\"\\e72e\"}.van-icon-thumb-circle:before{content:\"\\e72f\"}.van-icon-umbrella-circle:before{content:\"\\e730\"}.van-icon-underway:before{content:\"\\e731\"}.van-icon-upgrade:before{content:\"\\e732\"}.van-icon-todo-list-o:before{content:\"\\e733\"}.van-icon-tv-o:before{content:\"\\e734\"}.van-icon-underway-o:before{content:\"\\e735\"}.van-icon-user-o:before{content:\"\\e736\"}.van-icon-vip-card-o:before{content:\"\\e737\"}.van-icon-vip-card:before{content:\"\\e738\"}.van-icon-send-gift:before{content:\"\\e739\"}.van-icon-wap-home:before{content:\"\\e73a\"}.van-icon-wap-nav:before{content:\"\\e73b\"}.van-icon-volume-o:before{content:\"\\e73c\"}.van-icon-video:before{content:\"\\e73d\"}.van-icon-wap-home-o:before{content:\"\\e73e\"}.van-icon-volume:before{content:\"\\e73f\"}.van-icon-warning:before{content:\"\\e740\"}.van-icon-weapp-nav:before{content:\"\\e741\"}.van-icon-wechat-pay:before{content:\"\\e742\"}.van-icon-warning-o:before{content:\"\\e743\"}.van-icon-wechat:before{content:\"\\e744\"}.van-icon-setting-o:before{content:\"\\e745\"}.van-icon-youzan-shield:before{content:\"\\e746\"}.van-icon-warn-o:before{content:\"\\e747\"}.van-icon-smile-comment:before{content:\"\\e748\"}.van-icon-user-circle-o:before{content:\"\\e749\"}.van-icon-video-o:before{content:\"\\e74a\"}.van-icon-add-square:before{content:\"\\e65c\"}.van-icon-add:before{content:\"\\e65d\"}.van-icon-arrow-down:before{content:\"\\e65e\"}.van-icon-arrow-up:before{content:\"\\e65f\"}.van-icon-arrow:before{content:\"\\e660\"}.van-icon-after-sale:before{content:\"\\e661\"}.van-icon-add-o:before{content:\"\\e662\"}.van-icon-alipay:before{content:\"\\e663\"}.van-icon-ascending:before{content:\"\\e664\"}.van-icon-apps-o:before{content:\"\\e665\"}.van-icon-aim:before{content:\"\\e666\"}.van-icon-award:before{content:\"\\e667\"}.van-icon-arrow-left:before{content:\"\\e668\"}.van-icon-award-o:before{content:\"\\e669\"}.van-icon-audio:before{content:\"\\e66a\"}.van-icon-bag-o:before{content:\"\\e66b\"}.van-icon-balance-list:before{content:\"\\e66c\"}.van-icon-back-top:before{content:\"\\e66d\"}.van-icon-bag:before{content:\"\\e66e\"}.van-icon-balance-pay:before{content:\"\\e66f\"}.van-icon-balance-o:before{content:\"\\e670\"}.van-icon-bar-chart-o:before{content:\"\\e671\"}.van-icon-bars:before{content:\"\\e672\"}.van-icon-balance-list-o:before{content:\"\\e673\"}.van-icon-birthday-cake-o:before{content:\"\\e674\"}.van-icon-bookmark:before{content:\"\\e675\"}.van-icon-bill:before{content:\"\\e676\"}.van-icon-bell:before{content:\"\\e677\"}.van-icon-browsing-history-o:before{content:\"\\e678\"}.van-icon-browsing-history:before{content:\"\\e679\"}.van-icon-bookmark-o:before{content:\"\\e67a\"}.van-icon-bulb-o:before{content:\"\\e67b\"}.van-icon-bullhorn-o:before{content:\"\\e67c\"}.van-icon-bill-o:before{content:\"\\e67d\"}.van-icon-calendar-o:before{content:\"\\e67e\"}.van-icon-brush-o:before{content:\"\\e67f\"}.van-icon-card:before{content:\"\\e680\"}.van-icon-cart-o:before{content:\"\\e681\"}.van-icon-cart-circle:before{content:\"\\e682\"}.van-icon-cart-circle-o:before{content:\"\\e683\"}.van-icon-cart:before{content:\"\\e684\"}.van-icon-cash-on-deliver:before{content:\"\\e685\"}.van-icon-cash-back-record-o:before{content:\"\\e686\"}.van-icon-cashier-o:before{content:\"\\e687\"}.van-icon-chart-trending-o:before{content:\"\\e688\"}.van-icon-certificate:before{content:\"\\e689\"}.van-icon-chat:before{content:\"\\e68a\"}.van-icon-clear:before{content:\"\\e68b\"}.van-icon-chat-o:before{content:\"\\e68c\"}.van-icon-checked:before{content:\"\\e68d\"}.van-icon-clock:before{content:\"\\e68e\"}.van-icon-clock-o:before{content:\"\\e68f\"}.van-icon-close:before{content:\"\\e690\"}.van-icon-closed-eye:before{content:\"\\e691\"}.van-icon-circle:before{content:\"\\e692\"}.van-icon-cluster-o:before{content:\"\\e693\"}.van-icon-column:before{content:\"\\e694\"}.van-icon-comment-circle-o:before{content:\"\\e695\"}.van-icon-cluster:before{content:\"\\e696\"}.van-icon-comment:before{content:\"\\e697\"}.van-icon-comment-o:before{content:\"\\e698\"}.van-icon-comment-circle:before{content:\"\\e699\"}.van-icon-completed-o:before{content:\"\\e69a\"}.van-icon-credit-pay:before{content:\"\\e69b\"}.van-icon-coupon:before{content:\"\\e69c\"}.van-icon-debit-pay:before{content:\"\\e69d\"}.van-icon-coupon-o:before{content:\"\\e69e\"}.van-icon-contact-o:before{content:\"\\e69f\"}.van-icon-descending:before{content:\"\\e6a0\"}.van-icon-desktop-o:before{content:\"\\e6a1\"}.van-icon-diamond-o:before{content:\"\\e6a2\"}.van-icon-description-o:before{content:\"\\e6a3\"}.van-icon-delete:before{content:\"\\e6a4\"}.van-icon-diamond:before{content:\"\\e6a5\"}.van-icon-delete-o:before{content:\"\\e6a6\"}.van-icon-cross:before{content:\"\\e6a7\"}.van-icon-edit:before{content:\"\\e6a8\"}.van-icon-ellipsis:before{content:\"\\e6a9\"}.van-icon-down:before{content:\"\\e6aa\"}.van-icon-discount-o:before{content:\"\\e6ab\"}.van-icon-ecard-pay:before{content:\"\\e6ac\"}.van-icon-envelop-o:before{content:\"\\e6ae\"}@font-face{font-display:auto;font-family:vant-icon;font-style:normal;font-weight:400;src:url(//at.alicdn.com/t/c/font_2553510_kfwma2yq1rs.woff2?t=1694918397022) format(\"woff2\"),url(//at.alicdn.com/t/c/font_2553510_kfwma2yq1rs.woff?t=1694918397022) format(\"woff\")}:host{align-items:center;display:inline-flex;justify-content:center}.van-icon--custom{position:relative}.van-icon--image{height:1em;width:1em}.van-icon__image{height:100%;width:100%}.van-icon__info{z-index:1}"
  },
  {
    "path": "lib/image/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/image/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\n(0, component_1.VantComponent)({\n    mixins: [button_1.button],\n    classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],\n    props: {\n        src: {\n            type: String,\n            observer: function () {\n                this.setData({\n                    error: false,\n                    loading: true,\n                });\n            },\n        },\n        round: Boolean,\n        width: null,\n        height: null,\n        radius: null,\n        lazyLoad: Boolean,\n        useErrorSlot: Boolean,\n        useLoadingSlot: Boolean,\n        showMenuByLongpress: Boolean,\n        fit: {\n            type: String,\n            value: 'fill',\n        },\n        webp: {\n            type: Boolean,\n            value: false,\n        },\n        showError: {\n            type: Boolean,\n            value: true,\n        },\n        showLoading: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        error: false,\n        loading: true,\n        viewStyle: '',\n    },\n    methods: {\n        onLoad: function (event) {\n            this.setData({\n                loading: false,\n            });\n            this.$emit('load', event.detail);\n        },\n        onError: function (event) {\n            this.setData({\n                loading: false,\n                error: true,\n            });\n            this.$emit('error', event.detail);\n        },\n        onClick: function (event) {\n            this.$emit('click', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/image/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "lib/image/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  style=\"{{ computed.rootStyle({ width, height, radius }) }}\"\n  class=\"custom-class {{ utils.bem('image', { round })}}\"\n  bind:tap=\"onClick\"\n>\n  <image\n    wx:if=\"{{ !error }}\"\n    src=\"{{ src }}\"\n    mode=\"{{ computed.mode(fit) }}\"\n    lazy-load=\"{{ lazyLoad }}\"\n    webp=\"{{ webp }}\"\n    class=\"image-class van-image__img\"\n    show-menu-by-longpress=\"{{ showMenuByLongpress }}\"\n    bind:load=\"onLoad\"\n    bind:error=\"onError\"\n  />\n\n  <view\n    wx:if=\"{{ loading && showLoading }}\"\n    class=\"loading-class van-image__loading\"\n  >\n    <slot wx:if=\"{{ useLoadingSlot }}\" name=\"loading\" />\n    <van-icon wx:else name=\"photo\" custom-class=\"van-image__loading-icon\" />\n  </view>\n  <view\n    wx:if=\"{{ error && showError }}\"\n    class=\"error-class van-image__error\"\n  >\n    <slot wx:if=\"{{ useErrorSlot }}\" name=\"error\" />\n    <van-icon wx:else name=\"photo-fail\" custom-class=\"van-image__error-icon\" />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/image/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      width: addUnit(data.width),\n      height: addUnit(data.height),\n      'border-radius': addUnit(data.radius),\n    },\n    data.radius ? 'overflow: hidden' : null,\n  ]);\n}\n\nvar FIT_MODE_MAP = {\n  none: 'center',\n  fill: 'scaleToFill',\n  cover: 'aspectFill',\n  contain: 'aspectFit',\n  widthFix: 'widthFix',\n  heightFix: 'heightFix',\n};\n\nfunction mode(fit) {\n  return FIT_MODE_MAP[fit];\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  mode: mode,\n};\n"
  },
  {
    "path": "lib/image/index.wxss",
    "content": "@import '../common/index.wxss';.van-image{display:inline-block;position:relative;vertical-align:top}.van-image--round{border-radius:50%;overflow:hidden}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;height:100%;width:100%}.van-image__error,.van-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.van-image__loading-icon{color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:var(--image-error-icon-color,#dcdee0);font-size:var(--image-error-icon-size,32px)!important}"
  },
  {
    "path": "lib/index-anchor/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/index-anchor/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"../common/utils\");\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useParent)('index-bar'),\n    props: {\n        useSlot: Boolean,\n        index: null,\n    },\n    data: {\n        active: false,\n        wrapperStyle: '',\n        anchorStyle: '',\n    },\n    methods: {\n        scrollIntoView: function (scrollTop) {\n            var _this = this;\n            (0, utils_1.getRect)(this, '.van-index-anchor-wrapper').then(function (rect) {\n                wx.pageScrollTo({\n                    duration: 0,\n                    scrollTop: scrollTop + rect.top - _this.parent.data.stickyOffsetTop,\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/index-anchor/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/index-anchor/index.wxml",
    "content": "<view\n  class=\"van-index-anchor-wrapper\"\n  style=\"{{ wrapperStyle }}\"\n>\n  <view\n    class=\"van-index-anchor {{ active ? 'van-index-anchor--active van-hairline--bottom' : '' }}\"\n    style=\"{{ anchorStyle }}\"\n  >\n    <slot wx:if=\"{{ useSlot }}\"/>\n    <block wx:else>\n      <text>{{ index }}</text>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/index-anchor/index.wxss",
    "content": "@import '../common/index.wxss';.van-index-anchor{background-color:var(--index-anchor-background-color,transparent);color:var(--index-anchor-text-color,#323233);font-size:var(--index-anchor-font-size,14px);font-weight:var(--index-anchor-font-weight,500);line-height:var(--index-anchor-line-height,32px);padding:var(--index-anchor-padding,0 16px)}.van-index-anchor--active{background-color:var(--index-anchor-active-background-color,#fff);color:var(--index-anchor-active-text-color,#07c160);left:0;right:0}"
  },
  {
    "path": "lib/index-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/index-bar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../common/color\");\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar utils_1 = require(\"../common/utils\");\nvar page_scroll_1 = require(\"../mixins/page-scroll\");\nvar indexList = function () {\n    var indexList = [];\n    var charCodeOfA = 'A'.charCodeAt(0);\n    for (var i = 0; i < 26; i++) {\n        indexList.push(String.fromCharCode(charCodeOfA + i));\n    }\n    return indexList;\n};\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('index-anchor', function () {\n        this.updateData();\n    }),\n    props: {\n        sticky: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        highlightColor: {\n            type: String,\n            value: color_1.GREEN,\n        },\n        stickyOffsetTop: {\n            type: Number,\n            value: 0,\n        },\n        indexList: {\n            type: Array,\n            value: indexList(),\n        },\n    },\n    mixins: [\n        (0, page_scroll_1.pageScrollMixin)(function (event) {\n            this.scrollTop = (event === null || event === void 0 ? void 0 : event.scrollTop) || 0;\n            this.onScroll();\n        }),\n    ],\n    data: {\n        activeAnchorIndex: null,\n        showSidebar: false,\n    },\n    created: function () {\n        this.scrollTop = 0;\n    },\n    methods: {\n        updateData: function () {\n            var _this = this;\n            wx.nextTick(function () {\n                if (_this.timer != null) {\n                    clearTimeout(_this.timer);\n                }\n                _this.timer = setTimeout(function () {\n                    _this.setData({\n                        showSidebar: !!_this.children.length,\n                    });\n                    _this.setRect().then(function () {\n                        _this.onScroll();\n                    });\n                }, 0);\n            });\n        },\n        setRect: function () {\n            return Promise.all([\n                this.setAnchorsRect(),\n                this.setListRect(),\n                this.setSiderbarRect(),\n            ]);\n        },\n        setAnchorsRect: function () {\n            var _this = this;\n            return Promise.all(this.children.map(function (anchor) {\n                return (0, utils_1.getRect)(anchor, '.van-index-anchor-wrapper').then(function (rect) {\n                    Object.assign(anchor, {\n                        height: rect.height,\n                        top: rect.top + _this.scrollTop,\n                    });\n                });\n            }));\n        },\n        setListRect: function () {\n            var _this = this;\n            return (0, utils_1.getRect)(this, '.van-index-bar').then(function (rect) {\n                if (!(0, utils_1.isDef)(rect)) {\n                    return;\n                }\n                Object.assign(_this, {\n                    height: rect.height,\n                    top: rect.top + _this.scrollTop,\n                });\n            });\n        },\n        setSiderbarRect: function () {\n            var _this = this;\n            return (0, utils_1.getRect)(this, '.van-index-bar__sidebar').then(function (res) {\n                if (!(0, utils_1.isDef)(res)) {\n                    return;\n                }\n                _this.sidebar = {\n                    height: res.height,\n                    top: res.top,\n                };\n            });\n        },\n        setDiffData: function (_a) {\n            var target = _a.target, data = _a.data;\n            var diffData = {};\n            Object.keys(data).forEach(function (key) {\n                if (target.data[key] !== data[key]) {\n                    diffData[key] = data[key];\n                }\n            });\n            if (Object.keys(diffData).length) {\n                target.setData(diffData);\n            }\n        },\n        getAnchorRect: function (anchor) {\n            return (0, utils_1.getRect)(anchor, '.van-index-anchor-wrapper').then(function (rect) { return ({\n                height: rect.height,\n                top: rect.top,\n            }); });\n        },\n        getActiveAnchorIndex: function () {\n            var _a = this, children = _a.children, scrollTop = _a.scrollTop;\n            var _b = this.data, sticky = _b.sticky, stickyOffsetTop = _b.stickyOffsetTop;\n            for (var i = this.children.length - 1; i >= 0; i--) {\n                var preAnchorHeight = i > 0 ? children[i - 1].height : 0;\n                var reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;\n                if (reachTop + scrollTop >= children[i].top) {\n                    return i;\n                }\n            }\n            return -1;\n        },\n        onScroll: function () {\n            var _this = this;\n            var _a = this, _b = _a.children, children = _b === void 0 ? [] : _b, scrollTop = _a.scrollTop;\n            if (!children.length) {\n                return;\n            }\n            var _c = this.data, sticky = _c.sticky, stickyOffsetTop = _c.stickyOffsetTop, zIndex = _c.zIndex, highlightColor = _c.highlightColor;\n            var active = this.getActiveAnchorIndex();\n            this.setDiffData({\n                target: this,\n                data: {\n                    activeAnchorIndex: active,\n                },\n            });\n            if (sticky) {\n                var isActiveAnchorSticky_1 = false;\n                if (active !== -1) {\n                    isActiveAnchorSticky_1 =\n                        children[active].top <= stickyOffsetTop + scrollTop;\n                }\n                children.forEach(function (item, index) {\n                    if (index === active) {\n                        var wrapperStyle = '';\n                        var anchorStyle = \"\\n              color: \".concat(highlightColor, \";\\n            \");\n                        if (isActiveAnchorSticky_1) {\n                            wrapperStyle = \"\\n                height: \".concat(children[index].height, \"px;\\n              \");\n                            anchorStyle = \"\\n                position: fixed;\\n                top: \".concat(stickyOffsetTop, \"px;\\n                z-index: \").concat(zIndex, \";\\n                color: \").concat(highlightColor, \";\\n              \");\n                        }\n                        _this.setDiffData({\n                            target: item,\n                            data: {\n                                active: true,\n                                anchorStyle: anchorStyle,\n                                wrapperStyle: wrapperStyle,\n                            },\n                        });\n                    }\n                    else if (index === active - 1) {\n                        var currentAnchor = children[index];\n                        var currentOffsetTop = currentAnchor.top;\n                        var targetOffsetTop = index === children.length - 1\n                            ? _this.top\n                            : children[index + 1].top;\n                        var parentOffsetHeight = targetOffsetTop - currentOffsetTop;\n                        var translateY = parentOffsetHeight - currentAnchor.height;\n                        var anchorStyle = \"\\n              position: relative;\\n              transform: translate3d(0, \".concat(translateY, \"px, 0);\\n              z-index: \").concat(zIndex, \";\\n              color: \").concat(highlightColor, \";\\n            \");\n                        _this.setDiffData({\n                            target: item,\n                            data: {\n                                active: true,\n                                anchorStyle: anchorStyle,\n                            },\n                        });\n                    }\n                    else {\n                        _this.setDiffData({\n                            target: item,\n                            data: {\n                                active: false,\n                                anchorStyle: '',\n                                wrapperStyle: '',\n                            },\n                        });\n                    }\n                });\n            }\n        },\n        onClick: function (event) {\n            this.scrollToAnchor(event.target.dataset.index);\n        },\n        onTouchMove: function (event) {\n            var sidebarLength = this.children.length;\n            var touch = event.touches[0];\n            var itemHeight = this.sidebar.height / sidebarLength;\n            var index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);\n            if (index < 0) {\n                index = 0;\n            }\n            else if (index > sidebarLength - 1) {\n                index = sidebarLength - 1;\n            }\n            this.scrollToAnchor(index);\n        },\n        onTouchStop: function () {\n            this.scrollToAnchorIndex = null;\n        },\n        scrollToAnchor: function (index) {\n            var _this = this;\n            if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {\n                return;\n            }\n            this.scrollToAnchorIndex = index;\n            var anchor = this.children.find(function (item) { return item.data.index === _this.data.indexList[index]; });\n            if (anchor) {\n                anchor.scrollIntoView(this.scrollTop);\n                this.$emit('select', anchor.data.index);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/index-bar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/index-bar/index.wxml",
    "content": "<view class=\"van-index-bar\">\n  <slot />\n\n  <view\n    wx:if=\"{{ showSidebar }}\"\n    class=\"van-index-bar__sidebar\"\n    catch:tap=\"onClick\"\n    catch:touchmove=\"onTouchMove\"\n    catch:touchend=\"onTouchStop\"\n    catch:touchcancel=\"onTouchStop\"\n  >\n    <view\n      wx:for=\"{{ indexList }}\"\n      wx:key=\"index\"\n      class=\"van-index-bar__index\"\n      style=\"z-index: {{ zIndex + 1 }}; color: {{ activeAnchorIndex === index ? highlightColor : '' }}\"\n      data-index=\"{{ index }}\"\n    >\n      {{ item }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/index-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{display:flex;flex-direction:column;position:fixed;right:0;text-align:center;top:50%;transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-size:var(--index-bar-index-font-size,10px);font-weight:500;line-height:var(--index-bar-index-line-height,14px);padding:0 var(--padding-base,4px) 0 var(--padding-md,16px)}"
  },
  {
    "path": "lib/info/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/info/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        dot: Boolean,\n        info: null,\n        customStyle: String,\n    },\n});\n"
  },
  {
    "path": "lib/info/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/info/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ info !== null && info !== '' || dot }}\"\n  class=\"van-info {{ utils.bem('info', { dot }) }} custom-class\"\n  style=\"{{ customStyle }}\"\n>{{ dot ? '' : info }}</view>\n"
  },
  {
    "path": "lib/info/index.wxss",
    "content": "@import '../common/index.wxss';.van-info{align-items:center;background-color:var(--info-background-color,#ee0a24);border:var(--info-border-width,1px) solid #fff;border-radius:var(--info-size,16px);box-sizing:border-box;color:var(--info-color,#fff);display:inline-flex;font-family:var(--info-font-family,-apple-system-font,Helvetica Neue,Arial,sans-serif);font-size:var(--info-font-size,12px);font-weight:var(--info-font-weight,500);height:var(--info-size,16px);justify-content:center;min-width:var(--info-size,16px);padding:var(--info-padding,0 3px);position:absolute;right:0;top:0;transform:translate(50%,-50%);transform-origin:100%;white-space:nowrap}.van-info--dot{background-color:var(--info-dot-color,#ee0a24);border-radius:100%;height:var(--info-dot-size,8px);min-width:0;width:var(--info-dot-size,8px)}"
  },
  {
    "path": "lib/loading/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/loading/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        color: String,\n        vertical: Boolean,\n        type: {\n            type: String,\n            value: 'circular',\n        },\n        size: String,\n        textSize: String,\n    },\n    data: {\n        array12: Array.from({ length: 12 }),\n    },\n});\n"
  },
  {
    "path": "lib/loading/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/loading/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class {{ utils.bem('loading', { vertical }) }}\">\n  <view\n    class=\"van-loading__spinner van-loading__spinner--{{ type }}\"\n    style=\"{{ computed.spinnerStyle({ color, size }) }}\"\n  >\n    <view\n      wx:if=\"{{ type === 'spinner' }}\"\n      wx:for=\"{{ array12 }}\"\n      wx:key=\"index\"\n      class=\"van-loading__dot\"\n    />\n  </view>\n  <view class=\"van-loading__text\" style=\"{{ computed.textStyle({ textSize }) }}\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/loading/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction spinnerStyle(data) {\n  return style({\n    color: data.color,\n    width: addUnit(data.size),\n    height: addUnit(data.size),\n  });\n}\n\nfunction textStyle(data) {\n  return style({\n    'font-size': addUnit(data.textSize),\n  });\n}\n\nmodule.exports = {\n  spinnerStyle: spinnerStyle,\n  textStyle: textStyle,\n};\n"
  },
  {
    "path": "lib/loading/index.wxss",
    "content": "@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{align-items:center;color:var(--loading-spinner-color,#c8c9cc);display:inline-flex;justify-content:center}.van-loading__spinner{animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.van-loading__spinner--spinner{animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-radius:100%;border-top-color:initial}.van-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.van-loading__text:empty{display:none}.van-loading--vertical{flex-direction:column}.van-loading--vertical .van-loading__text{margin:var(--padding-xs,8px) 0 0}.van-loading__dot{height:100%;left:0;position:absolute;top:0;width:100%}.van-loading__dot:before{background-color:currentColor;border-radius:40%;content:\" \";display:block;height:25%;margin:0 auto;width:2px}.van-loading__dot:first-of-type{opacity:1;transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;transform:rotate(1turn)}@keyframes van-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"
  },
  {
    "path": "lib/mixins/basic.d.ts",
    "content": "export declare const basic: string;\n"
  },
  {
    "path": "lib/mixins/basic.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.basic = void 0;\nexports.basic = Behavior({\n    methods: {\n        $emit: function (name, detail, options) {\n            this.triggerEvent(name, detail, options);\n        },\n        set: function (data) {\n            this.setData(data);\n            return new Promise(function (resolve) { return wx.nextTick(resolve); });\n        },\n        // high performance setData\n        setView: function (data, callback) {\n            var _this = this;\n            var target = {};\n            var hasChange = false;\n            Object.keys(data).forEach(function (key) {\n                if (data[key] !== _this.data[key]) {\n                    target[key] = data[key];\n                    hasChange = true;\n                }\n            });\n            if (hasChange) {\n                return this.setData(target, callback);\n            }\n            return callback && callback();\n        },\n    },\n});\n"
  },
  {
    "path": "lib/mixins/button.d.ts",
    "content": "export declare const button: string;\n"
  },
  {
    "path": "lib/mixins/button.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.button = void 0;\nvar version_1 = require(\"../common/version\");\nexports.button = Behavior({\n    externalClasses: ['hover-class'],\n    properties: {\n        id: String,\n        buttonId: String,\n        lang: String,\n        businessId: Number,\n        sessionFrom: String,\n        sendMessageTitle: String,\n        sendMessagePath: String,\n        sendMessageImg: String,\n        showMessageCard: Boolean,\n        appParameter: String,\n        ariaLabel: String,\n        openType: String,\n        getUserProfileDesc: String,\n    },\n    data: {\n        canIUseGetUserProfile: (0, version_1.canIUseGetUserProfile)(),\n    },\n    methods: {\n        onGetUserInfo: function (event) {\n            this.triggerEvent('getuserinfo', event.detail);\n        },\n        onContact: function (event) {\n            this.triggerEvent('contact', event.detail);\n        },\n        onGetPhoneNumber: function (event) {\n            this.triggerEvent('getphonenumber', event.detail);\n        },\n        onGetRealTimePhoneNumber: function (event) {\n            this.triggerEvent('getrealtimephonenumber', event.detail);\n        },\n        onError: function (event) {\n            this.triggerEvent('error', event.detail);\n        },\n        onLaunchApp: function (event) {\n            this.triggerEvent('launchapp', event.detail);\n        },\n        onOpenSetting: function (event) {\n            this.triggerEvent('opensetting', event.detail);\n        },\n        onAgreePrivacyAuthorization: function (event) {\n            this.triggerEvent('agreeprivacyauthorization', event.detail);\n        },\n        onChooseAvatar: function (event) {\n            this.triggerEvent('chooseavatar', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/mixins/link.d.ts",
    "content": "export declare const link: string;\n"
  },
  {
    "path": "lib/mixins/link.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.link = void 0;\nexports.link = Behavior({\n    properties: {\n        url: String,\n        linkType: {\n            type: String,\n            value: 'navigateTo',\n        },\n    },\n    methods: {\n        jumpLink: function (urlKey) {\n            if (urlKey === void 0) { urlKey = 'url'; }\n            var url = this.data[urlKey];\n            if (url) {\n                if (this.data.linkType === 'navigateTo' &&\n                    getCurrentPages().length > 9) {\n                    wx.redirectTo({ url: url });\n                }\n                else {\n                    wx[this.data.linkType]({ url: url });\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/mixins/page-scroll.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\ntype IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;\ntype Scroller = (this: WechatMiniprogram.Component.TrivialInstance, event?: IPageScrollOption) => void;\nexport declare function pageScrollMixin(scroller: Scroller): string;\nexport {};\n"
  },
  {
    "path": "lib/mixins/page-scroll.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pageScrollMixin = void 0;\nvar validator_1 = require(\"../common/validator\");\nvar utils_1 = require(\"../common/utils\");\nfunction onPageScroll(event) {\n    var _a = (0, utils_1.getCurrentPage)().vanPageScroller, vanPageScroller = _a === void 0 ? [] : _a;\n    vanPageScroller.forEach(function (scroller) {\n        if (typeof scroller === 'function') {\n            // @ts-ignore\n            scroller(event);\n        }\n    });\n}\nfunction pageScrollMixin(scroller) {\n    return Behavior({\n        attached: function () {\n            var page = (0, utils_1.getCurrentPage)();\n            if (!(0, utils_1.isDef)(page)) {\n                return;\n            }\n            var _scroller = scroller.bind(this);\n            var _a = page.vanPageScroller, vanPageScroller = _a === void 0 ? [] : _a;\n            if ((0, validator_1.isFunction)(page.onPageScroll) && page.onPageScroll !== onPageScroll) {\n                vanPageScroller.push(page.onPageScroll.bind(page));\n            }\n            vanPageScroller.push(_scroller);\n            page.vanPageScroller = vanPageScroller;\n            page.onPageScroll = onPageScroll;\n            this._scroller = _scroller;\n        },\n        detached: function () {\n            var _this = this;\n            var page = (0, utils_1.getCurrentPage)();\n            if (!(0, utils_1.isDef)(page) || !(0, utils_1.isDef)(page.vanPageScroller)) {\n                return;\n            }\n            var vanPageScroller = page.vanPageScroller;\n            var index = vanPageScroller.findIndex(function (v) { return v === _this._scroller; });\n            if (index > -1) {\n                page.vanPageScroller.splice(index, 1);\n            }\n            this._scroller = undefined;\n        },\n    });\n}\nexports.pageScrollMixin = pageScrollMixin;\n"
  },
  {
    "path": "lib/mixins/touch.d.ts",
    "content": "export declare const touch: string;\n"
  },
  {
    "path": "lib/mixins/touch.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.touch = void 0;\n// @ts-nocheck\nvar MIN_DISTANCE = 10;\nfunction getDirection(x, y) {\n    if (x > y && x > MIN_DISTANCE) {\n        return 'horizontal';\n    }\n    if (y > x && y > MIN_DISTANCE) {\n        return 'vertical';\n    }\n    return '';\n}\nexports.touch = Behavior({\n    methods: {\n        resetTouchStatus: function () {\n            this.direction = '';\n            this.deltaX = 0;\n            this.deltaY = 0;\n            this.offsetX = 0;\n            this.offsetY = 0;\n        },\n        touchStart: function (event) {\n            this.resetTouchStatus();\n            var touch = event.touches[0];\n            this.startX = touch.clientX;\n            this.startY = touch.clientY;\n        },\n        touchMove: function (event) {\n            var touch = event.touches[0];\n            this.deltaX = touch.clientX - this.startX;\n            this.deltaY = touch.clientY - this.startY;\n            this.offsetX = Math.abs(this.deltaX);\n            this.offsetY = Math.abs(this.deltaY);\n            this.direction =\n                this.direction || getDirection(this.offsetX, this.offsetY);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/mixins/transition.d.ts",
    "content": "export declare function transition(showDefaultValue: boolean): string;\n"
  },
  {
    "path": "lib/mixins/transition.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transition = void 0;\n// @ts-nocheck\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nvar getClassNames = function (name) { return ({\n    enter: \"van-\".concat(name, \"-enter van-\").concat(name, \"-enter-active enter-class enter-active-class\"),\n    'enter-to': \"van-\".concat(name, \"-enter-to van-\").concat(name, \"-enter-active enter-to-class enter-active-class\"),\n    leave: \"van-\".concat(name, \"-leave van-\").concat(name, \"-leave-active leave-class leave-active-class\"),\n    'leave-to': \"van-\".concat(name, \"-leave-to van-\").concat(name, \"-leave-active leave-to-class leave-active-class\"),\n}); };\nfunction transition(showDefaultValue) {\n    return Behavior({\n        properties: {\n            customStyle: String,\n            // @ts-ignore\n            show: {\n                type: Boolean,\n                value: showDefaultValue,\n                observer: 'observeShow',\n            },\n            // @ts-ignore\n            duration: {\n                type: null,\n                value: 300,\n            },\n            name: {\n                type: String,\n                value: 'fade',\n            },\n        },\n        data: {\n            type: '',\n            inited: false,\n            display: false,\n        },\n        ready: function () {\n            if (this.data.show === true) {\n                this.observeShow(true, false);\n            }\n        },\n        methods: {\n            observeShow: function (value, old) {\n                if (value === old) {\n                    return;\n                }\n                value ? this.enureEnter() : this.enureLeave();\n            },\n            enureEnter: function () {\n                var _this = this;\n                if (this.enterPromise)\n                    return;\n                this.enterPromise = new Promise(function (resolve) { return _this.enter(resolve); });\n            },\n            enureLeave: function () {\n                var _this = this;\n                var enterPromise = this.enterPromise;\n                if (!enterPromise)\n                    return;\n                enterPromise\n                    .then(function () { return new Promise(function (resolve) { return _this.leave(resolve); }); })\n                    .then(function () {\n                    _this.enterPromise = null;\n                });\n            },\n            enter: function (resolve) {\n                var _this = this;\n                var _a = this.data, duration = _a.duration, name = _a.name;\n                var classNames = getClassNames(name);\n                var currentDuration = (0, validator_1.isObj)(duration) ? duration.enter : duration;\n                if (this.status === 'enter') {\n                    return;\n                }\n                this.status = 'enter';\n                this.$emit('before-enter');\n                (0, utils_1.requestAnimationFrame)(function () {\n                    if (_this.status !== 'enter') {\n                        return;\n                    }\n                    _this.$emit('enter');\n                    _this.setData({\n                        inited: true,\n                        display: true,\n                        classes: classNames.enter,\n                        currentDuration: currentDuration,\n                    });\n                    (0, utils_1.requestAnimationFrame)(function () {\n                        if (_this.status !== 'enter') {\n                            return;\n                        }\n                        _this.transitionEnded = false;\n                        _this.setData({ classes: classNames['enter-to'] });\n                        resolve();\n                    });\n                });\n            },\n            leave: function (resolve) {\n                var _this = this;\n                if (!this.data.display) {\n                    return;\n                }\n                var _a = this.data, duration = _a.duration, name = _a.name;\n                var classNames = getClassNames(name);\n                var currentDuration = (0, validator_1.isObj)(duration) ? duration.leave : duration;\n                this.status = 'leave';\n                this.$emit('before-leave');\n                (0, utils_1.requestAnimationFrame)(function () {\n                    if (_this.status !== 'leave') {\n                        return;\n                    }\n                    _this.$emit('leave');\n                    _this.setData({\n                        classes: classNames.leave,\n                        currentDuration: currentDuration,\n                    });\n                    (0, utils_1.requestAnimationFrame)(function () {\n                        if (_this.status !== 'leave') {\n                            return;\n                        }\n                        _this.transitionEnded = false;\n                        setTimeout(function () {\n                            _this.onTransitionEnd();\n                            resolve();\n                        }, currentDuration);\n                        _this.setData({ classes: classNames['leave-to'] });\n                    });\n                });\n            },\n            onTransitionEnd: function () {\n                if (this.transitionEnded) {\n                    return;\n                }\n                this.transitionEnded = true;\n                this.$emit(\"after-\".concat(this.status));\n                var _a = this.data, show = _a.show, display = _a.display;\n                if (!show && display) {\n                    this.setData({ display: false });\n                }\n            },\n        },\n    });\n}\nexports.transition = transition;\n"
  },
  {
    "path": "lib/nav-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/nav-bar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    classes: ['title-class'],\n    props: {\n        title: String,\n        fixed: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        placeholder: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        leftText: String,\n        rightText: String,\n        customStyle: String,\n        leftArrow: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        height: 46,\n    },\n    created: function () {\n        var statusBarHeight = (0, utils_1.getSystemInfoSync)().statusBarHeight;\n        this.setData({\n            statusBarHeight: statusBarHeight,\n            height: 46 + statusBarHeight,\n        });\n    },\n    mounted: function () {\n        this.setHeight();\n    },\n    methods: {\n        onClickLeft: function () {\n            this.$emit('click-left');\n        },\n        onClickRight: function () {\n            this.$emit('click-right');\n        },\n        setHeight: function () {\n            var _this = this;\n            if (!this.data.fixed || !this.data.placeholder) {\n                return;\n            }\n            wx.nextTick(function () {\n                (0, utils_1.getRect)(_this, '.van-nav-bar').then(function (res) {\n                    if (res && 'height' in res) {\n                        _this.setData({ height: res.height });\n                    }\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/nav-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/nav-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view wx:if=\"{{ fixed && placeholder }}\" style=\"height: {{ height }}px;\" />\n\n<view\n  class=\"{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}\"\n  style=\"{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}\"\n>\n  <view class=\"van-nav-bar__content\">\n    <view class=\"van-nav-bar__left\" bind:tap=\"onClickLeft\">\n      <block wx:if=\"{{ leftArrow || leftText }}\">\n        <van-icon\n          wx:if=\"{{ leftArrow }}\"\n          size=\"16px\"\n          name=\"arrow-left\"\n          custom-class=\"van-nav-bar__arrow\"\n        />\n        <view\n          wx:if=\"{{ leftText }}\"\n          class=\"van-nav-bar__text\"\n          hover-class=\"van-nav-bar__text--hover\"\n          hover-stay-time=\"70\"\n        >{{ leftText }}</view>\n      </block>\n      <slot wx:else name=\"left\" />\n    </view>\n    <view class=\"van-nav-bar__title title-class van-ellipsis\">\n      <block wx:if=\"{{ title }}\">{{ title }}</block>\n      <slot wx:else name=\"title\" />\n    </view>\n    <view class=\"van-nav-bar__right\" bind:tap=\"onClickRight\">\n      <view\n        wx:if=\"{{ rightText }}\"\n        class=\"van-nav-bar__text\"\n        hover-class=\"van-nav-bar__text--hover\"\n        hover-stay-time=\"70\"\n      >{{ rightText }}</view>\n      <slot wx:else name=\"right\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/nav-bar/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction barStyle(data) {\n  return style({\n    'z-index': data.zIndex,\n    'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,\n  });\n}\n\nmodule.exports = {\n  barStyle: barStyle,\n};\n"
  },
  {
    "path": "lib/nav-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-nav-bar{background-color:var(--nav-bar-background-color,#fff);box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.van-nav-bar__content{height:100%;position:relative}.van-nav-bar__text{color:var(--nav-bar-text-color,#1989fa);display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.van-nav-bar__text--hover{background-color:#f2f3f5}.van-nav-bar__arrow{color:var(--nav-bar-icon-color,#1989fa)!important;font-size:var(--nav-bar-arrow-size,16px)!important;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.van-nav-bar__title{color:var(--nav-bar-title-text-color,#323233);font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--font-weight-bold,500);margin:0 auto;max-width:60%}.van-nav-bar__left,.van-nav-bar__right{align-items:center;bottom:0;display:flex;font-size:var(--font-size-md,14px);position:absolute;top:0}.van-nav-bar__left{left:var(--padding-md,16px)}.van-nav-bar__right{right:var(--padding-md,16px)}"
  },
  {
    "path": "lib/notice-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/notice-bar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    props: {\n        text: {\n            type: String,\n            value: '',\n            observer: 'init',\n        },\n        mode: {\n            type: String,\n            value: '',\n        },\n        url: {\n            type: String,\n            value: '',\n        },\n        openType: {\n            type: String,\n            value: 'navigate',\n        },\n        delay: {\n            type: Number,\n            value: 1,\n        },\n        speed: {\n            type: Number,\n            value: 60,\n            observer: 'init',\n        },\n        scrollable: null,\n        leftIcon: {\n            type: String,\n            value: '',\n        },\n        color: String,\n        backgroundColor: String,\n        background: String,\n        wrapable: Boolean,\n    },\n    data: {\n        show: true,\n    },\n    created: function () {\n        this.resetAnimation = wx.createAnimation({\n            duration: 0,\n            timingFunction: 'linear',\n        });\n    },\n    destroyed: function () {\n        this.timer && clearTimeout(this.timer);\n    },\n    mounted: function () {\n        this.init();\n    },\n    methods: {\n        init: function () {\n            var _this = this;\n            (0, utils_1.requestAnimationFrame)(function () {\n                Promise.all([\n                    (0, utils_1.getRect)(_this, '.van-notice-bar__content'),\n                    (0, utils_1.getRect)(_this, '.van-notice-bar__wrap'),\n                ]).then(function (rects) {\n                    var contentRect = rects[0], wrapRect = rects[1];\n                    var scrollable = _this.data.scrollable;\n                    if (contentRect == null ||\n                        wrapRect == null ||\n                        !contentRect.width ||\n                        !wrapRect.width ||\n                        scrollable === false) {\n                        return;\n                    }\n                    if (scrollable || wrapRect.width < contentRect.width) {\n                        _this.initAnimation(wrapRect.width, contentRect.width);\n                        _this.scroll(true);\n                    }\n                });\n            });\n        },\n        initAnimation: function (warpWidth, contentWidth) {\n            var _a = this.data, speed = _a.speed, delay = _a.delay;\n            this.wrapWidth = warpWidth;\n            this.contentWidth = contentWidth;\n            // begin 0\n            this.contentDuration = (contentWidth / speed) * 1000;\n            // begin -wrapWidth\n            this.duration = ((warpWidth + contentWidth) / speed) * 1000;\n            this.animation = wx.createAnimation({\n                duration: this.contentDuration,\n                timingFunction: 'linear',\n                delay: delay,\n            });\n        },\n        scroll: function (isInit) {\n            var _this = this;\n            if (isInit === void 0) { isInit = false; }\n            this.timer && clearTimeout(this.timer);\n            this.timer = null;\n            this.setData({\n                animationData: this.resetAnimation\n                    .translateX(isInit ? 0 : this.wrapWidth)\n                    .step()\n                    .export(),\n            });\n            var duration = isInit ? this.contentDuration : this.duration;\n            (0, utils_1.requestAnimationFrame)(function () {\n                _this.setData({\n                    animationData: _this.animation\n                        .translateX(-_this.contentWidth)\n                        .step({ duration: duration })\n                        .export(),\n                });\n            });\n            this.timer = setTimeout(function () {\n                _this.scroll();\n            }, duration + this.data.delay);\n        },\n        onClickIcon: function (event) {\n            if (this.data.mode === 'closeable') {\n                this.timer && clearTimeout(this.timer);\n                this.timer = null;\n                this.setData({ show: false });\n                this.$emit('close', event.detail);\n            }\n        },\n        onClick: function (event) {\n            this.$emit('click', event);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/notice-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/notice-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  wx:if=\"{{ show }}\"\n  class=\"custom-class {{ utils.bem('notice-bar', { withicon: mode, wrapable }) }}\"\n  style=\"{{ computed.rootStyle({ color, backgroundColor, background }) }}\"\n  bind:tap=\"onClick\"\n>\n  <van-icon\n    wx:if=\"{{ leftIcon }}\"\n    name=\"{{ leftIcon }}\"\n    class=\"van-notice-bar__left-icon\"\n  />\n  <slot wx:else name=\"left-icon\" />\n\n  <view class=\"van-notice-bar__wrap\">\n    <view class=\"van-notice-bar__content {{ scrollable === false && !wrapable ? 'van-ellipsis' : '' }}\" animation=\"{{ animationData }}\">\n      {{ text }}\n      <slot wx:if=\"{{ !text }}\"></slot>\n    </view>\n  </view>\n\n  <van-icon\n    wx:if=\"{{ mode === 'closeable' }}\"\n    class=\"van-notice-bar__right-icon\"\n    name=\"cross\"\n    catch:tap=\"onClickIcon\"\n  />\n  <navigator\n    wx:elif=\"{{ mode === 'link' }}\"\n    url=\"{{ url }}\"\n    open-type=\"{{ openType }}\"\n  >\n    <van-icon class=\"van-notice-bar__right-icon\" name=\"arrow\" />\n  </navigator>\n  <slot wx:else name=\"right-icon\" />\n</view>\n"
  },
  {
    "path": "lib/notice-bar/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    color: data.color,\n    'background-color': data.backgroundColor,\n    background: data.background,\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "lib/notice-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-notice-bar{align-items:center;background-color:var(--notice-bar-background-color,#fffbe8);color:var(--notice-bar-text-color,#ed6a0c);display:flex;font-size:var(--notice-bar-font-size,14px);height:var(--notice-bar-height,40px);line-height:var(--notice-bar-line-height,24px);padding:var(--notice-bar-padding,0 16px)}.van-notice-bar--withicon{padding-right:40px;position:relative}.van-notice-bar--wrapable{height:auto;padding:var(--notice-bar-wrapable-padding,8px 16px)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{align-items:center;display:flex;margin-right:4px;vertical-align:middle}.van-notice-bar__left-icon,.van-notice-bar__right-icon{font-size:var(--notice-bar-icon-size,16px);min-width:var(--notice-bar-icon-min-width,22px)}.van-notice-bar__right-icon{position:absolute;right:15px;top:10px}.van-notice-bar__wrap{flex:1;height:var(--notice-bar-line-height,24px);overflow:hidden;position:relative}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}"
  },
  {
    "path": "lib/notify/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/notify/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar color_1 = require(\"../common/color\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    props: {\n        message: String,\n        background: String,\n        type: {\n            type: String,\n            value: 'danger',\n        },\n        color: {\n            type: String,\n            value: color_1.WHITE,\n        },\n        duration: {\n            type: Number,\n            value: 3000,\n        },\n        zIndex: {\n            type: Number,\n            value: 110,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: false,\n        },\n        top: null,\n    },\n    data: {\n        show: false,\n        onOpened: null,\n        onClose: null,\n        onClick: null,\n    },\n    created: function () {\n        var statusBarHeight = (0, utils_1.getSystemInfoSync)().statusBarHeight;\n        this.setData({ statusBarHeight: statusBarHeight });\n    },\n    methods: {\n        show: function () {\n            var _this = this;\n            var _a = this.data, duration = _a.duration, onOpened = _a.onOpened;\n            clearTimeout(this.timer);\n            this.setData({ show: true });\n            wx.nextTick(onOpened);\n            if (duration > 0 && duration !== Infinity) {\n                this.timer = setTimeout(function () {\n                    _this.hide();\n                }, duration);\n            }\n        },\n        hide: function () {\n            var onClose = this.data.onClose;\n            clearTimeout(this.timer);\n            this.setData({ show: false });\n            wx.nextTick(onClose);\n        },\n        onTap: function (event) {\n            var onClick = this.data.onClick;\n            if (onClick) {\n                onClick(event.detail);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/notify/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "lib/notify/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-transition\n  name=\"slide-down\"\n  show=\"{{ show }}\"\n  custom-class=\"van-notify__container\"\n  custom-style=\"{{ computed.rootStyle({ zIndex, top }) }}\"\n  bind:tap=\"onTap\"\n>\n  <view\n    class=\"van-notify van-notify--{{ type }}\"\n    style=\"{{ computed.notifyStyle({ background, color }) }}\"\n  >\n    <view\n      wx:if=\"{{ safeAreaInsetTop }}\"\n      style=\"height: {{ statusBarHeight }}px\"\n    />\n    <text>{{ message }}</text>\n  </view>\n</van-transition>\n"
  },
  {
    "path": "lib/notify/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'z-index': data.zIndex,\n    top: addUnit(data.top),\n  });\n}\n\nfunction notifyStyle(data) {\n  return style({\n    background: data.background,\n    color: data.color,\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  notifyStyle: notifyStyle,\n};\n"
  },
  {
    "path": "lib/notify/index.wxss",
    "content": "@import '../common/index.wxss';.van-notify{word-wrap:break-word;font-size:var(--notify-font-size,14px);line-height:var(--notify-line-height,20px);padding:var(--notify-padding,6px 15px);text-align:center}.van-notify__container{box-sizing:border-box;left:0;position:fixed;top:0;width:100%}.van-notify--primary{background-color:var(--notify-primary-background-color,#1989fa)}.van-notify--success{background-color:var(--notify-success-background-color,#07c160)}.van-notify--danger{background-color:var(--notify-danger-background-color,#ee0a24)}.van-notify--warning{background-color:var(--notify-warning-background-color,#ff976a)}"
  },
  {
    "path": "lib/notify/notify.d.ts",
    "content": "interface NotifyOptions {\n    type?: 'primary' | 'success' | 'danger' | 'warning';\n    color?: string;\n    zIndex?: number;\n    top?: number;\n    message: string;\n    context?: any;\n    duration?: number;\n    selector?: string;\n    background?: string;\n    safeAreaInsetTop?: boolean;\n    onClick?: () => void;\n    onOpened?: () => void;\n    onClose?: () => void;\n}\ndeclare function Notify(options: NotifyOptions | string): any;\ndeclare namespace Notify {\n    var clear: (options?: NotifyOptions | undefined) => void;\n    var setDefaultOptions: (options: NotifyOptions) => void;\n    var resetDefaultOptions: () => void;\n}\nexport default Notify;\n"
  },
  {
    "path": "lib/notify/notify.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../common/color\");\nvar defaultOptions = {\n    selector: '#van-notify',\n    type: 'danger',\n    message: '',\n    background: '',\n    duration: 3000,\n    zIndex: 110,\n    top: 0,\n    color: color_1.WHITE,\n    safeAreaInsetTop: false,\n    onClick: function () { },\n    onOpened: function () { },\n    onClose: function () { },\n};\nvar currentOptions = __assign({}, defaultOptions);\nfunction parseOptions(message) {\n    if (message == null) {\n        return {};\n    }\n    return typeof message === 'string' ? { message: message } : message;\n}\nfunction getContext() {\n    var pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nfunction Notify(options) {\n    options = __assign(__assign({}, currentOptions), parseOptions(options));\n    var context = options.context || getContext();\n    var notify = context.selectComponent(options.selector);\n    delete options.context;\n    delete options.selector;\n    if (notify) {\n        notify.setData(options);\n        notify.show();\n        return notify;\n    }\n    console.warn('未找到 van-notify 节点，请确认 selector 及 context 是否正确');\n}\nexports.default = Notify;\nNotify.clear = function (options) {\n    options = __assign(__assign({}, defaultOptions), parseOptions(options));\n    var context = options.context || getContext();\n    var notify = context.selectComponent(options.selector);\n    if (notify) {\n        notify.hide();\n    }\n};\nNotify.setDefaultOptions = function (options) {\n    Object.assign(currentOptions, options);\n};\nNotify.resetDefaultOptions = function () {\n    currentOptions = __assign({}, defaultOptions);\n};\n"
  },
  {
    "path": "lib/overlay/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/overlay/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        show: Boolean,\n        customStyle: String,\n        duration: {\n            type: null,\n            value: 300,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        lockScroll: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onClick: function () {\n            this.$emit('click');\n        },\n        // for prevent touchmove\n        noop: function () { },\n    },\n});\n"
  },
  {
    "path": "lib/overlay/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "lib/overlay/index.wxml",
    "content": "<import src=\"./overlay.wxml\" />\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./overlay.wxml\" />\n</root-portal>\n\n<include wx:else src=\"./overlay.wxml\" />\n"
  },
  {
    "path": "lib/overlay/index.wxss",
    "content": "@import '../common/index.wxss';.van-overlay{background-color:var(--overlay-background-color,rgba(0,0,0,.7));height:100%;left:0;position:fixed;top:0;width:100%}"
  },
  {
    "path": "lib/overlay/overlay.wxml",
    "content": "<van-transition\n  show=\"{{ show }}\"\n  custom-class=\"van-overlay custom-class\"\n  custom-style=\"z-index: {{ zIndex }}; {{ customStyle }}\"\n  duration=\"{{ duration }}\"\n  bind:tap=\"onClick\"\n  catch:touchmove=\"{{ lockScroll ? 'noop' : ''}}\"\n>\n  <slot></slot>\n</van-transition>"
  },
  {
    "path": "lib/panel/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/panel/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['header-class', 'footer-class'],\n    props: {\n        desc: String,\n        title: String,\n        status: String,\n    },\n});\n"
  },
  {
    "path": "lib/panel/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\"\n  }\n}\n"
  },
  {
    "path": "lib/panel/index.wxml",
    "content": "<view class=\"van-panel van-hairline--top-bottom custom-class\">\n  <van-cell\n    wx:if=\"{{ title || desc || status }}\"\n    title=\"{{ title }}\"\n    label=\"{{ desc }}\"\n    value=\"{{ status }}\"\n    custom-class=\"header-class\"\n    value-class=\"van-panel__header-value\"\n  />\n  <slot wx:else name=\"header\" />\n\n  <view class=\"van-panel__content\">\n    <slot />\n  </view>\n\n  <view class=\"van-panel__footer van-hairline--top footer-class\">\n    <slot name=\"footer\" />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/panel/index.wxss",
    "content": "@import '../common/index.wxss';.van-panel{background:var(--panel-background-color,#fff)}.van-panel__header-value{color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:var(--panel-footer-padding,8px 16px)}.van-panel__footer:empty{display:none}"
  },
  {
    "path": "lib/picker/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/picker/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar shared_1 = require(\"./shared\");\n(0, component_1.VantComponent)({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: __assign(__assign({}, shared_1.pickerProps), { valueKey: {\n            type: String,\n            value: 'text',\n        }, toolbarPosition: {\n            type: String,\n            value: 'top',\n        }, defaultIndex: {\n            type: Number,\n            value: 0,\n        }, columns: {\n            type: Array,\n            value: [],\n            observer: function (columns) {\n                if (columns === void 0) { columns = []; }\n                this.simple = columns.length && !columns[0].values;\n                if (Array.isArray(this.children) && this.children.length) {\n                    this.setColumns().catch(function () { });\n                }\n            },\n        } }),\n    beforeCreate: function () {\n        var _this = this;\n        Object.defineProperty(this, 'children', {\n            get: function () { return _this.selectAllComponents('.van-picker__column') || []; },\n        });\n    },\n    methods: {\n        noop: function () { },\n        setColumns: function () {\n            var _this = this;\n            var data = this.data;\n            var columns = this.simple ? [{ values: data.columns }] : data.columns;\n            var stack = columns.map(function (column, index) {\n                return _this.setColumnValues(index, column.values);\n            });\n            return Promise.all(stack);\n        },\n        emit: function (event) {\n            var type = event.currentTarget.dataset.type;\n            if (this.simple) {\n                this.$emit(type, {\n                    value: this.getColumnValue(0),\n                    index: this.getColumnIndex(0),\n                });\n            }\n            else {\n                this.$emit(type, {\n                    value: this.getValues(),\n                    index: this.getIndexes(),\n                });\n            }\n        },\n        onChange: function (event) {\n            if (this.simple) {\n                this.$emit('change', {\n                    picker: this,\n                    value: this.getColumnValue(0),\n                    index: this.getColumnIndex(0),\n                });\n            }\n            else {\n                this.$emit('change', {\n                    picker: this,\n                    value: this.getValues(),\n                    index: event.currentTarget.dataset.index,\n                });\n            }\n        },\n        // get column instance by index\n        getColumn: function (index) {\n            return this.children[index];\n        },\n        // get column value by index\n        getColumnValue: function (index) {\n            var column = this.getColumn(index);\n            return column && column.getValue();\n        },\n        // set column value by index\n        setColumnValue: function (index, value) {\n            var column = this.getColumn(index);\n            if (column == null) {\n                return Promise.reject(new Error('setColumnValue: 对应列不存在'));\n            }\n            return column.setValue(value);\n        },\n        // get column option index by column index\n        getColumnIndex: function (columnIndex) {\n            return (this.getColumn(columnIndex) || {}).data.currentIndex;\n        },\n        // set column option index by column index\n        setColumnIndex: function (columnIndex, optionIndex) {\n            var column = this.getColumn(columnIndex);\n            if (column == null) {\n                return Promise.reject(new Error('setColumnIndex: 对应列不存在'));\n            }\n            return column.setIndex(optionIndex);\n        },\n        // get options of column by index\n        getColumnValues: function (index) {\n            return (this.children[index] || {}).data.options;\n        },\n        // set options of column by index\n        setColumnValues: function (index, options, needReset) {\n            if (needReset === void 0) { needReset = true; }\n            var column = this.children[index];\n            if (column == null) {\n                return Promise.reject(new Error('setColumnValues: 对应列不存在'));\n            }\n            var isSame = JSON.stringify(column.data.options) === JSON.stringify(options);\n            if (isSame) {\n                return Promise.resolve();\n            }\n            return column.set({ options: options }).then(function () {\n                if (needReset) {\n                    column.setIndex(0);\n                }\n            });\n        },\n        // get values of all columns\n        getValues: function () {\n            return this.children.map(function (child) { return child.getValue(); });\n        },\n        // set values of all columns\n        setValues: function (values) {\n            var _this = this;\n            var stack = values.map(function (value, index) {\n                return _this.setColumnValue(index, value);\n            });\n            return Promise.all(stack);\n        },\n        // get indexes of all columns\n        getIndexes: function () {\n            return this.children.map(function (child) { return child.data.currentIndex; });\n        },\n        // set indexes of all columns\n        setIndexes: function (indexes) {\n            var _this = this;\n            var stack = indexes.map(function (optionIndex, columnIndex) {\n                return _this.setColumnIndex(columnIndex, optionIndex);\n            });\n            return Promise.all(stack);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/picker/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"picker-column\": \"../picker-column/index\",\n    \"loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "lib/picker/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-picker custom-class\">\n  <include wx:if=\"{{ toolbarPosition === 'top' }}\" src=\"./toolbar.wxml\" />\n\n  <view wx:if=\"{{ loading }}\" class=\"van-picker__loading\">\n    <loading color=\"#1989fa\"/>\n  </view>\n\n  <view\n    class=\"van-picker__columns\"\n    style=\"{{ computed.columnsStyle({ itemHeight, visibleItemCount }) }}\"\n    catch:touchmove=\"noop\"\n  >\n    <picker-column\n      class=\"van-picker__column\"\n      wx:for=\"{{ computed.columns(columns) }}\"\n      wx:key=\"index\"\n      data-index=\"{{ index }}\"\n      custom-class=\"column-class\"\n      value-key=\"{{ valueKey }}\"\n      initial-options=\"{{ item.values }}\"\n      default-index=\"{{ item.defaultIndex || defaultIndex }}\"\n      item-height=\"{{ itemHeight }}\"\n      visible-item-count=\"{{ visibleItemCount }}\"\n      active-class=\"active-class\"\n      bind:change=\"onChange\"\n    />\n    <view class=\"van-picker__mask\" style=\"{{ computed.maskStyle({ itemHeight, visibleItemCount }) }}\" />\n    <view\n      class=\"van-picker__frame van-hairline--top-bottom\"\n      style=\"{{ computed.frameStyle({ itemHeight }) }}\"\n    />\n  </view>\n\n  <include wx:if=\"{{ toolbarPosition === 'bottom' }}\" src=\"./toolbar.wxml\" />\n</view>\n"
  },
  {
    "path": "lib/picker/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\nvar array = require('../wxs/array.wxs');\n\nfunction columnsStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight * data.visibleItemCount),\n  });\n}\n\nfunction maskStyle(data) {\n  return style({\n    'background-size':\n      '100% ' + addUnit((data.itemHeight * (data.visibleItemCount - 1)) / 2),\n  });\n}\n\nfunction frameStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight),\n  });\n}\n\nfunction columns(columns) {\n  if (!array.isArray(columns)) {\n    return [];\n  }\n\n  if (columns.length && !columns[0].values) {\n    return [{ values: columns }];\n  }\n\n  return columns;\n}\n\nmodule.exports = {\n  columnsStyle: columnsStyle,\n  frameStyle: frameStyle,\n  maskStyle: maskStyle,\n  columns: columns,\n};\n"
  },
  {
    "path": "lib/picker/index.wxss",
    "content": "@import '../common/index.wxss';.van-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,#fff);overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.van-picker__cancel,.van-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.van-picker__cancel--hover,.van-picker__confirm--hover{opacity:.7}.van-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.van-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.van-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);max-width:50%;text-align:center}.van-picker__columns{display:flex;position:relative}.van-picker__column{flex:1 1;width:0}.van-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,hsla(0,0%,100%,.9));bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:4}.van-picker__mask{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-image:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-position:top,bottom;background-repeat:no-repeat;height:100%;left:0;top:0;width:100%;z-index:2}.van-picker__frame,.van-picker__mask{pointer-events:none;position:absolute}.van-picker__frame{left:16px;right:16px;top:50%;transform:translateY(-50%);z-index:1}"
  },
  {
    "path": "lib/picker/shared.d.ts",
    "content": "export declare const pickerProps: {\n    title: StringConstructor;\n    loading: BooleanConstructor;\n    showToolbar: BooleanConstructor;\n    cancelButtonText: {\n        type: StringConstructor;\n        value: string;\n    };\n    confirmButtonText: {\n        type: StringConstructor;\n        value: string;\n    };\n    visibleItemCount: {\n        type: NumberConstructor;\n        value: number;\n    };\n    itemHeight: {\n        type: NumberConstructor;\n        value: number;\n    };\n};\n"
  },
  {
    "path": "lib/picker/shared.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pickerProps = void 0;\nexports.pickerProps = {\n    title: String,\n    loading: Boolean,\n    showToolbar: Boolean,\n    cancelButtonText: {\n        type: String,\n        value: '取消',\n    },\n    confirmButtonText: {\n        type: String,\n        value: '确认',\n    },\n    visibleItemCount: {\n        type: Number,\n        value: 6,\n    },\n    itemHeight: {\n        type: Number,\n        value: 44,\n    },\n};\n"
  },
  {
    "path": "lib/picker/toolbar.wxml",
    "content": "<view wx:if=\"{{ showToolbar }}\" class=\"van-picker__toolbar toolbar-class\">\n  <view\n    class=\"van-picker__cancel\"\n    hover-class=\"van-picker__cancel--hover\"\n    hover-stay-time=\"70\"\n    data-type=\"cancel\"\n    bindtap=\"emit\"\n  >\n    {{ cancelButtonText }}\n  </view>\n  <view wx:if=\"{{ title }}\" class=\"van-picker__title van-ellipsis\">{{\n    title\n  }}</view>\n  <view\n    class=\"van-picker__confirm\"\n    hover-class=\"van-picker__confirm--hover\"\n    hover-stay-time=\"70\"\n    data-type=\"confirm\"\n    bindtap=\"emit\"\n  >\n    {{ confirmButtonText }}\n  </view>\n</view>\n"
  },
  {
    "path": "lib/picker-column/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/picker-column/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nvar DEFAULT_DURATION = 200;\n(0, component_1.VantComponent)({\n    classes: ['active-class'],\n    props: {\n        valueKey: String,\n        className: String,\n        itemHeight: Number,\n        visibleItemCount: Number,\n        initialOptions: {\n            type: Array,\n            value: [],\n        },\n        defaultIndex: {\n            type: Number,\n            value: 0,\n            observer: function (value) {\n                this.setIndex(value);\n            },\n        },\n    },\n    data: {\n        startY: 0,\n        offset: 0,\n        duration: 0,\n        startOffset: 0,\n        options: [],\n        currentIndex: 0,\n    },\n    created: function () {\n        var _this = this;\n        var _a = this.data, defaultIndex = _a.defaultIndex, initialOptions = _a.initialOptions;\n        this.set({\n            currentIndex: defaultIndex,\n            options: initialOptions,\n        }).then(function () {\n            _this.setIndex(defaultIndex);\n        });\n    },\n    methods: {\n        getCount: function () {\n            return this.data.options.length;\n        },\n        onTouchStart: function (event) {\n            this.setData({\n                startY: event.touches[0].clientY,\n                startOffset: this.data.offset,\n                duration: 0,\n            });\n        },\n        onTouchMove: function (event) {\n            var data = this.data;\n            var deltaY = event.touches[0].clientY - data.startY;\n            this.setData({\n                offset: (0, utils_1.range)(data.startOffset + deltaY, -(this.getCount() * data.itemHeight), data.itemHeight),\n            });\n        },\n        onTouchEnd: function () {\n            var data = this.data;\n            if (data.offset !== data.startOffset) {\n                this.setData({ duration: DEFAULT_DURATION });\n                var index = (0, utils_1.range)(Math.round(-data.offset / data.itemHeight), 0, this.getCount() - 1);\n                this.setIndex(index, true);\n            }\n        },\n        onClickItem: function (event) {\n            var index = event.currentTarget.dataset.index;\n            this.setIndex(index, true);\n        },\n        adjustIndex: function (index) {\n            var data = this.data;\n            var count = this.getCount();\n            index = (0, utils_1.range)(index, 0, count);\n            for (var i = index; i < count; i++) {\n                if (!this.isDisabled(data.options[i]))\n                    return i;\n            }\n            for (var i = index - 1; i >= 0; i--) {\n                if (!this.isDisabled(data.options[i]))\n                    return i;\n            }\n        },\n        isDisabled: function (option) {\n            return (0, validator_1.isObj)(option) && option.disabled;\n        },\n        getOptionText: function (option) {\n            var data = this.data;\n            return (0, validator_1.isObj)(option) && data.valueKey in option\n                ? option[data.valueKey]\n                : option;\n        },\n        setIndex: function (index, userAction) {\n            var _this = this;\n            var data = this.data;\n            index = this.adjustIndex(index) || 0;\n            var offset = -index * data.itemHeight;\n            if (index !== data.currentIndex) {\n                return this.set({ offset: offset, currentIndex: index }).then(function () {\n                    userAction && _this.$emit('change', index);\n                });\n            }\n            return this.set({ offset: offset });\n        },\n        setValue: function (value) {\n            var options = this.data.options;\n            for (var i = 0; i < options.length; i++) {\n                if (this.getOptionText(options[i]) === value) {\n                    return this.setIndex(i);\n                }\n            }\n            return Promise.resolve();\n        },\n        getValue: function () {\n            var data = this.data;\n            return data.options[data.currentIndex];\n        },\n    },\n});\n"
  },
  {
    "path": "lib/picker-column/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/picker-column/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-picker-column custom-class\"\n  style=\"{{ computed.rootStyle({ itemHeight, visibleItemCount }) }}\"\n  bind:touchstart=\"onTouchStart\"\n  catch:touchmove=\"onTouchMove\"\n  bind:touchend=\"onTouchEnd\"\n  bind:touchcancel=\"onTouchEnd\"\n>\n  <view style=\"{{ computed.wrapperStyle({ offset, itemHeight, visibleItemCount, duration }) }}\">\n    <view\n      wx:for=\"{{ options }}\"\n      wx:for-item=\"option\"\n      wx:key=\"index\"\n      data-index=\"{{ index }}\"\n      style=\"height: {{ itemHeight }}px\"\n      class=\"van-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: index === currentIndex }) }} {{ index === currentIndex ? 'active-class' : '' }}\"\n      bindtap=\"onClickItem\"\n    >{{ computed.optionText(option, valueKey) }}</view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/picker-column/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction isObj(x) {\n  var type = typeof x;\n  return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction optionText(option, valueKey) {\n  return isObj(option) && option[valueKey] != null ? option[valueKey] : option;\n}\n\nfunction rootStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight * data.visibleItemCount),\n  });\n}\n\nfunction wrapperStyle(data) {\n  var offset = addUnit(\n    data.offset + (data.itemHeight * (data.visibleItemCount - 1)) / 2\n  );\n\n  return style({\n    transition: 'transform ' + data.duration + 'ms',\n    'line-height': addUnit(data.itemHeight),\n    transform: 'translate3d(0, ' + offset + ', 0)',\n  });\n}\n\nmodule.exports = {\n  optionText: optionText,\n  rootStyle: rootStyle,\n  wrapperStyle: wrapperStyle,\n};\n"
  },
  {
    "path": "lib/picker-column/index.wxss",
    "content": "@import '../common/index.wxss';.van-picker-column{color:var(--picker-option-text-color,#000);font-size:var(--picker-option-font-size,16px);overflow:hidden;text-align:center}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{color:var(--picker-option-selected-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}"
  },
  {
    "path": "lib/popup/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/popup/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar transition_1 = require(\"../mixins/transition\");\n(0, component_1.VantComponent)({\n    classes: [\n        'enter-class',\n        'enter-active-class',\n        'enter-to-class',\n        'leave-class',\n        'leave-active-class',\n        'leave-to-class',\n        'close-icon-class',\n    ],\n    mixins: [(0, transition_1.transition)(false)],\n    props: {\n        round: Boolean,\n        closeable: Boolean,\n        customStyle: String,\n        overlayStyle: String,\n        transition: {\n            type: String,\n            observer: 'observeClass',\n        },\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeIcon: {\n            type: String,\n            value: 'cross',\n        },\n        closeIconPosition: {\n            type: String,\n            value: 'top-right',\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        position: {\n            type: String,\n            value: 'center',\n            observer: 'observeClass',\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: false,\n        },\n        safeAreaTabBar: {\n            type: Boolean,\n            value: false,\n        },\n        lockScroll: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    created: function () {\n        this.observeClass();\n    },\n    methods: {\n        onClickCloseIcon: function () {\n            this.$emit('close');\n        },\n        onClickOverlay: function () {\n            this.$emit('click-overlay');\n            if (this.data.closeOnClickOverlay) {\n                this.$emit('close');\n            }\n        },\n        observeClass: function () {\n            var _a = this.data, transition = _a.transition, position = _a.position, duration = _a.duration;\n            var updateData = {\n                name: transition || position,\n            };\n            if (transition === 'none') {\n                updateData.duration = 0;\n                this.originDuration = duration;\n            }\n            else if (this.originDuration != null) {\n                updateData.duration = this.originDuration;\n            }\n            this.setData(updateData);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/popup/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-overlay\": \"../overlay/index\"\n  }\n}\n"
  },
  {
    "path": "lib/popup/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<import src=\"./popup.wxml\" />\n\n<van-overlay\n  wx:if=\"{{ overlay }}\"\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  custom-style=\"{{ overlayStyle }}\"\n  duration=\"{{ duration }}\"\n  bind:click=\"onClickOverlay\"\n  lock-scroll=\"{{ lockScroll }}\"\n  root-portal=\"{{ rootPortal }}\"\n/>\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./popup.wxml\" />\n</root-portal>\n\n <include wx:else src=\"./popup.wxml\" />\n"
  },
  {
    "path": "lib/popup/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction popupStyle(data) {\n  return style([\n    {\n      'z-index': data.zIndex,\n      '-webkit-transition-duration': data.currentDuration + 'ms',\n      'transition-duration': data.currentDuration + 'ms',\n    },\n    data.display ? null : 'display: none',\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  popupStyle: popupStyle,\n};\n"
  },
  {
    "path": "lib/popup/index.wxss",
    "content": "@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--bottom.van-popup--safeTabBar,.van-popup--top.van-popup--safeTabBar{bottom:var(--tabbar-height,50px)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}"
  },
  {
    "path": "lib/popup/popup.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n<view\n  wx:if=\"{{ inited }}\"\n  class=\"custom-class {{ classes }} {{ utils.bem('popup', [position, { round, safe: safeAreaInsetBottom, safeTop: safeAreaInsetTop, safeTabBar: safeAreaTabBar }]) }}\"\n  style=\"{{ computed.popupStyle({ zIndex, currentDuration, display, customStyle }) }}\"\n  bind:transitionend=\"onTransitionEnd\"\n>\n  <slot />\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"{{ closeIcon }}\"\n    class=\"close-icon-class van-popup__close-icon van-popup__close-icon--{{ closeIconPosition }}\"\n    bind:tap=\"onClickCloseIcon\"\n  />\n</view>\n"
  },
  {
    "path": "lib/progress/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/progress/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar color_1 = require(\"../common/color\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    props: {\n        inactive: Boolean,\n        percentage: {\n            type: Number,\n            observer: 'setLeft',\n        },\n        pivotText: String,\n        pivotColor: String,\n        trackColor: String,\n        showPivot: {\n            type: Boolean,\n            value: true,\n        },\n        color: {\n            type: String,\n            value: color_1.BLUE,\n        },\n        textColor: {\n            type: String,\n            value: '#fff',\n        },\n        strokeWidth: {\n            type: null,\n            value: 4,\n        },\n    },\n    data: {\n        right: 0,\n    },\n    mounted: function () {\n        this.setLeft();\n    },\n    methods: {\n        setLeft: function () {\n            var _this = this;\n            Promise.all([\n                (0, utils_1.getRect)(this, '.van-progress'),\n                (0, utils_1.getRect)(this, '.van-progress__pivot'),\n            ]).then(function (_a) {\n                var portion = _a[0], pivot = _a[1];\n                if (portion && pivot) {\n                    _this.setData({\n                        right: (pivot.width * (_this.data.percentage - 100)) / 100,\n                    });\n                }\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/progress/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/progress/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-progress custom-class\"\n  style=\"{{ computed.rootStyle({ strokeWidth, trackColor }) }}\"\n>\n  <view\n    class=\"van-progress__portion\"\n    style=\"{{ computed.portionStyle({ percentage, inactive, color }) }}\"\n  >\n    <view\n      wx:if=\"{{ showPivot && computed.pivotText(pivotText, percentage) }}\"\n      style=\"{{ computed.pivotStyle({ textColor, pivotColor, inactive, color, right }) }}\"\n      class=\"van-progress__pivot\"\n    >\n      {{ computed.pivotText(pivotText, percentage) }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/progress/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction pivotText(pivotText, percentage) {\n  return pivotText || percentage + '%';\n}\n\nfunction rootStyle(data) {\n  return style({\n    'height': data.strokeWidth ? utils.addUnit(data.strokeWidth) : '',\n    'background': data.trackColor,\n  });\n}\n\nfunction portionStyle(data) {\n  return style({\n    background: data.inactive ? '#cacaca' : data.color,\n    width: data.percentage ? data.percentage + '%' : '',\n  });\n}\n\nfunction pivotStyle(data) {\n  return style({\n    color: data.textColor,\n    right: data.right + 'px',\n    background: data.pivotColor ? data.pivotColor : data.inactive ? '#cacaca' : data.color,\n  });\n}\n\nmodule.exports = {\n  pivotText: pivotText,\n  rootStyle: rootStyle,\n  portionStyle: portionStyle,\n  pivotStyle: pivotStyle,\n};\n"
  },
  {
    "path": "lib/progress/index.wxss",
    "content": "@import '../common/index.wxss';.van-progress{background:var(--progress-background-color,#ebedf0);border-radius:var(--progress-height,4px);height:var(--progress-height,4px);position:relative}.van-progress__portion{background:var(--progress-color,#1989fa);border-radius:inherit;height:100%;left:0;position:absolute}.van-progress__pivot{background-color:var(--progress-pivot-background-color,#1989fa);border-radius:1em;box-sizing:border-box;color:var(--progress-pivot-text-color,#fff);font-size:var(--progress-pivot-font-size,10px);line-height:var(--progress-pivot-line-height,1.6);min-width:3.6em;padding:var(--progress-pivot-padding,0 5px);position:absolute;text-align:center;top:50%;transform:translateY(-50%);word-break:keep-all}"
  },
  {
    "path": "lib/radio/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/radio/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar version_1 = require(\"../common/version\");\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    field: true,\n    relation: (0, relation_1.useParent)('radio-group', function () {\n        this.updateFromParent();\n    }),\n    classes: ['icon-class', 'label-class'],\n    props: {\n        name: null,\n        value: null,\n        disabled: Boolean,\n        useIconSlot: Boolean,\n        checkedColor: String,\n        labelPosition: {\n            type: String,\n            value: 'right',\n        },\n        labelDisabled: Boolean,\n        shape: {\n            type: String,\n            value: 'round',\n        },\n        iconSize: {\n            type: null,\n            value: 20,\n        },\n    },\n    data: {\n        direction: '',\n        parentDisabled: false,\n    },\n    methods: {\n        updateFromParent: function () {\n            if (!this.parent) {\n                return;\n            }\n            var _a = this.parent.data, value = _a.value, parentDisabled = _a.disabled, direction = _a.direction;\n            this.setData({\n                value: value,\n                direction: direction,\n                parentDisabled: parentDisabled,\n            });\n        },\n        emitChange: function (value) {\n            var instance = this.parent || this;\n            instance.$emit('input', value);\n            instance.$emit('change', value);\n            if ((0, version_1.canIUseModel)()) {\n                instance.setData({ value: value });\n            }\n        },\n        onChange: function () {\n            if (!this.data.disabled && !this.data.parentDisabled) {\n                this.emitChange(this.data.name);\n            }\n        },\n        onClickLabel: function () {\n            var _a = this.data, disabled = _a.disabled, parentDisabled = _a.parentDisabled, labelDisabled = _a.labelDisabled, name = _a.name;\n            if (!(disabled || parentDisabled) && !labelDisabled) {\n                this.emitChange(name);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/radio/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/radio/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('radio', [direction]) }} custom-class\">\n  <view\n    wx:if=\"{{ labelPosition === 'left' }}\"\n    class=\"{{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }} label-class\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n  <view class=\"van-radio__icon-wrap\" style=\"font-size: {{ utils.addUnit(iconSize) }}\" bindtap=\"onChange\">\n    <slot wx:if=\"{{ useIconSlot }}\" name=\"icon\" />\n    <van-icon\n      wx:else\n      name=\"success\"\n      class=\"{{ utils.bem('radio__icon', [shape, { disabled: disabled || parentDisabled, checked: value === name }]) }}\"\n      style=\"{{ computed.iconStyle({ iconSize, checkedColor, disabled, parentDisabled, value, name }) }}\"\n      custom-class=\"icon-class\"\n      custom-style=\"{{ computed.iconCustomStyle({ iconSize }) }}\"\n    />\n  </view>\n  <view\n    wx:if=\"{{ labelPosition === 'right' }}\"\n    class=\"label-class {{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/radio/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction iconStyle(data) {\n  var styles = {\n    'font-size': addUnit(data.iconSize),\n  };\n\n  if (\n    data.checkedColor &&\n    !(data.disabled || data.parentDisabled) &&\n    data.value === data.name\n  ) {\n    styles['border-color'] = data.checkedColor;\n    styles['background-color'] = data.checkedColor;\n  }\n\n  return style(styles);\n}\n\nfunction iconCustomStyle(data) {\n  return style({\n    'line-height': addUnit(data.iconSize),\n    'font-size': '.8em',\n    display: 'block',\n  });\n}\n\nmodule.exports = {\n  iconStyle: iconStyle,\n  iconCustomStyle: iconCustomStyle,\n};\n"
  },
  {
    "path": "lib/radio/index.wxss",
    "content": "@import '../common/index.wxss';.van-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{flex:none}.van-radio--horizontal{margin-right:var(--padding-sm,12px)}.van-radio__icon{align-items:center;border:1px solid var(--radio-border-color,#c8c9cc);box-sizing:border-box;color:transparent;display:flex;font-size:var(--radio-size,20px);height:1em;justify-content:center;text-align:center;transition-duration:var(--radio-transition-duration,.2s);transition-property:color,border-color,background-color;width:1em}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{background-color:var(--radio-checked-icon-color,#1989fa);border-color:var(--radio-checked-icon-color,#1989fa);color:#fff}.van-radio__icon--disabled{background-color:var(--radio-disabled-background-color,#ebedf0);border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;color:var(--radio-label-color,#323233);line-height:var(--radio-size,20px);padding-left:var(--radio-label-margin,10px)}.van-radio__label--left{float:left;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}"
  },
  {
    "path": "lib/radio-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/radio-group/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    field: true,\n    relation: (0, relation_1.useChildren)('radio'),\n    props: {\n        value: {\n            type: null,\n            observer: 'updateChildren',\n        },\n        direction: String,\n        disabled: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n    },\n    methods: {\n        updateChildren: function () {\n            this.children.forEach(function (child) { return child.updateFromParent(); });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/radio-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/radio-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"{{ utils.bem('radio-group', [direction]) }}\">\n  <slot></slot>\n</view>\n"
  },
  {
    "path": "lib/radio-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-radio-group--horizontal{display:flex;flex-wrap:wrap}"
  },
  {
    "path": "lib/rate/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/rate/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"../common/utils\");\nvar component_1 = require(\"../common/component\");\nvar version_1 = require(\"../common/version\");\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['icon-class'],\n    props: {\n        value: {\n            type: Number,\n            observer: function (value) {\n                if (value !== this.data.innerValue) {\n                    this.setData({ innerValue: value });\n                }\n            },\n        },\n        readonly: Boolean,\n        disabled: Boolean,\n        allowHalf: Boolean,\n        size: null,\n        icon: {\n            type: String,\n            value: 'star',\n        },\n        voidIcon: {\n            type: String,\n            value: 'star-o',\n        },\n        color: String,\n        voidColor: String,\n        disabledColor: String,\n        count: {\n            type: Number,\n            value: 5,\n            observer: function (value) {\n                this.setData({ innerCountArray: Array.from({ length: value }) });\n            },\n        },\n        gutter: null,\n        touchable: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        innerValue: 0,\n        innerCountArray: Array.from({ length: 5 }),\n    },\n    methods: {\n        onSelect: function (event) {\n            var _this = this;\n            var data = this.data;\n            var score = event.currentTarget.dataset.score;\n            if (!data.disabled && !data.readonly) {\n                this.setData({ innerValue: score + 1 });\n                if ((0, version_1.canIUseModel)()) {\n                    this.setData({ value: score + 1 });\n                }\n                wx.nextTick(function () {\n                    _this.$emit('input', score + 1);\n                    _this.$emit('change', score + 1);\n                });\n            }\n        },\n        onTouchMove: function (event) {\n            var _this = this;\n            var touchable = this.data.touchable;\n            if (!touchable)\n                return;\n            var clientX = event.touches[0].clientX;\n            (0, utils_1.getAllRect)(this, '.van-rate__icon').then(function (list) {\n                var target = list\n                    .sort(function (cur, next) { return cur.dataset.score - next.dataset.score; })\n                    .find(function (item) { return clientX >= item.left && clientX <= item.right; });\n                if (target != null) {\n                    _this.onSelect(__assign(__assign({}, event), { currentTarget: target }));\n                }\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/rate/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/rate/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"../wxs/style.wxs\" module=\"style\" />\n\n<view\n  class=\"{{ utils.bem('rate') }} custom-class\"\n  bind:touchmove=\"onTouchMove\"\n>\n  <view\n    class=\"{{ utils.bem('rate__item') }}\"\n    wx:for=\"{{ innerCountArray }}\"\n    wx:key=\"index\"\n    style=\"{{ style({ paddingRight: index !== count - 1 ? utils.addUnit(gutter) : null }) }}\"\n  >\n    <van-icon\n      name=\"{{ index + 1 <= innerValue ? icon : voidIcon }}\"\n      class=\"{{ utils.bem('rate__icon', [{ disabled, full: index + 1 <= innerValue }])}}\"\n      style=\"{{ style({ fontSize: utils.addUnit(size) }) }}\"\n      custom-class=\"icon-class\"\n      data-score=\"{{ index }}\"\n      color=\"{{ disabled ? disabledColor : index + 1 <= innerValue ? color : voidColor }}\"\n      bind:click=\"onSelect\"\n    />\n\n    <van-icon\n      wx:if=\"{{ allowHalf }}\"\n      name=\"{{ index + 0.5 <= innerValue ? icon : voidIcon }}\"\n      class=\"{{ utils.bem('rate__icon', ['half', { disabled, full: index + 0.5 <= innerValue }]) }}\"\n      style=\"{{ style({ fontSize: utils.addUnit(size) }) }}\"\n      custom-class=\"icon-class\"\n      data-score=\"{{ index - 0.5 }}\"\n      color=\"{{ disabled ? disabledColor : index + 0.5 <= innerValue ? color : voidColor }}\"\n      bind:click=\"onSelect\"\n    />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/rate/index.wxss",
    "content": "@import '../common/index.wxss';.van-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.van-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.van-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:100%}.van-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.van-rate__icon--full,.van-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.van-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)}"
  },
  {
    "path": "lib/row/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/row/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('col', function (target) {\n        var gutter = this.data.gutter;\n        if (gutter) {\n            target.setData({ gutter: gutter });\n        }\n    }),\n    props: {\n        gutter: {\n            type: Number,\n            observer: 'setGutter',\n        },\n    },\n    methods: {\n        setGutter: function () {\n            var _this = this;\n            this.children.forEach(function (col) {\n                col.setData(_this.data);\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/row/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/row/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-row custom-class\" style=\"{{ computed.rootStyle({ gutter }) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/row/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  if (!data.gutter) {\n    return '';\n  }\n\n  return style({\n    'margin-right': addUnit(-data.gutter / 2),\n    'margin-left': addUnit(-data.gutter / 2),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "lib/row/index.wxss",
    "content": "@import '../common/index.wxss';.van-row:after{clear:both;content:\"\";display:table}"
  },
  {
    "path": "lib/search/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/search/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar version_1 = require(\"../common/version\");\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['field-class', 'input-class', 'cancel-class'],\n    props: {\n        value: {\n            type: String,\n            value: '',\n        },\n        label: String,\n        focus: Boolean,\n        error: Boolean,\n        disabled: Boolean,\n        readonly: Boolean,\n        inputAlign: String,\n        showAction: Boolean,\n        useActionSlot: Boolean,\n        useLeftIconSlot: Boolean,\n        useRightIconSlot: Boolean,\n        leftIcon: {\n            type: String,\n            value: 'search',\n        },\n        rightIcon: String,\n        placeholder: String,\n        placeholderStyle: String,\n        actionText: {\n            type: String,\n            value: '取消',\n        },\n        background: {\n            type: String,\n            value: '#ffffff',\n        },\n        maxlength: {\n            type: Number,\n            value: -1,\n        },\n        shape: {\n            type: String,\n            value: 'square',\n        },\n        clearable: {\n            type: Boolean,\n            value: true,\n        },\n        clearTrigger: {\n            type: String,\n            value: 'focus',\n        },\n        clearIcon: {\n            type: String,\n            value: 'clear',\n        },\n        cursorSpacing: {\n            type: Number,\n            value: 0,\n        },\n    },\n    methods: {\n        onChange: function (event) {\n            if ((0, version_1.canIUseModel)()) {\n                this.setData({ value: event.detail });\n            }\n            this.$emit('change', event.detail);\n        },\n        onCancel: function () {\n            var _this = this;\n            /**\n             * 修复修改输入框值时，输入框失焦和赋值同时触发，赋值失效\n             * https://github.com/youzan/vant-weapp/issues/1768\n             */\n            setTimeout(function () {\n                if ((0, version_1.canIUseModel)()) {\n                    _this.setData({ value: '' });\n                }\n                _this.$emit('cancel');\n                _this.$emit('change', '');\n            }, 200);\n        },\n        onSearch: function (event) {\n            this.$emit('search', event.detail);\n        },\n        onFocus: function (event) {\n            this.$emit('focus', event.detail);\n        },\n        onBlur: function (event) {\n            this.$emit('blur', event.detail);\n        },\n        onClear: function (event) {\n            this.$emit('clear', event.detail);\n        },\n        onClickInput: function (event) {\n            this.$emit('click-input', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/search/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-field\": \"../field/index\"\n  }\n}\n"
  },
  {
    "path": "lib/search/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('search', { withaction: showAction || useActionSlot }) }} custom-class\"\n  style=\"background: {{ background }}\"\n>\n  <view class=\"{{ utils.bem('search__content', [shape]) }}\">\n    <view class=\"van-search__label\" wx:if=\"{{ label }}\">{{ label }}</view>\n    <slot wx:else name=\"label\" />\n\n    <van-field\n      type=\"search\"\n      left-icon=\"{{ !useLeftIconSlot ? leftIcon : '' }}\"\n      right-icon=\"{{ !useRightIconSlot ? rightIcon : '' }}\"\n      focus=\"{{ focus }}\"\n      error=\"{{ error }}\"\n      border=\"{{ false }}\"\n      confirm-type=\"search\"\n      class=\"van-search__field field-class\"\n      value=\"{{ value }}\"\n      disabled=\"{{ disabled }}\"\n      readonly=\"{{ readonly }}\"\n      clearable=\"{{ clearable }}\"\n      clear-trigger=\"{{ clearTrigger }}\"\n      clear-icon=\"{{ clearIcon }}\"\n      maxlength=\"{{ maxlength }}\"\n      input-align=\"{{ inputAlign }}\"\n      input-class=\"input-class\"\n      placeholder=\"{{ placeholder }}\"\n      placeholder-style=\"{{ placeholderStyle }}\"\n      cursor-spacing=\"{{ cursorSpacing }}\"\n      custom-style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n      bind:blur=\"onBlur\"\n      bind:focus=\"onFocus\"\n      bind:change=\"onChange\"\n      bind:confirm=\"onSearch\"\n      bind:clear=\"onClear\"\n      bind:click-input=\"onClickInput\"\n    >\n      <slot wx:if=\"{{ useLeftIconSlot }}\" name=\"left-icon\" slot=\"left-icon\" />\n      <slot wx:if=\"{{ useRightIconSlot }}\" name=\"right-icon\" slot=\"right-icon\" />\n    </van-field>\n  </view>\n\n  <view\n    wx:if=\"{{ showAction || useActionSlot }}\"\n    class=\"van-search__action\"\n    hover-class=\"van-search__action--hover\"\n    hover-stay-time=\"70\"\n  >\n    <slot wx:if=\"{{ useActionSlot }}\" name=\"action\" />\n    <view wx:else bind:tap=\"onCancel\" class=\"van-search__action-button cancel-class\">{{ actionText }}</view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/search/index.wxss",
    "content": "@import '../common/index.wxss';.van-search{align-items:center;box-sizing:border-box;display:flex;padding:var(--search-padding,10px 12px)}.van-search__content{background-color:var(--search-background-color,#f7f8fa);border-radius:2px;display:flex;flex:1;padding-left:var(--padding-sm,12px)}.van-search__content--round{border-radius:999px}.van-search__label{color:var(--search-label-color,#323233);font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,34px);padding:var(--search-label-padding,0 5px)}.van-search__field{flex:1}.van-search__field__left-icon{color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{color:var(--search-action-text-color,#323233);font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,34px)}.van-search__action--hover{background-color:#f2f3f5}.van-search__action-button{padding:var(--search-action-padding,0 8px)}"
  },
  {
    "path": "lib/share-sheet/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/share-sheet/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        // whether to show popup\n        show: Boolean,\n        // overlay custom style\n        overlayStyle: String,\n        // z-index\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        title: String,\n        cancelText: {\n            type: String,\n            value: '取消',\n        },\n        description: String,\n        options: {\n            type: Array,\n            value: [],\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        duration: {\n            type: null,\n            value: 300,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onClickOverlay: function () {\n            this.$emit('click-overlay');\n        },\n        onCancel: function () {\n            this.onClose();\n            this.$emit('cancel');\n        },\n        onSelect: function (event) {\n            this.$emit('select', event.detail);\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n    },\n});\n"
  },
  {
    "path": "lib/share-sheet/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"options\": \"./options\"\n  }\n}\n"
  },
  {
    "path": "lib/share-sheet/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-popup\n  round\n  class=\"van-share-sheet\"\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  overlay=\"{{ overlay }}\"\n  duration=\"{{ duration }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay-style=\"{{ overlayStyle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClose\"\n  bind:click-overlay=\"onClickOverlay\"\n>\n  <view class=\"van-share-sheet__header\">\n    <view class=\"van-share-sheet__title\">\n      <slot name=\"title\" />\n    </view>\n    <view wx:if=\"{{ title }}\" class=\"van-share-sheet__title\">{{ title }}</view>\n\n    <view class=\"van-share-sheet__description\">\n      <slot name=\"description\" />\n    </view>\n    <view wx:if=\"{{ description }}\" class=\"van-share-sheet__description\">\n      {{ description }}\n    </view>\n  </view>\n\n  <block wx:if=\"{{ computed.isMulti(options) }}\">\n    <options\n      wx:for=\"{{ options }}\"\n      show-border=\"{{ index !== 0 }}\"\n      wx:key=\"index\"\n      options=\"{{ item }}\"\n      bind:select=\"onSelect\"\n    />\n  </block>\n\n  <options wx:else options=\"{{ options }}\" bind:select=\"onSelect\" />\n\n  <button type=\"button\" class=\"van-share-sheet__cancel\" bindtap=\"onCancel\">\n    {{ cancelText }}\n  </button>\n</van-popup>\n"
  },
  {
    "path": "lib/share-sheet/index.wxs",
    "content": "/* eslint-disable */\nfunction isMulti(options) {\n  if (options == null || options[0] == null) {\n    return false;\n  }\n\n  return \"Array\" === options.constructor && \"Array\" === options[0].constructor;\n}\n\nmodule.exports = {\n  isMulti: isMulti\n};\n"
  },
  {
    "path": "lib/share-sheet/index.wxss",
    "content": "@import '../common/index.wxss';.van-share-sheet__header{padding:12px 16px 4px;text-align:center}.van-share-sheet__title{color:#323233;font-size:14px;font-weight:400;line-height:20px;margin-top:8px}.van-share-sheet__title:empty,.van-share-sheet__title:not(:empty)+.van-share-sheet__title{display:none}.van-share-sheet__description{color:#969799;display:block;font-size:12px;line-height:16px;margin-top:8px}.van-share-sheet__description:empty,.van-share-sheet__description:not(:empty)+.van-share-sheet__description{display:none}.van-share-sheet__cancel{background:#fff;border:none;box-sizing:initial;display:block;font-size:16px;height:auto;line-height:48px;padding:0;text-align:center;width:100%}.van-share-sheet__cancel:before{background-color:#f7f8fa;content:\" \";display:block;height:8px}.van-share-sheet__cancel:after{display:none}.van-share-sheet__cancel:active{background-color:#f2f3f5}"
  },
  {
    "path": "lib/share-sheet/options.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/share-sheet/options.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        options: Array,\n        showBorder: Boolean,\n    },\n    methods: {\n        onSelect: function (event) {\n            var index = event.currentTarget.dataset.index;\n            var option = this.data.options[index];\n            this.$emit('select', __assign(__assign({}, option), { index: index }));\n        },\n    },\n});\n"
  },
  {
    "path": "lib/share-sheet/options.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/share-sheet/options.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./options.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('share-sheet__options', { border: showBorder }) }}\">\n  <view\n    wx:for=\"{{ options }}\"\n    wx:key=\"index\"\n    class=\"van-share-sheet__option\"\n    data-index=\"{{ index }}\"\n    bindtap=\"onSelect\"\n  >\n    <button class=\"van-share-sheet__button\" open-type=\"{{ item.openType }}\">\n      <image src=\"{{ computed.getIconURL(item.icon) }}\" class=\"van-share-sheet__icon\" /> \n      <view wx:if=\"{{ item.name }}\" class=\"van-share-sheet__name\">{{ item.name }}</view>\n      <view wx:if=\"{{ item.description }}\" class=\"van-share-sheet__option-description\">\n        {{ item.description }}\n      </view>\n    </button>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/share-sheet/options.wxs",
    "content": "/* eslint-disable */\nvar PRESET_ICONS = ['qq', 'link', 'weibo', 'wechat', 'poster', 'qrcode', 'weapp-qrcode', 'wechat-moments'];\n\nfunction getIconURL(icon) {\n  if (PRESET_ICONS.indexOf(icon) !== -1) {\n    return 'https://img.yzcdn.cn/vant/share-sheet-' + icon + '.png';\n  }\n\n  return icon;\n}\n\nmodule.exports = {\n  getIconURL: getIconURL,\n};\n"
  },
  {
    "path": "lib/share-sheet/options.wxss",
    "content": "@import '../common/index.wxss';.van-share-sheet__options{-webkit-overflow-scrolling:touch;display:flex;overflow-x:auto;overflow-y:visible;padding:16px 0 16px 8px;position:relative}.van-share-sheet__options--border:before{border-top:1px solid #ebedf0;box-sizing:border-box;content:\" \";left:16px;pointer-events:none;position:absolute;right:0;top:0;transform:scaleY(.5);transform-origin:center}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{align-items:center;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}.van-share-sheet__option:active{opacity:.7}.van-share-sheet__button{background-color:initial;border:0;height:auto;line-height:inherit;padding:0}.van-share-sheet__button:after{border:0}.van-share-sheet__icon{height:48px;margin:0 16px;width:48px}.van-share-sheet__name{color:#646566;font-size:12px;margin-top:8px;padding:0 4px}.van-share-sheet__option-description{color:#c8c9cc;font-size:12px;padding:0 4px}"
  },
  {
    "path": "lib/sidebar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/sidebar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('sidebar-item', function () {\n        this.setActive(this.data.activeKey);\n    }),\n    props: {\n        activeKey: {\n            type: Number,\n            value: 0,\n            observer: 'setActive',\n        },\n    },\n    beforeCreate: function () {\n        this.currentActive = -1;\n    },\n    methods: {\n        setActive: function (activeKey) {\n            var _a = this, children = _a.children, currentActive = _a.currentActive;\n            if (!children.length) {\n                return Promise.resolve();\n            }\n            this.currentActive = activeKey;\n            var stack = [];\n            if (currentActive !== activeKey && children[currentActive]) {\n                stack.push(children[currentActive].setActive(false));\n            }\n            if (children[activeKey]) {\n                stack.push(children[activeKey].setActive(true));\n            }\n            return Promise.all(stack);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/sidebar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/sidebar/index.wxml",
    "content": "<view class=\"van-sidebar custom-class\">\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/sidebar/index.wxss",
    "content": "@import '../common/index.wxss';.van-sidebar{width:var(--sidebar-width,80px)}"
  },
  {
    "path": "lib/sidebar-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/sidebar-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    classes: ['active-class', 'disabled-class'],\n    relation: (0, relation_1.useParent)('sidebar'),\n    props: {\n        dot: Boolean,\n        badge: null,\n        info: null,\n        title: String,\n        disabled: Boolean,\n    },\n    methods: {\n        onClick: function () {\n            var _this = this;\n            var parent = this.parent;\n            if (!parent || this.data.disabled) {\n                return;\n            }\n            var index = parent.children.indexOf(this);\n            parent.setActive(index).then(function () {\n                _this.$emit('click', index);\n                parent.$emit('change', index);\n            });\n        },\n        setActive: function (selected) {\n            return this.setData({ selected: selected });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/sidebar-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "lib/sidebar-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class\"\n  hover-class=\"van-sidebar-item--hover\"\n  hover-stay-time=\"70\"\n  bind:tap=\"onClick\"\n>\n  <view class=\"van-sidebar-item__text\">\n    <van-info\n      wx:if=\"{{ badge != null || info !== null || dot }}\"\n      dot=\"{{ dot }}\"\n      info=\"{{ badge != null ? badge : info }}\"\n    />\n    <view wx:if=\"{{ title }}\">{{ title }}</view>\n    <slot wx:else name=\"title\" />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/sidebar-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-sidebar-item{background-color:var(--sidebar-background-color,#f7f8fa);border-left:3px solid transparent;box-sizing:border-box;color:var(--sidebar-text-color,#323233);display:block;font-size:var(--sidebar-font-size,14px);line-height:var(--sidebar-line-height,20px);overflow:hidden;padding:var(--sidebar-padding,20px 12px 20px 8px);-webkit-user-select:none;user-select:none}.van-sidebar-item__text{display:inline-block;position:relative;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{border-color:var(--sidebar-selected-border-color,#ee0a24);color:var(--sidebar-selected-text-color,#323233);font-weight:var(--sidebar-selected-font-weight,500)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:var(--sidebar-disabled-text-color,#c8c9cc)}"
  },
  {
    "path": "lib/skeleton/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/skeleton/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['avatar-class', 'title-class', 'row-class'],\n    props: {\n        row: {\n            type: Number,\n            value: 0,\n            observer: function (value) {\n                this.setData({ rowArray: Array.from({ length: value }) });\n            },\n        },\n        title: Boolean,\n        avatar: Boolean,\n        loading: {\n            type: Boolean,\n            value: true,\n        },\n        animate: {\n            type: Boolean,\n            value: true,\n        },\n        avatarSize: {\n            type: String,\n            value: '32px',\n        },\n        avatarShape: {\n            type: String,\n            value: 'round',\n        },\n        titleWidth: {\n            type: String,\n            value: '40%',\n        },\n        rowWidth: {\n            type: null,\n            value: '100%',\n            observer: function (val) {\n                this.setData({ isArray: val instanceof Array });\n            },\n        },\n    },\n    data: {\n        isArray: false,\n        rowArray: [],\n    },\n});\n"
  },
  {
    "path": "lib/skeleton/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "lib/skeleton/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ loading }}\"\n  class=\"custom-class {{ utils.bem('skeleton', [{animate}]) }}\"\n>\n  <view\n    wx:if=\"{{ avatar }}\"\n    class=\"avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}\"\n    style=\"{{ 'width:' + avatarSize + ';height:' + avatarSize }}\"\n  />\n  <view class=\"{{ utils.bem('skeleton__content')}}\">\n    <view\n      wx:if=\"{{ title }}\"\n      class=\"title-class {{ utils.bem('skeleton__title') }}\"\n      style=\"{{ 'width:' + titleWidth }}\"\n    />\n    <view\n      wx:for=\"{{ rowArray }}\"\n      wx:key=\"index\"\n      wx:for-index=\"index\"\n      class=\"row-class {{ utils.bem('skeleton__row') }}\"\n      style=\"{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}\"\n    />\n  </view>\n</view>\n<view wx:else class=\"{{ utils.bem('skeleton__content')}}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/skeleton/index.wxss",
    "content": "@import '../common/index.wxss';.van-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.van-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,#f2f3f5);flex-shrink:0;margin-right:var(--padding-md,16px)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{background-color:var(--skeleton-row-background-color,#f2f3f5);height:var(--skeleton-row-height,16px)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{animation:van-skeleton-blink 1.2s ease-in-out infinite}@keyframes van-skeleton-blink{50%{opacity:.6}}"
  },
  {
    "path": "lib/slider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/slider/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar touch_1 = require(\"../mixins/touch\");\nvar version_1 = require(\"../common/version\");\nvar utils_1 = require(\"../common/utils\");\nvar DRAG_STATUS = {\n    START: 'start',\n    MOVING: 'moving',\n    END: 'end',\n};\n(0, component_1.VantComponent)({\n    mixins: [touch_1.touch],\n    props: {\n        range: Boolean,\n        disabled: Boolean,\n        useButtonSlot: Boolean,\n        activeColor: String,\n        inactiveColor: String,\n        max: {\n            type: Number,\n            value: 100,\n        },\n        min: {\n            type: Number,\n            value: 0,\n        },\n        step: {\n            type: Number,\n            value: 1,\n        },\n        value: {\n            type: null,\n            value: 0,\n            observer: function (val) {\n                if (val !== this.value) {\n                    this.updateValue(val);\n                }\n            },\n        },\n        vertical: Boolean,\n        barHeight: null,\n    },\n    created: function () {\n        this.updateValue(this.data.value);\n    },\n    methods: {\n        onTouchStart: function (event) {\n            var _this = this;\n            if (this.data.disabled)\n                return;\n            var index = event.currentTarget.dataset.index;\n            if (typeof index === 'number') {\n                this.buttonIndex = index;\n            }\n            this.touchStart(event);\n            this.startValue = this.format(this.value);\n            this.newValue = this.value;\n            if (this.isRange(this.newValue)) {\n                this.startValue = this.newValue.map(function (val) { return _this.format(val); });\n            }\n            else {\n                this.startValue = this.format(this.newValue);\n            }\n            this.dragStatus = DRAG_STATUS.START;\n        },\n        onTouchMove: function (event) {\n            var _this = this;\n            if (this.data.disabled)\n                return;\n            if (this.dragStatus === DRAG_STATUS.START) {\n                this.$emit('drag-start');\n            }\n            this.touchMove(event);\n            this.dragStatus = DRAG_STATUS.MOVING;\n            (0, utils_1.getRect)(this, '.van-slider').then(function (rect) {\n                var vertical = _this.data.vertical;\n                var delta = vertical ? _this.deltaY : _this.deltaX;\n                var total = vertical ? rect.height : rect.width;\n                var diff = (delta / total) * _this.getRange();\n                if (_this.isRange(_this.startValue)) {\n                    _this.newValue[_this.buttonIndex] =\n                        _this.startValue[_this.buttonIndex] + diff;\n                }\n                else {\n                    _this.newValue = _this.startValue + diff;\n                }\n                _this.updateValue(_this.newValue, false, true);\n            });\n        },\n        onTouchEnd: function () {\n            var _this = this;\n            if (this.data.disabled)\n                return;\n            if (this.dragStatus === DRAG_STATUS.MOVING) {\n                this.dragStatus = DRAG_STATUS.END;\n                (0, utils_1.nextTick)(function () {\n                    _this.updateValue(_this.newValue, true);\n                    _this.$emit('drag-end');\n                });\n            }\n        },\n        onClick: function (event) {\n            var _this = this;\n            if (this.data.disabled)\n                return;\n            var min = this.data.min;\n            (0, utils_1.getRect)(this, '.van-slider').then(function (rect) {\n                var vertical = _this.data.vertical;\n                var touch = event.touches[0];\n                var delta = vertical\n                    ? touch.clientY - rect.top\n                    : touch.clientX - rect.left;\n                var total = vertical ? rect.height : rect.width;\n                var value = Number(min) + (delta / total) * _this.getRange();\n                if (_this.isRange(_this.value)) {\n                    var _a = _this.value, left = _a[0], right = _a[1];\n                    var middle = (left + right) / 2;\n                    if (value <= middle) {\n                        _this.updateValue([value, right], true);\n                    }\n                    else {\n                        _this.updateValue([left, value], true);\n                    }\n                }\n                else {\n                    _this.updateValue(value, true);\n                }\n            });\n        },\n        isRange: function (val) {\n            var range = this.data.range;\n            return range && Array.isArray(val);\n        },\n        handleOverlap: function (value) {\n            if (value[0] > value[1]) {\n                return value.slice(0).reverse();\n            }\n            return value;\n        },\n        updateValue: function (value, end, drag) {\n            var _this = this;\n            if (this.isRange(value)) {\n                value = this.handleOverlap(value).map(function (val) { return _this.format(val); });\n            }\n            else {\n                value = this.format(value);\n            }\n            this.value = value;\n            var vertical = this.data.vertical;\n            var mainAxis = vertical ? 'height' : 'width';\n            this.setData({\n                wrapperStyle: \"\\n          background: \".concat(this.data.inactiveColor || '', \";\\n          \").concat(vertical ? 'width' : 'height', \": \").concat((0, utils_1.addUnit)(this.data.barHeight) || '', \";\\n        \"),\n                barStyle: \"\\n          \".concat(mainAxis, \": \").concat(this.calcMainAxis(), \";\\n          left: \").concat(vertical ? 0 : this.calcOffset(), \";\\n          top: \").concat(vertical ? this.calcOffset() : 0, \";\\n          \").concat(drag ? 'transition: none;' : '', \"\\n        \"),\n            });\n            if (drag) {\n                this.$emit('drag', { value: value });\n            }\n            if (end) {\n                this.$emit('change', value);\n            }\n            if ((drag || end) && (0, version_1.canIUseModel)()) {\n                this.setData({ value: value });\n            }\n        },\n        getScope: function () {\n            return Number(this.data.max) - Number(this.data.min);\n        },\n        getRange: function () {\n            var _a = this.data, max = _a.max, min = _a.min;\n            return max - min;\n        },\n        getOffsetWidth: function (current, min) {\n            var scope = this.getScope();\n            // 避免最小值小于最小step时出现负数情况\n            return \"\".concat(Math.max(((current - min) * 100) / scope, 0), \"%\");\n        },\n        // 计算选中条的长度百分比\n        calcMainAxis: function () {\n            var value = this.value;\n            var min = this.data.min;\n            if (this.isRange(value)) {\n                return this.getOffsetWidth(value[1], value[0]);\n            }\n            return this.getOffsetWidth(value, Number(min));\n        },\n        // 计算选中条的开始位置的偏移量\n        calcOffset: function () {\n            var value = this.value;\n            var min = this.data.min;\n            var scope = this.getScope();\n            if (this.isRange(value)) {\n                return \"\".concat(((value[0] - Number(min)) * 100) / scope, \"%\");\n            }\n            return '0%';\n        },\n        format: function (value) {\n            var min = +this.data.min;\n            var max = +this.data.max;\n            var step = +this.data.step;\n            value = (0, utils_1.clamp)(value, min, max);\n            var diff = Math.round((value - min) / step) * step;\n            return (0, utils_1.addNumber)(min, diff);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/slider/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/slider/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"../wxs/style.wxs\" module=\"style\" />\n\n<view\n  class=\"custom-class {{ utils.bem('slider', { disabled, vertical }) }}\"\n  style=\"{{ wrapperStyle }}\"\n  bind:tap=\"onClick\"\n>\n  <view\n    class=\"{{ utils.bem('slider__bar') }}\"\n    style=\"{{ barStyle }}; {{ style({ backgroundColor: activeColor }) }}\"\n  >\n    <view\n      wx:if=\"{{ range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper-left') }}\"\n      data-index=\"{{ 0 }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"left-button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n    <view\n      wx:if=\"{{ range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper-right') }}\"\n      data-index=\"{{ 1 }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"right-button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n\n    <view\n      wx:if=\"{{ !range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper') }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/slider/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction barStyle(barHeight, activeColor) {\n  return style({\n    height: addUnit(barHeight),\n    background: activeColor,\n  });\n}\n\nmodule.exports = {\n  barStyle: barStyle,\n};\n"
  },
  {
    "path": "lib/slider/index.wxss",
    "content": "@import '../common/index.wxss';.van-slider{background-color:var(--slider-inactive-background-color,#ebedf0);border-radius:999px;height:var(--slider-bar-height,2px);position:relative}.van-slider:before{bottom:calc(var(--padding-xs, 8px)*-1);content:\"\";left:0;position:absolute;right:0;top:calc(var(--padding-xs, 8px)*-1)}.van-slider__bar{background-color:var(--slider-active-background-color,#1989fa);border-radius:inherit;height:100%;position:relative;transition:all .2s;width:100%}.van-slider__button{background-color:var(--slider-button-background-color,#fff);border-radius:var(--slider-button-border-radius,50%);box-shadow:var(--slider-button-box-shadow,0 1px 2px rgba(0,0,0,.5));height:var(--slider-button-height,24px);width:var(--slider-button-width,24px)}.van-slider__button-wrapper,.van-slider__button-wrapper-right{position:absolute;right:0;top:50%;transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper-left{left:0;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.van-slider--disabled{opacity:var(--slider-disabled-opacity,.5)}.van-slider--vertical{display:inline-block;height:100%;width:var(--slider-bar-height,2px)}.van-slider--vertical .van-slider__button-wrapper,.van-slider--vertical .van-slider__button-wrapper-right{bottom:0;right:50%;top:auto;transform:translate3d(50%,50%,0)}.van-slider--vertical .van-slider__button-wrapper-left{left:auto;right:50%;top:0;transform:translate3d(50%,-50%,0)}.van-slider--vertical:before{bottom:0;left:-8px;right:-8px;top:0}"
  },
  {
    "path": "lib/stepper/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/stepper/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar validator_1 = require(\"../common/validator\");\nvar LONG_PRESS_START_TIME = 600;\nvar LONG_PRESS_INTERVAL = 200;\n// add num and avoid float number\nfunction add(num1, num2) {\n    var cardinal = Math.pow(10, 10);\n    return Math.round((num1 + num2) * cardinal) / cardinal;\n}\nfunction equal(value1, value2) {\n    return String(value1) === String(value2);\n}\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['input-class', 'plus-class', 'minus-class'],\n    props: {\n        value: {\n            type: null,\n        },\n        integer: {\n            type: Boolean,\n            observer: 'check',\n        },\n        disabled: Boolean,\n        inputWidth: String,\n        buttonSize: String,\n        asyncChange: Boolean,\n        disableInput: Boolean,\n        decimalLength: {\n            type: Number,\n            value: null,\n            observer: 'check',\n        },\n        min: {\n            type: null,\n            value: 1,\n            observer: 'check',\n        },\n        max: {\n            type: null,\n            value: Number.MAX_SAFE_INTEGER,\n            observer: 'check',\n        },\n        step: {\n            type: null,\n            value: 1,\n        },\n        showPlus: {\n            type: Boolean,\n            value: true,\n        },\n        showMinus: {\n            type: Boolean,\n            value: true,\n        },\n        disablePlus: Boolean,\n        disableMinus: Boolean,\n        longPress: {\n            type: Boolean,\n            value: true,\n        },\n        theme: String,\n        alwaysEmbed: Boolean,\n    },\n    data: {\n        currentValue: '',\n    },\n    watch: {\n        value: function () {\n            this.observeValue();\n        },\n    },\n    created: function () {\n        this.setData({\n            currentValue: this.format(this.data.value).newValue,\n        });\n    },\n    methods: {\n        observeValue: function () {\n            var value = this.data.value;\n            this.setData({ currentValue: this.format(value).newValue });\n        },\n        check: function () {\n            var newValue = this.format(this.data.currentValue).newValue;\n            if (!equal(newValue, this.data.currentValue)) {\n                this.setData({ currentValue: newValue });\n            }\n        },\n        isDisabled: function (type) {\n            var _a = this.data, disabled = _a.disabled, disablePlus = _a.disablePlus, disableMinus = _a.disableMinus, currentValue = _a.currentValue, max = _a.max, min = _a.min;\n            if (type === 'plus') {\n                return disabled || disablePlus || +currentValue >= +max;\n            }\n            return disabled || disableMinus || +currentValue <= +min;\n        },\n        onFocus: function (event) {\n            this.$emit('focus', event.detail);\n        },\n        onBlur: function (event) {\n            var data = this.format(event.detail.value);\n            this.setData({ currentValue: data.newValue });\n            this.emitChange(data);\n            this.$emit('blur', __assign(__assign({}, event.detail), { value: +data.newValue }));\n        },\n        // filter illegal characters\n        filter: function (value) {\n            value = String(value).replace(/[^0-9.-]/g, '');\n            if (this.data.integer && value.indexOf('.') !== -1) {\n                value = value.split('.')[0];\n            }\n            return value;\n        },\n        format: function (value) {\n            // filter illegal characters and format integer\n            var safeValue = this.filter(value);\n            // format range\n            var rangeValue = Math.max(Math.min(this.data.max, +safeValue), this.data.min);\n            // format decimal\n            var newValue = (0, validator_1.isDef)(this.data.decimalLength)\n                ? rangeValue.toFixed(this.data.decimalLength)\n                : String(rangeValue);\n            return { value: value, newValue: newValue };\n        },\n        onInput: function (event) {\n            var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;\n            // allow input to be empty\n            if (value === '') {\n                return;\n            }\n            var formatted = this.format(value);\n            this.emitChange(formatted);\n        },\n        emitChange: function (data) {\n            var value = data.value, newValue = data.newValue;\n            if (!this.data.asyncChange) {\n                // fix when input 11. parsed to 11, unable to enter decimal\n                this.setData({ currentValue: +value === +newValue ? value : newValue });\n            }\n            this.$emit('change', +newValue);\n        },\n        onChange: function () {\n            var type = this.type;\n            if (this.isDisabled(type)) {\n                this.$emit('overlimit', type);\n                return;\n            }\n            var diff = type === 'minus' ? -this.data.step : +this.data.step;\n            var value = this.format(String(add(+this.data.currentValue, diff)));\n            this.emitChange(value);\n            this.$emit(type);\n        },\n        longPressStep: function () {\n            var _this = this;\n            this.longPressTimer = setTimeout(function () {\n                _this.onChange();\n                _this.longPressStep();\n            }, LONG_PRESS_INTERVAL);\n        },\n        onTap: function (event) {\n            var type = event.currentTarget.dataset.type;\n            this.type = type;\n            this.onChange();\n        },\n        onTouchStart: function (event) {\n            var _this = this;\n            if (!this.data.longPress) {\n                return;\n            }\n            clearTimeout(this.longPressTimer);\n            var type = event.currentTarget.dataset.type;\n            this.type = type;\n            this.isLongPress = false;\n            this.longPressTimer = setTimeout(function () {\n                _this.isLongPress = true;\n                _this.onChange();\n                _this.longPressStep();\n            }, LONG_PRESS_START_TIME);\n        },\n        onTouchEnd: function () {\n            if (!this.data.longPress) {\n                return;\n            }\n            clearTimeout(this.longPressTimer);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/stepper/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/stepper/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('stepper', [theme]) }} custom-class\">\n  <view\n    wx:if=\"{{ showMinus }}\"\n    data-type=\"minus\"\n    style=\"{{ computed.buttonStyle({ buttonSize }) }}\"\n    class=\"minus-class {{ utils.bem('stepper__minus', { disabled: disabled || disableMinus || currentValue <= min }) }}\"\n    hover-class=\"van-stepper__minus--hover\"\n    hover-stay-time=\"70\"\n    bind:tap=\"onTap\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchend=\"onTouchEnd\"\n  >\n    <slot name=\"minus\" />\n  </view>\n  <input\n    type=\"{{ integer ? 'number' : 'digit' }}\"\n    class=\"input-class {{ utils.bem('stepper__input', { disabled: disabled || disableInput }) }}\"\n    style=\"{{ computed.inputStyle({ buttonSize, inputWidth }) }}\"\n    value=\"{{ currentValue }}\"\n    focus=\"{{ focus }}\"\n    disabled=\"{{ disabled || disableInput }}\"\n    always-embed=\"{{ alwaysEmbed }}\"\n    bindinput=\"onInput\"\n    bind:focus=\"onFocus\"\n    bind:blur=\"onBlur\"\n  />\n  <view\n    wx:if=\"{{ showPlus }}\"\n    data-type=\"plus\"\n    style=\"{{ computed.buttonStyle({ buttonSize }) }}\"\n    class=\"plus-class {{ utils.bem('stepper__plus', { disabled: disabled || disablePlus || currentValue >= max }) }}\"\n    hover-class=\"van-stepper__plus--hover\"\n    hover-stay-time=\"70\"\n    bind:tap=\"onTap\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchend=\"onTouchEnd\"\n  >\n    <slot name=\"plus\" />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/stepper/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction buttonStyle(data) {\n  return style({\n    width: addUnit(data.buttonSize),\n    height: addUnit(data.buttonSize),\n  });\n}\n\nfunction inputStyle(data) {\n  return style({\n    width: addUnit(data.inputWidth),\n    height: addUnit(data.buttonSize),\n  });\n}\n\nmodule.exports = {\n  buttonStyle: buttonStyle,\n  inputStyle: inputStyle,\n};\n"
  },
  {
    "path": "lib/stepper/index.wxss",
    "content": "@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{background-color:var(--stepper-background-color,#f2f3f5);border:0;box-sizing:border-box;color:var(--stepper-button-icon-color,#323233);display:inline-block;height:var(--stepper-input-height,28px);margin:1px;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,28px)}.van-stepper__minus:before,.van-stepper__plus:before{height:1px;width:9px}.van-stepper__minus:after,.van-stepper__plus:after{height:9px;width:1px}.van-stepper__minus:empty.van-stepper__minus:after,.van-stepper__minus:empty.van-stepper__minus:before,.van-stepper__minus:empty.van-stepper__plus:after,.van-stepper__minus:empty.van-stepper__plus:before,.van-stepper__plus:empty.van-stepper__minus:after,.van-stepper__plus:empty.van-stepper__minus:before,.van-stepper__plus:empty.van-stepper__plus:after,.van-stepper__plus:empty.van-stepper__plus:before{background-color:currentColor;bottom:0;content:\"\";left:0;margin:auto;position:absolute;right:0;top:0}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:var(--stepper-button-disabled-icon-color,#c8c9cc)}.van-stepper__minus--disabled,.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:var(--stepper-button-disabled-color,#f7f8fa)}.van-stepper__minus{border-radius:var(--stepper-border-radius,var(--stepper-border-radius,4px)) 0 0 var(--stepper-border-radius,var(--stepper-border-radius,4px))}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 var(--stepper-border-radius,var(--stepper-border-radius,4px)) var(--stepper-border-radius,var(--stepper-border-radius,4px)) 0}.van-stepper--round .van-stepper__input{background-color:initial!important}.van-stepper--round .van-stepper__minus,.van-stepper--round .van-stepper__plus{border-radius:100%}.van-stepper--round .van-stepper__minus:active,.van-stepper--round .van-stepper__plus:active{opacity:.7}.van-stepper--round .van-stepper__minus--disabled,.van-stepper--round .van-stepper__minus--disabled:active,.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__plus--disabled:active{opacity:.3}.van-stepper--round .van-stepper__plus{background-color:#ee0a24;color:#fff}.van-stepper--round .van-stepper__minus{background-color:#fff;border:1px solid #ee0a24;color:#ee0a24}.van-stepper__input{-webkit-appearance:none;background-color:var(--stepper-background-color,#f2f3f5);border:0;border-radius:0;border-width:1px 0;box-sizing:border-box;color:var(--stepper-input-text-color,#323233);display:inline-block;font-size:var(--stepper-input-font-size,14px);height:var(--stepper-input-height,28px);margin:1px;min-height:0;padding:1px;text-align:center;vertical-align:middle;width:var(--stepper-input-width,32px)}.van-stepper__input--disabled{background-color:var(--stepper-input-disabled-background-color,#f2f3f5);color:var(--stepper-input-disabled-text-color,#c8c9cc)}"
  },
  {
    "path": "lib/steps/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/steps/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar color_1 = require(\"../common/color\");\n(0, component_1.VantComponent)({\n    classes: ['desc-class'],\n    props: {\n        icon: String,\n        steps: Array,\n        active: Number,\n        direction: {\n            type: String,\n            value: 'horizontal',\n        },\n        activeColor: {\n            type: String,\n            value: color_1.GREEN,\n        },\n        inactiveColor: {\n            type: String,\n            value: color_1.GRAY_DARK,\n        },\n        activeIcon: {\n            type: String,\n            value: 'checked',\n        },\n        inactiveIcon: String,\n    },\n    methods: {\n        onClick: function (event) {\n            var index = event.currentTarget.dataset.index;\n            this.$emit('click-step', index);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/steps/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/steps/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class {{ utils.bem('steps', [direction]) }}\">\n  <view class=\"van-step__wrapper\">\n    <view\n      wx:for=\"{{ steps }}\"\n      wx:key=\"index\"\n      bindtap=\"onClick\"\n      data-index=\"{{ index }}\"\n      class=\"{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline\"\n      style=\"{{ status(index, active) === 'inactive' ? 'color: ' + inactiveColor: '' }}\"\n    >\n      <view class=\"van-step__title\" style=\"{{ index === active ? 'color: ' + activeColor : '' }}\">\n        <view>{{ item.text }}</view>\n        <view class=\"desc-class\">{{ item.desc }}</view>\n      </view>\n      <view class=\"van-step__circle-container\">\n        <block wx:if=\"{{ index !== active }}\">\n          <van-icon\n            wx:if=\"{{ item.inactiveIcon || inactiveIcon }}\"\n            color=\"{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}\"\n            name=\"{{ item.inactiveIcon || inactiveIcon }}\"\n            class=\"van-step__icon\"\n          />\n          <view\n            wx:else\n            class=\"van-step__circle\"\n            style=\"{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}\"\n          />\n        </block>\n\n        <van-icon wx:else name=\"{{ item.activeIcon || activeIcon }}\" color=\"{{ activeColor }}\" class=\"van-step__icon\" />\n      </view>\n      <view\n        wx:if=\"{{ index !== steps.length - 1 }}\"\n        class=\"van-step__line\" style=\"{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}\"\n      />\n    </view>\n  </view>\n</view>\n\n<wxs module=\"status\">\nfunction get(index, active) {\n  if (index < active) {\n    return 'finish';\n  } else if (index === active) {\n    return 'process';\n  }\n\n  return 'inactive';\n}\n\nmodule.exports = get;\n</wxs>\n"
  },
  {
    "path": "lib/steps/index.wxss",
    "content": "@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{background-color:var(--step-circle-color,#969799);border-radius:50%;height:var(--step-circle-size,5px);width:var(--step-circle-size,5px)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{bottom:0;position:absolute;right:0;top:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{padding:0 0 0 8px;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0 var(--padding-xs,8px);position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:1px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:\"\";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{background-color:var(--steps-background-color,#fff);font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1}"
  },
  {
    "path": "lib/sticky/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/sticky/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"../common/utils\");\nvar component_1 = require(\"../common/component\");\nvar validator_1 = require(\"../common/validator\");\nvar page_scroll_1 = require(\"../mixins/page-scroll\");\nvar ROOT_ELEMENT = '.van-sticky';\n(0, component_1.VantComponent)({\n    props: {\n        zIndex: {\n            type: Number,\n            value: 99,\n        },\n        offsetTop: {\n            type: Number,\n            value: 0,\n            observer: 'onScroll',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'onScroll',\n        },\n        container: {\n            type: null,\n            observer: 'onScroll',\n        },\n        scrollTop: {\n            type: null,\n            observer: function (val) {\n                this.onScroll({ scrollTop: val });\n            },\n        },\n    },\n    mixins: [\n        (0, page_scroll_1.pageScrollMixin)(function (event) {\n            if (this.data.scrollTop != null) {\n                return;\n            }\n            this.onScroll(event);\n        }),\n    ],\n    data: {\n        height: 0,\n        fixed: false,\n        transform: 0,\n    },\n    mounted: function () {\n        this.onScroll();\n    },\n    methods: {\n        onScroll: function (_a) {\n            var _this = this;\n            var _b = _a === void 0 ? {} : _a, scrollTop = _b.scrollTop;\n            var _c = this.data, container = _c.container, offsetTop = _c.offsetTop, disabled = _c.disabled;\n            if (disabled) {\n                this.setDataAfterDiff({\n                    fixed: false,\n                    transform: 0,\n                });\n                return;\n            }\n            this.scrollTop = scrollTop || this.scrollTop;\n            if (typeof container === 'function') {\n                Promise.all([(0, utils_1.getRect)(this, ROOT_ELEMENT), this.getContainerRect()])\n                    .then(function (_a) {\n                    var root = _a[0], container = _a[1];\n                    if (offsetTop + root.height > container.height + container.top) {\n                        _this.setDataAfterDiff({\n                            fixed: false,\n                            transform: container.height - root.height,\n                        });\n                    }\n                    else if (offsetTop >= root.top) {\n                        _this.setDataAfterDiff({\n                            fixed: true,\n                            height: root.height,\n                            transform: 0,\n                        });\n                    }\n                    else {\n                        _this.setDataAfterDiff({ fixed: false, transform: 0 });\n                    }\n                })\n                    .catch(function () { });\n                return;\n            }\n            (0, utils_1.getRect)(this, ROOT_ELEMENT).then(function (root) {\n                if (!(0, validator_1.isDef)(root) || (!root.width && !root.height)) {\n                    return;\n                }\n                if (offsetTop >= root.top) {\n                    _this.setDataAfterDiff({ fixed: true, height: root.height });\n                    _this.transform = 0;\n                }\n                else {\n                    _this.setDataAfterDiff({ fixed: false });\n                }\n            });\n        },\n        setDataAfterDiff: function (data) {\n            var _this = this;\n            wx.nextTick(function () {\n                var diff = Object.keys(data).reduce(function (prev, key) {\n                    if (data[key] !== _this.data[key]) {\n                        prev[key] = data[key];\n                    }\n                    return prev;\n                }, {});\n                if (Object.keys(diff).length > 0) {\n                    _this.setData(diff);\n                }\n                _this.$emit('scroll', {\n                    scrollTop: _this.scrollTop,\n                    isFixed: data.fixed || _this.data.fixed,\n                });\n            });\n        },\n        getContainerRect: function () {\n            var nodesRef = this.data.container();\n            if (!nodesRef) {\n                return Promise.reject(new Error('not found container'));\n            }\n            return new Promise(function (resolve) { return nodesRef.boundingClientRect(resolve).exec(); });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/sticky/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/sticky/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class van-sticky\" style=\"{{ computed.containerStyle({ fixed, height, zIndex }) }}\">\n  <view class=\"{{ utils.bem('sticky-wrap', { fixed }) }}\" style=\"{{ computed.wrapStyle({ fixed, offsetTop, transform, zIndex }) }}\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/sticky/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction wrapStyle(data) {\n  return style({\n    transform: data.transform\n      ? 'translate3d(0, ' + data.transform + 'px, 0)'\n      : '',\n    top: data.fixed ? addUnit(data.offsetTop) : '',\n    'z-index': data.zIndex,\n  });\n}\n\nfunction containerStyle(data) {\n  return style({\n    height: data.fixed ? addUnit(data.height) : '',\n    'z-index': data.zIndex,\n  });\n}\n\nmodule.exports = {\n  wrapStyle: wrapStyle,\n  containerStyle: containerStyle,\n};\n"
  },
  {
    "path": "lib/sticky/index.wxss",
    "content": "@import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{left:0;position:fixed;right:0}"
  },
  {
    "path": "lib/submit-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/submit-bar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['bar-class', 'price-class', 'button-class'],\n    props: {\n        tip: {\n            type: null,\n            observer: 'updateTip',\n        },\n        tipIcon: String,\n        type: Number,\n        price: {\n            type: null,\n            observer: 'updatePrice',\n        },\n        label: String,\n        loading: Boolean,\n        disabled: Boolean,\n        buttonText: String,\n        currency: {\n            type: String,\n            value: '¥',\n        },\n        buttonType: {\n            type: String,\n            value: 'danger',\n        },\n        decimalLength: {\n            type: Number,\n            value: 2,\n            observer: 'updatePrice',\n        },\n        suffixLabel: String,\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    methods: {\n        updatePrice: function () {\n            var _a = this.data, price = _a.price, decimalLength = _a.decimalLength;\n            var priceStrArr = typeof price === 'number' &&\n                (price / 100).toFixed(decimalLength).split('.');\n            this.setData({\n                hasPrice: typeof price === 'number',\n                integerStr: priceStrArr && priceStrArr[0],\n                decimalStr: decimalLength && priceStrArr ? \".\".concat(priceStrArr[1]) : '',\n            });\n        },\n        updateTip: function () {\n            this.setData({ hasTip: typeof this.data.tip === 'string' });\n        },\n        onSubmit: function (event) {\n            this.$emit('submit', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/submit-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../button/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/submit-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-submit-bar custom-class\">\n  <slot name=\"top\" />\n\n  <view class=\"van-submit-bar__tip\">\n    <van-icon\n      wx:if=\"{{ tipIcon }}\"\n      size=\"12px\"\n      name=\"{{ tipIcon }}\"\n      custom-class=\"van-submit-bar__tip-icon\"\n    />\n    <view wx:if=\"{{ hasTip }}\" class=\"van-submit-bar__tip-text\">\n      {{ tip }}\n    </view>\n    <slot name=\"tip\" />\n  </view>\n\n  <view class=\"bar-class van-submit-bar__bar\">\n    <slot />\n    <view wx:if=\"{{ hasPrice }}\" class=\"van-submit-bar__text\">\n      <text>{{ label || '合计：' }}</text>\n      <text class=\"van-submit-bar__price price-class\">\n        <text class=\"van-submit-bar__currency\">{{ currency }} </text>\n        <text class=\"van-submit-bar__price-integer\">{{ integerStr }}</text><text>{{decimalStr}}</text>\n      </text>\n      <text class=\"van-submit-bar__suffix-label\">{{ suffixLabel }}</text>\n    </view>\n    <van-button\n      round\n      type=\"{{ buttonType }}\"\n      loading=\"{{ loading }}\"\n      disabled=\"{{ disabled }}\"\n      class=\"van-submit-bar__button\"\n      custom-class=\"button-class\"\n      custom-style=\"width: 100%;\"\n      bind:click=\"onSubmit\"\n    >\n      {{ loading ? '' : buttonText }}\n    </van-button>\n  </view>\n\n  <view wx:if=\"{{ safeAreaInsetBottom }}\" class=\"van-submit-bar__safe\" />\n</view>\n"
  },
  {
    "path": "lib/submit-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-submit-bar{background-color:var(--submit-bar-background-color,#fff);bottom:0;left:0;position:fixed;-webkit-user-select:none;user-select:none;width:100%;z-index:var(--submit-bar-z-index,100)}.van-submit-bar__tip{background-color:var(--submit-bar-tip-background-color,#fff7cc);color:var(--submit-bar-tip-color,#f56723);font-size:var(--submit-bar-tip-font-size,12px);line-height:var(--submit-bar-tip-line-height,1.5);padding:var(--submit-bar-tip-padding,10px)}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{margin-right:4px;vertical-align:middle}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{align-items:center;background-color:var(--submit-bar-background-color,#fff);display:flex;font-size:var(--submit-bar-text-font-size,14px);height:var(--submit-bar-height,50px);justify-content:flex-end;padding:var(--submit-bar-padding,0 16px)}.van-submit-bar__safe{height:constant(safe-area-inset-bottom);height:env(safe-area-inset-bottom)}.van-submit-bar__text{color:var(--submit-bar-text-color,#323233);flex:1;font-weight:var(--font-weight-bold,500);padding-right:var(--padding-sm,12px);text-align:right}.van-submit-bar__price{color:var(--submit-bar-price-color,#ee0a24);font-size:var(--submit-bar-price-font-size,12px);font-weight:var(--font-weight-bold,500)}.van-submit-bar__price-integer{font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:20px}.van-submit-bar__currency{font-size:var(--submit-bar-currency-font-size,12px)}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{--button-default-height:var(--submit-bar-button-height,40px)!important;--button-line-height:var(--submit-bar-button-height,40px)!important;font-weight:var(--font-weight-bold,500);width:var(--submit-bar-button-width,110px)}"
  },
  {
    "path": "lib/swipe-cell/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/swipe-cell/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar touch_1 = require(\"../mixins/touch\");\nvar utils_1 = require(\"../common/utils\");\nvar THRESHOLD = 0.3;\nvar ARRAY = [];\n(0, component_1.VantComponent)({\n    props: {\n        disabled: Boolean,\n        leftWidth: {\n            type: Number,\n            value: 0,\n            observer: function (leftWidth) {\n                if (leftWidth === void 0) { leftWidth = 0; }\n                if (this.offset > 0) {\n                    this.swipeMove(leftWidth);\n                }\n            },\n        },\n        rightWidth: {\n            type: Number,\n            value: 0,\n            observer: function (rightWidth) {\n                if (rightWidth === void 0) { rightWidth = 0; }\n                if (this.offset < 0) {\n                    this.swipeMove(-rightWidth);\n                }\n            },\n        },\n        asyncClose: Boolean,\n        name: {\n            type: null,\n            value: '',\n        },\n    },\n    mixins: [touch_1.touch],\n    data: {\n        catchMove: false,\n        wrapperStyle: '',\n    },\n    created: function () {\n        this.offset = 0;\n        ARRAY.push(this);\n    },\n    destroyed: function () {\n        var _this = this;\n        ARRAY = ARRAY.filter(function (item) { return item !== _this; });\n    },\n    methods: {\n        open: function (position) {\n            var _a = this.data, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth;\n            var offset = position === 'left' ? leftWidth : -rightWidth;\n            this.swipeMove(offset);\n            this.$emit('open', {\n                position: position,\n                name: this.data.name,\n            });\n        },\n        close: function () {\n            this.swipeMove(0);\n        },\n        swipeMove: function (offset) {\n            if (offset === void 0) { offset = 0; }\n            this.offset = (0, utils_1.range)(offset, -this.data.rightWidth, this.data.leftWidth);\n            var transform = \"translate3d(\".concat(this.offset, \"px, 0, 0)\");\n            var transition = this.dragging\n                ? 'none'\n                : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';\n            this.setData({\n                wrapperStyle: \"\\n        -webkit-transform: \".concat(transform, \";\\n        -webkit-transition: \").concat(transition, \";\\n        transform: \").concat(transform, \";\\n        transition: \").concat(transition, \";\\n      \"),\n            });\n        },\n        swipeLeaveTransition: function () {\n            var _a = this.data, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth;\n            var offset = this.offset;\n            if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) {\n                this.open('right');\n            }\n            else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) {\n                this.open('left');\n            }\n            else {\n                this.swipeMove(0);\n            }\n            this.setData({ catchMove: false });\n        },\n        startDrag: function (event) {\n            if (this.data.disabled) {\n                return;\n            }\n            this.startOffset = this.offset;\n            this.touchStart(event);\n        },\n        noop: function () { },\n        onDrag: function (event) {\n            var _this = this;\n            if (this.data.disabled) {\n                return;\n            }\n            this.touchMove(event);\n            if (this.direction !== 'horizontal') {\n                return;\n            }\n            this.dragging = true;\n            ARRAY.filter(function (item) { return item !== _this && item.offset !== 0; }).forEach(function (item) { return item.close(); });\n            this.setData({ catchMove: true });\n            this.swipeMove(this.startOffset + this.deltaX);\n        },\n        endDrag: function () {\n            if (this.data.disabled) {\n                return;\n            }\n            this.dragging = false;\n            this.swipeLeaveTransition();\n        },\n        onClick: function (event) {\n            var _a = event.currentTarget.dataset.key, position = _a === void 0 ? 'outside' : _a;\n            this.$emit('click', position);\n            if (!this.offset) {\n                return;\n            }\n            if (this.data.asyncClose) {\n                this.$emit('close', {\n                    position: position,\n                    instance: this,\n                    name: this.data.name,\n                });\n            }\n            else {\n                this.swipeMove(0);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/swipe-cell/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/swipe-cell/index.wxml",
    "content": "<view\n  class=\"van-swipe-cell custom-class\"\n  data-key=\"cell\"\n  catchtap=\"onClick\"\n  bindtouchstart=\"startDrag\"\n  catchtouchmove=\"{{ catchMove ? 'noop' : '' }}\"\n  capture-bind:touchmove=\"onDrag\"\n  bindtouchend=\"endDrag\"\n  bindtouchcancel=\"endDrag\"\n>\n  <view style=\"{{ wrapperStyle }}\">\n    <view wx:if=\"{{ leftWidth }}\" class=\"van-swipe-cell__left\" data-key=\"left\" catch:tap=\"onClick\">\n      <slot name=\"left\" />\n    </view>\n    <slot />\n    <view wx:if=\"{{ rightWidth }}\" class=\"van-swipe-cell__right\" data-key=\"right\" catch:tap=\"onClick\">\n      <slot name=\"right\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/swipe-cell/index.wxss",
    "content": "@import '../common/index.wxss';.van-swipe-cell{overflow:hidden;position:relative}.van-swipe-cell__left,.van-swipe-cell__right{height:100%;position:absolute;top:0}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}"
  },
  {
    "path": "lib/switch/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/switch/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['node-class'],\n    props: {\n        checked: null,\n        loading: Boolean,\n        disabled: Boolean,\n        activeColor: String,\n        inactiveColor: String,\n        size: {\n            type: String,\n            value: '30',\n        },\n        activeValue: {\n            type: null,\n            value: true,\n        },\n        inactiveValue: {\n            type: null,\n            value: false,\n        },\n    },\n    methods: {\n        onClick: function () {\n            var _a = this.data, activeValue = _a.activeValue, inactiveValue = _a.inactiveValue, disabled = _a.disabled, loading = _a.loading;\n            if (disabled || loading) {\n                return;\n            }\n            var checked = this.data.checked === activeValue;\n            var value = checked ? inactiveValue : activeValue;\n            this.$emit('input', value);\n            this.$emit('change', value);\n        },\n    },\n});\n"
  },
  {
    "path": "lib/switch/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "lib/switch/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class\"\n  style=\"{{ computed.rootStyle({ size, checked, activeColor, inactiveColor, activeValue }) }}\"\n  bind:tap=\"onClick\"\n>\n  <view class=\"van-switch__node node-class\">\n    <van-loading\n      wx:if=\"{{ loading }}\"\n      color=\"{{ computed.loadingColor({ checked, activeColor, inactiveColor, activeValue }) }}\"\n      custom-class=\"van-switch__loading\"\n    />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/switch/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  var currentColor = data.checked === data.activeValue ? data.activeColor : data.inactiveColor;\n\n  return style({\n    'font-size': addUnit(data.size),\n    'background-color': currentColor,\n  });\n}\n\nvar BLUE = '#1989fa';\nvar GRAY_DARK = '#969799';\n\nfunction loadingColor(data) {\n  return data.checked === data.activeValue\n    ? data.activeColor || BLUE\n    : data.inactiveColor || GRAY_DARK;\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  loadingColor: loadingColor,\n};\n"
  },
  {
    "path": "lib/switch/index.wxss",
    "content": "@import '../common/index.wxss';.van-switch{background-color:var(--switch-background-color,#fff);border:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,2em)}.van-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,1em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,1em);z-index:var(--switch-node-z-index,1)}.van-switch__loading{height:50%;left:25%;position:absolute!important;top:25%;width:50%}.van-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.van-switch--on .van-switch__node{transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)))}.van-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}"
  },
  {
    "path": "lib/tab/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/tab/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useParent)('tabs'),\n    props: {\n        dot: {\n            type: Boolean,\n            observer: 'update',\n        },\n        info: {\n            type: null,\n            observer: 'update',\n        },\n        title: {\n            type: String,\n            observer: 'update',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'update',\n        },\n        titleStyle: {\n            type: String,\n            observer: 'update',\n        },\n        name: {\n            type: null,\n            value: '',\n        },\n    },\n    data: {\n        active: false,\n    },\n    methods: {\n        getComputedName: function () {\n            if (this.data.name !== '') {\n                return this.data.name;\n            }\n            return this.index;\n        },\n        updateRender: function (active, parent) {\n            var parentData = parent.data;\n            this.inited = this.inited || active;\n            this.setData({\n                active: active,\n                shouldRender: this.inited || !parentData.lazyRender,\n                shouldShow: active || parentData.animated,\n            });\n        },\n        update: function () {\n            if (this.parent) {\n                this.parent.updateTabs();\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/tab/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/tab/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"custom-class {{ utils.bem('tab__pane', { active, inactive: !active }) }}\"\n  style=\"{{ shouldShow ? '' : 'display: none;' }}\"\n>\n  <slot wx:if=\"{{ shouldRender }}\" />\n</view>\n"
  },
  {
    "path": "lib/tab/index.wxss",
    "content": "@import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.van-tab__pane{-webkit-overflow-scrolling:touch;box-sizing:border-box;overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}"
  },
  {
    "path": "lib/tabbar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/tabbar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('tabbar-item', function () {\n        this.updateChildren();\n    }),\n    props: {\n        active: {\n            type: null,\n            observer: 'updateChildren',\n        },\n        activeColor: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        inactiveColor: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        fixed: {\n            type: Boolean,\n            value: true,\n            observer: 'setHeight',\n        },\n        placeholder: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        height: 50,\n    },\n    methods: {\n        updateChildren: function () {\n            var children = this.children;\n            if (!Array.isArray(children) || !children.length) {\n                return;\n            }\n            children.forEach(function (child) { return child.updateFromParent(); });\n        },\n        setHeight: function () {\n            var _this = this;\n            if (!this.data.fixed || !this.data.placeholder) {\n                return;\n            }\n            wx.nextTick(function () {\n                (0, utils_1.getRect)(_this, '.van-tabbar').then(function (res) {\n                    _this.setData({ height: res.height });\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/tabbar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/tabbar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ border ? 'van-hairline--top-bottom' : '' }} {{ utils.bem('tabbar', { fixed, safe: safeAreaInsetBottom }) }} custom-class\"\n  style=\"{{ zIndex ? 'z-index: ' + zIndex : '' }}\"\n>\n  <slot />\n</view>\n\n<view wx:if=\"{{ fixed && placeholder }}\" style=\"height: {{ height }}px;\"></view>\n"
  },
  {
    "path": "lib/tabbar/index.wxss",
    "content": "@import '../common/index.wxss';.van-tabbar{background-color:var(--tabbar-background-color,#fff);box-sizing:initial;display:flex;height:var(--tabbar-height,50px);width:100%}.van-tabbar--fixed{bottom:0;left:0;position:fixed}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}"
  },
  {
    "path": "lib/tabbar-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/tabbar-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    props: {\n        info: null,\n        name: null,\n        icon: String,\n        dot: Boolean,\n        url: {\n            type: String,\n            value: '',\n        },\n        linkType: {\n            type: String,\n            value: 'redirectTo',\n        },\n        iconPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n    },\n    relation: (0, relation_1.useParent)('tabbar'),\n    data: {\n        active: false,\n        activeColor: '',\n        inactiveColor: '',\n    },\n    methods: {\n        onClick: function () {\n            var parent = this.parent;\n            if (parent) {\n                var index = parent.children.indexOf(this);\n                var active = this.data.name || index;\n                if (active !== this.data.active) {\n                    parent.$emit('change', active);\n                }\n            }\n            var _a = this.data, url = _a.url, linkType = _a.linkType;\n            if (url && wx[linkType]) {\n                return wx[linkType]({ url: url });\n            }\n            this.$emit('click');\n        },\n        updateFromParent: function () {\n            var parent = this.parent;\n            if (!parent) {\n                return;\n            }\n            var index = parent.children.indexOf(this);\n            var parentData = parent.data;\n            var data = this.data;\n            var active = (data.name || index) === parentData.active;\n            var patch = {};\n            if (active !== data.active) {\n                patch.active = active;\n            }\n            if (parentData.activeColor !== data.activeColor) {\n                patch.activeColor = parentData.activeColor;\n            }\n            if (parentData.inactiveColor !== data.inactiveColor) {\n                patch.inactiveColor = parentData.inactiveColor;\n            }\n            if (Object.keys(patch).length > 0) {\n                this.setData(patch);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "lib/tabbar-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "lib/tabbar-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('tabbar-item', { active }) }} custom-class\"\n  style=\"color: {{ active ? activeColor : inactiveColor }}\"\n  bindtap=\"onClick\"\n>\n  <view class=\"van-tabbar-item__icon\">\n    <van-icon\n      wx:if=\"{{ icon }}\"\n      name=\"{{ icon }}\"\n      class-prefix=\"{{ iconPrefix }}\"\n      custom-class=\"van-tabbar-item__icon__inner\"\n    />\n    <block wx:else>\n      <slot wx:if=\"{{ active }}\" name=\"icon-active\" />\n      <slot wx:else name=\"icon\" />\n    </block>\n    <van-info\n      dot=\"{{ dot }}\"\n      info=\"{{ info }}\"\n      custom-class=\"van-tabbar-item__info\"\n    />\n  </view>\n  <view class=\"van-tabbar-item__text\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "lib/tabbar-item/index.wxss",
    "content": "@import '../common/index.wxss';:host{flex:1}.van-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,#646566);display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}"
  },
  {
    "path": "lib/tabs/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/tabs/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar touch_1 = require(\"../mixins/touch\");\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    mixins: [touch_1.touch],\n    classes: [\n        'nav-class',\n        'tab-class',\n        'tab-active-class',\n        'line-class',\n        'wrap-class',\n    ],\n    relation: (0, relation_1.useChildren)('tab', function () {\n        this.updateTabs();\n    }),\n    props: {\n        sticky: Boolean,\n        border: Boolean,\n        swipeable: Boolean,\n        titleActiveColor: String,\n        titleInactiveColor: String,\n        color: String,\n        animated: {\n            type: Boolean,\n            observer: function () {\n                var _this = this;\n                this.children.forEach(function (child, index) {\n                    return child.updateRender(index === _this.data.currentIndex, _this);\n                });\n            },\n        },\n        lineWidth: {\n            type: null,\n            value: 40,\n            observer: 'resize',\n        },\n        lineHeight: {\n            type: null,\n            value: -1,\n        },\n        active: {\n            type: null,\n            value: 0,\n            observer: function (name) {\n                if (name !== this.getCurrentName()) {\n                    this.setCurrentIndexByName(name);\n                }\n            },\n        },\n        type: {\n            type: String,\n            value: 'line',\n        },\n        ellipsis: {\n            type: Boolean,\n            value: true,\n        },\n        duration: {\n            type: Number,\n            value: 0.3,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        swipeThreshold: {\n            type: Number,\n            value: 5,\n            observer: function (value) {\n                this.setData({\n                    scrollable: this.children.length > value || !this.data.ellipsis,\n                });\n            },\n        },\n        offsetTop: {\n            type: Number,\n            value: 0,\n        },\n        lazyRender: {\n            type: Boolean,\n            value: true,\n        },\n        useBeforeChange: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        tabs: [],\n        scrollLeft: 0,\n        scrollable: false,\n        currentIndex: 0,\n        container: null,\n        skipTransition: true,\n        scrollWithAnimation: false,\n        lineOffsetLeft: 0,\n        inited: false,\n    },\n    mounted: function () {\n        var _this = this;\n        (0, utils_1.requestAnimationFrame)(function () {\n            _this.swiping = true;\n            _this.setData({\n                container: function () { return _this.createSelectorQuery().select('.van-tabs'); },\n            });\n            _this.resize();\n            _this.scrollIntoView();\n        });\n    },\n    methods: {\n        updateTabs: function () {\n            var _a = this, _b = _a.children, children = _b === void 0 ? [] : _b, data = _a.data;\n            this.setData({\n                tabs: children.map(function (child) { return child.data; }),\n                scrollable: this.children.length > data.swipeThreshold || !data.ellipsis,\n            });\n            this.setCurrentIndexByName(data.active || this.getCurrentName());\n        },\n        trigger: function (eventName, child) {\n            var currentIndex = this.data.currentIndex;\n            var data = this.getChildData(currentIndex, child);\n            if (!(0, validator_1.isDef)(data)) {\n                return;\n            }\n            this.$emit(eventName, data);\n        },\n        onTap: function (event) {\n            var _this = this;\n            var index = event.currentTarget.dataset.index;\n            var child = this.children[index];\n            if (child.data.disabled) {\n                this.trigger('disabled', child);\n                return;\n            }\n            this.onBeforeChange(index).then(function () {\n                _this.setCurrentIndex(index);\n                (0, utils_1.nextTick)(function () {\n                    _this.trigger('click');\n                });\n            });\n        },\n        // correct the index of active tab\n        setCurrentIndexByName: function (name) {\n            var _a = this.children, children = _a === void 0 ? [] : _a;\n            var matched = children.filter(function (child) { return child.getComputedName() === name; });\n            if (matched.length) {\n                this.setCurrentIndex(matched[0].index);\n            }\n        },\n        setCurrentIndex: function (currentIndex) {\n            var _this = this;\n            var _a = this, data = _a.data, _b = _a.children, children = _b === void 0 ? [] : _b;\n            if (!(0, validator_1.isDef)(currentIndex) ||\n                currentIndex >= children.length ||\n                currentIndex < 0) {\n                return;\n            }\n            (0, utils_1.groupSetData)(this, function () {\n                children.forEach(function (item, index) {\n                    var active = index === currentIndex;\n                    if (active !== item.data.active || !item.inited) {\n                        item.updateRender(active, _this);\n                    }\n                });\n            });\n            if (currentIndex === data.currentIndex) {\n                if (!data.inited) {\n                    this.resize();\n                }\n                return;\n            }\n            var shouldEmitChange = data.currentIndex !== null;\n            this.setData({ currentIndex: currentIndex });\n            (0, utils_1.requestAnimationFrame)(function () {\n                _this.resize();\n                _this.scrollIntoView();\n            });\n            (0, utils_1.nextTick)(function () {\n                _this.trigger('input');\n                if (shouldEmitChange) {\n                    _this.trigger('change');\n                }\n            });\n        },\n        getCurrentName: function () {\n            var activeTab = this.children[this.data.currentIndex];\n            if (activeTab) {\n                return activeTab.getComputedName();\n            }\n        },\n        resize: function () {\n            var _this = this;\n            if (this.data.type !== 'line') {\n                return;\n            }\n            var _a = this.data, currentIndex = _a.currentIndex, ellipsis = _a.ellipsis, skipTransition = _a.skipTransition;\n            Promise.all([\n                (0, utils_1.getAllRect)(this, '.van-tab'),\n                (0, utils_1.getRect)(this, '.van-tabs__line'),\n            ]).then(function (_a) {\n                var _b = _a[0], rects = _b === void 0 ? [] : _b, lineRect = _a[1];\n                var rect = rects[currentIndex];\n                if (rect == null) {\n                    return;\n                }\n                var lineOffsetLeft = rects\n                    .slice(0, currentIndex)\n                    .reduce(function (prev, curr) { return prev + curr.width; }, 0);\n                lineOffsetLeft +=\n                    (rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);\n                _this.setData({ lineOffsetLeft: lineOffsetLeft, inited: true });\n                _this.swiping = true;\n                if (skipTransition) {\n                    // waiting transition end\n                    setTimeout(function () {\n                        _this.setData({ skipTransition: false });\n                    }, _this.data.duration);\n                }\n            });\n        },\n        // scroll active tab into view\n        scrollIntoView: function () {\n            var _this = this;\n            var _a = this.data, currentIndex = _a.currentIndex, scrollable = _a.scrollable, scrollWithAnimation = _a.scrollWithAnimation;\n            if (!scrollable) {\n                return;\n            }\n            Promise.all([\n                (0, utils_1.getAllRect)(this, '.van-tab'),\n                (0, utils_1.getRect)(this, '.van-tabs__nav'),\n            ]).then(function (_a) {\n                var tabRects = _a[0], navRect = _a[1];\n                var tabRect = tabRects[currentIndex];\n                var offsetLeft = tabRects\n                    .slice(0, currentIndex)\n                    .reduce(function (prev, curr) { return prev + curr.width; }, 0);\n                _this.setData({\n                    scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,\n                });\n                if (!scrollWithAnimation) {\n                    (0, utils_1.nextTick)(function () {\n                        _this.setData({ scrollWithAnimation: true });\n                    });\n                }\n            });\n        },\n        onTouchScroll: function (event) {\n            this.$emit('scroll', event.detail);\n        },\n        onTouchStart: function (event) {\n            if (!this.data.swipeable)\n                return;\n            this.swiping = true;\n            this.touchStart(event);\n        },\n        onTouchMove: function (event) {\n            if (!this.data.swipeable || !this.swiping)\n                return;\n            this.touchMove(event);\n        },\n        // watch swipe touch end\n        onTouchEnd: function () {\n            var _this = this;\n            if (!this.data.swipeable || !this.swiping)\n                return;\n            var _a = this, direction = _a.direction, deltaX = _a.deltaX, offsetX = _a.offsetX;\n            var minSwipeDistance = 50;\n            if (direction === 'horizontal' && offsetX >= minSwipeDistance) {\n                var index_1 = this.getAvaiableTab(deltaX);\n                if (index_1 !== -1) {\n                    this.onBeforeChange(index_1).then(function () { return _this.setCurrentIndex(index_1); });\n                }\n            }\n            this.swiping = false;\n        },\n        getAvaiableTab: function (direction) {\n            var _a = this.data, tabs = _a.tabs, currentIndex = _a.currentIndex;\n            var step = direction > 0 ? -1 : 1;\n            for (var i = step; currentIndex + i < tabs.length && currentIndex + i >= 0; i += step) {\n                var index = currentIndex + i;\n                if (index >= 0 &&\n                    index < tabs.length &&\n                    tabs[index] &&\n                    !tabs[index].disabled) {\n                    return index;\n                }\n            }\n            return -1;\n        },\n        onBeforeChange: function (index) {\n            var _this = this;\n            var useBeforeChange = this.data.useBeforeChange;\n            if (!useBeforeChange) {\n                return Promise.resolve();\n            }\n            return new Promise(function (resolve, reject) {\n                _this.$emit('before-change', __assign(__assign({}, _this.getChildData(index)), { callback: function (status) { return (status ? resolve() : reject()); } }));\n            });\n        },\n        getChildData: function (index, child) {\n            var currentChild = child || this.children[index];\n            if (!(0, validator_1.isDef)(currentChild)) {\n                return;\n            }\n            return {\n                index: currentChild.index,\n                name: currentChild.getComputedName(),\n                title: currentChild.data.title,\n            };\n        },\n    },\n});\n"
  },
  {
    "path": "lib/tabs/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\",\n    \"van-sticky\": \"../sticky/index\"\n  }\n}\n"
  },
  {
    "path": "lib/tabs/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class {{ utils.bem('tabs') }}\">\n  <van-sticky\n    disabled=\"{{ !sticky }}\"\n    z-index=\"{{ zIndex }}\"\n    offset-top=\"{{ offsetTop }}\"\n    container=\"{{ container }}\"\n    bind:scroll=\"onTouchScroll\"\n  >\n    <view class=\"{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class\">\n      <slot name=\"nav-left\" />\n\n      <scroll-view\n        scroll-x=\"{{ scrollable }}\"\n        scroll-with-animation=\"{{ scrollWithAnimation }}\"\n        scroll-left=\"{{ scrollLeft }}\"\n        class=\"{{ utils.bem('tabs__scroll', [type]) }}\"\n        style=\"{{ color ? 'border-color: ' + color : '' }}\"\n      >\n        <view class=\"{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class\" style=\"{{ computed.navStyle(color, type) }}\">\n          <view wx:if=\"{{ type === 'line' }}\" class=\"van-tabs__line\" style=\"{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}\" />\n          <view\n            wx:for=\"{{ tabs }}\"\n            wx:key=\"index\"\n            data-index=\"{{ index }}\"\n            class=\"{{ computed.tabClass(index === currentIndex, ellipsis) }} {{ utils.bem('tab', { active: index === currentIndex, disabled: item.disabled, complete: !ellipsis }) }}\"\n            style=\"{{ computed.tabStyle({ active: index === currentIndex, ellipsis, color, type, disabled: item.disabled, titleActiveColor, titleInactiveColor, swipeThreshold, scrollable }) }}\"\n            bind:tap=\"onTap\"\n          >\n            <view class=\"{{ ellipsis ? 'van-ellipsis' : '' }}\" style=\"{{ item.titleStyle }}\">\n              {{ item.title }}\n              <van-info\n                wx:if=\"{{ item.info !== null || item.dot }}\"\n                info=\"{{ item.info }}\"\n                dot=\"{{ item.dot }}\"\n                custom-class=\"van-tab__title__info\"\n              />\n            </view>\n          </view>\n        </view>\n      </scroll-view>\n\n      <slot name=\"nav-right\" />\n    </view>\n  </van-sticky>\n\n  <view\n    class=\"van-tabs__content\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchmove=\"onTouchMove\"\n    bind:touchend=\"onTouchEnd\"\n    bind:touchcancel=\"onTouchEnd\"\n  >\n    <view\n      class=\"{{ utils.bem('tabs__track', [{ animated }]) }} van-tabs__track\"\n      style=\"{{ computed.trackStyle({ duration, currentIndex, animated }) }}\"\n    >\n      <slot />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/tabs/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction tabClass(active, ellipsis) {\n  var classes = ['tab-class'];\n\n  if (active) {\n    classes.push('tab-active-class');\n  }\n\n  if (ellipsis) {\n    classes.push('van-ellipsis');\n  }\n\n  return classes.join(' ');\n}\n\nfunction tabStyle(data) {\n  var titleColor = data.active\n    ? data.titleActiveColor\n    : data.titleInactiveColor;\n\n  var ellipsis = data.scrollable && data.ellipsis;\n\n  // card theme color\n  if (data.type === 'card') {\n    return style({\n      'border-color': data.color,\n      'background-color': !data.disabled && data.active ? data.color : null,\n      color: titleColor || (!data.disabled && !data.active ? data.color : null),\n      'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,\n    });\n  }\n\n  return style({\n    color: titleColor,\n    'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,\n  });\n}\n\nfunction navStyle(color, type) {\n  return style({\n    'border-color': type === 'card' && color ? color : null,\n  });\n}\n\nfunction trackStyle(data) {\n  if (!data.animated) {\n    return '';\n  }\n\n  return style({\n    left: -100 * data.currentIndex + '%',\n    'transition-duration': data.duration + 's',\n    '-webkit-transition-duration': data.duration + 's',\n  });\n}\n\nfunction lineStyle(data) {\n  return style({\n    width: utils.addUnit(data.lineWidth),\n    opacity: data.inited ? 1 : 0,\n    transform: 'translateX(' + data.lineOffsetLeft + 'px)',\n    '-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',\n    'background-color': data.color,\n    height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,\n    'border-radius':\n      data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,\n    'transition-duration': !data.skipTransition ? data.duration + 's' : null,\n    '-webkit-transition-duration': !data.skipTransition\n      ? data.duration + 's'\n      : null,\n  });\n}\n\nmodule.exports = {\n  tabClass: tabClass,\n  tabStyle: tabStyle,\n  trackStyle: trackStyle,\n  lineStyle: lineStyle,\n  navStyle: navStyle,\n};\n"
  },
  {
    "path": "lib/tabs/index.wxss",
    "content": "@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff);overflow:auto}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line{height:var(--tabs-line-height,44px)}.van-tabs--card{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}"
  },
  {
    "path": "lib/tag/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/tag/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        size: String,\n        mark: Boolean,\n        color: String,\n        plain: Boolean,\n        round: Boolean,\n        textColor: String,\n        type: {\n            type: String,\n            value: 'default',\n        },\n        closeable: Boolean,\n    },\n    methods: {\n        onClose: function () {\n            this.$emit('close');\n        },\n    },\n});\n"
  },
  {
    "path": "lib/tag/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "lib/tag/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('tag', [type, size, { mark, plain, round }]) }}\"\n  style=\"{{ computed.rootStyle({ plain, color, textColor }) }}\"\n>\n  <slot />\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"cross\"\n    custom-class=\"van-tag__close\"\n    bind:click=\"onClose\"\n  />\n</view>\n"
  },
  {
    "path": "lib/tag/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'background-color': data.plain ? '' : data.color,\n    color: data.textColor || data.plain ? data.textColor || data.color : '',\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "lib/tag/index.wxss",
    "content": "@import '../common/index.wxss';.van-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.van-tag--default{background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0}.van-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.van-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.van-tag--mark:after{content:\"\";display:block;width:2px}.van-tag--round{border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{margin-left:2px;min-width:1em}"
  },
  {
    "path": "lib/toast/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/toast/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        show: Boolean,\n        mask: Boolean,\n        message: String,\n        forbidClick: Boolean,\n        zIndex: {\n            type: Number,\n            value: 1000,\n        },\n        type: {\n            type: String,\n            value: 'text',\n        },\n        loadingType: {\n            type: String,\n            value: 'circular',\n        },\n        position: {\n            type: String,\n            value: 'middle',\n        },\n    },\n    methods: {\n        // for prevent touchmove\n        noop: function () { },\n    },\n});\n"
  },
  {
    "path": "lib/toast/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\",\n    \"van-overlay\": \"../overlay/index\",\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "lib/toast/index.wxml",
    "content": "<van-overlay\n  wx:if=\"{{ mask || forbidClick }}\"\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  custom-style=\"{{ mask ? '' : 'background-color: transparent;' }}\"\n/>\n<van-transition\n  show=\"{{ show }}\"\n  custom-style=\"z-index: {{ zIndex }}\"\n  custom-class=\"van-toast__container\"\n>\n  <view\n    class=\"van-toast van-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }} van-toast--{{ position }}\"\n    catch:touchmove=\"noop\"\n  >\n    <!-- text only -->\n    <text wx:if=\"{{ type === 'text' }}\">{{ message }}</text>\n\n    <!-- html only -->\n    <rich-text wx:elif=\"{{ type === 'html' }}\" nodes=\"{{ message }}\"></rich-text>\n\n    <!-- with icon -->\n    <block wx:else>\n      <van-loading\n        wx:if=\"{{ type === 'loading' }}\"\n        color=\"white\"\n        type=\"{{ loadingType }}\"\n        custom-class=\"van-toast__loading\"\n      />\n      <van-icon wx:else class=\"van-toast__icon\" name=\"{{ type }}\" />\n      <text wx:if=\"{{ message }}\" class=\"van-toast__text\">{{ message }}</text>\n    </block>\n\n    <slot />\n  </view>\n</van-transition>\n"
  },
  {
    "path": "lib/toast/index.wxss",
    "content": "@import '../common/index.wxss';.van-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,8px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.van-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.van-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.van-toast--icon .van-toast__icon{font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{transform:translateY(-30vh)}.van-toast--bottom{transform:translateY(30vh)}"
  },
  {
    "path": "lib/toast/toast.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\ntype ToastMessage = string | number;\ntype ToastContext = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance;\ninterface ToastOptions {\n    show?: boolean;\n    type?: string;\n    mask?: boolean;\n    zIndex?: number;\n    context?: (() => ToastContext) | ToastContext;\n    position?: string;\n    duration?: number;\n    selector?: string;\n    forbidClick?: boolean;\n    loadingType?: string;\n    message?: ToastMessage;\n    onClose?: () => void;\n}\ndeclare function Toast(toastOptions: ToastOptions | ToastMessage): WechatMiniprogram.Component.TrivialInstance | undefined;\ndeclare namespace Toast {\n    var loading: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var success: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var fail: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var clear: () => void;\n    var setDefaultOptions: (options: ToastOptions) => void;\n    var resetDefaultOptions: () => void;\n}\nexport default Toast;\n"
  },
  {
    "path": "lib/toast/toast.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar validator_1 = require(\"../common/validator\");\nvar defaultOptions = {\n    type: 'text',\n    mask: false,\n    message: '',\n    show: true,\n    zIndex: 1000,\n    duration: 2000,\n    position: 'middle',\n    forbidClick: false,\n    loadingType: 'circular',\n    selector: '#van-toast',\n};\nvar queue = [];\nvar currentOptions = __assign({}, defaultOptions);\nfunction parseOptions(message) {\n    return (0, validator_1.isObj)(message) ? message : { message: message };\n}\nfunction getContext() {\n    var pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nfunction Toast(toastOptions) {\n    var options = __assign(__assign({}, currentOptions), parseOptions(toastOptions));\n    var context = (typeof options.context === 'function'\n        ? options.context()\n        : options.context) || getContext();\n    var toast = context.selectComponent(options.selector);\n    if (!toast) {\n        console.warn('未找到 van-toast 节点，请确认 selector 及 context 是否正确');\n        return;\n    }\n    delete options.context;\n    delete options.selector;\n    toast.clear = function () {\n        toast.setData({ show: false });\n        if (options.onClose) {\n            options.onClose();\n        }\n    };\n    queue.push(toast);\n    toast.setData(options);\n    clearTimeout(toast.timer);\n    if (options.duration != null && options.duration > 0) {\n        toast.timer = setTimeout(function () {\n            toast.clear();\n            queue = queue.filter(function (item) { return item !== toast; });\n        }, options.duration);\n    }\n    return toast;\n}\nvar createMethod = function (type) { return function (options) {\n    return Toast(__assign({ type: type }, parseOptions(options)));\n}; };\nToast.loading = createMethod('loading');\nToast.success = createMethod('success');\nToast.fail = createMethod('fail');\nToast.clear = function () {\n    queue.forEach(function (toast) {\n        toast.clear();\n    });\n    queue = [];\n};\nToast.setDefaultOptions = function (options) {\n    Object.assign(currentOptions, options);\n};\nToast.resetDefaultOptions = function () {\n    currentOptions = __assign({}, defaultOptions);\n};\nexports.default = Toast;\n"
  },
  {
    "path": "lib/transition/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/transition/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar transition_1 = require(\"../mixins/transition\");\n(0, component_1.VantComponent)({\n    classes: [\n        'enter-class',\n        'enter-active-class',\n        'enter-to-class',\n        'leave-class',\n        'leave-active-class',\n        'leave-to-class',\n    ],\n    mixins: [(0, transition_1.transition)(true)],\n});\n"
  },
  {
    "path": "lib/transition/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "lib/transition/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  wx:if=\"{{ inited }}\"\n  class=\"van-transition custom-class {{ classes }}\"\n  style=\"{{ computed.rootStyle({ currentDuration, display, customStyle }) }}\"\n  bind:transitionend=\"onTransitionEnd\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "lib/transition/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      '-webkit-transition-duration': data.currentDuration + 'ms',\n      'transition-duration': data.currentDuration + 'ms',\n    },\n    data.display ? null : 'display: none',\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "lib/transition/index.wxss",
    "content": "@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:transform}.van-slide-up-enter,.van-slide-up-leave-to{transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{transform:translate3d(100%,0,0)}"
  },
  {
    "path": "lib/tree-select/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/tree-select/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: [\n        'main-item-class',\n        'content-item-class',\n        'main-active-class',\n        'content-active-class',\n        'main-disabled-class',\n        'content-disabled-class',\n    ],\n    props: {\n        items: {\n            type: Array,\n            observer: 'updateSubItems',\n        },\n        activeId: null,\n        mainActiveIndex: {\n            type: Number,\n            value: 0,\n            observer: 'updateSubItems',\n        },\n        height: {\n            type: null,\n            value: 300,\n        },\n        max: {\n            type: Number,\n            value: Infinity,\n        },\n        selectedIcon: {\n            type: String,\n            value: 'success',\n        },\n    },\n    data: {\n        subItems: [],\n    },\n    methods: {\n        // 当一个子项被选择时\n        onSelectItem: function (event) {\n            var item = event.currentTarget.dataset.item;\n            var isArray = Array.isArray(this.data.activeId);\n            // 判断有没有超出右侧选择的最大数\n            var isOverMax = isArray && this.data.activeId.length >= this.data.max;\n            // 判断该项有没有被选中, 如果有被选中，则忽视是否超出的条件\n            var isSelected = isArray\n                ? this.data.activeId.indexOf(item.id) > -1\n                : this.data.activeId === item.id;\n            if (!item.disabled && (!isOverMax || isSelected)) {\n                this.$emit('click-item', item);\n            }\n        },\n        // 当一个导航被点击时\n        onClickNav: function (event) {\n            var index = event.detail;\n            var item = this.data.items[index];\n            if (!item.disabled) {\n                this.$emit('click-nav', { index: index });\n            }\n        },\n        // 更新子项列表\n        updateSubItems: function () {\n            var _a = this.data, items = _a.items, mainActiveIndex = _a.mainActiveIndex;\n            var _b = (items[mainActiveIndex] || {}).children, children = _b === void 0 ? [] : _b;\n            this.setData({ subItems: children });\n        },\n    },\n});\n"
  },
  {
    "path": "lib/tree-select/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-sidebar\": \"../sidebar/index\",\n    \"van-sidebar-item\": \"../sidebar-item/index\"\n  }\n}\n"
  },
  {
    "path": "lib/tree-select/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"wxs\" />\n\n<view\n  class=\"van-tree-select\"\n  style=\"height: {{ utils.addUnit(height) }}\"\n>\n  <scroll-view scroll-y class=\"van-tree-select__nav\">\n    <van-sidebar active-key=\"{{ mainActiveIndex }}\" bind:change=\"onClickNav\" custom-class=\"van-tree-select__nav__inner\">\n      <van-sidebar-item\n        wx:for=\"{{ items }}\"\n        wx:key=\"index\"\n        custom-class=\"main-item-class\"\n        active-class=\"main-active-class\"\n        disabled-class=\"main-disabled-class\"\n        badge=\"{{ item.badge }}\"\n        dot=\"{{ item.dot }}\"\n        title=\"{{ item.text }}\"\n        disabled=\"{{ item.disabled }}\"\n      />\n    </van-sidebar>\n  </scroll-view>\n  <scroll-view scroll-y class=\"van-tree-select__content\">\n    <slot name=\"content\" />\n    <view\n      wx:for=\"{{ subItems }}\"\n      wx:key=\"id\"\n      class=\"van-ellipsis content-item-class {{ utils.bem('tree-select__item', { active: wxs.isActive(activeId, item.id), disabled: item.disabled }) }} {{ wxs.isActive(activeId, item.id) ? 'content-active-class' : '' }} {{ item.disabled ? 'content-disabled-class' : '' }}\"\n      data-item=\"{{ item }}\"\n      bind:tap=\"onSelectItem\"\n    >\n      {{ item.text }}\n      <van-icon\n        wx:if=\"{{ wxs.isActive(activeId, item.id) }}\"\n        name=\"{{ selectedIcon }}\"\n        size=\"16px\"\n        class=\"van-tree-select__selected\"\n      />\n    </view>\n  </scroll-view>\n</view>\n"
  },
  {
    "path": "lib/tree-select/index.wxs",
    "content": "/* eslint-disable */\nvar array = require('../wxs/array.wxs');\n\nfunction isActive (activeList, itemId) {\n  if (array.isArray(activeList)) {\n    return activeList.indexOf(itemId) > -1;\n  }\n\n  return activeList === itemId;\n}\n\nmodule.exports.isActive = isActive;\n"
  },
  {
    "path": "lib/tree-select/index.wxss",
    "content": "@import '../common/index.wxss';.van-tree-select{display:flex;font-size:var(--tree-select-font-size,14px);position:relative;-webkit-user-select:none;user-select:none}.van-tree-select__nav{--sidebar-padding:12px 8px 12px 12px;background-color:var(--tree-select-nav-background-color,#f7f8fa);flex:1}.van-tree-select__nav__inner{height:100%;width:100%!important}.van-tree-select__content{background-color:var(--tree-select-content-background-color,#fff);flex:2}.van-tree-select__item{font-weight:700;line-height:var(--tree-select-item-height,44px);padding:0 32px 0 var(--padding-md,16px);position:relative}.van-tree-select__item--active{color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;right:var(--padding-md,16px);top:50%;transform:translateY(-50%)}"
  },
  {
    "path": "lib/uploader/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "lib/uploader/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar validator_1 = require(\"../common/validator\");\nvar shared_1 = require(\"./shared\");\nvar utils_1 = require(\"./utils\");\n(0, component_1.VantComponent)({\n    props: __assign(__assign(__assign(__assign({ disabled: Boolean, multiple: Boolean, uploadText: String, useBeforeRead: Boolean, afterRead: null, beforeRead: null, previewSize: {\n            type: null,\n            value: 80,\n        }, name: {\n            type: null,\n            value: '',\n        }, accept: {\n            type: String,\n            value: 'image',\n        }, fileList: {\n            type: Array,\n            value: [],\n            observer: 'formatFileList',\n        }, maxSize: {\n            type: Number,\n            value: Number.MAX_VALUE,\n        }, maxCount: {\n            type: Number,\n            value: 100,\n        }, deletable: {\n            type: Boolean,\n            value: true,\n        }, showUpload: {\n            type: Boolean,\n            value: true,\n        }, previewImage: {\n            type: Boolean,\n            value: true,\n        }, previewFullImage: {\n            type: Boolean,\n            value: true,\n        }, videoFit: {\n            type: String,\n            value: 'contain',\n        }, imageFit: {\n            type: String,\n            value: 'scaleToFill',\n        }, uploadIcon: {\n            type: String,\n            value: 'photograph',\n        } }, shared_1.imageProps), shared_1.videoProps), shared_1.mediaProps), shared_1.messageFileProps),\n    data: {\n        lists: [],\n        isInCount: true,\n    },\n    methods: {\n        formatFileList: function () {\n            var _a = this.data, _b = _a.fileList, fileList = _b === void 0 ? [] : _b, maxCount = _a.maxCount;\n            var lists = fileList.map(function (item) { return (__assign(__assign({}, item), { isImage: (0, utils_1.isImageFile)(item), isVideo: (0, utils_1.isVideoFile)(item), deletable: (0, validator_1.isBoolean)(item.deletable) ? item.deletable : true })); });\n            this.setData({ lists: lists, isInCount: lists.length < maxCount });\n        },\n        getDetail: function (index) {\n            return {\n                name: this.data.name,\n                index: index == null ? this.data.fileList.length : index,\n            };\n        },\n        startUpload: function () {\n            var _this = this;\n            var _a = this.data, maxCount = _a.maxCount, multiple = _a.multiple, lists = _a.lists, disabled = _a.disabled;\n            if (disabled)\n                return;\n            (0, utils_1.chooseFile)(__assign(__assign({}, this.data), { maxCount: maxCount - lists.length }))\n                .then(function (res) {\n                _this.onBeforeRead(multiple ? res : res[0]);\n            })\n                .catch(function (error) {\n                _this.$emit('error', error);\n            });\n        },\n        onBeforeRead: function (file) {\n            var _this = this;\n            var _a = this.data, beforeRead = _a.beforeRead, useBeforeRead = _a.useBeforeRead;\n            var res = true;\n            if (typeof beforeRead === 'function') {\n                res = beforeRead(file, this.getDetail());\n            }\n            if (useBeforeRead) {\n                res = new Promise(function (resolve, reject) {\n                    _this.$emit('before-read', __assign(__assign({ file: file }, _this.getDetail()), { callback: function (ok) {\n                            ok ? resolve() : reject();\n                        } }));\n                });\n            }\n            if (!res) {\n                return;\n            }\n            if ((0, validator_1.isPromise)(res)) {\n                res.then(function (data) { return _this.onAfterRead(data || file); });\n            }\n            else {\n                this.onAfterRead(file);\n            }\n        },\n        onAfterRead: function (file) {\n            var _a = this.data, maxSize = _a.maxSize, afterRead = _a.afterRead;\n            var oversize = Array.isArray(file)\n                ? file.some(function (item) { return item.size > maxSize; })\n                : file.size > maxSize;\n            if (oversize) {\n                this.$emit('oversize', __assign({ file: file }, this.getDetail()));\n                return;\n            }\n            if (typeof afterRead === 'function') {\n                afterRead(file, this.getDetail());\n            }\n            this.$emit('after-read', __assign({ file: file }, this.getDetail()));\n        },\n        deleteItem: function (event) {\n            var index = event.currentTarget.dataset.index;\n            this.$emit('delete', __assign(__assign({}, this.getDetail(index)), { file: this.data.fileList[index] }));\n        },\n        onPreviewImage: function (event) {\n            if (!this.data.previewFullImage)\n                return;\n            var index = event.currentTarget.dataset.index;\n            var _a = this.data, lists = _a.lists, showmenu = _a.showmenu;\n            var item = lists[index];\n            wx.previewImage({\n                urls: lists.filter(function (item) { return (0, utils_1.isImageFile)(item); }).map(function (item) { return item.url; }),\n                current: item.url,\n                showmenu: showmenu,\n                fail: function () {\n                    wx.showToast({ title: '预览图片失败', icon: 'none' });\n                },\n            });\n        },\n        onPreviewVideo: function (event) {\n            if (!this.data.previewFullImage)\n                return;\n            var index = event.currentTarget.dataset.index;\n            var lists = this.data.lists;\n            var sources = [];\n            var current = lists.reduce(function (sum, cur, curIndex) {\n                if (!(0, utils_1.isVideoFile)(cur)) {\n                    return sum;\n                }\n                sources.push(__assign(__assign({}, cur), { type: 'video' }));\n                if (curIndex < index) {\n                    sum++;\n                }\n                return sum;\n            }, 0);\n            wx.previewMedia({\n                sources: sources,\n                current: current,\n                fail: function () {\n                    wx.showToast({ title: '预览视频失败', icon: 'none' });\n                },\n            });\n        },\n        onPreviewFile: function (event) {\n            if (!this.data.previewFile)\n                return;\n            var index = event.currentTarget.dataset.index;\n            wx.openDocument({\n                filePath: this.data.lists[index].url,\n                showMenu: true,\n            });\n        },\n        onClickPreview: function (event) {\n            var index = event.currentTarget.dataset.index;\n            var item = this.data.lists[index];\n            this.$emit('click-preview', __assign(__assign({}, item), this.getDetail(index)));\n        },\n    },\n});\n"
  },
  {
    "path": "lib/uploader/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "lib/uploader/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-uploader\">\n  <view class=\"van-uploader__wrapper\">\n    <!-- 预览样式 -->\n    <view\n      wx:if=\"{{ previewImage }}\"\n      wx:for=\"{{ lists }}\"\n      wx:key=\"index\"\n      class=\"van-uploader__preview\"\n      data-index=\"{{ index }}\"\n      bindtap=\"onClickPreview\"\n    >\n      <image\n        wx:if=\"{{ item.isImage }}\"\n        mode=\"{{ imageFit }}\"\n        src=\"{{ item.thumb || item.url }}\"\n        alt=\"{{ item.name || ('图片' + index) }}\"\n        class=\"van-uploader__preview-image\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewImage\"\n      />\n      <video\n        wx:elif=\"{{ item.isVideo }}\"\n        src=\"{{ item.url }}\"\n        title=\"{{ item.name || ('视频' + index) }}\"\n        poster=\"{{ item.thumb }}\"\n        autoplay=\"{{ item.autoplay }}\"\n        object-fit=\"{{videoFit}}\"\n        referrer-policy=\"{{ referrerPolicy }}\"\n        class=\"van-uploader__preview-image\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewVideo\"\n      >\n      </video>\n      <view\n        wx:else\n        class=\"van-uploader__file\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewFile\"\n      >\n        <van-icon name=\"description\" class=\"van-uploader__file-icon\" />\n        <view class=\"van-uploader__file-name van-ellipsis\">{{ item.name || item.url }}</view>\n      </view>\n      <view\n        wx:if=\"{{ item.status === 'uploading' || item.status === 'failed' }}\"\n        class=\"van-uploader__mask\"\n      >\n       <van-icon wx:if=\"{{ item.status === 'failed' }}\" name=\"close\" class=\"van-uploader__mask-icon\" />\n       <van-loading wx:else custom-class=\"van-uploader__loading\" />\n       <text wx:if=\"{{ item.message }}\" class=\"van-uploader__mask-message\">{{ item.message }}</text>\n      </view>\n      <view\n        wx:if=\"{{ deletable && item.deletable }}\"\n        data-index=\"{{ index }}\"\n        class=\"van-uploader__preview-delete\"\n        catch:tap=\"deleteItem\"\n      >\n        <van-icon name=\"cross\" class=\"van-uploader__preview-delete-icon\" />\n      </view>\n    </view>\n\n    <!-- 上传样式 -->\n    <block wx:if=\"{{ isInCount }}\">\n      <view class=\"van-uploader__slot\" bindtap=\"startUpload\">\n        <slot />\n      </view>\n\n      <!-- 默认上传样式 -->\n      <view\n        wx:if=\"{{ showUpload }}\"\n        class=\"van-uploader__upload {{ disabled ? 'van-uploader__upload--disabled': ''}}\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        bindtap=\"startUpload\"\n      >\n        <van-icon name=\"{{ uploadIcon }}\" class=\"van-uploader__upload-icon\" />\n        <text wx:if=\"{{ uploadText }}\" class=\"van-uploader__upload-text\">{{ uploadText }}</text>\n      </view>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "lib/uploader/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction sizeStyle(data) {\n  return \"Array\" === data.previewSize.constructor ? style({\n    width: addUnit(data.previewSize[0]),\n    height: addUnit(data.previewSize[1]),\n  }) : style({\n    width: addUnit(data.previewSize),\n    height: addUnit(data.previewSize),\n  });\n}\n\nmodule.exports = {\n  sizeStyle: sizeStyle,\n};\n"
  },
  {
    "path": "lib/uploader/index.wxss",
    "content": "@import '../common/index.wxss';.van-uploader{display:inline-block;position:relative}.van-uploader__wrapper{display:flex;flex-wrap:wrap}.van-uploader__slot:empty{display:none}.van-uploader__slot:not(:empty)+.van-uploader__upload{display:none!important}.van-uploader__upload{align-items:center;background-color:var(--uploader-upload-background-color,#f7f8fa);box-sizing:border-box;display:flex;flex-direction:column;height:var(--uploader-size,80px);justify-content:center;margin:0 8px 8px 0;position:relative;width:var(--uploader-size,80px)}.van-uploader__upload:active{background-color:var(--uploader-upload-active-color,#f2f3f5)}.van-uploader__upload-icon{color:var(--uploader-icon-color,#dcdee0);font-size:var(--uploader-icon-size,24px)}.van-uploader__upload-text{color:var(--uploader-text-color,#969799);font-size:var(--uploader-text-font-size,12px);margin-top:var(--padding-xs,8px)}.van-uploader__upload--disabled{opacity:var(--uploader-disabled-opacity,.5)}.van-uploader__preview{cursor:pointer;margin:0 8px 8px 0;position:relative}.van-uploader__preview-image{display:block;height:var(--uploader-size,80px);overflow:hidden;width:var(--uploader-size,80px)}.van-uploader__preview-delete,.van-uploader__preview-delete:after{height:var(--uploader-delete-icon-size,14px);position:absolute;right:0;top:0;width:var(--uploader-delete-icon-size,14px)}.van-uploader__preview-delete:after{background-color:var(--uploader-delete-background-color,rgba(0,0,0,.7));border-radius:0 0 0 12px;content:\"\"}.van-uploader__preview-delete-icon{color:var(--uploader-delete-color,#fff);font-size:var(--uploader-delete-icon-size,14px);position:absolute;right:0;top:0;transform:scale(.7) translate(10%,-10%);z-index:1}.van-uploader__file{align-items:center;background-color:var(--uploader-file-background-color,#f7f8fa);display:flex;flex-direction:column;height:var(--uploader-size,80px);justify-content:center;width:var(--uploader-size,80px)}.van-uploader__file-icon{color:var(--uploader-file-icon-color,#646566);font-size:var(--uploader-file-icon-size,20px)}.van-uploader__file-name{box-sizing:border-box;color:var(--uploader-file-name-text-color,#646566);font-size:var(--uploader-file-name-font-size,12px);margin-top:var(--uploader-file-name-margin-top,8px);padding:var(--uploader-file-name-padding,0 4px);text-align:center;width:100%}.van-uploader__mask{align-items:center;background-color:var(--uploader-mask-background-color,rgba(50,50,51,.88));bottom:0;color:#fff;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;right:0;top:0}.van-uploader__mask-icon{font-size:var(--uploader-mask-icon-size,22px)}.van-uploader__mask-message{font-size:var(--uploader-mask-message-font-size,12px);line-height:var(--uploader-mask-message-line-height,14px);margin-top:6px;padding:0 var(--padding-base,4px)}.van-uploader__loading{color:var(--uploader-loading-icon-color,#fff)!important;height:var(--uploader-loading-icon-size,22px);width:var(--uploader-loading-icon-size,22px)}"
  },
  {
    "path": "lib/uploader/shared.d.ts",
    "content": "export declare const imageProps: {\n    sizeType: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    showmenu: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n};\nexport declare const videoProps: {\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    compressed: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n    maxDuration: {\n        type: NumberConstructor;\n        value: number;\n    };\n    camera: {\n        type: StringConstructor;\n        value: string;\n    };\n    referrerPolicy: {\n        type: StringConstructor;\n        value: string;\n    };\n};\nexport declare const mediaProps: {\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    mediaType: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    maxDuration: {\n        type: NumberConstructor;\n        value: number;\n    };\n    camera: {\n        type: StringConstructor;\n        value: string;\n    };\n};\nexport declare const messageFileProps: {\n    extension: null;\n    previewFile: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n};\n"
  },
  {
    "path": "lib/uploader/shared.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.messageFileProps = exports.mediaProps = exports.videoProps = exports.imageProps = void 0;\n// props for image\nexports.imageProps = {\n    sizeType: {\n        type: Array,\n        value: ['original', 'compressed'],\n    },\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    showmenu: {\n        type: Boolean,\n        value: true,\n    },\n};\n// props for video\nexports.videoProps = {\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    compressed: {\n        type: Boolean,\n        value: true,\n    },\n    maxDuration: {\n        type: Number,\n        value: 60,\n    },\n    camera: {\n        type: String,\n        value: 'back',\n    },\n    referrerPolicy: {\n        type: String,\n        value: 'no-referrer',\n    },\n};\n// props for media\nexports.mediaProps = {\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    mediaType: {\n        type: Array,\n        value: ['image', 'video', 'mix'],\n    },\n    maxDuration: {\n        type: Number,\n        value: 60,\n    },\n    camera: {\n        type: String,\n        value: 'back',\n    },\n};\n// props for file\nexports.messageFileProps = {\n    extension: null,\n    previewFile: {\n        type: Boolean,\n        value: true,\n    },\n};\n"
  },
  {
    "path": "lib/uploader/utils.d.ts",
    "content": "export interface File {\n    url: string;\n    size?: number;\n    name?: string;\n    type: string;\n    duration?: number;\n    time?: number;\n    isImage?: boolean;\n    isVideo?: boolean;\n}\nexport declare function isImageFile(item: File): boolean;\nexport declare function isVideoFile(item: File): boolean;\nexport declare function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount, mediaType, extension, }: {\n    accept: any;\n    multiple: any;\n    capture: any;\n    compressed: any;\n    maxDuration: any;\n    sizeType: any;\n    camera: any;\n    maxCount: any;\n    mediaType: any;\n    extension: any;\n}): Promise<File | File[]>;\n"
  },
  {
    "path": "lib/uploader/utils.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chooseFile = exports.isVideoFile = exports.isImageFile = void 0;\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nfunction isImageFile(item) {\n    if (item.isImage != null) {\n        return item.isImage;\n    }\n    if (item.type) {\n        return item.type === 'image';\n    }\n    if (item.url) {\n        return (0, validator_1.isImageUrl)(item.url);\n    }\n    return false;\n}\nexports.isImageFile = isImageFile;\nfunction isVideoFile(item) {\n    if (item.isVideo != null) {\n        return item.isVideo;\n    }\n    if (item.type) {\n        return item.type === 'video';\n    }\n    if (item.url) {\n        return (0, validator_1.isVideoUrl)(item.url);\n    }\n    return false;\n}\nexports.isVideoFile = isVideoFile;\nfunction formatImage(res) {\n    return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['path'])), { type: 'image', url: item.tempFilePath || item.path, thumb: item.tempFilePath || item.path })); });\n}\nfunction formatVideo(res) {\n    return [\n        __assign(__assign({}, (0, utils_1.pickExclude)(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg'])), { type: 'video', url: res.tempFilePath, thumb: res.thumbTempFilePath }),\n    ];\n}\nfunction formatMedia(res) {\n    return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])), { type: item.fileType, url: item.tempFilePath, thumb: item.fileType === 'video' ? item.thumbTempFilePath : item.tempFilePath })); });\n}\nfunction formatFile(res) {\n    return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['path'])), { url: item.path })); });\n}\nfunction chooseFile(_a) {\n    var accept = _a.accept, multiple = _a.multiple, capture = _a.capture, compressed = _a.compressed, maxDuration = _a.maxDuration, sizeType = _a.sizeType, camera = _a.camera, maxCount = _a.maxCount, mediaType = _a.mediaType, extension = _a.extension;\n    return new Promise(function (resolve, reject) {\n        switch (accept) {\n            case 'image':\n                if (utils_1.isPC || utils_1.isWxWork) {\n                    wx.chooseImage({\n                        count: multiple ? Math.min(maxCount, 9) : 1,\n                        sourceType: capture,\n                        sizeType: sizeType,\n                        success: function (res) { return resolve(formatImage(res)); },\n                        fail: reject,\n                    });\n                }\n                else {\n                    wx.chooseMedia({\n                        count: multiple ? Math.min(maxCount, 9) : 1,\n                        mediaType: ['image'],\n                        sourceType: capture,\n                        maxDuration: maxDuration,\n                        sizeType: sizeType,\n                        camera: camera,\n                        success: function (res) { return resolve(formatImage(res)); },\n                        fail: reject,\n                    });\n                }\n                break;\n            case 'media':\n                wx.chooseMedia({\n                    count: multiple ? Math.min(maxCount, 9) : 1,\n                    mediaType: mediaType,\n                    sourceType: capture,\n                    maxDuration: maxDuration,\n                    sizeType: sizeType,\n                    camera: camera,\n                    success: function (res) { return resolve(formatMedia(res)); },\n                    fail: reject,\n                });\n                break;\n            case 'video':\n                wx.chooseVideo({\n                    sourceType: capture,\n                    compressed: compressed,\n                    maxDuration: maxDuration,\n                    camera: camera,\n                    success: function (res) { return resolve(formatVideo(res)); },\n                    fail: reject,\n                });\n                break;\n            default:\n                wx.chooseMessageFile(__assign(__assign({ count: multiple ? maxCount : 1, type: accept }, (extension ? { extension: extension } : {})), { success: function (res) { return resolve(formatFile(res)); }, fail: reject }));\n                break;\n        }\n    });\n}\nexports.chooseFile = chooseFile;\n"
  },
  {
    "path": "lib/wxs/add-unit.wxs",
    "content": "/* eslint-disable */\nvar REGEXP = getRegExp('^-?\\d+(\\.\\d+)?$');\n\nfunction addUnit(value) {\n  if (value == null) {\n    return undefined;\n  }\n\n  return REGEXP.test('' + value) ? value + 'px' : value;\n}\n\nmodule.exports = addUnit;\n"
  },
  {
    "path": "lib/wxs/array.wxs",
    "content": "function isArray(array) {\n  return array && array.constructor === 'Array';\n}\n\nmodule.exports.isArray = isArray;\n"
  },
  {
    "path": "lib/wxs/bem.wxs",
    "content": "/* eslint-disable */\nvar array = require('./array.wxs');\nvar object = require('./object.wxs');\nvar PREFIX = 'van-';\n\nfunction join(name, mods) {\n  name = PREFIX + name;\n  mods = mods.map(function(mod) {\n    return name + '--' + mod;\n  });\n  mods.unshift(name);\n  return mods.join(' ');\n}\n\nfunction traversing(mods, conf) {\n  if (!conf) {\n    return;\n  }\n\n  if (typeof conf === 'string' || typeof conf === 'number') {\n    mods.push(conf);\n  } else if (array.isArray(conf)) {\n    conf.forEach(function(item) {\n      traversing(mods, item);\n    });\n  } else if (typeof conf === 'object') {\n    object.keys(conf).forEach(function(key) {\n      conf[key] && mods.push(key);\n    });\n  }\n}\n\nfunction bem(name, conf) {\n  var mods = [];\n  traversing(mods, conf);\n  return join(name, mods);\n}\n\nmodule.exports = bem;\n"
  },
  {
    "path": "lib/wxs/memoize.wxs",
    "content": "/**\n * Simple memoize\n * wxs doesn't support fn.apply, so this memoize only support up to 2 args\n */\n/* eslint-disable */\n\nfunction isPrimitive(value) {\n  var type = typeof value;\n  return (\n    type === 'boolean' ||\n    type === 'number' ||\n    type === 'string' ||\n    type === 'undefined' ||\n    value === null\n  );\n}\n\n// mock simple fn.call in wxs\nfunction call(fn, args) {\n  if (args.length === 2) {\n    return fn(args[0], args[1]);\n  }\n\n  if (args.length === 1) {\n    return fn(args[0]);\n  }\n\n  return fn();\n}\n\nfunction serializer(args) {\n  if (args.length === 1 && isPrimitive(args[0])) {\n    return args[0];\n  }\n  var obj = {};\n  for (var i = 0; i < args.length; i++) {\n    obj['key' + i] = args[i];\n  }\n  return JSON.stringify(obj);\n}\n\nfunction memoize(fn) {\n  var cache = {};\n\n  return function() {\n    var key = serializer(arguments);\n    if (cache[key] === undefined) {\n      cache[key] = call(fn, arguments);\n    }\n\n    return cache[key];\n  };\n}\n\nmodule.exports = memoize;\n"
  },
  {
    "path": "lib/wxs/object.wxs",
    "content": "/* eslint-disable */\nvar REGEXP = getRegExp('{|}|\"', 'g');\n\nfunction keys(obj) {\n  return JSON.stringify(obj)\n    .replace(REGEXP, '')\n    .split(',')\n    .map(function(item) {\n      return item.split(':')[0];\n    });\n}\n\nmodule.exports.keys = keys;\n"
  },
  {
    "path": "lib/wxs/style.wxs",
    "content": "/* eslint-disable */\nvar object = require('./object.wxs');\nvar array = require('./array.wxs');\n\nfunction kebabCase(word) {\n  var newWord = word\n    .replace(getRegExp(\"[A-Z]\", 'g'), function (i) {\n      return '-' + i;\n    })\n    .toLowerCase()\n\n  return newWord;\n}\n\nfunction style(styles) {\n  if (array.isArray(styles)) {\n    return styles\n      .filter(function (item) {\n        return item != null && item !== '';\n      })\n      .map(function (item) {\n        return style(item);\n      })\n      .join(';');\n  }\n\n  if ('Object' === styles.constructor) {\n    return object\n      .keys(styles)\n      .filter(function (key) {\n        return styles[key] != null && styles[key] !== '';\n      })\n      .map(function (key) {\n        return [kebabCase(key), [styles[key]]].join(':');\n      })\n      .join(';');\n  }\n\n  return styles;\n}\n\nmodule.exports = style;\n"
  },
  {
    "path": "lib/wxs/utils.wxs",
    "content": "/* eslint-disable */\nvar bem = require('./bem.wxs');\nvar memoize = require('./memoize.wxs');\nvar addUnit = require('./add-unit.wxs');\n\nmodule.exports = {\n  bem: memoize(bem),\n  memoize: memoize,\n  addUnit: addUnit\n};\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"@vant/weapp\",\n  \"version\": \"1.11.7\",\n  \"author\": \"vant-ui\",\n  \"license\": \"MIT\",\n  \"miniprogram\": \"lib\",\n  \"description\": \"轻量、可靠的小程序 UI 组件库\",\n  \"publishConfig\": {\n    \"access\": \"public\",\n    \"registry\": \"https://registry.npmjs.org/\"\n  },\n  \"scripts\": {\n    \"dev\": \"node build/dev.mjs\",\n    \"lint\": \"eslint ./packages --ext .js,.ts --fix && stylelint \\\"packages/**/*.less\\\" --fix\",\n    \"prepare\": \"husky install\",\n    \"release\": \"sh build/release.sh\",\n    \"release:site\": \"vant-cli build-site && gh-pages -d site-dist --add\",\n    \"build:lib\": \"yarn && npx gulp -f build/compiler.js --series buildEs buildLib\",\n    \"upload:weapp\": \"node build/upload.js\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\"\n  },\n  \"files\": [\n    \"dist\",\n    \"lib\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/youzan/vant-weapp.git\"\n  },\n  \"lint-staged\": {\n    \"*.{ts,js}\": [\n      \"eslint --fix\",\n      \"prettier --write\"\n    ],\n    \"*.{css,less}\": [\n      \"stylelint --fix\",\n      \"prettier --write\"\n    ]\n  },\n  \"homepage\": \"https://github.com/youzan/vant-weapp#readme\",\n  \"devDependencies\": {\n    \"@babel/plugin-transform-modules-commonjs\": \"^7.16.0\",\n    \"@babel/preset-typescript\": \"^7.16.0\",\n    \"@types/jest\": \"^27.0.2\",\n    \"@vant/cli\": \"^7.0.3\",\n    \"@vant/icons\": \"^3.0.1\",\n    \"@vant/stylelint-config\": \"^1.4.2\",\n    \"gulp\": \"^4.0.2\",\n    \"gulp-insert\": \"^0.5.0\",\n    \"gulp-less\": \"^5.0.0\",\n    \"gulp-postcss\": \"^9.0.1\",\n    \"gulp-rename\": \"^2.0.0\",\n    \"gulp-typescript\": \"^6.0.0-alpha.1\",\n    \"jest\": \"^27.3.1\",\n    \"lint-staged\": \"^13.0.3\",\n    \"merge2\": \"^1.4.1\",\n    \"miniprogram-api-typings\": \"^3.1.6\",\n    \"miniprogram-ci\": \"^1.6.1\",\n    \"miniprogram-simulate\": \"^1.4.2\",\n    \"stylelint\": \"13.13.1\",\n    \"ts-jest\": \"^27.0.7\",\n    \"tscpaths\": \"^0.0.9\",\n    \"typescript\": \"^4.4.4\",\n    \"vue\": \"^3.2.30\"\n  },\n  \"browserslist\": [\n    \"Chrome >= 53\",\n    \"ChromeAndroid >= 53\",\n    \"iOS >= 9\"\n  ],\n  \"resolutions\": {\n    \"source-map\": \"0.7.4\"\n  }\n}\n"
  },
  {
    "path": "packages/action-sheet/README.md",
    "content": "# ActionSheet 动作面板\n\n### 介绍\n\n底部弹起的模态面板，包含与当前情境相关的多个选项。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-action-sheet\": \"@vant/weapp/action-sheet/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n需要传入一个`actions`的数组，数组的每一项是一个对象，对象属性见文档下方表格。\n\n```html\n<van-action-sheet\n  show=\"{{ show }}\"\n  actions=\"{{ actions }}\"\n  bind:close=\"onClose\"\n  bind:select=\"onSelect\"\n/>\n```\n\n```javascript\nPage({\n  data: {\n    show: false,\n    actions: [\n      {\n        name: '选项',\n      },\n      {\n        name: '选项',\n      },\n      {\n        name: '选项',\n        subname: '描述信息',\n        openType: 'share',\n      },\n    ],\n  },\n\n  onClose() {\n    this.setData({ show: false });\n  },\n\n  onSelect(event) {\n    console.log(event.detail);\n  },\n});\n```\n\n### 展示取消按钮\n\n设置`cancel-text`属性后，会在底部展示取消按钮，点击后关闭当前菜单。\n\n```html\n<van-action-sheet\n  show=\"{{ show }}\"\n  actions=\"{{ actions }}\"\n  cancel-text=\"取消\"\n/>\n```\n\n### 展示描述信息\n\n设置`description`属性后，会在选项上方显示描述信息。\n\n```html\n<van-action-sheet\n  show=\"{{ show }}\"\n  actions=\"{{ actions }}\"\n  description=\"这是一段描述信息\"\n/>\n```\n\n### 选项状态\n\n选项可以设置为加载状态或禁用状态。\n\n```html\n<van-action-sheet\n  show=\"{{ show }}\"\n  actions=\"{{ actions }}\"\n  cancel-text=\"取消\"\n/>\n```\n\n```javascript\nPage({\n  data: {\n    show: false,\n    actions: [\n      { name: '着色选项', color: '#ee0a24' },\n      { loading: true },\n      { name: '禁用选项', disabled: true },\n    ],\n  },\n});\n```\n\n### 自定义面板\n\n通过设置`title`属性展示标题栏，同时可以使用插槽自定义菜单内容。\n\n```html\n<van-action-sheet show=\"{{ show }}\" title=\"标题\">\n  <view>内容</view>\n</van-action-sheet>\n```\n\n### 微信开放能力\n\n需要传入一个`actions`的数组，数组的每一项是一个对象，对象属性见文档下方表格。\n\n```html\n<van-action-sheet\n  show=\"{{ show }}\"\n  actions=\"{{ actions }}\"\n  bind:close=\"onClose\"\n  bind:getuserinfo=\"onGetUserInfo\"\n/>\n```\n\n```javascript\nPage({\n  data: {\n    show: false,\n    actions: [\n      { name: '获取用户信息', color: '#07c160', openType: 'getUserInfo' },\n    ],\n  },\n\n  onClose() {\n    this.setData({ show: false });\n  },\n\n  onGetUserInfo(e) {\n    console.log(e.detail);\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| show | 是否显示动作面板 | _boolean_ | - |\n| actions | 菜单选项 | _Array_ | `[]` |\n| title | 标题 | _string_ | - |\n| description `v1.0.0` | 选项上方的描述信息 | _string_ | - |\n| z-index | z-index 层级 | _number_ | `100` |\n| cancel-text | 取消按钮文字 | _string_ | - |\n| overlay | 是否显示遮罩层 | _boolean_ | - |\n| round `v1.0.0` | 是否显示圆角 | _boolean_ | `true` |\n| close-on-click-action | 是否在点击选项后关闭 | _boolean_ | `true` |\n| close-on-click-overlay | 点击遮罩是否关闭菜单 | _boolean_ | `true` |\n| safe-area-inset-bottom | 是否为 iPhoneX 留出底部安全距离 | _boolean_ | `true` |\n| root-portal `v1.11.3` | 是否从页面子树中脱离出来，用于解决各种 fixed 失效问题，微信基础库 >= `2.25.2 ` | _boolean_ | `false` |\n\n### Events\n\n| 事件名 | 说明 | 参数 |\n| --- | --- | --- |\n| bind:select | 选中选项时触发，禁用或加载状态下不会触发 | event.detail: 选项对应的对象 |\n| bind:close | 关闭时触发 | - |\n| bind:cancel | 取消按钮点击时触发 | - |\n| bind:click-overlay | 点击遮罩层时触发 | - |\n| bind:getuserinfo | 用户点击该按钮时，会返回获取到的用户信息，回调的 detail 数据与 wx.getUserInfo 返回的一致，<a href=\"#/action-sheet#actions\">openType</a>=\"getUserInfo\"时有效 | - |\n| bind:contact | 客服消息回调，<a href=\"#/action-sheet#actions\">openType</a>=\"contact\"时有效 | - |\n| bind:getphonenumber | 获取用户手机号回调，<a href=\"#/action-sheet#actions\">openType</a>=\"getPhoneNumber\"时有效 | - |\n| bind:getrealtimephonenumber `v1.10.21` | 获取手机号实时验证回调，<a href=\"#/action-sheet#actions\">openType</a>=\"getRealtimePhoneNumber\"时有效 | - |\n| bind:agreeprivacyauthorization `v1.10.24` | 同意隐私协议回调，<a href=\"#/action-sheet#actions\">openType</a>=\"agreePrivacyAuthorization\"时有效 | - |\n| bind:error | 当使用开放能力时，发生错误的回调，<a href=\"#/action-sheet#actions\">openType</a>=\"launchApp\"时有效 | - |\n| bind:launchapp | 打开 APP 成功的回调，<a href=\"#/action-sheet#actions\">openType</a>=\"launchApp\"时有效 | - |\n| bind:opensetting | 在打开授权设置页后回调，<a href=\"#/action-sheet#actions\">openType</a>=\"openSetting\"时有效 | - |\n\n### actions\n\n`API`中的`actions`为一个对象数组，数组中的每一个对象配置每一列，每一列有以下`key`：\n\n| 键名 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 标题 | _string_ | - |\n| subname | 二级标题 | _string_ | - |\n| color | 选项文字颜色 | _string_ | - |\n| loading | 是否为加载状态 | _boolean_ | - |\n| disabled | 是否为禁用状态 | _boolean_ | - |\n| className | 为对应列添加额外的 class 类名 | _string_ | - |\n| openType | 微信开放能力，具体支持可参考 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) | _string_ | - |\n| lang | 指定返回用户信息的语言，zh_CN 简体中文，zh_TW 繁体中文，en 英文 | _string_ | `en` |\n| sessionFrom | 会话来源，openType=\"contact\"时有效 | _string_ | - |\n| sendMessageTitle | 会话内消息卡片标题，openType=\"contact\"时有效 | _string_ | 当前标题 |\n| sendMessagePath | 会话内消息卡片点击跳转小程序路径，openType=\"contact\"时有效 | _string_ | 当前分享路径 |\n| sendMessageImg | 会话内消息卡片图片，openType=\"contact\"时有效 | _string_ | 截图 |\n| showMessageCard | 是否显示会话内消息卡片，设置此参数为 true，用户进入客服会话会在右下角显示\"可能要发送的小程序\"提示，用户点击后可以快速发送小程序消息，openType=\"contact\"时有效 | _string_ | `false` |\n| appParameter | 打开 APP 时，向 APP 传递的参数，openType=launchApp 时有效 | _string_ | - |\n\n### 外部样式类\n\n| 类名                   | 说明                |\n| ---------------------- | ------------------- |\n| custom-class `v1.10.7` | 根节点样式类        |\n| list-class `v1.10.7`   | `actions`容器样式类 |\n"
  },
  {
    "path": "packages/action-sheet/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../../button/index\",\n    \"van-action-sheet\": \"../../action-sheet/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/action-sheet/demo/index.less",
    "content": ".content {\n  padding: 20px;\n}\n"
  },
  {
    "path": "packages/action-sheet/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    show1: false,\n    show2: false,\n    show3: false,\n    show4: false,\n    show5: false,\n    show6: false,\n    action1: [\n      { name: '选项' },\n      { name: '选项' },\n      { name: '选项', subname: '描述信息' },\n    ],\n    action2: [\n      { name: '着色选项', color: '#ee0a24' },\n      { loading: true },\n      { name: '禁用选项', disabled: true },\n    ],\n    action6: [\n      { name: '获取用户信息', color: '#07c160', openType: 'getUserInfo' },\n    ],\n  },\n\n  methods: {\n    toggle(type) {\n      this.setData({\n        [type]: !this.data[type],\n      });\n    },\n\n    toggleActionSheet1() {\n      this.toggle('show1');\n    },\n\n    toggleActionSheet2() {\n      this.toggle('show2');\n    },\n\n    toggleActionSheet3() {\n      this.toggle('show3');\n    },\n\n    toggleActionSheet4() {\n      this.toggle('show4');\n    },\n\n    toggleActionSheet5() {\n      this.toggle('show5');\n    },\n\n    toggleActionSheet6() {\n      this.toggle('show6');\n    },\n\n    onGetUserInfo(e) {\n      console.log(e.detail);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/action-sheet/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n  <van-button type=\"primary\" bind:click=\"toggleActionSheet1\">弹出菜单</van-button>\n  <van-action-sheet\n    show=\"{{ show1 }}\"\n    actions=\"{{ action1 }}\"\n    bind:close=\"toggleActionSheet1\"\n  />\n</demo-block>\n\n<demo-block title=\"选项状态\" padding>\n  <van-button type=\"primary\" bind:click=\"toggleActionSheet2\">弹出菜单</van-button>\n  <van-action-sheet\n    show=\"{{ show2 }}\"\n    actions=\"{{ action2 }}\"\n    bind:close=\"toggleActionSheet2\"\n  />\n</demo-block>\n\n<demo-block title=\"展示取消按钮\" padding>\n  <van-button type=\"primary\" bind:click=\"toggleActionSheet3\">弹出菜单</van-button>\n  <van-action-sheet\n    show=\"{{ show3 }}\"\n    actions=\"{{ action1 }}\"\n    cancel-text=\"取消\"\n    bind:close=\"toggleActionSheet3\"\n  >\n  </van-action-sheet>\n</demo-block>\n\n<demo-block title=\"展示描述信息\" padding>\n  <van-button type=\"primary\" bind:click=\"toggleActionSheet4\">弹出菜单</van-button>\n  <van-action-sheet\n    show=\"{{ show4 }}\"\n    actions=\"{{ action1 }}\"\n    description=\"这是一段描述信息\"\n    bind:close=\"toggleActionSheet4\"\n  >\n  </van-action-sheet>\n</demo-block>\n\n<demo-block title=\"展示标题栏\" padding>\n  <van-button type=\"primary\" bind:click=\"toggleActionSheet5\">弹出菜单</van-button>\n  <van-action-sheet\n    show=\"{{ show5 }}\"\n    title=\"标题\"\n    bind:close=\"toggleActionSheet5\"\n  >\n    <view class=\"content\">内容</view>\n  </van-action-sheet>\n</demo-block>\n\n<demo-block title=\"微信开放能力\" padding>\n  <van-button type=\"primary\" bind:click=\"toggleActionSheet6\">弹出菜单</van-button>\n  <van-action-sheet\n    show=\"{{ show6 }}\"\n    title=\"标题\"\n    bind:close=\"toggleActionSheet6\"\n    actions=\"{{ action6 }}\"\n    bind:getuserinfo=\"onGetUserInfo\"\n  >\n  </van-action-sheet>\n</demo-block>\n"
  },
  {
    "path": "packages/action-sheet/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-popup\": \"../popup/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "packages/action-sheet/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-action-sheet {\n  max-height: var(\n    --action-sheet-max-height,\n    @action-sheet-max-height\n  ) !important;\n  color: var(--action-sheet-item-text-color, @action-sheet-item-text-color);\n\n  &__item,\n  &__cancel {\n    padding: 14px @padding-md;\n    text-align: center;\n    font-size: var(--action-sheet-item-font-size, @action-sheet-item-font-size);\n    line-height: var(\n      --action-sheet-item-line-height,\n      @action-sheet-item-line-height\n    );\n    background-color: var(\n      --action-sheet-item-background,\n      @action-sheet-item-background\n    );\n\n    &--hover {\n      background-color: @active-color;\n    }\n\n    // reset weapp default border\n    &::after {\n      border-width: 0;\n    }\n  }\n\n  &__cancel {\n    color: var(\n      --action-sheet-cancel-text-color,\n      @action-sheet-cancel-text-color\n    );\n  }\n\n  &__gap {\n    display: block;\n    height: var(\n      --action-sheet-cancel-padding-top,\n      @action-sheet-cancel-padding-top\n    );\n    background-color: var(\n      --action-sheet-cancel-padding-color,\n      @action-sheet-cancel-padding-color\n    );\n  }\n\n  &__item--disabled {\n    color: var(\n      --action-sheet-item-disabled-text-color,\n      @action-sheet-item-disabled-text-color\n    );\n  }\n\n  &__item--disabled&__item--hover {\n    background-color: var(\n      --action-sheet-item-background,\n      @action-sheet-item-background\n    );\n  }\n\n  &__subname {\n    margin-top: var(--padding-xs, @padding-xs);\n    font-size: var(\n      --action-sheet-subname-font-size,\n      @action-sheet-subname-font-size\n    );\n    color: var(--action-sheet-subname-color, @action-sheet-subname-color);\n    line-height: var(\n      --action-sheet-subname-line-height,\n      @action-sheet-subname-line-height\n    );\n  }\n\n  &__header {\n    text-align: center;\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n    font-size: var(\n      --action-sheet-header-font-size,\n      @action-sheet-header-font-size\n    );\n    line-height: var(--action-sheet-header-height, @action-sheet-header-height);\n  }\n\n  &__description {\n    text-align: center;\n    padding: 20px var(--padding-md, @padding-md);\n    color: var(\n      --action-sheet-description-color,\n      @action-sheet-description-color\n    );\n    font-size: var(\n      --action-sheet-description-font-size,\n      @action-sheet-description-font-size\n    );\n    line-height: var(\n      --action-sheet-description-line-height,\n      @action-sheet-description-line-height\n    );\n  }\n\n  &__close {\n    position: absolute !important;\n    top: 0;\n    right: 0;\n    line-height: inherit !important;\n    padding: var(\n      --action-sheet-close-icon-padding,\n      @action-sheet-close-icon-padding\n    );\n    font-size: var(\n      --action-sheet-close-icon-size,\n      @action-sheet-close-icon-size\n    ) !important;\n    color: var(--action-sheet-close-icon-color, @action-sheet-close-icon-color);\n  }\n\n  &__loading {\n    display: flex !important;\n  }\n}\n"
  },
  {
    "path": "packages/action-sheet/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\n\nVantComponent({\n  classes: ['list-class'],\n\n  mixins: [button],\n  props: {\n    show: Boolean,\n    title: String,\n    cancelText: String,\n    description: String,\n    round: {\n      type: Boolean,\n      value: true,\n    },\n    zIndex: {\n      type: Number,\n      value: 100,\n    },\n    actions: {\n      type: Array,\n      value: [],\n    },\n    overlay: {\n      type: Boolean,\n      value: true,\n    },\n    closeOnClickOverlay: {\n      type: Boolean,\n      value: true,\n    },\n    closeOnClickAction: {\n      type: Boolean,\n      value: true,\n    },\n    safeAreaInsetBottom: {\n      type: Boolean,\n      value: true,\n    },\n    rootPortal: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  methods: {\n    onSelect(event: WechatMiniprogram.TouchEvent) {\n      const { index } = event.currentTarget.dataset;\n      const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data;\n      const item = actions[index];\n      if (item) {\n        this.$emit('select', item);\n\n        if (closeOnClickAction) {\n          this.onClose();\n        }\n\n        if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {\n          wx.getUserProfile({\n            desc: item.getUserProfileDesc || '  ',\n            complete: (userProfile) => {\n              this.$emit('getuserinfo', userProfile);\n            },\n          });\n        }\n      }\n    },\n\n    onCancel() {\n      this.$emit('cancel');\n    },\n\n    onClose() {\n      this.$emit('close');\n    },\n\n    onClickOverlay() {\n      this.$emit('click-overlay');\n      this.onClose();\n    },\n  },\n});\n"
  },
  {
    "path": "packages/action-sheet/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<van-popup\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  round=\"{{ round }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay=\"{{ overlay }}\"\n  custom-class=\"van-action-sheet custom-class\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClickOverlay\"\n>\n  <view wx:if=\"{{ title }}\" class=\"van-action-sheet__header\">\n    {{ title }}\n    <van-icon\n      name=\"cross\"\n      custom-class=\"van-action-sheet__close\"\n      bind:click=\"onClose\"\n    />\n  </view>\n  <view wx:if=\"{{ description }}\" class=\"van-action-sheet__description van-hairline--bottom\">\n    {{ description }}\n  </view>\n  <view wx:if=\"{{ actions && actions.length }}\" class=\"list-class\">\n    <!-- button外包一层view，防止actions动态变化，导致渲染时button被打散 -->\n    <button\n      wx:for=\"{{ actions }}\"\n      wx:key=\"index\"\n      open-type=\"{{ item.disabled || item.loading || (canIUseGetUserProfile && item.openType === 'getUserInfo') ? '' : item.openType }}\"\n      style=\"{{ item.color ? 'color: ' + item.color : '' }}\"\n      class=\"{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}\"\n      hover-class=\"van-action-sheet__item--hover\"\n      data-index=\"{{ index }}\"\n      bindtap=\"{{ item.disabled || item.loading ? '' : 'onSelect' }}\"\n      bindgetuserinfo=\"onGetUserInfo\"\n      bindcontact=\"onContact\"\n      bindgetphonenumber=\"onGetPhoneNumber\"\n      binderror=\"onError\"\n      bindlaunchapp=\"onLaunchApp\"\n      bindopensetting=\"onOpenSetting\"\n      lang=\"{{ lang }}\"\n      session-from=\"{{ sessionFrom }}\"\n      send-message-title=\"{{ sendMessageTitle }}\"\n      send-message-path=\"{{ sendMessagePath }}\"\n      send-message-img=\"{{ sendMessageImg }}\"\n      show-message-card=\"{{ showMessageCard }}\"\n      app-parameter=\"{{ appParameter }}\"\n    >\n      <block wx:if=\"{{ !item.loading }}\">\n        {{ item.name }}\n        <view wx:if=\"{{ item.subname }}\" class=\"van-action-sheet__subname\" >{{ item.subname }}</view>\n      </block>\n      <van-loading wx:else custom-class=\"van-action-sheet__loading\" size=\"22px\" />\n    </button>\n  </view>\n  <slot />\n  <block wx:if=\"{{ cancelText }}\">\n    <view class=\"van-action-sheet__gap\" />\n    <view\n      class=\"van-action-sheet__cancel\"\n      hover-class=\"van-action-sheet__cancel--hover\"\n      hover-stay-time=\"70\"\n      bind:tap=\"onCancel\"\n    >\n      {{ cancelText }}\n    </view>\n  </block>\n</van-popup>\n"
  },
  {
    "path": "packages/action-sheet/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-button\n        bind:click=\"toggleActionSheet1\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            弹出菜单\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-action-sheet\n        bind:close=\"toggleActionSheet1\"\n      >\n        <van-popup\n          customClass=\"van-action-sheet custom-class\"\n          bind:close=\"onClickOverlay\"\n        >\n          <van-overlay\n            bind:click=\"onClickOverlay\"\n          >\n            <van-transition\n              customClass=\"van-overlay custom-class\"\n              bind:tap=\"onClick\"\n              catch:touchmove=\"noop\"\n            />\n          </van-overlay>\n        </van-popup>\n      </van-action-sheet>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        选项状态\n      </wx-view>\n      <van-button\n        bind:click=\"toggleActionSheet2\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            弹出菜单\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-action-sheet\n        bind:close=\"toggleActionSheet2\"\n      >\n        <van-popup\n          customClass=\"van-action-sheet custom-class\"\n          bind:close=\"onClickOverlay\"\n        >\n          <van-overlay\n            bind:click=\"onClickOverlay\"\n          >\n            <van-transition\n              customClass=\"van-overlay custom-class\"\n              bind:tap=\"onClick\"\n              catch:touchmove=\"noop\"\n            />\n          </van-overlay>\n        </van-popup>\n      </van-action-sheet>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示取消按钮\n      </wx-view>\n      <van-button\n        bind:click=\"toggleActionSheet3\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            弹出菜单\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-action-sheet\n        bind:close=\"toggleActionSheet3\"\n      >\n        <van-popup\n          customClass=\"van-action-sheet custom-class\"\n          bind:close=\"onClickOverlay\"\n        >\n          <van-overlay\n            bind:click=\"onClickOverlay\"\n          >\n            <van-transition\n              customClass=\"van-overlay custom-class\"\n              bind:tap=\"onClick\"\n              catch:touchmove=\"noop\"\n            />\n          </van-overlay>\n        </van-popup>\n      </van-action-sheet>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示描述信息\n      </wx-view>\n      <van-button\n        bind:click=\"toggleActionSheet4\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            弹出菜单\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-action-sheet\n        bind:close=\"toggleActionSheet4\"\n      >\n        <van-popup\n          customClass=\"van-action-sheet custom-class\"\n          bind:close=\"onClickOverlay\"\n        >\n          <van-overlay\n            bind:click=\"onClickOverlay\"\n          >\n            <van-transition\n              customClass=\"van-overlay custom-class\"\n              bind:tap=\"onClick\"\n              catch:touchmove=\"noop\"\n            />\n          </van-overlay>\n        </van-popup>\n      </van-action-sheet>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示标题栏\n      </wx-view>\n      <van-button\n        bind:click=\"toggleActionSheet5\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            弹出菜单\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-action-sheet\n        bind:close=\"toggleActionSheet5\"\n      >\n        <van-popup\n          customClass=\"van-action-sheet custom-class\"\n          bind:close=\"onClickOverlay\"\n        >\n          <van-overlay\n            bind:click=\"onClickOverlay\"\n          >\n            <van-transition\n              customClass=\"van-overlay custom-class\"\n              bind:tap=\"onClick\"\n              catch:touchmove=\"noop\"\n            />\n          </van-overlay>\n        </van-popup>\n      </van-action-sheet>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        微信开放能力\n      </wx-view>\n      <van-button\n        bind:click=\"toggleActionSheet6\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            弹出菜单\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-action-sheet\n        bind:close=\"toggleActionSheet6\"\n        bind:getuserinfo=\"onGetUserInfo\"\n      >\n        <van-popup\n          customClass=\"van-action-sheet custom-class\"\n          bind:close=\"onClickOverlay\"\n        >\n          <van-overlay\n            bind:click=\"onClickOverlay\"\n          >\n            <van-transition\n              customClass=\"van-overlay custom-class\"\n              bind:tap=\"onClick\"\n              catch:touchmove=\"noop\"\n            />\n          </van-overlay>\n        </van-popup>\n      </van-action-sheet>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/action-sheet/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/area/README.md",
    "content": "# Area 省市区选择\n\n### 介绍\n\n省市区选择组件通常与 [弹出层](#/popup) 组件配合使用。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-area\": \"@vant/weapp/area/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n初始化省市区组件时，需要通过 `area-list` 属性传入省市区数据。\n\n```html\n<van-area area-list=\"{{ areaList }}\" />\n```\n\n### areaList 格式\n\nareaList 为对象结构，包含 `province_list`、`city_list`、`county_list` 三个 key。\n\n每项以地区码作为 key，省市区名字作为 value。地区码为 6 位数字，前两位代表省份，中间两位代表城市，后两位代表区县，以 0 补足 6 位。比如北京的地区码为 `11`，以 0 补足 6 位，为 `110000`。\n\n示例数据如下：\n\n```js\nconst areaList = {\n  province_list: {\n    110000: '北京市',\n    120000: '天津市',\n  },\n  city_list: {\n    110100: '北京市',\n    120100: '天津市',\n  },\n  county_list: {\n    110101: '东城区',\n    110102: '西城区',\n    // ....\n  },\n};\n```\n\n### @vant/area-data\n\nVant 官方提供了一份默认的省市区数据，可以通过 [@vant/area-data](https://github.com/vant-ui/vant/tree/dev/packages/vant-area-data) 引入。\n\n```bash\nyarn add @vant/area-data\n```\n\n```ts\nimport { areaList } from '@vant/area-data';\n\nPage({\n  data: {\n    areaList,\n  },\n});\n```\n\n### 选中省市区\n\n如果想选中某个省市区，需要传入一个`value`属性，绑定对应的省市区`code`。\n\n```html\n<van-area area-list=\"{{ areaList }}\" value=\"110101\" />\n```\n\n### 配置显示列\n\n可以通过`columns-num`属性配置省市区显示的列数，默认情况下会显示省市区，当你设置为`2`，则只会显示省市选择。\n\n```html\n<van-area area-list=\"{{ areaList }}\" columns-num=\"{{ 2 }}\" title=\"标题\" />\n```\n\n### 配置列占位提示文字\n\n可以通过`columns-placeholder`属性配置每一列的占位提示文字。\n\n```html\n<van-area\n  area-list=\"{{ areaList }}\"\n  columns-placeholder=\"{{ ['请选择', '请选择', '请选择'] }}\"\n  title=\"标题\"\n/>\n```\n\n## 云开发示例\n\n### 使用云开发获取省市区数据\n\n实际项目中，可以通过[小程序云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)的能力，将省市区数据保存在云开发的数据库中，并在小程序中使用云开发的接口异步获取数据。\n\n在小程序中使用云能力之前需要先调用`wx.could.init`方法完成云能力的初始化。\n\n```js\nconst db = wx.cloud.database();\n\ndb.collection('region')\n  .limit(1)\n  .get()\n  .then((res) => {\n    if (res.data && res.data.length > 0) {\n      this.setData({\n        areaList: res.data[0],\n      });\n    }\n  })\n  .catch((err) => {\n    console.log(err);\n  });\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| value | 当前选中的省市区`code` | _string_ | - |\n| title | 顶部栏标题 | _string_ | - |\n| area-list | 省市区数据，格式见下方 | _object_ | - |\n| columns-num | 省市区显示列数，3-省市区，2-省市，1-省 | _number_ | `3` |\n| columns-placeholder | 列占位提示文字 | _string[]_ | `[]` |\n| loading | 是否显示加载状态 | _boolean_ | `false` |\n| item-height | 选项高度 | _number_ | `44` |\n| visible-item-count | 可见的选项个数 | _number_ | `6` |\n| confirm-button-text | 确认按钮文字 | _string_ | `确认` |\n| cancel-button-text | 取消按钮文字 | _string_ | `取消` |\n| show-toolbar `1.10.3` | 是否显示顶部栏 | _boolean_ | `true` |\n\n### Events\n\n| 事件 | 说明 | 回调参数 |\n| --- | --- | --- |\n| bind:confirm | 点击右上方完成按钮 | 一个数组参数，具体格式看下方数据格式章节 |\n| bind:cancel | 点击取消按钮时 | - |\n| bind:change | 选项改变时触发 | Picker 实例，所有列选中值，当前列对应的索引 |\n\n### 方法\n\n通过 selectComponent 可以获取到 Area 实例并调用实例方法。\n\n| 方法名 | 参数 | 返回值 | 介绍 |\n| --- | --- | --- | --- |\n| reset | code: string | - | 根据 code 重置所有选项，若不传 code，则重置到第一项 |\n\n### 点击完成时返回的数据格式\n\n返回的数据整体为一个 Object，包含 `values`, `index` 两个 key。\n\n`values` 整体为一个数组，数组内包含 `columnsNum` 个数据， 每个数据对应一列选项中被选中的数据。\n\n`code` 代表被选中的地区编码， `name` 代表被选中的地区名称。\n\n```javascript\n[\n  {\n    code: '110000',\n    name: '北京市',\n  },\n  {\n    code: '110100',\n    name: '北京市',\n  },\n  {\n    code: '110101',\n    name: '东城区',\n  },\n];\n```\n\n`index` 为一个数组，数组内包含 `columnsNum` 个数据， 每个数据对应一列选项中被选中项的序号。\n"
  },
  {
    "path": "packages/area/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-area\": \"../../area/index\",\n    \"van-toast\": \"../../toast/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/area/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nconst db = wx.cloud?.database();\n\nVantComponent({\n  data: {\n    areaList: {},\n    loading: true,\n    value: 330302,\n  },\n\n  mounted() {\n    db?.collection('region')\n      .limit(1)\n      .get()\n      .then((res) => {\n        if (res.data && res.data.length > 0) {\n          this.setData({\n            loading: false,\n            areaList: res.data[0],\n          });\n        }\n      })\n      .catch((err) => {\n        console.log(err);\n        this.setData({\n          loading: false,\n        });\n      });\n  },\n\n  methods: {\n    onChange(event) {\n      const { values } = event.detail;\n\n      Toast({\n        context: this,\n        message: values.map((item) => item.name).join('-'),\n      });\n    },\n\n    onConfirm(event) {\n      console.log(event);\n    },\n\n    onCancel(event) {\n      console.log(event);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/area/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-area\n    value=\"{{ value }}\"\n    loading=\"{{ loading }}\"\n    area-list=\"{{ areaList }}\"\n    bind:change=\"onChange\"\n    bind:confirm=\"onConfirm\"\n    bind:cancel=\"onCancel\"\n  />\n</demo-block>\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/area/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-picker\": \"../picker/index\"\n  }\n}\n"
  },
  {
    "path": "packages/area/index.less",
    "content": "// empty\n"
  },
  {
    "path": "packages/area/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { pickerProps } from '../picker/shared';\nimport { requestAnimationFrame } from '../common/utils';\n\ntype AreaItem = {\n  name: string;\n  code: string;\n};\n\nconst EMPTY_CODE = '000000';\n\nVantComponent({\n  classes: ['active-class', 'toolbar-class', 'column-class'],\n\n  props: {\n    ...pickerProps,\n    showToolbar: {\n      type: Boolean,\n      value: true,\n    },\n    value: {\n      type: String,\n      observer(value: string) {\n        this.code = value;\n        this.setValues();\n      },\n    },\n    areaList: {\n      type: Object,\n      value: {},\n      observer: 'setValues',\n    },\n    columnsNum: {\n      type: null,\n      value: 3,\n    },\n    columnsPlaceholder: {\n      type: Array,\n      observer(val) {\n        this.setData({\n          typeToColumnsPlaceholder: {\n            province: val[0] || '',\n            city: val[1] || '',\n            county: val[2] || '',\n          },\n        });\n      },\n    },\n  },\n\n  data: {\n    columns: [{ values: [] }, { values: [] }, { values: [] }],\n    typeToColumnsPlaceholder: {},\n  },\n\n  mounted() {\n    requestAnimationFrame(() => {\n      this.setValues();\n    });\n  },\n\n  methods: {\n    getPicker() {\n      if (this.picker == null) {\n        this.picker = this.selectComponent('.van-area__picker');\n      }\n      return this.picker;\n    },\n\n    onCancel(event: WechatMiniprogram.CustomEvent) {\n      this.emit('cancel', event.detail);\n    },\n\n    onConfirm(event: WechatMiniprogram.CustomEvent) {\n      const { index } = event.detail;\n      let { value } = event.detail;\n      value = this.parseValues(value);\n      this.emit('confirm', { value, index });\n    },\n\n    emit(type: string, detail) {\n      detail.values = detail.value;\n      delete detail.value;\n      this.$emit(type, detail);\n    },\n\n    parseValues(values: AreaItem[]) {\n      const { columnsPlaceholder } = this.data;\n\n      return values.map((value, index) => {\n        if (\n          value &&\n          (!value.code || value.name === columnsPlaceholder[index])\n        ) {\n          return {\n            ...value,\n            code: '',\n            name: '',\n          };\n        }\n\n        return value;\n      });\n    },\n\n    onChange(event: WechatMiniprogram.CustomEvent) {\n      const { index, picker, value } = event.detail;\n      this.code = value[index].code;\n      this.setValues()?.then(() => {\n        this.$emit('change', {\n          picker,\n          values: this.parseValues(picker.getValues()),\n          index,\n        });\n      });\n    },\n\n    getConfig(type: string) {\n      const { areaList } = this.data;\n      return (areaList && areaList[`${type}_list`]) || {};\n    },\n\n    getList(type: string, code?: string): AreaItem[] {\n      if (type !== 'province' && !code) {\n        return [];\n      }\n\n      const { typeToColumnsPlaceholder } = this.data;\n      const list: Record<string, string> = this.getConfig(type);\n      let result = Object.keys(list).map((code) => ({\n        code,\n        name: list[code],\n      }));\n\n      if (code != null) {\n        // oversea code\n        if (code[0] === '9' && type === 'city') {\n          code = '9';\n        }\n\n        result = result.filter(\n          (item) => item.code.indexOf(code as string) === 0\n        );\n      }\n\n      if (typeToColumnsPlaceholder[type] && result.length) {\n        // set columns placeholder\n        const codeFill =\n          type === 'province'\n            ? ''\n            : type === 'city'\n            ? EMPTY_CODE.slice(2, 4)\n            : EMPTY_CODE.slice(4, 6);\n\n        result.unshift({\n          code: `${code}${codeFill}`,\n          name: typeToColumnsPlaceholder[type],\n        });\n      }\n\n      return result;\n    },\n\n    getIndex(type: string, code: string) {\n      let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;\n      const list = this.getList(type, code.slice(0, compareNum - 2));\n\n      // oversea code\n      if (code[0] === '9' && type === 'province') {\n        compareNum = 1;\n      }\n\n      code = code.slice(0, compareNum);\n      for (let i = 0; i < list.length; i++) {\n        if (list[i].code.slice(0, compareNum) === code) {\n          return i;\n        }\n      }\n\n      return 0;\n    },\n\n    setValues() {\n      const picker = this.getPicker();\n\n      if (!picker) {\n        return;\n      }\n\n      let code = this.code || this.getDefaultCode();\n      const provinceList = this.getList('province');\n      const cityList = this.getList('city', code.slice(0, 2));\n\n      const stack: Promise<void>[] = [];\n      const indexes: number[] = [];\n      const { columnsNum } = this.data;\n\n      if (columnsNum >= 1) {\n        stack.push(picker.setColumnValues(0, provinceList, false));\n        indexes.push(this.getIndex('province', code));\n      }\n\n      if (columnsNum >= 2) {\n        stack.push(picker.setColumnValues(1, cityList, false));\n        indexes.push(this.getIndex('city', code));\n        if (cityList.length && code.slice(2, 4) === '00') {\n          [{ code }] = cityList;\n        }\n      }\n\n      if (columnsNum === 3) {\n        stack.push(\n          picker.setColumnValues(\n            2,\n            this.getList('county', code.slice(0, 4)),\n            false\n          )\n        );\n        indexes.push(this.getIndex('county', code));\n      }\n\n      return Promise.all(stack)\n        .catch(() => {})\n        .then(() => picker.setIndexes(indexes))\n        .catch(() => {});\n    },\n\n    getDefaultCode() {\n      const { columnsPlaceholder } = this.data;\n\n      if (columnsPlaceholder.length) {\n        return EMPTY_CODE;\n      }\n\n      const countyCodes = Object.keys(this.getConfig('county'));\n      if (countyCodes[0]) {\n        return countyCodes[0];\n      }\n\n      const cityCodes = Object.keys(this.getConfig('city'));\n      if (cityCodes[0]) {\n        return cityCodes[0];\n      }\n\n      return '';\n    },\n\n    getValues() {\n      const picker = this.getPicker();\n\n      if (!picker) {\n        return [];\n      }\n\n      return this.parseValues(picker.getValues().filter((value) => !!value));\n    },\n\n    getDetail() {\n      const values = this.getValues();\n      const area = {\n        code: '',\n        country: '',\n        province: '',\n        city: '',\n        county: '',\n      };\n\n      if (!values.length) {\n        return area;\n      }\n\n      const names = values.map((item: AreaItem) => item.name);\n      area.code = values[values.length - 1].code;\n      if (area.code[0] === '9') {\n        area.country = names[1] || '';\n        area.province = names[2] || '';\n      } else {\n        area.province = names[0] || '';\n        area.city = names[1] || '';\n        area.county = names[2] || '';\n      }\n\n      return area;\n    },\n\n    reset(code) {\n      this.code = code || '';\n      return this.setValues();\n    },\n  },\n});\n"
  },
  {
    "path": "packages/area/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-picker\n  class=\"van-area__picker\"\n  active-class=\"active-class\"\n  toolbar-class=\"toolbar-class\"\n  column-class=\"column-class\"\n  show-toolbar=\"{{ showToolbar }}\"\n  value-key=\"name\"\n  title=\"{{ title }}\"\n  loading=\"{{ loading }}\"\n  columns=\"{{ computed.displayColumns(columns, columnsNum) }}\"\n  item-height=\"{{ itemHeight }}\"\n  visible-item-count=\"{{ visibleItemCount }}\"\n  cancel-button-text=\"{{ cancelButtonText }}\"\n  confirm-button-text=\"{{ confirmButtonText }}\"\n  bind:change=\"onChange\"\n  bind:confirm=\"onConfirm\"\n  bind:cancel=\"onCancel\"\n/>\n"
  },
  {
    "path": "packages/area/index.wxs",
    "content": "/* eslint-disable */\nfunction displayColumns(columns, columnsNum) {\n  return columns.slice(0, +columnsNum);\n}\n\nmodule.exports = {\n  displayColumns: displayColumns,\n};\n"
  },
  {
    "path": "packages/area/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-area\n        bind:cancel=\"onCancel\"\n        bind:change=\"onChange\"\n        bind:confirm=\"onConfirm\"\n      >\n        <van-picker\n          activeClass=\"active-class\"\n          class=\"van-area__picker\"\n          columnClass=\"column-class\"\n          toolbarClass=\"toolbar-class\"\n          bind:cancel=\"onCancel\"\n          bind:change=\"onChange\"\n          bind:confirm=\"onConfirm\"\n        >\n          <wx-view\n            class=\"van-picker custom-class\"\n          >\n            <wx-view\n              class=\"van-picker__toolbar toolbar-class\"\n            >\n              <wx-view\n                class=\"van-picker__cancel\"\n                data-type=\"cancel\"\n                hoverClass=\"van-picker__cancel--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    取消\n  \n              </wx-view>\n              <wx-view\n                class=\"van-picker__confirm\"\n                data-type=\"confirm\"\n                hoverClass=\"van-picker__confirm--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    确认\n  \n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-picker__loading\"\n            >\n              <loading>\n                <wx-view\n                  class=\"custom-class van-loading\"\n                >\n                  <wx-view\n                    class=\"van-loading__spinner van-loading__spinner--circular\"\n                    style=\"color:#1989fa\"\n                  />\n                  <wx-view\n                    class=\"van-loading__text\"\n                    style=\"\"\n                  />\n                </wx-view>\n              </loading>\n            </wx-view>\n            <wx-view\n              class=\"van-picker__columns\"\n              style=\"height:264px\"\n              catch:touchmove=\"noop\"\n            >\n              <picker-column\n                activeClass=\"active-class\"\n                class=\"van-picker__column\"\n                customClass=\"column-class\"\n                data-index=\"{{0}}\"\n                bind:change=\"onChange\"\n              >\n                <wx-view\n                  class=\"van-picker-column custom-class\"\n                  style=\"height:264px\"\n                  bind:touchcancel=\"onTouchEnd\"\n                  bind:touchend=\"onTouchEnd\"\n                  catch:touchmove=\"onTouchMove\"\n                  bind:touchstart=\"onTouchStart\"\n                >\n                  <wx-view\n                    style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                  />\n                </wx-view>\n              </picker-column>\n              <picker-column\n                activeClass=\"active-class\"\n                class=\"van-picker__column\"\n                customClass=\"column-class\"\n                data-index=\"{{1}}\"\n                bind:change=\"onChange\"\n              >\n                <wx-view\n                  class=\"van-picker-column custom-class\"\n                  style=\"height:264px\"\n                  bind:touchcancel=\"onTouchEnd\"\n                  bind:touchend=\"onTouchEnd\"\n                  catch:touchmove=\"onTouchMove\"\n                  bind:touchstart=\"onTouchStart\"\n                >\n                  <wx-view\n                    style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                  />\n                </wx-view>\n              </picker-column>\n              <picker-column\n                activeClass=\"active-class\"\n                class=\"van-picker__column\"\n                customClass=\"column-class\"\n                data-index=\"{{2}}\"\n                bind:change=\"onChange\"\n              >\n                <wx-view\n                  class=\"van-picker-column custom-class\"\n                  style=\"height:264px\"\n                  bind:touchcancel=\"onTouchEnd\"\n                  bind:touchend=\"onTouchEnd\"\n                  catch:touchmove=\"onTouchMove\"\n                  bind:touchstart=\"onTouchStart\"\n                >\n                  <wx-view\n                    style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                  />\n                </wx-view>\n              </picker-column>\n              <wx-view\n                class=\"van-picker__mask\"\n                style=\"background-size:100% 110px\"\n              />\n              <wx-view\n                class=\"van-picker__frame van-hairline--top-bottom\"\n                style=\"height:44px\"\n              />\n            </wx-view>\n          </wx-view>\n        </van-picker>\n      </van-area>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/area/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/button/README.md",
    "content": "# Button 按钮\n\n### 介绍\n\n按钮用于触发一个操作，如提交表单。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-button\": \"@vant/weapp/button/index\"\n}\n```\n\n## 代码演示\n\n### 按钮类型\n\n支持`default`、`primary`、`info`、`warning`、`danger`五种类型，默认为`default`。\n\n```html\n<van-button type=\"default\">默认按钮</van-button>\n<van-button type=\"primary\">主要按钮</van-button>\n<van-button type=\"info\">信息按钮</van-button>\n<van-button type=\"warning\">警告按钮</van-button>\n<van-button type=\"danger\">危险按钮</van-button>\n```\n\n### 朴素按钮\n\n通过`plain`属性将按钮设置为朴素按钮，朴素按钮的文字为按钮颜色，背景为白色。\n\n```html\n<van-button plain type=\"primary\">朴素按钮</van-button>\n<van-button plain type=\"info\">朴素按钮</van-button>\n```\n\n### 细边框\n\n设置`hairline`属性可以开启 0.5px 边框，基于伪类实现。\n\n```html\n<van-button plain hairline type=\"primary\">细边框按钮</van-button>\n<van-button plain hairline type=\"info\">细边框按钮</van-button>\n```\n\n### 禁用状态\n\n通过`disabled`属性来禁用按钮，此时按钮的`bind:click`事件不会触发。\n\n```html\n<van-button disabled type=\"primary\">禁用状态</van-button>\n<van-button disabled type=\"info\">禁用状态</van-button>\n```\n\n### 加载状态\n\n```html\n<van-button loading type=\"primary\" />\n<van-button loading type=\"primary\" loading-type=\"spinner\" />\n<van-button loading type=\"info\" loading-text=\"加载中...\" />\n```\n\n### 按钮形状\n\n```html\n<van-button square type=\"primary\">方形按钮</van-button>\n<van-button round type=\"info\">圆形按钮</van-button>\n```\n\n### 图标按钮\n\n通过`icon`属性设置按钮图标，支持 Icon 组件里的所有图标，也可以传入图标 URL。\n\n```html\n<van-button icon=\"star-o\" type=\"primary\" />\n<van-button icon=\"star-o\" type=\"primary\">按钮</van-button>\n<van-button icon=\"https://img.yzcdn.cn/vant/logo.png\" type=\"info\">\n  按钮\n</van-button>\n```\n\n### 按钮尺寸\n\n支持`large`、`normal`、`small`、`mini`四种尺寸，默认为`normal`。\n\n```html\n<van-button type=\"primary\" size=\"large\">大号按钮</van-button>\n<van-button type=\"primary\" size=\"normal\">普通按钮</van-button>\n<van-button type=\"primary\" size=\"small\">小型按钮</van-button>\n<van-button type=\"primary\" size=\"mini\">迷你按钮</van-button>\n```\n\n### 块级元素\n\n通过`block`属性可以将按钮的元素类型设置为块级元素。\n\n```html\n<van-button type=\"primary\" block>块级元素</van-button>\n```\n\n### 自定义颜色\n\n通过`color`属性可以自定义按钮的颜色。\n\n```html\n<van-button color=\"#7232dd\">单色按钮</van-button>\n<van-button color=\"#7232dd\" plain>单色按钮</van-button>\n<van-button color=\"linear-gradient(to right, #4bb0ff, #6149f6)\">\n  渐变色按钮\n</van-button>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| id | 标识符 | _string_ | - |\n| button-id `v1.10.25` | 标识符，作为原生 button 组件的 id 值 | _string_ | - |\n| type | 按钮类型，可选值为 `primary` `info` `warning` `danger` | _string_ | `default` |\n| size | 按钮尺寸，可选值为 `normal` `large` `small` `mini` | _string_ | `normal` |\n| color `v1.0.0` | 按钮颜色，支持传入`linear-gradient`渐变色 | _string_ | - |\n| icon | 左侧图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | - |\n| class-prefix | 图标类名前缀，同 Icon 组件的 [class-prefix 属性](#/icon) | _string_ | `van-icon` |\n| plain | 是否为朴素按钮 | _boolean_ | `false` |\n| block | 是否为块级元素 | _boolean_ | `false` |\n| round | 是否为圆形按钮 | _boolean_ | `false` |\n| square | 是否为方形按钮 | _boolean_ | `false` |\n| disabled | 是否禁用按钮 | _boolean_ | `false` |\n| hairline | 是否使用 0.5px 边框 | _boolean_ | `false` |\n| loading | 是否显示为加载状态 | _boolean_ | `false` |\n| loading-text | 加载状态提示文字 | _string_ | - |\n| loading-type | 加载状态图标类型，可选值为 `spinner` | _string_ | `circular` |\n| loading-size | 加载图标大小 | _string_ | `20px` |\n| custom-style | 自定义样式 | _string_ | - |\n| open-type | 微信开放能力，具体支持可参考 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) | _string_ | - |\n| app-parameter | 打开 APP 时，向 APP 传递的参数 | _string_ | - |\n| lang | 指定返回用户信息的语言，zh_CN 简体中文，<br>zh_TW 繁体中文，en 英文 | _string_ | `en` |\n| session-from | 会话来源 | _string_ | - |\n| business-id | 客服消息子商户 id | _number_ | - |\n| send-message-title | 会话内消息卡片标题 | _string_ | 当前标题 |\n| send-message-path | 会话内消息卡片点击跳转小程序路径 | _string_ | 当前分享路径 |\n| send-message-img | sendMessageImg | _string_ | 截图 |\n| show-message-card | 显示会话内消息卡片 | _string_ | `false` |\n| dataset | 按钮 dataset，open-type 为 `share` 时，可在 onShareAppMessage 事件的 `event.target.dataset.detail` 中看到传入的值 | _any_ | - |\n| form-type | 用于 form 组件，可选值为`submit` `reset`，点击分别会触发 form 组件的 submit/reset 事件 | _string_ | - |\n\n### Events\n\n| 事件名 | 说明 | 参数 |\n| --- | --- | --- |\n| bind:click | 点击按钮，且按钮状态不为加载或禁用时触发 | - |\n| bind:getuserinfo | 用户点击该按钮时，会返回获取到的用户信息，<br>从返回参数的 detail 中获取到的值同 wx.getUserInfo | - |\n| bind:contact | 客服消息回调 | - |\n| bind:getphonenumber | 获取用户手机号回调 | - |\n| bind:getrealtimephonenumber `v1.10.21` | 获取手机号实时验证回调，open-type=getRealtimePhoneNumber 时有效 | - |\n| bind:agreeprivacyauthorization `v1.10.24` | 同意隐私协议回调，openType=\"agreePrivacyAuthorization\"时有效 | - |\n| bind:error | 当使用开放能力时，发生错误的回调 | - |\n| bind:opensetting | 在打开授权设置页后回调 | - |\n| bind:chooseavatar | 当 open-type 的值为 chooseAvatar 时，选择头像之后的回调 |\n\n> Button 提供的是 click 事件而不是原生 tap 事件，按钮禁用时，click 事件不会触发，tap 事件依然会触发。\n\n### 外部样式类\n\n| 类名          | 说明                   |\n| ------------- | ---------------------- |\n| custom-class  | 根节点样式类           |\n| hover-class   | 指定按钮按下去的样式类 |\n| loading-class | 加载图标样式类         |\n"
  },
  {
    "path": "packages/button/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../../button/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/button/demo/index.less",
    "content": ".row {\n  height: 44px;\n  margin-bottom: 15px;\n}\n\n.demo-margin-left {\n  margin-left: 10px;\n}\n\n.demo-margin-right {\n  margin-right: 10px;\n}\n\n.demo-margin-bottom {\n  display: block;\n  margin-bottom: 15px;\n}\n"
  },
  {
    "path": "packages/button/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {},\n});\n"
  },
  {
    "path": "packages/button/demo/index.wxml",
    "content": "<demo-block title=\"按钮类型\" padding>\n  <view class=\"row\">\n    <van-button class=\"demo-margin-right\">默认按钮</van-button>\n    <van-button type=\"primary\" class=\"demo-margin-right\">主要按钮</van-button>\n    <van-button type=\"info\" class=\"demo-margin-right\">信息按钮</van-button>\n  </view>\n  <van-button type=\"danger\" class=\"demo-margin-right\">危险按钮</van-button>\n  <van-button type=\"warning\">警告按钮</van-button>\n</demo-block>\n\n<demo-block title=\"朴素按钮\" padding>\n  <van-button type=\"primary\" plain class=\"demo-margin-right\">朴素按钮</van-button>\n  <van-button type=\"info\" plain>朴素按钮</van-button>\n</demo-block>\n\n<demo-block title=\"细边框\" padding>\n  <van-button type=\"primary\" plain hairline class=\"demo-margin-right\">细边框按钮</van-button>\n  <van-button type=\"info\" plain hairline>细边框按钮</van-button>\n</demo-block>\n\n<demo-block title=\"禁用状态\" padding>\n  <van-button type=\"primary\" disabled class=\"demo-margin-right\">禁用状态</van-button>\n  <van-button type=\"info\" disabled>禁用状态</van-button>\n</demo-block>\n\n<demo-block title=\"加载状态\" padding>\n  <van-button loading type=\"primary\" class=\"demo-margin-right\" />\n  <van-button loading type=\"primary\" loading-type=\"spinner\" class=\"demo-margin-right\" />\n  <van-button loading type=\"info\" loading-text=\"加载中...\" />\n</demo-block>\n\n<demo-block title=\"按钮形状\" padding>\n  <van-button type=\"primary\" square class=\"demo-margin-right\">方形按钮</van-button>\n  <van-button type=\"info\" round>圆形按钮</van-button>\n</demo-block>\n\n<demo-block title=\"图标按钮\" padding>\n  <van-button type=\"primary\" icon=\"star-o\" class=\"demo-margin-right\" />\n  <van-button type=\"primary\" icon=\"star-o\" class=\"demo-margin-right\">按钮</van-button>\n  <van-button plain type=\"primary\" icon=\"https://img.yzcdn.cn/vant/logo.png\">按钮</van-button>\n</demo-block>\n\n<demo-block title=\"按钮尺寸\" padding>\n  <van-button type=\"primary\" size=\"large\" block custom-class=\"demo-margin-bottom\">大号按钮</van-button>\n  <van-button type=\"primary\" class=\"demo-margin-right\">普通按钮</van-button>\n  <van-button type=\"primary\" size=\"small\" class=\"demo-margin-right\">小型按钮</van-button>\n  <van-button type=\"primary\" size=\"mini\">迷你按钮</van-button>\n</demo-block>\n\n<demo-block title=\"块级元素\" padding>\n  <van-button type=\"primary\" custom-class=\"demo-margin-bottom\">普通按钮</van-button>\n  <van-button type=\"primary\" block>块级元素</van-button>\n</demo-block>\n\n<demo-block title=\"自定义颜色\" padding>\n  <van-button color=\"#7232dd\" class=\"demo-margin-right\">单色按钮</van-button>\n  <van-button color=\"#7232dd\" class=\"demo-margin-right\" plain>单色按钮</van-button>\n  <van-button color=\"linear-gradient(to right, #4bb0ff, #6149f6)\">渐变色按钮</van-button>\n</demo-block>\n"
  },
  {
    "path": "packages/button/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "packages/button/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-button {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  box-sizing: border-box;\n  padding: 0;\n  text-align: center;\n  vertical-align: middle;\n  -webkit-appearance: none;\n  -webkit-text-size-adjust: 100%;\n  height: var(--button-default-height, @button-default-height);\n  line-height: var(--button-line-height, @button-line-height);\n  font-size: var(--button-default-font-size, @button-default-font-size);\n  transition: opacity @animation-duration-fast;\n  border-radius: var(--button-border-radius, @button-border-radius);\n\n  &::before {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    width: 100%;\n    height: 100%;\n    border: inherit;\n    border-radius: inherit; /* inherit parent's border radius */\n    transform: translate(-50%, -50%);\n    opacity: 0;\n    content: ' ';\n    background-color: @black;\n    border-color: @black;\n  }\n\n  // reset weapp default border\n  &::after {\n    border-width: 0;\n  }\n\n  &--active::before {\n    opacity: 0.15;\n  }\n\n  &--unclickable::after {\n    display: none;\n  }\n\n  &--default {\n    color: var(--button-default-color, @button-default-color);\n    background: var(\n      --button-default-background-color,\n      @button-default-background-color\n    );\n    border: var(--button-border-width, @button-border-width) solid\n      var(--button-default-border-color, @button-default-border-color);\n  }\n\n  &--primary {\n    color: var(--button-primary-color, @button-primary-color);\n    background: var(\n      --button-primary-background-color,\n      @button-primary-background-color\n    );\n    border: var(--button-border-width, @button-border-width) solid\n      var(--button-primary-border-color, @button-primary-border-color);\n  }\n\n  &--info {\n    color: var(--button-info-color, @button-info-color);\n    background: var(\n      --button-info-background-color,\n      @button-info-background-color\n    );\n    border: var(--button-border-width, @button-border-width) solid\n      var(--button-info-border-color, @button-info-border-color);\n  }\n\n  &--danger {\n    color: var(--button-danger-color, @button-danger-color);\n    background: var(\n      --button-danger-background-color,\n      @button-danger-background-color\n    );\n    border: var(--button-border-width, @button-border-width) solid\n      var(--button-danger-border-color, @button-danger-border-color);\n  }\n\n  &--warning {\n    color: var(--button-warning-color, @button-warning-color);\n    background: var(\n      --button-warning-background-color,\n      @button-warning-background-color\n    );\n    border: var(--button-border-width, @button-border-width) solid\n      var(--button-warning-border-color, @button-warning-border-color);\n  }\n\n  &--plain {\n    background: var(\n      --button-plain-background-color,\n      @button-plain-background-color\n    );\n\n    &.van-button--primary {\n      color: var(\n        --button-primary-background-color,\n        @button-primary-background-color\n      );\n    }\n\n    &.van-button--info {\n      color: var(--button-info-background-color, @button-info-background-color);\n    }\n\n    &.van-button--danger {\n      color: var(\n        --button-danger-background-color,\n        @button-danger-background-color\n      );\n    }\n\n    &.van-button--warning {\n      color: var(\n        --button-warning-background-color,\n        @button-warning-background-color\n      );\n    }\n  }\n\n  &--large {\n    width: 100%;\n    height: var(--button-large-height, @button-large-height);\n  }\n\n  &--normal {\n    padding: 0 15px;\n    font-size: var(--button-normal-font-size, @button-normal-font-size);\n  }\n\n  &--small {\n    min-width: var(--button-small-min-width, @button-small-min-width);\n    height: var(--button-small-height, @button-small-height);\n    padding: 0 var(--padding-xs, @padding-xs);\n    font-size: var(--button-small-font-size, @button-small-font-size);\n  }\n\n  // mini图标默认宽度50px，文字不能超过4个\n  &--mini {\n    display: inline-block;\n    min-width: var(--button-mini-min-width, @button-mini-min-width);\n    height: var(--button-mini-height, @button-mini-height);\n    font-size: var(--button-mini-font-size, @button-mini-font-size);\n\n    & + .van-button--mini {\n      margin-left: 5px;\n    }\n  }\n\n  &--block {\n    display: flex;\n    width: 100%;\n  }\n\n  &--round {\n    border-radius: var(\n      --button-round-border-radius,\n      @button-round-border-radius\n    );\n  }\n\n  &--square {\n    border-radius: 0;\n  }\n\n  &--disabled {\n    opacity: var(--button-disabled-opacity, @button-disabled-opacity);\n  }\n\n  &__text {\n    display: inline;\n  }\n\n  &__loading-text,\n  &__icon + &__text:not(:empty) {\n    margin-left: @padding-base;\n  }\n\n  &__icon {\n    min-width: 1em;\n    line-height: inherit !important;\n    vertical-align: top;\n  }\n\n  &--hairline {\n    padding-top: 1px; // add 1px padding for text vertical align middle\n    border-width: 0;\n\n    &::after {\n      border-color: inherit;\n      border-width: 1px;\n      border-radius: calc(\n        var(--button-border-radius, @button-border-radius) * 2\n      );\n    }\n\n    &.van-button--round::after {\n      border-radius: var(\n        --button-round-border-radius,\n        @button-round-border-radius\n      );\n    }\n\n    &.van-button--square::after {\n      border-radius: 0;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/button/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\nimport { canIUseFormFieldButton } from '../common/version';\n\nconst mixins = [button];\nif (canIUseFormFieldButton()) {\n  mixins.push('wx://form-field-button');\n}\n\nVantComponent({\n  mixins,\n\n  classes: ['hover-class', 'loading-class'],\n\n  data: {\n    baseStyle: '',\n  },\n\n  props: {\n    formType: String,\n    icon: String,\n    classPrefix: {\n      type: String,\n      value: 'van-icon',\n    },\n    plain: Boolean,\n    block: Boolean,\n    round: Boolean,\n    square: Boolean,\n    loading: Boolean,\n    hairline: Boolean,\n    disabled: Boolean,\n    loadingText: String,\n    customStyle: String,\n    loadingType: {\n      type: String,\n      value: 'circular',\n    },\n    type: {\n      type: String,\n      value: 'default',\n    },\n    dataset: null,\n    size: {\n      type: String,\n      value: 'normal',\n    },\n    loadingSize: {\n      type: String,\n      value: '20px',\n    },\n    color: String,\n  },\n\n  methods: {\n    onClick(event: WechatMiniprogram.TouchEvent) {\n      this.$emit('click', event);\n\n      const {\n        canIUseGetUserProfile,\n        openType,\n        getUserProfileDesc,\n        lang,\n      } = this.data;\n\n      if (openType === 'getUserInfo' && canIUseGetUserProfile) {\n        wx.getUserProfile({\n          desc: getUserProfileDesc || '  ',\n          lang: lang || 'en',\n          complete: (userProfile) => {\n            this.$emit('getuserinfo', userProfile);\n          },\n        });\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/button/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<button\n  id=\"{{ id || buttonId }}\"\n  data-detail=\"{{ dataset }}\"\n  class=\"custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}\"\n  hover-class=\"{{ disabled || loading ? '' : 'van-button--active hover-class'}}\"\n  lang=\"{{ lang }}\"\n  form-type=\"{{ formType }}\"\n  style=\"{{ computed.rootStyle({ plain, color, customStyle }) }}\"\n  open-type=\"{{ disabled || loading || (canIUseGetUserProfile && openType === 'getUserInfo') ? '' : openType }}\"\n  business-id=\"{{ businessId ? businessId : '' }}\"\n  session-from=\"{{ sessionFrom }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  app-parameter=\"{{ appParameter }}\"\n  aria-label=\"{{ ariaLabel }}\"\n  bindtap=\"{{ disabled || loading ? '' : 'onClick' }}\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindcontact=\"onContact\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindgetrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n  bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n  binderror=\"onError\"\n  bindlaunchapp=\"onLaunchApp\"\n  bindopensetting=\"onOpenSetting\"\n  bindchooseavatar=\"onChooseAvatar\"\n>\n  <block wx:if=\"{{ loading }}\">\n    <van-loading\n      custom-class=\"loading-class\"\n      size=\"{{ loadingSize }}\"\n      type=\"{{ loadingType }}\"\n      color=\"{{ computed.loadingColor({ type, color, plain }) }}\"\n    />\n    <view wx:if=\"{{ loadingText }}\" class=\"van-button__loading-text\">\n      {{ loadingText }}\n    </view>\n  </block>\n  <block wx:else>\n    <van-icon\n      wx:if=\"{{ icon }}\"\n      size=\"1.2em\"\n      name=\"{{ icon }}\"\n      class-prefix=\"{{ classPrefix }}\"\n      class=\"van-button__icon\"\n      custom-style=\"line-height: inherit;\"\n    />\n    <view class=\"van-button__text\">\n      <slot />\n    </view>\n  </block>\n</button>\n"
  },
  {
    "path": "packages/button/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  if (!data.color) {\n    return data.customStyle;\n  }\n\n  var properties = {\n    color: data.plain ? data.color : '#fff',\n    background: data.plain ? null : data.color,\n  };\n\n  // hide border when color is linear-gradient\n  if (data.color.indexOf('gradient') !== -1) {\n    properties.border = 0;\n  } else {\n    properties['border-color'] = data.color;\n  }\n\n  return style([properties, data.customStyle]);\n}\n\nfunction loadingColor(data) {\n  if (data.plain) {\n    return data.color ? data.color : '#c9c9c9';\n  }\n\n  if (data.type === 'default') {\n    return '#c9c9c9';\n  }\n\n  return '#fff';\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  loadingColor: loadingColor,\n};\n"
  },
  {
    "path": "packages/button/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        按钮类型\n      </wx-view>\n      <wx-view\n        class=\"row\"\n      >\n        <van-button\n          class=\"demo-margin-right\"\n        >\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--default van-button--normal \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              默认按钮\n            </wx-view>\n          </wx-button>\n        </van-button>\n        <van-button\n          class=\"demo-margin-right\"\n        >\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--primary van-button--normal \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              主要按钮\n            </wx-view>\n          </wx-button>\n        </van-button>\n        <van-button\n          class=\"demo-margin-right\"\n        >\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--info van-button--normal \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              信息按钮\n            </wx-view>\n          </wx-button>\n        </van-button>\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--danger van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            危险按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--warning van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            警告按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        朴素按钮\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal van-button--plain \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            朴素按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--info van-button--normal van-button--plain \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            朴素按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        细边框\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal van-button--plain van-button--hairline van-hairline--surround\"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            细边框按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--info van-button--normal van-button--plain van-button--hairline van-hairline--surround\"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            细边框按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用状态\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal van-button--disabled van-button--unclickable \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            禁用状态\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--info van-button--normal van-button--disabled van-button--unclickable \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            禁用状态\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载状态\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal van-button--loading van-button--unclickable \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"\"\n        >\n          <van-loading\n            customClass=\"loading-class\"\n          >\n            <wx-view\n              class=\"custom-class van-loading\"\n            >\n              <wx-view\n                class=\"van-loading__spinner van-loading__spinner--circular\"\n                style=\"color:#fff;width:20px;height:20px\"\n              />\n              <wx-view\n                class=\"van-loading__text\"\n                style=\"\"\n              />\n            </wx-view>\n          </van-loading>\n        </wx-button>\n      </van-button>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal van-button--loading van-button--unclickable \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"\"\n        >\n          <van-loading\n            customClass=\"loading-class\"\n          >\n            <wx-view\n              class=\"custom-class van-loading\"\n            >\n              <wx-view\n                class=\"van-loading__spinner van-loading__spinner--spinner\"\n                style=\"color:#fff;width:20px;height:20px\"\n              >\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n                <wx-view\n                  class=\"van-loading__dot\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-loading__text\"\n                style=\"\"\n              />\n            </wx-view>\n          </van-loading>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--info van-button--normal van-button--loading van-button--unclickable \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"\"\n        >\n          <van-loading\n            customClass=\"loading-class\"\n          >\n            <wx-view\n              class=\"custom-class van-loading\"\n            >\n              <wx-view\n                class=\"van-loading__spinner van-loading__spinner--circular\"\n                style=\"color:#fff;width:20px;height:20px\"\n              />\n              <wx-view\n                class=\"van-loading__text\"\n                style=\"\"\n              />\n            </wx-view>\n          </van-loading>\n          <wx-view\n            class=\"van-button__loading-text\"\n          >\n            \n      加载中...\n    \n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        按钮形状\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal van-button--square \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            方形按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--info van-button--normal van-button--round \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            圆形按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        图标按钮\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <van-icon\n            class=\"van-button__icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-star-o\"\n              style=\"font-size:1.2em;line-height: inherit;\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n          <wx-view\n            class=\"van-button__text\"\n          />\n        </wx-button>\n      </van-button>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <van-icon\n            class=\"van-button__icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-star-o\"\n              style=\"font-size:1.2em;line-height: inherit;\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n          <wx-view\n            class=\"van-button__text\"\n          >\n            按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal van-button--plain \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <van-icon\n            class=\"van-button__icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon--image\"\n              style=\"font-size:1.2em;line-height: inherit;\"\n              bind:tap=\"onClick\"\n            >\n              <wx-image\n                class=\"van-icon__image\"\n                mode=\"aspectFit\"\n                src=\"https://img.yzcdn.cn/vant/logo.png\"\n              />\n            </wx-view>\n          </van-icon>\n          <wx-view\n            class=\"van-button__text\"\n          >\n            按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        按钮尺寸\n      </wx-view>\n      <van-button\n        customClass=\"demo-margin-bottom\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--large van-button--block \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            大号按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            普通按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--small \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            小型按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--mini \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            迷你按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        块级元素\n      </wx-view>\n      <van-button\n        customClass=\"demo-margin-bottom\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            普通按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal van-button--block \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            块级元素\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义颜色\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--default van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"color:#fff;background:#7232dd;border-color:#7232dd\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            单色按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button\n        class=\"demo-margin-right\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--default van-button--normal van-button--plain \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"color:#7232dd;border-color:#7232dd\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            单色按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button>\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--default van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"color:#fff;background:linear-gradient(to right, #4bb0ff, #6149f6);border:0\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            渐变色按钮\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/button/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/button/test/index.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ndescribe('button', () => {\n  const VanButton = simulate.load(\n    path.resolve(__dirname, '../../button/index'),\n    'van-button',\n    {\n      rootPath: path.resolve(__dirname, '../../'),\n    }\n  );\n\n  test('should emit click event', async () => {\n    const comp = simulate.render(\n      simulate.load({\n        usingComponents: {\n          'van-button': VanButton,\n        },\n        template: `<van-button id=\"wrapper\" bind:click=\"onClick\" />`,\n        data: {\n          tapValue: 0,\n        },\n        methods: {\n          onClick() {\n            this.setData({\n              tapValue: this.data.tapValue + 1,\n            });\n          },\n        },\n      })\n    );\n    comp.attach(document.createElement('parent-wrapper'));\n\n    const wrapper = comp.querySelector('#wrapper');\n    const btn = wrapper?.querySelector('.van-button');\n    btn?.dispatchEvent('tap');\n    await simulate.sleep(10);\n    expect(comp.data.tapValue).toEqual(1);\n  });\n\n  test('should not emit click event when disabled', async () => {\n    const comp = simulate.render(\n      simulate.load({\n        usingComponents: {\n          'van-button': VanButton,\n        },\n        template: `<van-button id=\"wrapper\" disabled bind:click=\"onClick\" />`,\n        data: {\n          tapValue: 0,\n        },\n        methods: {\n          onClick() {\n            this.setData({\n              tapValue: this.data.tapValue + 1,\n            });\n          },\n        },\n      })\n    );\n    comp.attach(document.createElement('parent-wrapper'));\n\n    const wrapper = comp.querySelector('#wrapper');\n    const btn = wrapper?.querySelector('.van-button');\n    btn?.dispatchEvent('tap');\n    await simulate.sleep(10);\n    expect(comp.data.tapValue).toEqual(0);\n  });\n});\n"
  },
  {
    "path": "packages/calendar/README.md",
    "content": "# Calendar 日历\n\n### 介绍\n\n日历组件用于选择日期或日期区间。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-calendar\": \"@vant/weapp/calendar/index\"\n}\n```\n\n## 代码演示\n\n### 选择单个日期\n\n下面演示了结合单元格来使用日历组件的用法，日期选择完成后会触发`confirm`事件。\n\n```html\n<van-cell title=\"选择单个日期\" value=\"{{ date }}\" bind:click=\"onDisplay\" />\n<van-calendar show=\"{{ show }}\" bind:close=\"onClose\" bind:confirm=\"onConfirm\" />\n```\n\n```js\nPage({\n  data: {\n    date: '',\n    show: false,\n  },\n\n  onDisplay() {\n    this.setData({ show: true });\n  },\n  onClose() {\n    this.setData({ show: false });\n  },\n  formatDate(date) {\n    date = new Date(date);\n    return `${date.getMonth() + 1}/${date.getDate()}`;\n  },\n  onConfirm(event) {\n    this.setData({\n      show: false,\n      date: this.formatDate(event.detail),\n    });\n  },\n});\n```\n\n### 选择多个日期\n\n设置`type`为`multiple`后可以选择多个日期，此时`confirm`事件返回的 date 为数组结构，数组包含若干个选中的日期。\n\n```html\n<van-cell title=\"选择多个日期\" value=\"{{ text }}\" bind:click=\"onDisplay\" />\n<van-calendar\n  show=\"{{ show }}\"\n  type=\"multiple\"\n  bind:close=\"onClose\"\n  bind:confirm=\"onConfirm\"\n/>\n```\n\n```js\nPage({\n  data: {\n    text: '',\n    show: false,\n  },\n\n  onDisplay() {\n    this.setData({ show: true });\n  },\n  onClose() {\n    this.setData({ show: false });\n  },\n  onConfirm(event) {\n    this.setData({\n      show: false,\n      text: `选择了 ${event.detail.length} 个日期`,\n    });\n  },\n});\n```\n\n### 选择日期区间\n\n设置`type`为`range`后可以选择日期区间，此时`confirm`事件返回的 date 为数组结构，数组第一项为开始时间，第二项为结束时间。\n\n```html\n<van-cell title=\"选择日期区间\" value=\"{{ date }}\" bind:click=\"onDisplay\" />\n<van-calendar\n  show=\"{{ show }}\"\n  type=\"range\"\n  bind:close=\"onClose\"\n  bind:confirm=\"onConfirm\"\n/>\n```\n\n```js\nPage({\n  data: {\n    date: '',\n    show: false,\n  },\n\n  onDisplay() {\n    this.setData({ show: true });\n  },\n  onClose() {\n    this.setData({ show: false });\n  },\n  formatDate(date) {\n    date = new Date(date);\n    return `${date.getMonth() + 1}/${date.getDate()}`;\n  },\n  onConfirm(event) {\n    const [start, end] = event.detail;\n    this.setData({\n      show: false,\n      date: `${this.formatDate(start)} - ${this.formatDate(end)}`,\n    });\n  },\n});\n```\n\n> Tips: 默认情况下，日期区间的起止时间不能为同一天，可以通过设置 allow-same-day 属性来允许选择同一天。\n\n### 快捷选择\n\n将`show-confirm`设置为`false`可以隐藏确认按钮，这种情况下选择完成后会立即触发`confirm`事件。\n\n```html\n<van-calendar show=\"{{ show }}\" show-confirm=\"{{ false }}\" />\n```\n\n### 自定义颜色\n\n通过`color`属性可以自定义日历的颜色，对选中日期和底部按钮生效。\n\n```html\n<van-calendar show=\"{{ show }}\" color=\"#07c160\" />\n```\n\n### 自定义日期范围\n\n通过`min-date`和`max-date`定义日历的范围，需要注意的是`min-date`和`max-date`的区间不宜过大，否则会造成严重的性能问题。\n\n```html\n<van-calendar\n  show=\"{{ show }}\"\n  min-date=\"{{ minDate }}\"\n  max-date=\"{{ maxDate }}\"\n/>\n```\n\n```js\nPage({\n  data: {\n    show: false,\n    minDate: new Date(2010, 0, 1).getTime(),\n    maxDate: new Date(2010, 0, 31).getTime(),\n  },\n});\n```\n\n### 自定义按钮文字\n\n通过`confirm-text`设置按钮文字，通过`confirm-disabled-text`设置按钮禁用时的文字。\n\n```html\n<van-calendar\n  show=\"{{ show }}\"\n  type=\"range\"\n  confirm-text=\"完成\"\n  confirm-disabled-text=\"请选择结束时间\"\n/>\n```\n\n### 自定义日期文案\n\n通过传入`formatter`函数来对日历上每一格的内容进行格式化\n\n```html\n<van-calendar show=\"{{ show }}\" type=\"range\" formatter=\"{{ formatter }}\" />\n```\n\n```js\nPage({\n  data: {\n    formatter(day) {\n      const month = day.date.getMonth() + 1;\n      const date = day.date.getDate();\n\n      if (month === 5) {\n        if (date === 1) {\n          day.topInfo = '劳动节';\n        } else if (date === 4) {\n          day.topInfo = '五四青年节';\n        } else if (date === 11) {\n          day.text = '今天';\n        }\n      }\n\n      if (day.type === 'start') {\n        day.bottomInfo = '入住';\n      } else if (day.type === 'end') {\n        day.bottomInfo = '离店';\n      }\n\n      return day;\n    },\n  },\n});\n```\n\n### 自定义弹出位置\n\n通过`position`属性自定义弹出层的弹出位置，可选值为`top`、`left`、`right`。\n\n```html\n<van-calendar show=\"{{ show }}\" round=\"false\" position=\"right\" />\n```\n\n### 日期区间最大范围\n\n选择日期区间时，可以通过`max-range`属性来指定最多可选天数，选择的范围超过最多可选天数时，会弹出相应的提示文案。\n\n```html\n<van-calendar type=\"range\" max-range=\"{{ 3 }}\" />\n```\n\n### 自定义周起始日\n\n通过 `first-day-of-week` 属性设置一周从哪天开始。\n\n```html\n<van-calendar first-day-of-week=\"{{ 1 }}\" />\n```\n\n### 平铺展示\n\n将`poppable`设置为`false`，日历会直接展示在页面内，而不是以弹层的形式出现。\n\n```html\n<van-calendar\n  title=\"日历\"\n  poppable=\"{{ false }}\"\n  show-confirm=\"{{ false }}\"\n  class=\"calendar\"\n/>\n```\n\n```css\n.calendar {\n  --calendar-height: 618px;\n}\n```\n\n> Tips: 注意，在自定义calendar的高度时，需要确保，滚动到当前月份时，所有的日期要展现在.van-calendar__body内，否则可能会出现滚动时头部月份与当前月份不同步的情况。目前平铺型预设高度618px,弹窗型高度90%。\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| type | 选择类型:<br>`single`表示选择单个日期，<br>`multiple`表示选择多个日期，<br>`range`表示选择日期区间 | _string_ | `single` |\n| title | 日历标题 | _string_ | `日期选择` |\n| color | 主题色，对底部按钮和选中日期生效 | _string_ | `#ee0a24` |\n| min-date | 可选择的最小日期 | _timestamp_ | 当前日期 |\n| max-date | 可选择的最大日期 | _timestamp_ | 当前日期的六个月后 |\n| default-date `v1.10.21` | 默认选中的日期，`type`为`multiple`或`range`时为数组，传入 `null` 表示默认不选择| _timestamp \\| timestamp[] \\| null_ | 今天 |\n| row-height | 日期行高 | _number \\| string_ | `64` |\n| formatter | 日期格式化函数 | _(day: Day) => Day_ | - |\n| poppable | 是否以弹层的形式展示日历 | _boolean_ | `true` |\n| show-mark | 是否显示月份背景水印 | _boolean_ | `true` |\n| show-title | 是否展示日历标题 | _boolean_ | `true` |\n| show-subtitle | 是否展示日历副标题（年月） | _boolean_ | `true` |\n| show-confirm | 是否展示确认按钮 | _boolean_ | `true` |\n| confirm-text | 确认按钮的文字 | _string_ | `确定` |\n| confirm-disabled-text | 确认按钮处于禁用状态时的文字 | _string_ | `确定` |\n| first-day-of-week | 设置周起始日 | _0~6_ | `0` |\n| readonly `v1.9.1` | 是否为只读状态，只读状态下不能选择日期 | _boolean_ | `false` |\n| root-portal `v1.11.3` | 是否从页面子树中脱离出来，用于解决各种 fixed 失效问题，微信基础库 >= `2.25.2 `  | _boolean_ | `false` |\n\n### Poppable Props\n\n当 Calendar 的 `poppable` 为 `true` 时，支持以下 props:\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| show | 是否显示日历弹窗 | _boolean_ | `false` |\n| position | 弹出位置，可选值为 `top` `right` `left` | _string_ | `bottom` |\n| round | 是否显示圆角弹窗 | _boolean_ | `true` |\n| close-on-click-overlay | 是否在点击遮罩层后关闭 | _boolean_ | `true` |\n| safe-area-inset-bottom | 是否开启底部安全区适配 | _boolean_ | `true` |\n\n### Range Props\n\n当 Calendar 的 `type` 为 `range` 时，支持以下 props:\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| max-range | 日期区间最多可选天数，默认无限制 | _number \\| string_ | - |\n| range-prompt | 范围选择超过最多可选天数时的提示文案 | _string \\| null_ | `选择天数不能超过 xx 天` |\n| show-range-prompt | 范围选择超过最多可选天数时，是否展示提示文案 | _boolean_ | `true` |\n| allow-same-day | 是否允许日期范围的起止时间为同一天 | _boolean_ | `false` |\n\n### Multiple Props\n\n当 Calendar 的 `type` 为 `multiple` 时，支持以下 props:\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| min-range | 日期最少可选天数 | _number \\| string_ | `1` |\n\n### Day 数据结构\n\n日历中的每个日期都对应一个 Day 对象，通过`formatter`属性可以自定义 Day 对象的内容。\n\n| 键名 | 说明 | 类型 |\n| --- | --- | --- |\n| date | 日期对应的 Date 对象 | _Date_ |\n| type | 日期类型，可选值为`selected`、`start`、`middle`、`end`、`disabled` | _string_ |\n| text | 中间显示的文字 | _string_ |\n| topInfo | 上方的提示信息 | _string_ |\n| bottomInfo | 下方的提示信息 | _string_ |\n| className | 自定义 className | _string_ |\n\n### Events\n\n| 事件名 | 说明 | 回调参数 |\n| --- | --- | --- |\n| bind:select | 点击任意日期时触发 | _value: Date \\| Date[]_ |\n| bind:unselect | 当 Calendar 的 `type` 为 `multiple` 时,点击已选中的日期时触发 | _value: Date_ |\n| bind:confirm | 日期选择完成后触发，若`show-confirm`为`true`，则点击确认按钮后触发 | _value: Date \\| Date[]_ |\n| bind:open | 打开弹出层时触发 | - |\n| bind:close | 关闭弹出层时触发 | - |\n| bind:opened | 打开弹出层且动画结束后触发 | - |\n| bind:closed | 关闭弹出层且动画结束后触发 | - |\n| bind:over-range | 范围选择超过最多可选天数时触发 | - |\n| bind:click-subtitle `v1.8.1` | 点击日历副标题时触发 | _WechatMiniprogram.TouchEvent_ |\n\n### Slots\n\n| 名称   | 说明               |\n| ------ | ------------------ |\n| title  | 自定义标题         |\n| footer | 自定义底部区域内容 |\n\n### 方法\n\n通过 selectComponent 可以获取到 Calendar 实例并调用实例方法。\n\n| 方法名 | 说明                   | 参数 | 返回值 |\n| ------ | ---------------------- | ---- | ------ |\n| reset  | 重置选中的日期到默认值 | -    | -      |\n"
  },
  {
    "path": "packages/calendar/calendar.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<view class=\"van-calendar\">\n  <header\n    title=\"{{ title }}\"\n    showTitle=\"{{ showTitle }}\"\n    subtitle=\"{{ subtitle }}\"\n    showSubtitle=\"{{ showSubtitle }}\"\n    firstDayOfWeek=\"{{ firstDayOfWeek }}\"\n    bind:click-subtitle=\"onClickSubtitle\"\n  >\n    <slot name=\"title\" slot=\"title\"></slot>\n  </header>\n\n  <scroll-view\n    class=\"van-calendar__body\"\n    scroll-y\n    scroll-into-view=\"{{ scrollIntoView }}\"\n  >\n    <month\n      wx:for=\"{{ computed.getMonths(minDate, maxDate) }}\"\n      wx:key=\"index\"\n      id=\"month{{ index }}\"\n      class=\"month\"\n      data-date=\"{{ item }}\"\n      date=\"{{ item }}\"\n      type=\"{{ type }}\"\n      color=\"{{ color }}\"\n      minDate=\"{{ minDate }}\"\n      maxDate=\"{{ maxDate }}\"\n      showMark=\"{{ showMark }}\"\n      formatter=\"{{ formatter }}\"\n      rowHeight=\"{{ rowHeight }}\"\n      currentDate=\"{{ currentDate }}\"\n      showSubtitle=\"{{ showSubtitle }}\"\n      allowSameDay=\"{{ allowSameDay }}\"\n      showMonthTitle=\"{{ index !== 0 || !showSubtitle }}\"\n      firstDayOfWeek=\"{{ firstDayOfWeek }}\"\n      bind:click=\"onClickDay\"\n    />\n  </scroll-view>\n\n  <view\n    class=\"{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}\"\n  >\n    <slot name=\"footer\"></slot>\n  </view>\n\n  <view\n    class=\"{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}\"\n  >\n    <van-button\n      wx:if=\"{{ showConfirm }}\"\n      round\n      block\n      type=\"danger\"\n      color=\"{{ color }}\"\n      custom-class=\"van-calendar__confirm\"\n      disabled=\"{{ computed.getButtonDisabled(type, currentDate, minRange) }}\"\n      nativeType=\"text\"\n      bind:click=\"onConfirm\"\n    >\n      {{\n        computed.getButtonDisabled(type, currentDate, minRange)\n          ? confirmDisabledText\n          : confirmText\n      }}\n    </van-button>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/calendar/components/header/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/calendar/components/header/index.less",
    "content": "@import '../../../common/style/var.less';\n\n.van-calendar {\n  &__header {\n    flex-shrink: 0;\n    box-shadow: var(--calendar-header-box-shadow, @calendar-header-box-shadow);\n  }\n\n  &__header-title,\n  &__header-subtitle {\n    text-align: center;\n    height: var(--calendar-header-title-height, @calendar-header-title-height);\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n    line-height: var(\n      --calendar-header-title-height,\n      @calendar-header-title-height\n    );\n  }\n\n  &__header-title:empty,\n  &__header-title + &__header-title {\n    display: none;\n  }\n\n  &__header-title:empty + &__header-title {\n    display: block !important;\n  }\n\n  &__weekdays {\n    display: flex;\n  }\n\n  &__weekday {\n    flex: 1;\n    text-align: center;\n    font-size: var(--calendar-weekdays-font-size, @calendar-weekdays-font-size);\n    line-height: var(--calendar-weekdays-height, @calendar-weekdays-height);\n  }\n}\n"
  },
  {
    "path": "packages/calendar/components/header/index.ts",
    "content": "import { VantComponent } from '../../../common/component';\n\nVantComponent({\n  props: {\n    title: {\n      type: String,\n      value: '日期选择',\n    },\n    subtitle: String,\n    showTitle: Boolean,\n    showSubtitle: Boolean,\n    firstDayOfWeek: {\n      type: Number,\n      observer: 'initWeekDay',\n    },\n  },\n\n  data: {\n    weekdays: [] as Array<string>,\n  },\n\n  created() {\n    this.initWeekDay();\n  },\n\n  methods: {\n    initWeekDay() {\n      const defaultWeeks = ['日', '一', '二', '三', '四', '五', '六'];\n      const firstDayOfWeek = this.data.firstDayOfWeek || 0;\n\n      this.setData({\n        weekdays: [\n          ...defaultWeeks.slice(firstDayOfWeek, 7),\n          ...defaultWeeks.slice(0, firstDayOfWeek),\n        ],\n      });\n    },\n\n    onClickSubtitle(event: WechatMiniprogram.TouchEvent) {\n      this.$emit('click-subtitle', event);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/calendar/components/header/index.wxml",
    "content": "<view class=\"van-calendar__header\">\n  <block wx:if=\"{{ showTitle }}\">\n    <view class=\"van-calendar__header-title\"><slot name=\"title\"></slot></view>\n    <view class=\"van-calendar__header-title\">{{ title }}</view>\n  </block>\n\n  <view wx:if=\"{{ showSubtitle }}\" class=\"van-calendar__header-subtitle\" bind:tap=\"onClickSubtitle\">\n    {{ subtitle }}\n  </view>\n\n  <view class=\"van-calendar__weekdays\">\n    <view wx:for=\"{{ weekdays }}\" wx:key=\"index\" class=\"van-calendar__weekday\">\n      {{ item }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/calendar/components/month/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/calendar/components/month/index.less",
    "content": "@import '../../../common/style/var';\n\n.van-calendar {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  background-color: var(\n    --calendar-background-color,\n    @calendar-background-color\n  );\n\n  &__month-title {\n    text-align: center;\n    height: var(--calendar-header-title-height, @calendar-header-title-height);\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n    font-size: var(\n      --calendar-month-title-font-size,\n      @calendar-month-title-font-size\n    );\n    line-height: var(\n      --calendar-header-title-height,\n      @calendar-header-title-height\n    );\n  }\n\n  &__days {\n    position: relative;\n    display: flex;\n    flex-wrap: wrap;\n    user-select: none;\n  }\n\n  &__month-mark {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    z-index: 0;\n    transform: translate(-50%, -50%);\n    pointer-events: none;\n    color: var(--calendar-month-mark-color, @calendar-month-mark-color);\n    font-size: var(\n      --calendar-month-mark-font-size,\n      @calendar-month-mark-font-size\n    );\n  }\n\n  &__day,\n  &__selected-day {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    text-align: center;\n  }\n\n  &__day {\n    position: relative;\n    width: 14.285%;\n    height: var(--calendar-day-height, @calendar-day-height);\n    font-size: var(--calendar-day-font-size, @calendar-day-font-size);\n\n    &--end,\n    &--start,\n    &--start-end,\n    &--multiple-middle,\n    &--multiple-selected {\n      color: var(--calendar-range-edge-color, @calendar-range-edge-color);\n      background-color: var(\n        --calendar-range-edge-background-color,\n        @calendar-range-edge-background-color\n      );\n    }\n\n    &--start {\n      border-radius: @border-radius-md 0 0 @border-radius-md;\n    }\n\n    &--end {\n      border-radius: 0 @border-radius-md @border-radius-md 0;\n    }\n\n    &--start-end,\n    &--multiple-selected {\n      border-radius: @border-radius-md;\n    }\n\n    &--middle {\n      color: var(--calendar-range-middle-color, @calendar-range-middle-color);\n\n      &::after {\n        position: absolute;\n        top: 0;\n        right: 0;\n        bottom: 0;\n        left: 0;\n        background-color: currentColor;\n        content: '';\n        opacity: var(\n          --calendar-range-middle-background-opacity,\n          @calendar-range-middle-background-opacity\n        );\n      }\n    }\n\n    &--disabled {\n      cursor: default;\n      color: var(--calendar-day-disabled-color, @calendar-day-disabled-color);\n    }\n  }\n\n  &__top-info,\n  &__bottom-info {\n    position: absolute;\n    right: 0;\n    left: 0;\n    font-size: var(--calendar-info-font-size, @calendar-info-font-size);\n    line-height: var(--calendar-info-line-height, @calendar-info-line-height);\n\n    @media (max-width: 350px) {\n      font-size: 9px;\n    }\n  }\n\n  &__top-info {\n    top: 6px;\n  }\n\n  &__bottom-info {\n    bottom: 6px;\n  }\n\n  &__selected-day {\n    width: var(--calendar-selected-day-size, @calendar-selected-day-size);\n    height: var(--calendar-selected-day-size, @calendar-selected-day-size);\n    color: var(--calendar-selected-day-color, @calendar-selected-day-color);\n    background-color: var(\n      --calendar-selected-day-background-color,\n      @calendar-selected-day-background-color\n    );\n    border-radius: @border-radius-md;\n  }\n}\n"
  },
  {
    "path": "packages/calendar/components/month/index.ts",
    "content": "import { VantComponent } from '../../../common/component';\nimport {\n  getMonthEndDay,\n  compareDay,\n  getPrevDay,\n  getNextDay,\n} from '../../utils';\n\nexport interface Day {\n  date: Date;\n  type: string;\n  text: number;\n  bottomInfo?: string;\n}\n\nVantComponent({\n  props: {\n    date: {\n      type: null,\n      observer: 'setDays',\n    },\n    type: {\n      type: String,\n      observer: 'setDays',\n    },\n    color: String,\n    minDate: {\n      type: null,\n      observer: 'setDays',\n    },\n    maxDate: {\n      type: null,\n      observer: 'setDays',\n    },\n    showMark: Boolean,\n    rowHeight: null,\n    formatter: {\n      type: null,\n      observer: 'setDays',\n    },\n    currentDate: {\n      type: null,\n      observer: 'setDays',\n    },\n    firstDayOfWeek: {\n      type: Number,\n      observer: 'setDays',\n    },\n    allowSameDay: Boolean,\n    showSubtitle: Boolean,\n    showMonthTitle: Boolean,\n  },\n\n  data: {\n    visible: true,\n    days: [] as Day[],\n  },\n\n  methods: {\n    onClick(event) {\n      const { index } = event.currentTarget.dataset;\n      const item: Day = this.data.days[index];\n      if (item.type !== 'disabled') {\n        this.$emit('click', item);\n      }\n    },\n\n    setDays() {\n      const days: Day[] = [];\n      const startDate = new Date(this.data.date);\n      const year = startDate.getFullYear();\n      const month = startDate.getMonth();\n\n      const totalDay = getMonthEndDay(\n        startDate.getFullYear(),\n        startDate.getMonth() + 1\n      );\n\n      for (let day = 1; day <= totalDay; day++) {\n        const date = new Date(year, month, day);\n        const type = this.getDayType(date);\n\n        let config: Day = {\n          date,\n          type,\n          text: day,\n          bottomInfo: this.getBottomInfo(type),\n        };\n\n        if (this.data.formatter) {\n          config = this.data.formatter(config);\n        }\n\n        days.push(config);\n      }\n\n      this.setData({ days });\n    },\n\n    getMultipleDayType(day) {\n      const { currentDate } = this.data;\n      if (!Array.isArray(currentDate)) {\n        return '';\n      }\n\n      const isSelected = (date) =>\n        currentDate.some((item) => compareDay(item, date) === 0);\n\n      if (isSelected(day)) {\n        const prevDay = getPrevDay(day);\n        const nextDay = getNextDay(day);\n        const prevSelected = isSelected(prevDay);\n        const nextSelected = isSelected(nextDay);\n\n        if (prevSelected && nextSelected) {\n          return 'multiple-middle';\n        }\n\n        if (prevSelected) {\n          return 'end';\n        }\n\n        return nextSelected ? 'start' : 'multiple-selected';\n      }\n\n      return '';\n    },\n\n    getRangeDayType(day) {\n      const { currentDate, allowSameDay } = this.data;\n      if (!Array.isArray(currentDate)) {\n        return '';\n      }\n\n      const [startDay, endDay] = currentDate;\n\n      if (!startDay) {\n        return '';\n      }\n\n      const compareToStart = compareDay(day, startDay);\n\n      if (!endDay) {\n        return compareToStart === 0 ? 'start' : '';\n      }\n\n      const compareToEnd = compareDay(day, endDay);\n\n      if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) {\n        return 'start-end';\n      }\n\n      if (compareToStart === 0) {\n        return 'start';\n      }\n\n      if (compareToEnd === 0) {\n        return 'end';\n      }\n\n      if (compareToStart > 0 && compareToEnd < 0) {\n        return 'middle';\n      }\n\n      return '';\n    },\n\n    getDayType(day) {\n      const { type, minDate, maxDate, currentDate } = this.data;\n\n      if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) {\n        return 'disabled';\n      }\n\n      if (type === 'single') {\n        return compareDay(day, currentDate) === 0 ? 'selected' : '';\n      }\n\n      if (type === 'multiple') {\n        return this.getMultipleDayType(day);\n      }\n\n      /* istanbul ignore else */\n      if (type === 'range') {\n        return this.getRangeDayType(day);\n      }\n\n      return '';\n    },\n\n    getBottomInfo(type) {\n      if (this.data.type === 'range') {\n        if (type === 'start') {\n          return '开始';\n        }\n        if (type === 'end') {\n          return '结束';\n        }\n        if (type === 'start-end') {\n          return '开始/结束';\n        }\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/calendar/components/month/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\"></wxs>\n<wxs src=\"../../../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-calendar__month\" style=\"{{ computed.getMonthStyle(visible, date, rowHeight) }}\">\n  <view wx:if=\"{{ showMonthTitle }}\" class=\"van-calendar__month-title\">\n    {{ computed.formatMonthTitle(date) }}\n  </view>\n\n  <view wx:if=\"{{ visible }}\" class=\"van-calendar__days\">\n    <view wx:if=\"{{ showMark }}\" class=\"van-calendar__month-mark\">\n      {{ computed.getMark(date) }}\n    </view>\n\n    <view\n      wx:for=\"{{ days }}\"\n      wx:key=\"index\"\n      style=\"{{ computed.getDayStyle(item.type, index, date, rowHeight, color, firstDayOfWeek) }}\"\n      class=\"{{ utils.bem('calendar__day', [item.type]) }} {{ item.className }}\"\n      data-index=\"{{ index }}\"\n      bindtap=\"onClick\"\n    >\n      <view wx:if=\"{{ item.type === 'selected' }}\" class=\"van-calendar__selected-day\" style=\"width: {{ rowHeight }}px; height: {{ rowHeight }}px; background: {{ color }}\">\n        <view wx:if=\"{{ item.topInfo }}\" class=\"van-calendar__top-info\">{{ item.topInfo }}</view>\n        {{ item.text }}\n        <view wx:if=\"{{ item.bottomInfo }}\" class=\"van-calendar__bottom-info\">\n          {{ item.bottomInfo }}\n        </view>\n      </view>\n\n      <view wx:else>\n        <view wx:if=\"{{ item.topInfo }}\" class=\"van-calendar__top-info\">{{ item.topInfo }}</view>\n        {{ item.text }}\n        <view wx:if=\"{{ item.bottomInfo }}\" class=\"van-calendar__bottom-info\">\n          {{ item.bottomInfo }}\n        </view>\n      </view>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/calendar/components/month/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../../utils.wxs');\n\nfunction getMark(date) {\n  return getDate(date).getMonth() + 1;\n}\n\nvar ROW_HEIGHT = 64;\n\nfunction getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {\n  var style = [];\n  var current = getDate(date).getDay() || 7;\n  var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) :\n               current === 7 && firstDayOfWeek === 0 ? 0 :\n               (current - firstDayOfWeek);\n\n  if (index === 0) {\n    style.push(['margin-left', (100 * offset) / 7 + '%']);\n  }\n\n  if (rowHeight !== ROW_HEIGHT) {\n    style.push(['height', rowHeight + 'px']);\n  }\n\n  if (color) {\n    if (\n      type === 'start' ||\n      type === 'end' ||\n      type === 'start-end' ||\n      type === 'multiple-selected' ||\n      type === 'multiple-middle'\n    ) {\n      style.push(['background', color]);\n    } else if (type === 'middle') {\n      style.push(['color', color]);\n    }\n  }\n\n  return style\n    .map(function(item) {\n      return item.join(':');\n    })\n    .join(';');\n}\n\nfunction formatMonthTitle(date) {\n  date = getDate(date);\n  return date.getFullYear() + '年' + (date.getMonth() + 1) + '月';\n}\n\nfunction getMonthStyle(visible, date, rowHeight) {\n  if (!visible) {\n    date = getDate(date);\n\n    var totalDay = utils.getMonthEndDay(\n      date.getFullYear(),\n      date.getMonth() + 1\n    );\n    var offset = getDate(date).getDay();\n    var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;\n\n    return 'padding-bottom:' + padding + 'px';\n  }\n}\n\nmodule.exports = {\n  getMark: getMark,\n  getDayStyle: getDayStyle,\n  formatMonthTitle: formatMonthTitle,\n  getMonthStyle: getMonthStyle\n};\n"
  },
  {
    "path": "packages/calendar/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-calendar\": \"../../calendar/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/calendar/demo/index.less",
    "content": ".tiled-calendar {\n  --calendar-height: 618px;\n}\n"
  },
  {
    "path": "packages/calendar/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\ntype Data = {\n  id?: string;\n  type?: 'single' | 'multiple' | 'range';\n  round?: boolean;\n  color?: string;\n  minDate?: number;\n  maxDate?: number;\n  maxRange?: any;\n  position?: 'top' | 'right' | 'bottom' | 'left';\n  formatter?: any;\n  showConfirm?: boolean;\n  showCalendar?: boolean;\n  tiledMinDate?: number;\n  tiledMaxDate?: number;\n  confirmText?: string | '确定';\n  confirmDisabledText?: string | '确定';\n  firstDayOfWeek?: number;\n};\n\nVantComponent({\n  data: {\n    date: {\n      maxRange: [],\n      selectSingle: null,\n      selectRange: [],\n      selectMultiple: [],\n      quickSelect1: null,\n      quickSelect2: [],\n      customColor: [],\n      customConfirm: [],\n      customRange: null,\n      customDayText: [],\n      customPosition: null,\n    },\n    type: 'single',\n    round: true,\n    color: '',\n    minDate: Date.now(),\n    maxDate: new Date(\n      new Date().getFullYear(),\n      new Date().getMonth() + 6,\n      new Date().getDate()\n    ).getTime(),\n    maxRange: undefined,\n    position: 'bottom',\n    formatter: undefined,\n    showConfirm: false,\n    showCalendar: false,\n    tiledMinDate: new Date(2012, 0, 10).getTime(),\n    tiledMaxDate: new Date(2012, 2, 20).getTime(),\n    confirmText: '确定',\n    confirmDisabledText: '确定',\n    firstDayOfWeek: 0,\n  },\n\n  methods: {\n    onConfirm(event) {\n      console.log(event);\n      this.setData({ showCalendar: false });\n\n      this.setData({\n        [`date.${this.data.id}`]: Array.isArray(event.detail)\n          ? event.detail.map((date) => date.valueOf())\n          : event.detail.valueOf(),\n      });\n    },\n\n    onSelect(event) {\n      console.log(event);\n    },\n\n    onUnselect(event) {\n      console.log(event);\n    },\n\n    onClose() {\n      this.setData({ showCalendar: false });\n    },\n\n    onOpen() {\n      console.log('open');\n    },\n\n    onOpened() {\n      console.log('opened');\n    },\n\n    onClosed() {\n      console.log('closed');\n    },\n\n    resetSettings() {\n      this.setData({\n        round: true,\n        color: '',\n        minDate: Date.now(),\n        maxDate: new Date(\n          new Date().getFullYear(),\n          new Date().getMonth() + 6,\n          new Date().getDate()\n        ).getTime(),\n        maxRange: undefined,\n        position: 'bottom',\n        formatter: undefined,\n        showConfirm: true,\n        confirmText: '确定',\n        confirmDisabledText: '确定',\n      });\n    },\n\n    show(event) {\n      this.resetSettings();\n      const { type, id } = event.currentTarget.dataset;\n      const data: Data = {\n        id,\n        type,\n        showCalendar: true,\n      };\n\n      switch (id) {\n        case 'quickSelect1':\n        case 'quickSelect2':\n          data.showConfirm = false;\n          break;\n        case 'customColor':\n          data.color = '#07c160';\n          break;\n        case 'customConfirm':\n          data.confirmText = '完成';\n          data.confirmDisabledText = '请选择结束时间';\n          break;\n        case 'customRange':\n          data.minDate = new Date(2010, 0, 1).getTime();\n          data.maxDate = new Date(2010, 0, 31).getTime();\n          break;\n        case 'customDayText':\n          data.minDate = new Date(2010, 4, 1).getTime();\n          data.maxDate = new Date(2010, 4, 31).getTime();\n          data.formatter = this.dayFormatter;\n          break;\n        case 'customPosition':\n          data.round = false;\n          data.position = 'right';\n          break;\n        case 'maxRange':\n          data.maxRange = 3;\n          break;\n      }\n\n      this.setData(data);\n    },\n\n    dayFormatter(day) {\n      const month = day.date.getMonth() + 1;\n      const date = day.date.getDate();\n\n      if (month === 5) {\n        if (date === 1) {\n          day.topInfo = '劳动节';\n        } else if (date === 4) {\n          day.topInfo = '五四青年节';\n        } else if (date === 11) {\n          day.text = '今天';\n        }\n      }\n\n      if (day.type === 'start') {\n        day.bottomInfo = '入店';\n      } else if (day.type === 'end') {\n        day.bottomInfo = '离店';\n      }\n\n      return day;\n    },\n  },\n});\n"
  },
  {
    "path": "packages/calendar/demo/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\"></wxs>\n\n<demo-block title=\"基础用法\">\n  <van-cell\n    is-link\n    title=\"选择单个日期\"\n    data-type=\"single\"\n    data-id=\"selectSingle\"\n    value=\"{{ computed.formatFullDate(date.selectSingle) }}\"\n    bind:click=\"show\"\n  />\n\n  <van-cell\n    is-link\n    title=\"选择多个日期\"\n    data-type=\"multiple\"\n    data-id=\"selectMultiple\"\n    value=\"{{ computed.formatMultiple(date.selectMultiple) }}\"\n    bind:click=\"show\"\n  />\n\n  <van-cell\n    is-link\n    title=\"选择日期区间\"\n    data-type=\"range\"\n    data-id=\"selectRange\"\n    value=\"{{ computed.formatRange(date.selectRange) }}\"\n    bind:click=\"show\"\n  />\n</demo-block>\n\n<demo-block title=\"快捷选择\">\n  <van-cell\n    is-link\n    title=\"选择单个日期\"\n    data-type=\"single\"\n    data-id=\"quickSelect1\"\n    value=\"{{ computed.formatFullDate(date.quickSelect1) }}\"\n    bind:click=\"show\"\n  />\n\n  <van-cell\n    is-link\n    title=\"选择日期区间\"\n    data-type=\"range\"\n    data-id=\"quickSelect2\"\n    value=\"{{ computed.formatRange(date.quickSelect2) }}\"\n    bind:click=\"show\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义日历\">\n  <van-cell\n    is-link\n    title=\"自定义颜色\"\n    data-type=\"range\"\n    data-id=\"customColor\"\n    value=\"{{ computed.formatRange(date.customColor) }}\"\n    bind:click=\"show\"\n  />\n\n  <van-cell\n    is-link\n    title=\"自定义日期范围\"\n    data-type=\"single\"\n    data-id=\"customRange\"\n    value=\"{{ computed.formatFullDate(date.customRange) }}\"\n    bind:click=\"show\"\n  />\n\n  <van-cell\n    is-link\n    title=\"自定义按钮文字\"\n    data-type=\"range\"\n    data-id=\"customConfirm\"\n    value=\"{{ computed.formatRange(date.customConfirm) }}\"\n    bind:click=\"show\"\n  />\n\n  <van-cell\n    is-link\n    title=\"自定义日期文案\"\n    data-type=\"range\"\n    data-id=\"customDayText\"\n    value=\"{{ computed.formatRange(date.customDayText) }}\"\n    bind:click=\"show\"\n  />\n\n  <van-cell\n    is-link\n    title=\"自定义弹出位置\"\n    data-type=\"single\"\n    data-id=\"customPosition\"\n    value=\"{{ computed.formatFullDate(date.customPosition) }}\"\n    bind:click=\"show\"\n  />\n\n  <van-cell\n    is-link\n    title=\"日期区间最大范围\"\n    data-type=\"range\"\n    data-id=\"maxRange\"\n    value=\"{{ computed.formatRange(date.maxRange) }}\"\n    bind:click=\"show\"\n  />\n</demo-block>\n\n<demo-block title=\"平铺展示\">\n  <van-calendar\n    title=\"日历\"\n    poppable=\"{{ false }}\"\n    show-confirm=\"{{ false }}\"\n    min-date=\"{{ tiledMinDate }}\"\n    max-date=\"{{ tiledMaxDate }}\"\n    first-day-of-week=\"{{ firstDayOfWeek }}\"\n    class=\"tiled-calendar\"\n  />\n</demo-block>\n\n<van-calendar\n  show=\"{{ showCalendar }}\"\n  type=\"{{ type }}\"\n  color=\"{{ color }}\"\n  round=\"{{ round }}\"\n  position=\"{{ position }}\"\n  min-date=\"{{ minDate }}\"\n  max-date=\"{{ maxDate }}\"\n  max-range=\"{{ maxRange }}\"\n  formatter=\"{{ formatter }}\"\n  show-confirm=\"{{ showConfirm }}\"\n  confirm-text=\"{{ confirmText }}\"\n  confirm-disabled-text=\"{{ confirmDisabledText }}\"\n  first-day-of-week=\"{{ firstDayOfWeek }}\"\n  bind:confirm=\"onConfirm\"\n  bind:select=\"onSelect\"\n  bind:unselect=\"onUnselect\"\n  bind:open=\"onOpen\"\n  bind:opened=\"onOpened\"\n  bind:close=\"onClose\"\n  bind:closed=\"onClosed\"\n>\n</van-calendar>\n"
  },
  {
    "path": "packages/calendar/demo/index.wxs",
    "content": "/* eslint-disable */\nfunction formatDate(date) {\n  if (date) {\n    date = getDate(date);\n    return date.getMonth() + 1 + '/' + date.getDate();\n  }\n}\n\nfunction formatFullDate(date) {\n  if (date) {\n    date = getDate(date);\n    return date.getFullYear() + '/' + formatDate(date);\n  }\n}\n\nfunction formatMultiple(dates) {\n  if (dates.length) {\n    return '选择了 ' + dates.length + '个日期';\n  }\n}\n\nfunction formatRange(dateRange) {\n  if (dateRange.length) {\n    return formatDate(dateRange[0]) + ' - ' + formatDate(dateRange[1]);\n  }\n}\n\nmodule.exports = {\n  formatDate: formatDate,\n  formatFullDate: formatFullDate,\n  formatMultiple: formatMultiple,\n  formatRange: formatRange\n};\n"
  },
  {
    "path": "packages/calendar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"header\": \"./components/header/index\",\n    \"month\": \"./components/month/index\",\n    \"van-button\": \"../button/index\",\n    \"van-popup\": \"../popup/index\",\n    \"van-toast\": \"../toast/index\"\n  }\n}\n"
  },
  {
    "path": "packages/calendar/index.less",
    "content": "@import '../common/style/var';\n\n.van-calendar {\n  display: flex;\n  flex-direction: column;\n  height: var(--calendar-height, @calendar-height);\n  background-color: var(\n    --calendar-background-color,\n    @calendar-background-color\n  );\n\n  &__close-icon {\n    top: 11px;\n  }\n\n  &__popup--top,\n  &__popup--bottom {\n    height: var(--calendar-popup-height, @calendar-popup-height);\n  }\n\n  &__popup--left,\n  &__popup--right {\n    height: 100%;\n  }\n\n  &__body {\n    flex: 1;\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n  }\n\n  &__footer {\n    flex-shrink: 0;\n    padding: 0 var(--padding-md, @padding-md);\n\n    &--safe-area-inset-bottom {\n      padding-bottom: constant(safe-area-inset-bottom);\n      padding-bottom: env(safe-area-inset-bottom);\n    }\n  }\n\n  &__footer:empty,\n  &__footer + &__footer {\n    display: none;\n  }\n\n  &__footer:empty + &__footer {\n    display: block !important;\n  }\n\n  &__confirm {\n    height: var(\n      --calendar-confirm-button-height,\n      @calendar-confirm-button-height\n    ) !important;\n    margin: var(\n      --calendar-confirm-button-margin,\n      @calendar-confirm-button-margin\n    ) !important;\n    line-height: var(\n      --calendar-confirm-button-line-height,\n      @calendar-confirm-button-line-height\n    ) !important;\n  }\n}\n"
  },
  {
    "path": "packages/calendar/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport {\n  ROW_HEIGHT,\n  getPrevDay,\n  getNextDay,\n  getToday,\n  compareDay,\n  copyDates,\n  calcDateNum,\n  formatMonthTitle,\n  compareMonth,\n  getMonths,\n  getDayByOffset,\n} from './utils';\nimport { Day } from './components/month/index';\n\nimport Toast from '../toast/toast';\nimport { requestAnimationFrame } from '../common/utils';\n\nconst initialMinDate = getToday().getTime();\n\nconst initialMaxDate = (() => {\n  const now = getToday();\n  return new Date(\n    now.getFullYear(),\n    now.getMonth() + 6,\n    now.getDate()\n  ).getTime();\n})();\n\nconst getTime = (date: Date | number) =>\n  date instanceof Date ? date.getTime() : date;\n\nVantComponent({\n  props: {\n    title: {\n      type: String,\n      value: '日期选择',\n    },\n    color: String,\n    show: {\n      type: Boolean,\n      observer(val) {\n        if (val) {\n          this.initRect();\n          this.scrollIntoView();\n        }\n      },\n    },\n    formatter: null,\n    confirmText: {\n      type: String,\n      value: '确定',\n    },\n    confirmDisabledText: {\n      type: String,\n      value: '确定',\n    },\n    rangePrompt: String,\n    showRangePrompt: {\n      type: Boolean,\n      value: true,\n    },\n    defaultDate: {\n      type: null,\n      value: getToday().getTime(),\n      observer(val) {\n        this.setData({ currentDate: val });\n        this.scrollIntoView();\n      },\n    },\n    allowSameDay: Boolean,\n    type: {\n      type: String,\n      value: 'single',\n      observer: 'reset',\n    },\n    minDate: {\n      type: Number,\n      value: initialMinDate,\n    },\n    maxDate: {\n      type: Number,\n      value: initialMaxDate,\n    },\n    position: {\n      type: String,\n      value: 'bottom',\n    },\n    rowHeight: {\n      type: null,\n      value: ROW_HEIGHT,\n    },\n    round: {\n      type: Boolean,\n      value: true,\n    },\n    poppable: {\n      type: Boolean,\n      value: true,\n    },\n    showMark: {\n      type: Boolean,\n      value: true,\n    },\n    showTitle: {\n      type: Boolean,\n      value: true,\n    },\n    showConfirm: {\n      type: Boolean,\n      value: true,\n    },\n    showSubtitle: {\n      type: Boolean,\n      value: true,\n    },\n    safeAreaInsetBottom: {\n      type: Boolean,\n      value: true,\n    },\n    closeOnClickOverlay: {\n      type: Boolean,\n      value: true,\n    },\n    maxRange: {\n      type: null,\n      value: null,\n    },\n    minRange: {\n      type: Number,\n      value: 1,\n    },\n    firstDayOfWeek: {\n      type: Number,\n      value: 0,\n    },\n    readonly: Boolean,\n    rootPortal: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  data: {\n    subtitle: '',\n    currentDate: null as any,\n    scrollIntoView: '',\n  },\n\n  watch: {\n    minDate() {\n      this.initRect();\n    },\n    maxDate() {\n      this.initRect();\n    },\n  },\n\n  created() {\n    this.setData({\n      currentDate: this.getInitialDate(this.data.defaultDate),\n    });\n  },\n\n  mounted() {\n    if (this.data.show || !this.data.poppable) {\n      this.initRect();\n      this.scrollIntoView();\n    }\n  },\n\n  methods: {\n    reset() {\n      this.setData({ currentDate: this.getInitialDate(this.data.defaultDate) });\n      this.scrollIntoView();\n    },\n\n    initRect() {\n      if (this.contentObserver != null) {\n        this.contentObserver.disconnect();\n      }\n\n      const contentObserver = this.createIntersectionObserver({\n        thresholds: [0, 0.1, 0.9, 1],\n        observeAll: true,\n      });\n\n      this.contentObserver = contentObserver;\n\n      contentObserver.relativeTo('.van-calendar__body');\n      contentObserver.observe('.month', (res) => {\n        if (res.boundingClientRect.top <= res.relativeRect.top) {\n          // @ts-ignore\n          this.setData({ subtitle: formatMonthTitle(res.dataset.date) });\n        }\n      });\n    },\n\n    limitDateRange(\n      date: number,\n      minDate: number | null = null,\n      maxDate: number | null = null\n    ) {\n      minDate = minDate || (this.data.minDate as number);\n      maxDate = maxDate || (this.data.maxDate as number);\n      if (compareDay(date, minDate) === -1) {\n        return minDate;\n      }\n      if (compareDay(date, maxDate) === 1) {\n        return maxDate;\n      }\n      return date;\n    },\n\n    getInitialDate(defaultDate: number | number[] | null = null) {\n      const { type, minDate, maxDate, allowSameDay } = this.data;\n\n      if (!defaultDate) return [];\n\n      const now = getToday().getTime();\n\n      if (type === 'range') {\n        if (!Array.isArray(defaultDate)) {\n          defaultDate = [];\n        }\n\n        const [startDay, endDay] = defaultDate || [];\n\n        const startDate = getTime(startDay || now);\n        const start = this.limitDateRange(\n          startDate,\n          minDate,\n          allowSameDay ? startDate : getPrevDay(new Date(maxDate)).getTime()\n        );\n\n        const date = getTime(endDay || now);\n        const end = this.limitDateRange(\n          date,\n          allowSameDay ? date : getNextDay(new Date(minDate)).getTime()\n        );\n\n        return [start, end];\n      }\n\n      if (type === 'multiple') {\n        if (Array.isArray(defaultDate)) {\n          return defaultDate.map((date) => this.limitDateRange(date));\n        }\n\n        return [this.limitDateRange(now)];\n      }\n\n      if (!defaultDate || Array.isArray(defaultDate)) {\n        defaultDate = now;\n      }\n      return this.limitDateRange(defaultDate);\n    },\n\n    scrollIntoView() {\n      requestAnimationFrame(() => {\n        const { currentDate, type, show, poppable, minDate, maxDate } =\n          this.data;\n        if (!currentDate) return;\n        // @ts-ignore\n        const targetDate = type === 'single' ? currentDate : currentDate[0];\n        const displayed = show || !poppable;\n        if (!targetDate || !displayed) {\n          return;\n        }\n\n        const months = getMonths(minDate, maxDate);\n\n        months.some((month, index) => {\n          if (compareMonth(month, targetDate) === 0) {\n            this.setData({ scrollIntoView: `month${index}` });\n            return true;\n          }\n\n          return false;\n        });\n      });\n    },\n\n    onOpen() {\n      this.$emit('open');\n    },\n\n    onOpened() {\n      this.$emit('opened');\n    },\n\n    onClose() {\n      this.$emit('close');\n    },\n\n    onClosed() {\n      this.$emit('closed');\n    },\n\n    onClickDay(event) {\n      if (this.data.readonly) {\n        return;\n      }\n\n      let { date } = event.detail;\n      const { type, currentDate, allowSameDay } = this.data;\n\n      if (type === 'range') {\n        // @ts-ignore\n        const [startDay, endDay] = currentDate;\n\n        if (startDay && !endDay) {\n          const compareToStart = compareDay(date, startDay);\n\n          if (compareToStart === 1) {\n            const { days } = this.selectComponent('.month').data;\n            days.some((day: Day, index) => {\n              const isDisabled =\n                day.type === 'disabled' &&\n                getTime(startDay) < getTime(day.date) &&\n                getTime(day.date) < getTime(date);\n              if (isDisabled) {\n                ({ date } = days[index - 1]);\n              }\n              return isDisabled;\n            });\n            this.select([startDay, date], true);\n          } else if (compareToStart === -1) {\n            this.select([date, null]);\n          } else if (allowSameDay) {\n            this.select([date, date], true);\n          }\n        } else {\n          this.select([date, null]);\n        }\n      } else if (type === 'multiple') {\n        let selectedIndex: number;\n\n        // @ts-ignore\n        const selected = currentDate.some((dateItem: number, index: number) => {\n          const equal = compareDay(dateItem, date) === 0;\n          if (equal) {\n            selectedIndex = index;\n          }\n          return equal;\n        });\n\n        if (selected) {\n          // @ts-ignore\n          const cancelDate = currentDate.splice(selectedIndex, 1);\n          this.setData({ currentDate });\n          this.unselect(cancelDate);\n        } else {\n          // @ts-ignore\n          this.select([...currentDate, date]);\n        }\n      } else {\n        this.select(date, true);\n      }\n    },\n\n    unselect(dateArray) {\n      const date = dateArray[0];\n      if (date) {\n        this.$emit('unselect', copyDates(date));\n      }\n    },\n\n    select(date, complete?: boolean) {\n      if (complete && this.data.type === 'range') {\n        const valid = this.checkRange(date);\n\n        if (!valid) {\n          // auto selected to max range if showConfirm\n          if (this.data.showConfirm) {\n            this.emit([\n              date[0],\n              getDayByOffset(date[0], this.data.maxRange - 1),\n            ]);\n          } else {\n            this.emit(date);\n          }\n          return;\n        }\n      }\n\n      this.emit(date);\n\n      if (complete && !this.data.showConfirm) {\n        this.onConfirm();\n      }\n    },\n\n    emit(date) {\n      this.setData({\n        currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),\n      });\n      this.$emit('select', copyDates(date));\n    },\n\n    checkRange(date) {\n      const { maxRange, rangePrompt, showRangePrompt } = this.data;\n\n      if (maxRange && calcDateNum(date) > maxRange) {\n        if (showRangePrompt) {\n          Toast({\n            context: this,\n            message: rangePrompt || `选择天数不能超过 ${maxRange} 天`,\n          });\n        }\n        this.$emit('over-range');\n\n        return false;\n      }\n\n      return true;\n    },\n\n    onConfirm() {\n      if (\n        this.data.type === 'range' &&\n        !this.checkRange(this.data.currentDate)\n      ) {\n        return;\n      }\n      wx.nextTick(() => {\n        // @ts-ignore\n        this.$emit('confirm', copyDates(this.data.currentDate));\n      });\n    },\n\n    onClickSubtitle(event: WechatMiniprogram.TouchEvent) {\n      this.$emit('click-subtitle', event);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/calendar/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<import src=\"./calendar.wxml\" />\n\n<van-popup\n  wx:if=\"{{ poppable }}\"\n  custom-class=\"van-calendar__popup--{{ position }}\"\n  close-icon-class=\"van-calendar__close-icon\"\n  show=\"{{ show }}\"\n  round=\"{{ round }}\"\n  position=\"{{ position }}\"\n  closeable=\"{{ showTitle || showSubtitle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:enter=\"onOpen\"\n  bind:close=\"onClose\"\n  bind:after-enter=\"onOpened\"\n  bind:after-leave=\"onClosed\"\n>\n  <include src=\"./calendar.wxml\" />\n</van-popup>\n\n<include wx:else src=\"./calendar.wxml\" />\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/calendar/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('./utils.wxs');\n\nfunction getMonths(minDate, maxDate) {\n  var months = [];\n  var cursor = getDate(minDate);\n\n  cursor.setDate(1);\n\n  do {\n    months.push(cursor.getTime());\n    cursor.setMonth(cursor.getMonth() + 1);\n  } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);\n\n  return months;\n}\n\nfunction getButtonDisabled(type, currentDate, minRange) {\n  if (currentDate == null) {\n    return true;\n  }\n\n  if (type === 'range') {\n    return !currentDate[0] || !currentDate[1];\n  }\n\n  if (type === 'multiple') {\n    return currentDate.length < minRange;\n  }\n\n  return !currentDate;\n}\n\nmodule.exports = {\n  getMonths: getMonths,\n  getButtonDisabled: getButtonDisabled\n};\n"
  },
  {
    "path": "packages/calendar/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-cell\n        data-id=\"selectSingle\"\n        data-type=\"single\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            选择单个日期\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        data-id=\"selectMultiple\"\n        data-type=\"multiple\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            选择多个日期\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        data-id=\"selectRange\"\n        data-type=\"range\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            选择日期区间\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        快捷选择\n      </wx-view>\n      <van-cell\n        data-id=\"quickSelect1\"\n        data-type=\"single\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            选择单个日期\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        data-id=\"quickSelect2\"\n        data-type=\"range\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            选择日期区间\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义日历\n      </wx-view>\n      <van-cell\n        data-id=\"customColor\"\n        data-type=\"range\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            自定义颜色\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        data-id=\"customRange\"\n        data-type=\"single\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            自定义日期范围\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        data-id=\"customConfirm\"\n        data-type=\"range\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            自定义按钮文字\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        data-id=\"customDayText\"\n        data-type=\"range\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            自定义日期文案\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        data-id=\"customPosition\"\n        data-type=\"single\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            自定义弹出位置\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        data-id=\"maxRange\"\n        data-type=\"range\"\n        bind:click=\"show\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            日期区间最大范围\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        平铺展示\n      </wx-view>\n      <van-calendar\n        class=\"tiled-calendar\"\n      >\n        <wx-view\n          class=\"van-calendar\"\n        >\n          <header\n            bind:click-subtitle=\"onClickSubtitle\"\n          >\n            <wx-view\n              class=\"van-calendar__header\"\n            >\n              <wx-view\n                class=\"van-calendar__header-title\"\n              />\n              <wx-view\n                class=\"van-calendar__header-title\"\n              >\n                日历\n              </wx-view>\n              <wx-view\n                class=\"van-calendar__header-subtitle\"\n                bind:tap=\"onClickSubtitle\"\n              >\n                \n    \n  \n              </wx-view>\n              <wx-view\n                class=\"van-calendar__weekdays\"\n              >\n                <wx-view\n                  class=\"van-calendar__weekday\"\n                >\n                  \n      日\n    \n                </wx-view>\n                <wx-view\n                  class=\"van-calendar__weekday\"\n                >\n                  \n      一\n    \n                </wx-view>\n                <wx-view\n                  class=\"van-calendar__weekday\"\n                >\n                  \n      二\n    \n                </wx-view>\n                <wx-view\n                  class=\"van-calendar__weekday\"\n                >\n                  \n      三\n    \n                </wx-view>\n                <wx-view\n                  class=\"van-calendar__weekday\"\n                >\n                  \n      四\n    \n                </wx-view>\n                <wx-view\n                  class=\"van-calendar__weekday\"\n                >\n                  \n      五\n    \n                </wx-view>\n                <wx-view\n                  class=\"van-calendar__weekday\"\n                >\n                  \n      六\n    \n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </header>\n          <wx-scroll-view\n            class=\"van-calendar__body\"\n            scrollIntoView=\"\"\n            scrollY=\"{{true}}\"\n          >\n            <month\n              class=\"month\"\n              data-date=\"{{1325347200000}}\"\n              id=\"month0\"\n              bind:click=\"onClickDay\"\n            >\n              <wx-view\n                class=\"van-calendar__month\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-calendar__days\"\n                >\n                  <wx-view\n                    class=\"van-calendar__month-mark\"\n                  >\n                    \n      1\n    \n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{0}}\"\n                    style=\"margin-left:0%\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        1\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{1}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        2\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{2}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        3\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{3}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        4\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{4}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        5\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{5}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        6\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{6}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        7\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{7}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        8\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{8}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        9\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{9}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        10\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{10}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        11\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{11}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        12\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{12}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        13\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{13}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        14\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{14}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        15\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{15}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        16\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{16}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        17\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{17}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        18\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{18}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        19\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{19}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        20\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{20}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        21\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{21}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        22\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{22}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        23\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{23}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        24\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{24}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        25\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{25}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        26\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{26}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        27\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{27}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        28\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{28}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        29\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{29}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        30\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{30}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        31\n        \n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </month>\n            <month\n              class=\"month\"\n              data-date=\"{{1328025600000}}\"\n              id=\"month1\"\n              bind:click=\"onClickDay\"\n            >\n              <wx-view\n                class=\"van-calendar__month\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-calendar__month-title\"\n                >\n                  \n    2012年2月\n  \n                </wx-view>\n                <wx-view\n                  class=\"van-calendar__days\"\n                >\n                  <wx-view\n                    class=\"van-calendar__month-mark\"\n                  >\n                    \n      2\n    \n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{0}}\"\n                    style=\"margin-left:42.857142857142854%\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        1\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{1}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        2\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{2}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        3\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{3}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        4\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{4}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        5\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{5}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        6\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{6}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        7\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{7}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        8\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{8}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        9\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{9}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        10\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{10}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        11\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{11}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        12\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{12}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        13\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{13}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        14\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{14}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        15\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{15}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        16\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{16}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        17\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{17}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        18\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{18}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        19\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{19}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        20\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{20}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        21\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{21}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        22\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{22}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        23\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{23}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        24\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{24}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        25\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{25}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        26\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{26}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        27\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{27}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        28\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{28}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        29\n        \n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </month>\n            <month\n              class=\"month\"\n              data-date=\"{{1330531200000}}\"\n              id=\"month2\"\n              bind:click=\"onClickDay\"\n            >\n              <wx-view\n                class=\"van-calendar__month\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-calendar__month-title\"\n                >\n                  \n    2012年3月\n  \n                </wx-view>\n                <wx-view\n                  class=\"van-calendar__days\"\n                >\n                  <wx-view\n                    class=\"van-calendar__month-mark\"\n                  >\n                    \n      3\n    \n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{0}}\"\n                    style=\"margin-left:57.142857142857146%\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        1\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{1}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        2\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{2}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        3\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{3}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        4\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{4}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        5\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{5}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        6\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{6}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        7\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{7}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        8\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{8}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        9\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{9}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        10\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{10}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        11\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{11}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        12\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{12}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        13\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{13}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        14\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{14}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        15\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{15}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        16\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{16}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        17\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{17}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        18\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day \"\n                    data-index=\"{{18}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        19\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--selected \"\n                    data-index=\"{{19}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-calendar__selected-day\"\n                      style=\"width: 64px; height: 64px; background: \"\n                    >\n                      \n        20\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{20}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        21\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{21}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        22\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{22}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        23\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{23}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        24\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{24}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        25\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{25}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        26\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{26}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        27\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{27}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        28\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{28}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        29\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{29}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        30\n        \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-calendar__day van-calendar__day--disabled \"\n                    data-index=\"{{30}}\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view>\n                      \n        31\n        \n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </month>\n          </wx-scroll-view>\n          <wx-view\n            class=\"van-calendar__footer van-calendar__footer--safeAreaInsetBottom\"\n          />\n          <wx-view\n            class=\"van-calendar__footer van-calendar__footer--safeAreaInsetBottom\"\n          />\n        </wx-view>\n        <van-toast\n          id=\"van-toast\"\n        >\n          <van-transition\n            customClass=\"van-toast__container\"\n          />\n        </van-toast>\n      </van-calendar>\n    </wx-view>\n  </demo-block>\n  <van-calendar\n    bind:close=\"onClose\"\n    bind:closed=\"onClosed\"\n    bind:confirm=\"onConfirm\"\n    bind:open=\"onOpen\"\n    bind:opened=\"onOpened\"\n    bind:select=\"onSelect\"\n    bind:unselect=\"onUnselect\"\n  >\n    <van-popup\n      closeIconClass=\"van-calendar__close-icon\"\n      customClass=\"van-calendar__popup--bottom\"\n      bind:after-enter=\"onOpened\"\n      bind:after-leave=\"onClosed\"\n      bind:close=\"onClose\"\n      bind:enter=\"onOpen\"\n    >\n      <van-overlay\n        bind:click=\"onClickOverlay\"\n      >\n        <van-transition\n          customClass=\"van-overlay custom-class\"\n          bind:tap=\"onClick\"\n          catch:touchmove=\"noop\"\n        />\n      </van-overlay>\n    </van-popup>\n    <van-toast\n      id=\"van-toast\"\n    >\n      <van-transition\n        customClass=\"van-toast__container\"\n      />\n    </van-toast>\n  </van-calendar>\n</main>\n`;\n"
  },
  {
    "path": "packages/calendar/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/calendar/utils.ts",
    "content": "export const ROW_HEIGHT = 64;\n\nexport function formatMonthTitle(date: Date) {\n  if (!(date instanceof Date)) {\n    date = new Date(date);\n  }\n  return `${date.getFullYear()}年${date.getMonth() + 1}月`;\n}\n\nexport function compareMonth(date1: Date | number, date2: Date | number) {\n  if (!(date1 instanceof Date)) {\n    date1 = new Date(date1);\n  }\n\n  if (!(date2 instanceof Date)) {\n    date2 = new Date(date2);\n  }\n\n  const year1 = date1.getFullYear();\n  const year2 = date2.getFullYear();\n  const month1 = date1.getMonth();\n  const month2 = date2.getMonth();\n\n  if (year1 === year2) {\n    return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;\n  }\n\n  return year1 > year2 ? 1 : -1;\n}\n\nexport function compareDay(day1: Date | number, day2: Date | number) {\n  if (!(day1 instanceof Date)) {\n    day1 = new Date(day1);\n  }\n\n  if (!(day2 instanceof Date)) {\n    day2 = new Date(day2);\n  }\n\n  const compareMonthResult = compareMonth(day1, day2);\n\n  if (compareMonthResult === 0) {\n    const date1 = day1.getDate();\n    const date2 = day2.getDate();\n\n    return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;\n  }\n\n  return compareMonthResult;\n}\n\nexport function getDayByOffset(date: Date, offset: number) {\n  date = new Date(date);\n  date.setDate(date.getDate() + offset);\n\n  return date;\n}\n\nexport function getPrevDay(date: Date) {\n  return getDayByOffset(date, -1);\n}\n\nexport function getNextDay(date: Date) {\n  return getDayByOffset(date, 1);\n}\n\nexport function getToday() {\n  const today = new Date();\n  today.setHours(0, 0, 0, 0);\n  return today;\n}\n\nexport function calcDateNum(date: [Date, Date]) {\n  const day1 = new Date(date[0]).getTime();\n  const day2 = new Date(date[1]).getTime();\n  return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;\n}\n\nexport function copyDates(dates: Date | Date[]) {\n  if (Array.isArray(dates)) {\n    return dates.map((date) => {\n      if (date === null) {\n        return date;\n      }\n\n      return new Date(date);\n    });\n  }\n\n  return new Date(dates);\n}\n\nexport function getMonthEndDay(year: number, month: number): number {\n  return 32 - new Date(year, month - 1, 32).getDate();\n}\n\nexport function getMonths(minDate: number, maxDate: number) {\n  const months: number[] = [];\n  const cursor = new Date(minDate);\n\n  cursor.setDate(1);\n\n  do {\n    months.push(cursor.getTime());\n    cursor.setMonth(cursor.getMonth() + 1);\n  } while (compareMonth(cursor, maxDate) !== 1);\n\n  return months;\n}\n"
  },
  {
    "path": "packages/calendar/utils.wxs",
    "content": "/* eslint-disable */\nfunction getMonthEndDay(year, month) {\n  return 32 -  getDate(year, month - 1, 32).getDate();\n}\n\nfunction compareMonth(date1, date2) {\n  date1 = getDate(date1);\n  date2 = getDate(date2);\n\n  var year1 = date1.getFullYear();\n  var year2 = date2.getFullYear();\n  var month1 = date1.getMonth();\n  var month2 = date2.getMonth();\n\n  if (year1 === year2) {\n    return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;\n  }\n\n  return year1 > year2 ? 1 : -1;\n}\n\nmodule.exports = {\n  getMonthEndDay: getMonthEndDay,\n  compareMonth: compareMonth\n};\n"
  },
  {
    "path": "packages/card/README.md",
    "content": "# Card 商品卡片\n\n### 介绍\n\n商品卡片，用于展示商品的图片、价格等信息。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-card\": \"@vant/weapp/card/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-card\n  num=\"2\"\n  price=\"2.00\"\n  desc=\"描述信息\"\n  title=\"商品标题\"\n  thumb=\"{{ imageURL }}\"\n/>\n```\n\n### 高级用法\n\n可以通过插槽添加定制内容。\n\n```html\n<van-card\n  num=\"2\"\n  tag=\"标签\"\n  price=\"10.00\"\n  desc=\"描述信息\"\n  title=\"商品标题\"\n  thumb=\"{{ imageURL }}\"\n>\n  <view slot=\"footer\">\n    <van-button size=\"mini\">按钮</van-button>\n    <van-button size=\"mini\">按钮</van-button>\n  </view>\n</van-card>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| thumb | 左侧图片 | _string_ | - |\n| thumb-mode | 左侧图片裁剪、缩放的模式，可选值参考小程序 image 组件 mode 属性值 | _string_ | `aspectFit` |\n| title | 标题 | _string_ | - |\n| desc | 描述 | _string_ | - |\n| tag | 标签 | _string_ | - |\n| num | 商品数量 | _string \\| number_ | - |\n| price | 商品价格 | _string \\| number_ | - |\n| origin-price | 商品划线原价 | _string \\| number_ | - |\n| centered | 内容是否垂直居中 | _string_ | `false` |\n| currency | 货币符号 | _string_ | `¥` |\n| thumb-link | 点击左侧图片后跳转的链接地址 | _string_ | - |\n| link-type | 链接跳转类型，可选值为 `redirectTo` `switchTab` `reLaunch` | _string_ | `navigateTo` |\n| lazy-load | 是否开启图片懒加载 | _boolean_ | `false` |\n\n### Slot\n\n| 名称         | 说明                                                 |\n| ------------ | ---------------------------------------------------- |\n| title        | 自定义标题栏，如果设置了`title`属性则不生效          |\n| desc         | 自定义描述栏，如果设置了`desc`属性则不生效           |\n| num          | 自定义数量                                           |\n| price        | 自定义价格                                           |\n| origin-price | 自定义商品原价，如果设置了`origin-price`属性则不生效 |\n| price-top    | 自定义价格上方区域                                   |\n| bottom       | 自定义价格下方区域                                   |\n| thumb        | 自定义图片，如果设置了`thumb`属性则不生效            |\n| tag          | 自定义图片角标，如果设置了`tag`属性则不生效          |\n| tags         | 自定义描述下方标签区域                               |\n| footer       | 自定义右下角内容                                     |\n\n### 外部样式类\n\n| 类名               | 说明           |\n| ------------------ | -------------- |\n| custom-class       | 根节点样式类   |\n| thumb-class        | 左侧图片样式类 |\n| title-class        | 标题样式类     |\n| price-class        | 价格样式类     |\n| origin-price-class | 划线原价样式类 |\n| desc-class         | 描述样式类     |\n| num-class          | 数量样式类     |\n"
  },
  {
    "path": "packages/card/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-card\": \"../../card/index\",\n    \"van-tag\": \"../../tag/index\",\n    \"van-button\": \"../../button/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/card/demo/index.less",
    "content": ".container {\n  height: 100vh;\n  background-color: #fff;\n}\n\n.tag,\n.button {\n  margin-right: 5px;\n}\n\n.van-card__footer {\n  margin-top: 5px;\n}\n"
  },
  {
    "path": "packages/card/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    imageURL:\n      'https://img.yzcdn.cn/upload_files/2017/07/02/af5b9f44deaeb68000d7e4a711160c53.jpg',\n  },\n});\n"
  },
  {
    "path": "packages/card/demo/index.wxml",
    "content": "<view class=\"container\">\n  <demo-block title=\"基础用法\">\n    <van-card\n      num=\"2\"\n      price=\"2.00\"\n      desc=\"描述信息\"\n      title=\"2018秋冬新款男士休闲时尚军绿飞行夹克秋冬新款男\"\n      thumb=\"{{ imageURL }}\"\n    />\n  </demo-block>\n\n  <demo-block title=\"高级用法\">\n    <van-card\n      num=\"2\"\n      tag=\"标签\"\n      price=\"2.00\"\n      origin-price=\"10.00\"\n      desc=\"描述信息\"\n      title=\"2018秋冬新款男士休闲时尚军绿飞行夹克秋冬新款男\"\n      thumb=\"{{ imageURL }}\"\n    >\n      <view slot=\"tags\">\n        <van-tag plain type=\"danger\" custom-class=\"tag\">标签1</van-tag>\n        <van-tag plain type=\"danger\">标签2</van-tag>\n      </view>\n      <view slot=\"footer\" class=\"van-card__footer\">\n        <van-button size=\"mini\" round custom-class=\"button\">按钮</van-button>\n        <van-button size=\"mini\" round>按钮</van-button>\n      </view>\n    </van-card>\n  </demo-block>\n</view>\n"
  },
  {
    "path": "packages/card/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tag\": \"../tag/index\"\n  }\n}\n"
  },
  {
    "path": "packages/card/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-card {\n  position: relative;\n  box-sizing: border-box;\n  padding: var(--card-padding, @card-padding);\n  font-size: var(--card-font-size, @card-font-size);\n  color: var(--card-text-color, @card-text-color);\n  background-color: var(--card-background-color, @card-background-color);\n\n  &__header {\n    display: flex;\n\n    &--center {\n      align-items: center;\n      justify-content: center;\n    }\n  }\n\n  &__thumb {\n    position: relative;\n    flex: none;\n    width: var(--card-thumb-size, @card-thumb-size);\n    height: var(--card-thumb-size, @card-thumb-size);\n    margin-right: var(--padding-xs, @padding-xs);\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &__img {\n    width: 100%;\n    height: 100%;\n    border-radius: @border-radius-lg;\n  }\n\n  &__content {\n    position: relative;\n    display: flex;\n    flex: 1;\n    flex-direction: column;\n    justify-content: space-between;\n    min-width: 0; /* hack for flex box ellipsis */\n    min-height: var(--card-thumb-size, @card-thumb-size);\n\n    &--center {\n      justify-content: center;\n    }\n  }\n\n  &__title,\n  &__desc {\n    word-wrap: break-word;\n  }\n\n  &__title {\n    font-weight: bold;\n    line-height: var(--card-title-line-height, @card-title-line-height);\n  }\n\n  &__desc {\n    line-height: var(--card-desc-line-height, @card-desc-line-height);\n    color: var(--card-desc-color, @card-desc-color);\n  }\n\n  &__bottom {\n    line-height: 20px;\n  }\n\n  &__price {\n    display: inline-block;\n    font-weight: bold;\n    color: var(--card-price-color, @card-price-color);\n    font-size: var(--card-price-font-size, @card-price-font-size);\n\n    &-integer {\n      font-size: var(\n        --card-price-integer-font-size,\n        @card-price-integer-font-size\n      );\n      font-family: var(--card-price-font-family, @card-price-font-family);\n    }\n\n    &-decimal {\n      font-family: var(--card-price-font-family, @card-price-font-family);\n    }\n  }\n\n  &__origin-price {\n    display: inline-block;\n    margin-left: 5px;\n    text-decoration: line-through;\n    font-size: var(--card-origin-price-font-size, @card-origin-price-font-size);\n    color: var(--card-origin-price-color, @card-origin-price-color);\n  }\n\n  &__num {\n    float: right;\n  }\n\n  &__tag {\n    position: absolute !important;\n    top: 2px;\n    left: 0;\n  }\n\n  &__footer {\n    flex: none;\n    width: 100%;\n    text-align: right;\n  }\n}\n"
  },
  {
    "path": "packages/card/index.ts",
    "content": "import { link } from '../mixins/link';\nimport { VantComponent } from '../common/component';\n\nVantComponent({\n  classes: [\n    'num-class',\n    'desc-class',\n    'thumb-class',\n    'title-class',\n    'price-class',\n    'origin-price-class',\n  ],\n\n  mixins: [link],\n\n  props: {\n    tag: String,\n    num: String,\n    desc: String,\n    thumb: String,\n    title: String,\n    price: {\n      type: String,\n      observer: 'updatePrice',\n    },\n    centered: Boolean,\n    lazyLoad: Boolean,\n    thumbLink: String,\n    originPrice: String,\n    thumbMode: {\n      type: String,\n      value: 'aspectFit',\n    },\n    currency: {\n      type: String,\n      value: '¥',\n    },\n  },\n\n  methods: {\n    updatePrice() {\n      const { price } = this.data;\n      const priceArr = price.toString().split('.');\n      this.setData({\n        integerStr: priceArr[0],\n        decimalStr: priceArr[1] ? `.${priceArr[1]}` : '',\n      });\n    },\n\n    onClickThumb() {\n      this.jumpLink('thumbLink');\n    },\n  },\n});\n"
  },
  {
    "path": "packages/card/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class van-card\">\n  <view class=\"{{ utils.bem('card__header', { center: centered }) }}\">\n    <view class=\"van-card__thumb\" bind:tap=\"onClickThumb\">\n      <image\n        wx:if=\"{{ thumb }}\"\n        src=\"{{ thumb }}\"\n        mode=\"{{ thumbMode }}\"\n        lazy-load=\"{{ lazyLoad }}\"\n        class=\"van-card__img thumb-class\"\n      />\n      <slot wx:else name=\"thumb\" />\n      <van-tag\n        wx:if=\"{{ tag }}\"\n        mark\n        type=\"danger\"\n        custom-class=\"van-card__tag\"\n      >\n        {{ tag }}\n      </van-tag>\n      <slot wx:else name=\"tag\" />\n    </view>\n\n    <view class=\"van-card__content {{ utils.bem('card__content', { center: centered }) }}\">\n      <view>\n        <view wx:if=\"{{ title }}\" class=\"van-card__title title-class\">{{ title }}</view>\n        <slot wx:else name=\"title\" />\n\n        <view wx:if=\"{{ desc }}\" class=\"van-card__desc desc-class\">{{ desc }}</view>\n        <slot wx:else name=\"desc\" />\n\n        <slot name=\"tags\" />\n      </view>\n\n      <view class=\"van-card__bottom\">\n        <slot name=\"price-top\" />\n        <view wx:if=\"{{ price || price === 0 }}\" class=\"van-card__price price-class\">\n          <text>{{ currency }}</text>\n          <text class=\"van-card__price-integer\">{{ integerStr }}</text>\n          <text class=\"van-card__price-decimal\">{{ decimalStr }}</text>\n        </view>\n        <slot wx:else name=\"price\" />\n        <view wx:if=\"{{ originPrice || originPrice === 0 }}\" class=\"van-card__origin-price origin-price-class\">{{ currency }} {{ originPrice }}</view>\n        <slot wx:else name=\"origin-price\" />\n        <view wx:if=\"{{ num }}\" class=\"van-card__num num-class\">x {{ num }}</view>\n        <slot wx:else  name=\"num\" />\n        <slot name=\"bottom\" />\n      </view>\n    </view>\n  </view>\n\n  <view class=\"van-card__footer\">\n    <slot name=\"footer\" />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/card/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <wx-view\n    class=\"container\"\n  >\n    <demo-block>\n      <wx-view\n        class=\"custom-class demo-block van-clearfix \"\n      >\n        <wx-view\n          class=\"demo-block__title\"\n        >\n          基础用法\n        </wx-view>\n        <van-card>\n          <wx-view\n            class=\"custom-class van-card\"\n          >\n            <wx-view\n              class=\"van-card__header\"\n            >\n              <wx-view\n                class=\"van-card__thumb\"\n                bind:tap=\"onClickThumb\"\n              >\n                <wx-image\n                  class=\"van-card__img thumb-class\"\n                  lazyLoad=\"{{false}}\"\n                  mode=\"aspectFit\"\n                  src=\"https://img.yzcdn.cn/upload_files/2017/07/02/af5b9f44deaeb68000d7e4a711160c53.jpg\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-card__content van-card__content\"\n              >\n                <wx-view>\n                  <wx-view\n                    class=\"van-card__title title-class\"\n                  >\n                    2018秋冬新款男士休闲时尚军绿飞行夹克秋冬新款男\n                  </wx-view>\n                  <wx-view\n                    class=\"van-card__desc desc-class\"\n                  >\n                    描述信息\n                  </wx-view>\n                </wx-view>\n                <wx-view\n                  class=\"van-card__bottom\"\n                >\n                  <wx-view\n                    class=\"van-card__price price-class\"\n                  >\n                    <wx-text>\n                      ¥\n                    </wx-text>\n                    <wx-text\n                      class=\"van-card__price-integer\"\n                    >\n                      2\n                    </wx-text>\n                    <wx-text\n                      class=\"van-card__price-decimal\"\n                    >\n                      .00\n                    </wx-text>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-card__num num-class\"\n                  >\n                    x 2\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-card__footer\"\n            />\n          </wx-view>\n        </van-card>\n      </wx-view>\n    </demo-block>\n    <demo-block>\n      <wx-view\n        class=\"custom-class demo-block van-clearfix \"\n      >\n        <wx-view\n          class=\"demo-block__title\"\n        >\n          高级用法\n        </wx-view>\n        <van-card>\n          <wx-view\n            class=\"custom-class van-card\"\n          >\n            <wx-view\n              class=\"van-card__header\"\n            >\n              <wx-view\n                class=\"van-card__thumb\"\n                bind:tap=\"onClickThumb\"\n              >\n                <wx-image\n                  class=\"van-card__img thumb-class\"\n                  lazyLoad=\"{{false}}\"\n                  mode=\"aspectFit\"\n                  src=\"https://img.yzcdn.cn/upload_files/2017/07/02/af5b9f44deaeb68000d7e4a711160c53.jpg\"\n                />\n                <van-tag\n                  customClass=\"van-card__tag\"\n                >\n                  <wx-view\n                    class=\"custom-class van-tag van-tag--danger van-tag--mark\"\n                    style=\"\"\n                  >\n                    \n        标签\n      \n                  </wx-view>\n                </van-tag>\n              </wx-view>\n              <wx-view\n                class=\"van-card__content van-card__content\"\n              >\n                <wx-view>\n                  <wx-view\n                    class=\"van-card__title title-class\"\n                  >\n                    2018秋冬新款男士休闲时尚军绿飞行夹克秋冬新款男\n                  </wx-view>\n                  <wx-view\n                    class=\"van-card__desc desc-class\"\n                  >\n                    描述信息\n                  </wx-view>\n                  <wx-view\n                    slot=\"tags\"\n                  >\n                    <van-tag\n                      customClass=\"tag\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-tag van-tag--danger van-tag--plain\"\n                        style=\"\"\n                      >\n                        标签1\n                      </wx-view>\n                    </van-tag>\n                    <van-tag>\n                      <wx-view\n                        class=\"custom-class van-tag van-tag--danger van-tag--plain\"\n                        style=\"\"\n                      >\n                        标签2\n                      </wx-view>\n                    </van-tag>\n                  </wx-view>\n                </wx-view>\n                <wx-view\n                  class=\"van-card__bottom\"\n                >\n                  <wx-view\n                    class=\"van-card__price price-class\"\n                  >\n                    <wx-text>\n                      ¥\n                    </wx-text>\n                    <wx-text\n                      class=\"van-card__price-integer\"\n                    >\n                      2\n                    </wx-text>\n                    <wx-text\n                      class=\"van-card__price-decimal\"\n                    >\n                      .00\n                    </wx-text>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-card__origin-price origin-price-class\"\n                  >\n                    ¥ 10.00\n                  </wx-view>\n                  <wx-view\n                    class=\"van-card__num num-class\"\n                  >\n                    x 2\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-card__footer\"\n            >\n              <wx-view\n                class=\"van-card__footer\"\n                slot=\"footer\"\n              >\n                <van-button\n                  customClass=\"button\"\n                >\n                  <wx-button\n                    appParameter=\"\"\n                    ariaLabel=\"\"\n                    businessId=\"\"\n                    class=\"custom-class van-button van-button--default van-button--mini van-button--round \"\n                    data-detail=\"{{null}}\"\n                    formType=\"\"\n                    hoverClass=\"van-button--active hover-class\"\n                    id=\"\"\n                    lang=\"\"\n                    openType=\"\"\n                    sendMessageImg=\"\"\n                    sendMessagePath=\"\"\n                    sendMessageTitle=\"\"\n                    sessionFrom=\"\"\n                    showMessageCard=\"{{false}}\"\n                    style=\"\"\n                    bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                    bind:chooseavatar=\"onChooseAvatar\"\n                    bind:contact=\"onContact\"\n                    bind:error=\"onError\"\n                    bind:getphonenumber=\"onGetPhoneNumber\"\n                    bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                    bind:getuserinfo=\"onGetUserInfo\"\n                    bind:launchapp=\"onLaunchApp\"\n                    bind:opensetting=\"onOpenSetting\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-button__text\"\n                    >\n                      按钮\n                    </wx-view>\n                  </wx-button>\n                </van-button>\n                <van-button>\n                  <wx-button\n                    appParameter=\"\"\n                    ariaLabel=\"\"\n                    businessId=\"\"\n                    class=\"custom-class van-button van-button--default van-button--mini van-button--round \"\n                    data-detail=\"{{null}}\"\n                    formType=\"\"\n                    hoverClass=\"van-button--active hover-class\"\n                    id=\"\"\n                    lang=\"\"\n                    openType=\"\"\n                    sendMessageImg=\"\"\n                    sendMessagePath=\"\"\n                    sendMessageTitle=\"\"\n                    sessionFrom=\"\"\n                    showMessageCard=\"{{false}}\"\n                    style=\"\"\n                    bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                    bind:chooseavatar=\"onChooseAvatar\"\n                    bind:contact=\"onContact\"\n                    bind:error=\"onError\"\n                    bind:getphonenumber=\"onGetPhoneNumber\"\n                    bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                    bind:getuserinfo=\"onGetUserInfo\"\n                    bind:launchapp=\"onLaunchApp\"\n                    bind:opensetting=\"onOpenSetting\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-button__text\"\n                    >\n                      按钮\n                    </wx-view>\n                  </wx-button>\n                </van-button>\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </van-card>\n      </wx-view>\n    </demo-block>\n  </wx-view>\n</main>\n`;\n"
  },
  {
    "path": "packages/card/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/cascader/README.md",
    "content": "# Cascader 级联选择\n\n### 介绍\n\n级联选择框，用于多层级数据的选择，典型场景为省市区选择。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-cascader\": \"@vant/weapp/cascader/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n级联选择组件可以搭配 Field 和 Popup 组件使用，示例如下：\n\n```html\n<van-field\n  value=\"{{ fieldValue }}\"\n  is-link\n  readonly\n  label=\"地区\"\n  placeholder=\"请选择所在地区\"\n  bind:tap=\"onClick\"\n/>\n<van-popup show=\"{{ show }}\" round position=\"bottom\">\n  <van-cascader\n    wx:if=\"{{ show }}\"\n    value=\"{{ cascaderValue }}\"\n    title=\"请选择所在地区\"\n    options=\"{{ options }}\"\n    bind:close=\"onClose\"\n    bind:finish=\"onFinish\"\n  />\n</van-popup>\n```\n\n```js\n\nconst options = [\n  {\n    text: '浙江省',\n    value: '330000',\n    children: [{ text: '杭州市', value: '330100' }],\n  },\n  {\n    text: '江苏省',\n    value: '320000',\n    children: [{ text: '南京市', value: '320100' }],\n  },\n];\n\nPage({\n  data: {\n    show: false,\n    options,\n    fieldValue: '',\n    cascaderValue: '',\n  },\n\n  onClick() {\n    this.setData({\n      show: true,\n    });\n  },\n\n  onClose() {\n    this.setData({\n      show: false,\n    });\n  },\n\n  onFinish(e) {\n    const { selectedOptions, value } = e.detail;\n    const fieldValue = selectedOptions\n        .map((option) => option.text || option.name)\n        .join('/');\n    this.setData({\n      fieldValue,\n      cascaderValue: value,\n    })\n  },\n});\n```\n\n### 自定义颜色\n\n通过 `active-color` 属性来设置选中状态的高亮颜色。\n\n```html\n<van-cascader\n  value=\"{{ cascaderValue }}\"\n  title=\"请选择所在地区\"\n  options=\"{{ options }}\"\n  active-color=\"#ee0a24\"\n  bind:close=\"onClose\"\n  bind:finish=\"onFinish\"\n/>\n```\n\n### 异步加载选项\n\n可以监听 `change` 事件并动态设置 `options`，实现异步加载选项。\n\n```html\n<van-field\n  value=\"{{ fieldValue }}\"\n  is-link\n  readonly\n  label=\"地区\"\n  placeholder=\"请选择所在地区\"\n  bind:tap=\"onClick\"\n/>\n<van-popup show=\"{{ show }}\" round position=\"bottom\">\n  <van-cascader\n    wx:if=\"{{ show }}\"\n    value=\"{{ cascaderValue }}\"\n    title=\"请选择所在地区\"\n    options=\"{{ options }}\"\n    bind:close=\"onClose\"\n    bind:change=\"onChange\"\n    bind:finish=\"onFinish\"\n  />\n</van-popup>\n```\n\n```js\nPage({\n  data: {\n    options: [\n      {\n        text: '浙江省',\n        value: '330000',\n        children: [],\n      }\n    ];\n  },\n  onChange(e) {\n    const { value } = e.detail;\n    if (value === this.data.options[0].value) {\n      setTimeout(() => {\n        const children = [\n          { text: '杭州市', value: '330100' },\n          { text: '宁波市', value: '330200' },\n        ];\n        this.setData({\n          'options[0].children': children,\n        })\n      }, 500);\n    }\n  },\n});\n\n```\n\n### 自定义字段名\n\n通过 `field-names` 属性可以自定义 `options` 里的字段名称。\n\n```html\n<van-cascader\n  value=\"{{ code }}\"\n  title=\"请选择所在地区\"\n  options=\"{{ options }}\"\n  field-names=\"{{ fieldNames }}\"\n/>\n```\n\n```js\nPage({\n  data: {\n    code: '',\n    fieldNames: {\n      text: 'name',\n      value: 'code',\n      children: 'items',\n    },\n    options: [\n      {\n        name: '浙江省',\n        code: '330000',\n        items: [{ name: '杭州市', code: '330100' }],\n      },\n      {\n        name: '江苏省',\n        code: '320000',\n        items: [{ name: '南京市', code: '320100' }],\n      },\n    ],\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| title | 顶部标题 | _string_ | - |\n| value | 选中项的值 | _string \\| number_ | - |\n| options | 可选项数据源 | _CascaderOption[]_ | `[]` |\n| placeholder | 未选中时的提示文案 | _string_ | `请选择` |\n| active-color | 选中状态的高亮颜色 | _string_ | `#1989fa` |\n| swipeable | 是否开启手势左右滑动切换 | _boolean_ | `false` |\n| closeable | 是否显示关闭图标 | _boolean_ | `true` |\n| ellipsis `v1.11.7` | 是否省略过长的标题文字, 关闭后文字过长会出现横向滚动 | _boolean_ | `true` |\n| show-header | 是否展示标题栏 | _boolean_ | `true` |\n| close-icon | 关闭图标名称或图片链接，等同于 Icon 组件的 [name 属性](#/icon) | _string_ | `cross` |\n| field-names | 自定义 `options` 结构中的字段 | _CascaderFieldNames_ | `{ text: 'text', value: 'value', children: 'children' }` |\n| use-title-slot `v1.11.3` | 是否使用自定义标题的插槽 | _boolean_ | `false` |\n\n### CascaderOption 数据结构\n\n`options` 属性是一个由对象构成的数组，数组中的每个对象配置一个可选项，对象可以包含以下值：\n\n| 键名               | 说明                     | 类型                        |\n| ------------------ | ------------------------ | --------------------------- |\n| text               | 选项文字（必填）         | _string_                    |\n| value              | 选项对应的值（必填）     | _string \\| number_          |\n| color              | 选项文字颜色             | _string_                    |\n| children           | 子选项列表               | _CascaderOption[]_          |\n| disabled           | 是否禁用选项             | _boolean_                   |\n| className          | 为对应列添加额外的 class | _string \\| Array \\| object_ |\n\n### Events\n\n| 事件 | 说明 | 回调参数 |\n| --- | --- | --- |\n| bind:change | 选中项变化时触发 | event.detail：_{ value: string \\| number, selectedOptions: CascaderOption[], tabIndex: number }_ |\n| bind:finish | 全部选项选择完成后触发 | event.detail：_{ value: string \\| number, selectedOptions: CascaderOption[], tabIndex: number }_ |\n| bind:close | 点击关闭图标时触发 | - |\n| bind:click-tab | 点击标签时触发 | event.detail：_{ tabIndex: number, title: string }_ |\n\n### Slots\n\n| 名称 | 说明 | 参数 |\n| --- | --- | --- |\n| title | 自定义顶部标题 | - |\n"
  },
  {
    "path": "packages/cascader/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-field\": \"../../field/index\",\n    \"van-popup\": \"../../popup/index\",\n    \"van-cascader\": \"../../cascader/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/cascader/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport { isDef } from '../../common/utils';\nimport { isObj } from '../../common/validator';\n\nfunction deepClone<T extends Record<string, any>>(obj: T): T {\n  if (!isDef(obj)) {\n    return obj;\n  }\n\n  if (Array.isArray(obj)) {\n    return obj.map((item) => deepClone(item)) as unknown as T;\n  }\n\n  if (isObj(obj)) {\n    const to = {} as Record<string, any>;\n    Object.keys(obj).forEach((key: string) => {\n      // @ts-ignore\n      to[key] = deepClone(obj[key]);\n    });\n\n    return to as T;\n  }\n\n  return obj;\n}\n\nconst zhCNOptions = [\n  {\n    text: '浙江省',\n    value: '330000',\n    children: [\n      {\n        text: '杭州市',\n        value: '330100',\n        children: [\n          {\n            text: '上城区',\n            value: '330102',\n          },\n          {\n            text: '下城区',\n            value: '330103',\n          },\n          {\n            text: '江干区',\n            value: '330104',\n          },\n        ],\n      },\n      {\n        text: '宁波市',\n        value: '330200',\n        children: [\n          {\n            text: '海曙区',\n            value: '330203',\n          },\n          {\n            text: '江北区',\n            value: '330205',\n          },\n          {\n            text: '北仑区',\n            value: '330206',\n          },\n        ],\n      },\n      {\n        text: '温州市',\n        value: '330300',\n        children: [\n          {\n            text: '鹿城区',\n            value: '330302',\n          },\n          {\n            text: '龙湾区',\n            value: '330303',\n          },\n          {\n            text: '瓯海区',\n            value: '330304',\n          },\n        ],\n      },\n    ],\n  },\n  {\n    text: '江苏省',\n    value: '320000',\n    children: [\n      {\n        text: '南京市',\n        value: '320100',\n        children: [\n          {\n            text: '玄武区',\n            value: '320102',\n          },\n          {\n            text: '秦淮区',\n            value: '320104',\n          },\n          {\n            text: '建邺区',\n            value: '320105',\n          },\n        ],\n      },\n      {\n        text: '无锡市',\n        value: '320200',\n        children: [\n          {\n            text: '锡山区',\n            value: '320205',\n          },\n          {\n            text: '惠山区',\n            value: '320206',\n          },\n          {\n            text: '滨湖区',\n            value: '320211',\n          },\n        ],\n      },\n      {\n        text: '徐州市',\n        value: '320300',\n        children: [\n          {\n            text: '鼓楼区',\n            value: '320302',\n          },\n          {\n            text: '云龙区',\n            value: '320303',\n          },\n          {\n            text: '贾汪区',\n            value: '320305',\n          },\n        ],\n      },\n    ],\n  },\n];\n\nconst asyncOptions1 = [\n  {\n    text: '浙江省',\n    value: '330000',\n    children: [],\n  },\n];\nconst asyncOptions2 = [\n  { text: '杭州市', value: '330100' },\n  { text: '宁波市', value: '330200' },\n];\n\nfunction getCustomFieldOptions(options) {\n  const newOptions = deepClone(options);\n  const adjustFieldName = (item) => {\n    if ('text' in item) {\n      item.name = item.text;\n      delete item.text;\n    }\n    if ('value' in item) {\n      item.code = item.value;\n      delete item.value;\n    }\n    if ('children' in item) {\n      item.items = item.children;\n      delete item.children;\n      item.items.forEach(adjustFieldName);\n    }\n  };\n  newOptions.forEach(adjustFieldName);\n  return newOptions;\n}\n\nVantComponent({\n  data: {\n    area: '地区',\n    options: zhCNOptions,\n    selectArea: '请选择地区',\n    baseState: {\n      show: false,\n      value: '',\n      result: '',\n    },\n    asyncState: {\n      show: false,\n      value: undefined,\n      result: '',\n      options: asyncOptions1,\n    },\n    fieldNames: {\n      text: 'name',\n      value: 'code',\n      children: 'items',\n    },\n    customFieldOptions: getCustomFieldOptions(zhCNOptions),\n    customFieldState: {\n      show: false,\n      value: '',\n      result: '',\n    },\n  },\n\n  methods: {\n    onClick(e) {\n      const { stateKey } = e.currentTarget.dataset;\n      this.setData({\n        [`${stateKey}.show`]: true,\n      });\n    },\n    onClose(e) {\n      const { stateKey } = e.currentTarget.dataset;\n      this.setData({\n        [`${stateKey}.show`]: false,\n      });\n    },\n    onFinish(e) {\n      const { stateKey } = e.currentTarget.dataset;\n      const { selectedOptions, value } = e.detail;\n      const result = selectedOptions\n        .map((option) => option.text || option.name)\n        .join('/');\n\n      this.setData({\n        [`${stateKey}.value`]: value,\n        [`${stateKey}.result`]: result,\n      });\n      this.onClose(e);\n    },\n    loadDynamicOptions(e) {\n      const { value } = e.detail;\n      if (value === '330000') {\n        setTimeout(() => {\n          this.setData({\n            'asyncState.options[0].children': asyncOptions2,\n          });\n        }, 500);\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/cascader/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-field\n    value=\"{{ baseState.result }}\"\n    is-link\n    readonly\n    label=\"地区\"\n    placeholder=\"{{ selectArea }}\"\n    data-state-key=\"baseState\"\n    bind:tap=\"onClick\"\n  />\n  <van-popup\n    show=\"{{ baseState.show }}\"\n    round\n    position=\"bottom\"\n  >\n    <van-cascader\n      wx:if=\"{{ baseState.show }}\"\n      value=\"{{ baseState.value }}\"\n      title=\"{{ selectArea }}\"\n      options=\"{{ options }}\"\n      data-state-key=\"baseState\"\n      bind:close=\"onClose\"\n      bind:finish=\"onFinish\"\n    />\n  </van-popup>\n</demo-block>\n\n<demo-block title=\"自定义颜色\">\n  <van-field\n    value=\"{{ customColorState.result }}\"\n    is-link\n    readonly\n    label=\"地区\"\n    placeholder=\"{{ selectArea }}\"\n    data-state-key=\"customColorState\"\n    bind:tap=\"onClick\"\n  />\n  <van-popup\n    show=\"{{ customColorState.show }}\"\n    round\n    position=\"bottom\"\n  >\n    <van-cascader\n      wx:if=\"{{ customColorState.show }}\"\n      value=\"{{ customColorState.value }}\"\n      title=\"{{ selectArea }}\"\n      options=\"{{ options }}\"\n      data-state-key=\"customColorState\"\n      active-color=\"#ee0a24\"\n      bind:close=\"onClose\"\n      bind:finish=\"onFinish\"\n    />\n  </van-popup>\n</demo-block>\n\n<demo-block title=\"异步加载选项\">\n  <van-field\n    value=\"{{ asyncState.result }}\"\n    is-link\n    readonly\n    label=\"地区\"\n    placeholder=\"{{ selectArea }}\"\n    data-state-key=\"asyncState\"\n    bind:tap=\"onClick\"\n  />\n  <van-popup\n    show=\"{{ asyncState.show }}\"\n    round\n    position=\"bottom\"\n  >\n    <van-cascader\n      wx:if=\"{{ asyncState.show }}\"\n      value=\"{{ asyncState.value }}\"\n      title=\"{{ selectArea }}\"\n      options=\"{{ asyncState.options }}\"\n      data-state-key=\"asyncState\"\n      bind:close=\"onClose\"\n      bind:change=\"loadDynamicOptions\"\n      bind:finish=\"onFinish\"\n    />\n  </van-popup>\n</demo-block>\n\n<demo-block title=\"自定义字段名\">\n  <van-field\n    value=\"{{ customFieldState.result }}\"\n    is-link\n    readonly\n    label=\"地区\"\n    placeholder=\"{{ selectArea }}\"\n    data-state-key=\"customFieldState\"\n    bind:tap=\"onClick\"\n  />\n  <van-popup\n    show=\"{{ customFieldState.show }}\"\n    round\n    position=\"bottom\"\n    safe-area-inset-bottom\n  >\n    <van-cascader\n      wx:if=\"{{ customFieldState.show }}\"\n      data-state-key=\"customFieldState\"\n      value=\"{{ customFieldState.value }}\"\n      title=\"{{ selectArea }}\"\n      options=\"{{ customFieldOptions }}\"\n      field-names=\"{{ fieldNames }}\"\n      data-state-key=\"customFieldState\"\n      bind:close=\"onClose\"\n      bind:finish=\"onFinish\"\n    />\n  </van-popup>\n</demo-block>\n"
  },
  {
    "path": "packages/cascader/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-tab\":  \"../tab/index\",\n    \"van-tabs\": \"../tabs/index\"\n  }\n}"
  },
  {
    "path": "packages/cascader/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-cascader {\n  &__header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    height: @cascader-header-height;\n    padding: @cascader-header-padding;\n  }\n\n  &__title {\n    font-weight: 600;\n    font-size: @cascader-title-font-size;\n    line-height: @cascader-title-line-height;\n  }\n\n  &__close-icon {\n    color: @cascader-close-icon-color;\n    font-size: @cascader-close-icon-size;\n    height: 22px;\n  }\n\n  &__tabs {\n    &-wrap {\n      padding: 0 8px;\n      height: @cascader-tabs-height !important;\n    }\n  }\n\n  &__tab {\n    flex: none !important;\n    padding: 0 8px !important;\n    color: @cascader-tab-color !important;\n    font-weight: 600 !important;\n\n    &--unselected {\n      color: @cascader-unselected-tab-color !important;\n      font-weight: normal !important;\n    }\n  }\n\n  &__option {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 10px 16px;\n    font-size: 14px;\n    line-height: 20px;\n    cursor: pointer;\n\n    &:active {\n      background-color: #f2f3f5;\n    }\n\n    &--selected {\n      color: @cascader-active-color;\n      font-weight: 600;\n    }\n\n    &--disabled {\n      color: @cascader-option-disabled-color;\n      cursor: not-allowed;\n\n      &:active {\n        background-color: transparent;\n      }\n    }\n  }\n\n  &__options {\n    box-sizing: border-box;\n    height: @cascader-options-height;\n    padding-top: 6px;\n    overflow-y: auto;\n    -webkit-overflow-scrolling: touch;\n  }\n}\n"
  },
  {
    "path": "packages/cascader/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nenum FieldName {\n  TEXT = 'text',\n  VALUE = 'value',\n  CHILDREN = 'children',\n}\n\ntype Option = Record<string, any>;\n\ninterface ITab {\n  options: Option[];\n  selected: Option | null;\n}\n\nconst defaultFieldNames = {\n  text: FieldName.TEXT,\n  value: FieldName.VALUE,\n  children: FieldName.CHILDREN,\n};\n\nVantComponent({\n  props: {\n    title: String,\n    value: {\n      type: String,\n    },\n    placeholder: {\n      type: String,\n      value: '请选择',\n    },\n    activeColor: {\n      type: String,\n      value: '#1989fa',\n    },\n    options: {\n      type: Array,\n      value: [],\n    },\n    swipeable: {\n      type: Boolean,\n      value: false,\n    },\n    closeable: {\n      type: Boolean,\n      value: true,\n    },\n    ellipsis: {\n      type: Boolean,\n      value: true,\n    },\n    showHeader: {\n      type: Boolean,\n      value: true,\n    },\n    closeIcon: {\n      type: String,\n      value: 'cross',\n    },\n    fieldNames: {\n      type: Object,\n      value: defaultFieldNames,\n      observer: 'updateFieldNames',\n    },\n    useTitleSlot: Boolean,\n  },\n\n  data: {\n    tabs: [] as ITab[],\n    activeTab: 0,\n    textKey: FieldName.TEXT,\n    valueKey: FieldName.VALUE,\n    childrenKey: FieldName.CHILDREN,\n    innerValue: '',\n  },\n\n  watch: {\n    options() {\n      this.updateTabs();\n    },\n    value(newVal) {\n      this.updateValue(newVal);\n    },\n  },\n\n  created() {\n    this.updateTabs();\n  },\n\n  methods: {\n    updateValue(val: string) {\n      if (val !== undefined) {\n        const values = this.data.tabs.map(\n          (tab: ITab) => tab.selected && tab.selected[this.data.valueKey]\n        );\n        if (values.indexOf(val) > -1) {\n          return;\n        }\n      }\n\n      this.innerValue = val;\n\n      this.updateTabs();\n    },\n    updateFieldNames() {\n      const {\n        text = 'text',\n        value = 'value',\n        children = 'children',\n      } = this.data.fieldNames || defaultFieldNames;\n      this.setData({\n        textKey: text,\n        valueKey: value,\n        childrenKey: children,\n      });\n    },\n    getSelectedOptionsByValue(options, value) {\n      for (let i = 0; i < options.length; i++) {\n        const option = options[i];\n\n        if (option[this.data.valueKey] === value) {\n          return [option];\n        }\n\n        if (option[this.data.childrenKey]) {\n          const selectedOptions = this.getSelectedOptionsByValue(\n            option[this.data.childrenKey],\n            value\n          );\n          if (selectedOptions) {\n            return [option, ...selectedOptions];\n          }\n        }\n      }\n    },\n    updateTabs() {\n      const { options } = this.data;\n      const { innerValue } = this;\n\n      if (!options.length) {\n        return;\n      }\n\n      if (innerValue !== undefined) {\n        const selectedOptions = this.getSelectedOptionsByValue(\n          options,\n          innerValue\n        );\n\n        if (selectedOptions) {\n          let optionsCursor = options;\n\n          const tabs = selectedOptions.map((option) => {\n            const tab = {\n              options: optionsCursor,\n              selected: option,\n            };\n\n            const next = optionsCursor.find(\n              (item) => item[this.data.valueKey] === option[this.data.valueKey]\n            );\n            if (next) {\n              optionsCursor = next[this.data.childrenKey];\n            }\n\n            return tab;\n          });\n\n          if (optionsCursor) {\n            tabs.push({\n              options: optionsCursor,\n              selected: null,\n            });\n          }\n\n          this.setData({\n            tabs,\n          });\n\n          wx.nextTick(() => {\n            this.setData({\n              activeTab: tabs.length - 1,\n            });\n          });\n\n          return;\n        }\n      }\n\n      this.setData({\n        tabs: [\n          {\n            options,\n            selected: null,\n          },\n        ],\n        activeTab: 0,\n      });\n    },\n    onClose() {\n      this.$emit('close');\n    },\n    onClickTab(e) {\n      const { index: tabIndex, title } = e.detail;\n      this.$emit('click-tab', { title, tabIndex });\n      this.setData({\n        activeTab: tabIndex,\n      });\n    },\n    // 选中\n    onSelect(e) {\n      const { option, tabIndex } = e.currentTarget.dataset;\n\n      if (option && option.disabled) {\n        return;\n      }\n\n      const { valueKey, childrenKey } = this.data;\n      let { tabs } = this.data;\n\n      tabs[tabIndex].selected = option;\n\n      if (tabs.length > tabIndex + 1) {\n        tabs = tabs.slice(0, tabIndex + 1);\n      }\n\n      if (option[childrenKey]) {\n        const nextTab = {\n          options: option[childrenKey],\n          selected: null,\n        };\n\n        if (tabs[tabIndex + 1]) {\n          tabs[tabIndex + 1] = nextTab;\n        } else {\n          tabs.push(nextTab);\n        }\n\n        wx.nextTick(() => {\n          this.setData({\n            activeTab: tabIndex + 1,\n          });\n        });\n      }\n\n      this.setData({\n        tabs,\n      });\n\n      const selectedOptions = tabs.map((tab) => tab.selected).filter(Boolean);\n\n      const value = option[valueKey];\n\n      const params = {\n        value,\n        tabIndex,\n        selectedOptions,\n      };\n\n      this.innerValue = value;\n\n      this.$emit('change', params);\n\n      if (!option[childrenKey]) {\n        this.$emit('finish', params);\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/cascader/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"utils\" />\n\n<view wx:if=\"{{ showHeader }}\" class=\"van-cascader__header\">\n  <slot name=\"title\" wx:if=\"{{ useTitleSlot }}\"></slot>\n  <text class=\"van-cascader__title\" wx:else>{{ title }}</text>\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"{{ closeIcon }}\"\n    class=\"van-cascader__close-icon\"\n    bind:tap=\"onClose\"\n  />\n</view>\n\n<van-tabs\n  active=\"{{ activeTab }}\"\n  custom-class=\"van-cascader__tabs\"\n  wrap-class=\"van-cascader__tabs-wrap\"\n  tab-class=\"van-cascader__tab\"\n  color=\"{{ activeColor }}\"\n  border=\"{{ false }}\"\n  swipeable=\"{{ swipeable }}\"\n  ellipsis=\"{{ ellipsis }}\"\n  bind:click=\"onClickTab\"\n>\n  <van-tab\n    wx:for=\"{{ tabs }}\"\n    wx:for-item=\"tab\"\n    wx:for-index=\"tabIndex\"\n    wx:key=\"tabIndex\"\n    title=\"{{ tab.selected ? tab.selected[textKey] : placeholder }}\"\n    style=\"width: 100%;\"\n    title-style=\"{{ !tab.selected ? 'color: #969799;font-weight:normal;' : '' }}\"\n  >\n    <!-- 暂不支持 -->\n    <!-- <slot name=\"options-top\"></slot> -->\n\n    <view class=\"van-cascader__options\">\n      <view\n        wx:for=\"{{ tab.options }}\"\n        wx:for-item=\"option\"\n        wx:key=\"index\"\n        class=\"{{ option.className }} {{ utils.optionClass(tab, valueKey, option) }}\"\n        style=\"{{ utils.optionStyle({ tab, valueKey, option, activeColor }) }}\"\n        data-option=\"{{ option }}\"\n        data-tab-index=\"{{ tabIndex }}\"\n        bind:tap=\"onSelect\"\n      >\n        <text>{{ option[textKey] }}</text>\n        <van-icon wx:if=\"{{ utils.isSelected(tab, valueKey, option) }}\" name=\"success\" size=\"18\" />\n      </view>\n    </view>\n    <!-- 暂不支持 -->\n    <!-- <slot name=\"options-bottom\"></slot> -->\n  </van-tab>\n</van-tabs>\n"
  },
  {
    "path": "packages/cascader/index.wxs",
    "content": "var utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction isSelected(tab, valueKey, option) {\n  return tab.selected && tab.selected[valueKey] === option[valueKey]\n}\n\nfunction optionClass(tab, valueKey, option) {\n  return utils.bem('cascader__option', { selected: isSelected(tab, valueKey, option), disabled: option.disabled })\n}\n\nfunction optionStyle(data) {\n  var color = data.option.color || (isSelected(data.tab, data.valueKey, data.option) ? data.activeColor : undefined);\n  return style({\n    color\n  });\n}\n\n\nmodule.exports = {\n  isSelected: isSelected,\n  optionClass: optionClass,\n  optionStyle: optionStyle,\n};"
  },
  {
    "path": "packages/cascader/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-field\n        data-state-key=\"baseState\"\n        bind:tap=\"onClick\"\n      >\n        <van-cell\n          customClass=\"custom-class van-field\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n            >\n              <wx-label\n                class=\"label-class van-field__label\"\n                for=\"\"\n                slot=\"title\"\n              >\n                \n    地区\n  \n              </wx-label>\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            >\n              <wx-view\n                class=\"van-field__body van-field__body--text\"\n              >\n                <wx-view\n                  class=\"van-field__control van-field__control--custom\"\n                  bind:tap=\"onClickInput\"\n                />\n                <wx-input\n                  adjustPosition=\"{{true}}\"\n                  alwaysEmbed=\"{{false}}\"\n                  autoFocus=\"{{false}}\"\n                  class=\"van-field__control input-class\"\n                  confirmHold=\"{{false}}\"\n                  confirmType=\"\"\n                  cursor=\"{{-1}}\"\n                  cursorSpacing=\"{{50}}\"\n                  disabled=\"{{true}}\"\n                  focus=\"{{false}}\"\n                  holdKeyboard=\"{{false}}\"\n                  id=\"\"\n                  maxlength=\"{{-1}}\"\n                  password=\"{{false}}\"\n                  placeholder=\"请选择地区\"\n                  placeholderClass=\"van-field__placeholder\"\n                  placeholderStyle=\"\"\n                  selectionEnd=\"{{-1}}\"\n                  selectionStart=\"{{-1}}\"\n                  type=\"text\"\n                  value=\"\"\n                  bind:blur=\"onBlur\"\n                  bind:confirm=\"onConfirm\"\n                  bind:focus=\"onFocus\"\n                  bind:input=\"onInput\"\n                  bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                  bind:nicknamereview=\"onBindNicknameReview\"\n                  bind:tap=\"onClickInput\"\n                />\n                <wx-view\n                  class=\"van-field__icon-container\"\n                  bind:tap=\"onClickIcon\"\n                />\n                <wx-view\n                  class=\"van-field__button\"\n                />\n              </wx-view>\n            </wx-view>\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n      </van-field>\n      <van-popup>\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义颜色\n      </wx-view>\n      <van-field\n        data-state-key=\"customColorState\"\n        bind:tap=\"onClick\"\n      >\n        <van-cell\n          customClass=\"custom-class van-field\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n            >\n              <wx-label\n                class=\"label-class van-field__label\"\n                for=\"\"\n                slot=\"title\"\n              >\n                \n    地区\n  \n              </wx-label>\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            >\n              <wx-view\n                class=\"van-field__body van-field__body--text\"\n              >\n                <wx-view\n                  class=\"van-field__control van-field__control--custom\"\n                  bind:tap=\"onClickInput\"\n                />\n                <wx-input\n                  adjustPosition=\"{{true}}\"\n                  alwaysEmbed=\"{{false}}\"\n                  autoFocus=\"{{false}}\"\n                  class=\"van-field__control input-class\"\n                  confirmHold=\"{{false}}\"\n                  confirmType=\"\"\n                  cursor=\"{{-1}}\"\n                  cursorSpacing=\"{{50}}\"\n                  disabled=\"{{true}}\"\n                  focus=\"{{false}}\"\n                  holdKeyboard=\"{{false}}\"\n                  id=\"\"\n                  maxlength=\"{{-1}}\"\n                  password=\"{{false}}\"\n                  placeholder=\"请选择地区\"\n                  placeholderClass=\"van-field__placeholder\"\n                  placeholderStyle=\"\"\n                  selectionEnd=\"{{-1}}\"\n                  selectionStart=\"{{-1}}\"\n                  type=\"text\"\n                  value=\"\"\n                  bind:blur=\"onBlur\"\n                  bind:confirm=\"onConfirm\"\n                  bind:focus=\"onFocus\"\n                  bind:input=\"onInput\"\n                  bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                  bind:nicknamereview=\"onBindNicknameReview\"\n                  bind:tap=\"onClickInput\"\n                />\n                <wx-view\n                  class=\"van-field__icon-container\"\n                  bind:tap=\"onClickIcon\"\n                />\n                <wx-view\n                  class=\"van-field__button\"\n                />\n              </wx-view>\n            </wx-view>\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n      </van-field>\n      <van-popup>\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        异步加载选项\n      </wx-view>\n      <van-field\n        data-state-key=\"asyncState\"\n        bind:tap=\"onClick\"\n      >\n        <van-cell\n          customClass=\"custom-class van-field\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n            >\n              <wx-label\n                class=\"label-class van-field__label\"\n                for=\"\"\n                slot=\"title\"\n              >\n                \n    地区\n  \n              </wx-label>\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            >\n              <wx-view\n                class=\"van-field__body van-field__body--text\"\n              >\n                <wx-view\n                  class=\"van-field__control van-field__control--custom\"\n                  bind:tap=\"onClickInput\"\n                />\n                <wx-input\n                  adjustPosition=\"{{true}}\"\n                  alwaysEmbed=\"{{false}}\"\n                  autoFocus=\"{{false}}\"\n                  class=\"van-field__control input-class\"\n                  confirmHold=\"{{false}}\"\n                  confirmType=\"\"\n                  cursor=\"{{-1}}\"\n                  cursorSpacing=\"{{50}}\"\n                  disabled=\"{{true}}\"\n                  focus=\"{{false}}\"\n                  holdKeyboard=\"{{false}}\"\n                  id=\"\"\n                  maxlength=\"{{-1}}\"\n                  password=\"{{false}}\"\n                  placeholder=\"请选择地区\"\n                  placeholderClass=\"van-field__placeholder\"\n                  placeholderStyle=\"\"\n                  selectionEnd=\"{{-1}}\"\n                  selectionStart=\"{{-1}}\"\n                  type=\"text\"\n                  value=\"\"\n                  bind:blur=\"onBlur\"\n                  bind:confirm=\"onConfirm\"\n                  bind:focus=\"onFocus\"\n                  bind:input=\"onInput\"\n                  bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                  bind:nicknamereview=\"onBindNicknameReview\"\n                  bind:tap=\"onClickInput\"\n                />\n                <wx-view\n                  class=\"van-field__icon-container\"\n                  bind:tap=\"onClickIcon\"\n                />\n                <wx-view\n                  class=\"van-field__button\"\n                />\n              </wx-view>\n            </wx-view>\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n      </van-field>\n      <van-popup>\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义字段名\n      </wx-view>\n      <van-field\n        data-state-key=\"customFieldState\"\n        bind:tap=\"onClick\"\n      >\n        <van-cell\n          customClass=\"custom-class van-field\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n            >\n              <wx-label\n                class=\"label-class van-field__label\"\n                for=\"\"\n                slot=\"title\"\n              >\n                \n    地区\n  \n              </wx-label>\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            >\n              <wx-view\n                class=\"van-field__body van-field__body--text\"\n              >\n                <wx-view\n                  class=\"van-field__control van-field__control--custom\"\n                  bind:tap=\"onClickInput\"\n                />\n                <wx-input\n                  adjustPosition=\"{{true}}\"\n                  alwaysEmbed=\"{{false}}\"\n                  autoFocus=\"{{false}}\"\n                  class=\"van-field__control input-class\"\n                  confirmHold=\"{{false}}\"\n                  confirmType=\"\"\n                  cursor=\"{{-1}}\"\n                  cursorSpacing=\"{{50}}\"\n                  disabled=\"{{true}}\"\n                  focus=\"{{false}}\"\n                  holdKeyboard=\"{{false}}\"\n                  id=\"\"\n                  maxlength=\"{{-1}}\"\n                  password=\"{{false}}\"\n                  placeholder=\"请选择地区\"\n                  placeholderClass=\"van-field__placeholder\"\n                  placeholderStyle=\"\"\n                  selectionEnd=\"{{-1}}\"\n                  selectionStart=\"{{-1}}\"\n                  type=\"text\"\n                  value=\"\"\n                  bind:blur=\"onBlur\"\n                  bind:confirm=\"onConfirm\"\n                  bind:focus=\"onFocus\"\n                  bind:input=\"onInput\"\n                  bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                  bind:nicknamereview=\"onBindNicknameReview\"\n                  bind:tap=\"onClickInput\"\n                />\n                <wx-view\n                  class=\"van-field__icon-container\"\n                  bind:tap=\"onClickIcon\"\n                />\n                <wx-view\n                  class=\"van-field__button\"\n                />\n              </wx-view>\n            </wx-view>\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n      </van-field>\n      <van-popup>\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/cascader/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/cell/README.md",
    "content": "# Cell 单元格\n\n### 介绍\n\n单元格为列表中的单个展示项。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-cell\": \"@vant/weapp/cell/index\",\n  \"van-cell-group\": \"@vant/weapp/cell-group/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n`Cell`可以单独使用，也可以与`CellGroup`搭配使用。`CellGroup`可以为`Cell`提供上下外边框。\n\n```html\n<van-cell-group>\n  <van-cell title=\"单元格\" value=\"内容\" />\n  <van-cell title=\"单元格\" value=\"内容\" label=\"描述信息\" border=\"{{ false }}\" />\n</van-cell-group>\n```\n\n### 卡片风格\n\n通过 `CellGroup` 的 `inset` 属性，可以将单元格转换为圆角卡片风格（从 1.7.2 版本开始支持）。\n\n```html\n<van-cell-group inset>\n  <van-cell title=\"单元格\" value=\"内容\" />\n  <van-cell title=\"单元格\" value=\"内容\" label=\"描述信息\" />\n</van-cell-group>\n```\n\n### 单元格大小\n\n通过`size`属性可以控制单元格的大小。\n\n```html\n<van-cell title=\"单元格\" value=\"内容\" size=\"large\" />\n<van-cell title=\"单元格\" value=\"内容\" size=\"large\" label=\"描述信息\" />\n```\n\n### 展示图标\n\n通过`icon`属性在标题左侧展示图标。\n\n```html\n<van-cell title=\"单元格\" icon=\"location-o\" />\n```\n\n### 展示箭头\n\n设置`is-link`属性后会在单元格右侧显示箭头，并且可以通过`arrow-direction`属性控制箭头方向。\n\n```html\n<van-cell title=\"单元格\" is-link />\n<van-cell title=\"单元格\" is-link value=\"内容\" />\n<van-cell title=\"单元格\" is-link value=\"内容\" arrow-direction=\"down\" />\n```\n\n### 页面跳转\n\n可以通过`url`属性进行页面跳转，通过`link-type`属性控制跳转类型。\n\n```html\n<van-cell\n  is-link\n  title=\"单元格\"\n  link-type=\"navigateTo\"\n  url=\"/pages/dashboard/index\"\n/>\n```\n\n### 分组标题\n\n通过`CellGroup`的`title`属性可以指定分组标题。\n\n```html\n<van-cell-group title=\"分组1\">\n  <van-cell title=\"单元格\" value=\"内容\" />\n</van-cell-group>\n<van-cell-group title=\"分组2\">\n  <van-cell title=\"单元格\" value=\"内容\" />\n</van-cell-group>\n```\n\n### 使用插槽\n\n如以上用法不能满足你的需求，可以使用插槽来自定义内容。\n\n```html\n<van-cell value=\"内容\" icon=\"shop-o\" is-link>\n  <view slot=\"title\">\n    <view class=\"van-cell-text\">单元格</view>\n    <van-tag type=\"danger\">标签</van-tag>\n  </view>\n</van-cell>\n<van-cell title=\"单元格\">\n  <van-icon slot=\"right-icon\" name=\"search\" class=\"custom-icon\" />\n</van-cell>\n```\n\n### 垂直居中\n\n通过`center`属性可以让`Cell`的左右内容都垂直居中。\n\n```html\n<van-cell center title=\"单元格\" value=\"内容\" label=\"描述信息\" />\n```\n\n## API\n\n### CellGroup Props\n\n| 参数           | 说明                   | 类型      | 默认值  |\n| -------------- | ---------------------- | --------- | ------- |\n| title          | 分组标题               | _string_  | `-`     |\n| inset `v1.7.2` | 是否展示为圆角卡片风格 | _boolean_ | `false` |\n| border         | 是否显示外边框         | _boolean_ | `true`  |\n\n### CellGroup 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n\n### Cell Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| icon | 左侧图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | - |\n| title | 左侧标题 | _string \\| number_ | - |\n| title-width | 标题宽度，须包含单位 | _string_ | - |\n| value | 右侧内容 | _string \\| number_ | - |\n| label | 标题下方的描述信息 | _string_ | - |\n| size | 单元格大小，可选值为 `large` | _string_ | - |\n| border | 是否显示下边框 | _boolean_ | `true` |\n| center | 是否使内容垂直居中 | _boolean_ | `false` |\n| url | 点击后跳转的链接地址 | _string_ | - |\n| link-type | 链接跳转类型，可选值为 `redirectTo` `switchTab` `reLaunch` | _string_ | `navigateTo` |\n| clickable | 是否开启点击反馈 | _boolean_ | `false` |\n| is-link | 是否展示右侧箭头并开启点击反馈 | _boolean_ | `false` |\n| required | 是否显示表单必填星号 | _boolean_ | `false` |\n| arrow-direction | 箭头方向，可选值为 `left` `up` `down` | _string_ | - |\n| use-label-slot | 是否使用 label slot | _boolean_ | `false` |\n| title-style `v1.4.0` | 标题样式 | _string_ | - |\n\n### Cell Event\n\n| 事件名     | 说明             | 参数 |\n| ---------- | ---------------- | ---- |\n| bind:click | 点击单元格时触发 | -    |\n\n### Cell Slot\n\n| 名称       | 说明                                                           |\n| ---------- | -------------------------------------------------------------- |\n| -          | 自定义`value`显示内容，如果设置了`value`属性则不生效           |\n| title      | 自定义`title`显示内容，如果设置了`title`属性则不生效           |\n| label      | 自定义`label`显示内容，需要设置 `use-label-slot`属性           |\n| icon       | 自定义`icon`显示内容，如果设置了`icon`属性则不生效             |\n| right-icon | 自定义右侧按钮，默认是`arrow`，如果设置了`is-link`属性则不生效 |\n\n### Cell 外部样式类\n\n| 类名         | 说明           |\n| ------------ | -------------- |\n| custom-class | 根节点样式类   |\n| title-class  | 标题样式类     |\n| label-class  | 描述信息样式类 |\n| value-class  | 右侧内容样式类 |\n"
  },
  {
    "path": "packages/cell/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-cell-group\": \"../../cell-group/index\",\n    \"van-icon\": \"../../icon/index\",\n    \"van-tag\": \"../../tag/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/cell/demo/index.less",
    "content": ".title {\n  margin-right: 5px;\n  display: inline-block;\n  vertical-align: middle;\n}\n"
  },
  {
    "path": "packages/cell/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {},\n});\n"
  },
  {
    "path": "packages/cell/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-cell-group>\n    <van-cell title=\"单元格\" value=\"内容\" />\n    <van-cell\n      title=\"单元格\"\n      value=\"内容\"\n      label=\"描述信息\"\n      border=\"{{ false }}\"\n    />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"卡片风格\">\n  <van-cell-group inset>\n    <van-cell title=\"单元格\" value=\"内容\" />\n    <van-cell title=\"单元格\" value=\"内容\" label=\"描述信息\" />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"单元格大小\">\n  <van-cell-group>\n    <van-cell\n      title=\"单元格\"\n      value=\"内容\"\n      size=\"large\"\n    />\n    <van-cell\n      title=\"单元格\"\n      value=\"内容\"\n      size=\"large\"\n      use-label-slot\n      border=\"{{ false }}\"\n    >\n      <view slot=\"label\">描述信息</view>\n    </van-cell>\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"展示图标\">\n  <van-cell\n    title=\"单元格\"\n    value=\"内容\"\n    icon=\"location-o\"\n    border=\"{{ false }}\"\n  />\n</demo-block>\n\n<demo-block title=\"展示箭头\">\n  <van-cell title=\"单元格\" is-link />\n  <van-cell\n    title=\"单元格\"\n    value=\"内容\"\n    is-link\n  />\n  <van-cell\n    title=\"单元格\"\n    is-link\n    arrow-direction=\"down\"\n    value=\"内容\"\n    border=\"{{ false }}\"\n  />\n</demo-block>\n\n<demo-block title=\"页面跳转\">\n  <van-cell title=\"单元格\" is-link url=\"/pages/dashboard/index\" />\n  <van-cell title=\"单元格\" is-link url=\"/pages/dashboard/index\" link-type=\"redirectTo\" />\n</demo-block>\n\n<demo-block title=\"分组标题\">\n  <van-cell-group title=\"分组 1\">\n    <van-cell title=\"单元格\" value=\"内容\" />\n  </van-cell-group>\n  <van-cell-group title=\"分组 2\">\n    <van-cell title=\"单元格\" value=\"内容\" />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"使用插槽\">\n  <van-cell value=\"内容\" icon=\"shop-o\" is-link>\n    <view slot=\"title\">\n      <view class=\"title\">单元格</view>\n      <van-tag type=\"danger\">标签</van-tag>\n    </view>\n  </van-cell>\n  <van-cell title=\"单元格\" border=\"{{ false }}\">\n    <van-icon slot=\"right-icon\" name=\"search\" />\n  </van-cell>\n</demo-block>\n\n<demo-block title=\"垂直居中\">\n  <van-cell\n    center\n    title=\"单元格\"\n    value=\"内容\"\n    label=\"描述信息\"\n  />\n</demo-block>\n"
  },
  {
    "path": "packages/cell/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/cell/index.less",
    "content": "@import '../common/style/var.less';\n@import '../common/style/mixins/hairline.less';\n\n.van-cell {\n  position: relative;\n  display: flex;\n  box-sizing: border-box;\n  width: 100%;\n  padding: var(--cell-vertical-padding, @cell-vertical-padding)\n    var(--cell-horizontal-padding, @cell-horizontal-padding);\n  font-size: var(--cell-font-size, @cell-font-size);\n  line-height: var(--cell-line-height, @cell-line-height);\n  color: var(--cell-text-color, @cell-text-color);\n  background-color: var(--cell-background-color, @cell-background-color);\n\n  &::after {\n    .hairline-bottom(@border-color, @padding-md, @padding-md);\n  }\n\n  &--borderless::after {\n    display: none;\n  }\n\n  &-group {\n    background-color: var(--cell-background-color, @cell-background-color);\n  }\n\n  &__label {\n    margin-top: var(--cell-label-margin-top, @cell-label-margin-top);\n    font-size: var(--cell-label-font-size, @cell-label-font-size);\n    line-height: var(--cell-label-line-height, @cell-label-line-height);\n    color: var(--cell-label-color, @cell-label-color);\n  }\n\n  &__value {\n    overflow: hidden;\n    text-align: right;\n    vertical-align: middle;\n    color: var(--cell-value-color, @cell-value-color);\n  }\n\n  &__title,\n  &__value {\n    flex: 1;\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &__left-icon-wrap,\n  &__right-icon-wrap {\n    display: flex;\n    align-items: center;\n    height: var(--cell-line-height, @cell-line-height);\n    font-size: var(--cell-icon-size, @cell-icon-size);\n  }\n\n  &__left-icon-wrap {\n    margin-right: var(--padding-base, @padding-base);\n  }\n\n  &__right-icon-wrap {\n    margin-left: var(--padding-base, @padding-base);\n    color: var(--cell-right-icon-color, @cell-right-icon-color);\n  }\n\n  &__left-icon {\n    vertical-align: middle;\n    line-height: var(--cell-line-height, @cell-line-height);\n  }\n\n  &__right-icon {\n    line-height: var(--cell-line-height, @cell-line-height);\n  }\n\n  &--clickable&--hover {\n    background-color: var(--cell-active-color, @cell-active-color);\n  }\n\n  &--required {\n    overflow: visible;\n\n    &::before {\n      position: absolute;\n      content: '*';\n      left: var(--padding-xs, @padding-xs);\n      font-size: var(--cell-font-size, @cell-font-size);\n      color: var(--cell-required-color, @cell-required-color);\n    }\n  }\n\n  &--center {\n    align-items: center;\n  }\n\n  &--large {\n    padding-top: var(\n      --cell-large-vertical-padding,\n      @cell-large-vertical-padding\n    );\n    padding-bottom: var(\n      --cell-large-vertical-padding,\n      @cell-large-vertical-padding\n    );\n\n    .van-cell__title {\n      font-size: var(--cell-large-title-font-size, @cell-large-title-font-size);\n    }\n\n    .van-cell__value {\n      font-size: var(--cell-large-value-font-size, @cell-large-value-font-size);\n    }\n\n    .van-cell__label {\n      font-size: var(--cell-large-label-font-size, @cell-large-label-font-size);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/cell/index.ts",
    "content": "import { link } from '../mixins/link';\nimport { VantComponent } from '../common/component';\n\nVantComponent({\n  classes: [\n    'title-class',\n    'label-class',\n    'value-class',\n    'right-icon-class',\n    'hover-class',\n  ],\n\n  mixins: [link],\n\n  props: {\n    title: null,\n    value: null,\n    icon: String,\n    size: String,\n    label: String,\n    center: Boolean,\n    isLink: Boolean,\n    required: Boolean,\n    clickable: Boolean,\n    titleWidth: String,\n    customStyle: String,\n    arrowDirection: String,\n    useLabelSlot: Boolean,\n    border: {\n      type: Boolean,\n      value: true,\n    },\n    titleStyle: String,\n  },\n\n  methods: {\n    onClick(event: WechatMiniprogram.TouchEvent) {\n      this.$emit('click', event.detail);\n      this.jumpLink();\n    },\n  },\n});\n"
  },
  {
    "path": "packages/cell/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('cell', [size, { center, required, borderless: !border, clickable: isLink || clickable }]) }}\"\n  hover-class=\"van-cell--hover hover-class\"\n  hover-stay-time=\"70\"\n  style=\"{{ customStyle }}\"\n  bind:tap=\"onClick\"\n>\n  <van-icon\n    wx:if=\"{{ icon }}\"\n    name=\"{{ icon }}\"\n    class=\"van-cell__left-icon-wrap\"\n    custom-class=\"van-cell__left-icon\"\n  />\n  <slot wx:else name=\"icon\" />\n\n  <view\n    style=\"{{ computed.titleStyle({ titleWidth, titleStyle }) }}\"\n    class=\"van-cell__title title-class\"\n  >\n\n    <block wx:if=\"{{ title }}\">{{ title }}</block>\n    <slot wx:else name=\"title\" />\n\n    <view wx:if=\"{{ label || useLabelSlot }}\" class=\"van-cell__label label-class\">\n      <slot wx:if=\"{{ useLabelSlot }}\" name=\"label\" />\n      <block wx:elif=\"{{ label }}\">{{ label }}</block>\n    </view>\n  </view>\n\n  <view class=\"van-cell__value value-class\">\n    <block wx:if=\"{{ value || value === 0 }}\">{{ value }}</block>\n    <slot wx:else />\n  </view>\n\n  <van-icon\n    wx:if=\"{{ isLink }}\"\n    name=\"{{ arrowDirection ? 'arrow' + '-' + arrowDirection : 'arrow' }}\"\n    class=\"van-cell__right-icon-wrap right-icon-class\"\n    custom-class=\"van-cell__right-icon\"\n  />\n  <slot wx:else name=\"right-icon\" />\n\n  <slot name=\"extra\" />\n</view>\n"
  },
  {
    "path": "packages/cell/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction titleStyle(data) {\n  return style([\n    {\n      'max-width': addUnit(data.titleWidth),\n      'min-width': addUnit(data.titleWidth),\n    },\n    data.titleStyle,\n  ]);\n}\n\nmodule.exports = {\n  titleStyle: titleStyle,\n};\n"
  },
  {
    "path": "packages/cell/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-cell>\n            <wx-view\n              class=\"custom-class van-cell\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                单元格\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                内容\n              </wx-view>\n            </wx-view>\n          </van-cell>\n          <van-cell>\n            <wx-view\n              class=\"custom-class van-cell van-cell--borderless\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                单元格\n                <wx-view\n                  class=\"van-cell__label label-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                内容\n              </wx-view>\n            </wx-view>\n          </van-cell>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        卡片风格\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-cell-group--inset van-hairline--top-bottom\"\n        >\n          <van-cell>\n            <wx-view\n              class=\"custom-class van-cell\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                单元格\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                内容\n              </wx-view>\n            </wx-view>\n          </van-cell>\n          <van-cell>\n            <wx-view\n              class=\"custom-class van-cell\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                单元格\n                <wx-view\n                  class=\"van-cell__label label-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                内容\n              </wx-view>\n            </wx-view>\n          </van-cell>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        单元格大小\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-cell>\n            <wx-view\n              class=\"custom-class van-cell van-cell--large\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                单元格\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                内容\n              </wx-view>\n            </wx-view>\n          </van-cell>\n          <van-cell>\n            <wx-view\n              class=\"custom-class van-cell van-cell--large van-cell--borderless\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                单元格\n                <wx-view\n                  class=\"van-cell__label label-class\"\n                >\n                  <wx-view\n                    slot=\"label\"\n                  >\n                    描述信息\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                内容\n              </wx-view>\n            </wx-view>\n          </van-cell>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示图标\n      </wx-view>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--borderless\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <van-icon\n            class=\"van-cell__left-icon-wrap\"\n            customClass=\"van-cell__left-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-location-o\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            单元格\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          >\n            内容\n          </wx-view>\n        </wx-view>\n      </van-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示箭头\n      </wx-view>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            单元格\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            单元格\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          >\n            内容\n          </wx-view>\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            单元格\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          >\n            内容\n          </wx-view>\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow-down\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        页面跳转\n      </wx-view>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            单元格\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            单元格\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        分组标题\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"van-cell-group__title\"\n        >\n          \n  分组 1\n\n        </wx-view>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-cell>\n            <wx-view\n              class=\"custom-class van-cell\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                单元格\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                内容\n              </wx-view>\n            </wx-view>\n          </van-cell>\n        </wx-view>\n      </van-cell-group>\n      <van-cell-group>\n        <wx-view\n          class=\"van-cell-group__title\"\n        >\n          \n  分组 2\n\n        </wx-view>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-cell>\n            <wx-view\n              class=\"custom-class van-cell\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                单元格\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                内容\n              </wx-view>\n            </wx-view>\n          </van-cell>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        使用插槽\n      </wx-view>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <van-icon\n            class=\"van-cell__left-icon-wrap\"\n            customClass=\"van-cell__left-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-shop-o\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            <wx-view\n              slot=\"title\"\n            >\n              <wx-view\n                class=\"title\"\n              >\n                单元格\n              </wx-view>\n              <van-tag>\n                <wx-view\n                  class=\"custom-class van-tag van-tag--danger\"\n                  style=\"\"\n                >\n                  标签\n                </wx-view>\n              </van-tag>\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          >\n            内容\n          </wx-view>\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--borderless\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            单元格\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            slot=\"right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-search\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        垂直居中\n      </wx-view>\n      <van-cell>\n        <wx-view\n          class=\"custom-class van-cell van-cell--center\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            单元格\n            <wx-view\n              class=\"van-cell__label label-class\"\n            >\n              描述信息\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          >\n            内容\n          </wx-view>\n        </wx-view>\n      </van-cell>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/cell/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/cell-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/cell-group/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-cell-group {\n  &--inset {\n    margin: var(--cell-group-inset-padding, @cell-group-inset-padding);\n    border-radius: var(\n      --cell-group-inset-border-radius,\n      @cell-group-inset-border-radius\n    );\n    overflow: hidden;\n  }\n\n  &__title {\n    padding: var(--cell-group-title-padding, @cell-group-title-padding);\n    font-size: var(--cell-group-title-font-size, @cell-group-title-font-size);\n    line-height: var(\n      --cell-group-title-line-height,\n      @cell-group-title-line-height\n    );\n    color: var(--cell-group-title-color, @cell-group-title-color);\n\n    &--inset {\n      padding: var(\n        --cell-group-inset-title-padding,\n        @cell-group-inset-title-padding\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "packages/cell-group/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    title: String,\n    border: {\n      type: Boolean,\n      value: true,\n    },\n    inset: Boolean,\n  },\n});\n"
  },
  {
    "path": "packages/cell-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ title }}\"\n  class=\"{{ utils.bem('cell-group__title', { inset }) }}\"\n>\n  {{ title }}\n</view>\n<view class=\"custom-class {{ utils.bem('cell-group', { inset }) }} {{ border ? 'van-hairline--top-bottom' : '' }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/checkbox/README.md",
    "content": "# Checkbox 复选框\n\n### 介绍\n\n在一组备选项中进行多选。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-checkbox\": \"@vant/weapp/checkbox/index\",\n  \"van-checkbox-group\": \"@vant/weapp/checkbox-group/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n通过`value`绑定复选框的勾选状态。\n\n```html\n<van-checkbox value=\"{{ checked }}\" bind:change=\"onChange\">复选框</van-checkbox>\n```\n\n```js\nPage({\n  data: {\n    checked: true,\n  },\n\n  onChange(event) {\n    this.setData({\n      checked: event.detail,\n    });\n  },\n});\n```\n\n### 禁用状态\n\n通过设置`disabled`属性可以禁用复选框。\n\n```html\n<van-checkbox disabled value=\"{{ checked }}\" bind:change=\"onChange\">\n  复选框\n</van-checkbox>\n```\n\n### 自定义形状\n\n将`shape`属性设置为`square`，复选框的形状会变成方形。\n\n```html\n<van-checkbox value=\"{{ checked }}\" shape=\"square\" bind:change=\"onChange\">\n  复选框\n</van-checkbox>\n```\n\n### 自定义颜色\n\n通过`checked-color`属性可以自定义选中状态下的图标颜色。\n\n```html\n<van-checkbox\n  value=\"{{ checked }}\"\n  checked-color=\"#07c160\"\n  bind:change=\"onChange\"\n>\n  复选框\n</van-checkbox>\n```\n\n### 自定义大小\n\n通过`icon-size`属性可以自定义图标的大小。\n\n```html\n<van-checkbox value=\"{{ checked }}\" icon-size=\"25px\">复选框</van-checkbox>\n```\n\n### 自定义图标\n\n通过 icon 插槽自定义图标。\n\n```html\n<van-checkbox use-icon-slot value=\"{{ checked }}\" bind:change=\"onChange\">\n  自定义图标\n  <image slot=\"icon\" src=\"{{ checked ? activeIcon : inactiveIcon }}\" />\n</van-checkbox>\n```\n\n```js\nPage({\n  data: {\n    checked: true,\n    activeIcon: '//img.yzcdn.cn/icon-active.png',\n    inactiveIcon: '//img.yzcdn.cn/icon-normal.png',\n  },\n\n  onChange(event) {\n    this.setData({\n      checked: event.detail,\n    });\n  },\n});\n```\n\n### 禁用文本点击\n\n通过设置`label-disabled`属性可以禁用复选框文本点击。\n\n```html\n<van-checkbox value=\"{{ checked }}\" label-disabled>复选框</van-checkbox>\n```\n\n### 复选框组\n\n需要与`van-checkbox-group`一起使用，选中值是一个数组，通过`value`绑定在`van-checkbox-group`上，数组中的项即为选中的`Checkbox`的`name`属性设置的值。\n\n```html\n<van-checkbox-group value=\"{{ result }}\" bind:change=\"onChange\">\n  <van-checkbox name=\"a\">复选框 a</van-checkbox>\n  <van-checkbox name=\"b\">复选框 b</van-checkbox>\n  <van-checkbox name=\"c\">复选框 c</van-checkbox>\n</van-checkbox-group>\n```\n\n```javascript\nPage({\n  data: {\n    result: ['a', 'b'],\n  },\n\n  onChange(event) {\n    this.setData({\n      result: event.detail,\n    });\n  },\n});\n```\n\n### 限制最大可选数\n\n```html\n<van-checkbox-group value=\"{{ result }}\" bind:change=\"onChange\" max=\"{{ 2 }}\">\n  <van-checkbox name=\"a\">复选框 a</van-checkbox>\n  <van-checkbox name=\"b\">复选框 b</van-checkbox>\n  <van-checkbox name=\"c\">复选框 c</van-checkbox>\n</van-checkbox-group>\n```\n\n### 搭配单元格组件使用\n\n此时你需要再引入`Cell`和`CellGroup`组件，并通过 checkbox 的 toggle 方法手动触发切换。\n\n```html\n<van-checkbox-group value=\"{{ result }}\" bind:change=\"onChange\">\n  <van-cell-group>\n    <van-cell\n      wx:for=\"{{ list }}\"\n      wx:key=\"index\"\n      title=\"复选框 {{ item }}\"\n      value-class=\"value-class\"\n      clickable\n      data-index=\"{{ index }}\"\n      bind:click=\"toggle\"\n    >\n      <van-checkbox\n        catch:tap=\"noop\"\n        class=\"checkboxes-{{ index }}\"\n        name=\"{{ item }}\"\n      />\n    </van-cell>\n  </van-cell-group>\n</van-checkbox-group>\n```\n\n```js\nPage({\n  data: {\n    list: ['a', 'b', 'c'],\n    result: ['a', 'b'],\n  },\n\n  onChange(event) {\n    this.setData({\n      result: event.detail,\n    });\n  },\n\n  toggle(event) {\n    const { index } = event.currentTarget.dataset;\n    const checkbox = this.selectComponent(`.checkboxes-${index}`);\n    checkbox.toggle();\n  },\n\n  noop() {},\n});\n```\n\n```css\n.value-class {\n  flex: none !important;\n}\n```\n\n## API\n\n### Checkbox Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 标识 Checkbox 名称 | _string_ | - |\n| shape | 形状，可选值为 `round` `square` | _string_ | `round` |\n| value | 是否为选中状态 | _boolean_ | `false` |\n| disabled | 是否禁用单选框 | _boolean_ | `false` |\n| label-disabled | 是否禁用单选框内容点击 | _boolean_ | `false` |\n| label-position | 文本位置，可选值为 `left` | _string_ | `right` |\n| use-icon-slot | 是否使用 icon slot | _boolean_ | `false` |\n| checked-color | 选中状态颜色 | _string_ | `#1989fa` |\n| icon-size | icon 大小 | _string \\| number_ | `20px` |\n\n### CheckboxGroup Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 在表单内提交时的标识符 | _string_ | - |\n| value | 所有选中项的 name | _Array_ | - |\n| disabled | 是否禁用所有单选框 | _boolean_ | `false` |\n| max | 设置最大可选数 | _number_ | `0`（无限制） |\n| direction `v1.7.0` | 排列方向，可选值为 `horizontal` | _string_ | `vertical` |\n\n### Checkbox Event\n\n| 事件名      | 说明                     | 回调参数     |\n| ----------- | ------------------------ | ------------ |\n| bind:change | 当绑定值变化时触发的事件 | 当前组件的值 |\n\n### Checkbox 外部样式类\n\n| 类名         | 说明           |\n| ------------ | -------------- |\n| custom-class | 根节点样式类   |\n| icon-class   | 图标样式类     |\n| label-class  | 描述信息样式类 |\n\n### CheckboxGroup Event\n\n| 事件名      | 说明                     | 回调参数     |\n| ----------- | ------------------------ | ------------ |\n| bind:change | 当绑定值变化时触发的事件 | 当前组件的值 |\n\n### Checkbox Slot\n\n| 名称 | 说明       |\n| ---- | ---------- |\n| -    | 自定义文本 |\n| icon | 自定义图标 |\n\n### Checkbox 方法\n\n通过 selectComponent 可以获取到 checkbox 实例并调用实例方法。\n\n| 方法名 | 参数 | 返回值 | 介绍         |\n| ------ | ---- | ------ | ------------ |\n| toggle | -    | -      | 切换选中状态 |\n"
  },
  {
    "path": "packages/checkbox/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../../button/index\",\n    \"van-cell\": \"../../cell/index\",\n    \"van-checkbox\": \"../../checkbox/index\",\n    \"van-checkbox-group\": \"../../checkbox-group/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/checkbox/demo/index.less",
    "content": ".demo-checkbox-group {\n  margin: 10px 0 0 20px;\n}\n\n.demo-checkbox {\n  margin: 10px 0 0 20px;\n}\n\n.value-class {\n  flex: none !important;\n}\n\n.icon {\n  width: 20px;\n}\n"
  },
  {
    "path": "packages/checkbox/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    checkbox1: true,\n    checkbox2: true,\n    checkbox3: true,\n    checkboxLabel: true,\n    checkboxSize: true,\n    checkboxShape: true,\n    list: ['a', 'b', 'c'],\n    result: ['a', 'b'],\n    result2: [],\n    result3: [],\n    result4: [],\n    activeIcon: 'https://img.yzcdn.cn/vant/user-active.png',\n    inactiveIcon: 'https://img.yzcdn.cn/vant/user-inactive.png',\n  },\n\n  methods: {\n    onChange(event) {\n      const { key } = event.currentTarget.dataset;\n      this.setData({ [key]: event.detail });\n    },\n\n    toggle(event) {\n      const { index } = event.currentTarget.dataset;\n      const checkbox = this.selectComponent(`.checkboxes-${index}`);\n      checkbox.toggle();\n    },\n\n    noop() {},\n  },\n});\n"
  },
  {
    "path": "packages/checkbox/demo/index.wxml",
    "content": "<demo-block title=\"基本用法\">\n  <van-checkbox\n    value=\"{{ checkbox1 }}\"\n    data-key=\"checkbox1\"\n    custom-class=\"demo-checkbox\"\n    bind:change=\"onChange\"\n  >\n    复选框\n  </van-checkbox>\n</demo-block>\n\n<demo-block title=\"禁用状态\">\n  <van-checkbox\n    disabled\n    value=\"{{ false }}\"\n    custom-class=\"demo-checkbox\"\n  >\n    复选框\n  </van-checkbox>\n  <van-checkbox\n    disabled\n    value=\"{{ true }}\"\n    custom-class=\"demo-checkbox\"\n  >\n    复选框\n  </van-checkbox>\n</demo-block>\n\n<demo-block title=\"自定义形状\">\n  <van-checkbox\n    value=\"{{ checkboxShape }}\"\n    data-key=\"checkboxShape\"\n    shape=\"square\"\n    custom-class=\"demo-checkbox\"\n    bind:change=\"onChange\"\n  >\n    复选框\n  </van-checkbox>\n</demo-block>\n\n<demo-block title=\"自定义颜色\">\n  <van-checkbox\n    value=\"{{ checkbox2 }}\"\n    data-key=\"checkbox2\"\n    checked-color=\"#07c160\"\n    custom-class=\"demo-checkbox\"\n    bind:change=\"onChange\"\n  >\n    复选框\n  </van-checkbox>\n</demo-block>\n\n<demo-block title=\"自定义大小\">\n  <van-checkbox\n    icon-size=\"25px\"\n    value=\"{{ checkboxSize }}\"\n    data-key=\"checkboxSize\"\n    custom-class=\"demo-checkbox\"\n    bind:change=\"onChange\"\n  >\n    复选框\n  </van-checkbox>\n</demo-block>\n\n<demo-block title=\"自定义图标\">\n  <van-checkbox\n    use-icon-slot\n    value=\"{{ checkbox3 }}\"\n    data-key=\"checkbox3\"\n    custom-class=\"demo-checkbox\"\n    bind:change=\"onChange\"\n  >\n    自定义图标\n    <image\n      slot=\"icon\"\n      class=\"icon\"\n      mode=\"widthFix\"\n      src=\"{{ checkbox3 ? activeIcon : inactiveIcon }}\"\n    />\n  </van-checkbox>\n</demo-block>\n\n<demo-block title=\"禁用文本点击\">\n  <van-checkbox\n    label-disabled\n    value=\"{{ checkboxLabel }}\"\n    data-key=\"checkboxLabel\"\n    custom-class=\"demo-checkbox\"\n    bind:change=\"onChange\"\n  >\n    复选框\n  </van-checkbox>\n</demo-block>\n\n<demo-block title=\"复选框组\">\n  <van-checkbox-group value=\"{{ result }}\" data-key=\"result\" bind:change=\"onChange\">\n    <van-checkbox\n      wx:for=\"{{ list }}\"\n      wx:key=\"*this\"\n      name=\"{{ item }}\"\n      custom-class=\"demo-checkbox\"\n    >\n      复选框 {{ item }}\n    </van-checkbox>\n  </van-checkbox-group>\n</demo-block>\n\n<demo-block title=\"水平排列\">\n  <van-checkbox-group direction=\"horizontal\" value=\"{{ result4 }}\" data-key=\"result4\" bind:change=\"onChange\">\n    <van-checkbox\n      wx:for=\"{{ list }}\"\n      wx:key=\"*this\"\n      name=\"{{ item }}\"\n      custom-class=\"demo-checkbox\"\n    >\n      复选框 {{ item }}\n    </van-checkbox>\n  </van-checkbox-group>\n</demo-block>\n\n<demo-block title=\"限制最大可选数\">\n  <van-checkbox-group value=\"{{ result2 }}\" data-key=\"result2\" max=\"2\" bind:change=\"onChange\">\n    <van-checkbox\n      wx:for=\"{{ list }}\"\n      wx:key=\"*this\"\n      name=\"{{ item }}\"\n      custom-class=\"demo-checkbox\"\n    >\n      复选框 {{ item }}\n    </van-checkbox>\n  </van-checkbox-group>\n</demo-block>\n\n<demo-block title=\"搭配单元格组件使用\">\n  <van-checkbox-group value=\"{{ result3 }}\" data-key=\"result3\" bind:change=\"onChange\">\n    <van-cell-group >\n      <van-cell\n        wx:for=\"{{ list }}\"\n        wx:key=\"*this\"\n        title=\"复选框 {{ item }}\"\n        value-class=\"value-class\"\n        clickable\n        data-index=\"{{ index }}\"\n        bind:click=\"toggle\"\n      >\n        <van-checkbox catch:tap=\"noop\" class=\"checkboxes-{{ index }}\" name=\"{{ item }}\" />\n      </van-cell>\n    </van-cell-group>\n  </van-checkbox-group>\n</demo-block>\n"
  },
  {
    "path": "packages/checkbox/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/checkbox/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-checkbox {\n  display: flex;\n  align-items: center;\n  overflow: hidden;\n  user-select: none;\n\n  &--horizontal {\n    margin-right: @padding-sm;\n  }\n\n  &__icon-wrap,\n  &__label {\n    line-height: var(--checkbox-size, @checkbox-size);\n  }\n\n  &__icon-wrap {\n    flex: none;\n  }\n\n  &__icon {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    box-sizing: border-box;\n    width: 1em;\n    height: 1em;\n    color: transparent;\n    text-align: center;\n    transition-property: color, border-color, background-color;\n    font-size: var(--checkbox-size, @checkbox-size);\n    border: 1px solid var(--checkbox-border-color, @checkbox-border-color);\n    transition-duration: var(\n      --checkbox-transition-duration,\n      @checkbox-transition-duration\n    );\n\n    &--round {\n      border-radius: 100%;\n    }\n\n    &--checked {\n      color: @white;\n      background-color: var(\n        --checkbox-checked-icon-color,\n        @checkbox-checked-icon-color\n      );\n      border-color: var(\n        --checkbox-checked-icon-color,\n        @checkbox-checked-icon-color\n      );\n    }\n\n    &--disabled {\n      background-color: var(\n        --checkbox-disabled-background-color,\n        @checkbox-disabled-background-color\n      );\n      border-color: var(\n        --checkbox-disabled-icon-color,\n        @checkbox-disabled-icon-color\n      );\n    }\n\n    &--disabled&--checked {\n      color: var(--checkbox-disabled-icon-color, @checkbox-disabled-icon-color);\n    }\n  }\n\n  &__label {\n    word-wrap: break-word;\n    padding-left: var(--checkbox-label-margin, @checkbox-label-margin);\n    color: var(--checkbox-label-color, @checkbox-label-color);\n\n    &--left {\n      float: left;\n      margin: 0 var(--checkbox-label-margin, @checkbox-label-margin) 0 0;\n    }\n\n    &--disabled {\n      color: var(\n        --checkbox-disabled-label-color,\n        @checkbox-disabled-label-color\n      );\n    }\n\n    &:empty {\n      margin: 0;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/checkbox/index.ts",
    "content": "import { useParent } from '../common/relation';\nimport { VantComponent } from '../common/component';\n\nfunction emit(\n  target: WechatMiniprogram.Component.TrivialInstance,\n  value: boolean | any[]\n) {\n  target.$emit('input', value);\n  target.$emit('change', value);\n}\n\nVantComponent({\n  field: true,\n\n  relation: useParent('checkbox-group'),\n\n  classes: ['icon-class', 'label-class'],\n\n  props: {\n    value: Boolean,\n    disabled: Boolean,\n    useIconSlot: Boolean,\n    checkedColor: String,\n    labelPosition: {\n      type: String,\n      value: 'right',\n    },\n    labelDisabled: Boolean,\n    shape: {\n      type: String,\n      value: 'round',\n    },\n    iconSize: {\n      type: null,\n      value: 20,\n    },\n  },\n\n  data: {\n    parentDisabled: false,\n    direction: 'vertical',\n  },\n\n  methods: {\n    emitChange(value: boolean) {\n      if (this.parent) {\n        this.setParentValue(this.parent, value);\n      } else {\n        emit(this, value);\n      }\n    },\n\n    toggle() {\n      const { parentDisabled, disabled, value } = this.data;\n      if (!disabled && !parentDisabled) {\n        this.emitChange(!value);\n      }\n    },\n\n    onClickLabel() {\n      const { labelDisabled, parentDisabled, disabled, value } = this.data;\n      if (!disabled && !labelDisabled && !parentDisabled) {\n        this.emitChange(!value);\n      }\n    },\n\n    setParentValue(\n      parent: WechatMiniprogram.Component.TrivialInstance,\n      value: boolean\n    ) {\n      const parentValue = parent.data.value.slice();\n      const { name } = this.data;\n      const { max } = parent.data;\n\n      if (value) {\n        if (max && parentValue.length >= max) {\n          return;\n        }\n\n        if (parentValue.indexOf(name) === -1) {\n          parentValue.push(name);\n          emit(parent, parentValue);\n        }\n      } else {\n        const index = parentValue.indexOf(name);\n        if (index !== -1) {\n          parentValue.splice(index, 1);\n          emit(parent, parentValue);\n        }\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/checkbox/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('checkbox', [{ horizontal: direction === 'horizontal' }]) }} custom-class\">\n  <view\n    wx:if=\"{{ labelPosition === 'left' }}\"\n    class=\"label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n  <view class=\"van-checkbox__icon-wrap\" bindtap=\"toggle\">\n    <slot wx:if=\"{{ useIconSlot }}\" name=\"icon\" />\n    <van-icon\n      wx:else\n      name=\"success\"\n      size=\"0.8em\"\n      class=\"{{ utils.bem('checkbox__icon', [shape, { disabled: disabled || parentDisabled, checked: value }]) }}\"\n      style=\"{{ computed.iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) }}\"\n      custom-class=\"icon-class\"\n      custom-style=\"line-height: 1.25em;\"\n    />\n  </view>\n  <view\n    wx:if=\"{{ labelPosition === 'right' }}\"\n    class=\"label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/checkbox/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {\n  var styles = {\n    'font-size': addUnit(iconSize),\n  };\n\n  if (checkedColor && value && !disabled && !parentDisabled) {\n    styles['border-color'] = checkedColor;\n    styles['background-color'] = checkedColor;\n  }\n\n  return style(styles);\n}\n\nmodule.exports = {\n  iconStyle: iconStyle,\n};\n"
  },
  {
    "path": "packages/checkbox/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基本用法\n      </wx-view>\n      <van-checkbox\n        customClass=\"demo-checkbox\"\n        data-key=\"checkbox1\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox custom-class\"\n        >\n          <wx-view\n            class=\"van-checkbox__icon-wrap\"\n            bind:tap=\"toggle\"\n          >\n            <van-icon\n              class=\"van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked\"\n              customClass=\"icon-class\"\n              style=\"font-size:20px\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-success\"\n                style=\"font-size:0.8em;line-height: 1.25em;\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"label-class van-checkbox__label van-checkbox__label--right\"\n            bind:tap=\"onClickLabel\"\n          >\n            \n    复选框\n  \n          </wx-view>\n        </wx-view>\n      </van-checkbox>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用状态\n      </wx-view>\n      <van-checkbox\n        customClass=\"demo-checkbox\"\n      >\n        <wx-view\n          class=\"van-checkbox custom-class\"\n        >\n          <wx-view\n            class=\"van-checkbox__icon-wrap\"\n            bind:tap=\"toggle\"\n          >\n            <van-icon\n              class=\"van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled\"\n              customClass=\"icon-class\"\n              style=\"font-size:20px\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-success\"\n                style=\"font-size:0.8em;line-height: 1.25em;\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"label-class van-checkbox__label van-checkbox__label--right van-checkbox__label--disabled\"\n            bind:tap=\"onClickLabel\"\n          >\n            \n    复选框\n  \n          </wx-view>\n        </wx-view>\n      </van-checkbox>\n      <van-checkbox\n        customClass=\"demo-checkbox\"\n      >\n        <wx-view\n          class=\"van-checkbox custom-class\"\n        >\n          <wx-view\n            class=\"van-checkbox__icon-wrap\"\n            bind:tap=\"toggle\"\n          >\n            <van-icon\n              class=\"van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled van-checkbox__icon--checked\"\n              customClass=\"icon-class\"\n              style=\"font-size:20px\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-success\"\n                style=\"font-size:0.8em;line-height: 1.25em;\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"label-class van-checkbox__label van-checkbox__label--right van-checkbox__label--disabled\"\n            bind:tap=\"onClickLabel\"\n          >\n            \n    复选框\n  \n          </wx-view>\n        </wx-view>\n      </van-checkbox>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义形状\n      </wx-view>\n      <van-checkbox\n        customClass=\"demo-checkbox\"\n        data-key=\"checkboxShape\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox custom-class\"\n        >\n          <wx-view\n            class=\"van-checkbox__icon-wrap\"\n            bind:tap=\"toggle\"\n          >\n            <van-icon\n              class=\"van-checkbox__icon van-checkbox__icon--square van-checkbox__icon--checked\"\n              customClass=\"icon-class\"\n              style=\"font-size:20px\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-success\"\n                style=\"font-size:0.8em;line-height: 1.25em;\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"label-class van-checkbox__label van-checkbox__label--right\"\n            bind:tap=\"onClickLabel\"\n          >\n            \n    复选框\n  \n          </wx-view>\n        </wx-view>\n      </van-checkbox>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义颜色\n      </wx-view>\n      <van-checkbox\n        customClass=\"demo-checkbox\"\n        data-key=\"checkbox2\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox custom-class\"\n        >\n          <wx-view\n            class=\"van-checkbox__icon-wrap\"\n            bind:tap=\"toggle\"\n          >\n            <van-icon\n              class=\"van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked\"\n              customClass=\"icon-class\"\n              style=\"font-size:20px;border-color:#07c160;background-color:#07c160\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-success\"\n                style=\"font-size:0.8em;line-height: 1.25em;\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"label-class van-checkbox__label van-checkbox__label--right\"\n            bind:tap=\"onClickLabel\"\n          >\n            \n    复选框\n  \n          </wx-view>\n        </wx-view>\n      </van-checkbox>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义大小\n      </wx-view>\n      <van-checkbox\n        customClass=\"demo-checkbox\"\n        data-key=\"checkboxSize\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox custom-class\"\n        >\n          <wx-view\n            class=\"van-checkbox__icon-wrap\"\n            bind:tap=\"toggle\"\n          >\n            <van-icon\n              class=\"van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked\"\n              customClass=\"icon-class\"\n              style=\"font-size:25px\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-success\"\n                style=\"font-size:0.8em;line-height: 1.25em;\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"label-class van-checkbox__label van-checkbox__label--right\"\n            bind:tap=\"onClickLabel\"\n          >\n            \n    复选框\n  \n          </wx-view>\n        </wx-view>\n      </van-checkbox>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义图标\n      </wx-view>\n      <van-checkbox\n        customClass=\"demo-checkbox\"\n        data-key=\"checkbox3\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox custom-class\"\n        >\n          <wx-view\n            class=\"van-checkbox__icon-wrap\"\n            bind:tap=\"toggle\"\n          >\n            <wx-image\n              class=\"icon\"\n              mode=\"widthFix\"\n              slot=\"icon\"\n              src=\"https://img.yzcdn.cn/vant/user-active.png\"\n            />\n          </wx-view>\n          <wx-view\n            class=\"label-class van-checkbox__label van-checkbox__label--right\"\n            bind:tap=\"onClickLabel\"\n          >\n            \n    自定义图标\n    \n          </wx-view>\n        </wx-view>\n      </van-checkbox>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用文本点击\n      </wx-view>\n      <van-checkbox\n        customClass=\"demo-checkbox\"\n        data-key=\"checkboxLabel\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox custom-class\"\n        >\n          <wx-view\n            class=\"van-checkbox__icon-wrap\"\n            bind:tap=\"toggle\"\n          >\n            <van-icon\n              class=\"van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked\"\n              customClass=\"icon-class\"\n              style=\"font-size:20px\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-success\"\n                style=\"font-size:0.8em;line-height: 1.25em;\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"label-class van-checkbox__label van-checkbox__label--right\"\n            bind:tap=\"onClickLabel\"\n          >\n            \n    复选框\n  \n          </wx-view>\n        </wx-view>\n      </van-checkbox>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        复选框组\n      </wx-view>\n      <van-checkbox-group\n        data-key=\"result\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox-group\"\n        >\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 a\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 b\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 c\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n        </wx-view>\n      </van-checkbox-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        水平排列\n      </wx-view>\n      <van-checkbox-group\n        data-key=\"result4\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox-group van-checkbox-group--horizontal\"\n        >\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox van-checkbox--horizontal custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 a\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox van-checkbox--horizontal custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 b\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox van-checkbox--horizontal custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 c\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n        </wx-view>\n      </van-checkbox-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        限制最大可选数\n      </wx-view>\n      <van-checkbox-group\n        data-key=\"result2\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox-group\"\n        >\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 a\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 b\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n          <van-checkbox\n            customClass=\"demo-checkbox\"\n          >\n            <wx-view\n              class=\"van-checkbox custom-class\"\n            >\n              <wx-view\n                class=\"van-checkbox__icon-wrap\"\n                bind:tap=\"toggle\"\n              >\n                <van-icon\n                  class=\"van-checkbox__icon van-checkbox__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"font-size:0.8em;line-height: 1.25em;\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      复选框 c\n    \n              </wx-view>\n            </wx-view>\n          </van-checkbox>\n        </wx-view>\n      </van-checkbox-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        搭配单元格组件使用\n      </wx-view>\n      <van-checkbox-group\n        data-key=\"result3\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-checkbox-group\"\n        >\n          <van-cell-group>\n            <van-cell\n              data-index=\"{{0}}\"\n              valueClass=\"value-class\"\n              bind:click=\"toggle\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--clickable\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"\"\n                >\n                  复选框 a\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <van-checkbox\n                    class=\"checkboxes-0\"\n                    catch:tap=\"noop\"\n                  >\n                    <wx-view\n                      class=\"van-checkbox custom-class\"\n                    >\n                      <wx-view\n                        class=\"van-checkbox__icon-wrap\"\n                        bind:tap=\"toggle\"\n                      >\n                        <van-icon\n                          class=\"van-checkbox__icon van-checkbox__icon--round\"\n                          customClass=\"icon-class\"\n                          style=\"font-size:20px\"\n                        >\n                          <wx-view\n                            class=\"custom-class van-icon van-icon-success\"\n                            style=\"font-size:0.8em;line-height: 1.25em;\"\n                            bind:tap=\"onClick\"\n                          />\n                        </van-icon>\n                      </wx-view>\n                      <wx-view\n                        class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                        bind:tap=\"onClickLabel\"\n                      />\n                    </wx-view>\n                  </van-checkbox>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n            <van-cell\n              data-index=\"{{1}}\"\n              valueClass=\"value-class\"\n              bind:click=\"toggle\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--clickable\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"\"\n                >\n                  复选框 b\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <van-checkbox\n                    class=\"checkboxes-1\"\n                    catch:tap=\"noop\"\n                  >\n                    <wx-view\n                      class=\"van-checkbox custom-class\"\n                    >\n                      <wx-view\n                        class=\"van-checkbox__icon-wrap\"\n                        bind:tap=\"toggle\"\n                      >\n                        <van-icon\n                          class=\"van-checkbox__icon van-checkbox__icon--round\"\n                          customClass=\"icon-class\"\n                          style=\"font-size:20px\"\n                        >\n                          <wx-view\n                            class=\"custom-class van-icon van-icon-success\"\n                            style=\"font-size:0.8em;line-height: 1.25em;\"\n                            bind:tap=\"onClick\"\n                          />\n                        </van-icon>\n                      </wx-view>\n                      <wx-view\n                        class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                        bind:tap=\"onClickLabel\"\n                      />\n                    </wx-view>\n                  </van-checkbox>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n            <van-cell\n              data-index=\"{{2}}\"\n              valueClass=\"value-class\"\n              bind:click=\"toggle\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--clickable\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"\"\n                >\n                  复选框 c\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <van-checkbox\n                    class=\"checkboxes-2\"\n                    catch:tap=\"noop\"\n                  >\n                    <wx-view\n                      class=\"van-checkbox custom-class\"\n                    >\n                      <wx-view\n                        class=\"van-checkbox__icon-wrap\"\n                        bind:tap=\"toggle\"\n                      >\n                        <van-icon\n                          class=\"van-checkbox__icon van-checkbox__icon--round\"\n                          customClass=\"icon-class\"\n                          style=\"font-size:20px\"\n                        >\n                          <wx-view\n                            class=\"custom-class van-icon van-icon-success\"\n                            style=\"font-size:0.8em;line-height: 1.25em;\"\n                            bind:tap=\"onClick\"\n                          />\n                        </van-icon>\n                      </wx-view>\n                      <wx-view\n                        class=\"label-class van-checkbox__label van-checkbox__label--right\"\n                        bind:tap=\"onClickLabel\"\n                      />\n                    </wx-view>\n                  </van-checkbox>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-cell-group>\n        </wx-view>\n      </van-checkbox-group>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/checkbox/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/checkbox-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/checkbox-group/index.less",
    "content": ".van-checkbox-group {\n  &--horizontal {\n    display: flex;\n    flex-wrap: wrap;\n  }\n}\n"
  },
  {
    "path": "packages/checkbox-group/index.ts",
    "content": "import { useChildren } from '../common/relation';\nimport { VantComponent } from '../common/component';\n\ntype TrivialInstance = WechatMiniprogram.Component.TrivialInstance;\n\nVantComponent({\n  field: true,\n\n  relation: useChildren('checkbox', function (target) {\n    this.updateChild(target);\n  }),\n\n  props: {\n    max: Number,\n    value: {\n      type: Array,\n      observer: 'updateChildren',\n    },\n    disabled: {\n      type: Boolean,\n      observer: 'updateChildren',\n    },\n    direction: {\n      type: String,\n      value: 'vertical',\n    },\n  },\n\n  methods: {\n    updateChildren() {\n      this.children.forEach((child) => this.updateChild(child));\n    },\n\n    updateChild(child: TrivialInstance) {\n      const { value, disabled, direction } = this.data;\n      child.setData({\n        value: value.indexOf(child.data.name) !== -1,\n        parentDisabled: disabled,\n        direction,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/checkbox-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"{{ utils.bem('checkbox-group', [{ horizontal: direction === 'horizontal' }]) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/circle/README.md",
    "content": "# Circle 环形进度条\n\n### 介绍\n\n圆环形的进度条组件，支持进度渐变动画。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-circle\": \"@vant/weapp/circle/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n`value`属性表示进度条的目标进度。\n\n```html\n<van-circle value=\"{{ 30 }}\" text=\"text\" />\n```\n\n### 宽度定制\n\n通过`stroke-width`属性来控制进度条宽度。\n\n```html\n<van-circle value=\"{{ value }}\" stroke-width=\"6\" text=\"宽度定制\" />\n```\n\n### 颜色定制\n\n通过`color`属性来控制进度条颜色，`layer-color`属性来控制轨道颜色。\n\n```html\n<van-circle\n  value=\"{{ value }}\"\n  layer-color=\"#eeeeee\"\n  color=\"#ee0a24\"\n  text=\"颜色定制\"\n/>\n```\n\n### 渐变色\n\n`color`属性支持传入对象格式来定义渐变色。\n\n```html\n<van-circle value=\"{{ value }}\" color=\"{{ gradientColor }}\" text=\"渐变色\" />\n```\n\n```javascript\nPage({\n  data: {\n    value: 25,\n    gradientColor: {\n      '0%': '#ffd01e',\n      '100%': '#ee0a24',\n    },\n  },\n});\n```\n\n### 逆时针方向\n\n将`clockwise`设置为`false`，进度会从逆时针方向开始。\n\n```html\n<van-circle\n  value=\"{{ value }}\"\n  color=\"#07c160\"\n  clockwise=\"{{ false }}\"\n  text=\"逆时针\"\n/>\n```\n\n### 大小定制\n\n通过`size`属性设置圆环直径。\n\n```html\n<van-circle value=\"{{ value }}\" size=\"120\" text=\"大小定制\" />\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| value | 目标进度 | _number_ | `0` |\n| type | 指定 canvas 类型，可选值为 `2d` | _string_ | - |\n| size | 圆环直径，默认单位为 `px` | _number_ | `100` |\n| color | 进度条颜色，传入对象格式可以定义渐变色 | _string \\| object_ | `#1989fa` |\n| layer-color | 轨道颜色 | _string_ | `#fff` |\n| fill | 填充颜色 | _string_ | - |\n| speed | 动画速度（单位为 value/s） | _number_ | `50` |\n| text | 文字 | _string_ | - |\n| stroke-width | 进度条宽度 | _number_ | `4` |\n| clockwise | 是否顺时针增加 | _boolean_ | `true` |\n\n### Slots\n\n| 名称 | 说明                                                       |\n| ---- | ---------------------------------------------------------- |\n| -    | 自定义文字内容，如果设置了`fill`，插槽内容会被原生组件覆盖 |\n"
  },
  {
    "path": "packages/circle/canvas.ts",
    "content": "type CanvasContext = WechatMiniprogram.CanvasContext;\n\nexport function adaptor(\n  ctx: CanvasContext & Record<string, unknown>\n): CanvasContext {\n  // @ts-ignore\n  return Object.assign(ctx, {\n    setStrokeStyle(val) {\n      ctx.strokeStyle = val;\n    },\n    setLineWidth(val) {\n      ctx.lineWidth = val;\n    },\n    setLineCap(val) {\n      ctx.lineCap = val;\n    },\n    setFillStyle(val) {\n      ctx.fillStyle = val;\n    },\n    setFontSize(val) {\n      ctx.font = String(val);\n    },\n    setGlobalAlpha(val) {\n      ctx.globalAlpha = val;\n    },\n    setLineJoin(val) {\n      ctx.lineJoin = val;\n    },\n    setTextAlign(val) {\n      ctx.textAlign = val;\n    },\n    setMiterLimit(val) {\n      ctx.miterLimit = val;\n    },\n    setShadow(offsetX, offsetY, blur, color) {\n      ctx.shadowOffsetX = offsetX;\n      ctx.shadowOffsetY = offsetY;\n      ctx.shadowBlur = blur;\n      ctx.shadowColor = color;\n    },\n    setTextBaseline(val) {\n      ctx.textBaseline = val;\n    },\n    createCircularGradient() {},\n    draw() {},\n  });\n}\n"
  },
  {
    "path": "packages/circle/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-circle\": \"../../circle/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/circle/demo/index.less",
    "content": ".van-circle {\n  margin: 5px 10px 20px;\n}\n.van-button {\n  margin-left: 10px;\n}\n"
  },
  {
    "path": "packages/circle/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nconst format = (rate) => Math.min(Math.max(rate, 0), 100);\n\nVantComponent({\n  data: {\n    value: 25,\n    gradientColor: {\n      '0%': '#ffd01e',\n      '100%': '#ee0a24',\n    },\n  },\n\n  methods: {\n    run(e) {\n      const step = parseFloat(e.currentTarget.dataset.step);\n      this.setData({\n        value: format((this.data.value += step)),\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/circle/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-circle type=\"2d\" value=\"{{ value }}\" text=\"{{ value }}%\" />\n</demo-block>\n\n<demo-block title=\"样式定制\">\n  <van-circle value=\"{{ value }}\" stroke-width=\"{{ 6 }}\" text=\"宽度定制\" />\n  <van-circle value=\"{{ value }}\" layer-color=\"#eee\" color=\"#ee0a24\" text=\"颜色定制\" />\n  <van-circle value=\"{{ value }}\" color=\"{{ gradientColor }}\" text=\"渐变色\" />\n  <van-circle value=\"{{ value }}\" color=\"#07c160\" clockwise=\"{{ false }}\" text=\"逆时针\" />\n  <van-circle value=\"{{ value }}\" size=\"120\" text=\"大小定制\" />\n</demo-block>\n\n<van-button type=\"primary\" size=\"small\" data-step=\"10\" bind:tap=\"run\">增加</van-button>\n<van-button type=\"danger\" size=\"small\" data-step=\"-10\" bind:tap=\"run\">减少</van-button>\n"
  },
  {
    "path": "packages/circle/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/circle/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-circle {\n  position: relative;\n  display: inline-block;\n  text-align: center;\n\n  &__text {\n    position: absolute;\n    top: 50%;\n    left: 0;\n    width: 100%;\n    transform: translateY(-50%);\n    color: var(--circle-text-color, @circle-text-color);\n  }\n}\n"
  },
  {
    "path": "packages/circle/index.ts",
    "content": "import { BLUE, WHITE } from '../common/color';\nimport { VantComponent } from '../common/component';\nimport { getSystemInfoSync } from '../common/utils';\nimport { isObj } from '../common/validator';\nimport { canIUseCanvas2d } from '../common/version';\nimport { adaptor } from './canvas';\n\nfunction format(rate) {\n  return Math.min(Math.max(rate, 0), 100);\n}\nconst PERIMETER = 2 * Math.PI;\nconst BEGIN_ANGLE = -Math.PI / 2;\nconst STEP = 1;\n\nVantComponent({\n  props: {\n    text: String,\n    lineCap: {\n      type: String,\n      value: 'round',\n    },\n    value: {\n      type: Number,\n      value: 0,\n      observer: 'reRender',\n    },\n    speed: {\n      type: Number,\n      value: 50,\n    },\n    size: {\n      type: Number,\n      value: 100,\n      observer() {\n        this.drawCircle(this.currentValue);\n      },\n    },\n    fill: String,\n    layerColor: {\n      type: String,\n      value: WHITE,\n    },\n    color: {\n      type: null,\n      value: BLUE,\n      observer() {\n        this.setHoverColor().then(() => {\n          this.drawCircle(this.currentValue);\n        });\n      },\n    },\n    type: {\n      type: String,\n      value: '',\n    },\n    strokeWidth: {\n      type: Number,\n      value: 4,\n    },\n    clockwise: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  data: {\n    hoverColor: BLUE,\n  },\n\n  methods: {\n    getContext(): Promise<WechatMiniprogram.CanvasContext> {\n      const { type, size } = this.data;\n\n      if (type === '' || !canIUseCanvas2d()) {\n        const ctx = wx.createCanvasContext('van-circle', this);\n        return Promise.resolve(ctx);\n      }\n\n      const dpr = getSystemInfoSync().pixelRatio;\n\n      return new Promise((resolve) => {\n        wx.createSelectorQuery()\n          .in(this)\n          .select('#van-circle')\n          .node()\n          .exec((res) => {\n            const canvas = res[0].node;\n            const ctx = canvas.getContext(type);\n\n            if (!this.inited) {\n              this.inited = true;\n              canvas.width = size * dpr;\n              canvas.height = size * dpr;\n              ctx.scale(dpr, dpr);\n            }\n\n            resolve(adaptor(ctx));\n          });\n      });\n    },\n\n    setHoverColor() {\n      const { color, size } = this.data;\n\n      if (isObj(color)) {\n        return this.getContext().then((context) => {\n          if (!context) return;\n\n          const LinearColor = context.createLinearGradient(size, 0, 0, 0);\n          Object.keys(color)\n            .sort((a, b) => parseFloat(a) - parseFloat(b))\n            .map((key) =>\n              LinearColor.addColorStop(\n                parseFloat(key) / 100,\n                color[key] as string\n              )\n            );\n          this.hoverColor = LinearColor;\n        });\n      }\n\n      this.hoverColor = color;\n      return Promise.resolve();\n    },\n\n    presetCanvas(context, strokeStyle, beginAngle, endAngle, fill?: string) {\n      const { strokeWidth, lineCap, clockwise, size } = this.data;\n      const position = size / 2;\n      const radius = position - strokeWidth / 2;\n\n      context.setStrokeStyle(strokeStyle);\n      context.setLineWidth(strokeWidth);\n      context.setLineCap(lineCap);\n\n      context.beginPath();\n      context.arc(position, position, radius, beginAngle, endAngle, !clockwise);\n      context.stroke();\n\n      if (fill) {\n        context.setFillStyle(fill);\n        context.fill();\n      }\n    },\n\n    renderLayerCircle(context) {\n      const { layerColor, fill } = this.data;\n      this.presetCanvas(context, layerColor, 0, PERIMETER, fill);\n    },\n\n    renderHoverCircle(context, formatValue) {\n      const { clockwise } = this.data;\n      // 结束角度\n      const progress = PERIMETER * (formatValue / 100);\n      const endAngle = clockwise\n        ? BEGIN_ANGLE + progress\n        : 3 * Math.PI - (BEGIN_ANGLE + progress);\n\n      this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle);\n    },\n\n    drawCircle(currentValue) {\n      const { size } = this.data;\n\n      this.getContext().then((context) => {\n        if (!context) return;\n\n        context.clearRect(0, 0, size, size);\n        this.renderLayerCircle(context);\n\n        const formatValue = format(currentValue);\n        if (formatValue !== 0) {\n          this.renderHoverCircle(context, formatValue);\n        }\n\n        context.draw();\n      });\n    },\n\n    reRender() {\n      // tofector 动画暂时没有想到好的解决方案\n      const { value, speed } = this.data;\n\n      if (speed <= 0 || speed > 1000) {\n        this.drawCircle(value);\n        return;\n      }\n\n      this.clearMockInterval();\n      this.currentValue = this.currentValue || 0;\n      const run = () => {\n        this.interval = setTimeout(() => {\n          if (this.currentValue !== value) {\n            if (Math.abs(this.currentValue - value) < STEP) {\n              this.currentValue = value;\n            } else if (this.currentValue < value) {\n              this.currentValue += STEP;\n            } else {\n              this.currentValue -= STEP;\n            }\n            this.drawCircle(this.currentValue);\n            run();\n          } else {\n            this.clearMockInterval();\n          }\n        }, 1000 / speed);\n      };\n      run();\n    },\n\n    clearMockInterval() {\n      if (this.interval) {\n        clearTimeout(this.interval);\n        this.interval = null;\n      }\n    },\n  },\n\n  mounted() {\n    this.currentValue = this.data.value;\n\n    this.setHoverColor().then(() => {\n      this.drawCircle(this.currentValue);\n    });\n  },\n\n  destroyed() {\n    this.clearMockInterval();\n  },\n});\n"
  },
  {
    "path": "packages/circle/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-circle\">\n  <canvas class=\"van-circle__canvas\" type=\"{{ type }}\" style=\"width: {{ utils.addUnit(size) }};height:{{ utils.addUnit(size) }}\" id=\"van-circle\" canvas-id=\"van-circle\"></canvas>\n  <view wx:if=\"{{ !text }}\" class=\"van-circle__text\">\n    <slot></slot>\n  </view>\n  <cover-view wx:else class=\"van-circle__text\">{{ text }}</cover-view>\n</view>\n"
  },
  {
    "path": "packages/circle/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-circle>\n        <wx-view\n          class=\"van-circle\"\n        >\n          <wx-canvas\n            canvasId=\"van-circle\"\n            class=\"van-circle__canvas\"\n            id=\"van-circle\"\n            style=\"width: 100px;height:100px\"\n            type=\"2d\"\n          />\n          <wx-cover-view\n            class=\"van-circle__text\"\n          >\n            25%\n          </wx-cover-view>\n        </wx-view>\n      </van-circle>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        样式定制\n      </wx-view>\n      <van-circle>\n        <wx-view\n          class=\"van-circle\"\n        >\n          <wx-canvas\n            canvasId=\"van-circle\"\n            class=\"van-circle__canvas\"\n            id=\"van-circle\"\n            style=\"width: 100px;height:100px\"\n            type=\"\"\n          />\n          <wx-cover-view\n            class=\"van-circle__text\"\n          >\n            宽度定制\n          </wx-cover-view>\n        </wx-view>\n      </van-circle>\n      <van-circle>\n        <wx-view\n          class=\"van-circle\"\n        >\n          <wx-canvas\n            canvasId=\"van-circle\"\n            class=\"van-circle__canvas\"\n            id=\"van-circle\"\n            style=\"width: 100px;height:100px\"\n            type=\"\"\n          />\n          <wx-cover-view\n            class=\"van-circle__text\"\n          >\n            颜色定制\n          </wx-cover-view>\n        </wx-view>\n      </van-circle>\n      <van-circle>\n        <wx-view\n          class=\"van-circle\"\n        >\n          <wx-canvas\n            canvasId=\"van-circle\"\n            class=\"van-circle__canvas\"\n            id=\"van-circle\"\n            style=\"width: 100px;height:100px\"\n            type=\"\"\n          />\n          <wx-cover-view\n            class=\"van-circle__text\"\n          >\n            渐变色\n          </wx-cover-view>\n        </wx-view>\n      </van-circle>\n      <van-circle>\n        <wx-view\n          class=\"van-circle\"\n        >\n          <wx-canvas\n            canvasId=\"van-circle\"\n            class=\"van-circle__canvas\"\n            id=\"van-circle\"\n            style=\"width: 100px;height:100px\"\n            type=\"\"\n          />\n          <wx-cover-view\n            class=\"van-circle__text\"\n          >\n            逆时针\n          </wx-cover-view>\n        </wx-view>\n      </van-circle>\n      <van-circle>\n        <wx-view\n          class=\"van-circle\"\n        >\n          <wx-canvas\n            canvasId=\"van-circle\"\n            class=\"van-circle__canvas\"\n            id=\"van-circle\"\n            style=\"width: 120px;height:120px\"\n            type=\"\"\n          />\n          <wx-cover-view\n            class=\"van-circle__text\"\n          >\n            大小定制\n          </wx-cover-view>\n        </wx-view>\n      </van-circle>\n    </wx-view>\n  </demo-block>\n  <van-button\n    data-step=\"10\"\n    size=\"small\"\n    type=\"primary\"\n    bind:tap=\"run\"\n  >\n    增加\n  </van-button>\n  <van-button\n    data-step=\"-10\"\n    size=\"small\"\n    type=\"danger\"\n    bind:tap=\"run\"\n  >\n    减少\n  </van-button>\n</main>\n`;\n"
  },
  {
    "path": "packages/circle/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/col/README.md",
    "content": "# Layout 布局\n\n### 介绍\n\nLayout 提供了`van-row`和`van-col`两个组件来进行行列布局。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-row\": \"@vant/weapp/row/index\",\n  \"van-col\": \"@vant/weapp/col/index\"\n}\n```\n\n## 代码演示\n\n### 基本用法\n\nLayout 组件提供了`24列栅格`，通过在`Col`上添加`span`属性设置列所占的宽度百分比。此外，添加`offset`属性可以设置列的偏移宽度，计算方式与 span 相同。\n\n```html\n<van-row>\n  <van-col span=\"8\">span: 8</van-col>\n  <van-col span=\"8\">span: 8</van-col>\n  <van-col span=\"8\">span: 8</van-col>\n</van-row>\n\n<van-row>\n  <van-col span=\"4\">span: 4</van-col>\n  <van-col span=\"10\" offset=\"4\">offset: 4, span: 10</van-col>\n</van-row>\n\n<van-row>\n  <van-col offset=\"12\" span=\"12\">offset: 12, span: 12</van-col>\n</van-row>\n```\n\n### 设置列元素间距\n\n通过`gutter`属性可以设置列元素之间的间距，默认间距为 0。\n\n```html\n<van-row gutter=\"20\">\n  <van-col span=\"8\">span: 8</van-col>\n  <van-col span=\"8\">span: 8</van-col>\n  <van-col span=\"8\">span: 8</van-col>\n</van-row>\n```\n\n## API\n\n### Row Props\n\n| 参数   | 说明                          | 类型               | 默认值 |\n| ------ | ----------------------------- | ------------------ | ------ |\n| gutter | 列元素之间的间距（单位为 px） | _string \\| number_ | -      |\n\n### Col Props\n\n| 参数   | 说明           | 类型               | 默认值 |\n| ------ | -------------- | ------------------ | ------ |\n| span   | 列元素宽度     | _string \\| number_ | -      |\n| offset | 列元素偏移距离 | _string \\| number_ | -      |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n"
  },
  {
    "path": "packages/col/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-row\": \"../../row/index\",\n    \"van-col\": \"../../col/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/col/demo/index.less",
    "content": ".dark,\n.light {\n  color: #fff;\n  font-size: 13px;\n  line-height: 30px;\n  text-align: center;\n  margin-bottom: 10px;\n  background-clip: content-box;\n}\n\n.dark {\n  background-color: #39a9ed;\n}\n\n.light {\n  background-color: #66c6f2;\n}\n"
  },
  {
    "path": "packages/col/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {},\n});\n"
  },
  {
    "path": "packages/col/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n  <van-row>\n    <van-col span=\"8\" custom-class=\"dark\">span: 8</van-col>\n    <van-col span=\"8\" custom-class=\"light\">span: 8</van-col>\n    <van-col span=\"8\" custom-class=\"dark\">span: 8</van-col>\n  </van-row>\n\n  <van-row>\n    <van-col span=\"4\" custom-class=\"dark\">span: 4</van-col>\n    <van-col span=\"10\" offset=\"4\" custom-class=\"light\">offset: 4, span: 10</van-col>\n  </van-row>\n\n  <van-row>\n    <van-col offset=\"12\" span=\"12\" custom-class=\"dark\">offset: 12, span: 12</van-col>\n  </van-row>\n</demo-block>\n\n<demo-block title=\"在列元素之间增加间距\" padding>\n  <van-row gutter=\"20\">\n    <van-col span=\"8\" custom-class=\"dark\">span: 8</van-col>\n    <van-col span=\"8\" custom-class=\"light\">span: 8</van-col>\n    <van-col span=\"8\" custom-class=\"dark\">span: 8</van-col>\n  </van-row>\n</demo-block>\n"
  },
  {
    "path": "packages/col/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/col/index.less",
    "content": ".van-col {\n  float: left;\n  box-sizing: border-box;\n}\n\n.generate(24);\n.generate(@n, @i: 1) when (@i =< @n) {\n  .van-col--@{i} {\n    width: @i * (100% / 24);\n  }\n  .van-col--offset-@{i} {\n    margin-left: @i * (100% / 24);\n  }\n  .generate(@n, (@i + 1));\n}\n"
  },
  {
    "path": "packages/col/index.ts",
    "content": "import { useParent } from '../common/relation';\nimport { VantComponent } from '../common/component';\n\nVantComponent({\n  relation: useParent('row'),\n\n  props: {\n    span: Number,\n    offset: Number,\n  },\n});\n"
  },
  {
    "path": "packages/col/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('col', [span]) }} {{ offset ? 'van-col--offset-' + offset : '' }}\"\n  style=\"{{ computed.rootStyle({ gutter }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/col/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  if (!data.gutter) {\n    return '';\n  }\n\n  return style({\n    'padding-right': addUnit(data.gutter / 2),\n    'padding-left': addUnit(data.gutter / 2),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "packages/col/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"\"\n        >\n          <van-col\n            customClass=\"dark\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"\"\n            >\n              span: 8\n            </wx-view>\n          </van-col>\n          <van-col\n            customClass=\"light\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"\"\n            >\n              span: 8\n            </wx-view>\n          </van-col>\n          <van-col\n            customClass=\"dark\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"\"\n            >\n              span: 8\n            </wx-view>\n          </van-col>\n        </wx-view>\n      </van-row>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"\"\n        >\n          <van-col\n            customClass=\"dark\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--4 \"\n              style=\"\"\n            >\n              span: 4\n            </wx-view>\n          </van-col>\n          <van-col\n            customClass=\"light\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--10 van-col--offset-4\"\n              style=\"\"\n            >\n              offset: 4, span: 10\n            </wx-view>\n          </van-col>\n        </wx-view>\n      </van-row>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"\"\n        >\n          <van-col\n            customClass=\"dark\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--12 van-col--offset-12\"\n              style=\"\"\n            >\n              offset: 12, span: 12\n            </wx-view>\n          </van-col>\n        </wx-view>\n      </van-row>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        在列元素之间增加间距\n      </wx-view>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"margin-right:-10px;margin-left:-10px\"\n        >\n          <van-col\n            customClass=\"dark\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              span: 8\n            </wx-view>\n          </van-col>\n          <van-col\n            customClass=\"light\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              span: 8\n            </wx-view>\n          </van-col>\n          <van-col\n            customClass=\"dark\"\n          >\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              span: 8\n            </wx-view>\n          </van-col>\n        </wx-view>\n      </van-row>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/col/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/collapse/README.md",
    "content": "# Collapse 折叠面板\n\n### 介绍\n\n将一组内容放置在多个折叠面板中，点击面板的标题可以展开或收缩其内容。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-collapse\": \"@vant/weapp/collapse/index\",\n  \"van-collapse-item\": \"@vant/weapp/collapse-item/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n通过`value`控制展开的面板列表，`activeNames`为数组格式。\n\n```html\n<van-collapse value=\"{{ activeNames }}\" bind:change=\"onChange\">\n  <van-collapse-item title=\"标题1\" name=\"1\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n  <van-collapse-item title=\"标题2\" name=\"2\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n  <van-collapse-item title=\"标题3\" name=\"3\" disabled>\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n</van-collapse>\n```\n\n```javascript\nPage({\n  data: {\n    activeNames: ['1'],\n  },\n  onChange(event) {\n    this.setData({\n      activeNames: event.detail,\n    });\n  },\n});\n```\n\n### 手风琴\n\n通过`accordion`可以设置为手风琴模式，最多展开一个面板，此时`activeName`为字符串格式。\n\n```html\n<van-collapse accordion value=\"{{ activeName }}\" bind:change=\"onChange\">\n  <van-collapse-item title=\"标题1\" name=\"1\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n  <van-collapse-item title=\"标题2\" name=\"2\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n  <van-collapse-item title=\"标题3\" name=\"3\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n</van-collapse>\n```\n\n```javascript\nPage({\n  data: {\n    activeName: '1',\n  },\n  onChange(event) {\n    this.setData({\n      activeName: event.detail,\n    });\n  },\n});\n```\n\n### 事件监听\n\n`van-collapse` 提供了 `change`, `open` 和 `close` 事件。`change` 事件在面板切换时触发，`open` 事件在面板展开时触发，`close` 事件在面板关闭时触发。\n\n```html\n<van-collapse\n  value=\"{{ activeNames }}\"\n  bind:change=\"onChange\"\n  bind:open=\"onOpen\"\n  bind:close=\"onClose\"\n>\n  <van-collapse-item title=\"标题1\" name=\"1\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n  <van-collapse-item title=\"标题2\" name=\"2\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n  <van-collapse-item title=\"标题3\" name=\"3\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n</van-collapse>\n```\n\n```javascript\nPage({\n  data: {\n    activeNames: ['1'],\n  },\n  onChange(event) {\n    this.setData({\n      activeNames: event.detail,\n    });\n  },\n  onOpen(event) {\n    Toast(`展开: ${event.detail}`);\n  },\n  onClose(event) {\n    Toast(`关闭: ${event.detail}`);\n  },\n});\n```\n\n### 自定义标题内容\n\n```html\n<van-collapse value=\"{{ activeNames }}\" bind:change=\"onChange\">\n  <van-collapse-item name=\"1\">\n    <view slot=\"title\">标题1<van-icon name=\"question-o\" /></view>\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n  <van-collapse-item title=\"标题2\" name=\"2\" icon=\"shop-o\">\n    代码是写出来给人看的，附带能在机器上运行\n  </van-collapse-item>\n</van-collapse>\n```\n\n```javascript\nPage({\n  data: {\n    activeNames: ['1'],\n  },\n  onChange(event) {\n    this.setData({\n      activeNames: event.detail,\n    });\n  },\n});\n```\n\n## API\n\n### Collapse Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| value | 当前展开面板的 name | 非手风琴模式：_(string \\| number)[]_<br>手风琴模式：_string \\| number_ | - |\n| accordion | 是否开启手风琴模式 | _boolean_ | `false` |\n| border | 是否显示外边框 | _boolean_ | `true` |\n\n### Collapse Event\n\n| 事件名 | 说明           | 参数                            |\n| ------ | -------------- | ------------------------------- |\n| change | 切换面板时触发 | activeNames: _string \\| Array_  |\n| open   | 展开面板时触发 | currentName: _string \\| number_ |\n| close  | 关闭面板时触发 | currentName: _string \\| number_ |\n\n### CollapseItem Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 唯一标识符，默认为索引值 | _string \\| number_ | `index` |\n| title | 标题栏左侧内容 | _string \\| number_ | - |\n| size | 标题栏大小，可选值为`large` | _string_ | - |\n| icon | 标题栏左侧图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | - |\n| value | 标题栏右侧内容 | _string \\| number_ | - |\n| label | 标题栏描述信息 | _string_ | - |\n| border | 是否显示内边框 | _boolean_ | `true` |\n| is-link | 是否展示标题栏右侧箭头并开启点击反馈 | _boolean_ | `true` |\n| clickable | 是否开启点击反馈 | _boolean_ | `false` |\n| disabled | 是否禁用面板 | _boolean_ | `false` |\n\n### CollapseItem Slot\n\n| 名称       | 说明                          |\n| ---------- | ----------------------------- |\n| -          | 面板内容                      |\n| value      | 自定义显示内容                |\n| icon       | 自定义`icon`                  |\n| title      | 自定义`title`                 |\n| right-icon | 自定义右侧按钮，默认是`arrow`, 需要将 `is-link` 设置为 `false`, 才会生效  |\n\n### Collapse 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n\n### CollapseItem 外部样式类\n\n| 类名          | 说明         |\n| ------------- | ------------ |\n| custom-class  | 根节点样式类 |\n| content-class | 内容样式类   |\n"
  },
  {
    "path": "packages/collapse/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-collapse\": \"../../collapse/index\",\n    \"van-collapse-item\": \"../../collapse-item/index\",\n    \"van-toast\": \"../../toast/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/collapse/demo/index.less",
    "content": ".van-icon-question {\n  margin-left: 5px;\n  font-size: 15px !important;\n  color: #1989fa;\n  vertical-align: -3px;\n}\n"
  },
  {
    "path": "packages/collapse/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  data: {\n    active1: [0],\n    active2: 0,\n    active3: [],\n    active4: [],\n    title1: '标题1',\n    title2: '标题2',\n    title3: '标题3',\n    content1: '代码是写出来给人看的，附带能在机器上运行',\n    content2: '代码是写出来给人看的，附带能在机器上运行',\n    content3: '代码是写出来给人看的，附带能在机器上运行',\n  },\n\n  methods: {\n    onChange(event) {\n      const { key } = event.currentTarget.dataset;\n      this.setData({\n        [key]: event.detail,\n      });\n    },\n\n    onOpen(event) {\n      Toast({\n        context: this,\n        message: `展开: ${event.detail}`,\n      });\n    },\n\n    onClose(event) {\n      Toast({\n        context: this,\n        message: `关闭: ${event.detail}`,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/collapse/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-collapse value=\"{{ active1 }}\" data-key=\"active1\" bind:change=\"onChange\">\n    <van-collapse-item title=\"{{ title1 }}\">{{ content1 }}</van-collapse-item>\n    <van-collapse-item title=\"{{ title2 }}\">{{ content2 }}</van-collapse-item>\n    <van-collapse-item title=\"{{ title3 }}\" disabled>{{ content3 }}</van-collapse-item>\n  </van-collapse>\n</demo-block>\n\n<demo-block title=\"手风琴\">\n  <van-collapse value=\"{{ active2 }}\" data-key=\"active2\" accordion bind:change=\"onChange\">\n    <van-collapse-item title=\"{{ title1 }}\">{{ content1 }}</van-collapse-item>\n    <van-collapse-item title=\"{{ title2 }}\">{{ content2 }}</van-collapse-item>\n    <van-collapse-item title=\"{{ title3 }}\">{{ content3 }}</van-collapse-item>\n  </van-collapse>\n</demo-block>\n\n<demo-block title=\"事件监听\">\n  <van-collapse value=\"{{ active3 }}\" data-key=\"active3\" bind:change=\"onChange\" bind:open=\"onOpen\" bind:close=\"onClose\">\n    <van-collapse-item title=\"{{ title1 }}\">{{ content1 }}</van-collapse-item>\n    <van-collapse-item title=\"{{ title2 }}\">{{ content2 }}</van-collapse-item>\n    <van-collapse-item title=\"{{ title3 }}\">{{ content3 }}</van-collapse-item>\n  </van-collapse>\n</demo-block>\n\n<demo-block title=\"自定义标题内容\">\n  <van-collapse value=\"{{ active4 }}\" data-key=\"active4\" bind:change=\"onChange\">\n    <van-collapse-item>\n      <view slot=\"title\">\n        {{ title1 }}\n        <van-icon name=\"question-o\" custom-class=\"van-icon-question\" />\n      </view>\n      {{ content1 }}\n    </van-collapse-item>\n    <van-collapse-item\n      title=\"{{ title2 }}\"\n      value=\"内容\"\n      icon=\"shop-o\"\n    >\n      {{ content2 }}\n    </van-collapse-item>\n  </van-collapse>\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/collapse/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/collapse/index.less",
    "content": "@import '../common/style/var.less';\n"
  },
  {
    "path": "packages/collapse/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\n\nVantComponent({\n  relation: useChildren('collapse-item'),\n\n  props: {\n    value: {\n      type: null,\n      observer: 'updateExpanded',\n    },\n    accordion: {\n      type: Boolean,\n      observer: 'updateExpanded',\n    },\n    border: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  methods: {\n    updateExpanded() {\n      this.children.forEach((child) => {\n        child.updateExpanded();\n      });\n    },\n\n    switch(name: string | number, expanded: boolean) {\n      const { accordion, value } = this.data;\n      const changeItem = name;\n      if (!accordion) {\n        name = expanded\n          ? (value || []).concat(name)\n          : (value || []).filter(\n              (activeName: string | number) => activeName !== name\n            );\n      } else {\n        name = expanded ? name : '';\n      }\n\n      if (expanded) {\n        this.$emit('open', changeItem);\n      } else {\n        this.$emit('close', changeItem);\n      }\n\n      this.$emit('change', name);\n      this.$emit('input', name);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/collapse/index.wxml",
    "content": "<view class=\"custom-class van-collapse {{ border ? 'van-hairline--top-bottom' : '' }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/collapse/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-collapse\n        data-key=\"active1\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-collapse van-hairline--top-bottom\"\n        >\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class \"\n            >\n              <van-cell\n                class=\"van-collapse-item__title van-collapse-item__title--expanded\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题1\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class van-hairline--top\"\n            >\n              <van-cell\n                class=\"van-collapse-item__title\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题2\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class van-hairline--top\"\n            >\n              <van-cell\n                class=\"van-collapse-item__title van-collapse-item__title--disabled\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题3\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n        </wx-view>\n      </van-collapse>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        手风琴\n      </wx-view>\n      <van-collapse\n        data-key=\"active2\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-collapse van-hairline--top-bottom\"\n        >\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class \"\n            >\n              <van-cell\n                class=\"van-collapse-item__title van-collapse-item__title--expanded\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题1\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class van-hairline--top\"\n            >\n              <van-cell\n                class=\"van-collapse-item__title\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题2\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class van-hairline--top\"\n            >\n              <van-cell\n                class=\"van-collapse-item__title\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题3\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n        </wx-view>\n      </van-collapse>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        事件监听\n      </wx-view>\n      <van-collapse\n        data-key=\"active3\"\n        bind:change=\"onChange\"\n        bind:close=\"onClose\"\n        bind:open=\"onOpen\"\n      >\n        <wx-view\n          class=\"custom-class van-collapse van-hairline--top-bottom\"\n        >\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class \"\n            >\n              <van-cell\n                class=\"van-collapse-item__title\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题1\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class van-hairline--top\"\n            >\n              <van-cell\n                class=\"van-collapse-item__title\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题2\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class van-hairline--top\"\n            >\n              <van-cell\n                class=\"van-collapse-item__title\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题3\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  代码是写出来给人看的，附带能在机器上运行\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n        </wx-view>\n      </van-collapse>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义标题内容\n      </wx-view>\n      <van-collapse\n        data-key=\"active4\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-collapse van-hairline--top-bottom\"\n        >\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class \"\n            >\n              <van-cell\n                class=\"van-collapse-item__title\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      slot=\"title\"\n                    >\n                      \n        标题1\n        \n                      <van-icon\n                        customClass=\"van-icon-question\"\n                        name=\"question-o\"\n                      />\n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  \n      代码是写出来给人看的，附带能在机器上运行\n    \n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n          <van-collapse-item>\n            <wx-view\n              class=\"van-collapse-item custom-class van-hairline--top\"\n            >\n              <van-cell\n                class=\"van-collapse-item__title\"\n                customClass=\"van-cell\"\n                hoverClass=\"van-cell--hover\"\n                rightIconClass=\"van-cell__right-icon\"\n                titleClass=\"title-class\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <van-icon\n                    class=\"van-cell__left-icon-wrap\"\n                    customClass=\"van-cell__left-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-shop-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    标题2\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  >\n                    内容\n                  </wx-view>\n                  <van-icon\n                    class=\"van-cell__right-icon-wrap right-icon-class\"\n                    customClass=\"van-cell__right-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-arrow\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </van-cell>\n              <wx-view\n                animation=\"\"\n                class=\"van-collapse-item__wrapper\"\n                style=\"height: 0;\"\n              >\n                <wx-view\n                  class=\"van-collapse-item__content content-class\"\n                >\n                  \n      代码是写出来给人看的，附带能在机器上运行\n    \n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-collapse-item>\n        </wx-view>\n      </van-collapse>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/collapse/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/collapse-item/animate.ts",
    "content": "import { getRect } from '../common/utils';\n\nfunction useAnimation(\n  context: WechatMiniprogram.Component.TrivialInstance,\n  expanded: boolean,\n  mounted: boolean,\n  height: number\n) {\n  const animation = wx.createAnimation({\n    duration: 0,\n    timingFunction: 'ease-in-out',\n  });\n\n  if (expanded) {\n    if (height === 0) {\n      animation.height('auto').top(1).step();\n    } else {\n      animation\n        .height(height)\n        .top(1)\n        .step({\n          duration: mounted ? 300 : 1,\n        })\n        .height('auto')\n        .step();\n    }\n\n    context.setData({\n      animation: animation.export(),\n    });\n    return;\n  }\n\n  animation.height(height).top(0).step({ duration: 1 }).height(0).step({\n    duration: 300,\n  });\n\n  context.setData({\n    animation: animation.export(),\n  });\n}\n\nexport function setContentAnimate(\n  context: WechatMiniprogram.Component.TrivialInstance,\n  expanded: boolean,\n  mounted: boolean\n) {\n  getRect(context, '.van-collapse-item__content')\n    .then((rect) => rect.height)\n    .then((height: number) => {\n      useAnimation(context, expanded, mounted, height);\n    });\n}\n"
  },
  {
    "path": "packages/collapse-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\"\n  }\n}\n"
  },
  {
    "path": "packages/collapse-item/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-collapse-item {\n  &__title {\n    .van-cell__right-icon {\n      transform: rotate(90deg);\n      transition: transform\n        var(\n          --collapse-item-transition-duration,\n          @collapse-item-transition-duration\n        );\n    }\n\n    &--expanded {\n      .van-cell__right-icon {\n        transform: rotate(-90deg);\n      }\n    }\n\n    &--disabled {\n      .van-cell,\n      .van-cell__right-icon {\n        color: var(\n          --collapse-item-title-disabled-color,\n          @collapse-item-title-disabled-color\n        ) !important;\n      }\n\n      .van-cell--hover {\n        background-color: @white !important;\n      }\n    }\n  }\n\n  &__wrapper {\n    overflow: hidden;\n  }\n\n  &__content {\n    padding: var(\n      --collapse-item-content-padding,\n      @collapse-item-content-padding\n    );\n    color: var(\n      --collapse-item-content-text-color,\n      @collapse-item-content-text-color\n    );\n    font-size: var(\n      --collapse-item-content-font-size,\n      @collapse-item-content-font-size\n    );\n    line-height: var(\n      --collapse-item-content-line-height,\n      @collapse-item-content-line-height\n    );\n    background-color: var(\n      --collapse-item-content-background-color,\n      @collapse-item-content-background-color\n    );\n  }\n}\n"
  },
  {
    "path": "packages/collapse-item/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nimport { setContentAnimate } from './animate';\n\nVantComponent({\n  classes: ['title-class', 'content-class'],\n\n  relation: useParent('collapse'),\n\n  props: {\n    size: String,\n    name: null,\n    title: null,\n    value: null,\n    icon: String,\n    label: String,\n    disabled: Boolean,\n    clickable: Boolean,\n    border: {\n      type: Boolean,\n      value: true,\n    },\n    isLink: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  data: {\n    expanded: false,\n    parentBorder: true,\n  },\n\n  mounted() {\n    this.updateExpanded();\n    this.mounted = true;\n  },\n\n  methods: {\n    updateExpanded() {\n      if (!this.parent) {\n        return;\n      }\n\n      const { value, accordion, border } = this.parent.data;\n      const { children = [] } = this.parent;\n      const { name } = this.data;\n\n      const index = children.indexOf(this);\n      const currentName = name == null ? index : name;\n\n      const expanded = accordion\n        ? value === currentName\n        : (value || []).some((name: string | number) => name === currentName);\n\n      if (expanded !== this.data.expanded) {\n        setContentAnimate(this, expanded, this.mounted);\n      }\n\n      this.setData({ index, expanded, parentBorder: border });\n    },\n\n    onClick() {\n      if (this.data.disabled) {\n        return;\n      }\n\n      const { name, expanded } = this.data;\n      const index = this.parent.children.indexOf(this);\n      const currentName = name == null ? index : name;\n\n      this.parent.switch(currentName, !expanded);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/collapse-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-collapse-item custom-class {{ index !== 0 && parentBorder ? 'van-hairline--top' : '' }}\">\n  <van-cell\n    size=\"{{ size }}\"\n    title=\"{{ title }}\"\n    title-class=\"title-class\"\n    icon=\"{{ icon }}\"\n    value=\"{{ value }}\"\n    label=\"{{ label }}\"\n    is-link=\"{{ isLink }}\"\n    clickable=\"{{ clickable }}\"\n    border=\"{{ border && expanded }}\"\n    class=\"{{ utils.bem('collapse-item__title', { disabled, expanded }) }}\"\n    right-icon-class=\"van-cell__right-icon\"\n    custom-class=\"van-cell\"\n    hover-class=\"van-cell--hover\"\n    bind:click=\"onClick\"\n  >\n    <slot\n      name=\"title\"\n      slot=\"title\"\n    />\n    <slot\n      name=\"icon\"\n      slot=\"icon\"\n    />\n    <slot name=\"value\" />\n    <slot\n      name=\"right-icon\"\n      slot=\"right-icon\"\n    />\n  </van-cell>\n  <view\n    class=\"{{ utils.bem('collapse-item__wrapper') }}\"\n    style=\"height: 0;\"\n    animation=\"{{ animation }}\"\n  >\n    <view\n      class=\"van-collapse-item__content content-class\"\n    >\n      <slot />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/common/README.md",
    "content": "# 内置样式\n\n### 介绍\n\nVant 中默认包含了一些常用样式，可以直接通过 className 的方式使用。\n\n### 引入\n\n在 app.wxss 中引入内置样式。\n\n```css\n@import '@vant/weapp/common/index.wxss';\n```\n\n## 代码演示\n\n### 文字省略\n\n当文本内容长度超过容器最大宽度时，自动省略多余的文本。\n\n```xml\n<view class=\"van-ellipsis\">\n  这是一段宽度限制 250px 的文字，后面的内容会省略。\n</view>\n\n<!-- 最多显示两行 -->\n<view class=\"van-multi-ellipsis--l2\">\n  这是一段最多显示两行的文字，后面的内容会省略。\n</view>\n\n<!-- 最多显示三行 -->\n<view class=\"van-multi-ellipsis--l3\">\n  这是一段最多显示三行的文字，后面的内容会省略。\n</view>\n```\n\n### 1px 边框\n\n为元素添加 Retina 屏幕下的 1px 边框（即 hairline），基于伪类 transform 实现。\n\n```xml\n<!-- 上边框 -->\n<view class=\"van-hairline--top\"></view>\n\n<!-- 下边框 -->\n<view class=\"van-hairline--bottom\"></view>\n\n<!-- 左边框 -->\n<view class=\"van-hairline--left\"></view>\n\n<!-- 右边框 -->\n<view class=\"van-hairline--right\"></view>\n\n<!-- 上下边框 -->\n<view class=\"van-hairline--top-bottom\"></view>\n\n<!-- 全边框 -->\n<view class=\"van-hairline--surround\"></view>\n```\n\n### 全局字体\n\n推荐在 app.wxss 中设置以下全局字体，以保证在不同设备上提供最佳的视觉体验。\n\n```css\npage {\n  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,\n    'Segoe UI', Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB',\n    'Microsoft Yahei', sans-serif;\n}\n```\n"
  },
  {
    "path": "packages/common/color.ts",
    "content": "export const RED = '#ee0a24';\nexport const BLUE = '#1989fa';\nexport const WHITE = '#fff';\nexport const GREEN = '#07c160';\nexport const ORANGE = '#ff976a';\nexport const GRAY = '#323233';\nexport const GRAY_DARK = '#969799';\n"
  },
  {
    "path": "packages/common/component.ts",
    "content": "import { basic } from '../mixins/basic';\nimport { VantComponentOptions } from 'definitions/index';\n\nfunction mapKeys(\n  source: Record<string, any>,\n  target: Record<string, any>,\n  map: Record<string, any>\n) {\n  Object.keys(map).forEach((key) => {\n    if (source[key]) {\n      target[map[key]] = source[key];\n    }\n  });\n}\n\nfunction VantComponent<\n  Data extends WechatMiniprogram.Component.DataOption,\n  Props extends WechatMiniprogram.Component.PropertyOption,\n  Methods extends WechatMiniprogram.Component.MethodOption\n>(vantOptions: VantComponentOptions<Data, Props, Methods>): void {\n  const options: WechatMiniprogram.Component.Options<Data, Props, Methods> = {};\n\n  mapKeys(vantOptions, options, {\n    data: 'data',\n    props: 'properties',\n    watch: 'observers',\n    mixins: 'behaviors',\n    methods: 'methods',\n    beforeCreate: 'created',\n    created: 'attached',\n    mounted: 'ready',\n    destroyed: 'detached',\n    classes: 'externalClasses',\n  });\n\n  // add default externalClasses\n  options.externalClasses = options.externalClasses || [];\n  options.externalClasses.push('custom-class');\n\n  // add default behaviors\n  options.behaviors = options.behaviors || [];\n  options.behaviors.push(basic);\n\n  // add relations\n  const { relation } = vantOptions;\n  if (relation) {\n    options.relations = relation.relations;\n    options.behaviors.push(relation.mixin);\n  }\n\n  // map field to form-field behavior\n  if (vantOptions.field) {\n    options.behaviors.push('wx://form-field');\n  }\n\n  // add default options\n  options.options = {\n    multipleSlots: true,\n    addGlobalClass: true,\n  };\n\n  Component(options);\n}\n\nexport { VantComponent };\n"
  },
  {
    "path": "packages/common/index.less",
    "content": "/**\n * Entry of basic styles\n */\n\n@import './style/var.less';\n@import './style/ellipsis.less';\n@import './style/clearfix.less';\n@import './style/hairline.less';\n"
  },
  {
    "path": "packages/common/relation.ts",
    "content": "type TrivialInstance = WechatMiniprogram.Component.TrivialInstance;\ntype RelationOption = WechatMiniprogram.Component.RelationOption;\n\nexport function useParent(\n  name: string,\n  onEffect?: (this: TrivialInstance) => void\n) {\n  const path = `../${name}/index`;\n\n  return {\n    relations: {\n      [path]: {\n        type: 'ancestor',\n        linked(this: TrivialInstance) {\n          onEffect && onEffect.call(this);\n        },\n        linkChanged(this: TrivialInstance) {\n          onEffect && onEffect.call(this);\n        },\n        unlinked(this: TrivialInstance) {\n          onEffect && onEffect.call(this);\n        },\n      } as RelationOption,\n    },\n\n    mixin: Behavior({\n      created() {\n        Object.defineProperty(this, 'parent', {\n          get: () => this.getRelationNodes(path)[0],\n        });\n\n        Object.defineProperty(this, 'index', {\n          // @ts-ignore\n          get: () => this.parent?.children?.indexOf(this),\n        });\n      },\n    }),\n  };\n}\n\nexport function useChildren(\n  name: string,\n  onEffect?: (this: TrivialInstance, target: TrivialInstance) => void\n) {\n  const path = `../${name}/index`;\n\n  return {\n    relations: {\n      [path]: {\n        type: 'descendant',\n        linked(this: TrivialInstance, target) {\n          onEffect && onEffect.call(this, target);\n        },\n        linkChanged(this: TrivialInstance, target) {\n          onEffect && onEffect.call(this, target);\n        },\n        unlinked(this: TrivialInstance, target) {\n          onEffect && onEffect.call(this, target);\n        },\n      } as RelationOption,\n    },\n\n    mixin: Behavior({\n      created() {\n        Object.defineProperty(this, 'children', {\n          get: () => this.getRelationNodes(path) || [],\n        });\n      },\n    }),\n  };\n}\n"
  },
  {
    "path": "packages/common/style/clearfix.less",
    "content": "@import './mixins/clearfix.less';\n\n.van-clearfix {\n  .clearfix();\n}\n"
  },
  {
    "path": "packages/common/style/ellipsis.less",
    "content": "@import './mixins/ellipsis.less';\n\n.van-ellipsis {\n  .ellipsis();\n}\n\n.van-multi-ellipsis--l2 {\n  .multi-ellipsis(2);\n}\n\n.van-multi-ellipsis--l3 {\n  .multi-ellipsis(3);\n}\n"
  },
  {
    "path": "packages/common/style/hairline.less",
    "content": "@import './mixins/hairline.less';\n\n.van-hairline,\n.van-hairline--top,\n.van-hairline--left,\n.van-hairline--right,\n.van-hairline--bottom,\n.van-hairline--top-bottom,\n.van-hairline--surround {\n  position: relative;\n\n  &::after {\n    .hairline();\n  }\n}\n\n.van-hairline {\n  &--top::after {\n    border-top-width: 1px;\n  }\n\n  &--left::after {\n    border-left-width: 1px;\n  }\n\n  &--right::after {\n    border-right-width: 1px;\n  }\n\n  &--bottom::after {\n    border-bottom-width: 1px;\n  }\n\n  &--top-bottom::after {\n    border-width: 1px 0;\n  }\n\n  &--surround::after {\n    border-width: 1px;\n  }\n}\n"
  },
  {
    "path": "packages/common/style/mixins/clearfix.less",
    "content": ".clearfix() {\n  &::after {\n    display: table;\n    clear: both;\n    content: '';\n  }\n}\n"
  },
  {
    "path": "packages/common/style/mixins/ellipsis.less",
    "content": ".multi-ellipsis(@lines) {\n  display: -webkit-box;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  -webkit-line-clamp: @lines;\n\n  /* autoprefixer: ignore next */\n  -webkit-box-orient: vertical;\n}\n\n.ellipsis() {\n  overflow: hidden;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n"
  },
  {
    "path": "packages/common/style/mixins/hairline.less",
    "content": "@import '../var.less';\n\n.hairline-common() {\n  position: absolute;\n  box-sizing: border-box;\n  transform-origin: center; /* cover wechat button:after default transforn-origin */\n  content: ' ';\n  pointer-events: none;\n}\n\n.hairline(@color: @border-color) {\n  .hairline-common();\n\n  top: -50%;\n  right: -50%;\n  bottom: -50%;\n  left: -50%;\n  border: 0 solid @color;\n  transform: scale(0.5);\n}\n\n.hairline-top(@color: @border-color, @left: 0, @right: 0) {\n  .hairline-common();\n\n  top: 0;\n  right: @right;\n  left: @left;\n  border-top: 1px solid @color;\n  transform: scaleY(0.5);\n}\n\n.hairline-bottom(@color: @border-color, @left: 0, @right: 0) {\n  .hairline-common();\n\n  right: @right;\n  bottom: 0;\n  left: @left;\n  border-bottom: 1px solid @color;\n  transform: scaleY(0.5);\n}\n"
  },
  {
    "path": "packages/common/style/var.less",
    "content": "// Color Palette\n@black: #000;\n@white: #fff;\n@gray-1: #f7f8fa;\n@gray-2: #f2f3f5;\n@gray-3: #ebedf0;\n@gray-4: #dcdee0;\n@gray-5: #c8c9cc;\n@gray-6: #969799;\n@gray-7: #646566;\n@gray-8: #323233;\n@red: #ee0a24;\n@blue: #1989fa;\n@orange: #ff976a;\n@orange-dark: #ed6a0c;\n@orange-light: #fffbe8;\n@green: #07c160;\n\n// Gradient Colors\n@gradient-red: linear-gradient(to right, #ff6034, #ee0a24);\n@gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);\n\n// Component Colors\n@text-color: @gray-8;\n@active-color: @gray-2;\n@active-opacity: 0.7;\n@disabled-opacity: 0.5;\n@background-color: @gray-1;\n@background-color-light: #fafafa;\n@text-link-color: #576b95;\n\n// Padding\n@padding-base: 4px;\n@padding-xs: @padding-base * 2;\n@padding-sm: @padding-base * 3;\n@padding-md: @padding-base * 4;\n@padding-lg: @padding-base * 6;\n@padding-xl: @padding-base * 8;\n\n// Font\n@font-size-xs: 10px;\n@font-size-sm: 12px;\n@font-size-md: 14px;\n@font-size-lg: 16px;\n@font-weight-bold: 500;\n@line-height-xs: 14px;\n@line-height-sm: 18px;\n@line-height-md: 20px;\n@line-height-lg: 22px;\n@base-font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue',\n  Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB',\n  'Microsoft Yahei', sans-serif;\n@price-integer-font-family: Avenir-Heavy, PingFang SC, Helvetica Neue, Arial,\n  sans-serif;\n\n// Animation\n@animation-duration-base: 0.3s;\n@animation-duration-fast: 0.2s;\n\n// Border\n@border-color: @gray-3;\n@border-width-base: 1px;\n@border-radius-sm: 2px;\n@border-radius-md: 4px;\n@border-radius-lg: 8px;\n@border-radius-max: 999px;\n\n//ActionSheet\n@action-sheet-max-height: 90%;\n@action-sheet-header-height: 48px;\n@action-sheet-header-font-size: @font-size-lg;\n@action-sheet-description-color: @gray-6;\n@action-sheet-description-font-size: @font-size-md;\n@action-sheet-description-line-height: 20px;\n@action-sheet-item-background: @white;\n@action-sheet-item-font-size: @font-size-lg;\n@action-sheet-item-line-height: 22px;\n@action-sheet-item-text-color: @text-color;\n@action-sheet-item-disabled-text-color: @gray-5;\n@action-sheet-subname-color: @gray-6;\n@action-sheet-subname-font-size: @font-size-sm;\n@action-sheet-subname-line-height: 20px;\n@action-sheet-close-icon-size: 22px;\n@action-sheet-close-icon-color: @gray-5;\n@action-sheet-close-icon-padding: 0 @padding-md;\n@action-sheet-cancel-text-color: @gray-7;\n@action-sheet-cancel-padding-top: @padding-xs;\n@action-sheet-cancel-padding-color: @background-color;\n\n// Button\n@button-mini-height: 22px;\n@button-mini-min-width: 50px;\n@button-mini-font-size: @font-size-xs;\n@button-small-height: 30px;\n@button-small-font-size: @font-size-sm;\n@button-small-min-width: 60px;\n@button-normal-font-size: @font-size-md;\n@button-large-height: 50px;\n@button-default-color: @text-color;\n@button-default-height: 44px;\n@button-default-font-size: @font-size-lg;\n@button-default-background-color: @white;\n@button-default-border-color: @border-color;\n@button-primary-color: @white;\n@button-primary-background-color: @green;\n@button-primary-border-color: @green;\n@button-info-color: @white;\n@button-info-background-color: @blue;\n@button-info-border-color: @blue;\n@button-danger-color: @white;\n@button-danger-background-color: @red;\n@button-danger-border-color: @red;\n@button-warning-color: @white;\n@button-warning-background-color: @orange;\n@button-warning-border-color: @orange;\n@button-line-height: 20px;\n@button-border-width: 1px;\n@button-border-radius: @border-radius-sm;\n@button-round-border-radius: @border-radius-max;\n@button-plain-background-color: @white;\n@button-disabled-opacity: @disabled-opacity;\n\n// Calendar\n@calendar-height: 100%;\n@calendar-background-color: @white;\n@calendar-popup-height: 90%;\n@calendar-header-box-shadow: 0 2px 10px rgba(125, 126, 128, 0.16);\n@calendar-header-title-height: 44px;\n@calendar-header-title-font-size: @font-size-lg;\n@calendar-header-subtitle-font-size: @font-size-md;\n@calendar-weekdays-height: 30px;\n@calendar-weekdays-font-size: @font-size-sm;\n@calendar-month-title-font-size: @font-size-md;\n@calendar-month-mark-color: fade(@gray-2, 80%);\n@calendar-month-mark-font-size: 160px;\n@calendar-day-height: 64px;\n@calendar-day-font-size: @font-size-lg;\n@calendar-range-edge-color: @white;\n@calendar-range-edge-background-color: @red;\n@calendar-range-middle-color: @red;\n@calendar-range-middle-background-opacity: 0.1;\n@calendar-selected-day-size: 54px;\n@calendar-selected-day-color: @white;\n@calendar-info-font-size: @font-size-xs;\n@calendar-info-line-height: 14px;\n@calendar-selected-day-background-color: @red;\n@calendar-day-disabled-color: @gray-5;\n@calendar-confirm-button-height: 36px;\n@calendar-confirm-button-margin: 7px 0;\n@calendar-confirm-button-line-height: 34px;\n\n// Card\n@card-padding: @padding-xs @padding-md;\n@card-font-size: @font-size-sm;\n@card-text-color: @text-color;\n@card-background-color: @background-color-light;\n@card-thumb-size: 88px;\n@card-title-line-height: 16px;\n@card-desc-color: @gray-7;\n@card-desc-line-height: 20px;\n@card-price-color: @red;\n@card-origin-price-color: @gray-7;\n@card-origin-price-font-size: @font-size-xs;\n@card-price-font-size: @font-size-sm;\n@card-price-integer-font-size: @font-size-lg;\n@card-price-font-family: @price-integer-font-family;\n\n// Cell\n@cell-font-size: @font-size-md;\n@cell-line-height: 24px;\n@cell-vertical-padding: 10px;\n@cell-horizontal-padding: @padding-md;\n@cell-text-color: @text-color;\n@cell-background-color: @white;\n@cell-border-color: @border-color;\n@cell-active-color: @active-color;\n@cell-required-color: @red;\n@cell-label-color: @gray-6;\n@cell-label-font-size: @font-size-sm;\n@cell-label-line-height: 18px;\n@cell-label-margin-top: 3px;\n@cell-value-color: @gray-6;\n@cell-icon-size: 16px;\n@cell-right-icon-color: @gray-6;\n@cell-large-vertical-padding: @padding-sm;\n@cell-large-title-font-size: @font-size-lg;\n@cell-large-value-font-size: @font-size-lg;\n@cell-large-label-font-size: @font-size-md;\n\n// CellGroup\n@cell-group-background-color: @white;\n@cell-group-title-color: @gray-6;\n@cell-group-title-padding: @padding-md @padding-md @padding-xs;\n@cell-group-title-font-size: @font-size-md;\n@cell-group-title-line-height: 16px;\n@cell-group-inset-padding: 0 @padding-md;\n@cell-group-inset-border-radius: @border-radius-lg;\n@cell-group-inset-title-padding: @padding-md @padding-md @padding-xs @padding-xl;\n\n// Checkbox\n@checkbox-size: 20px;\n@checkbox-border-color: @gray-5;\n@checkbox-transition-duration: 0.2s;\n@checkbox-label-margin: 10px;\n@checkbox-label-color: @text-color;\n@checkbox-checked-icon-color: @blue;\n@checkbox-disabled-icon-color: @gray-5;\n@checkbox-disabled-label-color: @gray-5;\n@checkbox-disabled-background-color: @border-color;\n\n// Circle\n@circle-text-color: @text-color;\n\n// Collapse\n@collapse-item-transition-duration: 0.3s;\n@collapse-item-content-padding: 15px;\n@collapse-item-content-font-size: 13px;\n@collapse-item-content-line-height: 1.5;\n@collapse-item-content-text-color: @gray-6;\n@collapse-item-content-background-color: @white;\n@collapse-item-title-disabled-color: @gray-5;\n\n// CountDown\n@count-down-text-color: @text-color;\n@count-down-font-size: @font-size-md;\n@count-down-line-height: 20px;\n\n// Dialog\n@dialog-width: 320px;\n@dialog-small-screen-width: 90%;\n@dialog-font-size: @font-size-lg;\n@dialog-border-radius: 16px;\n@dialog-background-color: @white;\n@dialog-header-font-weight: @font-weight-bold;\n@dialog-header-line-height: 24px;\n@dialog-header-padding-top: @padding-lg;\n@dialog-header-isolated-padding: @padding-lg 0;\n@dialog-message-padding: @padding-lg;\n@dialog-message-font-size: @font-size-md;\n@dialog-message-line-height: 20px;\n@dialog-message-max-height: 60vh;\n@dialog-has-title-message-text-color: @gray-7;\n@dialog-has-title-message-padding-top: @padding-xs;\n\n// Field\n@field-label-color: @gray-7;\n@field-input-text-color: @text-color;\n@field-input-error-text-color: @red;\n@field-input-disabled-text-color: @gray-5;\n@field-placeholder-text-color: @gray-5;\n@field-icon-size: 16px;\n@field-clear-icon-size: 16px;\n@field-clear-icon-color: @gray-5;\n@field-icon-container-color: @gray-6;\n@field-error-message-color: @red;\n@field-error-message-text-font-size: @font-size-sm;\n@field-text-area-min-height: 18px;\n@field-word-limit-color: @gray-7;\n@field-word-limit-font-size: @font-size-sm;\n@field-word-limit-line-height: 16px;\n@field-word-num-full-color: @red;\n@field-disabled-text-color: @gray-5;\n\n// GoodsAction\n@goods-action-background-color: @white;\n@goods-action-height: 50px;\n@goods-action-icon-width: 48px;\n@goods-action-icon-height: @goods-action-height;\n@goods-action-icon-color: @text-color;\n@goods-action-icon-size: 18px;\n@goods-action-icon-font-size: @font-size-xs;\n@goods-action-icon-text-color: @gray-7;\n@goods-action-button-height: 40px;\n@goods-action-button-line-height: @button-line-height;\n@goods-action-button-border-radius: @border-radius-max;\n@goods-action-button-warning-color: @gradient-orange;\n@goods-action-button-danger-color: @gradient-red;\n@goods-action-button-plain-color: @white;\n\n// Image\n@image-placeholder-text-color: @gray-6;\n@image-placeholder-font-size: @font-size-md;\n@image-placeholder-background-color: @background-color;\n@image-loading-icon-size: 32px;\n@image-loading-icon-color: @gray-4;\n@image-error-icon-size: 32px;\n@image-error-icon-color: @gray-4;\n\n// Info\n@info-size: 16px;\n@info-color: @white;\n@info-padding: 0 3px;\n@info-font-size: 12px;\n@info-font-weight: 500;\n@info-border-width: 1px;\n@info-background-color: @red;\n@info-dot-color: @red;\n@info-dot-size: 8px;\n@info-font-family: -apple-system-font, Helvetica Neue, Arial, sans-serif;\n\n// Loading\n@loading-text-color: @gray-6;\n@loading-text-font-size: @font-size-md;\n@loading-text-line-height: 20px;\n@loading-spinner-color: @gray-5;\n@loading-spinner-size: 30px;\n@loading-spinner-animation-duration: 0.8s;\n\n// NavBar\n@nav-bar-height: 46px;\n@nav-bar-background-color: @white;\n@nav-bar-arrow-size: 16px;\n@nav-bar-icon-color: @blue;\n@nav-bar-text-color: @blue;\n@nav-bar-title-font-size: @font-size-lg;\n@nav-bar-title-text-color: @text-color;\n\n// NoticeBar\n@notice-bar-height: 40px;\n@notice-bar-padding: 0 @padding-md;\n@notice-bar-wrapable-padding: @padding-xs @padding-md;\n@notice-bar-font-size: @font-size-md;\n@notice-bar-text-color: @orange-dark;\n@notice-bar-line-height: 24px;\n@notice-bar-background-color: @orange-light;\n@notice-bar-icon-size: 16px;\n@notice-bar-icon-min-width: 22px;\n\n// Notify\n@notify-padding: 6px 15px;\n@notify-font-size: 14px;\n@notify-line-height: 20px;\n@notify-primary-background-color: @blue;\n@notify-success-background-color: @green;\n@notify-danger-background-color: @red;\n@notify-warning-background-color: @orange;\n\n// Overlay\n@overlay-background-color: rgba(0, 0, 0, 0.7);\n\n// Panel\n@panel-background-color: @white;\n@panel-header-value-color: @red;\n@panel-footer-padding: @padding-xs @padding-md;\n\n// Picker\n@picker-background-color: @white;\n@picker-toolbar-height: 44px;\n@picker-title-font-size: @font-size-lg;\n@picker-action-padding: 0 @padding-md;\n@picker-action-font-size: @font-size-md;\n@picker-confirm-action-color: @text-link-color;\n@picker-cancel-action-color: @gray-6;\n@picker-option-font-size: @font-size-lg;\n@picker-option-text-color: @black;\n@picker-loading-icon-color: @blue;\n@picker-loading-mask-color: rgba(255, 255, 255, 0.9);\n@picker-option-disabled-opacity: 0.3;\n@picker-option-selected-text-color: @text-color;\n\n// Popup\n@popup-background-color: @white;\n@popup-round-border-radius: 16px;\n@popup-close-icon-size: 18px;\n@popup-close-icon-color: @gray-6;\n@popup-close-icon-margin: 16px;\n@popup-close-icon-z-index: 1;\n\n// Progress\n@progress-height: 4px;\n@progress-background-color: @gray-3;\n@progress-pivot-padding: 0 5px;\n@progress-color: @blue;\n@progress-pivot-font-size: @font-size-xs;\n@progress-pivot-line-height: 1.6;\n@progress-pivot-background-color: @blue;\n@progress-pivot-text-color: @white;\n\n// Radio\n@radio-size: 20px;\n@radio-border-color: @gray-5;\n@radio-transition-duration: 0.2s;\n@radio-label-margin: 10px;\n@radio-label-color: @text-color;\n@radio-checked-icon-color: @blue;\n@radio-disabled-icon-color: @gray-5;\n@radio-disabled-label-color: @gray-5;\n@radio-disabled-background-color: @border-color;\n\n// Rate\n@rate-horizontal-padding: 2px;\n@rate-icon-size: 20px;\n@rate-icon-void-color: @gray-5;\n@rate-icon-full-color: @red;\n@rate-icon-disabled-color: @gray-5;\n@rate-icon-gutter: @padding-base;\n\n// Switch\n@switch-width: 2em;\n@switch-height: 1em;\n@switch-node-size: 1em;\n@switch-node-z-index: 1;\n@switch-node-background-color: @white;\n@switch-node-box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05),\n  0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05);\n@switch-background-color: @white;\n@switch-on-background-color: @blue;\n@switch-transition-duration: 0.3s;\n@switch-disabled-opacity: 0.4;\n@switch-border: 1px solid rgba(0, 0, 0, 0.1);\n\n// ShareSheet\n@share-sheet-header-padding: @padding-sm @padding-md @padding-base;\n@share-sheet-title-color: @text-color;\n@share-sheet-title-font-size: @font-size-md;\n@share-sheet-title-line-height: @line-height-md;\n@share-sheet-description-color: @gray-6;\n@share-sheet-description-font-size: @font-size-sm;\n@share-sheet-description-line-height: 16px;\n@share-sheet-icon-size: 48px;\n@share-sheet-option-name-color: @gray-7;\n@share-sheet-option-name-font-size: @font-size-sm;\n@share-sheet-option-description-color: @gray-5;\n@share-sheet-option-description-font-size: @font-size-sm;\n@share-sheet-cancel-button-font-size: @font-size-lg;\n@share-sheet-cancel-button-height: 48px;\n@share-sheet-cancel-button-background: @white;\n\n// Search\n@search-background-color: @gray-1;\n@search-padding: 10px @padding-sm;\n@search-input-height: 34px;\n@search-label-padding: 0 5px;\n@search-label-color: @text-color;\n@search-label-font-size: @font-size-md;\n@search-left-icon-color: @gray-6;\n@search-action-padding: 0 @padding-xs;\n@search-action-text-color: @text-color;\n@search-action-font-size: @font-size-md;\n\n// Sidebar\n@sidebar-width: 80px;\n\n// SidebarItem\n@sidebar-font-size: @font-size-md;\n@sidebar-line-height: 20px;\n@sidebar-text-color: @text-color;\n@sidebar-disabled-text-color: @gray-5;\n@sidebar-padding: 20px @padding-sm 20px @padding-xs;\n@sidebar-active-color: @active-color;\n@sidebar-background-color: @background-color;\n@sidebar-selected-font-weight: @font-weight-bold;\n@sidebar-selected-text-color: @text-color;\n@sidebar-selected-border-color: @red;\n@sidebar-selected-background-color: @white;\n\n// Slider\n@slider-active-background-color: @blue;\n@slider-inactive-background-color: @gray-3;\n@slider-disabled-opacity: @disabled-opacity;\n@slider-bar-height: 2px;\n@slider-button-width: 24px;\n@slider-button-height: 24px;\n@slider-button-border-radius: 50%;\n@slider-button-background-color: @white;\n@slider-button-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);\n\n// Step\n@step-text-color: @gray-6;\n@step-process-text-color: @text-color;\n@step-font-size: @font-size-md;\n@step-line-color: @border-color;\n@step-finish-line-color: @green;\n@step-finish-text-color: @text-color;\n@step-icon-size: 12px;\n@step-circle-size: 5px;\n@step-circle-color: @gray-6;\n@step-horizontal-title-font-size: @font-size-sm;\n\n// Steps\n@steps-background-color: @white;\n\n// Stepper\n@stepper-active-color: #e8e8e8;\n@stepper-background-color: @active-color;\n@stepper-button-icon-color: @text-color;\n@stepper-button-disabled-color: @background-color;\n@stepper-button-disabled-icon-color: @gray-5;\n@stepper-button-round-theme-color: @red;\n@stepper-input-width: 32px;\n@stepper-input-height: 28px;\n@stepper-input-font-size: @font-size-md;\n@stepper-input-line-height: normal;\n@stepper-input-text-color: @text-color;\n@stepper-input-disabled-text-color: @gray-5;\n@stepper-input-disabled-background-color: @active-color;\n@stepper-border-radius: @border-radius-md;\n\n// SubmitBar\n@submit-bar-height: 50px;\n@submit-bar-z-index: 100;\n@submit-bar-background-color: @white;\n@submit-bar-button-width: 110px;\n@submit-bar-price-color: @red;\n@submit-bar-price-font-size: @font-size-sm;\n@submit-bar-currency-font-size: @font-size-sm;\n@submit-bar-text-color: @text-color;\n@submit-bar-text-font-size: 14px;\n@submit-bar-tip-padding: 10px;\n@submit-bar-tip-font-size: 12px;\n@submit-bar-tip-line-height: 1.5;\n@submit-bar-tip-color: #f56723;\n@submit-bar-tip-background-color: #fff7cc;\n@submit-bar-tip-icon-size: 12px;\n@submit-bar-button-height: 40px;\n@submit-bar-padding: 0 @padding-md;\n@submit-bar-price-integer-font-size: 20px;\n@submit-bar-price-font-family: @price-integer-font-family;\n\n// Tabbar\n@tabbar-height: 50px;\n@tabbar-background-color: @white;\n\n// TabbarItem\n@tabbar-item-font-size: @font-size-sm;\n@tabbar-item-text-color: @gray-7;\n@tabbar-item-active-color: @blue;\n@tabbar-item-line-height: 1;\n@tabbar-item-icon-size: 22px;\n@tabbar-item-margin-bottom: 4px;\n\n// Tab\n@tab-text-color: @gray-7;\n@tab-active-text-color: @text-color;\n@tab-disabled-text-color: @gray-5;\n@tab-font-size: @font-size-md;\n\n// Tabs\n@tabs-default-color: @red;\n@tabs-line-height: 44px;\n@tabs-card-height: 30px;\n@tabs-nav-background-color: @white;\n@tabs-bottom-bar-height: 3px;\n@tabs-bottom-bar-color: @tabs-default-color;\n\n// Tag\n@tag-padding: 0 @padding-base;\n@tag-text-color: @white;\n@tag-font-size: @font-size-sm;\n@tag-border-radius: 2px;\n@tag-line-height: 16px;\n@tag-medium-padding: 2px 6px;\n@tag-large-padding: @padding-base @padding-xs;\n@tag-large-border-radius: @border-radius-md;\n@tag-large-font-size: @font-size-md;\n@tag-round-border-radius: @border-radius-max;\n@tag-danger-color: @red;\n@tag-primary-color: @blue;\n@tag-success-color: @green;\n@tag-warning-color: @orange;\n@tag-default-color: @gray-6;\n@tag-plain-background-color: @white;\n\n// Toast\n@toast-max-width: 70%;\n@toast-font-size: 14px;\n@toast-text-color: @white;\n@toast-line-height: 20px;\n@toast-border-radius: @border-radius-lg;\n@toast-background-color: fade(@black, 70%);\n@toast-icon-size: 36px;\n@toast-text-min-width: 96px;\n@toast-text-padding: @padding-xs @padding-sm;\n@toast-default-padding: @padding-md;\n@toast-default-width: 88px;\n@toast-default-min-height: 88px;\n\n// GridItem\n@grid-item-content-padding: @padding-md @padding-xs;\n@grid-item-content-background-color: @white;\n@grid-item-content-active-color: @active-color;\n@grid-item-icon-size: 26px;\n@grid-item-text-color: @gray-7;\n@grid-item-text-font-size: @font-size-sm;\n\n// Divider\n@divider-margin: @padding-md 0;\n@divider-text-color: @gray-6;\n@divider-font-size: @font-size-md;\n@divider-line-height: 24px;\n@divider-border-color: @border-color;\n@divider-content-padding: @padding-md;\n@divider-content-left-width: 10%;\n@divider-content-right-width: 10%;\n\n// Empty\n@empty-padding: @padding-xl 0;\n@empty-image-size: 160px;\n@empty-description-margin-top: @padding-md;\n@empty-description-padding: 0 60px;\n@empty-description-color: @gray-6;\n@empty-description-font-size: 14px;\n@empty-description-line-height: 20px;\n@empty-bottom-margin-top: 24px;\n\n// TreeSelect\n@tree-select-font-size: @font-size-md;\n@tree-select-nav-background-color: @background-color;\n@tree-select-content-background-color: @white;\n@tree-select-nav-item-padding: @padding-sm @padding-xs @padding-sm @padding-sm;\n@tree-select-item-height: 44px;\n@tree-select-item-active-color: @red;\n@tree-select-item-disabled-color: @gray-5;\n\n// Uploader\n@uploader-size: 80px;\n@uploader-icon-size: 24px;\n@uploader-icon-color: @gray-4;\n@uploader-text-color: @gray-6;\n@uploader-text-font-size: @font-size-sm;\n@uploader-upload-background-color: @gray-1;\n@uploader-upload-active-color: @active-color;\n@uploader-delete-color: @white;\n@uploader-delete-icon-size: 14px;\n@uploader-delete-background-color: rgba(0, 0, 0, 0.7);\n@uploader-file-background-color: @background-color;\n@uploader-file-icon-size: 20px;\n@uploader-file-icon-color: @gray-7;\n@uploader-file-name-padding: 0 @padding-base;\n@uploader-file-name-margin-top: @padding-xs;\n@uploader-file-name-font-size: @font-size-sm;\n@uploader-file-name-text-color: @gray-7;\n@uploader-mask-background-color: fade(@gray-8, 88%);\n@uploader-mask-icon-size: 22px;\n@uploader-mask-message-font-size: @font-size-sm;\n@uploader-mask-message-line-height: 14px;\n@uploader-loading-icon-size: 22px;\n@uploader-loading-icon-color: @white;\n@uploader-disabled-opacity: @disabled-opacity;\n\n// DropdownMenu\n@dropdown-menu-height: 50px;\n@dropdown-menu-background-color: @white;\n@dropdown-menu-title-font-size: 15px;\n@dropdown-menu-title-text-color: @text-color;\n@dropdown-menu-title-active-text-color: @red;\n@dropdown-menu-title-disabled-text-color: @gray-6;\n@dropdown-menu-title-padding: 0 @padding-lg 0 @padding-xs;\n@dropdown-menu-title-line-height: 18px;\n@dropdown-menu-option-active-color: @red;\n@dropdown-menu-box-shadow: 0 2px 12px fade(@gray-7, 12);\n\n// IndexAnchor\n@index-anchor-padding: 0 @padding-md;\n@index-anchor-text-color: @text-color;\n@index-anchor-font-weight: 500;\n@index-anchor-font-size: @font-size-md;\n@index-anchor-line-height: 32px;\n@index-anchor-background-color: transparent;\n@index-anchor-active-background-color: @white;\n@index-anchor-active-text-color: @green;\n\n// IndexBar\n@index-bar-index-font-size: @font-size-xs;\n@index-bar-index-line-height: 14px;\n\n// skeleton\n@skeleton-padding: 0 @padding-md;\n@skeleton-row-height: 16px;\n@skeleton-row-background-color: @gray-2;\n@skeleton-row-margin-top: @padding-sm;\n@skeleton-avatar-background-color: @gray-2;\n@skeleton-animation-duration: 1.2s;\n\n// Cascader\n@cascader-header-height: 48px;\n@cascader-header-padding: 0 16px;\n@cascader-title-font-size: 16px;\n@cascader-title-line-height: 20px;\n@cascader-close-icon-size: 22px;\n@cascader-close-icon-color: #c8c9cc;\n@cascader-selected-icon-size: 18px;\n@cascader-tabs-height: 48px;\n@cascader-active-color: @blue;\n@cascader-options-height: 384px;\n@cascader-option-disabled-color: #c8c9cc;\n@cascader-tab-color: #323233;\n@cascader-unselected-tab-color: #969799;\n"
  },
  {
    "path": "packages/common/utils.ts",
    "content": "import { isDef, isNumber, isPlainObject, isPromise } from './validator';\nimport {\n  canIUseGroupSetData,\n  canIUseNextTick,\n  getSystemInfoSync,\n} from './version';\n\nexport { isDef } from './validator';\nexport { getSystemInfoSync } from './version';\n\nexport function range(num: number, min: number, max: number) {\n  return Math.min(Math.max(num, min), max);\n}\n\nexport function nextTick(cb: (...args: any[]) => void) {\n  if (canIUseNextTick()) {\n    wx.nextTick(cb);\n  } else {\n    setTimeout(() => {\n      cb();\n    }, 1000 / 30);\n  }\n}\n\nexport function addUnit(value?: string | number): string | undefined {\n  if (!isDef(value)) {\n    return undefined;\n  }\n\n  value = String(value);\n  return isNumber(value) ? `${value}px` : value;\n}\n\nexport function requestAnimationFrame(cb: () => void) {\n  return setTimeout(() => {\n    cb();\n  }, 1000 / 30);\n}\n\nexport function pickExclude(obj: unknown, keys: string[]) {\n  if (!isPlainObject(obj)) {\n    return {};\n  }\n\n  return Object.keys(obj).reduce((prev, key) => {\n    if (!keys.includes(key)) {\n      prev[key] = obj[key];\n    }\n\n    return prev;\n  }, {});\n}\n\nexport function getRect(\n  context: WechatMiniprogram.Component.TrivialInstance,\n  selector: string\n) {\n  return new Promise<WechatMiniprogram.BoundingClientRectCallbackResult>(\n    (resolve) => {\n      wx.createSelectorQuery()\n        .in(context)\n        .select(selector)\n        .boundingClientRect()\n        .exec((rect = []) => resolve(rect[0]));\n    }\n  );\n}\n\nexport function getAllRect(\n  context: WechatMiniprogram.Component.TrivialInstance,\n  selector: string\n) {\n  return new Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>(\n    (resolve) => {\n      wx.createSelectorQuery()\n        .in(context)\n        .selectAll(selector)\n        .boundingClientRect()\n        .exec((rect = []) => resolve(rect[0]));\n    }\n  );\n}\n\nexport function groupSetData(\n  context: WechatMiniprogram.Component.TrivialInstance,\n  cb: () => void\n) {\n  if (canIUseGroupSetData()) {\n    context.groupSetData(cb);\n  } else {\n    cb();\n  }\n}\n\nexport function toPromise(promiseLike: Promise<unknown> | unknown) {\n  if (isPromise(promiseLike)) {\n    return promiseLike;\n  }\n\n  return Promise.resolve(promiseLike);\n}\n\n// 浮点数精度处理\nexport function addNumber(num1, num2) {\n  const cardinal = 10 ** 10;\n  return Math.round((num1 + num2) * cardinal) / cardinal;\n}\n\n// 限制value在[min, max]之间\nexport const clamp = (num, min, max) => Math.min(Math.max(num, min), max);\n\nexport function getCurrentPage<T>() {\n  const pages = getCurrentPages();\n  return pages[pages.length - 1] as T & WechatMiniprogram.Page.TrivialInstance;\n}\n\nexport const isPC = ['mac', 'windows'].includes(getSystemInfoSync().platform);\n\n// 是否企业微信\nexport const isWxWork = getSystemInfoSync().environment === 'wxwork';\n"
  },
  {
    "path": "packages/common/validator.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(val: unknown): val is Function {\n  return typeof val === 'function';\n}\n\nexport function isPlainObject(val: unknown): val is Record<string, unknown> {\n  return val !== null && typeof val === 'object' && !Array.isArray(val);\n}\n\nexport function isPromise<T = unknown>(val: unknown): val is Promise<T> {\n  return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch);\n}\n\nexport function isDef(value: unknown): boolean {\n  return value !== undefined && value !== null;\n}\n\nexport function isObj(x: unknown): x is Record<string, unknown> {\n  const type = typeof x;\n  return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isNumber(value: string) {\n  return /^\\d+(\\.\\d+)?$/.test(value);\n}\n\nexport function isBoolean(value: unknown): value is boolean {\n  return typeof value === 'boolean';\n}\n\nconst IMAGE_REGEXP = /\\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;\nconst VIDEO_REGEXP = /\\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i;\n\nexport function isImageUrl(url: string): boolean {\n  return IMAGE_REGEXP.test(url);\n}\n\nexport function isVideoUrl(url: string): boolean {\n  return VIDEO_REGEXP.test(url);\n}\n"
  },
  {
    "path": "packages/common/version.ts",
    "content": "interface WxWorkSystemInfo extends WechatMiniprogram.SystemInfo {\n  environment?: 'wxwork';\n}\n\ninterface SystemInfo extends WxWorkSystemInfo, WechatMiniprogram.SystemInfo {}\n\nlet systemInfo: SystemInfo;\n\nexport function getSystemInfoSync() {\n  if (systemInfo == null) {\n    systemInfo = wx.getSystemInfoSync();\n  }\n\n  return systemInfo as SystemInfo;\n}\n\nfunction compareVersion(v1, v2) {\n  v1 = v1.split('.');\n  v2 = v2.split('.');\n  const len = Math.max(v1.length, v2.length);\n\n  while (v1.length < len) {\n    v1.push('0');\n  }\n  while (v2.length < len) {\n    v2.push('0');\n  }\n\n  for (let i = 0; i < len; i++) {\n    const num1 = parseInt(v1[i], 10);\n    const num2 = parseInt(v2[i], 10);\n\n    if (num1 > num2) {\n      return 1;\n    }\n    if (num1 < num2) {\n      return -1;\n    }\n  }\n\n  return 0;\n}\n\nfunction gte(version: string) {\n  const system = getSystemInfoSync();\n\n  return compareVersion(system.SDKVersion, version) >= 0;\n}\n\nexport function canIUseModel() {\n  return gte('2.9.3');\n}\n\nexport function canIUseFormFieldButton() {\n  return gte('2.10.3');\n}\n\nexport function canIUseAnimate() {\n  return gte('2.9.0');\n}\n\nexport function canIUseGroupSetData() {\n  return gte('2.4.0');\n}\n\nexport function canIUseNextTick() {\n  try {\n    return wx.canIUse('nextTick');\n  } catch (e) {\n    return gte('2.7.1');\n  }\n}\n\nexport function canIUseCanvas2d() {\n  return gte('2.9.0');\n}\n\nexport function canIUseGetUserProfile() {\n  return !!wx.getUserProfile;\n}\n"
  },
  {
    "path": "packages/config-provider/README.md",
    "content": "# ConfigProvider 全局配置\n\n### 介绍\n\n用于配置 Vant Weapp 组件的主题样式，从 `v1.7.0` 版本开始支持。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-config-provider\": \"@vant/weapp/config-provider/index\"\n}\n```\n\n## 定制主题\n\n### 介绍\n\nVant Weapp 组件通过丰富的 [CSS 变量](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties) 来组织样式，通过覆盖这些 CSS 变量，可以实现**定制主题、动态切换主题**等效果。\n\n#### 示例\n\n以 Button 组件为例，查看组件的样式，可以看到 `.van-button--primary` 类名上存在以下变量：\n\n```css\n.van-button--primary {\n  color: var(--button-primary-color, #fff);\n  background: var(--button-primary-background-color, #07c160);\n  border: var(--button-border-width, 1px) solid var(\n      --button-primary-border-color,\n      #07c160\n    );\n}\n```\n\n### 自定义 CSS 变量\n\n#### 通过 CSS 覆盖\n\n你可以直接在代码中覆盖这些 CSS 变量，Button 组件的样式会随之发生改变：\n\n```css\n/* 添加这段样式后，Primary Button 会变成红色 */\npage {\n  --button-primary-background-color: red;\n}\n```\n\n#### 通过 ConfigProvider 覆盖\n\n`ConfigProvider` 组件提供了覆盖 CSS 变量的能力，你需要在根节点包裹一个 `ConfigProvider` 组件，并通过 `theme-vars` 属性来配置一些主题变量。\n\n```html\n<van-config-provider theme-vars=\"{{ themeVars }}\">\n  <van-cell-group>\n    <van-field label=\"评分\">\n      <view slot=\"input\" style=\"width: 100%\">\n        <van-rate\n          model:value=\"{{ rate }}\"\n          data-key=\"rate\"\n          bind:change=\"onChange\"\n        />\n      </view>\n    </van-field>\n    <van-field label=\"滑块\" border=\"{{ false }}\">\n      <view slot=\"input\" style=\"width: 100%\">\n        <van-slider\n          value=\"{{ slider }}\"\n          data-key=\"slider\"\n          bind:change=\"onChange\"\n        />\n      </view>\n    </van-field>\n  </van-cell-group>\n\n  <view style=\"margin: 16px\">\n    <van-button round block type=\"primary\">提交</van-button>\n  </view>\n</van-config-provider>\n```\n\n```js\nimport Page from '../../common/page';\n\nPage({\n  data: {\n    rate: 4,\n    slider: 50,\n    themeVars: {\n      rateIconFullColor: '#07c160',\n      sliderBarHeight: '4px',\n      sliderButtonWidth: '20px',\n      sliderButtonHeight: '20px',\n      sliderActiveBackgroundColor: '#07c160',\n      buttonPrimaryBorderColor: '#07c160',\n      buttonPrimaryBackgroundColor: '#07c160',\n    },\n  },\n\n  onChange(event) {\n    const { key } = event.currentTarget.dataset;\n    this.setData({\n      [key]: event.detail,\n    });\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数       | 说明           | 类型     | 默认值 |\n| ---------- | -------------- | -------- | ------ |\n| theme-vars | 自定义主题变量 | _object_ | -      |\n"
  },
  {
    "path": "packages/config-provider/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-rate\": \"../../rate/index\",\n    \"van-field\": \"../../field/index\",\n    \"van-slider\": \"../../slider/index\",\n    \"van-button\": \"../../button/index\",\n    \"van-cell-group\": \"../../cell-group/index\",\n    \"van-config-provider\": \"../../config-provider/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/config-provider/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    rate: 4,\n    slider: 50,\n    themeVars: {\n      rateIconFullColor: '#07c160',\n      sliderBarHeight: '4px',\n      sliderButtonWidth: '20px',\n      sliderButtonHeight: '20px',\n      sliderActiveBackgroundColor: '#07c160',\n      buttonPrimaryBorderColor: '#07c160',\n      buttonPrimaryBackgroundColor: '#07c160',\n    },\n  },\n\n  methods: {\n    onChange(event) {\n      const { key } = event.currentTarget.dataset;\n      this.setData({\n        [key]: event.detail,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/config-provider/demo/index.wxml",
    "content": "<demo-block title=\"默认主题\">\n  <van-cell-group>\n    <van-field label=\"评分\">\n      <view slot=\"input\" style=\"width: 100%\">\n        <van-rate model:value=\"{{ rate }}\" data-key=\"rate\" bind:change=\"onChange\" />\n      </view>\n    </van-field>\n    <van-field label=\"滑块\" border=\"{{ false }}\">\n      <view slot=\"input\" style=\"width: 100%\">\n        <van-slider value=\"{{ slider }}\" data-key=\"slider\" bind:change=\"onChange\" />\n      </view>\n    </van-field>\n  </van-cell-group>\n\n  <view style=\"margin: 16px\">\n    <van-button round block type=\"primary\">提交</van-button>\n  </view>\n</demo-block>\n\n<demo-block title=\"定制主题\">\n  <van-config-provider theme-vars=\"{{ themeVars }}\">\n    <van-cell-group>\n      <van-field label=\"评分\">\n        <view slot=\"input\" style=\"width: 100%\">\n          <van-rate model:value=\"{{ rate }}\" data-key=\"rate\" bind:change=\"onChange\" />\n        </view>\n      </van-field>\n      <van-field label=\"滑块\" border=\"{{ false }}\">\n        <view slot=\"input\" style=\"width: 100%\">\n          <van-slider value=\"{{ slider }}\" data-key=\"slider\" bind:change=\"onChange\" />\n        </view>\n      </van-field>\n    </van-cell-group>\n\n    <view style=\"margin: 16px\">\n      <van-button round block type=\"primary\">提交</van-button>\n    </view>\n  </van-config-provider>\n</demo-block>\n"
  },
  {
    "path": "packages/config-provider/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/config-provider/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    themeVars: {\n      type: Object,\n      value: {},\n    },\n  },\n});\n"
  },
  {
    "path": "packages/config-provider/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-config-provider\" style=\"{{ computed.mapThemeVarsToCSSVars(themeVars) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/config-provider/index.wxs",
    "content": "/* eslint-disable */\nvar object = require('../wxs/object.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction kebabCase(word) {\n  var newWord = word\n    .replace(getRegExp(\"[A-Z]\", 'g'), function (i) {\n      return '-' + i;\n    })\n    .toLowerCase()\n    .replace(getRegExp(\"^-\"), '');\n\n  return newWord;\n}\n\nfunction mapThemeVarsToCSSVars(themeVars) {\n  var cssVars = {};\n  object.keys(themeVars).forEach(function (key) {\n    var cssVarsKey = '--' + kebabCase(key);\n    cssVars[cssVarsKey] = themeVars[key];\n  });\n\n  return style(cssVars);\n}\n\nmodule.exports = {\n  kebabCase: kebabCase,\n  mapThemeVarsToCSSVars: mapThemeVarsToCSSVars,\n};\n"
  },
  {
    "path": "packages/config-provider/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        默认主题\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-field>\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    评分\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    >\n                      <wx-view\n                        slot=\"input\"\n                        style=\"width: 100%\"\n                      >\n                        <van-rate\n                          data-key=\"rate\"\n                          bind:change=\"onChange\"\n                        >\n                          <wx-view\n                            class=\"van-rate custom-class\"\n                            bind:touchmove=\"onTouchMove\"\n                          >\n                            <wx-view\n                              class=\"van-rate__item\"\n                              style=\"\"\n                            >\n                              <van-icon\n                                class=\"van-rate__icon van-rate__icon--full\"\n                                customClass=\"icon-class\"\n                                data-score=\"{{0}}\"\n                                style=\"\"\n                                bind:click=\"onSelect\"\n                              >\n                                <wx-view\n                                  class=\"custom-class van-icon van-icon-star\"\n                                  style=\"\"\n                                  bind:tap=\"onClick\"\n                                />\n                              </van-icon>\n                            </wx-view>\n                            <wx-view\n                              class=\"van-rate__item\"\n                              style=\"\"\n                            >\n                              <van-icon\n                                class=\"van-rate__icon van-rate__icon--full\"\n                                customClass=\"icon-class\"\n                                data-score=\"{{1}}\"\n                                style=\"\"\n                                bind:click=\"onSelect\"\n                              >\n                                <wx-view\n                                  class=\"custom-class van-icon van-icon-star\"\n                                  style=\"\"\n                                  bind:tap=\"onClick\"\n                                />\n                              </van-icon>\n                            </wx-view>\n                            <wx-view\n                              class=\"van-rate__item\"\n                              style=\"\"\n                            >\n                              <van-icon\n                                class=\"van-rate__icon van-rate__icon--full\"\n                                customClass=\"icon-class\"\n                                data-score=\"{{2}}\"\n                                style=\"\"\n                                bind:click=\"onSelect\"\n                              >\n                                <wx-view\n                                  class=\"custom-class van-icon van-icon-star\"\n                                  style=\"\"\n                                  bind:tap=\"onClick\"\n                                />\n                              </van-icon>\n                            </wx-view>\n                            <wx-view\n                              class=\"van-rate__item\"\n                              style=\"\"\n                            >\n                              <van-icon\n                                class=\"van-rate__icon van-rate__icon--full\"\n                                customClass=\"icon-class\"\n                                data-score=\"{{3}}\"\n                                style=\"\"\n                                bind:click=\"onSelect\"\n                              >\n                                <wx-view\n                                  class=\"custom-class van-icon van-icon-star\"\n                                  style=\"\"\n                                  bind:tap=\"onClick\"\n                                />\n                              </van-icon>\n                            </wx-view>\n                            <wx-view\n                              class=\"van-rate__item\"\n                              style=\"\"\n                            >\n                              <van-icon\n                                class=\"van-rate__icon\"\n                                customClass=\"icon-class\"\n                                data-score=\"{{4}}\"\n                                style=\"\"\n                                bind:click=\"onSelect\"\n                              >\n                                <wx-view\n                                  class=\"custom-class van-icon van-icon-star-o\"\n                                  style=\"\"\n                                  bind:tap=\"onClick\"\n                                />\n                              </van-icon>\n                            </wx-view>\n                          </wx-view>\n                        </van-rate>\n                      </wx-view>\n                    </wx-view>\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n          <van-field>\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--borderless\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    滑块\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    >\n                      <wx-view\n                        slot=\"input\"\n                        style=\"width: 100%\"\n                      >\n                        <van-slider\n                          data-key=\"slider\"\n                          bind:change=\"onChange\"\n                        >\n                          <wx-view\n                            class=\"custom-class van-slider\"\n                            style=\"\n          background: ;\n          height: ;\n        \"\n                            bind:tap=\"onClick\"\n                          >\n                            <wx-view\n                              class=\"van-slider__bar\"\n                              style=\"\n          width: 50%;\n          left: 0%;\n          top: 0;\n          \n        ; \"\n                            >\n                              <wx-view\n                                class=\"van-slider__button-wrapper\"\n                                bind:touchcancel=\"onTouchEnd\"\n                                bind:touchend=\"onTouchEnd\"\n                                catch:touchmove=\"onTouchMove\"\n                                bind:touchstart=\"onTouchStart\"\n                              >\n                                <wx-view\n                                  class=\"van-slider__button\"\n                                />\n                              </wx-view>\n                            </wx-view>\n                          </wx-view>\n                        </van-slider>\n                      </wx-view>\n                    </wx-view>\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n        </wx-view>\n      </van-cell-group>\n      <wx-view\n        style=\"margin: 16px\"\n      >\n        <van-button>\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--primary van-button--normal van-button--block van-button--round \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              提交\n            </wx-view>\n          </wx-button>\n        </van-button>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        定制主题\n      </wx-view>\n      <van-config-provider>\n        <wx-view\n          class=\"van-config-provider\"\n          style=\"--rate-icon-full-color:#07c160;--slider-bar-height:4px;--slider-button-width:20px;--slider-button-height:20px;--slider-active-background-color:#07c160;--button-primary-border-color:#07c160;--button-primary-background-color:#07c160\"\n        >\n          <van-cell-group>\n            <wx-view\n              class=\"custom-class van-cell-group van-hairline--top-bottom\"\n            >\n              <van-field>\n                <van-cell\n                  customClass=\"custom-class van-field\"\n                >\n                  <wx-view\n                    class=\"custom-class van-cell\"\n                    hoverClass=\"van-cell--hover hover-class\"\n                    hoverStayTime=\"70\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-cell__title title-class\"\n                      style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                    >\n                      <wx-label\n                        class=\"label-class van-field__label\"\n                        for=\"\"\n                        slot=\"title\"\n                      >\n                        \n    评分\n  \n                      </wx-label>\n                    </wx-view>\n                    <wx-view\n                      class=\"van-cell__value value-class\"\n                    >\n                      <wx-view\n                        class=\"van-field__body van-field__body--text\"\n                      >\n                        <wx-view\n                          class=\"van-field__control van-field__control--custom\"\n                          bind:tap=\"onClickInput\"\n                        >\n                          <wx-view\n                            slot=\"input\"\n                            style=\"width: 100%\"\n                          >\n                            <van-rate\n                              data-key=\"rate\"\n                              bind:change=\"onChange\"\n                            >\n                              <wx-view\n                                class=\"van-rate custom-class\"\n                                bind:touchmove=\"onTouchMove\"\n                              >\n                                <wx-view\n                                  class=\"van-rate__item\"\n                                  style=\"\"\n                                >\n                                  <van-icon\n                                    class=\"van-rate__icon van-rate__icon--full\"\n                                    customClass=\"icon-class\"\n                                    data-score=\"{{0}}\"\n                                    style=\"\"\n                                    bind:click=\"onSelect\"\n                                  >\n                                    <wx-view\n                                      class=\"custom-class van-icon van-icon-star\"\n                                      style=\"\"\n                                      bind:tap=\"onClick\"\n                                    />\n                                  </van-icon>\n                                </wx-view>\n                                <wx-view\n                                  class=\"van-rate__item\"\n                                  style=\"\"\n                                >\n                                  <van-icon\n                                    class=\"van-rate__icon van-rate__icon--full\"\n                                    customClass=\"icon-class\"\n                                    data-score=\"{{1}}\"\n                                    style=\"\"\n                                    bind:click=\"onSelect\"\n                                  >\n                                    <wx-view\n                                      class=\"custom-class van-icon van-icon-star\"\n                                      style=\"\"\n                                      bind:tap=\"onClick\"\n                                    />\n                                  </van-icon>\n                                </wx-view>\n                                <wx-view\n                                  class=\"van-rate__item\"\n                                  style=\"\"\n                                >\n                                  <van-icon\n                                    class=\"van-rate__icon van-rate__icon--full\"\n                                    customClass=\"icon-class\"\n                                    data-score=\"{{2}}\"\n                                    style=\"\"\n                                    bind:click=\"onSelect\"\n                                  >\n                                    <wx-view\n                                      class=\"custom-class van-icon van-icon-star\"\n                                      style=\"\"\n                                      bind:tap=\"onClick\"\n                                    />\n                                  </van-icon>\n                                </wx-view>\n                                <wx-view\n                                  class=\"van-rate__item\"\n                                  style=\"\"\n                                >\n                                  <van-icon\n                                    class=\"van-rate__icon van-rate__icon--full\"\n                                    customClass=\"icon-class\"\n                                    data-score=\"{{3}}\"\n                                    style=\"\"\n                                    bind:click=\"onSelect\"\n                                  >\n                                    <wx-view\n                                      class=\"custom-class van-icon van-icon-star\"\n                                      style=\"\"\n                                      bind:tap=\"onClick\"\n                                    />\n                                  </van-icon>\n                                </wx-view>\n                                <wx-view\n                                  class=\"van-rate__item\"\n                                  style=\"\"\n                                >\n                                  <van-icon\n                                    class=\"van-rate__icon\"\n                                    customClass=\"icon-class\"\n                                    data-score=\"{{4}}\"\n                                    style=\"\"\n                                    bind:click=\"onSelect\"\n                                  >\n                                    <wx-view\n                                      class=\"custom-class van-icon van-icon-star-o\"\n                                      style=\"\"\n                                      bind:tap=\"onClick\"\n                                    />\n                                  </van-icon>\n                                </wx-view>\n                              </wx-view>\n                            </van-rate>\n                          </wx-view>\n                        </wx-view>\n                        <wx-input\n                          adjustPosition=\"{{true}}\"\n                          alwaysEmbed=\"{{false}}\"\n                          autoFocus=\"{{false}}\"\n                          class=\"van-field__control input-class\"\n                          confirmHold=\"{{false}}\"\n                          confirmType=\"\"\n                          cursor=\"{{-1}}\"\n                          cursorSpacing=\"{{50}}\"\n                          disabled=\"{{false}}\"\n                          focus=\"{{false}}\"\n                          holdKeyboard=\"{{false}}\"\n                          id=\"\"\n                          maxlength=\"{{-1}}\"\n                          password=\"{{false}}\"\n                          placeholder=\"\"\n                          placeholderClass=\"van-field__placeholder\"\n                          placeholderStyle=\"\"\n                          selectionEnd=\"{{-1}}\"\n                          selectionStart=\"{{-1}}\"\n                          type=\"text\"\n                          value=\"\"\n                          bind:blur=\"onBlur\"\n                          bind:confirm=\"onConfirm\"\n                          bind:focus=\"onFocus\"\n                          bind:input=\"onInput\"\n                          bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                          bind:nicknamereview=\"onBindNicknameReview\"\n                          bind:tap=\"onClickInput\"\n                        />\n                        <wx-view\n                          class=\"van-field__icon-container\"\n                          bind:tap=\"onClickIcon\"\n                        />\n                        <wx-view\n                          class=\"van-field__button\"\n                        />\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-cell>\n              </van-field>\n              <van-field>\n                <van-cell\n                  customClass=\"custom-class van-field\"\n                >\n                  <wx-view\n                    class=\"custom-class van-cell van-cell--borderless\"\n                    hoverClass=\"van-cell--hover hover-class\"\n                    hoverStayTime=\"70\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-cell__title title-class\"\n                      style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                    >\n                      <wx-label\n                        class=\"label-class van-field__label\"\n                        for=\"\"\n                        slot=\"title\"\n                      >\n                        \n    滑块\n  \n                      </wx-label>\n                    </wx-view>\n                    <wx-view\n                      class=\"van-cell__value value-class\"\n                    >\n                      <wx-view\n                        class=\"van-field__body van-field__body--text\"\n                      >\n                        <wx-view\n                          class=\"van-field__control van-field__control--custom\"\n                          bind:tap=\"onClickInput\"\n                        >\n                          <wx-view\n                            slot=\"input\"\n                            style=\"width: 100%\"\n                          >\n                            <van-slider\n                              data-key=\"slider\"\n                              bind:change=\"onChange\"\n                            >\n                              <wx-view\n                                class=\"custom-class van-slider\"\n                                style=\"\n          background: ;\n          height: ;\n        \"\n                                bind:tap=\"onClick\"\n                              >\n                                <wx-view\n                                  class=\"van-slider__bar\"\n                                  style=\"\n          width: 50%;\n          left: 0%;\n          top: 0;\n          \n        ; \"\n                                >\n                                  <wx-view\n                                    class=\"van-slider__button-wrapper\"\n                                    bind:touchcancel=\"onTouchEnd\"\n                                    bind:touchend=\"onTouchEnd\"\n                                    catch:touchmove=\"onTouchMove\"\n                                    bind:touchstart=\"onTouchStart\"\n                                  >\n                                    <wx-view\n                                      class=\"van-slider__button\"\n                                    />\n                                  </wx-view>\n                                </wx-view>\n                              </wx-view>\n                            </van-slider>\n                          </wx-view>\n                        </wx-view>\n                        <wx-input\n                          adjustPosition=\"{{true}}\"\n                          alwaysEmbed=\"{{false}}\"\n                          autoFocus=\"{{false}}\"\n                          class=\"van-field__control input-class\"\n                          confirmHold=\"{{false}}\"\n                          confirmType=\"\"\n                          cursor=\"{{-1}}\"\n                          cursorSpacing=\"{{50}}\"\n                          disabled=\"{{false}}\"\n                          focus=\"{{false}}\"\n                          holdKeyboard=\"{{false}}\"\n                          id=\"\"\n                          maxlength=\"{{-1}}\"\n                          password=\"{{false}}\"\n                          placeholder=\"\"\n                          placeholderClass=\"van-field__placeholder\"\n                          placeholderStyle=\"\"\n                          selectionEnd=\"{{-1}}\"\n                          selectionStart=\"{{-1}}\"\n                          type=\"text\"\n                          value=\"\"\n                          bind:blur=\"onBlur\"\n                          bind:confirm=\"onConfirm\"\n                          bind:focus=\"onFocus\"\n                          bind:input=\"onInput\"\n                          bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                          bind:nicknamereview=\"onBindNicknameReview\"\n                          bind:tap=\"onClickInput\"\n                        />\n                        <wx-view\n                          class=\"van-field__icon-container\"\n                          bind:tap=\"onClickIcon\"\n                        />\n                        <wx-view\n                          class=\"van-field__button\"\n                        />\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-cell>\n              </van-field>\n            </wx-view>\n          </van-cell-group>\n          <wx-view\n            style=\"margin: 16px\"\n          >\n            <van-button>\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--primary van-button--normal van-button--block van-button--round \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  提交\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </wx-view>\n        </wx-view>\n      </van-config-provider>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/config-provider/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/count-down/README.md",
    "content": "# CountDown 倒计时\n\n### 介绍\n\n用于实时展示倒计时数值，支持毫秒精度。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-count-down\": \"@vant/weapp/count-down/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)。\n\n## 代码演示\n\n### 基本用法\n\n`time`属性表示倒计时总时长，单位为毫秒。\n\n```html\n<van-count-down time=\"{{ time }}\" />\n```\n\n```js\nPage({\n  data: {\n    time: 30 * 60 * 60 * 1000,\n  },\n});\n```\n\n### 自定义格式\n\n通过`format`属性设置倒计时文本的内容。\n\n```html\n<van-count-down time=\"{{ time }}\" format=\"DD 天 HH 时 mm 分 ss 秒\" />\n```\n\n### 毫秒级渲染\n\n倒计时默认每秒渲染一次，设置`millisecond`属性可以开启毫秒级渲染。\n\n```html\n<van-count-down millisecond time=\"{{ time }}\" format=\"HH:mm:ss:SSS\" />\n```\n\n### 自定义样式\n\n设置`use-slot`属性后可以自定义倒计时样式，需要通过`bind:change`事件获取`timeData`对象并自行渲染，格式见下方表格。\n\n```html\n<van-count-down use-slot time=\"{{ time }}\" bind:change=\"onChange\">\n  <text class=\"item\">{{ timeData.hours }}</text>\n  <text class=\"item\">{{ timeData.minutes }}</text>\n  <text class=\"item\">{{ timeData.seconds }}</text>\n</van-count-down>\n```\n\n```js\nPage({\n  data: {\n    time: 30 * 60 * 60 * 1000,\n    timeData: {},\n  },\n\n  onChange(e) {\n    this.setData({\n      timeData: e.detail,\n    });\n  },\n});\n```\n\n```css\n.item {\n  display: inline-block;\n  width: 22px;\n  margin-right: 5px;\n  color: #fff;\n  font-size: 12px;\n  text-align: center;\n  background-color: #1989fa;\n  border-radius: 2px;\n}\n```\n\n### 手动控制\n\n通过 `selectComponent` 选择器获取到组件实例后，可以调用`start`、`pause`、`reset`方法。\n\n```html\n<van-count-down\n  class=\"control-count-down\"\n  millisecond\n  time=\"{{ 3000 }}\"\n  auto-start=\"{{ false }}\"\n  format=\"ss:SSS\"\n  bind:finish=\"finished\"\n/>\n\n<van-grid clickable column-num=\"3\">\n  <van-grid-item text=\"开始\" icon=\"play-circle-o\" bindclick=\"start\" />\n  <van-grid-item text=\"暂停\" icon=\"pause-circle-o\" bindclick=\"pause\" />\n  <van-grid-item text=\"重置\" icon=\"replay\" bindclick=\"reset\" />\n</van-grid>\n```\n\n```js\nPage({\n  start() {\n    const countDown = this.selectComponent('.control-count-down');\n    countDown.start();\n  },\n\n  pause() {\n    const countDown = this.selectComponent('.control-count-down');\n    countDown.pause();\n  },\n\n  reset() {\n    const countDown = this.selectComponent('.control-count-down');\n    countDown.reset();\n  },\n\n  finished() {\n    Toast('倒计时结束');\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| time | 倒计时时长，单位毫秒 | _number_ | - |\n| format | 时间格式，DD-日，HH-时，mm-分，ss-秒，SSS-毫秒 | _string_ | `HH:mm:ss` |\n| auto-start | 是否自动开始倒计时 | _boolean_ | `true` |\n| millisecond | 是否开启毫秒级渲染 | _boolean_ | `false` |\n| use-slot | 是否使用自定义样式插槽 | _boolean_ | `false` |\n\n### Events\n\n| 事件名 | 说明                                         | 回调参数 |\n| ------ | -------------------------------------------- | -------- |\n| bind:finish | 倒计时结束时触发                             | -        |\n| bind:change | 时间变化时触发，仅在开启`use-slot`后才会触发 | timeData |\n\n### timeData 格式\n\n| 名称         | 说明     | 类型     |\n| ------------ | -------- | -------- |\n| days         | 剩余天数 | _number_ |\n| hours        | 剩余小时 | _number_ |\n| minutes      | 剩余分钟 | _number_ |\n| seconds      | 剩余秒数 | _number_ |\n| milliseconds | 剩余毫秒 | _number_ |\n\n### 方法\n\n通过 selectComponent 可以获取到 CountDown 实例并调用实例方法。\n\n| 方法名 | 参数 | 返回值 | 介绍 |\n| --- | --- | --- | --- |\n| start | - | - | 开始倒计时 |\n| pause | - | - | 暂停倒计时 |\n| reset | - | - | 重设倒计时，若`auto-start`为`true`，重设后会自动开始倒计时 |\n"
  },
  {
    "path": "packages/count-down/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-grid\": \"../../grid/index\",\n    \"van-toast\": \"../../toast/index\",\n    \"van-grid-item\": \"../../grid-item/index\",\n    \"van-count-down\": \"../../count-down/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/count-down/demo/index.less",
    "content": ".van-count-down {\n  margin: 0 16px 10px;\n}\n\n.item {\n  display: inline-block;\n  width: 22px;\n  margin-right: 5px;\n  color: #fff;\n  font-size: 12px;\n  text-align: center;\n  background-color: #1989fa;\n  border-radius: 2px;\n}\n"
  },
  {
    "path": "packages/count-down/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  data: {\n    time: 30 * 60 * 60 * 1000,\n    timeData: {},\n  },\n\n  methods: {\n    onChange(e) {\n      this.setData({\n        timeData: e.detail,\n      });\n    },\n\n    start() {\n      const countDown = this.selectComponent('.control-count-down');\n      countDown.start();\n    },\n\n    pause() {\n      const countDown = this.selectComponent('.control-count-down');\n      countDown.pause();\n    },\n\n    reset() {\n      const countDown = this.selectComponent('.control-count-down');\n      countDown.reset();\n    },\n\n    finished() {\n      Toast({\n        context: this,\n        message: '倒计时结束',\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/count-down/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-count-down time=\"{{ time }}\" />\n</demo-block>\n\n<demo-block title=\"自定义格式\">\n  <van-count-down\n    time=\"{{ time }}\"\n    format=\"DD 天 HH 时 mm 分 ss 秒\"\n  />\n</demo-block>\n\n<demo-block title=\"毫秒级渲染\">\n  <van-count-down\n    millisecond\n    time=\"{{ time }}\"\n    format=\"HH:mm:ss:SSS\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义样式\">\n  <van-count-down\n    use-slot\n    time=\"{{ time }}\"\n    bind:change=\"onChange\"\n  >\n    <text class=\"item\">{{ timeData.hours }}</text>\n    <text class=\"item\">{{ timeData.minutes }}</text>\n    <text class=\"item\">{{ timeData.seconds }}</text>\n  </van-count-down>\n</demo-block>\n\n<demo-block title=\"手动控制\">\n  <van-count-down\n    class=\"control-count-down\"\n    millisecond\n    time=\"{{ 3000 }}\"\n    auto-start=\"{{ false }}\"\n    format=\"ss:SSS\"\n    bind:finish=\"finished\"\n  />\n  <van-grid clickable column-num=\"3\">\n    <van-grid-item text=\"开始\" icon=\"play-circle-o\" bindclick=\"start\" />\n    <van-grid-item text=\"暂停\" icon=\"pause-circle-o\" bindclick=\"pause\" />\n    <van-grid-item text=\"重置\" icon=\"replay\" bind:click=\"reset\" />\n  </van-grid>\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/count-down/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/count-down/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-count-down {\n  color: var(--count-down-text-color, @count-down-text-color);\n  font-size: var(--count-down-font-size, @count-down-font-size);\n  line-height: var(--count-down-line-height, @count-down-line-height);\n}\n"
  },
  {
    "path": "packages/count-down/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { isSameSecond, parseFormat, parseTimeData } from './utils';\n\nfunction simpleTick(fn: WechatMiniprogram.SetTimeoutCompleteCallback) {\n  return setTimeout(fn, 30);\n}\n\nVantComponent({\n  props: {\n    useSlot: Boolean,\n    millisecond: Boolean,\n    time: {\n      type: Number,\n      observer: 'reset',\n    },\n    format: {\n      type: String,\n      value: 'HH:mm:ss',\n    },\n    autoStart: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  data: {\n    timeData: parseTimeData(0),\n    formattedTime: '0',\n  },\n\n  destroyed() {\n    clearTimeout(this.tid);\n    this.tid = null;\n  },\n\n  methods: {\n    // 开始\n    start() {\n      if (this.counting) {\n        return;\n      }\n\n      this.counting = true;\n      this.endTime = Date.now() + this.remain;\n      this.tick();\n    },\n\n    // 暂停\n    pause() {\n      this.counting = false;\n      clearTimeout(this.tid);\n    },\n\n    // 重置\n    reset() {\n      this.pause();\n      this.remain = this.data.time;\n      this.setRemain(this.remain);\n\n      if (this.data.autoStart) {\n        this.start();\n      }\n    },\n\n    tick() {\n      if (this.data.millisecond) {\n        this.microTick();\n      } else {\n        this.macroTick();\n      }\n    },\n\n    microTick() {\n      this.tid = simpleTick(() => {\n        this.setRemain(this.getRemain());\n\n        if (this.remain !== 0) {\n          this.microTick();\n        }\n      });\n    },\n\n    macroTick() {\n      this.tid = simpleTick(() => {\n        const remain = this.getRemain();\n\n        if (!isSameSecond(remain, this.remain) || remain === 0) {\n          this.setRemain(remain);\n        }\n\n        if (this.remain !== 0) {\n          this.macroTick();\n        }\n      });\n    },\n\n    getRemain() {\n      return Math.max(this.endTime - Date.now(), 0);\n    },\n\n    setRemain(remain) {\n      this.remain = remain;\n      const timeData = parseTimeData(remain);\n\n      if (this.data.useSlot) {\n        this.$emit('change', timeData);\n      }\n\n      this.setData({\n        formattedTime: parseFormat(this.data.format, timeData),\n      });\n\n      if (remain === 0) {\n        this.pause();\n        this.$emit('finish');\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/count-down/index.wxml",
    "content": "<view class=\"van-count-down\">\n  <slot wx:if=\"{{ useSlot }}\"/>\n  <block wx:else>{{ formattedTime }}</block>\n</view>\n"
  },
  {
    "path": "packages/count-down/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-count-down>\n        <wx-view\n          class=\"van-count-down\"\n        >\n          30:00:00\n        </wx-view>\n      </van-count-down>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义格式\n      </wx-view>\n      <van-count-down>\n        <wx-view\n          class=\"van-count-down\"\n        >\n          01 天 06 时 00 分 00 秒\n        </wx-view>\n      </van-count-down>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        毫秒级渲染\n      </wx-view>\n      <van-count-down>\n        <wx-view\n          class=\"van-count-down\"\n        >\n          30:00:00:000\n        </wx-view>\n      </van-count-down>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义样式\n      </wx-view>\n      <van-count-down\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-count-down\"\n        >\n          <wx-text\n            class=\"item\"\n          >\n            \n          </wx-text>\n          <wx-text\n            class=\"item\"\n          >\n            \n          </wx-text>\n          <wx-text\n            class=\"item\"\n          >\n            \n          </wx-text>\n        </wx-view>\n      </van-count-down>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        手动控制\n      </wx-view>\n      <van-count-down\n        class=\"control-count-down\"\n        bind:finish=\"finished\"\n      >\n        <wx-view\n          class=\"van-count-down\"\n        >\n          03:000\n        </wx-view>\n      </van-count-down>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class van-hairline--top\"\n          style=\"padding-left:0px\"\n        >\n          <van-grid-item\n            bind:click=\"start\"\n          >\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-play-circle-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    开始\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item\n            bind:click=\"pause\"\n          >\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-pause-circle-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    暂停\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item\n            bind:click=\"reset\"\n          >\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-replay\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    重置\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/count-down/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/count-down/utils.ts",
    "content": "function padZero(num: number | string, targetLength = 2): string {\n  let str = num + '';\n\n  while (str.length < targetLength) {\n    str = '0' + str;\n  }\n\n  return str;\n}\n\nexport type TimeData = {\n  days: number;\n  hours: number;\n  minutes: number;\n  seconds: number;\n  milliseconds: number;\n};\n\nconst SECOND = 1000;\nconst MINUTE = 60 * SECOND;\nconst HOUR = 60 * MINUTE;\nconst DAY = 24 * HOUR;\n\nexport function parseTimeData(time: number): TimeData {\n  const days = Math.floor(time / DAY);\n  const hours = Math.floor((time % DAY) / HOUR);\n  const minutes = Math.floor((time % HOUR) / MINUTE);\n  const seconds = Math.floor((time % MINUTE) / SECOND);\n  const milliseconds = Math.floor(time % SECOND);\n\n  return {\n    days,\n    hours,\n    minutes,\n    seconds,\n    milliseconds,\n  };\n}\n\nexport function parseFormat(format: string, timeData: TimeData): string {\n  const { days } = timeData;\n  let { hours, minutes, seconds, milliseconds } = timeData;\n\n  if (format.indexOf('DD') === -1) {\n    hours += days * 24;\n  } else {\n    format = format.replace('DD', padZero(days));\n  }\n\n  if (format.indexOf('HH') === -1) {\n    minutes += hours * 60;\n  } else {\n    format = format.replace('HH', padZero(hours));\n  }\n\n  if (format.indexOf('mm') === -1) {\n    seconds += minutes * 60;\n  } else {\n    format = format.replace('mm', padZero(minutes));\n  }\n\n  if (format.indexOf('ss') === -1) {\n    milliseconds += seconds * 1000;\n  } else {\n    format = format.replace('ss', padZero(seconds));\n  }\n\n  return format.replace('SSS', padZero(milliseconds, 3));\n}\n\nexport function isSameSecond(time1: number, time2: number): boolean {\n  return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);\n}\n"
  },
  {
    "path": "packages/datetime-picker/README.md",
    "content": "# DatetimePicker 时间选择\n\n### 介绍\n\n用于选择时间，支持日期、时分等时间维度，通常与 [弹出层](#/popup) 组件配合使用。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-datetime-picker\": \"@vant/weapp/datetime-picker/index\"\n}\n```\n\n## 代码演示\n\n### 选择完整时间\n\n`value` 为时间戳。\n\n```html\n<van-datetime-picker\n  type=\"datetime\"\n  value=\"{{ currentDate }}\"\n  min-date=\"{{ minDate }}\"\n  max-date=\"{{ maxDate }}\"\n  bind:input=\"onInput\"\n/>\n```\n\n```javascript\nPage({\n  data: {\n    minHour: 10,\n    maxHour: 20,\n    minDate: new Date().getTime(),\n    maxDate: new Date(2019, 10, 1).getTime(),\n    currentDate: new Date().getTime(),\n  },\n\n  onInput(event) {\n    this.setData({\n      currentDate: event.detail,\n    });\n  },\n});\n```\n\n### 选择日期（年月日）\n\n`value` 为时间戳，通过传入 `formatter` 函数对选项文字进行处理。\n\n```html\n<van-datetime-picker\n  type=\"date\"\n  value=\"{{ currentDate }}\"\n  bind:input=\"onInput\"\n  min-date=\"{{ minDate }}\"\n  formatter=\"{{ formatter }}\"\n/>\n```\n\n```js\nPage({\n  data: {\n    currentDate: new Date().getTime(),\n    minDate: new Date().getTime(),\n    formatter(type, value) {\n      if (type === 'year') {\n        return `${value}年`;\n      }\n      if (type === 'month') {\n        return `${value}月`;\n      }\n      return value;\n    },\n  },\n\n  onInput(event) {\n    this.setData({\n      currentDate: event.detail,\n    });\n  },\n});\n```\n\n### 选择日期（年月）\n\n`value` 为时间戳。\n\n```html\n<van-datetime-picker\n  type=\"year-month\"\n  value=\"{{ currentDate }}\"\n  min-date=\"{{ minDate }}\"\n  bind:input=\"onInput\"\n/>\n```\n\n```js\nPage({\n  data: {\n    currentDate: new Date().getTime(),\n    minDate: new Date().getTime(),\n  },\n\n  onInput(event) {\n    this.setData({\n      currentDate: event.detail,\n    });\n  },\n});\n```\n\n### 选择时间\n\n`value` 为字符串。\n\n```html\n<van-datetime-picker\n  type=\"time\"\n  value=\"{{ currentDate }}\"\n  min-hour=\"{{ minHour }}\"\n  max-hour=\"{{ maxHour }}\"\n  bind:input=\"onInput\"\n/>\n```\n\n```js\nPage({\n  data: {\n    currentDate: '12:00',\n    minHour: 10,\n    maxHour: 20,\n  },\n\n  onInput(event) {\n    this.setData({\n      currentDate: event.detail,\n    });\n  },\n});\n```\n\n### 选项过滤器\n\n通过传入 `filter` 函数，可以对选项数组进行过滤，实现自定义时间间隔。\n\n```html\n<van-datetime-picker\n  type=\"time\"\n  value=\"{{ currentDate }}\"\n  filter=\"{{ filter }}\"\n/>\n```\n\n```js\nPage({\n  data: {\n    currentDate: '12:00',\n    filter(type, options) {\n      if (type === 'minute') {\n        return options.filter((option) => option % 5 === 0);\n      }\n\n      return options;\n    },\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| value | 当前选中值 | _string \\| number_ | - |\n| type | 类型，可选值为 `date` `time` `year-month` <br> <strong>不建议动态修改</strong> | _string_ | `datetime` |\n| min-date | 可选的最小时间，精确到分钟 | _number_ | 十年前 |\n| max-date | 可选的最大时间，精确到分钟 | _number_ | 十年后 |\n| min-hour | 可选的最小小时，针对 time 类型 | _number_ | `0` |\n| max-hour | 可选的最大小时，针对 time 类型 | _number_ | `23` |\n| min-minute | 可选的最小分钟，针对 time 类型 | _number_ | `0` |\n| max-minute | 可选的最大分钟，针对 time 类型 | _number_ | `59` |\n| filter | 选项过滤函数(`type` 可能值为 `year`, `month`, `day`, `hour`, `minute`) | _(type, values) => values_ | - |\n| formatter | 选项格式化函数(`type` 可能值为 `year`, `month`, `day`, `hour`, `minute`) | _(type, value) => value_ | - |\n| title | 顶部栏标题 | _string_ | `''` |\n| show-toolbar | 是否显示顶部栏 | _boolean_ | `true` |\n| loading | 是否显示加载状态 | _boolean_ | `false` |\n| item-height | 选项高度 | _number_ | `44` |\n| confirm-button-text | 确认按钮文字 | _string_ | `确认` |\n| cancel-button-text | 取消按钮文字 | _string_ | `取消` |\n| visible-item-count | 可见的选项个数 | _number_ | `6` |\n\n### Events\n\n| 事件名称 | 说明                     | 回调参数   |\n| -------- | ------------------------ | ---------- |\n| bind:input    | 当值变化时触发的事件     | 当前 value |\n| bind:change   | 当值变化时触发的事件     | 组件实例   |\n| bind:confirm  | 点击完成按钮时触发的事件 | 当前 value |\n| bind:cancel   | 点击取消按钮时触发的事件 | -          |\n\n### change 事件\n\n在`change`事件中，可以获取到组件实例，对组件进行相应的更新等操作：\n\n| 函数                           | 说明                                       |\n| ------------------------------ | ------------------------------------------ |\n| getColumnValue(index)          | 获取对应列中选中的值                       |\n| setColumnValue(index, value)   | 设置对应列中选中的值                       |\n| getColumnValues(index)         | 获取对应列中所有的备选值                   |\n| setColumnValues(index, values) | 设置对应列中所有的备选值                   |\n| getValues()                    | 获取所有列中被选中的值，返回一个数组       |\n| setValues(values)              | `values`为一个数组，设置所有列中被选中的值 |\n\n### 外部样式类\n\n| 类名          | 说明         |\n| ------------- | ------------ |\n| active-class  | 选中项样式类 |\n| toolbar-class | 顶部栏样式类 |\n| column-class  | 列样式类     |\n"
  },
  {
    "path": "packages/datetime-picker/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-toast\": \"../../toast/index\",\n    \"van-datetime-picker\": \"../../datetime-picker/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/datetime-picker/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  data: {\n    minHour: 10,\n    maxHour: 20,\n    minDate: new Date(2018, 0, 1).getTime(),\n    maxDate: new Date(2019, 10, 1).getTime(),\n    currentDate1: new Date(2018, 2, 31).getTime(),\n    currentDate2: null,\n    currentDate3: new Date(2018, 0, 1),\n    currentDate4: '12:00',\n    loading: false,\n    formatter(type, value) {\n      if (type === 'year') {\n        return `${value}年`;\n      }\n      if (type === 'month') {\n        return `${value}月`;\n      }\n      return value;\n    },\n    filter(type, options) {\n      if (type === 'minute') {\n        return options.filter((option) => option % 5 === 0);\n      }\n\n      return options;\n    },\n  },\n\n  methods: {\n    onInput(event) {\n      const { detail, currentTarget } = event;\n      const result = this.getResult(detail, currentTarget.dataset.type);\n\n      Toast({\n        context: this,\n        message: result,\n      });\n    },\n\n    getResult(time, type) {\n      const date = new Date(time);\n      switch (type) {\n        case 'datetime':\n          return date.toLocaleString();\n        case 'date':\n          return date.toLocaleDateString();\n        case 'year-month':\n          return `${date.getFullYear()}/${date.getMonth() + 1}`;\n        case 'time':\n          return time;\n        default:\n          return '';\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/datetime-picker/demo/index.wxml",
    "content": "<demo-block title=\"选择完整时间\">\n  <van-datetime-picker\n    type=\"datetime\"\n    data-type=\"datetime\"\n    loading=\"{{ loading }}\"\n    value=\"{{ currentDate1 }}\"\n    min-date=\"{{ minDate }}\"\n    bind:input=\"onInput\"\n  />\n</demo-block>\n\n<demo-block title=\"选择日期（年月日）\">\n  <van-datetime-picker\n    type=\"date\"\n    data-type=\"date\"\n    value=\"{{ currentDate2 }}\"\n    min-date=\"{{ minDate }}\"\n    bind:input=\"onInput\"\n    formatter=\"{{ formatter }}\"\n  />\n</demo-block>\n\n<demo-block title=\"选择日期（年月）\">\n  <van-datetime-picker\n    type=\"year-month\"\n    data-type=\"year-month\"\n    value=\"{{ currentDate3 }}\"\n    min-date=\"{{ minDate }}\"\n    bind:input=\"onInput\"\n  />\n</demo-block>\n\n<demo-block title=\"选择时间\">\n  <van-datetime-picker\n    type=\"time\"\n    data-type=\"time\"\n    value=\"{{ currentDate4 }}\"\n    min-hour=\"{{ minHour }}\"\n    max-hour=\"{{ maxHour }}\"\n    bind:input=\"onInput\"\n  />\n</demo-block>\n\n<demo-block title=\"选项过滤器\">\n  <van-datetime-picker\n    type=\"time\"\n    value=\"{{ currentDate4 }}\"\n    filter=\"{{ filter }}\"\n  />\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/datetime-picker/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-picker\": \"../picker/index\"\n  }\n}\n"
  },
  {
    "path": "packages/datetime-picker/index.less",
    "content": "// empty\n"
  },
  {
    "path": "packages/datetime-picker/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { isDef } from '../common/validator';\nimport { pickerProps } from '../picker/shared';\n\nconst currentYear = new Date().getFullYear();\n\nfunction isValidDate(date: number) {\n  return isDef(date) && !isNaN(new Date(date).getTime());\n}\n\nfunction range(num: number, min: number, max: number) {\n  return Math.min(Math.max(num, min), max);\n}\n\nfunction padZero(val: string | number) {\n  return `00${val}`.slice(-2);\n}\n\nfunction times(n: number, iteratee: (index: number) => string): string[] {\n  let index = -1;\n  const result = Array(n < 0 ? 0 : n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nfunction getTrueValue(formattedValue: string) {\n  if (formattedValue === undefined) {\n    formattedValue = '1';\n  }\n  while (isNaN(parseInt(formattedValue, 10))) {\n    formattedValue = formattedValue.slice(1);\n  }\n  return parseInt(formattedValue, 10);\n}\n\nfunction getMonthEndDay(year: number, month: number): number {\n  return 32 - new Date(year, month - 1, 32).getDate();\n}\n\nconst defaultFormatter = (\n  type: 'year' | 'month' | 'day' | 'hour' | 'minute',\n  value: string\n) => value;\n\nVantComponent({\n  classes: ['active-class', 'toolbar-class', 'column-class'],\n\n  props: {\n    ...pickerProps,\n    value: {\n      type: null,\n      observer: 'updateValue',\n    },\n    filter: null,\n    type: {\n      type: String,\n      value: 'datetime',\n      observer: 'updateValue',\n    },\n    showToolbar: {\n      type: Boolean,\n      value: true,\n    },\n    formatter: {\n      type: null,\n      value: defaultFormatter,\n    },\n    minDate: {\n      type: Number,\n      value: new Date(currentYear - 10, 0, 1).getTime(),\n      observer: 'updateValue',\n    },\n    maxDate: {\n      type: Number,\n      value: new Date(currentYear + 10, 11, 31).getTime(),\n      observer: 'updateValue',\n    },\n    minHour: {\n      type: Number,\n      value: 0,\n      observer: 'updateValue',\n    },\n    maxHour: {\n      type: Number,\n      value: 23,\n      observer: 'updateValue',\n    },\n    minMinute: {\n      type: Number,\n      value: 0,\n      observer: 'updateValue',\n    },\n    maxMinute: {\n      type: Number,\n      value: 59,\n      observer: 'updateValue',\n    },\n  },\n\n  data: {\n    innerValue: Date.now(),\n    columns: [],\n  },\n\n  methods: {\n    updateValue() {\n      const { data } = this;\n      const val = this.correctValue(data.value);\n      const isEqual = val === data.innerValue;\n      this.updateColumnValue(val).then(() => {\n        if (!isEqual) {\n          this.$emit('input', val);\n        }\n      });\n    },\n\n    getPicker() {\n      if (this.picker == null) {\n        this.picker = this.selectComponent('.van-datetime-picker');\n\n        const { picker } = this;\n        const { setColumnValues } = picker;\n        picker.setColumnValues = (...args: any) =>\n          setColumnValues.apply(picker, [...args, false]);\n      }\n\n      return this.picker;\n    },\n\n    updateColumns() {\n      const { formatter = defaultFormatter } = this.data;\n      const results = this.getOriginColumns().map((column) => ({\n        values: column.values.map((value) => formatter(column.type, value)),\n      }));\n\n      return this.set({ columns: results });\n    },\n\n    getOriginColumns() {\n      const { filter } = this.data;\n      const results = this.getRanges().map(({ type, range }) => {\n        let values = times(range[1] - range[0] + 1, (index) => {\n          const value = range[0] + index;\n          return type === 'year' ? `${value}` : padZero(value);\n        });\n\n        if (filter) {\n          values = filter(type, values);\n        }\n\n        return { type, values };\n      });\n\n      return results;\n    },\n\n    getRanges() {\n      const { data } = this;\n      if (data.type === 'time') {\n        return [\n          {\n            type: 'hour',\n            range: [data.minHour, data.maxHour],\n          },\n          {\n            type: 'minute',\n            range: [data.minMinute, data.maxMinute],\n          },\n        ];\n      }\n\n      const {\n        maxYear,\n        maxDate,\n        maxMonth,\n        maxHour,\n        maxMinute,\n      } = this.getBoundary('max', data.innerValue);\n      const {\n        minYear,\n        minDate,\n        minMonth,\n        minHour,\n        minMinute,\n      } = this.getBoundary('min', data.innerValue);\n\n      const result = [\n        {\n          type: 'year',\n          range: [minYear, maxYear],\n        },\n        {\n          type: 'month',\n          range: [minMonth, maxMonth],\n        },\n        {\n          type: 'day',\n          range: [minDate, maxDate],\n        },\n        {\n          type: 'hour',\n          range: [minHour, maxHour],\n        },\n        {\n          type: 'minute',\n          range: [minMinute, maxMinute],\n        },\n      ];\n\n      if (data.type === 'date') result.splice(3, 2);\n      if (data.type === 'year-month') result.splice(2, 3);\n      return result;\n    },\n\n    correctValue(value: any) {\n      const { data } = this;\n      // validate value\n      const isDateType = data.type !== 'time';\n      if (isDateType && !isValidDate(value)) {\n        value = data.minDate;\n      } else if (!isDateType && !value) {\n        const { minHour } = data;\n        value = `${padZero(minHour)}:00`;\n      }\n\n      // time type\n      if (!isDateType) {\n        let [hour, minute] = value.split(':');\n        hour = padZero(range(hour, data.minHour, data.maxHour));\n        minute = padZero(range(minute, data.minMinute, data.maxMinute));\n\n        return `${hour}:${minute}`;\n      }\n\n      // date type\n      value = Math.max(value, data.minDate);\n      value = Math.min(value, data.maxDate);\n\n      return value;\n    },\n\n    getBoundary(type: string, innerValue: number) {\n      const value = new Date(innerValue);\n      const boundary = new Date(this.data[`${type}Date`]);\n      const year = boundary.getFullYear();\n      let month = 1;\n      let date = 1;\n      let hour = 0;\n      let minute = 0;\n\n      if (type === 'max') {\n        month = 12;\n        date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);\n        hour = 23;\n        minute = 59;\n      }\n\n      if (value.getFullYear() === year) {\n        month = boundary.getMonth() + 1;\n        if (value.getMonth() + 1 === month) {\n          date = boundary.getDate();\n          if (value.getDate() === date) {\n            hour = boundary.getHours();\n            if (value.getHours() === hour) {\n              minute = boundary.getMinutes();\n            }\n          }\n        }\n      }\n\n      return {\n        [`${type}Year`]: year,\n        [`${type}Month`]: month,\n        [`${type}Date`]: date,\n        [`${type}Hour`]: hour,\n        [`${type}Minute`]: minute,\n      };\n    },\n\n    onCancel() {\n      this.$emit('cancel');\n    },\n\n    onConfirm() {\n      this.$emit('confirm', this.data.innerValue);\n    },\n\n    onChange() {\n      const { data } = this;\n      let value;\n\n      const picker = this.getPicker();\n      const originColumns = this.getOriginColumns();\n\n      if (data.type === 'time') {\n        const indexes = picker.getIndexes();\n        value = `${+originColumns[0].values[indexes[0]]}:${+originColumns[1]\n          .values[indexes[1]]}`;\n      } else {\n        const indexes = picker.getIndexes();\n        const values = indexes.map(\n          (value, index) => originColumns[index].values[value]\n        );\n        const year = getTrueValue(values[0]);\n        const month = getTrueValue(values[1]);\n        const maxDate = getMonthEndDay(year, month);\n        let date = getTrueValue(values[2]);\n        if (data.type === 'year-month') {\n          date = 1;\n        }\n        date = date > maxDate ? maxDate : date;\n        let hour = 0;\n        let minute = 0;\n        if (data.type === 'datetime') {\n          hour = getTrueValue(values[3]);\n          minute = getTrueValue(values[4]);\n        }\n        value = new Date(year, month - 1, date, hour, minute);\n      }\n      value = this.correctValue(value);\n\n      this.updateColumnValue(value).then(() => {\n        this.$emit('input', value);\n        this.$emit('change', picker);\n      });\n    },\n\n    updateColumnValue(value) {\n      let values: string[] = [];\n      const { type } = this.data;\n      const formatter = this.data.formatter || defaultFormatter;\n      const picker = this.getPicker();\n\n      if (type === 'time') {\n        const pair = value.split(':');\n        values = [formatter('hour', pair[0]), formatter('minute', pair[1])];\n      } else {\n        const date = new Date(value);\n        values = [\n          formatter('year', `${date.getFullYear()}`),\n          formatter('month', padZero(date.getMonth() + 1)),\n        ];\n        if (type === 'date') {\n          values.push(formatter('day', padZero(date.getDate())));\n        }\n        if (type === 'datetime') {\n          values.push(\n            formatter('day', padZero(date.getDate())),\n            formatter('hour', padZero(date.getHours())),\n            formatter('minute', padZero(date.getMinutes()))\n          );\n        }\n      }\n\n      return this.set({ innerValue: value })\n        .then(() => this.updateColumns())\n        .then(() => picker.setValues(values));\n    },\n  },\n\n  created() {\n    const innerValue = this.correctValue(this.data.value);\n    this.updateColumnValue(innerValue).then(() => {\n      this.$emit('input', innerValue);\n    });\n  },\n});\n"
  },
  {
    "path": "packages/datetime-picker/index.wxml",
    "content": "<van-picker\n  class=\"van-datetime-picker\"\n  active-class=\"active-class\"\n  toolbar-class=\"toolbar-class\"\n  column-class=\"column-class\"\n  title=\"{{ title }}\"\n  columns=\"{{ columns }}\"\n  item-height=\"{{ itemHeight }}\"\n  show-toolbar=\"{{ showToolbar }}\"\n  visible-item-count=\"{{ visibleItemCount }}\"\n  confirm-button-text=\"{{ confirmButtonText }}\"\n  cancel-button-text=\"{{ cancelButtonText }}\"\n  bind:change=\"onChange\"\n  bind:confirm=\"onConfirm\"\n  bind:cancel=\"onCancel\"\n/>\n"
  },
  {
    "path": "packages/datetime-picker/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        选择完整时间\n      </wx-view>\n      <van-datetime-picker\n        data-type=\"datetime\"\n        bind:input=\"onInput\"\n      >\n        <van-picker\n          activeClass=\"active-class\"\n          class=\"van-datetime-picker\"\n          columnClass=\"column-class\"\n          toolbarClass=\"toolbar-class\"\n          bind:cancel=\"onCancel\"\n          bind:change=\"onChange\"\n          bind:confirm=\"onConfirm\"\n        >\n          <wx-view\n            class=\"van-picker custom-class\"\n          >\n            <wx-view\n              class=\"van-picker__toolbar toolbar-class\"\n            >\n              <wx-view\n                class=\"van-picker__cancel\"\n                data-type=\"cancel\"\n                hoverClass=\"van-picker__cancel--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    取消\n  \n              </wx-view>\n              <wx-view\n                class=\"van-picker__confirm\"\n                data-type=\"confirm\"\n                hoverClass=\"van-picker__confirm--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    确认\n  \n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-picker__columns\"\n              style=\"height:264px\"\n              catch:touchmove=\"noop\"\n            >\n              <wx-view\n                class=\"van-picker__mask\"\n                style=\"background-size:100% 110px\"\n              />\n              <wx-view\n                class=\"van-picker__frame van-hairline--top-bottom\"\n                style=\"height:44px\"\n              />\n            </wx-view>\n          </wx-view>\n        </van-picker>\n      </van-datetime-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        选择日期（年月日）\n      </wx-view>\n      <van-datetime-picker\n        data-type=\"date\"\n        bind:input=\"onInput\"\n      >\n        <van-picker\n          activeClass=\"active-class\"\n          class=\"van-datetime-picker\"\n          columnClass=\"column-class\"\n          toolbarClass=\"toolbar-class\"\n          bind:cancel=\"onCancel\"\n          bind:change=\"onChange\"\n          bind:confirm=\"onConfirm\"\n        >\n          <wx-view\n            class=\"van-picker custom-class\"\n          >\n            <wx-view\n              class=\"van-picker__toolbar toolbar-class\"\n            >\n              <wx-view\n                class=\"van-picker__cancel\"\n                data-type=\"cancel\"\n                hoverClass=\"van-picker__cancel--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    取消\n  \n              </wx-view>\n              <wx-view\n                class=\"van-picker__confirm\"\n                data-type=\"confirm\"\n                hoverClass=\"van-picker__confirm--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    确认\n  \n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-picker__columns\"\n              style=\"height:264px\"\n              catch:touchmove=\"noop\"\n            >\n              <wx-view\n                class=\"van-picker__mask\"\n                style=\"background-size:100% 110px\"\n              />\n              <wx-view\n                class=\"van-picker__frame van-hairline--top-bottom\"\n                style=\"height:44px\"\n              />\n            </wx-view>\n          </wx-view>\n        </van-picker>\n      </van-datetime-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        选择日期（年月）\n      </wx-view>\n      <van-datetime-picker\n        data-type=\"year-month\"\n        bind:input=\"onInput\"\n      >\n        <van-picker\n          activeClass=\"active-class\"\n          class=\"van-datetime-picker\"\n          columnClass=\"column-class\"\n          toolbarClass=\"toolbar-class\"\n          bind:cancel=\"onCancel\"\n          bind:change=\"onChange\"\n          bind:confirm=\"onConfirm\"\n        >\n          <wx-view\n            class=\"van-picker custom-class\"\n          >\n            <wx-view\n              class=\"van-picker__toolbar toolbar-class\"\n            >\n              <wx-view\n                class=\"van-picker__cancel\"\n                data-type=\"cancel\"\n                hoverClass=\"van-picker__cancel--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    取消\n  \n              </wx-view>\n              <wx-view\n                class=\"van-picker__confirm\"\n                data-type=\"confirm\"\n                hoverClass=\"van-picker__confirm--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    确认\n  \n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-picker__columns\"\n              style=\"height:264px\"\n              catch:touchmove=\"noop\"\n            >\n              <wx-view\n                class=\"van-picker__mask\"\n                style=\"background-size:100% 110px\"\n              />\n              <wx-view\n                class=\"van-picker__frame van-hairline--top-bottom\"\n                style=\"height:44px\"\n              />\n            </wx-view>\n          </wx-view>\n        </van-picker>\n      </van-datetime-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        选择时间\n      </wx-view>\n      <van-datetime-picker\n        data-type=\"time\"\n        bind:input=\"onInput\"\n      >\n        <van-picker\n          activeClass=\"active-class\"\n          class=\"van-datetime-picker\"\n          columnClass=\"column-class\"\n          toolbarClass=\"toolbar-class\"\n          bind:cancel=\"onCancel\"\n          bind:change=\"onChange\"\n          bind:confirm=\"onConfirm\"\n        >\n          <wx-view\n            class=\"van-picker custom-class\"\n          >\n            <wx-view\n              class=\"van-picker__toolbar toolbar-class\"\n            >\n              <wx-view\n                class=\"van-picker__cancel\"\n                data-type=\"cancel\"\n                hoverClass=\"van-picker__cancel--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    取消\n  \n              </wx-view>\n              <wx-view\n                class=\"van-picker__confirm\"\n                data-type=\"confirm\"\n                hoverClass=\"van-picker__confirm--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    确认\n  \n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-picker__columns\"\n              style=\"height:264px\"\n              catch:touchmove=\"noop\"\n            >\n              <wx-view\n                class=\"van-picker__mask\"\n                style=\"background-size:100% 110px\"\n              />\n              <wx-view\n                class=\"van-picker__frame van-hairline--top-bottom\"\n                style=\"height:44px\"\n              />\n            </wx-view>\n          </wx-view>\n        </van-picker>\n      </van-datetime-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        选项过滤器\n      </wx-view>\n      <van-datetime-picker>\n        <van-picker\n          activeClass=\"active-class\"\n          class=\"van-datetime-picker\"\n          columnClass=\"column-class\"\n          toolbarClass=\"toolbar-class\"\n          bind:cancel=\"onCancel\"\n          bind:change=\"onChange\"\n          bind:confirm=\"onConfirm\"\n        >\n          <wx-view\n            class=\"van-picker custom-class\"\n          >\n            <wx-view\n              class=\"van-picker__toolbar toolbar-class\"\n            >\n              <wx-view\n                class=\"van-picker__cancel\"\n                data-type=\"cancel\"\n                hoverClass=\"van-picker__cancel--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    取消\n  \n              </wx-view>\n              <wx-view\n                class=\"van-picker__confirm\"\n                data-type=\"confirm\"\n                hoverClass=\"van-picker__confirm--hover\"\n                hoverStayTime=\"70\"\n                bind:tap=\"emit\"\n              >\n                \n    确认\n  \n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-picker__columns\"\n              style=\"height:264px\"\n              catch:touchmove=\"noop\"\n            >\n              <wx-view\n                class=\"van-picker__mask\"\n                style=\"background-size:100% 110px\"\n              />\n              <wx-view\n                class=\"van-picker__frame van-hairline--top-bottom\"\n                style=\"height:44px\"\n              />\n            </wx-view>\n          </wx-view>\n        </van-picker>\n      </van-datetime-picker>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/datetime-picker/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/definitions/index.ts",
    "content": "interface VantComponentInstance {\n  parent: WechatMiniprogram.Component.TrivialInstance;\n  children: WechatMiniprogram.Component.TrivialInstance[];\n  index: number;\n  $emit: (\n    name: string,\n    detail?: unknown,\n    options?: WechatMiniprogram.Component.TriggerEventOption\n  ) => void;\n  setView: (value: Record<string, any>, callback?: () => void) => void;\n}\n\nexport type VantComponentOptions<\n  Data extends WechatMiniprogram.Component.DataOption,\n  Props extends WechatMiniprogram.Component.PropertyOption,\n  Methods extends WechatMiniprogram.Component.MethodOption\n> = {\n  data?: Data;\n  field?: boolean;\n  classes?: string[];\n  mixins?: string[];\n  props?: Props;\n  relation?: {\n    relations: Record<string, WechatMiniprogram.Component.RelationOption>;\n    mixin: string;\n  };\n\n  watch?: Record<string, (...args: any[]) => any>;\n\n  methods?: Methods;\n\n  // lifetimes\n  beforeCreate?: () => void;\n  created?: () => void;\n  mounted?: () => void;\n  destroyed?: () => void;\n} & ThisType<\n  VantComponentInstance &\n    WechatMiniprogram.Component.Instance<\n      Data & {\n        name: string;\n        value: any;\n      } & Record<string, any>,\n      Props,\n      Methods\n    > &\n    Record<string, any>\n>;\n"
  },
  {
    "path": "packages/dialog/README.md",
    "content": "# Dialog 弹出框\n\n### 介绍\n\n弹出模态框，常用于消息提示、消息确认，或在当前页面内完成特定的交互操作，支持函数调用和组件调用两种方式。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-dialog\": \"@vant/weapp/dialog/index\"\n}\n```\n\n## 代码演示\n\n### 消息提示\n\n用于提示一些消息，只包含一个确认按钮。\n\n```html\n<van-dialog id=\"van-dialog\" />\n```\n\n```javascript\nimport Dialog from '@vant/weapp/dialog/dialog';\n\nDialog.alert({\n  title: '标题',\n  message: '弹窗内容',\n}).then(() => {\n  // on close\n});\n\nDialog.alert({\n  message: '弹窗内容',\n}).then(() => {\n  // on close\n});\n```\n\n### 消息确认\n\n用于确认消息，包含取消和确认按钮。\n\n```html\n<van-dialog id=\"van-dialog\" />\n```\n\n```javascript\nimport Dialog from '@vant/weapp/dialog/dialog';\n\nDialog.confirm({\n  title: '标题',\n  message: '弹窗内容',\n})\n  .then(() => {\n    // on confirm\n  })\n  .catch(() => {\n    // on cancel\n  });\n```\n\n### 圆角按钮风格\n\n将 theme 选项设置为 `round-button` 可以展示圆角按钮风格的弹窗。\n\n```html\n<van-dialog id=\"van-dialog\" />\n```\n\n```javascript\nimport Dialog from '@vant/weapp/dialog/dialog';\n\nDialog.alert({\n  title: '标题',\n  message: '弹窗内容',\n  theme: 'round-button',\n}).then(() => {\n  // on close\n});\n\nDialog.alert({\n  message: '弹窗内容',\n  theme: 'round-button',\n}).then(() => {\n  // on close\n});\n```\n\n### 异步关闭\n\n通过 `beforeClose` 属性可以传入一个回调函数，在弹窗关闭前进行特定操作。\n\n```html\n<van-dialog id=\"van-dialog\" />\n```\n\n```javascript\nimport Dialog from '@vant/weapp/dialog/dialog';\n\nconst beforeClose = (action) =>\n  new Promise((resolve) => {\n    setTimeout(() => {\n      if (action === 'confirm') {\n        resolve(true);\n      } else {\n        // 拦截取消操作\n        resolve(false);\n      }\n    }, 1000);\n  });\n\nDialog.confirm({\n  title: '标题',\n  message: '弹窗内容',\n  beforeClose,\n});\n```\n\n### 组件调用\n\n如果需要在弹窗内嵌入组件或其他自定义内容，可以使用组件调用的方式。\n\n```html\n<van-dialog\n  use-slot\n  title=\"标题\"\n  show=\"{{ show }}\"\n  show-cancel-button\n  confirm-button-open-type=\"getUserInfo\"\n  bind:close=\"onClose\"\n  bind:getuserinfo=\"getUserInfo\"\n>\n  <image src=\"https://img.yzcdn.cn/1.jpg\" />\n</van-dialog>\n```\n\n```js\nPage({\n  data: {\n    show: true,\n  },\n\n  getUserInfo(event) {\n    console.log(event.detail);\n  },\n\n  onClose() {\n    this.setData({ show: false });\n  },\n});\n```\n\n### 自定义样式\n\n如果需要自定义样式，建议使用 `custom-class` 实现，不在推荐 `className` 属性（在自定义组件中使用并不会生效），使用方法如下\n\n#### 组件调用\n\n```html\n<van-dialog\n  title=\"标题\"\n  message=\"弹窗内容\"\n  show=\"{{ show }}\"\n  custom-class=\"my-custom-class\"\n/>\n```\n\n#### API 调用\n\n```html\n<van-dialog id=\"van-dialog\" custom-class=\"my-custom-class\" />\n```\n\n## API\n\n### 方法\n\n| 方法名 | 参数 | 返回值 | 介绍 |\n| --- | --- | --- | --- |\n| Dialog | `options` | `Promise` | 展示弹窗 |\n| Dialog.alert | `options` | `Promise` | 展示消息提示弹窗 |\n| Dialog.confirm | `options` | `Promise` | 展示消息确认弹窗 |\n| Dialog.setDefaultOptions | `options` | `void` | 修改默认配置，对所有 Dialog 生效 |\n| Dialog.resetDefaultOptions | - | `void` | 重置默认配置，对所有 Dialog 生效 |\n| Dialog.close | - | `void` | 关闭弹窗 |\n| Dialog.stopLoading | - | `void` | 停止按钮的加载状态 |\n\n### Options\n\n通过函数调用 Dialog 时，支持传入以下选项：\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| title | 标题 | _string_ | - |\n| width | 弹窗宽度，默认单位为`px` | _string \\| number_ | `320px` |\n| message | 文本内容，支持通过`\\n`换行 | _string_ | - |\n| messageAlign | 内容对齐方式，可选值为`left` `right` | _string_ | `center` |\n| theme | 样式风格，可选值为`round-button` | _string_ | `default` |\n| zIndex | z-index 层级 | _number_ | `100` |\n| className | 自定义类名，dialog 在自定义组件内时无效，已废弃，请使用 `custom-class` 代替，将在 2.0.0 移除 | _string_ | '' |\n| customStyle | 自定义样式 | _string_ | '' |\n| selector | 自定义选择器 | _string_ | `van-dialog` |\n| showConfirmButton | 是否展示确认按钮 | _boolean_ | `true` |\n| showCancelButton | 是否展示取消按钮 | _boolean_ | `false` |\n| confirmButtonText | 确认按钮的文案 | _string_ | `确认` |\n| cancelButtonText | 取消按钮的文案 | _string_ | `取消` |\n| overlay | 是否展示遮罩层 | _boolean_ | `true` |\n| overlayStyle | 自定义遮罩层样式 | _object_ | - |\n| closeOnClickOverlay | 点击遮罩层时是否关闭弹窗 | _boolean_ | `false` |\n| asyncClose | 已废弃，将在 2.0.0 移除，请使用 `beforeClose` 属性代替 | _boolean_ | `false` |\n| beforeClose | 关闭前的回调函数，返回 `false` 可阻止关闭，支持返回 Promise | _(action) => boolean \\| Promise\\<boolean\\>_ | - |\n| context | 选择器的选择范围，可以传入自定义组件的 this 作为上下文 | _object_ | 当前页面 |\n| transition | 动画名称，可选值为`fade` `none` | _string_ | `scale` |\n| confirmButtonOpenType | 确认按钮的微信开放能力，具体支持可参考 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) | _string_ | - |\n\n### OpenType Options\n\n使用`confirmButtonOpenType`后，支持以下选项：\n\n| 参数 | 说明 | 类型 | 默认值 | open-type |\n| --- | --- | --- | --- | --- |\n| appParameter | 打开 APP 时，向 APP 传递的参数 | _string_ | - | `launchApp` |\n| lang | 指定返回用户信息的语言，zh_CN 简体中文，<br>zh_TW 繁体中文，en 英文 | _string_ | `en` | `getUserInfo` |\n| sessionFrom | 会话来源 | _string_ | - | `contact` |\n| businessId | 客服消息子商户 id | _number_ | - | `contact` |\n| sendMessageTitle | 会话内消息卡片标题 | _string_ | 当前标题 | `contact` |\n| sendMessagePath | 会话内消息卡片点击跳转小程序路径 | _string_ | 当前分享路径 | `contact` |\n| sendMessageImg | sendMessageImg | _string_ | 截图 | `contact` |\n| showMessageCard | 显示会话内消息卡片 | _string_ | `false` | `contact` |\n\n### Props\n\n通过组件调用 Dialog 时，支持以下 Props:\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| show | 是否显示弹窗 | _boolean_ | - |\n| confirm-button-id `v1.10.25`| 确认按钮的标识符，作为底层原生button组件的id值 | _string_ | - |\n| title | 标题 | _string_ | - |\n| width | 弹窗宽度，默认单位为`px` | _string \\| number_ | `320px` |\n| message | 文本内容，支持通过`\\n`换行 | _string_ | - |\n| theme | 样式风格，可选值为`round-button` | _string_ | `default` |\n| message-align | 内容对齐方式，可选值为`left` `right` | _string_ | `center` |\n| z-index | z-index 层级 | _number_ | `100` |\n| class-name | 自定义类名，dialog 在自定义组件内时无效，已废弃，请使用 `custom-class` 代替，将在 2.0.0 移除 | _string_ | '' |\n| custom-style | 自定义样式 | _string_ | '' |\n| show-confirm-button | 是否展示确认按钮 | _boolean_ | `true` |\n| show-cancel-button | 是否展示取消按钮 | _boolean_ | `false` |\n| confirm-button-text | 确认按钮的文案 | _string_ | `确认` |\n| cancel-button-text | 取消按钮的文案 | _string_ | `取消` |\n| confirm-button-color | 确认按钮的字体颜色 | _string_ | `#ee0a24` |\n| cancel-button-color | 取消按钮的字体颜色 | _string_ | `#333` |\n| overlay | 是否展示遮罩层 | _boolean_ | `true` |\n| overlay-style `v1.0.0` | 自定义遮罩层样式 | _object_ | - |\n| close-on-click-overlay | 点击遮罩层时是否关闭弹窗 | _boolean_ | `false` |\n| use-slot | 是否使用自定义内容的插槽 | _boolean_ | `false` |\n| use-title-slot | 是否使用自定义标题的插槽 | _boolean_ | `false` |\n| use-confirm-button-slot `1.10.23` | 是否使用自定义确认按钮的插槽 | _boolean_ | `false` |\n| use-cancel-button-slot `1.10.23` | 是否使用自定义取消按钮的插槽 | _boolean_ | `false` |\n| async-close | 已废弃，将在 2.0.0 移除，请使用 `beforeClose` 属性代替 | _boolean_ | `false` |\n| before-close | 关闭前的回调函数，返回 `false` 可阻止关闭，支持返回 Promise | _(action) => boolean \\| Promise\\<boolean\\>_ | - |\n| transition | 动画名称，可选值为`fade` | _string_ | `scale` |\n| confirm-button-open-type | 确认按钮的微信开放能力，具体支持可参考 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) | _string_ | - |\n| root-portal `v1.11.3` | 是否从页面子树中脱离出来，用于解决各种 fixed 失效问题，微信基础库 >= `2.25.2 `  | _boolean_ | `false` |\n\n### OpenType Props\n\n使用`confirm-button-open-type`后，支持以下 Props：\n\n| 参数 | 说明 | 类型 | 默认值 | open-type |\n| --- | --- | --- | --- | --- |\n| app-parameter | 打开 APP 时，向 APP 传递的参数 | _string_ | - | `launchApp` |\n| lang | 指定返回用户信息的语言，zh_CN 简体中文，<br>zh_TW 繁体中文，en 英文 | _string_ | `en` | `getUserInfo` |\n| session-from | 会话来源 | _string_ | - | `contact` |\n| business-id | 客服消息子商户 id | _number_ | - | `contact` |\n| send-message-title | 会话内消息卡片标题 | _string_ | 当前标题 | `contact` |\n| send-message-path | 会话内消息卡片点击跳转小程序路径 | _string_ | 当前分享路径 | `contact` |\n| send-message-img | sendMessageImg | _string_ | 截图 | `contact` |\n| show-message-card | 显示会话内消息卡片 | _string_ | `false` | `contact` |\n\n### Events\n\n| 事件 | 说明 | 回调参数 |\n| --- | --- | --- |\n| bind:close | 弹窗关闭时触发 | event.detail: 触发关闭事件的来源，<br>枚举为`confirm`,`cancel`,`overlay` |\n| bind:confirm | 点击确认按钮时触发 | - |\n| bind:cancel | 点击取消按钮时触发 | - |\n| bind:getuserinfo | 点击确认按钮时，会返回获取到的用户信息，<br>从返回参数的 detail 中获取到的值同 wx.getUserInfo | - |\n| bind:contact | 客服消息回调 | - |\n| bind:getphonenumber | 获取用户手机号回调 | - |\n| bind:getrealtimephonenumber `v1.10.21` | 获取手机号实时验证回调，open-type=getRealtimePhoneNumber 时有效 | - |\n| bind:agreeprivacyauthorization `v1.10.25` | 同意隐私协议回调，openType=\"agreePrivacyAuthorization\"时有效 | - |\n| bind:error | 当使用开放能力时，发生错误的回调 | - |\n| bind:opensetting | 在打开授权设置页后回调 | - |\n\n### Slot\n\n| 名称 | 说明 |\n| --- | --- |\n| title | 自定义`title`显示内容，如果设置了`title`属性则不生效 |\n| confirm-button `1.10.23` | 自定义`confirm-button`显示内容，需要 `use-confirm-button-slot` 为 `true` |\n| cancel-button `1.10.23` | 自定义`cancel-button`显示内容，需要 `use-cancel-button-slot` 为 `true` |\n\n### 外部样式类\n\n| 类名                            | 说明           |\n| ------------------------------- | -------------- |\n| custom-class `v1.10.8`          | 根节点样式类   |\n| cancle-button-class `v1.10.21`  | 取消按钮样式类 |\n| confirm-button-class `v1.10.21` | 确认按钮样式类 |\n"
  },
  {
    "path": "packages/dialog/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-dialog\": \"../../dialog/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/dialog/demo/index.less",
    "content": ".demo-image {\n  box-sizing: border-box;\n  width: 100%;\n  padding: 25px 20px 0;\n}\n"
  },
  {
    "path": "packages/dialog/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Dialog, { Action } from '../../dialog/dialog';\n\nconst message = '代码是写出来给人看的，附带能在机器上运行';\n\nVantComponent({\n  data: {\n    show: false,\n  },\n\n  methods: {\n    showCustomDialog() {\n      this.setData({ show: true });\n    },\n\n    getUserInfo(event) {\n      console.log(event.detail);\n    },\n\n    onClickThemeAlert() {\n      Dialog.alert({\n        context: this,\n        title: '标题',\n        theme: 'round-button',\n        message,\n      });\n    },\n\n    onClickThemeAlert2() {\n      Dialog.alert({\n        context: this,\n        theme: 'round-button',\n        message,\n      });\n    },\n\n    onClickAlert() {\n      Dialog.alert({\n        context: this,\n        title: '标题',\n        message,\n      });\n    },\n\n    onClickAlert2() {\n      Dialog.alert({\n        context: this,\n        message,\n      });\n    },\n\n    onClickConfirm() {\n      Dialog.confirm({\n        context: this,\n        title: '标题',\n        message,\n      });\n    },\n\n    onClickAsyncClose() {\n      const beforeClose = (action: Action): Promise<boolean> =>\n        new Promise((resolve) => {\n          setTimeout(() => {\n            if (action === 'confirm') {\n              resolve(true);\n            } else {\n              // 拦截取消操作\n              resolve(false);\n            }\n          }, 1000);\n        });\n\n      Dialog.confirm({\n        context: this,\n        title: '标题',\n        message,\n        beforeClose,\n      });\n    },\n\n    onClose() {\n      this.setData({\n        show: false,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/dialog/demo/index.wxml",
    "content": "<demo-block card title=\"提示弹窗\" padding>\n  <van-cell title=\"提示弹窗\" bind:click=\"onClickAlert\" is-link />\n  <van-cell title=\"提示弹窗（无标题）\" bind:click=\"onClickAlert2\" is-link />\n  <van-cell title=\"确认弹窗\" bind:click=\"onClickConfirm\" is-link />\n</demo-block>\n\n<demo-block card title=\"圆角按钮样式\" padding>\n  <van-cell title=\"提示弹窗\" bind:click=\"onClickThemeAlert\" is-link />\n  <van-cell title=\"提示弹窗（无标题）\" bind:click=\"onClickThemeAlert2\" is-link />\n</demo-block>\n\n<demo-block card title=\"异步关闭\" padding>\n  <van-cell title=\"异步关闭\" bind:click=\"onClickAsyncClose\" />\n</demo-block>\n\n<demo-block card title=\"组件调用\" padding>\n  <van-cell title=\"组件调用\" bind:click=\"showCustomDialog\" />\n</demo-block>\n\n<van-dialog\n  use-slot\n  title=\"标题\"\n  show=\"{{ show }}\"\n  show-cancel-button\n  bind:close=\"onClose\"\n  confirm-button-open-type=\"getUserInfo\"\n  bind:getuserinfo=\"getUserInfo\"\n>\n  <image\n    class=\"demo-image\"\n    src=\"https://img.yzcdn.cn/public_files/2017/09/05/4e3ea0898b1c2c416eec8c11c5360833.jpg\"\n  />\n</van-dialog>\n\n<van-dialog id=\"van-dialog\" />\n"
  },
  {
    "path": "packages/dialog/dialog.ts",
    "content": "let queue: WechatMiniprogram.Component.TrivialInstance[] = [];\nexport type Action = 'confirm' | 'cancel' | 'overlay';\n\ntype DialogContext =\n  | WechatMiniprogram.Page.TrivialInstance\n  | WechatMiniprogram.Component.TrivialInstance;\n\ninterface DialogOptions {\n  lang?: string;\n  show?: boolean;\n  title?: string;\n  width?: string | number | null;\n  zIndex?: number;\n  theme?: string;\n  context?: (() => DialogContext) | DialogContext;\n  message?: string;\n  overlay?: boolean;\n  selector?: string;\n  ariaLabel?: string;\n  /**\n   * @deprecated use custom-class instead\n   */\n  className?: string;\n  customStyle?: string;\n  transition?: string;\n  /**\n   * @deprecated use beforeClose instead\n   */\n  asyncClose?: boolean;\n  beforeClose?: null | ((action: Action) => Promise<void | boolean> | void);\n  businessId?: number;\n  sessionFrom?: string;\n  overlayStyle?: string;\n  appParameter?: string;\n  messageAlign?: string;\n  sendMessageImg?: string;\n  showMessageCard?: boolean;\n  sendMessagePath?: string;\n  sendMessageTitle?: string;\n  confirmButtonText?: string;\n  cancelButtonText?: string;\n  showConfirmButton?: boolean;\n  showCancelButton?: boolean;\n  closeOnClickOverlay?: boolean;\n  confirmButtonOpenType?: string;\n}\n\nconst defaultOptions: DialogOptions = {\n  show: false,\n  title: '',\n  width: null,\n  theme: 'default',\n  message: '',\n  zIndex: 100,\n  overlay: true,\n  selector: '#van-dialog',\n  className: '',\n  asyncClose: false,\n  beforeClose: null,\n  transition: 'scale',\n  customStyle: '',\n  messageAlign: '',\n  overlayStyle: '',\n  confirmButtonText: '确认',\n  cancelButtonText: '取消',\n  showConfirmButton: true,\n  showCancelButton: false,\n  closeOnClickOverlay: false,\n  confirmButtonOpenType: '',\n};\n\nlet currentOptions: DialogOptions = { ...defaultOptions };\n\nfunction getContext() {\n  const pages = getCurrentPages();\n  return pages[pages.length - 1];\n}\n\nconst Dialog = (options: DialogOptions) => {\n  options = {\n    ...currentOptions,\n    ...options,\n  };\n\n  return new Promise<WechatMiniprogram.Component.TrivialInstance>(\n    (resolve, reject) => {\n      const context =\n        (typeof options.context === 'function'\n          ? options.context()\n          : options.context) || getContext();\n      const dialog = context.selectComponent(options.selector as string);\n\n      delete options.context;\n      delete options.selector;\n\n      if (dialog) {\n        dialog.setData({\n          callback: (\n            action: Action,\n            instance: WechatMiniprogram.Component.TrivialInstance\n          ) => {\n            action === 'confirm' ? resolve(instance) : reject(instance);\n          },\n          ...options,\n        });\n\n        wx.nextTick(() => {\n          dialog.setData({ show: true });\n        });\n\n        queue.push(dialog);\n      } else {\n        console.warn(\n          '未找到 van-dialog 节点，请确认 selector 及 context 是否正确'\n        );\n      }\n    }\n  );\n};\n\nDialog.alert = (options: DialogOptions) => Dialog(options);\n\nDialog.confirm = (options: DialogOptions) =>\n  Dialog({\n    showCancelButton: true,\n    ...options,\n  });\n\nDialog.close = () => {\n  queue.forEach((dialog) => {\n    dialog.close();\n  });\n  queue = [];\n};\n\nDialog.stopLoading = () => {\n  queue.forEach((dialog) => {\n    dialog.stopLoading();\n  });\n};\n\nDialog.currentOptions = currentOptions;\nDialog.defaultOptions = defaultOptions;\n\nDialog.setDefaultOptions = (options: DialogOptions) => {\n  currentOptions = { ...currentOptions, ...options };\n  Dialog.currentOptions = currentOptions;\n};\n\nDialog.resetDefaultOptions = () => {\n  currentOptions = { ...defaultOptions };\n  Dialog.currentOptions = currentOptions;\n};\n\nDialog.resetDefaultOptions();\n\nexport default Dialog;\n"
  },
  {
    "path": "packages/dialog/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"van-button\": \"../button/index\",\n    \"van-goods-action\": \"../goods-action/index\",\n    \"van-goods-action-button\": \"../goods-action-button/index\"\n  }\n}\n"
  },
  {
    "path": "packages/dialog/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-dialog {\n  top: 45% !important;\n  overflow: hidden;\n  width: var(--dialog-width, @dialog-width);\n  font-size: var(--dialog-font-size, @dialog-font-size);\n  border-radius: var(--dialog-border-radius, @dialog-border-radius);\n  background-color: var(--dialog-background-color, @dialog-background-color);\n\n  @media (max-width: 321px) {\n    width: var(--dialog-small-screen-width, @dialog-small-screen-width);\n  }\n\n  &__header {\n    text-align: center;\n    padding-top: var(--dialog-header-padding-top, @dialog-header-padding-top);\n    font-weight: var(--dialog-header-font-weight, @dialog-header-font-weight);\n    line-height: var(--dialog-header-line-height, @dialog-header-line-height);\n\n    &--isolated {\n      padding: var(\n        --dialog-header-isolated-padding,\n        @dialog-header-isolated-padding\n      );\n    }\n  }\n\n  &__message {\n    overflow-y: auto;\n    text-align: center;\n    -webkit-overflow-scrolling: touch;\n    font-size: var(--dialog-message-font-size, @dialog-message-font-size);\n    line-height: var(--dialog-message-line-height, @dialog-message-line-height);\n    max-height: var(--dialog-message-max-height, @dialog-message-max-height);\n    padding: var(--dialog-message-padding, @dialog-message-padding);\n\n    &-text {\n      word-wrap: break-word;\n    }\n\n    &--hasTitle {\n      padding-top: var(\n        --dialog-has-title-message-padding-top,\n        @dialog-has-title-message-padding-top\n      );\n      color: var(\n        --dialog-has-title-message-text-color,\n        @dialog-has-title-message-text-color\n      );\n    }\n\n    &--round-button {\n      padding-bottom: @padding-md;\n      color: @text-color;\n    }\n\n    &--left {\n      text-align: left;\n    }\n\n    &--right {\n      text-align: right;\n    }\n\n    &--justify {\n      text-align: justify;\n    }\n  }\n\n  &__footer {\n    display: flex;\n\n    &--round-button {\n      position: relative !important;\n      padding: @padding-xs @padding-lg @padding-md !important;\n    }\n  }\n\n  &__button {\n    flex: 1;\n  }\n\n  &__confirm,\n  &__cancel {\n    border: 0 !important;\n  }\n\n  &-bounce-enter {\n    transform: translate3d(-50%, -50%, 0) scale(0.7);\n    opacity: 0;\n  }\n\n  &-bounce-leave-active {\n    transform: translate3d(-50%, -50%, 0) scale(0.9);\n    opacity: 0;\n  }\n}\n"
  },
  {
    "path": "packages/dialog/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\nimport { GRAY, RED } from '../common/color';\nimport { toPromise } from '../common/utils';\nimport type { Action } from './dialog';\n\nVantComponent({\n  mixins: [button],\n  classes: ['cancle-button-class', 'confirm-button-class'],\n\n  props: {\n    show: {\n      type: Boolean,\n      observer(show: boolean) {\n        !show && this.stopLoading();\n      },\n    },\n    title: String,\n    message: String,\n    theme: {\n      type: String,\n      value: 'default',\n    },\n    confirmButtonId: String,\n    className: String,\n    customStyle: String,\n    asyncClose: Boolean,\n    messageAlign: String,\n    beforeClose: null,\n    overlayStyle: String,\n    useSlot: Boolean,\n    useTitleSlot: Boolean,\n    useConfirmButtonSlot: Boolean,\n    useCancelButtonSlot: Boolean,\n    showCancelButton: Boolean,\n    closeOnClickOverlay: Boolean,\n    confirmButtonOpenType: String,\n    width: null,\n    zIndex: {\n      type: Number,\n      value: 2000,\n    },\n    confirmButtonText: {\n      type: String,\n      value: '确认',\n    },\n    cancelButtonText: {\n      type: String,\n      value: '取消',\n    },\n    confirmButtonColor: {\n      type: String,\n      value: RED,\n    },\n    cancelButtonColor: {\n      type: String,\n      value: GRAY,\n    },\n    showConfirmButton: {\n      type: Boolean,\n      value: true,\n    },\n    overlay: {\n      type: Boolean,\n      value: true,\n    },\n    transition: {\n      type: String,\n      value: 'scale',\n    },\n    rootPortal: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  data: {\n    loading: {\n      confirm: false,\n      cancel: false,\n    },\n    callback: (() => {}) as unknown as (\n      action: string,\n      context: WechatMiniprogram.Component.TrivialInstance\n    ) => void,\n  },\n\n  methods: {\n    onConfirm() {\n      this.handleAction('confirm');\n    },\n\n    onCancel() {\n      this.handleAction('cancel');\n    },\n\n    onClickOverlay() {\n      this.close('overlay');\n    },\n\n    close(action: string) {\n      this.setData({ show: false });\n\n      this.closeAction = action;\n    },\n\n    onAfterLeave() {\n      const { closeAction: action } = this;\n\n      this.$emit('close', action);\n\n      const { callback } = this.data;\n\n      if (callback) {\n        callback(action, this);\n      }\n    },\n\n    stopLoading() {\n      this.setData({\n        loading: {\n          confirm: false,\n          cancel: false,\n        },\n      });\n    },\n\n    handleAction(action: Action) {\n      this.$emit(action, { dialog: this });\n\n      const { asyncClose, beforeClose } = this.data;\n      if (!asyncClose && !beforeClose) {\n        this.close(action);\n        return;\n      }\n\n      this.setData({\n        [`loading.${action}`]: true,\n      });\n\n      if (beforeClose) {\n        toPromise(beforeClose(action)).then((value) => {\n          if (value) {\n            this.close(action);\n          } else {\n            this.stopLoading();\n          }\n        });\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/dialog/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<van-popup\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay=\"{{ overlay }}\"\n  transition=\"{{ transition }}\"\n  custom-class=\"van-dialog van-dialog--{{ theme }}{{ className }} custom-class\"\n  custom-style=\"width: {{ utils.addUnit(width) }};{{ customStyle }}\"\n  overlay-style=\"{{ overlayStyle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClickOverlay\"\n  bind:after-leave=\"onAfterLeave\"\n>\n  <view\n    wx:if=\"{{ title || useTitleSlot  }}\"\n    class=\"{{ utils.bem('dialog__header', { isolated: !(message || useSlot) }) }}\"\n  >\n    <slot wx:if=\"{{ useTitleSlot }}\" name=\"title\" />\n    <block wx:elif=\"{{ title }}\">{{ title }}</block>\n  </view>\n\n  <slot wx:if=\"{{ useSlot }}\" />\n  <view\n    wx:elif=\"{{ message }}\"\n    class=\"{{ utils.bem('dialog__message', [theme, messageAlign, { hasTitle: title }]) }}\"\n  >\n    <text class=\"van-dialog__message-text\">{{ message }}</text>\n  </view>\n\n  <van-goods-action wx:if=\"{{ theme === 'round-button' }}\" custom-class=\"van-dialog__footer--round-button\">\n    <van-goods-action-button\n      wx:if=\"{{ showCancelButton }}\"\n      size=\"large\"\n      loading=\"{{ loading.cancel }}\"\n      class=\"van-dialog__button van-hairline--right\"\n      custom-class=\"van-dialog__cancel cancle-button-class\"\n      custom-style=\"color: {{ cancelButtonColor }}\"\n      bind:click=\"onCancel\"\n    >\n      {{ cancelButtonText }}\n    </van-goods-action-button>\n    <van-goods-action-button\n      wx:if=\"{{ showConfirmButton }}\"\n      size=\"large\"\n      class=\"van-dialog__button\"\n      loading=\"{{ loading.confirm }}\"\n      custom-class=\"van-dialog__confirm confirm-button-class\"\n      custom-style=\"color: {{ confirmButtonColor }}\"\n      button-id=\"{{ confirmButtonId }}\"\n      open-type=\"{{ confirmButtonOpenType }}\"\n      lang=\"{{ lang }}\"\n      business-id=\"{{ businessId }}\"\n      session-from=\"{{ sessionFrom }}\"\n      send-message-title=\"{{ sendMessageTitle }}\"\n      send-message-path=\"{{ sendMessagePath }}\"\n      send-message-img=\"{{ sendMessageImg }}\"\n      show-message-card=\"{{ showMessageCard }}\"\n      app-parameter=\"{{ appParameter }}\"\n      bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n      bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n      bind:click=\"onConfirm\"\n      bindgetuserinfo=\"onGetUserInfo\"\n      bindcontact=\"onContact\"\n      bindgetphonenumber=\"onGetPhoneNumber\"\n      binderror=\"onError\"\n      bindlaunchapp=\"onLaunchApp\"\n      bindopensetting=\"onOpenSetting\"\n    >\n      {{ confirmButtonText }}\n    </van-goods-action-button>\n  </van-goods-action>\n\n  <view wx:elif=\"{{ showCancelButton || showConfirmButton }}\" class=\"van-hairline--top van-dialog__footer\">\n    <block wx:if=\"{{ showCancelButton }}\">\n      <slot wx:if=\"{{ useCancelButtonSlot }}\" name=\"cancel-button\" />\n\n      <van-button\n        wx:else\n        size=\"large\"\n        loading=\"{{ loading.cancel }}\"\n        class=\"van-dialog__button van-hairline--right\"\n        custom-class=\"van-dialog__cancel cancle-button-class\"\n        custom-style=\"color: {{ cancelButtonColor }}\"\n        bind:click=\"onCancel\"\n      >\n        {{ cancelButtonText }}\n      </van-button>\n    </block>\n\n    <block wx:if=\"{{ showConfirmButton }}\">\n      <slot wx:if=\"{{ useConfirmButtonSlot }}\" name=\"confirm-button\" />\n\n      <van-button\n        wx:else\n        size=\"large\"\n        class=\"van-dialog__button\"\n        loading=\"{{ loading.confirm }}\"\n        custom-class=\"van-dialog__confirm confirm-button-class\"\n        custom-style=\"color: {{ confirmButtonColor }}\"\n        button-id=\"{{ confirmButtonId }}\"\n        open-type=\"{{ confirmButtonOpenType }}\"\n        lang=\"{{ lang }}\"\n        business-id=\"{{ businessId }}\"\n        session-from=\"{{ sessionFrom }}\"\n        send-message-title=\"{{ sendMessageTitle }}\"\n        send-message-path=\"{{ sendMessagePath }}\"\n        send-message-img=\"{{ sendMessageImg }}\"\n        show-message-card=\"{{ showMessageCard }}\"\n        app-parameter=\"{{ appParameter }}\"\n        bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n        bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n        bind:click=\"onConfirm\"\n        bindgetuserinfo=\"onGetUserInfo\"\n        bindcontact=\"onContact\"\n        bindgetphonenumber=\"onGetPhoneNumber\"\n        binderror=\"onError\"\n        bindlaunchapp=\"onLaunchApp\"\n        bindopensetting=\"onOpenSetting\"\n      >\n        {{ confirmButtonText }}\n      </van-button>\n    </block>\n  </view>\n</van-popup>\n"
  },
  {
    "path": "packages/dialog/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        提示弹窗\n      </wx-view>\n      <wx-view\n        class=\"demo-block__card\"\n      >\n        <van-cell\n          bind:click=\"onClickAlert\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              提示弹窗\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n        <van-cell\n          bind:click=\"onClickAlert2\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              提示弹窗（无标题）\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n        <van-cell\n          bind:click=\"onClickConfirm\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              确认弹窗\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        圆角按钮样式\n      </wx-view>\n      <wx-view\n        class=\"demo-block__card\"\n      >\n        <van-cell\n          bind:click=\"onClickThemeAlert\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              提示弹窗\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n        <van-cell\n          bind:click=\"onClickThemeAlert2\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              提示弹窗（无标题）\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        异步关闭\n      </wx-view>\n      <wx-view\n        class=\"demo-block__card\"\n      >\n        <van-cell\n          bind:click=\"onClickAsyncClose\"\n        >\n          <wx-view\n            class=\"custom-class van-cell\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              异步关闭\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n          </wx-view>\n        </van-cell>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        组件调用\n      </wx-view>\n      <wx-view\n        class=\"demo-block__card\"\n      >\n        <van-cell\n          bind:click=\"showCustomDialog\"\n        >\n          <wx-view\n            class=\"custom-class van-cell\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              组件调用\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n          </wx-view>\n        </van-cell>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <van-dialog\n    bind:close=\"onClose\"\n    bind:getuserinfo=\"getUserInfo\"\n  >\n    <van-popup\n      customClass=\"van-dialog van-dialog--default custom-class\"\n      bind:after-leave=\"onAfterLeave\"\n      bind:close=\"onClickOverlay\"\n    >\n      <van-overlay\n        bind:click=\"onClickOverlay\"\n      >\n        <van-transition\n          customClass=\"van-overlay custom-class\"\n          bind:tap=\"onClick\"\n          catch:touchmove=\"noop\"\n        />\n      </van-overlay>\n    </van-popup>\n  </van-dialog>\n  <van-dialog>\n    <van-popup\n      customClass=\"van-dialog van-dialog--default custom-class\"\n      bind:after-leave=\"onAfterLeave\"\n      bind:close=\"onClickOverlay\"\n    >\n      <van-overlay\n        bind:click=\"onClickOverlay\"\n      >\n        <van-transition\n          customClass=\"van-overlay custom-class\"\n          bind:tap=\"onClick\"\n          catch:touchmove=\"noop\"\n        />\n      </van-overlay>\n    </van-popup>\n  </van-dialog>\n</main>\n`;\n"
  },
  {
    "path": "packages/dialog/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/divider/README.md",
    "content": "# Divider 分割线\n\n### 介绍\n\n用于将内容分隔为多个区域。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，默认为`ES6`版本，`ES5`引入方式参见[快速上手](#/quickstart)\n\n```json\n\"usingComponents\": {\n  \"van-divider\": \"@vant/weapp/divider/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)。\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-divider />\n```\n\n### 使用 hairline\n\n```html\n<van-divider hairline />\n```\n\n### 虚线\n\n```html\n<van-divider dashed />\n```\n\n### 文本位置\n\n```html\n<van-divider contentPosition=\"center\">文本</van-divider>\n<van-divider contentPosition=\"left\">文本</van-divider>\n<van-divider contentPosition=\"right\">文本</van-divider>\n```\n\n### 自定义属性\n\n```html\n<van-divider contentPosition=\"center\" textColor=\"#1989fa\">文本颜色</van-divider>\n<van-divider contentPosition=\"center\" borderColor=\"#1989fa\">\n  border 颜色\n</van-divider>\n<van-divider contentPosition=\"center\" fontSize=\"18\">字体大小</van-divider>\n```\n\n### 自定义样式\n\n```html\n<van-divider\n  contentPosition=\"center\"\n  customStyle=\"color: #1989fa; border-color: #1989fa; font-size: 18px;\"\n>\n  文本\n</van-divider>\n```\n\n## API\n\n### Props\n\n| 参数             | 说明                              | 类型      | 默认值 |\n| ---------------- | --------------------------------- | --------- | ------ |\n| dashed           | 虚线                              | _boolean_ | false  |\n| hairline         | 细线                              | _boolean_ | false  |\n| content-position | 文本位置，`left` `center` `right` | _string_  | -      |\n| custom-style     | 自定义样式                        | _string_  | -      |\n\n### Slot\n\n| 名称 | 说明           |\n| ---- | -------------- |\n| 默认 | 自定义文本内容 |\n"
  },
  {
    "path": "packages/divider/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-divider\": \"../../divider/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/divider/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {},\n});\n"
  },
  {
    "path": "packages/divider/demo/index.wxml",
    "content": "<demo-block custom-class=\"white\" title=\"基础用法\" padding>\n  <van-divider />\n</demo-block>\n\n<demo-block custom-class=\"white\" title=\"内容位置\" padding>\n  <van-divider content-position=\"center\">文本</van-divider>\n  <van-divider content-position=\"left\">文本</van-divider>\n  <van-divider content-position=\"right\">文本</van-divider>\n</demo-block>\n\n<demo-block custom-class=\"white\" title=\"虚线\" padding>\n  <van-divider dashed />\n</demo-block>\n\n<demo-block custom-class=\"white\" title=\"自定义样式\" padding>\n  <van-divider content-position=\"center\" custom-style=\"color: #1989fa;border-color: #1989fa;font-size: 18px;\">文本</van-divider>\n</demo-block>\n"
  },
  {
    "path": "packages/divider/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "packages/divider/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-divider {\n  display: flex;\n  align-items: center;\n  border-style: solid;\n  border-width: 0;\n  margin: var(--divider-margin, @divider-margin);\n  color: var(--divider-text-color, @divider-text-color);\n  font-size: var(--divider-font-size, @divider-font-size);\n  line-height: var(--divider-line-height, @divider-line-height);\n  border-color: var(--divider-border-color, @divider-border-color);\n\n  &::before,\n  &::after {\n    display: block;\n    flex: 1;\n    box-sizing: border-box;\n    height: 1px;\n    border-color: inherit;\n    border-style: inherit;\n    border-width: 1px 0 0;\n  }\n\n  &::before {\n    content: '';\n  }\n\n  &--hairline {\n    &::before,\n    &::after {\n      transform: scaleY(0.5);\n    }\n  }\n\n  &--dashed {\n    border-style: dashed;\n  }\n\n  &--center,\n  &--left,\n  &--right {\n    &::before {\n      margin-right: var(--divider-content-padding, @divider-content-padding);\n    }\n\n    &::after {\n      content: '';\n      margin-left: var(--divider-content-padding, @divider-content-padding);\n    }\n  }\n\n  &--left {\n    &::before {\n      max-width: var(--divider-content-left-width, @divider-content-left-width);\n    }\n  }\n\n  &--right {\n    &::after {\n      max-width: var(\n        --divider-content-right-width,\n        @divider-content-right-width\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "packages/divider/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    dashed: Boolean,\n    hairline: Boolean,\n    contentPosition: String,\n    fontSize: String,\n    borderColor: String,\n    textColor: String,\n    customStyle: String,\n  },\n});\n"
  },
  {
    "path": "packages/divider/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('divider', [{ dashed, hairline }, contentPosition]) }}\"\n  style=\"{{ computed.rootStyle({ borderColor, textColor, fontSize, customStyle }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/divider/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      'border-color': data.borderColor,\n      color: data.textColor,\n      'font-size': addUnit(data.fontSize),\n    },\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "packages/divider/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-divider>\n        <wx-view\n          class=\"custom-class van-divider\"\n          style=\"\"\n        />\n      </van-divider>\n    </wx-view>\n  </demo-block>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        内容位置\n      </wx-view>\n      <van-divider>\n        <wx-view\n          class=\"custom-class van-divider van-divider--center\"\n          style=\"\"\n        >\n          文本\n        </wx-view>\n      </van-divider>\n      <van-divider>\n        <wx-view\n          class=\"custom-class van-divider van-divider--left\"\n          style=\"\"\n        >\n          文本\n        </wx-view>\n      </van-divider>\n      <van-divider>\n        <wx-view\n          class=\"custom-class van-divider van-divider--right\"\n          style=\"\"\n        >\n          文本\n        </wx-view>\n      </van-divider>\n    </wx-view>\n  </demo-block>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        虚线\n      </wx-view>\n      <van-divider>\n        <wx-view\n          class=\"custom-class van-divider van-divider--dashed\"\n          style=\"\"\n        />\n      </van-divider>\n    </wx-view>\n  </demo-block>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义样式\n      </wx-view>\n      <van-divider>\n        <wx-view\n          class=\"custom-class van-divider van-divider--center\"\n          style=\";color: #1989fa;border-color: #1989fa;font-size: 18px;\"\n        >\n          文本\n        </wx-view>\n      </van-divider>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/divider/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/dropdown-item/dropdown-item.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ showWrapper }}\"\n  class=\"{{ utils.bem('dropdown-item', direction) }} custom-class\"\n  style=\"{{ wrapperStyle }}\"\n>\n  <van-popup\n    show=\"{{ showPopup }}\"\n    custom-style=\"position: absolute; {{ popupStyle }}\"\n    overlay-style=\"position: absolute;\"\n    overlay=\"{{ overlay }}\"\n    position=\"{{ direction === 'down' ? 'top' : 'bottom' }}\"\n    duration=\"{{ transition ? duration : 0 }}\"\n    safe-area-tab-bar=\"{{ safeAreaTabBar }}\"\n    close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n    bind:enter=\"onOpen\"\n    bind:leave=\"onClose\"\n    bind:close=\"toggle\"\n    bind:after-enter=\"onOpened\"\n    bind:after-leave=\"onClosed\"\n  >\n    <van-cell\n      wx:for=\"{{ options }}\"\n      wx:key=\"value\"\n      data-option=\"{{ item }}\"\n      class=\"{{ utils.bem('dropdown-item__option', { active: item.value === value } ) }}\"\n      clickable\n      icon=\"{{ item.icon }}\"\n      bind:tap=\"onOptionTap\"\n    >\n      <view\n        slot=\"title\"\n        class=\"van-dropdown-item__title item-title-class\"\n        style=\"{{ item.value === value  ? 'color:' + activeColor : '' }}\"\n      >\n        {{ item.text }}\n      </view>\n      <van-icon\n        wx:if=\"{{ item.value === value }}\"\n        name=\"success\"\n        class=\"van-dropdown-item__icon\"\n        color=\"{{ activeColor }}\"\n      />\n    </van-cell>\n\n    <slot />\n  </van-popup>\n</view>"
  },
  {
    "path": "packages/dropdown-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"van-cell\": \"../cell/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/dropdown-item/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-dropdown-item {\n  position: fixed;\n  right: 0;\n  left: 0;\n  overflow: hidden;\n\n  &__option {\n    text-align: left;\n\n    &--active {\n      .van-dropdown-item__title,\n      .van-dropdown-item__icon {\n        color: var(\n          --dropdown-menu-option-active-color,\n          @dropdown-menu-option-active-color\n        );\n      }\n    }\n  }\n\n  &--up {\n    top: 0;\n  }\n\n  &--down {\n    bottom: 0;\n  }\n\n  &__icon {\n    display: block;\n    line-height: inherit;\n  }\n}\n"
  },
  {
    "path": "packages/dropdown-item/index.ts",
    "content": "import { useParent } from '../common/relation';\nimport { VantComponent } from '../common/component';\nimport { Option } from './shared';\n\nVantComponent({\n  classes: ['item-title-class'],\n  field: true,\n\n  relation: useParent('dropdown-menu', function () {\n    this.updateDataFromParent();\n  }),\n\n  props: {\n    value: {\n      type: null,\n      observer: 'rerender',\n    },\n    title: {\n      type: String,\n      observer: 'rerender',\n    },\n    disabled: Boolean,\n    titleClass: {\n      type: String,\n      observer: 'rerender',\n    },\n    options: {\n      type: Array,\n      value: [],\n      observer: 'rerender',\n    },\n    popupStyle: String,\n    useBeforeToggle: {\n      type: Boolean,\n      value: false,\n    },\n    rootPortal: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  data: {\n    transition: true,\n    showPopup: false,\n    showWrapper: false,\n    displayTitle: '',\n    safeAreaTabBar: false,\n  },\n\n  methods: {\n    rerender() {\n      wx.nextTick(() => {\n        this.parent?.updateItemListData();\n      });\n    },\n\n    updateDataFromParent() {\n      if (this.parent) {\n        const {\n          overlay,\n          duration,\n          activeColor,\n          closeOnClickOverlay,\n          direction,\n          safeAreaTabBar,\n        } = this.parent.data;\n\n        this.setData({\n          overlay,\n          duration,\n          activeColor,\n          closeOnClickOverlay,\n          direction,\n          safeAreaTabBar,\n        });\n      }\n    },\n\n    onOpen() {\n      this.$emit('open');\n    },\n\n    onOpened() {\n      this.$emit('opened');\n    },\n\n    onClose() {\n      this.$emit('close');\n    },\n\n    onClosed() {\n      this.$emit('closed');\n      this.setData({ showWrapper: false });\n    },\n\n    onOptionTap(event: WechatMiniprogram.TouchEvent) {\n      const { option } = event.currentTarget.dataset;\n      const { value } = option as unknown as Option;\n\n      const shouldEmitChange = this.data.value !== value;\n      this.setData({ showPopup: false, value });\n      this.$emit('close');\n\n      this.rerender();\n\n      if (shouldEmitChange) {\n        this.$emit('change', value);\n      }\n    },\n\n    toggle(show?: boolean, options: { immediate?: boolean } = {}) {\n      const { showPopup } = this.data;\n\n      if (typeof show !== 'boolean') {\n        show = !showPopup;\n      }\n\n      if (show === showPopup) {\n        return;\n      }\n\n      this.onBeforeToggle(show).then((status) => {\n        if (!status) {\n          return;\n        }\n\n        this.setData({\n          transition: !options.immediate,\n          showPopup: show,\n        });\n\n        if (show) {\n          this.parent?.getChildWrapperStyle().then((wrapperStyle: string) => {\n            this.setData({ wrapperStyle, showWrapper: true });\n            this.rerender();\n          });\n        } else {\n          this.rerender();\n        }\n      });\n    },\n    onBeforeToggle(status: boolean): Promise<boolean> {\n      const { useBeforeToggle } = this.data;\n\n      if (!useBeforeToggle) {\n        return Promise.resolve(true);\n      }\n\n      return new Promise((resolve) => {\n        this.$emit('before-toggle', {\n          status,\n          callback: (value: boolean) => resolve(value),\n        });\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/dropdown-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<import src=\"./dropdown-item.wxml\" />\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./dropdown-item.wxml\" />\n</root-portal>\n\n<include wx:else src=\"./dropdown-item.wxml\" />"
  },
  {
    "path": "packages/dropdown-item/shared.ts",
    "content": "export interface Option {\n  text: string;\n  value: string | number;\n  icon: string;\n}\n"
  },
  {
    "path": "packages/dropdown-menu/README.md",
    "content": "# DropdownMenu 下拉菜单\n\n### 介绍\n\n向下弹出的菜单列表。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，默认为`ES6`版本，`ES5`引入方式参见[快速上手](#/quickstart)。\n\n```json\n\"usingComponents\": {\n  \"van-dropdown-menu\": \"@vant/weapp/dropdown-menu/index\",\n  \"van-dropdown-item\": \"@vant/weapp/dropdown-item/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-dropdown-menu>\n  <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" />\n  <van-dropdown-item value=\"{{ value2 }}\" options=\"{{ option2 }}\" />\n</van-dropdown-menu>\n```\n\n```js\nPage({\n  data: {\n    option1: [\n      { text: '全部商品', value: 0 },\n      { text: '新款商品', value: 1 },\n      { text: '活动商品', value: 2 },\n    ],\n    option2: [\n      { text: '默认排序', value: 'a' },\n      { text: '好评排序', value: 'b' },\n      { text: '销量排序', value: 'c' },\n    ],\n    value1: 0,\n    value2: 'a',\n  },\n});\n```\n\n### 自定义菜单内容\n\n```html\n<van-dropdown-menu>\n  <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" />\n  <van-dropdown-item id=\"item\" title=\"{{ itemTitle }}\">\n    <van-cell title=\"{{ switchTitle1 }}\">\n      <van-switch\n        slot=\"right-icon\"\n        size=\"24px\"\n        style=\"height: 26px\"\n        checked=\"{{ switch1 }}\"\n        active-color=\"#ee0a24\"\n        bind:change=\"onSwitch1Change\"\n      />\n    </van-cell>\n    <van-cell title=\"{{ switchTitle2 }}\">\n      <van-switch\n        slot=\"right-icon\"\n        size=\"24px\"\n        style=\"height: 26px\"\n        checked=\"{{ switch2 }}\"\n        active-color=\"#ee0a24\"\n        bind:change=\"onSwitch2Change\"\n      />\n    </van-cell>\n    <view style=\"padding: 5px 16px;\">\n      <van-button type=\"danger\" block round bind:click=\"onConfirm\">\n        确认\n      </van-button>\n    </view>\n  </van-dropdown-item>\n</van-dropdown-menu>\n```\n\n```js\nPage({\n  data: {\n    switchTitle1: '包邮',\n    switchTitle2: '团购',\n    itemTitle: '筛选',\n    option1: [\n      { text: '全部商品', value: 0 },\n      { text: '新款商品', value: 1 },\n      { text: '活动商品', value: 2 },\n    ],\n    value1: 0,\n  },\n\n  onConfirm() {\n    this.selectComponent('#item').toggle();\n  },\n\n  onSwitch1Change({ detail }) {\n    this.setData({ switch1: detail });\n  },\n\n  onSwitch2Change({ detail }) {\n    this.setData({ switch2: detail });\n  },\n});\n```\n\n### 自定义选中状态颜色\n\n```html\n<van-dropdown-menu active-color=\"#1989fa\">\n  <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" />\n  <van-dropdown-item value=\"{{ value2 }}\" options=\"{{ option2 }}\" />\n</van-dropdown-menu>\n```\n\n### 向上展开\n\n```html\n<van-dropdown-menu direction=\"up\">\n  <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" />\n  <van-dropdown-item value=\"{{ value2 }}\" options=\"{{ option2 }}\" />\n</van-dropdown-menu>\n```\n\n### 禁用菜单\n\n```html\n<van-dropdown-menu>\n  <van-dropdown-item value=\"{{ value1 }}\" disabled options=\"{{ option1 }}\" />\n  <van-dropdown-item value=\"{{ value2 }}\" disabled options=\"{{ option2 }}\" />\n</van-dropdown-menu>\n```\n\n### 异步打开/关闭\n\n通过 `before-toggle` 事件可以在下拉菜单打开或者关闭前执行特定的逻辑，实现状态变更前校验、异步打开/关闭的目的\n\n```html\n<van-dropdown-menu>\n  <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" use-before-toggle bind:before-toggle=\"onBeforeChange\" />\n</van-dropdown-menu>\n```\n\n```js\nPage({\n  data: {\n    value1: 0,\n     option1: [\n      { text: '全部商品', value: 0 },\n      { text: '新款商品', value: 1 },\n      { text: '活动商品', value: 2 },\n    ],\n  },\n  onBeforeChange({ detail: { status, callback }}) {\n    wx.showModal({\n      title: '异步打开/关闭',\n      content: `确定要${status ? '打开' : '关闭'}下拉菜单吗？`,\n      success: (res) => {\n        if (res.confirm) {\n          callback(true)\n        } else if (res.cancel) {\n          callback(false)\n        }\n      },\n    })\n  }\n});\n```\n\n## API\n\n### DropdownMenu Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| active-color | 菜单标题和选项的选中态颜色 | _string_ | `#ee0a24` |\n| z-index | 菜单栏 z-index 层级 | _number_ | `10` |\n| duration | 动画时长，单位毫秒 | _number_ | `200` |\n| direction | 菜单展开方向，可选值为 up | _string_ | `down` |\n| overlay | 是否显示遮罩层 | _boolean_ | `true` |\n| safe-area-tab-bar `v1.10.14`| 是否留出底部 tabbar 安全距离 | _boolean_ | `false` |\n| close-on-click-overlay | 是否在点击遮罩层后关闭菜单 | _boolean_ | `true` |\n| close-on-click-outside | 是否在点击外部 menu 后关闭菜单 | _boolean_ | `true` |\n\n### DropdownItem Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| value | 当前选中项对应的 value | _number \\| string_ | - |\n| title | 菜单项标题 | _string_ | 当前选中项文字 |\n| options | 选项数组 | _Option[]_ | `[]` |\n| disabled | 是否禁用菜单 | _boolean_ | `false` |\n| title-class | 标题额外类名，建议使用自定义样式 item-title-class 代替 | _string_ | - |\n| popup-style | 自定义弹出层样式 | _string_ | - |\n| use-before-toggle `v1.10.12` | 是否开启下拉菜单打开或者关闭前校验  | _boolean_ | `false` |\n| root-portal `v1.10.14` | 是否从页面子树中脱离出来，用于解决各种 fixed 失效问题，微信基础库 >= `2.25.2 `  | _boolean_ | `false` |\n\n### DropdownItem Events\n\n| 事件名 | 说明                          | 回调参数 |\n| ------ | ----------------------------- | -------- |\n| change | 点击选项导致 value 变化时触发 | value    |\n| open   | 打开菜单栏时触发              | -        |\n| close  | 关闭菜单栏时触发              | -        |\n| opened | 打开菜单栏且动画结束后触发    | -        |\n| closed | 关闭菜单栏且动画结束后触发    | -        |\n| before-toggle `v1.10.12` | 下拉菜单打开或者关闭前触发，需要将`use-before-toggle`属性设置为`true`    | `event.detail.status`: `true` 打开下拉菜单，`false` 关闭下拉菜单 <br>`event.detail.callback`: 回调函数，调用`callback(false)`终止下拉菜单状态变更        |\n\n### DropdownItem 方法\n\n通过 selectComponent(id) 可访问。\n\n| 方法名 | 说明 | 参数 | 返回值 |\n| --- | --- | --- | --- |\n| toggle | 切换菜单展示状态，传`true`为显示，`false`为隐藏，不传参为取反 | show?: boolean | - |\n\n### Option 数据结构\n\n| 键名  | 说明                             | 类型               |\n| ----- | -------------------------------- | ------------------ |\n| text  | 文字                             | _string_           |\n| value | 标识符                           | _number \\| string_ |\n| icon  | 左侧[图标名称](#/icon)或图片链接 | _string_           |\n\n### DropdownMenu 外部样式类\n\n| 类名                  | 说明         |\n| --------------------- | ------------ |\n| custom-class          | 根节点样式类 |\n| title-class `v1.10.7` | 选中项样式类 |\n\n### DropdownItem 外部样式类\n\n| 类名                       | 说明         |\n| -------------------------- | ------------ |\n| custom-class `v1.10.7`     | 根节点样式类 |\n| item-title-class `v1.10.7` | 选项样式类   |\n"
  },
  {
    "path": "packages/dropdown-menu/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-switch\": \"../../switch/index\",\n    \"van-button\": \"../../button/index\",\n    \"van-dropdown-item\": \"../../dropdown-item/index\",\n    \"van-dropdown-menu\": \"../../dropdown-menu/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/dropdown-menu/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    switchTitle1: '包邮',\n    switchTitle2: '团购',\n    itemTitle: '筛选',\n    option1: [\n      { text: '全部商品', value: 0 },\n      { text: '新款商品', value: 1 },\n      { text: '活动商品', value: 2 },\n    ],\n    option2: [\n      { text: '默认排序', value: 'a' },\n      { text: '好评排序', value: 'b' },\n      { text: '销量排序', value: 'c' },\n    ],\n    switch1: true,\n    switch2: false,\n    value1: 0,\n    value2: 'a',\n  },\n\n  methods: {\n    onConfirm() {\n      this.selectComponent('#item').toggle();\n    },\n\n    onSwitch1Change({ detail }) {\n      this.setData({ switch1: detail });\n    },\n\n    onSwitch2Change({ detail }) {\n      this.setData({ switch2: detail });\n    },\n    onBeforeChange({ detail: { status, callback } }) {\n      wx.showModal({\n        title: '异步打开/关闭',\n        content: `确定要${status ? '打开' : '关闭'}下拉菜单吗？`,\n        success: (res) => {\n          if (res.confirm) {\n            callback(true);\n          } else if (res.cancel) {\n            callback(false);\n          }\n        },\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/dropdown-menu/demo/index.wxml",
    "content": "<demo-block custom-class=\"white\" title=\"基础用法\">\n  <van-dropdown-menu>\n    <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" />\n    <van-dropdown-item value=\"{{ value2 }}\" options=\"{{ option2 }}\" />\n  </van-dropdown-menu>\n</demo-block>\n\n<demo-block custom-class=\"white\" title=\"自定义菜单内容\">\n  <van-dropdown-menu>\n    <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" />\n    <van-dropdown-item id=\"item\" title=\"{{ itemTitle }}\">\n      <van-cell title=\"{{ switchTitle1 }}\">\n        <van-switch\n          slot=\"right-icon\"\n          size=\"24px\"\n          style=\"height: 26px\"\n          checked=\"{{ switch1 }}\"\n          active-color=\"#ee0a24\"\n          bind:change=\"onSwitch1Change\"\n        />\n      </van-cell>\n      <van-cell title=\"{{ switchTitle2 }}\">\n        <van-switch\n          slot=\"right-icon\"\n          size=\"24px\"\n          style=\"height: 26px\"\n          checked=\"{{ switch2 }}\"\n          active-color=\"#ee0a24\"\n          bind:change=\"onSwitch2Change\"\n        />\n      </van-cell>\n      <view style=\"padding: 5px 16px;\">\n        <van-button type=\"danger\" block round bind:click=\"onConfirm\">\n          确认\n        </van-button>\n      </view>\n    </van-dropdown-item>\n  </van-dropdown-menu>\n</demo-block>\n\n<demo-block custom-class=\"white\" title=\"自定义选中状态颜色\">\n  <van-dropdown-menu active-color=\"#1989fa\">\n    <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" />\n    <van-dropdown-item value=\"{{ value2 }}\" options=\"{{ option2 }}\" />\n  </van-dropdown-menu>\n</demo-block>\n\n<demo-block custom-class=\"white\" title=\"向上展开\">\n  <van-dropdown-menu direction=\"up\">\n    <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" />\n    <van-dropdown-item value=\"{{ value2 }}\" options=\"{{ option2 }}\" />\n  </van-dropdown-menu>\n</demo-block>\n\n<demo-block custom-class=\"white\" title=\"禁用菜单\">\n  <van-dropdown-menu>\n    <van-dropdown-item value=\"{{ value1 }}\" disabled options=\"{{ option1 }}\" />\n    <van-dropdown-item value=\"{{ value2 }}\" disabled options=\"{{ option2 }}\" />\n  </van-dropdown-menu>\n</demo-block>\n\n<demo-block custom-class=\"white\" title=\"异步打开/关闭\">\n  <van-dropdown-menu>\n    <van-dropdown-item value=\"{{ value1 }}\" options=\"{{ option1 }}\" use-before-toggle bind:before-toggle=\"onBeforeChange\" />\n  </van-dropdown-menu>\n</demo-block>\n\n"
  },
  {
    "path": "packages/dropdown-menu/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/dropdown-menu/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-dropdown-menu {\n  display: flex;\n  box-shadow: var(--dropdown-menu-box-shadow, @dropdown-menu-box-shadow);\n  user-select: none;\n  height: var(--dropdown-menu-height, @dropdown-menu-height);\n  background-color: var(\n    --dropdown-menu-background-color,\n    @dropdown-menu-background-color\n  );\n\n  &__item {\n    display: flex;\n    flex: 1;\n    align-items: center;\n    justify-content: center;\n    min-width: 0; // hack for flex ellipsis\n\n    &:active {\n      opacity: 0.7;\n    }\n\n    &--disabled {\n      &:active {\n        opacity: 1;\n      }\n\n      .van-dropdown-menu__title {\n        color: var(\n          --dropdown-menu-title-disabled-text-color,\n          @dropdown-menu-title-disabled-text-color\n        );\n      }\n    }\n  }\n\n  &__title {\n    position: relative;\n    box-sizing: border-box;\n    max-width: 100%;\n    padding: var(--dropdown-menu-title-padding, @dropdown-menu-title-padding);\n    color: var(\n      --dropdown-menu-title-text-color,\n      @dropdown-menu-title-text-color\n    );\n    font-size: var(\n      --dropdown-menu-title-font-size,\n      @dropdown-menu-title-font-size\n    );\n    line-height: var(\n      --dropdown-menu-title-line-height,\n      @dropdown-menu-title-line-height\n    );\n\n    &::after {\n      position: absolute;\n      top: 50%;\n      right: 11px;\n      margin-top: -5px;\n      border: 3px solid;\n      border-color: transparent transparent currentColor currentColor;\n      transform: rotate(-45deg);\n      opacity: 0.8;\n      content: '';\n    }\n\n    &--active {\n      color: var(\n        --dropdown-menu-title-active-text-color,\n        @dropdown-menu-title-active-text-color\n      );\n    }\n\n    &--down {\n      &::after {\n        margin-top: -1px;\n        transform: rotate(135deg);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/dropdown-menu/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nimport { addUnit, getRect, getSystemInfoSync } from '../common/utils';\n\nlet ARRAY: WechatMiniprogram.Component.TrivialInstance[] = [];\n\nVantComponent({\n  field: true,\n  classes: ['title-class'],\n\n  relation: useChildren('dropdown-item', function () {\n    this.updateItemListData();\n  }),\n\n  props: {\n    activeColor: {\n      type: String,\n      observer: 'updateChildrenData',\n    },\n    overlay: {\n      type: Boolean,\n      value: true,\n      observer: 'updateChildrenData',\n    },\n    zIndex: {\n      type: Number,\n      value: 10,\n    },\n    duration: {\n      type: Number,\n      value: 200,\n      observer: 'updateChildrenData',\n    },\n    direction: {\n      type: String,\n      value: 'down',\n      observer: 'updateChildrenData',\n    },\n    safeAreaTabBar: {\n      type: Boolean,\n      value: false,\n    },\n    closeOnClickOverlay: {\n      type: Boolean,\n      value: true,\n      observer: 'updateChildrenData',\n    },\n    closeOnClickOutside: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  data: {\n    itemListData: [] as Record<string, unknown>[],\n  },\n\n  beforeCreate() {\n    const { windowHeight } = getSystemInfoSync();\n    this.windowHeight = windowHeight;\n    ARRAY.push(this);\n  },\n\n  destroyed() {\n    ARRAY = ARRAY.filter((item) => item !== this);\n  },\n\n  methods: {\n    updateItemListData() {\n      this.setData({\n        itemListData: this.children.map((child) => child.data),\n      });\n    },\n\n    updateChildrenData() {\n      this.children.forEach((child) => {\n        child.updateDataFromParent();\n      });\n    },\n\n    toggleItem(active: number) {\n      this.children.forEach((item, index) => {\n        const { showPopup } = item.data;\n        if (index === active) {\n          item.toggle();\n        } else if (showPopup) {\n          item.toggle(false, { immediate: true });\n        }\n      });\n    },\n\n    close() {\n      this.children.forEach((child) => {\n        child.toggle(false, { immediate: true });\n      });\n    },\n\n    getChildWrapperStyle() {\n      const { zIndex, direction } = this.data;\n\n      return getRect(this, '.van-dropdown-menu').then((rect) => {\n        const { top = 0, bottom = 0 } = rect;\n        const offset = direction === 'down' ? bottom : this.windowHeight - top;\n\n        let wrapperStyle = `z-index: ${zIndex};`;\n\n        if (direction === 'down') {\n          wrapperStyle += `top: ${addUnit(offset)};`;\n        } else {\n          wrapperStyle += `bottom: ${addUnit(offset)};`;\n        }\n\n        return wrapperStyle;\n      });\n    },\n\n    onTitleTap(event: WechatMiniprogram.TouchEvent) {\n      const { index } = event.currentTarget.dataset;\n      const child = this.children[index];\n\n      if (!child.data.disabled) {\n        ARRAY.forEach((menuItem) => {\n          if (\n            menuItem &&\n            menuItem.data.closeOnClickOutside &&\n            menuItem !== this\n          ) {\n            menuItem.close();\n          }\n        });\n\n        this.toggleItem(index);\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/dropdown-menu/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\">\n  <view\n    wx:for=\"{{ itemListData }}\"\n    wx:key=\"index\"\n    data-index=\"{{ index }}\"\n    class=\"{{ utils.bem('dropdown-menu__item', { disabled: item.disabled }) }}\"\n    bind:tap=\"onTitleTap\"\n  >\n    <view\n      class=\"{{ item.titleClass }} {{ utils.bem('dropdown-menu__title', { active: item.showPopup, down: item.showPopup === (direction === 'down') }) }} title-class\"\n      style=\"{{ item.showPopup ? 'color:' + activeColor : '' }}\"\n    >\n      <view class=\"van-ellipsis\">\n        {{ computed.displayTitle(item) }}\n      </view>\n    </view>\n  </view>\n\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/dropdown-menu/index.wxs",
    "content": "/* eslint-disable */\nfunction displayTitle(item) {\n  if (item.title) {\n    return item.title;\n  }\n\n  var match = item.options.filter(function(option) {\n    return option.value === item.value;\n  });\n  var displayTitle = match.length ? match[0].text : '';\n  return displayTitle;\n}\n\nmodule.exports = {\n  displayTitle: displayTitle\n};\n"
  },
  {
    "path": "packages/dropdown-menu/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-dropdown-menu>\n        <wx-view\n          class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\"\n        >\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{0}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        全部商品\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{1}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        默认排序\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <van-dropdown-item />\n          <van-dropdown-item />\n        </wx-view>\n      </van-dropdown-menu>\n    </wx-view>\n  </demo-block>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义菜单内容\n      </wx-view>\n      <van-dropdown-menu>\n        <wx-view\n          class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\"\n        >\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{0}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        全部商品\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{1}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        筛选\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <van-dropdown-item />\n          <van-dropdown-item\n            id=\"item\"\n          />\n        </wx-view>\n      </van-dropdown-menu>\n    </wx-view>\n  </demo-block>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义选中状态颜色\n      </wx-view>\n      <van-dropdown-menu>\n        <wx-view\n          class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\"\n        >\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{0}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        全部商品\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{1}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        默认排序\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <van-dropdown-item />\n          <van-dropdown-item />\n        </wx-view>\n      </van-dropdown-menu>\n    </wx-view>\n  </demo-block>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        向上展开\n      </wx-view>\n      <van-dropdown-menu>\n        <wx-view\n          class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\"\n        >\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{0}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title van-dropdown-menu__title--down title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        全部商品\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{1}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title van-dropdown-menu__title--down title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        默认排序\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <van-dropdown-item />\n          <van-dropdown-item />\n        </wx-view>\n      </van-dropdown-menu>\n    </wx-view>\n  </demo-block>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用菜单\n      </wx-view>\n      <van-dropdown-menu>\n        <wx-view\n          class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\"\n        >\n          <wx-view\n            class=\"van-dropdown-menu__item van-dropdown-menu__item--disabled\"\n            data-index=\"{{0}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        全部商品\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-dropdown-menu__item van-dropdown-menu__item--disabled\"\n            data-index=\"{{1}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        默认排序\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <van-dropdown-item />\n          <van-dropdown-item />\n        </wx-view>\n      </van-dropdown-menu>\n    </wx-view>\n  </demo-block>\n  <demo-block\n    customClass=\"white\"\n  >\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        异步打开/关闭\n      </wx-view>\n      <van-dropdown-menu>\n        <wx-view\n          class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\"\n        >\n          <wx-view\n            class=\"van-dropdown-menu__item\"\n            data-index=\"{{0}}\"\n            bind:tap=\"onTitleTap\"\n          >\n            <wx-view\n              class=\" van-dropdown-menu__title title-class\"\n              style=\"\"\n            >\n              <wx-view\n                class=\"van-ellipsis\"\n              >\n                \n        全部商品\n      \n              </wx-view>\n            </wx-view>\n          </wx-view>\n          <van-dropdown-item\n            bind:before-toggle=\"onBeforeChange\"\n          />\n        </wx-view>\n      </van-dropdown-menu>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/dropdown-menu/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/empty/README.md",
    "content": "# Empty 空状态\n\n### 介绍\n\n空状态时的占位提示。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，默认为`ES6`版本，`ES5`引入方式参见[快速上手](#/quickstart)。\n\n```json\n\"usingComponents\": {\n  \"van-empty\": \"@vant/weapp/empty/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-empty description=\"描述文字\" />\n```\n\n### 图片类型\n\nEmpty 组件内置了多种占位图片类型，可以在不同业务场景下使用。\n\n```html\n<!-- 通用错误 -->\n<van-empty image=\"error\" description=\"描述文字\" />\n<!-- 网络错误 -->\n<van-empty image=\"network\" description=\"描述文字\" />\n<!-- 搜索提示 -->\n<van-empty image=\"search\" description=\"描述文字\" />\n```\n\n### 自定义图片\n\n需要自定义图片时，可以在 image 属性中传入任意图片 URL。\n\n```html\n<van-empty\n  class=\"custom-image\"\n  image=\"https://img.yzcdn.cn/vant/custom-empty-image.png\"\n  description=\"描述文字\"\n/>\n```\n\n### 底部内容\n\n通过默认插槽可以在 Empty 组件的下方插入内容。\n\n```html\n<van-empty description=\"描述文字\">\n  <van-button round type=\"danger\" class=\"bottom-button\">按钮</van-button>\n</van-empty>\n\n<style>\n  .bottom-button {\n    width: 160px;\n    height: 40px;\n  }\n</style>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| image | 图片类型，可选值为 `error` `network` `search`，支持传入图片 URL | _string_ | `default` |\n| description | 图片下方的描述文字 | _string_ | - |\n\n### Slots\n\n| 名称        | 说明           |\n| ----------- | -------------- |\n| -           | 自定义底部内容 |\n| image       | 自定义图标     |\n| description | 自定义描述文字 |\n"
  },
  {
    "path": "packages/empty/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tab\": \"../../tab/index\",\n    \"van-tabs\": \"../../tabs/index\",\n    \"van-empty\": \"../../empty/index\",\n    \"van-button\": \"../../button/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/empty/demo/index.less",
    "content": ".custom-image .van-empty__image {\n  width: 90px;\n  height: 90px;\n}\n\n.bottom-button {\n  width: 160px;\n  height: 40px;\n}\n"
  },
  {
    "path": "packages/empty/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    activeTab: 0,\n  },\n\n  methods: {\n    onChange(event) {\n      this.setData({\n        activeTab: event.detail.name,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/empty/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n    <van-empty description=\"描述文字\" />\n</demo-block>\n\n<demo-block title=\"图片类型\">\n  <van-tabs\n    active=\"{{ activeTab }}\"\n    bind:change=\"onChange\"\n  >\n    <van-tab title=\"通用错误\">\n      <van-empty image=\"error\" description=\"描述文字\" />\n    </van-tab>\n    <van-tab title=\"网络错误\">\n      <van-empty image=\"network\" description=\"描述文字\" />\n    </van-tab>\n    <van-tab title=\"搜索提示\">\n      <van-empty image=\"search\" description=\"描述文字\" />\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"自定义图片\" padding>\n  <van-empty\n    custom-class=\"custom-image\"\n    image=\"https://img.yzcdn.cn/vant/custom-empty-image.png\"\n    description=\"描述文字\"\n  />\n</demo-block>\n\n<demo-block title=\"底部内容\" padding>\n  <van-empty description=\"描述文字\">\n    <van-button round type=\"danger\" custom-class=\"bottom-button\">\n      按钮\n    </van-button>\n  </van-empty>\n</demo-block>\n"
  },
  {
    "path": "packages/empty/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "packages/empty/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-empty {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  box-sizing: border-box;\n  padding: @empty-padding;\n\n  &__image {\n    width: @empty-image-size;\n    height: @empty-image-size;\n\n    &:empty {\n      display: none;\n    }\n\n    &__img {\n      width: 100%;\n      height: 100%;\n    }\n  }\n\n  &__image:not(:empty) + &__image {\n    display: none;\n  }\n\n  &__description {\n    margin-top: @empty-description-margin-top;\n    padding: @empty-description-padding;\n    color: @empty-description-color;\n    font-size: @empty-description-font-size;\n    line-height: @empty-description-line-height;\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &__description:not(:empty) + &__description {\n    display: none;\n  }\n\n  &__bottom {\n    margin-top: @empty-bottom-margin-top;\n  }\n}\n"
  },
  {
    "path": "packages/empty/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    description: String,\n    image: {\n      type: String,\n      value: 'default',\n    },\n  },\n});\n"
  },
  {
    "path": "packages/empty/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class van-empty\">\n  <view class=\"van-empty__image\">\n    <slot name=\"image\"></slot>\n  </view>\n  <view class=\"van-empty__image\">\n    <image wx:if=\"{{ image }}\" class=\"van-empty__image__img\" src=\"{{ computed.imageUrl(image) }}\" />\n  </view>\n\n  <view class=\"van-empty__description\">\n    <slot name=\"description\"></slot>\n  </view>\n  <view class=\"van-empty__description\">\n    {{ description }}\n  </view>\n\n  <view class=\"van-empty__bottom\">\n    <slot></slot>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/empty/index.wxs",
    "content": "/* eslint-disable */\nvar PRESETS = ['error', 'search', 'default', 'network'];\n\nfunction imageUrl(image) {\n  if (PRESETS.indexOf(image) !== -1) {\n    return 'https://img.yzcdn.cn/vant/empty-image-' + image + '.png';\n  }\n\n  return image;\n}\n\nmodule.exports = {\n  imageUrl: imageUrl,\n};\n\n"
  },
  {
    "path": "packages/empty/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-empty>\n        <wx-view\n          class=\"custom-class van-empty\"\n        >\n          <wx-view\n            class=\"van-empty__image\"\n          />\n          <wx-view\n            class=\"van-empty__image\"\n          >\n            <wx-image\n              class=\"van-empty__image__img\"\n              src=\"https://img.yzcdn.cn/vant/empty-image-default.png\"\n            />\n          </wx-view>\n          <wx-view\n            class=\"van-empty__description\"\n          />\n          <wx-view\n            class=\"van-empty__description\"\n          >\n            \n    描述文字\n  \n          </wx-view>\n          <wx-view\n            class=\"van-empty__bottom\"\n          />\n        </wx-view>\n      </van-empty>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        图片类型\n      </wx-view>\n      <van-tabs\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              通用错误\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              网络错误\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              搜索提示\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <van-empty>\n                    <wx-view\n                      class=\"custom-class van-empty\"\n                    >\n                      <wx-view\n                        class=\"van-empty__image\"\n                      />\n                      <wx-view\n                        class=\"van-empty__image\"\n                      >\n                        <wx-image\n                          class=\"van-empty__image__img\"\n                          src=\"https://img.yzcdn.cn/vant/empty-image-error.png\"\n                        />\n                      </wx-view>\n                      <wx-view\n                        class=\"van-empty__description\"\n                      />\n                      <wx-view\n                        class=\"van-empty__description\"\n                      >\n                        \n    描述文字\n  \n                      </wx-view>\n                      <wx-view\n                        class=\"van-empty__bottom\"\n                      />\n                    </wx-view>\n                  </van-empty>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义图片\n      </wx-view>\n      <van-empty\n        customClass=\"custom-image\"\n      >\n        <wx-view\n          class=\"custom-class van-empty\"\n        >\n          <wx-view\n            class=\"van-empty__image\"\n          />\n          <wx-view\n            class=\"van-empty__image\"\n          >\n            <wx-image\n              class=\"van-empty__image__img\"\n              src=\"https://img.yzcdn.cn/vant/custom-empty-image.png\"\n            />\n          </wx-view>\n          <wx-view\n            class=\"van-empty__description\"\n          />\n          <wx-view\n            class=\"van-empty__description\"\n          >\n            \n    描述文字\n  \n          </wx-view>\n          <wx-view\n            class=\"van-empty__bottom\"\n          />\n        </wx-view>\n      </van-empty>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        底部内容\n      </wx-view>\n      <van-empty>\n        <wx-view\n          class=\"custom-class van-empty\"\n        >\n          <wx-view\n            class=\"van-empty__image\"\n          />\n          <wx-view\n            class=\"van-empty__image\"\n          >\n            <wx-image\n              class=\"van-empty__image__img\"\n              src=\"https://img.yzcdn.cn/vant/empty-image-default.png\"\n            />\n          </wx-view>\n          <wx-view\n            class=\"van-empty__description\"\n          />\n          <wx-view\n            class=\"van-empty__description\"\n          >\n            \n    描述文字\n  \n          </wx-view>\n          <wx-view\n            class=\"van-empty__bottom\"\n          >\n            <van-button\n              customClass=\"bottom-button\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal van-button--round \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n      按钮\n    \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </wx-view>\n        </wx-view>\n      </van-empty>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/empty/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/field/README.md",
    "content": "# Field 输入框\n\n### 介绍\n\n用户可以在文本框内输入或编辑文字。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-field\": \"@vant/weapp/field/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-cell-group>\n  <van-field\n    value=\"{{ value }}\"\n    placeholder=\"请输入用户名\"\n    border=\"{{ false }}\"\n    bind:change=\"onChange\"\n  />\n</van-cell-group>\n```\n\n```js\nPage({\n  data: {\n    value: '',\n  },\n\n  onChange(event) {\n    // event.detail 为当前输入的值\n    console.log(event.detail);\n  },\n});\n```\n\n### 双向绑定\n\n最低基础库版本在 2.9.3 以上时，可以使用[简易双向绑定](https://developers.weixin.qq.com/miniprogram/dev/framework/view/two-way-bindings.html)。\n\n```html\n<van-cell-group>\n  <van-field\n    model:value=\"{{ value }}\"\n    placeholder=\"请输入用户名\"\n    border=\"{{ false }}\"\n  />\n</van-cell-group>\n```\n\n```js\nPage({\n  data: {\n    value: '',\n  },\n});\n```\n\n### 自定义类型\n\n根据`type`属性定义不同类型的输入框。\n\n```html\n<van-cell-group>\n  <van-field\n    value=\"{{ username }}\"\n    required\n    clearable\n    label=\"用户名\"\n    icon=\"question-o\"\n    placeholder=\"请输入用户名\"\n    bind:click-icon=\"onClickIcon\"\n  />\n\n  <van-field\n    value=\"{{ password }}\"\n    type=\"password\"\n    label=\"密码\"\n    placeholder=\"请输入密码\"\n    required\n    border=\"{{ false }}\"\n  />\n</van-cell-group>\n```\n\n### 禁用输入框\n\n```html\n<van-cell-group>\n  <van-field\n    value=\"输入框已禁用\"\n    label=\"用户名\"\n    left-icon=\"contact\"\n    disabled\n    border=\"{{ false }}\"\n  />\n</van-cell-group>\n```\n\n### 错误提示\n\n通过`error`或者`error-message`属性增加对应的错误提示。\n\n```html\n<van-cell-group>\n  <van-field\n    value=\"{{ username }}\"\n    label=\"用户名\"\n    placeholder=\"请输入用户名\"\n    error\n  />\n  <van-field\n    value=\"{{ phone }}\"\n    label=\"手机号\"\n    placeholder=\"请输入手机号\"\n    error-message=\"手机号格式错误\"\n    border=\"{{ false }}\"\n  />\n</van-cell-group>\n```\n\n### 内容对齐方式\n\n可以通过`input-align`属性设置内容的对齐方式。\n\n```html\n<van-cell-group>\n  <van-field\n    value=\"{{ username3 }}\"\n    label=\"用户名\"\n    placeholder=\"请输入用户名\"\n    input-align=\"right\"\n  />\n</van-cell-group>\n```\n\n### 高度自适应\n\n对于 textarea，可以通过`autosize`属性设置高度自适应。\n\n```html\n<van-cell-group>\n  <van-field\n    value=\"{{ message }}\"\n    label=\"留言\"\n    type=\"textarea\"\n    placeholder=\"请输入留言\"\n    autosize\n    border=\"{{ false }}\"\n  />\n</van-cell-group>\n```\n\n### 插入按钮\n\n通过 button slot 可以在输入框尾部插入按钮。\n\n```html\n<van-cell-group>\n  <van-field\n    value=\"{{ sms }}\"\n    center\n    clearable\n    label=\"短信验证码\"\n    placeholder=\"请输入短信验证码\"\n    border=\"{{ false }}\"\n    use-button-slot\n  >\n    <van-button slot=\"button\" size=\"small\" type=\"primary\">\n      发送验证码\n    </van-button>\n  </van-field>\n</van-cell-group>\n```\n\n### 替换输入框值\n\n在微信小程序中，bind:input 事件可以通过返回字符串或者一个对象来替换输入框的值以及调整光标的位置，在 vant-weapp 中，可以通过调用 change 或 input 参数中的 callback 函数，传入参数来实现\n\n```html\n<van-field\n  value=\"{{ value }}\"\n  placeholder=\"请输入用户名\"\n  border=\"{{ false }}\"\n  clearable\n  extra-event-params\n  bind:change=\"onChange\"\n/>\n```\n\n```js\nPage({\n  data: {\n    value: '',\n  },\n  onChange(e) {\n    const { value, callback } = e.detail;\n\n    callback({\n      value: value + 1,\n      cursor: 0,\n    });\n  },\n});\n```\n\n## 常见问题\n\n### 真机上为什么会出现聚焦时 placeholder 加粗、闪烁的现象？\n\n由于微信小程序的 input 组件和 textarea 组件是原生组件，聚焦时会将原生的输入框覆盖在对应位置上，导致了这个现象的产生。\n\n相关的讨论可以查看[微信开放社区](https://developers.weixin.qq.com/community/search?query=placeholder%20%E9%97%AA%E7%83%81%20%E5%8A%A0%E7%B2%97)。\n\n### 真机上 placeholder 为什么会盖过 popup 等其它组件？\n\n由于微信小程序的 input 组件和 textarea 组件是原生组件，遵循原生组件的限制，详情可以查看[原生组件说明](https://developers.weixin.qq.com/miniprogram/dev/component/native-component.html)。\n\n### textarea 的 placeholder 在真机上为什么会偏移？\n\n微信小程序的 textarea 组件在 Android 和 iOS 中默认样式不同，在 iOS 中会有默认的 `padding`，且无法置 0。\n\n同时 `placeholder-style` 对 `vertical-align`、`line-height` 等大量 css 属性都不生效。\n\n这一系列的问题导致了 placeholder 在真机上可能会出现偏移。\n\n微信已经在 `2.10.0` 基础库版本后支持移除默认的 `padding`，但低版本仍有问题。详情可以查看 [微信开放社区](https://developers.weixin.qq.com/community/develop/issue/96)。\n\n### 手写输入法为什么会丢失部分字符 / 手写输入法为什么不会触发 input 事件？\n\n这是微信小程序的 input 组件本身的问题，如果需要兼容手写输入法的场景，可以在 `blur` 事件中取到输入的值。\n\n相关的讨论可以查看[微信开放社区](https://developers.weixin.qq.com/community/search?query=input%20%E6%89%8B%E5%86%99%E8%BE%93%E5%85%A5&page=1&block=1&random=1567079239098)。\n\n### 如何扩大点击区域？点击 label、错误信息 都能聚焦唤起键盘呢？\n\n升级至 1.10.21 版本及以上，配置 `name` 属性即可\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 在表单内提交时的标识符。可以通过配置 `name` 来扩大点击区域 | _string_ | - |\n| label | 输入框左侧文本 | _string_ | - |\n| size | 单元格大小，可选值为 `large` | _string_ | - |\n| value | 当前输入的值 | _string \\| number_ | - |\n| type | 可设置为任意原生类型, 如 `number` `idcard` `textarea` `digit` `nickname` | _string_ | `text` |\n| fixed | 如果 type 为 `textarea` 且在一个 `position:fixed` 的区域，需要显示指定属性 fixed 为 true | _boolean_ | `false` |\n| focus | 获取焦点 | _boolean_ | `false` |\n| border | 是否显示内边框 | _boolean_ | `true` |\n| disabled | 是否禁用输入框 | _boolean_ | `false` |\n| readonly | 是否只读 | _boolean_ | `false` |\n| clearable | 是否启用清除控件 | _boolean_ | `false` |\n| clickable | 是否开启点击反馈 | _boolean_ | `false` |\n| required | 是否显示表单必填星号 | _boolean_ | `false` |\n| center | 是否使内容垂直居中 | _boolean_ | `false` |\n| password | 是否是密码类型 | _boolean_ | `false` |\n| title-width | 标题宽度 | _string_ | `6.2em` |\n| maxlength | 最大输入长度，设置为 -1 的时候不限制最大长度 | _number_ | `-1` |\n| placeholder | 输入框为空时占位符 | _string_ | - |\n| placeholder-style | 指定 placeholder 的样式 | _string_ | - |\n| custom-style | 自定义样式 | _string_ | - |\n| is-link | 是否展示右侧箭头并开启点击反馈 | _boolean_ | `false` |\n| arrow-direction | 箭头方向，可选值为 `left` `up` `down` | _string_ | - |\n| show-word-limit | 是否显示字数统计，需要设置`maxlength`属性 | _boolean_ | `false` |\n| error | 是否将输入内容标红 | _boolean_ | `false` |\n| error-message | 底部错误提示文案，为空时不展示 | _string_ | `''` |\n| error-message-align | 底部错误提示文案对齐方式，可选值为 `center` `right` | _string_ | `''` |\n| input-align | 输入框内容对齐方式，可选值为 `center` `right` | _string_ | `left` |\n| autosize | 是否自适应内容高度，只对 textarea 有效，<br>可传入对象,如 { maxHeight: 100, minHeight: 50 }，<br>单位为`px` | _boolean \\| object_ | `false` |\n| left-icon | 左侧图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | - |\n| right-icon | 右侧图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | - |\n| confirm-type | 设置键盘右下角按钮的文字，仅在 type='text' 时生效 | _string_ | `done` |\n| confirm-hold | 点击键盘右下角按钮时是否保持键盘不收起，在 type='textarea' 时无效 | _boolean_ | `false` |\n| hold-keyboard | focus 时，点击页面的时候不收起键盘 | _boolean_ | `false` |\n| cursor-spacing | 输入框聚焦时底部与键盘的距离 | _number_ | `50` |\n| adjust-position | 键盘弹起时，是否自动上推页面 | _boolean_ | `true` |\n| show-confirm-bar | 是否显示键盘上方带有”完成“按钮那一栏，只对 textarea 有效 | _boolean_ | `true` |\n| selection-start | 光标起始位置，自动聚集时有效，需与 selection-end 搭配使用 | _number_ | `-1` |\n| selection-end | 光标结束位置，自动聚集时有效，需与 selection-start 搭配使用 | _number_ | `-1` |\n| auto-focus | 自动聚焦，拉起键盘 | _boolean_ | `false` |\n| disable-default-padding | 是否去掉 iOS 下的默认内边距，只对 textarea 有效 | _boolean_ | `true` |\n| cursor | 指定 focus 时的光标位置 | _number_ | `-1` |\n| clear-trigger `v1.8.4` | 显示清除图标的时机，`always` 表示输入框不为空时展示，<br>`focus` 表示输入框聚焦且不为空时展示 | _string_ | `focus` |\n| always-embed `v1.9.2` | 强制 input 处于同层状态，默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) | _boolean_ | `false` |\n| extra-event-params `v1.10.12` | 开启事件增强模式，会在 input 和 change 事件额外提供 `cursor` 和 `keyCode` 参数，计划在下一个大版本作为默认行为 | _boolean_ | `false` |\n\n### Events\n\n| 事件 | 说明 | 回调参数 |\n| --- | --- | --- |\n| bind:input | 输入内容时触发 | event.detail: 当前输入值; 在 extra-event-params 为 `true` 时为 [InputDetail](#/field#inputdetail) |\n| bind:change | 输入内容时触发 | event.detail: 当前输入值; 在 extra-event-params 为 `true` 时为 [InputDetail](#/field#inputdetail) |\n| bind:confirm | 点击完成按钮时触发 | event.detail: 当前输入值 |\n| bind:click-icon | 点击尾部图标时触发 | - |\n| bind:focus | 输入框聚焦时触发 | event.detail.value: 当前输入值; <br>event.detail.height: 键盘高度 |\n| bind:blur | 输入框失焦时触发 | event.detail.value: 当前输入值; <br>event.detail.cursor: 游标位置(如果 `type` 不为 `textarea`，值为 `0`) |\n| bind:clear | 点击清空控件时触发 | - |\n| bind:click-input | 点击输入区域时触发 | - |\n| bind:linechange | 输入框行数变化时调用，只对 textarea 有效 | event.detail = { height: 0, heightRpx: 0, lineCount: 0 } |\n| bind:keyboardheightchange | 键盘高度发生变化的时候触发此事件 | event.detail = { height: height, duration: duration } |\n| bind:nicknamereview `v1.11.5` | 用户昵称审核完毕后触发，仅在 type 为 \"nickname\" 时有效 | event.detail = { pass, timeout } |\n\n### InputDetail\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| value | 当前输入值 | _string_ | - |\n| cursor | 光标位置 | _number_ | - |\n| keyCode | 键值 | _number_ | - |\n| callback | 调用该函数传 `{ value: string, cursor: number }` 来替换输入框的内容，具体用法可以参考 [wx-input](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) | _function_ | - |\n\n### Slot\n\n| 名称       | 说明                                                       |\n| ---------- | ---------------------------------------------------------- |\n| label      | 自定义输入框标签，如果设置了`label`属性则不生效            |\n| left-icon  | 自定义输入框头部图标                                       |\n| right-icon | 自定义输入框尾部图标                                       |\n| button     | 自定义输入框尾部按钮                                       |\n| input      | 自定义输入框，使用此插槽后，与输入框相关的属性和事件将失效 |\n\n### 外部样式类\n\n| 类名                    | 说明           |\n| ----------------------- | -------------- |\n| custom-class `v1.10.21` | 根节点样式类   |\n| label-class             | 左侧文本样式类 |\n| input-class             | 输入框样式类   |\n| right-icon-class        | 右侧图标样式类 |\n"
  },
  {
    "path": "packages/field/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-field\": \"../../field/index\",\n    \"van-button\": \"../../button/index\",\n    \"van-cell-group\": \"../../cell-group/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/field/demo/index.less",
    "content": ".button {\n  vertical-align: middle;\n}\n\n.custom-icon {\n  color: #1989fa;\n}\n"
  },
  {
    "path": "packages/field/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    sms: '',\n    value: '',\n    password: '',\n    username: '',\n    username2: '',\n    username3: '',\n    message: '',\n    phone: '1365577',\n  },\n\n  methods: {\n    onClickIcon() {\n      wx.showToast({\n        icon: 'none',\n        title: '点击图标',\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/field/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-cell-group>\n    <van-field value=\"{{ value }}\" placeholder=\"请输入用户名\" border=\"{{ false }}\" clearable />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"自定义类型\">\n  <van-cell-group>\n    <van-field\n      value=\"{{ username }}\"\n      label=\"用户名\"\n      placeholder=\"请输入用户名\"\n      clearable\n      right-icon=\"question-o\"\n      right-icon-class=\"custom-icon\"\n      required\n      bind:click-icon=\"onClickIcon\"\n    />\n    <van-field\n      value=\"{{ password }}\"\n      type=\"password\"\n      label=\"密码\"\n      placeholder=\"请输入密码\"\n      required\n      border=\"{{ false }}\"\n    />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"禁用输入框\">\n  <van-cell-group>\n    <van-field\n      value=\"输入框已禁用\"\n      label=\"用户名\"\n      left-icon=\"contact\"\n      disabled\n      border=\"{{ false }}\"\n    />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"错误提示\">\n  <van-cell-group>\n    <van-field\n      value=\"{{ username2 }}\"\n      label=\"用户名\"\n      placeholder=\"请输入用户名\"\n      error\n    />\n    <van-field\n      value=\"{{ phone }}\"\n      label=\"手机号\"\n      placeholder=\"请输入手机号\"\n      error-message=\"手机号格式错误\"\n      border=\"{{ false }}\"\n    />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"内容对齐方式\">\n  <van-cell-group>\n    <van-field\n      value=\"{{ username3 }}\"\n      label=\"用户名\"\n      placeholder=\"请输入用户名\"\n      input-align=\"right\"\n    />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"高度自适应\">\n  <van-cell-group>\n    <van-field\n      value=\"{{ message }}\"\n      label=\"留言\"\n      type=\"textarea\"\n      placeholder=\"请输入留言\"\n      rows=\"1\"\n      autosize\n      border=\"{{ false }}\"\n    />\n  </van-cell-group>\n</demo-block>\n\n<demo-block title=\"插入按钮\">\n  <van-cell-group>\n    <van-field\n      value=\"{{ sms }}\"\n      center\n      clearable\n      label=\"短信验证码\"\n      placeholder=\"请输入短信验证码\"\n      use-button-slot\n      border=\"{{ false }}\"\n    >\n      <van-button slot=\"button\" size=\"small\" type=\"primary\" custom-class=\"button\">发送验证码</van-button>\n    </van-field>\n  </van-cell-group>\n</demo-block>\n"
  },
  {
    "path": "packages/field/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/field/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-field {\n  --cell-icon-size: var(--field-icon-size, @field-icon-size);\n\n  &__label {\n    color: var(--field-label-color, @field-label-color);\n\n    &--disabled {\n      color: var(--field-disabled-text-color, @field-disabled-text-color);\n    }\n  }\n\n  &__body {\n    display: flex;\n    align-items: center;\n\n    &--textarea {\n      box-sizing: border-box;\n      padding: 3.6px 0;\n      line-height: 1.2em;\n      min-height: var(--cell-line-height, @cell-line-height);\n    }\n  }\n\n  &__control:empty + &__control {\n    display: block;\n  }\n\n  &__control {\n    position: relative;\n    display: none;\n    box-sizing: border-box;\n    width: 100%;\n    margin: 0;\n    padding: 0;\n    line-height: inherit;\n    text-align: left;\n    background-color: transparent;\n    border: 0;\n    resize: none;\n    color: var(--field-input-text-color, @field-input-text-color);\n    height: var(--cell-line-height, @cell-line-height);\n    min-height: var(--cell-line-height, @cell-line-height);\n\n    &:empty {\n      display: none;\n    }\n\n    &--textarea {\n      height: var(--field-text-area-min-height, @field-text-area-min-height);\n      min-height: var(\n        --field-text-area-min-height,\n        @field-text-area-min-height\n      );\n    }\n\n    &--error {\n      color: var(--field-input-error-text-color, @field-input-error-text-color);\n    }\n\n    &--disabled {\n      background-color: transparent;\n      opacity: 1;\n      color: var(\n        --field-input-disabled-text-color,\n        @field-input-disabled-text-color\n      );\n    }\n\n    &--center {\n      text-align: center;\n    }\n\n    &--right {\n      text-align: right;\n    }\n\n    &--custom {\n      display: flex;\n      align-items: center;\n      min-height: var(--cell-line-height, @cell-line-height);\n    }\n  }\n\n  &__placeholder {\n    position: absolute;\n    top: 0;\n    right: 0;\n    left: 0;\n    pointer-events: none;\n    color: var(--field-placeholder-text-color, @field-placeholder-text-color);\n\n    &--error {\n      color: var(--field-error-message-color, @field-error-message-color);\n    }\n  }\n\n  &__icon-root {\n    display: flex;\n    align-items: center;\n    min-height: var(--cell-line-height, @cell-line-height);\n  }\n\n  &__clear-root,\n  &__icon-container {\n    line-height: inherit;\n    vertical-align: middle;\n    padding: 0 var(--padding-xs, @padding-xs);\n    margin-right: calc(-1 * var(--padding-xs, @padding-xs));\n  }\n\n  &__clear-root,\n  &__icon-container,\n  &__button {\n    flex-shrink: 0;\n  }\n\n  &__clear-root {\n    font-size: var(--field-clear-icon-size, @field-clear-icon-size);\n    color: var(--field-clear-icon-color, @field-clear-icon-color);\n  }\n\n  &__icon-container {\n    font-size: var(--field-icon-size, @field-icon-size);\n    color: var(--field-icon-container-color, @field-icon-container-color);\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &__button {\n    padding-left: var(--padding-xs, @padding-xs);\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &__error-message {\n    display: block;\n    text-align: left;\n    font-size: var(\n      --field-error-message-text-font-size,\n      @field-error-message-text-font-size\n    );\n    color: var(--field-error-message-color, @field-error-message-color);\n\n    &--center {\n      text-align: center;\n    }\n\n    &--right {\n      text-align: right;\n    }\n  }\n\n  &__word-limit {\n    text-align: right;\n    margin-top: var(--padding-base, @padding-base);\n    color: var(--field-word-limit-color, @field-word-limit-color);\n    font-size: var(--field-word-limit-font-size, @field-word-limit-font-size);\n    line-height: var(\n      --field-word-limit-line-height,\n      @field-word-limit-line-height\n    );\n  }\n\n  &__word-num {\n    display: inline;\n\n    &--full {\n      color: var(--field-word-num-full-color, @field-word-num-full-color);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/field/index.ts",
    "content": "import { nextTick } from '../common/utils';\nimport { VantComponent } from '../common/component';\nimport { commonProps, inputProps, textareaProps } from './props';\nimport { InputDetails } from './types';\n\nVantComponent({\n  field: true,\n\n  classes: ['input-class', 'right-icon-class', 'label-class'],\n\n  props: {\n    ...commonProps,\n    ...inputProps,\n    ...textareaProps,\n    size: String,\n    icon: String,\n    label: String,\n    error: Boolean,\n    center: Boolean,\n    isLink: Boolean,\n    leftIcon: String,\n    rightIcon: String,\n    autosize: null,\n    required: Boolean,\n    iconClass: String,\n    clickable: Boolean,\n    inputAlign: String,\n    customStyle: String,\n    errorMessage: String,\n    arrowDirection: String,\n    showWordLimit: Boolean,\n    errorMessageAlign: String,\n    readonly: {\n      type: Boolean,\n      observer: 'setShowClear',\n    },\n    clearable: {\n      type: Boolean,\n      observer: 'setShowClear',\n    },\n    clearTrigger: {\n      type: String,\n      value: 'focus',\n    },\n    border: {\n      type: Boolean,\n      value: true,\n    },\n    titleWidth: {\n      type: String,\n      value: '6.2em',\n    },\n    clearIcon: {\n      type: String,\n      value: 'clear',\n    },\n    extraEventParams: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  data: {\n    focused: false,\n    innerValue: '',\n    showClear: false,\n  },\n\n  watch: {\n    value(this: WechatMiniprogram.Component.TrivialInstance, value) {\n      if (value !== this.value) {\n        this.setData({ innerValue: value });\n        this.value = value;\n\n        this.setShowClear();\n      }\n    },\n    clearTrigger() {\n      this.setShowClear();\n    },\n  },\n\n  created() {\n    this.value = this.data.value;\n    this.setData({ innerValue: this.value });\n  },\n\n  methods: {\n    formatValue(value: string) {\n      const { maxlength } = this.data;\n\n      if (maxlength !== -1 && value.length > maxlength) {\n        return value.slice(0, maxlength);\n      }\n\n      return value;\n    },\n\n    onInput(event: WechatMiniprogram.Input | WechatMiniprogram.TextareaInput) {\n      const { value = '' } = event.detail || {};\n\n      const formatValue = this.formatValue(value);\n\n      this.value = formatValue;\n\n      this.setShowClear();\n\n      return this.emitChange({\n        ...event.detail,\n        value: formatValue,\n      });\n    },\n\n    onFocus(\n      event: WechatMiniprogram.InputFocus | WechatMiniprogram.TextareaFocus\n    ) {\n      this.focused = true;\n      this.setShowClear();\n      this.$emit('focus', event.detail);\n    },\n\n    onBlur(\n      event: WechatMiniprogram.InputBlur | WechatMiniprogram.TextareaBlur\n    ) {\n      this.focused = false;\n      this.setShowClear();\n      this.$emit('blur', event.detail);\n    },\n\n    onClickIcon() {\n      this.$emit('click-icon');\n    },\n\n    onClickInput(event: WechatMiniprogram.TouchEvent) {\n      this.$emit('click-input', event.detail);\n    },\n\n    onClear() {\n      this.setData({ innerValue: '' });\n      this.value = '';\n      this.setShowClear();\n\n      nextTick(() => {\n        this.emitChange({ value: '' });\n        this.$emit('clear', '');\n      });\n    },\n\n    onConfirm(\n      event: WechatMiniprogram.InputConfirm | WechatMiniprogram.TextareaConfirm\n    ) {\n      const { value = '' } = event.detail || {};\n      this.value = value;\n      this.setShowClear();\n      this.$emit('confirm', value);\n    },\n\n    setValue(value: string) {\n      this.value = value;\n      this.setShowClear();\n\n      if (value === '') {\n        this.setData({ innerValue: '' });\n      }\n\n      this.emitChange({ value });\n    },\n\n    onLineChange(event: WechatMiniprogram.TextareaLineChange) {\n      this.$emit('linechange', event.detail);\n    },\n\n    onKeyboardHeightChange(\n      event:\n        | WechatMiniprogram.InputKeyboardHeightChange\n        | WechatMiniprogram.TextareaKeyboardHeightChange\n    ) {\n      this.$emit('keyboardheightchange', event.detail);\n    },\n\n    onBindNicknameReview(event) {\n      this.$emit('nicknamereview', event.detail);\n    },\n\n    emitChange(detail: InputDetails) {\n      const { extraEventParams } = this.data;\n\n      this.setData({ value: detail.value });\n\n      let result: InputDetails | undefined;\n\n      const data = extraEventParams\n        ? {\n            ...detail,\n            callback: (data: InputDetails) => {\n              result = data;\n            },\n          }\n        : detail.value;\n\n      this.$emit('input', data);\n      this.$emit('change', data);\n\n      return result;\n    },\n\n    setShowClear() {\n      const { clearable, readonly, clearTrigger } = this.data;\n      const { focused, value } = this;\n\n      let showClear = false;\n\n      if (clearable && !readonly) {\n        const hasValue = !!value;\n        const trigger =\n          clearTrigger === 'always' || (clearTrigger === 'focus' && focused);\n\n        showClear = hasValue && trigger;\n      }\n\n      this.setView({ showClear });\n    },\n\n    noop() {},\n  },\n});\n"
  },
  {
    "path": "packages/field/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-cell\n  size=\"{{ size }}\"\n  icon=\"{{ leftIcon }}\"\n  center=\"{{ center }}\"\n  border=\"{{ border }}\"\n  is-link=\"{{ isLink }}\"\n  required=\"{{ required }}\"\n  clickable=\"{{ clickable }}\"\n  title-width=\"{{ titleWidth }}\"\n  title-style=\"margin-right: 12px;\"\n  custom-style=\"{{ customStyle }}\"\n  arrow-direction=\"{{ arrowDirection }}\"\n  custom-class=\"custom-class van-field\"\n>\n  <slot name=\"left-icon\" slot=\"icon\" />\n  <label for=\"{{ name }}\" wx:if=\"{{ label }}\" class=\"label-class {{ utils.bem('field__label', { disabled }) }}\" slot=\"title\">\n    {{ label }}\n  </label>\n  <slot wx:else name=\"label\" slot=\"title\" />\n  <view class=\"{{ utils.bem('field__body', [type]) }}\">\n    <view class=\"{{ utils.bem('field__control', [inputAlign, 'custom']) }}\" bindtap=\"onClickInput\">\n      <slot name=\"input\" />\n    </view>\n    <include wx:if=\"{{ type === 'textarea' }}\" src=\"./textarea.wxml\" />\n    <include wx:else src=\"./input.wxml\" />\n\n    <van-icon\n      wx:if=\"{{ showClear }}\"\n      name=\"{{ clearIcon }}\"\n      class=\"van-field__clear-root van-field__icon-root\"\n      catch:touchstart=\"onClear\"\n    />\n    <view class=\"van-field__icon-container\" bind:tap=\"onClickIcon\">\n      <van-icon\n        wx:if=\"{{ rightIcon || icon }}\"\n        name=\"{{ rightIcon || icon }}\"\n        class=\"van-field__icon-root {{ iconClass }}\"\n        custom-class=\"right-icon-class\"\n      />\n      <slot name=\"right-icon\" />\n      <slot name=\"icon\" />\n    </view>\n    <view class=\"van-field__button\">\n      <slot name=\"button\" />\n    </view>\n  </view>\n  <label for=\"{{ name }}\" wx:if=\"{{ showWordLimit && maxlength }}\" class=\"van-field__word-limit\">\n    <view class=\"{{ utils.bem('field__word-num', { full: value.length >= maxlength }) }}\">{{ value.length >= maxlength ? maxlength : value.length }}</view>/{{ maxlength }}\n  </label>\n  <label for=\"{{ name }}\"  wx:if=\"{{ errorMessage }}\" class=\"{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}\">\n    {{ errorMessage }}\n  </label>\n</van-cell>\n"
  },
  {
    "path": "packages/field/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction inputStyle(autosize) {\n  if (autosize && autosize.constructor === 'Object') {\n    return style({\n      'min-height': addUnit(autosize.minHeight),\n      'max-height': addUnit(autosize.maxHeight),\n    });\n  }\n\n  return '';\n}\n\nmodule.exports = {\n  inputStyle: inputStyle,\n};\n"
  },
  {
    "path": "packages/field/input.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<input\n  id=\"{{ name }}\"\n  class=\"{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class\"\n  type=\"{{ type }}\"\n  focus=\"{{ focus }}\"\n  cursor=\"{{ cursor }}\"\n  value=\"{{ innerValue }}\"\n  auto-focus=\"{{ autoFocus }}\"\n  disabled=\"{{ disabled || readonly }}\"\n  maxlength=\"{{ maxlength }}\"\n  placeholder=\"{{ placeholder }}\"\n  placeholder-style=\"{{ placeholderStyle }}\"\n  placeholder-class=\"{{ utils.bem('field__placeholder', { error }) }}\"\n  confirm-type=\"{{ confirmType }}\"\n  confirm-hold=\"{{ confirmHold }}\"\n  hold-keyboard=\"{{ holdKeyboard }}\"\n  cursor-spacing=\"{{ cursorSpacing }}\"\n  adjust-position=\"{{ adjustPosition }}\"\n  selection-end=\"{{ selectionEnd }}\"\n  selection-start=\"{{ selectionStart }}\"\n  always-embed=\"{{ alwaysEmbed }}\"\n  password=\"{{ password || type === 'password' }}\"\n  bindinput=\"onInput\"\n  bindtap=\"onClickInput\"\n  bindblur=\"onBlur\"\n  bindfocus=\"onFocus\"\n  bindconfirm=\"onConfirm\"\n  bindkeyboardheightchange=\"onKeyboardHeightChange\"\n  bindnicknamereview=\"onBindNicknameReview\"\n/>\n"
  },
  {
    "path": "packages/field/props.ts",
    "content": "export const commonProps: WechatMiniprogram.Component.PropertyOption = {\n  value: String,\n  placeholder: String,\n  placeholderStyle: String,\n  placeholderClass: String,\n  disabled: Boolean,\n  maxlength: {\n    type: Number,\n    value: -1,\n  },\n  cursorSpacing: {\n    type: Number,\n    value: 50,\n  },\n  autoFocus: Boolean,\n  focus: Boolean,\n  cursor: {\n    type: Number,\n    value: -1,\n  },\n  selectionStart: {\n    type: Number,\n    value: -1,\n  },\n  selectionEnd: {\n    type: Number,\n    value: -1,\n  },\n  adjustPosition: {\n    type: Boolean,\n    value: true,\n  },\n  holdKeyboard: Boolean,\n};\n\nexport const inputProps: WechatMiniprogram.Component.PropertyOption = {\n  type: {\n    type: String,\n    value: 'text',\n  },\n  password: Boolean,\n  confirmType: String,\n  confirmHold: Boolean,\n  alwaysEmbed: Boolean,\n};\n\nexport const textareaProps: WechatMiniprogram.Component.PropertyOption = {\n  autoHeight: Boolean,\n  fixed: Boolean,\n  showConfirmBar: {\n    type: Boolean,\n    value: true,\n  },\n  disableDefaultPadding: {\n    type: Boolean,\n    value: true,\n  },\n};\n"
  },
  {
    "path": "packages/field/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-field>\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--borderless\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                />\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"请输入用户名\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义类型\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-field\n            rightIconClass=\"custom-icon\"\n            bind:click-icon=\"onClickIcon\"\n          >\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--required\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    用户名\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"请输入用户名\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    >\n                      <van-icon\n                        class=\"van-field__icon-root \"\n                        customClass=\"right-icon-class\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-question-o\"\n                          style=\"\"\n                          bind:tap=\"onClick\"\n                        />\n                      </van-icon>\n                    </wx-view>\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n          <van-field>\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--required van-cell--borderless\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    密码\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--password\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{true}}\"\n                      placeholder=\"请输入密码\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"password\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用输入框\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-field>\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--borderless\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <van-icon\n                  class=\"van-cell__left-icon-wrap\"\n                  customClass=\"van-cell__left-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-contact\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label van-field__label--disabled\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    用户名\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control van-field__control--disabled input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{true}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"输入框已禁用\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        错误提示\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-field>\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    用户名\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control van-field__control--error input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"请输入用户名\"\n                      placeholderClass=\"van-field__placeholder van-field__placeholder--error\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n          <van-field>\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--borderless\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    手机号\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"请输入手机号\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"1365577\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                  <wx-label\n                    class=\"van-field__error-message\"\n                    for=\"\"\n                  >\n                    \n    手机号格式错误\n  \n                  </wx-label>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        内容对齐方式\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-field>\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    用户名\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--right van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control van-field__control--right input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"请输入用户名\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        高度自适应\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-field\n            rows=\"1\"\n          >\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--borderless\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    留言\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--textarea\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-textarea\n                      adjustPosition=\"{{true}}\"\n                      autoFocus=\"{{false}}\"\n                      autoHeight=\"{{true}}\"\n                      class=\"van-field__control van-field__control--textarea input-class\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      disableDefaultPadding=\"{{true}}\"\n                      fixed=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      placeholder=\"请输入留言\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      showConfirmBar=\"{{true}}\"\n                      style=\"\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:linechange=\"onLineChange\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    />\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        插入按钮\n      </wx-view>\n      <van-cell-group>\n        <wx-view\n          class=\"custom-class van-cell-group van-hairline--top-bottom\"\n        >\n          <van-field\n            useButtonSlot=\"{{true}}\"\n          >\n            <van-cell\n              customClass=\"custom-class van-field\"\n            >\n              <wx-view\n                class=\"custom-class van-cell van-cell--center van-cell--borderless\"\n                hoverClass=\"van-cell--hover hover-class\"\n                hoverStayTime=\"70\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-cell__title title-class\"\n                  style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                >\n                  <wx-label\n                    class=\"label-class van-field__label\"\n                    for=\"\"\n                    slot=\"title\"\n                  >\n                    \n    短信验证码\n  \n                  </wx-label>\n                </wx-view>\n                <wx-view\n                  class=\"van-cell__value value-class\"\n                >\n                  <wx-view\n                    class=\"van-field__body van-field__body--text\"\n                  >\n                    <wx-view\n                      class=\"van-field__control van-field__control--custom\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-input\n                      adjustPosition=\"{{true}}\"\n                      alwaysEmbed=\"{{false}}\"\n                      autoFocus=\"{{false}}\"\n                      class=\"van-field__control input-class\"\n                      confirmHold=\"{{false}}\"\n                      confirmType=\"\"\n                      cursor=\"{{-1}}\"\n                      cursorSpacing=\"{{50}}\"\n                      disabled=\"{{false}}\"\n                      focus=\"{{false}}\"\n                      holdKeyboard=\"{{false}}\"\n                      id=\"\"\n                      maxlength=\"{{-1}}\"\n                      password=\"{{false}}\"\n                      placeholder=\"请输入短信验证码\"\n                      placeholderClass=\"van-field__placeholder\"\n                      placeholderStyle=\"\"\n                      selectionEnd=\"{{-1}}\"\n                      selectionStart=\"{{-1}}\"\n                      type=\"text\"\n                      value=\"\"\n                      bind:blur=\"onBlur\"\n                      bind:confirm=\"onConfirm\"\n                      bind:focus=\"onFocus\"\n                      bind:input=\"onInput\"\n                      bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                      bind:nicknamereview=\"onBindNicknameReview\"\n                      bind:tap=\"onClickInput\"\n                    />\n                    <wx-view\n                      class=\"van-field__icon-container\"\n                      bind:tap=\"onClickIcon\"\n                    />\n                    <wx-view\n                      class=\"van-field__button\"\n                    >\n                      <van-button\n                        customClass=\"button\"\n                        slot=\"button\"\n                      >\n                        <wx-button\n                          appParameter=\"\"\n                          ariaLabel=\"\"\n                          businessId=\"\"\n                          class=\"custom-class van-button van-button--primary van-button--small \"\n                          data-detail=\"{{null}}\"\n                          formType=\"\"\n                          hoverClass=\"van-button--active hover-class\"\n                          id=\"\"\n                          lang=\"\"\n                          openType=\"\"\n                          sendMessageImg=\"\"\n                          sendMessagePath=\"\"\n                          sendMessageTitle=\"\"\n                          sessionFrom=\"\"\n                          showMessageCard=\"{{false}}\"\n                          style=\"\"\n                          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                          bind:chooseavatar=\"onChooseAvatar\"\n                          bind:contact=\"onContact\"\n                          bind:error=\"onError\"\n                          bind:getphonenumber=\"onGetPhoneNumber\"\n                          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                          bind:getuserinfo=\"onGetUserInfo\"\n                          bind:launchapp=\"onLaunchApp\"\n                          bind:opensetting=\"onOpenSetting\"\n                          bind:tap=\"onClick\"\n                        >\n                          <wx-view\n                            class=\"van-button__text\"\n                          >\n                            发送验证码\n                          </wx-view>\n                        </wx-button>\n                      </van-button>\n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </van-cell>\n          </van-field>\n        </wx-view>\n      </van-cell-group>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/field/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/field/textarea.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n<textarea\n  id=\"{{ name }}\"\n  class=\"{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class\"\n  fixed=\"{{ fixed }}\"\n  focus=\"{{ focus }}\"\n  cursor=\"{{ cursor }}\"\n  value=\"{{ innerValue }}\"\n  auto-focus=\"{{ autoFocus }}\"\n  disabled=\"{{ disabled || readonly }}\"\n  maxlength=\"{{ maxlength }}\"\n  placeholder=\"{{ placeholder }}\"\n  placeholder-style=\"{{ placeholderStyle }}\"\n  placeholder-class=\"{{ utils.bem('field__placeholder', { error, disabled }) }}\"\n  auto-height=\"{{ !!autosize }}\"\n  style=\"{{ computed.inputStyle(autosize) }}\"\n  cursor-spacing=\"{{ cursorSpacing }}\"\n  adjust-position=\"{{ adjustPosition }}\"\n  show-confirm-bar=\"{{ showConfirmBar }}\"\n  hold-keyboard=\"{{ holdKeyboard }}\"\n  selection-end=\"{{ selectionEnd }}\"\n  selection-start=\"{{ selectionStart }}\"\n  disable-default-padding=\"{{ disableDefaultPadding }}\"\n  bindinput=\"onInput\"\n  bindtap=\"onClickInput\"\n  bindblur=\"onBlur\"\n  bindfocus=\"onFocus\"\n  bindconfirm=\"onConfirm\"\n  bindlinechange=\"onLineChange\"\n  bindkeyboardheightchange=\"onKeyboardHeightChange\"\n/>\n"
  },
  {
    "path": "packages/field/types.ts",
    "content": "export interface InputDetails {\n  /** 输入框内容 */\n  value: string;\n  /** 光标位置 */\n  cursor?: number;\n  /** keyCode 为键值 (目前工具还不支持返回keyCode参数) `2.1.0` 起支持 */\n  keyCode?: number;\n}\n"
  },
  {
    "path": "packages/goods-action/README.md",
    "content": "# GoodsAction 商品导航\n\n### 介绍\n\n用于为商品相关操作提供便捷交互。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-goods-action\": \"@vant/weapp/goods-action/index\",\n  \"van-goods-action-icon\": \"@vant/weapp/goods-action-icon/index\",\n  \"van-goods-action-button\": \"@vant/weapp/goods-action-button/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)。\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-goods-action>\n  <van-goods-action-icon icon=\"chat-o\" text=\"客服\" bind:click=\"onClickIcon\" />\n  <van-goods-action-icon icon=\"cart-o\" text=\"购物车\" bind:click=\"onClickIcon\" />\n  <van-goods-action-button\n    text=\"加入购物车\"\n    type=\"warning\"\n    bind:click=\"onClickButton\"\n  />\n  <van-goods-action-button text=\"立即购买\" bind:click=\"onClickButton\" />\n</van-goods-action>\n```\n\n```javascript\nPage({\n  onClickIcon() {\n    Toast('点击图标');\n  },\n\n  onClickButton() {\n    Toast('点击按钮');\n  },\n});\n```\n\n### 提示信息\n\n设置`dot`属性后，会在图标右上角展示一个小红点。设置`info`属性后，会在图标右上角展示相应的徽标。\n\n```html\n<van-goods-action>\n  <van-goods-action-icon icon=\"chat-o\" text=\"客服\" dot />\n  <van-goods-action-icon icon=\"cart-o\" text=\"购物车\" info=\"5\" />\n  <van-goods-action-icon icon=\"shop-o\" text=\"店铺\" />\n  <van-goods-action-button text=\"加入购物车\" type=\"warning\" />\n  <van-goods-action-button text=\"立即购买\" />\n</van-goods-action>\n```\n\n### 自定义按钮颜色\n\n通过`color`属性可以自定义按钮的颜色，支持传入`linear-gradient`渐变色。\n\n```html\n<van-goods-action>\n  <van-goods-action-icon icon=\"chat-o\" text=\"客服\" />\n  <van-goods-action-icon icon=\"cart-o\" text=\"购物车\" info=\"5\" />\n  <van-goods-action-icon icon=\"shop-o\" text=\"店铺\" />\n  <van-goods-action-button color=\"#be99ff\" text=\"加入购物车\" type=\"warning\" />\n  <van-goods-action-button color=\"#7232dd\" text=\"立即购买\" />\n</van-goods-action>\n```\n\n### 朴素按钮\n\n通过`plain`属性将按钮设置为朴素按钮，朴素按钮的文字为按钮颜色，背景为白色。\n\n```html\n<van-goods-action>\n  <van-goods-action-icon icon=\"chat-o\" text=\"客服\" />\n  <van-goods-action-icon icon=\"cart-o\" text=\"购物车\" info=\"5\" />\n  <van-goods-action-icon icon=\"shop-o\" text=\"店铺\" />\n  <van-goods-action-button color=\"#7232dd\" text=\"加入购物\" type=\"warning\" />\n  <van-goods-action-button plain color=\"#7232dd\" text=\"立即购买\" />\n</van-goods-action>\n```\n\n## API\n\n### GoodsAction Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| safe-area-inset-bottom | 是否为 iPhoneX 留出底部安全距离 | _boolean_ | `true` |\n\n### GoodsActionIcon Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| text | 按钮文字 | _string_ | - |\n| icon | 图标类型，可选值见`icon`组件 | _string_ | - |\n| info | 图标右上角提示信息 | _string \\| number_ | - |\n| color `v1.10.15`  | 图标颜色 | _string_ | `inherit` |\n| size | 图标大小，如 20px，2em，默认单位为px | _string \\| number_ | - |\n| url | 点击后跳转的链接地址 | _string_ | - |\n| link-type | 链接跳转类型，可选值为 `redirectTo` `switchTab` `reLaunch` | _string_ | `navigateTo` |\n| id | 标识符 | _string_ | - |\n| disabled | 是否禁用按钮 | _boolean_ | `false` |\n| loading | 是否显示为加载状态 | _boolean_ | `false` |\n| open-type | 微信开放能力，具体支持可参考 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) | _string_ | - |\n| app-parameter | 打开 APP 时，向 APP 传递的参数 | _string_ | - |\n| lang | 指定返回用户信息的语言，zh_CN 简体中文，<br>zh_TW 繁体中文，en 英文 | _string_ | `en` |\n| session-from | 会话来源 | _string_ | - |\n| send-message-title | 会话内消息卡片标题 | _string_ | 当前标题 |\n| send-message-path | 会话内消息卡片点击跳转小程序路径 | _string_ | 当前分享路径 |\n| send-message-img | sendMessageImg | _string_ | 截图 |\n| show-message-card | 显示会话内消息卡片 | _string_ | `false` |\n| class-prefix `v1.10.1` | 类名前缀 | _string_ | `van-icon` |\n\n### GoodsActionButton Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| text | 按钮文字 | _string_ | - |\n| color | 按钮颜色，支持传入 `linear-gradient` 渐变色 | _string_ | - |\n| url | 点击后跳转的链接地址 | _string_ | - |\n| link-type | 链接跳转类型，可选值为 `redirectTo` `switchTab` `reLaunch` | _string_ | `navigateTo` |\n| id | 标识符 | _string_ | - |\n| button-id `v1.10.25`| 标识符，作为原生button组件的id值 | _string_ | - |\n| type | 按钮类型，可选值为 `primary` `warning` `danger` | _string_ | `danger` |\n| plain | 是否为朴素按钮 | _boolean_ | `false` |\n| size | 按钮尺寸，可选值为 `normal` `large` `small` `mini` | _string_ | `normal` |\n| disabled | 是否禁用按钮 | _boolean_ | `false` |\n| loading | 是否显示为加载状态 | _boolean_ | `false` |\n| open-type | 微信开放能力，具体支持可参考 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) | _string_ | - |\n| app-parameter | 打开 APP 时，向 APP 传递的参数 | _string_ | - |\n| lang | 指定返回用户信息的语言，zh_CN 简体中文，<br>zh_TW 繁体中文，en 英文 | _string_ | `en` |\n| session-from | 会话来源 | _string_ | - |\n| send-message-title | 会话内消息卡片标题 | _string_ | 当前标题 |\n| send-message-path | 会话内消息卡片点击跳转小程序路径 | _string_ | 当前分享路径 |\n| send-message-img | sendMessageImg | _string_ | 截图 |\n| show-message-card | 显示会话内消息卡片 | _string_ | `false` |\n| custom-style `v1.11.3` | 自定义样式 | _string_ | '' |\n\n### Events\n\n| 事件名 | 说明             | 参数 |\n| ------ | ---------------- | ---- |\n| bind:click  | 按钮点击事件回调 | -    |\n\n### GoodsActionIcon Slot\n\n| 名称 | 说明       |\n| ---- | ---------- |\n| icon | 自定义图标 |\n\n### GoodsActionButton Slot\n\n| 名称 | 说明         |\n| ---- | ------------ |\n| -    | 按钮显示内容 |\n\n### GoodsActionIcon 外部样式类\n\n| 类名       | 说明       |\n| ---------- | ---------- |\n| icon-class | 图标样式类 |\n| text-class | 文字样式类 |\n| info-class `v1.10.20`  | 图标右上角文字样式类 |\n\n### GoodsActionButton 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n"
  },
  {
    "path": "packages/goods-action/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-toast\": \"../../toast/index\",\n    \"van-goods-action\": \"../../goods-action/index\",\n    \"van-goods-action-icon\": \"../../goods-action-icon/index\",\n    \"van-goods-action-button\": \"../../goods-action-button/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/goods-action/demo/index.less",
    "content": ".goods-action-position {\n  position: relative !important;\n}\n"
  },
  {
    "path": "packages/goods-action/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  methods: {\n    onClickIcon() {\n      Toast({ context: this, message: '点击图标' });\n    },\n\n    onClickButton() {\n      Toast({ context: this, message: '点击按钮' });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/goods-action/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-goods-action custom-class=\"goods-action-position\" safe-area-inset-bottom=\"{{ false }}\">\n    <van-goods-action-icon\n      icon=\"chat-o\"\n      text=\"客服\"\n      open-type=\"contact\"\n    />\n    <van-goods-action-icon\n      icon=\"cart-o\"\n      text=\"购物车\"\n      bind:click=\"onClickIcon\"\n    />\n    <van-goods-action-button\n      text=\"加入购物车\"\n      type=\"warning\"\n      bind:click=\"onClickButton\"\n    />\n    <van-goods-action-button\n      text=\"立即购买\"\n      bind:click=\"onClickButton\"\n    />\n  </van-goods-action>\n</demo-block>\n\n<demo-block title=\"提示信息\">\n  <van-goods-action custom-class=\"goods-action-position\" safe-area-inset-bottom=\"{{ false }}\">\n    <van-goods-action-icon icon=\"chat-o\" text=\"客服\" dot />\n    <van-goods-action-icon icon=\"cart-o\" text=\"购物车\" info=\"5\" />\n    <van-goods-action-icon icon=\"shop-o\" text=\"店铺\" />\n    <van-goods-action-button text=\"加入购物车\" type=\"warning\" />\n    <van-goods-action-button text=\"立即购买\" />\n  </van-goods-action>\n</demo-block>\n\n<demo-block title=\"自定义按钮颜色\">\n  <van-goods-action custom-class=\"goods-action-position\" safe-area-inset-bottom=\"{{ false }}\">\n    <van-goods-action-icon icon=\"chat-o\" text=\"客服\" />\n    <van-goods-action-icon icon=\"shop-o\" text=\"店铺\" />\n    <van-goods-action-button color=\"#be99ff\" type=\"warning\" text=\"加入购物车\" />\n    <van-goods-action-button color=\"#7232dd\" text=\"立即购买\" />\n  </van-goods-action>\n</demo-block>\n\n<demo-block title=\"朴素按钮\">\n  <van-goods-action custom-class=\"goods-action-position\" safe-area-inset-bottom=\"{{ false }}\">\n    <van-goods-action-icon icon=\"chat-o\" text=\"客服\" />\n    <van-goods-action-icon icon=\"shop-o\" text=\"店铺\" />\n    <van-goods-action-button color=\"#7232dd\"  text=\"加入购物车\" type=\"warning\" />\n    <van-goods-action-button plain color=\"#7232dd\" text=\"立即购买\" />\n  </van-goods-action>\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/goods-action/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/goods-action/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-goods-action {\n  position: fixed;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  display: flex;\n  align-items: center;\n  box-sizing: content-box;\n  height: var(--goods-action-height, @goods-action-height);\n  background-color: var(\n    --goods-action-background-color,\n    @goods-action-background-color\n  );\n\n  &--safe {\n    padding-bottom: constant(safe-area-inset-bottom);\n    padding-bottom: env(safe-area-inset-bottom);\n  }\n}\n"
  },
  {
    "path": "packages/goods-action/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\n\nVantComponent({\n  relation: useChildren('goods-action-button', function () {\n    this.children.forEach((item) => {\n      item.updateStyle();\n    });\n  }),\n\n  props: {\n    safeAreaInsetBottom: {\n      type: Boolean,\n      value: true,\n    },\n  },\n});\n"
  },
  {
    "path": "packages/goods-action/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class {{ utils.bem('goods-action', { safe: safeAreaInsetBottom }) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/goods-action/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-goods-action\n        customClass=\"goods-action-position\"\n      >\n        <wx-view\n          class=\"custom-class van-goods-action\"\n        >\n          <van-goods-action-icon>\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"contact\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-chat-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      />\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    客服\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-icon\n            bind:click=\"onClickIcon\"\n          >\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-cart-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      />\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    购物车\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-button\n            bind:click=\"onClickButton\"\n          >\n            <van-button\n              class=\"van-goods-action-button van-goods-action-button--warning van-goods-action-button--first\"\n              customClass=\"van-goods-action-button__inner custom-class\"\n              bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--warning van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n  加入购物车\n  \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-button>\n          <van-goods-action-button\n            bind:click=\"onClickButton\"\n          >\n            <van-button\n              class=\"van-goods-action-button van-goods-action-button--danger van-goods-action-button--last\"\n              customClass=\"van-goods-action-button__inner custom-class\"\n              bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n  立即购买\n  \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-button>\n        </wx-view>\n      </van-goods-action>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        提示信息\n      </wx-view>\n      <van-goods-action\n        customClass=\"goods-action-position\"\n      >\n        <wx-view\n          class=\"custom-class van-goods-action\"\n        >\n          <van-goods-action-icon>\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-chat-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      >\n                        <wx-view\n                          class=\"van-info van-info van-info--dot custom-class\"\n                          style=\"\"\n                        >\n                          \n                        </wx-view>\n                      </van-info>\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    客服\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-icon>\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-cart-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      >\n                        <wx-view\n                          class=\"van-info van-info custom-class\"\n                          style=\"\"\n                        >\n                          5\n                        </wx-view>\n                      </van-info>\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    购物车\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-icon>\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-shop-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      />\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    店铺\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-button>\n            <van-button\n              class=\"van-goods-action-button van-goods-action-button--warning van-goods-action-button--first\"\n              customClass=\"van-goods-action-button__inner custom-class\"\n              bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--warning van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n  加入购物车\n  \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-button>\n          <van-goods-action-button>\n            <van-button\n              class=\"van-goods-action-button van-goods-action-button--danger van-goods-action-button--last\"\n              customClass=\"van-goods-action-button__inner custom-class\"\n              bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n  立即购买\n  \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-button>\n        </wx-view>\n      </van-goods-action>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义按钮颜色\n      </wx-view>\n      <van-goods-action\n        customClass=\"goods-action-position\"\n      >\n        <wx-view\n          class=\"custom-class van-goods-action\"\n        >\n          <van-goods-action-icon>\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-chat-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      />\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    客服\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-icon>\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-shop-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      />\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    店铺\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-button>\n            <van-button\n              class=\"van-goods-action-button van-goods-action-button--warning van-goods-action-button--first\"\n              customClass=\"van-goods-action-button__inner custom-class\"\n              bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--warning van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"color:#fff;background:#be99ff;border-color:#be99ff\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n  加入购物车\n  \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-button>\n          <van-goods-action-button>\n            <van-button\n              class=\"van-goods-action-button van-goods-action-button--danger van-goods-action-button--last\"\n              customClass=\"van-goods-action-button__inner custom-class\"\n              bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"color:#fff;background:#7232dd;border-color:#7232dd\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n  立即购买\n  \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-button>\n        </wx-view>\n      </van-goods-action>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        朴素按钮\n      </wx-view>\n      <van-goods-action\n        customClass=\"goods-action-position\"\n      >\n        <wx-view\n          class=\"custom-class van-goods-action\"\n        >\n          <van-goods-action-icon>\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-chat-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      />\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    客服\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-icon>\n            <van-button\n              customClass=\"van-goods-action-icon\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--default van-button--large van-button--square \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  <van-icon\n                    class=\"van-goods-action-icon__icon\"\n                    customClass=\"icon-class\"\n                    infoClass=\"info-class\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-shop-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      />\n                    </wx-view>\n                  </van-icon>\n                  <wx-text\n                    class=\"text-class\"\n                  >\n                    店铺\n                  </wx-text>\n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-icon>\n          <van-goods-action-button>\n            <van-button\n              class=\"van-goods-action-button van-goods-action-button--warning van-goods-action-button--first\"\n              customClass=\"van-goods-action-button__inner custom-class\"\n              bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--warning van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"color:#fff;background:#7232dd;border-color:#7232dd\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n  加入购物车\n  \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-button>\n          <van-goods-action-button>\n            <van-button\n              class=\"van-goods-action-button van-goods-action-button--danger van-goods-action-button--last van-goods-action-button--plain\"\n              customClass=\"van-goods-action-button__inner custom-class\"\n              bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n              bind:click=\"onClick\"\n              bind:contact=\"onContact\"\n              bind:error=\"onError\"\n              bind:getRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n              bind:getphonenumber=\"onGetPhoneNumber\"\n              bind:getuserinfo=\"onGetUserInfo\"\n              bind:launchapp=\"onLaunchApp\"\n              bind:opensetting=\"onOpenSetting\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal van-button--plain \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"color:#7232dd;border-color:#7232dd\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n  立即购买\n  \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </van-goods-action-button>\n        </wx-view>\n      </van-goods-action>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/goods-action/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/goods-action-button/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../button/index\"\n  }\n}\n"
  },
  {
    "path": "packages/goods-action-button/index.less",
    "content": "@import '../common/style/var.less';\n\n:host {\n  flex: 1;\n}\n\n.van-goods-action-button {\n  --button-warning-background-color: var(\n    --goods-action-button-warning-color,\n    @goods-action-button-warning-color\n  );\n  --button-danger-background-color: var(\n    --goods-action-button-danger-color,\n    @goods-action-button-danger-color\n  );\n  --button-default-height: var(\n    --goods-action-button-height,\n    @goods-action-button-height\n  );\n  --button-line-height: var(\n    --goods-action-button-line-height,\n    @goods-action-button-line-height\n  );\n  --button-plain-background-color: var(\n    --goods-action-button-plain-color,\n    @goods-action-button-plain-color\n  );\n\n  display: block;\n\n  --button-border-width: 0;\n\n  &--first {\n    margin-left: 5px;\n\n    --button-border-radius: @goods-action-button-border-radius 0 0\n      var(\n        --goods-action-button-border-radius,\n        @goods-action-button-border-radius\n      );\n  }\n\n  &--last {\n    margin-right: 5px;\n\n    --button-border-radius: 0 @goods-action-button-border-radius\n      var(\n        --goods-action-button-border-radius,\n        @goods-action-button-border-radius\n      )\n      0;\n  }\n\n  &--first&--last {\n    --button-border-radius: var(\n      --goods-action-button-border-radius,\n      @goods-action-button-border-radius\n    );\n  }\n\n  &--plain {\n    --button-border-width: @button-border-width;\n  }\n\n  &__inner {\n    width: 100%;\n    font-weight: var(--font-weight-bold, @font-weight-bold) !important;\n  }\n\n  @media (max-width: 321px) {\n    font-size: 13px;\n  }\n}\n"
  },
  {
    "path": "packages/goods-action-button/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nimport { button } from '../mixins/button';\nimport { link } from '../mixins/link';\n\nVantComponent({\n  mixins: [link, button],\n\n  relation: useParent('goods-action'),\n\n  props: {\n    text: String,\n    color: String,\n    size: {\n      type: String,\n      value: 'normal',\n    },\n    loading: Boolean,\n    disabled: Boolean,\n    plain: Boolean,\n    type: {\n      type: String,\n      value: 'danger',\n    },\n    customStyle: {\n      type: String,\n      value: '',\n    },\n  },\n\n  methods: {\n    onClick(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('click', event.detail);\n      this.jumpLink();\n    },\n\n    updateStyle() {\n      if (this.parent == null) {\n        return;\n      }\n\n      const { index } = this;\n      const { children = [] } = this.parent;\n\n      this.setData({\n        isFirst: index === 0,\n        isLast: index === children.length - 1,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/goods-action-button/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<van-button\n  id=\"{{ id }}\"\n  button-id=\"{{ buttonId }}\"\n  lang=\"{{ lang }}\"\n  type=\"{{ type }}\"\n  size=\"{{ size }}\"\n  color=\"{{ color }}\"\n  plain=\"{{ plain }}\"\n  loading=\"{{ loading }}\"\n  disabled=\"{{ disabled }}\"\n  open-type=\"{{ openType }}\"\n  class=\"{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}\"\n  custom-class=\"van-goods-action-button__inner custom-class\"\n  custom-style=\"{{customStyle}}\"\n  business-id=\"{{ businessId }}\"\n  session-from=\"{{ sessionFrom }}\"\n  app-parameter=\"{{ appParameter }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  bind:click=\"onClick\"\n  binderror=\"onError\"\n  bindcontact=\"onContact\"\n  bindopensetting=\"onOpenSetting\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n  bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindlaunchapp=\"onLaunchApp\"\n>\n  {{ text }}\n  <slot></slot>\n</van-button>\n"
  },
  {
    "path": "packages/goods-action-icon/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-button\": \"../button/index\"\n  }\n}\n"
  },
  {
    "path": "packages/goods-action-icon/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-goods-action-icon {\n  display: flex !important;\n  flex-direction: column;\n  justify-content: center !important;\n  line-height: 1 !important;\n  border: none !important;\n  font-size: var(\n    --goods-action-icon-font-size,\n    @goods-action-icon-font-size\n  ) !important;\n  color: var(\n    --goods-action-icon-text-color,\n    @goods-action-icon-text-color\n  ) !important;\n  min-width: var(--goods-action-icon-width, @goods-action-icon-width);\n  height: var(--goods-action-icon-height, @goods-action-icon-height) !important;\n\n  &__icon {\n    display: flex;\n    margin: 0 auto 5px;\n    color: var(--goods-action-icon-color, @goods-action-icon-color);\n    font-size: var(--goods-action-icon-size, @goods-action-icon-size);\n  }\n}\n"
  },
  {
    "path": "packages/goods-action-icon/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\nimport { link } from '../mixins/link';\n\nVantComponent({\n  classes: ['icon-class', 'text-class', 'info-class'],\n\n  mixins: [link, button],\n\n  props: {\n    text: String,\n    dot: Boolean,\n    info: String,\n    icon: String,\n    size: String,\n    color: String,\n    classPrefix: {\n      type: String,\n      value: 'van-icon',\n    },\n    disabled: Boolean,\n    loading: Boolean,\n  },\n\n  methods: {\n    onClick(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('click', event.detail);\n      this.jumpLink();\n    },\n  },\n});\n"
  },
  {
    "path": "packages/goods-action-icon/index.wxml",
    "content": "<van-button\n  square\n  id=\"{{ id }}\"\n  size=\"large\"\n  lang=\"{{ lang }}\"\n  loading=\"{{ loading }}\"\n  disabled=\"{{ disabled }}\"\n  open-type=\"{{ openType }}\"\n  business-id=\"{{ businessId }}\"\n  custom-class=\"van-goods-action-icon\"\n  session-from=\"{{ sessionFrom }}\"\n  app-parameter=\"{{ appParameter }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  bind:click=\"onClick\"\n  binderror=\"onError\"\n  bindcontact=\"onContact\"\n  bindopensetting=\"onOpenSetting\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindlaunchapp=\"onLaunchApp\"\n>\n  <van-icon\n    wx:if=\"{{ icon }}\"\n    name=\"{{ icon }}\"\n    dot=\"{{ dot }}\"\n    info=\"{{ info }}\"\n    size=\"{{ size }}\"\n    color=\"{{ color }}\"\n    class-prefix=\"{{ classPrefix }}\"\n    class=\"van-goods-action-icon__icon\"\n    custom-class=\"icon-class\"\n    info-class=\"info-class\"\n  />\n  <view wx:else>\n    <slot name=\"icon\" />\n  </view>\n  <text class=\"text-class\">{{ text }}</text>\n</van-button>\n"
  },
  {
    "path": "packages/grid/README.md",
    "content": "# Grid 宫格\n\n### 介绍\n\n宫格可以在水平方向上把页面分隔成等宽度的区块，用于展示内容或进行页面导航。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-grid\": \"@vant/weapp/grid/index\",\n  \"van-grid-item\": \"@vant/weapp/grid-item/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)\n\n## 代码演示\n\n### 基本用法\n\n通过`icon`属性设置格子内的图标，`text`属性设置文字内容。\n\n```html\n<van-grid>\n  <van-grid-item icon=\"photo-o\" text=\"文字\" />\n  <van-grid-item icon=\"photo-o\" text=\"文字\" />\n  <van-grid-item icon=\"photo-o\" text=\"文字\" />\n  <van-grid-item icon=\"photo-o\" text=\"文字\" />\n</van-grid>\n```\n\n### 自定义列数\n\n默认一行展示四个格子，可以通过`column-num`自定义列数。\n\n```html\n<van-grid column-num=\"3\">\n  <van-grid-item icon=\"photo-o\" text=\"文字\" wx:for=\"{{ 6 }}\" />\n</van-grid>\n```\n\n### 自定义内容\n\n通过插槽可以自定义格子展示的内容。\n\n```html\n<van-grid column-num=\"3\" border=\"{{ false }}\">\n  <van-grid-item use-slot wx:for=\"{{ 3 }}\" wx:for-item=\"index\">\n    <image\n      style=\"width: 100%; height: 90px;\"\n      src=\"https://img.yzcdn.cn/vant/apple-{{ index + 1 }}.jpg\"\n    />\n  </van-grid-item>\n</van-grid>\n```\n\n### 正方形格子\n\n设置`square`属性后，格子的高度会和宽度保持一致。\n\n```html\n<van-grid square>\n  <van-grid-item icon=\"photo-o\" text=\"文字\" wx:for=\"{{ 8 }}\" />\n</van-grid>\n```\n\n### 格子间距\n\n通过`gutter`属性设置格子之间的距离。\n\n```html\n<van-grid gutter=\"{{ 10 }}\">\n  <van-grid-item icon=\"photo-o\" text=\"文字\" wx:for=\"{{ 8 }}\" />\n</van-grid>\n```\n\n### 内容横排\n\n将`direction`属性设置为`horizontal`，可以让宫格的内容呈横向排列。\n\n```html\n<van-grid direction=\"horizontal\" column-num=\"2\">\n  <van-grid-item icon=\"photo-o\" text=\"文字\" />\n  <van-grid-item icon=\"photo-o\" text=\"文字\" />\n  <van-grid-item icon=\"photo-o\" text=\"文字\" />\n</van-grid>\n```\n\n### 页面跳转\n\n可以通过`url`属性进行页面跳转，通过`link-type`属性控制跳转类型。\n\n```html\n<van-grid clickable column-num=\"2\">\n  <van-grid-item\n    icon=\"home-o\"\n    link-type=\"navigateTo\"\n    url=\"/pages/dashboard/index\"\n    text=\"Navigate 跳转\"\n  />\n  <van-grid-item\n    icon=\"search\"\n    link-type=\"reLaunch\"\n    url=\"/pages/dashboard/index\"\n    text=\"ReLaunch 跳转\"\n  />\n</van-grid>\n```\n\n### 提示信息\n\n设置`dot`属性后，会在图标右上角展示一个小红点。设置`badge`属性后，会在图标右上角展示相应的徽标。\n\n```html\n<van-grid column-num=\"2\">\n  <van-grid-item icon=\"home-o\" text=\"文字\" dot />\n  <van-grid-item icon=\"search\" text=\"文字\" badge=\"99+\" />\n</van-grid>\n```\n\n## API\n\n### Grid Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| column-num | 列数 | _number_ | `4` |\n| icon-size `v1.3.2` | 图标大小，默认单位为`px` | _string_ | `28px` |\n| gutter | 格子之间的间距，默认单位为`px` | _string \\| number_ | `0` |\n| border | 是否显示边框 | _boolean_ | `true` |\n| center | 是否将格子内容居中显示 | _boolean_ | `true` |\n| square | 是否将格子固定为正方形 | _boolean_ | `false` |\n| clickable | 是否开启格子点击反馈 | _boolean_ | `false` |\n| direction | 格子内容排列的方向，可选值为 `horizontal` | _string_ | `vertical` |\n| reverse `v1.7.0` | 是否调换图标和文本的位置 | _boolean_ | `false` |\n| use-slot | 是否使用自定义内容的插槽 | _boolean_ | `false` |\n\n### Grid 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n\n### GridItem Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| text | 文字 | _string_ | - |\n| icon | 图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | - |\n| icon-color | 图标颜色 | _string_ | - |\n| icon-prefix `v1.7.0` | 第三方图标前缀 | _string_ | `van-icon` |\n| dot | 是否显示图标右上角小红点 | _boolean_ | `false` |\n| badge | 图标右上角徽标的内容 | _string \\| number_ | - |\n| url | 点击后跳转的链接地址 | _string_ | - |\n| link-type | 链接跳转类型，可选值为 `redirectTo` `switchTab` `reLaunch` | _string_ | `navigateTo` |\n\n### GridItem Events\n\n| 事件名     | 说明           | 回调参数 |\n| ---------- | -------------- | -------- |\n| bind:click | 点击格子时触发 | -        |\n\n### GridItem Slots\n\n| 名称 | 说明                                                   |\n| ---- | ------------------------------------------------------ |\n| -    | 自定义宫格的所有内容，需要设置`use-slot`属性           |\n| icon | 自定义图标，如果设置了`use-slot`或者`icon`属性则不生效 |\n| text | 自定义文字，如果设置了`use-slot`或者`text`属性则不生效 |\n\n### GridItem 外部样式类\n\n| 类名          | 说明         |\n| ------------- | ------------ |\n| custom-class  | 根节点样式类 |\n| content-class | 内容样式类   |\n| icon-class    | 图标样式类   |\n| text-class    | 文本样式类   |\n"
  },
  {
    "path": "packages/grid/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-grid\": \"../../grid/index\",\n    \"van-grid-item\": \"../../grid-item/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/grid/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    array3: [0, 1, 2],\n    array4: [0, 1, 2, 3],\n    array6: [0, 1, 2, 3, 4, 5],\n    array8: [0, 1, 2, 3, 4, 5, 6, 7],\n  },\n});\n"
  },
  {
    "path": "packages/grid/demo/index.wxml",
    "content": "<demo-block title=\"基本用法\">\n  <van-grid>\n    <van-grid-item icon=\"photo-o\" text=\"文字\" wx:for=\"{{ array4 }}\" wx:key=\"*this\" />\n  </van-grid>\n</demo-block>\n\n<demo-block title=\"自定义列数\">\n  <van-grid column-num=\"3\">\n    <van-grid-item icon=\"photo-o\" text=\"文字\" wx:for=\"{{ array6 }}\" wx:key=\"*this\" />\n  </van-grid>\n</demo-block>\n\n<demo-block title=\"自定义内容\">\n  <van-grid column-num=\"3\" border=\"{{ false }}\">\n    <van-grid-item use-slot wx:for=\"{{ array3 }}\" wx:for-item=\"index\" wx:key=\"*this\">\n      <image style=\"width: 100%; height: 90px;\" src=\"https://img.yzcdn.cn/vant/apple-{{ index + 1 }}.jpg\" />\n    </van-grid-item>\n  </van-grid>\n</demo-block>\n\n<demo-block title=\"正方形格子\">\n  <van-grid square>\n    <van-grid-item icon=\"photo-o\" text=\"文字\" wx:for=\"{{ array8 }}\" wx:key=\"*this\" />\n  </van-grid>\n</demo-block>\n\n<demo-block title=\"格子间距\">\n  <van-grid gutter=\"{{ 10 }}\">\n    <van-grid-item icon=\"photo-o\" text=\"文字\" wx:for=\"{{ array8 }}\" wx:key=\"*this\" />\n  </van-grid>\n</demo-block>\n\n<demo-block title=\"内容横排\">\n  <van-grid direction=\"horizontal\" column-num=\"3\">\n    <van-grid-item icon=\"photo-o\" text=\"文字\" wx:for=\"{{ array3 }}\" wx:key=\"*this\" />\n  </van-grid>\n</demo-block>\n\n<demo-block title=\"页面跳转\">\n  <van-grid clickable column-num=\"2\">\n    <van-grid-item icon=\"home-o\" link-type=\"navigateTo\" url=\"/pages/dashboard/index\" text=\"Navigate 跳转\" />\n    <van-grid-item icon=\"search\" link-type=\"reLaunch\" url=\"/pages/dashboard/index\" text=\"ReLaunch 跳转\" />\n  </van-grid>\n</demo-block>\n\n<demo-block title=\"徽标提示\">\n  <van-grid column-num=\"2\">\n    <van-grid-item icon=\"home-o\" text=\"文字\" dot />\n    <van-grid-item icon=\"search\" text=\"文字\" badge=\"99+\" />\n  </van-grid>\n</demo-block>\n"
  },
  {
    "path": "packages/grid/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/grid/index.less",
    "content": ".van-grid {\n  position: relative;\n  box-sizing: border-box;\n  overflow: hidden;\n}\n"
  },
  {
    "path": "packages/grid/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\n\nVantComponent({\n  relation: useChildren('grid-item'),\n\n  props: {\n    square: {\n      type: Boolean,\n      observer: 'updateChildren',\n    },\n    gutter: {\n      type: null,\n      value: 0,\n      observer: 'updateChildren',\n    },\n    clickable: {\n      type: Boolean,\n      observer: 'updateChildren',\n    },\n    columnNum: {\n      type: Number,\n      value: 4,\n      observer: 'updateChildren',\n    },\n    center: {\n      type: Boolean,\n      value: true,\n      observer: 'updateChildren',\n    },\n    border: {\n      type: Boolean,\n      value: true,\n      observer: 'updateChildren',\n    },\n    direction: {\n      type: String,\n      observer: 'updateChildren',\n    },\n    iconSize: {\n      type: String,\n      observer: 'updateChildren',\n    },\n    reverse: {\n      type: Boolean,\n      value: false,\n      observer: 'updateChildren',\n    },\n  },\n\n  methods: {\n    updateChildren() {\n      this.children.forEach((child) => {\n        child.updateStyle();\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/grid/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-grid custom-class {{ border && !gutter ? 'van-hairline--top' : '' }}\"\n  style=\"{{ computed.rootStyle({ gutter }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/grid/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'padding-left': addUnit(data.gutter),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "packages/grid/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基本用法\n      </wx-view>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class van-hairline--top\"\n          style=\"padding-left:0px\"\n        >\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义列数\n      </wx-view>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class van-hairline--top\"\n          style=\"padding-left:0px\"\n        >\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px;margin-top:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px;margin-top:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px;margin-top:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义内容\n      </wx-view>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class \"\n          style=\"padding-left:0px\"\n        >\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center \"\n                style=\"\"\n              >\n                <wx-image\n                  src=\"https://img.yzcdn.cn/vant/apple-1.jpg\"\n                  style=\"width: 100%; height: 90px;\"\n                />\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center \"\n                style=\"\"\n              >\n                <wx-image\n                  src=\"https://img.yzcdn.cn/vant/apple-2.jpg\"\n                  style=\"width: 100%; height: 90px;\"\n                />\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center \"\n                style=\"\"\n              >\n                <wx-image\n                  src=\"https://img.yzcdn.cn/vant/apple-3.jpg\"\n                  style=\"width: 100%; height: 90px;\"\n                />\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        正方形格子\n      </wx-view>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class van-hairline--top\"\n          style=\"padding-left:0px\"\n        >\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item van-grid-item--square\"\n              style=\"width:25%;padding-top:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline--surround\"\n                style=\"right:0px;bottom:0px;height:auto\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item van-grid-item--square\"\n              style=\"width:25%;padding-top:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline--surround\"\n                style=\"right:0px;bottom:0px;height:auto\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item van-grid-item--square\"\n              style=\"width:25%;padding-top:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline--surround\"\n                style=\"right:0px;bottom:0px;height:auto\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item van-grid-item--square\"\n              style=\"width:25%;padding-top:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline--surround\"\n                style=\"right:0px;bottom:0px;height:auto\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item van-grid-item--square\"\n              style=\"width:25%;padding-top:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline--surround\"\n                style=\"right:0px;bottom:0px;height:auto\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item van-grid-item--square\"\n              style=\"width:25%;padding-top:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline--surround\"\n                style=\"right:0px;bottom:0px;height:auto\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item van-grid-item--square\"\n              style=\"width:25%;padding-top:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline--surround\"\n                style=\"right:0px;bottom:0px;height:auto\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item van-grid-item--square\"\n              style=\"width:25%;padding-top:25%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline--surround\"\n                style=\"right:0px;bottom:0px;height:auto\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        格子间距\n      </wx-view>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class \"\n          style=\"padding-left:10px\"\n        >\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:10px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:10px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:10px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:10px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:10px;margin-top:10px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:10px;margin-top:10px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:10px;margin-top:10px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:25%;padding-right:10px;margin-top:10px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        内容横排\n      </wx-view>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class van-hairline--top\"\n          style=\"padding-left:0px\"\n        >\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--horizontal van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--horizontal van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:33.333333333333336%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--horizontal van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        页面跳转\n      </wx-view>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class van-hairline--top\"\n          style=\"padding-left:0px\"\n        >\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:50%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-home-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    Navigate 跳转\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:50%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    ReLaunch 跳转\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        徽标提示\n      </wx-view>\n      <van-grid>\n        <wx-view\n          class=\"van-grid custom-class van-hairline--top\"\n          style=\"padding-left:0px\"\n        >\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:50%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-home-o\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      >\n                        <wx-view\n                          class=\"van-info van-info van-info--dot custom-class\"\n                          style=\"\"\n                        >\n                          \n                        </wx-view>\n                      </van-info>\n                    </wx-view>\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n          <van-grid-item>\n            <wx-view\n              class=\"custom-class van-grid-item\"\n              style=\"width:50%;padding-right:0px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"content-class van-grid-item__content van-grid-item__content--center van-hairline--surround\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-grid-item__icon icon-class\"\n                >\n                  <van-icon>\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    >\n                      <van-info\n                        customClass=\"van-icon__info info-class\"\n                      >\n                        <wx-view\n                          class=\"van-info van-info custom-class\"\n                          style=\"\"\n                        >\n                          99+\n                        </wx-view>\n                      </van-info>\n                    </wx-view>\n                  </van-icon>\n                </wx-view>\n                <wx-view\n                  class=\"van-grid-item__text text-class\"\n                >\n                  <wx-text>\n                    文字\n                  </wx-text>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-grid-item>\n        </wx-view>\n      </van-grid>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/grid/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/grid-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/grid-item/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-grid-item {\n  position: relative;\n  float: left;\n  box-sizing: border-box;\n\n  &--square {\n    height: 0;\n  }\n\n  &__content {\n    display: flex;\n    flex-direction: column;\n    box-sizing: border-box;\n    height: 100%;\n    padding: var(--grid-item-content-padding, @grid-item-content-padding);\n    background-color: var(\n      --grid-item-content-background-color,\n      @grid-item-content-background-color\n    );\n\n    &::after {\n      z-index: 1;\n      border-width: 0 @border-width-base @border-width-base 0;\n    }\n\n    &--surround {\n      &::after {\n        border-width: @border-width-base;\n      }\n    }\n\n    &--center {\n      align-items: center;\n      justify-content: center;\n    }\n\n    &--square {\n      position: absolute;\n      top: 0;\n      right: 0;\n      left: 0;\n    }\n\n    &--horizontal {\n      flex-direction: row;\n\n      .van-grid-item__text {\n        margin: 0 0 0 @padding-xs;\n      }\n    }\n\n    &--reverse {\n      flex-direction: column-reverse;\n\n      .van-grid-item__text {\n        margin: 0 0 @padding-xs;\n      }\n    }\n\n    &--horizontal&--reverse {\n      flex-direction: row-reverse;\n\n      .van-grid-item__text {\n        margin: 0 @padding-xs 0 0;\n      }\n    }\n\n    &--clickable:active {\n      background-color: var(\n        --grid-item-content-active-color,\n        @grid-item-content-active-color\n      );\n    }\n  }\n\n  &__icon {\n    display: flex;\n    align-items: center;\n    font-size: var(--grid-item-icon-size, @grid-item-icon-size);\n    height: var(--grid-item-icon-size, @grid-item-icon-size);\n  }\n\n  &__text {\n    word-wrap: break-word;\n    color: var(--grid-item-text-color, @grid-item-text-color);\n    font-size: var(--grid-item-text-font-size, @grid-item-text-font-size);\n  }\n\n  &__icon + &__text {\n    margin-top: 8px;\n  }\n}\n"
  },
  {
    "path": "packages/grid-item/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\nimport { link } from '../mixins/link';\n\nVantComponent({\n  relation: useParent('grid'),\n\n  classes: ['content-class', 'icon-class', 'text-class'],\n\n  mixins: [link],\n\n  props: {\n    icon: String,\n    iconColor: String,\n    iconPrefix: {\n      type: String,\n      value: 'van-icon',\n    },\n    dot: Boolean,\n    info: null,\n    badge: null,\n    text: String,\n    useSlot: Boolean,\n  },\n\n  data: {\n    viewStyle: '',\n  },\n\n  mounted() {\n    this.updateStyle();\n  },\n\n  methods: {\n    updateStyle() {\n      if (!this.parent) {\n        return;\n      }\n\n      const { data, children } = this.parent;\n      const {\n        columnNum,\n        border,\n        square,\n        gutter,\n        clickable,\n        center,\n        direction,\n        reverse,\n        iconSize,\n      } = data;\n\n      this.setData({\n        center,\n        border,\n        square,\n        gutter,\n        clickable,\n        direction,\n        reverse,\n        iconSize,\n        index: children.indexOf(this),\n        columnNum,\n      });\n    },\n\n    onClick() {\n      this.$emit('click');\n      this.jumpLink();\n    },\n  },\n});\n"
  },
  {
    "path": "packages/grid-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('grid-item', { square }) }}\"\n  style=\"{{ computed.wrapperStyle({ square, gutter, columnNum, index }) }}\"\n  bindtap=\"onClick\"\n>\n  <view\n    class=\"content-class {{ utils.bem('grid-item__content', [direction, { center, square, reverse, clickable, surround: border && gutter }]) }} {{ border ? 'van-hairline--surround' : '' }}\"\n    style=\"{{ computed.contentStyle({ square, gutter }) }}\"\n  >\n    <block wx:if=\"{{ useSlot }}\">\n      <slot />\n    </block>\n    <block wx:else>\n      <view class=\"van-grid-item__icon icon-class\">\n        <van-icon wx:if=\"{{ icon }}\" name=\"{{ icon }}\" color=\"{{ iconColor }}\" class-prefix=\"{{ iconPrefix }}\" dot=\"{{ dot }}\" info=\"{{ badge || info }}\" size=\"{{ iconSize }}\" />\n        <slot wx:else name=\"icon\"></slot>\n      </view>\n      <view class=\"van-grid-item__text text-class\">\n        <text wx:if=\"{{ text }}\">{{ text }}</text>\n        <slot wx:else name=\"text\"></slot>\n      </view>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/grid-item/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction wrapperStyle(data) {\n  var width = 100 / data.columnNum + '%';\n\n  return style({\n    width: width,\n    'padding-top': data.square ? width : null,\n    'padding-right': addUnit(data.gutter),\n    'margin-top':\n      data.index >= data.columnNum && !data.square\n        ? addUnit(data.gutter)\n        : null,\n  });\n}\n\nfunction contentStyle(data) {\n  return data.square\n    ? style({\n        right: addUnit(data.gutter),\n        bottom: addUnit(data.gutter),\n        height: 'auto',\n      })\n    : '';\n}\n\nmodule.exports = {\n  wrapperStyle: wrapperStyle,\n  contentStyle: contentStyle,\n};\n"
  },
  {
    "path": "packages/icon/README.md",
    "content": "# Icon 图标\n\n### 介绍\n\n基于字体的图标集，可以通过 Icon 组件使用，也可以在其他组件中通过 icon 属性引用。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-icon\": \"@vant/weapp/icon/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n`Icon`的`name`属性支持传入图标名称或图片链接。\n\n```html\n<van-icon name=\"close\" />\n<van-icon name=\"https://b.yzcdn.cn/vant/icon-demo-1126.png\" />\n```\n\n### 提示信息\n\n设置`dot`属性后，会在图标右上角展示一个小红点。设置`info`属性后，会在图标右上角展示相应的徽标。\n\n```html\n<van-icon name=\"chat\" dot />\n<van-icon name=\"chat\" info=\"9\" />\n<van-icon name=\"chat\" info=\"99+\" />\n```\n\n### 图标颜色\n\n设置`color`属性来控制图标颜色。\n\n```html\n<van-icon name=\"chat\" color=\"red\" />\n```\n\n### 图标大小\n\n设置`size`属性来控制图标大小。\n\n```html\n<van-icon name=\"chat\" size=\"50px\" />\n```\n\n### 自定义图标\n\n如果需要在现有 Icon 的基础上使用更多图标，可以引入第三方 iconfont 对应的字体文件和 CSS 文件，之后就可以在 Icon 组件中直接使用。例如，可以在 `app.wxss` 文件中引入。\n\n```css\n/* 引入第三方或自定义的字体图标样式 */\n@font-face {\n  font-family: 'my-icon';\n  src: url('./my-icon.ttf') format('truetype');\n}\n\n.my-icon {\n  font-family: 'my-icon';\n}\n\n.my-icon-extra::before {\n  content: '\\e626';\n}\n```\n\n```html\n<!-- 通过 class-prefix 指定类名为 my-icon -->\n<van-icon class-prefix=\"my-icon\" name=\"extra\" />\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 图标名称或图片链接 | _string_ | - |\n| dot | 是否显示图标右上角小红点 | _boolean_ | `false` |\n| info | 图标右上角文字提示 | _string \\| number_ | - |\n| color | 图标颜色 | _string_ | `inherit` |\n| size `v1.10.20` | 图标大小，如 `20px`，`2em`，默认单位为`px` | _string \\| number_ | `inherit` |\n| custom-style | 自定义样式 | _string_ | - |\n| class-prefix | 类名前缀 | _string_ | `van-icon` |\n\n### Events\n\n| 事件名     | 说明           | 参数 |\n| ---------- | -------------- | ---- |\n| bind:click | 点击图标时触发 | -    |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n| info-class | 图标右上角文字样式类 |\n\n## 常见问题\n\n### 开发者工具上提示 Failed to load font 是什么情况？\n\n这个是开发者工具本身的问题，可以忽略，具体可以查看[微信小程序文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/font/wx.loadFontFace.html) - 注意事项第 5 条。\n"
  },
  {
    "path": "packages/icon/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-col\": \"../../col/index\",\n    \"van-tab\": \"../../tab/index\",\n    \"van-tabs\": \"../../tabs/index\",\n    \"van-icon\": \"../../icon/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/icon/demo/index.less",
    "content": ".col {\n  display: inline-block;\n  float: none;\n  text-align: center;\n  vertical-align: middle;\n}\n\n.icon {\n  margin: 16px 0;\n  color: #323233;\n}\n\n.text {\n  display: block;\n  height: 36px;\n  margin: -4px 0 4px;\n  padding: 0 5px;\n  color: #646566;\n  font-size: 12px;\n  line-height: 18px;\n}\n\n.demo-tab-pane {\n  margin: 20px;\n  background-color: #fff;\n}\n"
  },
  {
    "path": "packages/icon/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport icons from '@vant/icons/src/config';\n\nVantComponent({\n  data: {\n    icons,\n    active: 0,\n    demoIcon: 'chat-o',\n    demoImage: 'https://b.yzcdn.cn/vant/icon-demo-1126.png',\n  },\n\n  methods: {\n    onSwitch(event) {\n      this.setData({\n        active: event.detail.index,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/icon/demo/index.wxml",
    "content": "<van-tabs\n  active=\"{{ active }}\"\n  color=\"#1989fa\"\n  bind:change=\"onSwitch\"\n>\n  <van-tab title=\"用法示例\" custom-class=\"demo-tab-pane\">\n    <demo-block title=\"基础用法\">\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoIcon }}\"\n          size=\"32px\"\n          custom-class=\"icon\"\n        />\n      </van-col>\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoImage }}\"\n          size=\"32px\"\n          custom-class=\"icon\"\n        />\n      </van-col>\n    </demo-block>\n    <demo-block title=\"提示信息\">\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoIcon }}\"\n          size=\"32px\"\n          custom-class=\"icon\"\n          dot\n        />\n      </van-col>\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoIcon }}\"\n          size=\"32px\"\n          custom-class=\"icon\"\n          info=\"9\"\n        />\n      </van-col>\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoIcon }}\"\n          size=\"32px\"\n          custom-class=\"icon\"\n          info=\"99+\"\n        />\n      </van-col>\n    </demo-block>\n    <demo-block title=\"图标颜色\">\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoIcon }}\"\n          size=\"32px\"\n          custom-class=\"icon\"\n          color=\"#1989fa\"\n        />\n      </van-col>\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoIcon }}\"\n          size=\"32px\"\n          custom-class=\"icon\"\n          color=\"#07c160\"\n        />\n      </van-col>\n    </demo-block>\n    <demo-block title=\"图标大小\">\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoIcon }}\"\n          size=\"40\"\n          custom-class=\"icon\"\n        />\n      </van-col>\n      <van-col\n        custom-class=\"col\"\n        span=\"6\"\n      >\n        <van-icon\n          name=\"{{ demoIcon }}\"\n          size=\"3rem\"\n          custom-class=\"icon\"\n        />\n      </van-col>\n    </demo-block>\n  </van-tab>\n  <van-tab title=\"基础图标\" custom-class=\"demo-tab-pane\">\n    <van-col\n      wx:for=\"{{ icons.basic }}\"\n      wx:key=\"index\"\n      custom-class=\"col\"\n      span=\"6\"\n    >\n      <van-icon\n        name=\"{{ item }}\"\n        size=\"32px\"\n        custom-class=\"icon\"\n      />\n      <view class=\"text\">{{ item }}</view>\n    </van-col>\n  </van-tab>\n  <van-tab title=\"线框风格\" custom-class=\"demo-tab-pane\">\n    <van-col\n      wx:for=\"{{ icons.outline }}\"\n      wx:key=\"index\"\n      custom-class=\"col\"\n      span=\"6\"\n    >\n      <van-icon\n        name=\"{{ item }}\"\n        size=\"32px\"\n        custom-class=\"icon\"\n      />\n      <view class=\"text\">{{ item }}</view>\n    </van-col>\n  </van-tab>\n  <van-tab title=\"实底风格\" custom-class=\"demo-tab-pane\">\n    <van-col\n      wx:for=\"{{ icons.filled }}\"\n      wx:key=\"index\"\n      custom-class=\"col\"\n      span=\"6\"\n    >\n      <van-icon\n        name=\"{{ item }}\"\n        size=\"32px\"\n        custom-class=\"icon\"\n      />\n      <view class=\"text\">{{ item }}</view>\n    </van-col>\n  </van-tab>\n</van-tabs>\n"
  },
  {
    "path": "packages/icon/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "packages/icon/index.less",
    "content": "@import '../common/style/var.less';\n@import '@vant/icons/src/index.less';\n\n:host {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.van-icon {\n  &--custom {\n    position: relative;\n  }\n\n  &--image {\n    width: 1em;\n    height: 1em;\n  }\n\n  &__image {\n    width: 100%;\n    height: 100%;\n  }\n\n  &__info {\n    z-index: 1;\n  }\n}\n"
  },
  {
    "path": "packages/icon/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  classes: ['info-class'],\n  props: {\n    dot: Boolean,\n    info: null,\n    size: null,\n    color: String,\n    customStyle: String,\n    classPrefix: {\n      type: String,\n      value: 'van-icon',\n    },\n    name: String,\n  },\n\n  methods: {\n    onClick() {\n      this.$emit('click');\n    },\n  },\n});\n"
  },
  {
    "path": "packages/icon/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"{{ computed.rootClass({ classPrefix, name }) }}\"\n  style=\"{{ computed.rootStyle({ customStyle, color, size }) }}\"\n  bindtap=\"onClick\"\n>\n  <van-info\n    wx:if=\"{{ info !== null || dot }}\"\n    dot=\"{{ dot }}\"\n    info=\"{{ info }}\"\n    custom-class=\"van-icon__info info-class\"\n  />\n  <image\n    wx:if=\"{{ computed.isImage(name) }}\"\n    src=\"{{ name }}\"\n    mode=\"aspectFit\"\n    class=\"van-icon__image\"\n  />\n</view>\n"
  },
  {
    "path": "packages/icon/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction isImage(name) {\n  return name.indexOf('/') !== -1;\n}\n\nfunction rootClass(data) {\n  var classes = ['custom-class'];\n\n  if (data.classPrefix !== 'van-icon') {\n    classes.push('van-icon--custom')\n  }\n\n  if (data.classPrefix != null) {\n    classes.push(data.classPrefix);\n  }\n\n  if (isImage(data.name)) {\n    classes.push('van-icon--image');\n  } else if (data.classPrefix != null) {\n    classes.push(data.classPrefix + '-' + data.name);\n  }\n\n  return classes.join(' ');\n}\n\nfunction rootStyle(data) {\n  return style([\n    {\n      color: data.color,\n      'font-size': addUnit(data.size),\n    },\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  isImage: isImage,\n  rootClass: rootClass,\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "packages/icon/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <van-tabs\n    bind:change=\"onSwitch\"\n  >\n    <wx-view\n      class=\"custom-class van-tabs\"\n    >\n      <van-sticky\n        bind:scroll=\"onTouchScroll\"\n      >\n        <wx-view\n          class=\"custom-class van-sticky\"\n          style=\"z-index:1\"\n        >\n          <wx-view\n            class=\"van-sticky-wrap\"\n            style=\"z-index:1\"\n          >\n            <wx-view\n              class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n            >\n              <wx-scroll-view\n                class=\"van-tabs__scroll van-tabs__scroll--line\"\n                scrollLeft=\"{{0}}\"\n                scrollWithAnimation=\"{{false}}\"\n                scrollX=\"{{false}}\"\n                style=\"border-color: #1989fa\"\n              >\n                <wx-view\n                  class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"van-tabs__line\"\n                    style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px);background-color:#1989fa\"\n                  />\n                  <wx-view\n                    class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                    data-index=\"{{0}}\"\n                    style=\"\"\n                    bind:tap=\"onTap\"\n                  >\n                    <wx-view\n                      class=\"van-ellipsis\"\n                      style=\"\"\n                    >\n                      \n              用法示例\n              \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"tab-class van-ellipsis van-tab\"\n                    data-index=\"{{1}}\"\n                    style=\"\"\n                    bind:tap=\"onTap\"\n                  >\n                    <wx-view\n                      class=\"van-ellipsis\"\n                      style=\"\"\n                    >\n                      \n              基础图标\n              \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"tab-class van-ellipsis van-tab\"\n                    data-index=\"{{2}}\"\n                    style=\"\"\n                    bind:tap=\"onTap\"\n                  >\n                    <wx-view\n                      class=\"van-ellipsis\"\n                      style=\"\"\n                    >\n                      \n              线框风格\n              \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"tab-class van-ellipsis van-tab\"\n                    data-index=\"{{3}}\"\n                    style=\"\"\n                    bind:tap=\"onTap\"\n                  >\n                    <wx-view\n                      class=\"van-ellipsis\"\n                      style=\"\"\n                    >\n                      \n              实底风格\n              \n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </wx-scroll-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-sticky>\n      <wx-view\n        class=\"van-tabs__content\"\n        bind:touchcancel=\"onTouchEnd\"\n        bind:touchend=\"onTouchEnd\"\n        bind:touchmove=\"onTouchMove\"\n        bind:touchstart=\"onTouchStart\"\n      >\n        <wx-view\n          class=\"van-tabs__track van-tabs__track\"\n          style=\"\"\n        >\n          <van-tab\n            customClass=\"demo-tab-pane\"\n          >\n            <wx-view\n              class=\"custom-class van-tab__pane van-tab__pane--active\"\n              style=\"\"\n            >\n              <demo-block>\n                <wx-view\n                  class=\"custom-class demo-block van-clearfix \"\n                >\n                  <wx-view\n                    class=\"demo-block__title\"\n                  >\n                    基础用法\n                  </wx-view>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-chat-o\"\n                          style=\"font-size:32px\"\n                          bind:tap=\"onClick\"\n                        />\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon--image\"\n                          style=\"font-size:32px\"\n                          bind:tap=\"onClick\"\n                        >\n                          <wx-image\n                            class=\"van-icon__image\"\n                            mode=\"aspectFit\"\n                            src=\"https://b.yzcdn.cn/vant/icon-demo-1126.png\"\n                          />\n                        </wx-view>\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                </wx-view>\n              </demo-block>\n              <demo-block>\n                <wx-view\n                  class=\"custom-class demo-block van-clearfix \"\n                >\n                  <wx-view\n                    class=\"demo-block__title\"\n                  >\n                    提示信息\n                  </wx-view>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-chat-o\"\n                          style=\"font-size:32px\"\n                          bind:tap=\"onClick\"\n                        >\n                          <van-info\n                            customClass=\"van-icon__info info-class\"\n                          >\n                            <wx-view\n                              class=\"van-info van-info van-info--dot custom-class\"\n                              style=\"\"\n                            >\n                              \n                            </wx-view>\n                          </van-info>\n                        </wx-view>\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-chat-o\"\n                          style=\"font-size:32px\"\n                          bind:tap=\"onClick\"\n                        >\n                          <van-info\n                            customClass=\"van-icon__info info-class\"\n                          >\n                            <wx-view\n                              class=\"van-info van-info custom-class\"\n                              style=\"\"\n                            >\n                              9\n                            </wx-view>\n                          </van-info>\n                        </wx-view>\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-chat-o\"\n                          style=\"font-size:32px\"\n                          bind:tap=\"onClick\"\n                        >\n                          <van-info\n                            customClass=\"van-icon__info info-class\"\n                          >\n                            <wx-view\n                              class=\"van-info van-info custom-class\"\n                              style=\"\"\n                            >\n                              99+\n                            </wx-view>\n                          </van-info>\n                        </wx-view>\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                </wx-view>\n              </demo-block>\n              <demo-block>\n                <wx-view\n                  class=\"custom-class demo-block van-clearfix \"\n                >\n                  <wx-view\n                    class=\"demo-block__title\"\n                  >\n                    图标颜色\n                  </wx-view>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-chat-o\"\n                          style=\"color:#1989fa;font-size:32px\"\n                          bind:tap=\"onClick\"\n                        />\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-chat-o\"\n                          style=\"color:#07c160;font-size:32px\"\n                          bind:tap=\"onClick\"\n                        />\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                </wx-view>\n              </demo-block>\n              <demo-block>\n                <wx-view\n                  class=\"custom-class demo-block van-clearfix \"\n                >\n                  <wx-view\n                    class=\"demo-block__title\"\n                  >\n                    图标大小\n                  </wx-view>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-chat-o\"\n                          style=\"font-size:40px\"\n                          bind:tap=\"onClick\"\n                        />\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                  <van-col\n                    customClass=\"col\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-col van-col--6 \"\n                      style=\"\"\n                    >\n                      <van-icon\n                        customClass=\"icon\"\n                      >\n                        <wx-view\n                          class=\"custom-class van-icon van-icon-chat-o\"\n                          style=\"font-size:3rem\"\n                          bind:tap=\"onClick\"\n                        />\n                      </van-icon>\n                    </wx-view>\n                  </van-col>\n                </wx-view>\n              </demo-block>\n            </wx-view>\n          </van-tab>\n          <van-tab\n            customClass=\"demo-tab-pane\"\n          >\n            <wx-view\n              class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n              style=\"display: none;\"\n            />\n          </van-tab>\n          <van-tab\n            customClass=\"demo-tab-pane\"\n          >\n            <wx-view\n              class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n              style=\"display: none;\"\n            />\n          </van-tab>\n          <van-tab\n            customClass=\"demo-tab-pane\"\n          >\n            <wx-view\n              class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n              style=\"display: none;\"\n            />\n          </van-tab>\n        </wx-view>\n      </wx-view>\n    </wx-view>\n  </van-tabs>\n</main>\n`;\n"
  },
  {
    "path": "packages/icon/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/image/README.md",
    "content": "# Image 图片\n\n### 介绍\n\n增强版的 img 标签，提供多种图片填充模式，支持图片懒加载、加载中提示、加载失败提示。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-image\": \"@vant/weapp/image/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)。\n\n## 代码演示\n\n### 基础用法\n\n基础用法与原生 [image](https://developers.weixin.qq.com/miniprogram/dev/component/image.html) 标签一致，可以设置`src`、`width`、`height`等原生属性。\n\n```html\n<van-image width=\"100\" height=\"100\" src=\"https://img.yzcdn.cn/vant/cat.jpeg\" />\n```\n\n### 填充模式\n\n通过`fit`属性可以设置图片填充模式，可选值见下方表格。\n\n```html\n<van-image\n  width=\"10rem\"\n  height=\"10rem\"\n  fit=\"contain\"\n  src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n/>\n```\n\n### 圆形图片\n\n通过`round`属性可以设置图片变圆，注意当图片宽高不相等且`fit`为`contain`或`scale-down`时，将无法填充一个完整的圆形。\n\n```html\n<van-image\n  round\n  width=\"10rem\"\n  height=\"10rem\"\n  src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n/>\n```\n\n### 图片懒加载\n\n图片懒加载，在即将进入一定范围（上下三屏）时才开始加载。\n\n```html\n<van-image\n  width=\"100\"\n  height=\"100\"\n  lazy-load\n  src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n/>\n```\n\n### 加载中提示\n\n`Image`组件提供了默认的加载中提示，支持通过`loading`插槽自定义内容。\n\n```html\n<van-image use-loading-slot>\n  <van-loading slot=\"loading\" type=\"spinner\" size=\"20\" vertical />\n</van-image>\n```\n\n### 加载失败提示\n\n`Image`组件提供了默认的加载失败提示，支持通过`error`插槽自定义内容。\n\n```html\n<van-image use-error-slot>\n  <text slot=\"error\">加载失败</text>\n</van-image>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| src | 图片链接 | _string_ | - |\n| fit | 图片填充模式 | _string_ | _fill_ |\n| alt | 替代文本 | _string_ | - |\n| width | 宽度，默认单位为`px` | _string \\| number_ | - |\n| height | 高度，默认单位为`px` | _string \\| number_ | - |\n| radius | 圆角大小，默认单位为`px` | _string \\| number_ | `0` |\n| round | 是否显示为圆形 | _boolean_ | `false` |\n| lazy-load | 是否懒加载 | _boolean_ | `false` |\n| webp `v1.10.11` | 是否解析 webp 格式 | _boolean_ | `false` |\n| show-error | 是否展示图片加载失败提示 | _boolean_ | `true` |\n| show-loading | 是否展示图片加载中提示 | _boolean_ | `true` |\n| use-error-slot | 是否使用 error 插槽 | _boolean_ | `false` |\n| use-loading-slot | 是否使用 loading 插槽 | _boolean_ | `false` |\n| show-menu-by-longpress | 是否开启长按图片显示识别小程序码菜单 | _boolean_ | `false` |\n\n### 图片填充模式 \b\n\n| 名称      | 含义                                                   |\n| --------- | ------------------------------------------------------ |\n| contain   | 保持宽高缩放图片，使图片的长边能完全显示出来           |\n| cover     | 保持宽高缩放图片，使图片的短边能完全显示出来，裁剪长边 |\n| fill      | 拉伸图片，使图片填满元素                               |\n| widthFix  | 缩放模式，宽度不变，高度自动变化，保持原图宽高比不变   |\n| heightFix | 缩放模式，高度不变，宽度自动变化，保持原图宽高比不变   |\n| none      | 保持图片原有尺寸                                       |\n\n### Events\n\n| 事件名 | 说明               | 回调参数     |\n| ------ | ------------------ | ------------ |\n| bind:click  | 点击图片时触发     | event: Event |\n| bind:load   | 图片加载完毕时触发 | event: Event |\n| bind:error  | 图片加载失败时触发 | event: Event |\n\n### Slots\n\n| 名称    | 说明                       |\n| ------- | -------------------------- |\n| loading | 自定义加载中的提示内容     |\n| error   | 自定义加载失败时的提示内容 |\n\n### 外部样式类\n\n| 类名          | 说明           |\n| ------------- | -------------- |\n| custom-class  | 根节点样式类   |\n| image-class   | 图片样式类     |\n| loading-class | loading 样式类 |\n| error-class   | error 样式类   |\n"
  },
  {
    "path": "packages/image/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-row\": \"../../row/index\",\n    \"van-col\": \"../../col/index\",\n    \"van-image\": \"../../image/index\",\n    \"van-loading\": \"../../loading/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/image/demo/index.less",
    "content": ".text {\n  width: 100%;\n  margin: 5px 0 20px;\n  color: #7d7e80;\n  font-size: 14px;\n  text-align: center;\n}\n"
  },
  {
    "path": "packages/image/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    fits: [\n      'contain',\n      'cover',\n      'fill',\n      'none',\n      'scale-down',\n      'widthFix',\n      'heightFix',\n    ],\n    src: 'https://img.yzcdn.cn/vant/cat.jpeg',\n  },\n});\n"
  },
  {
    "path": "packages/image/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n  <van-row>\n    <van-image\n      width=\"100\"\n      height=\"100\"\n      src=\"{{ src }}\"\n    />\n  </van-row>\n</demo-block>\n\n<demo-block title=\"填充模式\" padding>\n  <van-row gutter=\"20\">\n    <van-col\n      wx:for=\"{{ fits }}\"\n      wx:for-item=\"fit\"\n      wx:key=\"fit\"\n      span=\"8\"\n    >\n      <van-image\n        fit=\"{{ fit }}\"\n        width=\"100%\"\n        height=\"27vw\"\n        src=\"{{ src }}\"\n      />\n      <view class=\"text\">{{ fit }}</view>\n    </van-col>\n  </van-row>\n</demo-block>\n\n<demo-block title=\"圆形图片\" padding>\n  <van-row gutter=\"20\">\n    <van-col\n      wx:for=\"{{ fits }}\"\n      wx:for-item=\"fit\"\n      wx:key=\"fit\"\n      span=\"8\"\n    >\n      <van-image\n        round\n        fit=\"{{ fit }}\"\n        width=\"100%\"\n        height=\"27vw\"\n        src=\"{{ src }}\"\n      />\n      <view class=\"text\">{{ fit }}</view>\n    </van-col>\n  </van-row>\n</demo-block>\n\n<demo-block title=\"加载中提示\" padding>\n  <van-row gutter=\"20\">\n    <van-col span=\"8\">\n      <van-image\n        width=\"100%\"\n        height=\"27vw\"\n      />\n      <view class=\"text\">默认提示</view>\n    </van-col>\n\n    <van-col span=\"8\">\n      <van-image\n        width=\"100%\"\n        height=\"27vw\"\n        use-loading-slot\n      >\n        <van-loading\n          slot=\"loading\"\n          type=\"spinner\"\n          size=\"20\"\n          vertical\n        />\n      </van-image>\n      <view class=\"text\">自定义提示</view>\n    </van-col>\n  </van-row>\n</demo-block>\n\n<demo-block title=\"加载失败提示\" padding>\n  <van-row gutter=\"20\">\n    <van-col span=\"8\">\n      <van-image\n        width=\"100%\"\n        height=\"27vw\"\n        src=\"x\"\n      />\n      <view class=\"text\">默认提示</view>\n    </van-col>\n\n    <van-col span=\"8\">\n      <van-image\n        width=\"100%\"\n        height=\"27vw\"\n        src=\"x\"\n        use-error-slot\n      >\n        <text slot=\"error\">加载失败</text>\n      </van-image>\n      <view class=\"text\">自定义提示</view>\n    </van-col>\n  </van-row>\n</demo-block>\n"
  },
  {
    "path": "packages/image/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "packages/image/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-image {\n  position: relative;\n  display: inline-block;\n  vertical-align: top;\n\n  &--round {\n    overflow: hidden;\n    border-radius: 50%;\n\n    .van-image__img {\n      border-radius: inherit;\n    }\n  }\n\n  &__img,\n  &__error,\n  &__loading {\n    display: block;\n    width: 100%;\n    height: 100%;\n  }\n\n  &__error,\n  &__loading {\n    position: absolute;\n    top: 0;\n    left: 0;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    color: var(--image-placeholder-text-color, @image-placeholder-text-color);\n    font-size: var(--image-placeholder-font-size, @image-placeholder-font-size);\n    background-color: var(\n      --image-placeholder-background-color,\n      @image-placeholder-background-color\n    );\n  }\n\n  &__loading-icon {\n    color: var(--image-loading-icon-color, @image-loading-icon-color);\n    font-size: var(\n      --image-loading-icon-size,\n      @image-loading-icon-size\n    ) !important;\n  }\n\n  &__error-icon {\n    color: var(--image-error-icon-color, @image-error-icon-color);\n    font-size: var(--image-error-icon-size, @image-error-icon-size) !important;\n  }\n}\n"
  },
  {
    "path": "packages/image/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { button } from '../mixins/button';\n\nVantComponent({\n  mixins: [button],\n\n  classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],\n\n  props: {\n    src: {\n      type: String,\n      observer() {\n        this.setData({\n          error: false,\n          loading: true,\n        });\n      },\n    },\n    round: Boolean,\n    width: null,\n    height: null,\n    radius: null,\n    lazyLoad: Boolean,\n    useErrorSlot: Boolean,\n    useLoadingSlot: Boolean,\n    showMenuByLongpress: Boolean,\n    fit: {\n      type: String,\n      value: 'fill',\n    },\n    webp: {\n      type: Boolean,\n      value: false,\n    },\n    showError: {\n      type: Boolean,\n      value: true,\n    },\n    showLoading: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  data: {\n    error: false,\n    loading: true,\n    viewStyle: '',\n  },\n\n  methods: {\n    onLoad(event) {\n      this.setData({\n        loading: false,\n      });\n\n      this.$emit('load', event.detail);\n    },\n\n    onError(event) {\n      this.setData({\n        loading: false,\n        error: true,\n      });\n\n      this.$emit('error', event.detail);\n    },\n\n    onClick(event) {\n      this.$emit('click', event.detail);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/image/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  style=\"{{ computed.rootStyle({ width, height, radius }) }}\"\n  class=\"custom-class {{ utils.bem('image', { round })}}\"\n  bind:tap=\"onClick\"\n>\n  <image\n    wx:if=\"{{ !error }}\"\n    src=\"{{ src }}\"\n    mode=\"{{ computed.mode(fit) }}\"\n    lazy-load=\"{{ lazyLoad }}\"\n    webp=\"{{ webp }}\"\n    class=\"image-class van-image__img\"\n    show-menu-by-longpress=\"{{ showMenuByLongpress }}\"\n    bind:load=\"onLoad\"\n    bind:error=\"onError\"\n  />\n\n  <view\n    wx:if=\"{{ loading && showLoading }}\"\n    class=\"loading-class van-image__loading\"\n  >\n    <slot wx:if=\"{{ useLoadingSlot }}\" name=\"loading\" />\n    <van-icon wx:else name=\"photo\" custom-class=\"van-image__loading-icon\" />\n  </view>\n  <view\n    wx:if=\"{{ error && showError }}\"\n    class=\"error-class van-image__error\"\n  >\n    <slot wx:if=\"{{ useErrorSlot }}\" name=\"error\" />\n    <van-icon wx:else name=\"photo-fail\" custom-class=\"van-image__error-icon\" />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/image/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      width: addUnit(data.width),\n      height: addUnit(data.height),\n      'border-radius': addUnit(data.radius),\n    },\n    data.radius ? 'overflow: hidden' : null,\n  ]);\n}\n\nvar FIT_MODE_MAP = {\n  none: 'center',\n  fill: 'scaleToFill',\n  cover: 'aspectFill',\n  contain: 'aspectFit',\n  widthFix: 'widthFix',\n  heightFix: 'heightFix',\n};\n\nfunction mode(fit) {\n  return FIT_MODE_MAP[fit];\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  mode: mode,\n};\n"
  },
  {
    "path": "packages/image/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"\"\n        >\n          <van-image>\n            <wx-view\n              class=\"custom-class van-image\"\n              style=\"width:100px;height:100px\"\n              bind:tap=\"onClick\"\n            >\n              <wx-image\n                class=\"image-class van-image__img\"\n                lazyLoad=\"{{false}}\"\n                mode=\"scaleToFill\"\n                showMenuByLongpress=\"{{false}}\"\n                src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                webp=\"{{false}}\"\n                bind:error=\"onError\"\n                bind:load=\"onLoad\"\n              />\n              <wx-view\n                class=\"loading-class van-image__loading\"\n              >\n                <van-icon\n                  customClass=\"van-image__loading-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-photo\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n          </van-image>\n        </wx-view>\n      </van-row>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        填充模式\n      </wx-view>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"margin-right:-10px;margin-left:-10px\"\n        >\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"aspectFit\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                contain\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"aspectFill\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                cover\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"scaleToFill\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                fill\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"center\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                none\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                scale-down\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"widthFix\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                widthFix\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"heightFix\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                heightFix\n              </wx-view>\n            </wx-view>\n          </van-col>\n        </wx-view>\n      </van-row>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        圆形图片\n      </wx-view>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"margin-right:-10px;margin-left:-10px\"\n        >\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image van-image--round\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"aspectFit\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                contain\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image van-image--round\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"aspectFill\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                cover\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image van-image--round\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"scaleToFill\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                fill\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image van-image--round\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"center\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                none\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image van-image--round\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                scale-down\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image van-image--round\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"widthFix\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                widthFix\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image van-image--round\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"heightFix\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"https://img.yzcdn.cn/vant/cat.jpeg\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                heightFix\n              </wx-view>\n            </wx-view>\n          </van-col>\n        </wx-view>\n      </van-row>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载中提示\n      </wx-view>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"margin-right:-10px;margin-left:-10px\"\n        >\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"scaleToFill\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                默认提示\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"scaleToFill\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-loading\n                      slot=\"loading\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-loading van-loading--vertical\"\n                      >\n                        <wx-view\n                          class=\"van-loading__spinner van-loading__spinner--spinner\"\n                          style=\"width:20px;height:20px\"\n                        >\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                          <wx-view\n                            class=\"van-loading__dot\"\n                          />\n                        </wx-view>\n                        <wx-view\n                          class=\"van-loading__text\"\n                          style=\"\"\n                        />\n                      </wx-view>\n                    </van-loading>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                自定义提示\n              </wx-view>\n            </wx-view>\n          </van-col>\n        </wx-view>\n      </van-row>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载失败提示\n      </wx-view>\n      <van-row>\n        <wx-view\n          class=\"van-row custom-class\"\n          style=\"margin-right:-10px;margin-left:-10px\"\n        >\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"scaleToFill\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"x\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                默认提示\n              </wx-view>\n            </wx-view>\n          </van-col>\n          <van-col>\n            <wx-view\n              class=\"custom-class van-col van-col--8 \"\n              style=\"padding-right:10px;padding-left:10px\"\n            >\n              <van-image>\n                <wx-view\n                  class=\"custom-class van-image\"\n                  style=\"width:100%;height:27vw\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-image\n                    class=\"image-class van-image__img\"\n                    lazyLoad=\"{{false}}\"\n                    mode=\"scaleToFill\"\n                    showMenuByLongpress=\"{{false}}\"\n                    src=\"x\"\n                    webp=\"{{false}}\"\n                    bind:error=\"onError\"\n                    bind:load=\"onLoad\"\n                  />\n                  <wx-view\n                    class=\"loading-class van-image__loading\"\n                  >\n                    <van-icon\n                      customClass=\"van-image__loading-icon\"\n                    >\n                      <wx-view\n                        class=\"custom-class van-icon van-icon-photo\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      />\n                    </van-icon>\n                  </wx-view>\n                </wx-view>\n              </van-image>\n              <wx-view\n                class=\"text\"\n              >\n                自定义提示\n              </wx-view>\n            </wx-view>\n          </van-col>\n        </wx-view>\n      </van-row>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/image/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/index-anchor/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/index-anchor/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-index-anchor {\n  padding: var(--index-anchor-padding, @index-anchor-padding);\n  color: var(--index-anchor-text-color, @index-anchor-text-color);\n  font-weight: var(--index-anchor-font-weight, @index-anchor-font-weight);\n  font-size: var(--index-anchor-font-size, @index-anchor-font-size);\n  line-height: var(--index-anchor-line-height, @index-anchor-line-height);\n  background-color: var(\n    --index-anchor-background-color,\n    @index-anchor-background-color\n  );\n\n  &--active {\n    right: 0;\n    left: 0;\n    color: var(\n      --index-anchor-active-text-color,\n      @index-anchor-active-text-color\n    );\n    background-color: var(\n      --index-anchor-active-background-color,\n      @index-anchor-active-background-color\n    );\n  }\n}\n"
  },
  {
    "path": "packages/index-anchor/index.ts",
    "content": "import { getRect } from '../common/utils';\nimport { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\n\nVantComponent({\n  relation: useParent('index-bar'),\n\n  props: {\n    useSlot: Boolean,\n    index: null,\n  },\n\n  data: {\n    active: false,\n    wrapperStyle: '',\n    anchorStyle: '',\n  },\n\n  methods: {\n    scrollIntoView(scrollTop) {\n      getRect(this, '.van-index-anchor-wrapper').then((rect) => {\n        wx.pageScrollTo({\n          duration: 0,\n          scrollTop: scrollTop + rect.top - this.parent.data.stickyOffsetTop,\n        });\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/index-anchor/index.wxml",
    "content": "<view\n  class=\"van-index-anchor-wrapper\"\n  style=\"{{ wrapperStyle }}\"\n>\n  <view\n    class=\"van-index-anchor {{ active ? 'van-index-anchor--active van-hairline--bottom' : '' }}\"\n    style=\"{{ anchorStyle }}\"\n  >\n    <slot wx:if=\"{{ useSlot }}\"/>\n    <block wx:else>\n      <text>{{ index }}</text>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/index-bar/README.md",
    "content": "# IndexBar 索引栏\n\n### 介绍\n\n用于列表的索引分类显示和快速定位。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-index-bar\": \"@vant/weapp/index-bar/index\",\n  \"van-index-anchor\": \"@vant/weapp/index-anchor/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)\n\n## 代码演示\n\n### 基础用法\n\n点击索引栏时，会自动跳转到对应的`IndexAnchor`锚点位置。\n\n```html\n<van-index-bar>\n  <view>\n    <van-index-anchor index=\"A\" />\n    <van-cell title=\"文本\" />\n    <van-cell title=\"文本\" />\n    <van-cell title=\"文本\" />\n  </view>\n\n  <view>\n    <van-index-anchor index=\"B\" />\n    <van-cell title=\"文本\" />\n    <van-cell title=\"文本\" />\n    <van-cell title=\"文本\" />\n  </view>\n\n  ...\n</van-index-bar>\n```\n\n### 自定义索引列表\n\n可以通过`index-list`属性自定义展示的索引字符列表。\n\n```html\n<van-index-bar index-list=\"{{ indexList }}\">\n  <view>\n    <van-index-anchor index=\"1\">标题1</van-index-anchor>\n    <van-cell title=\"文本\" />\n    <van-cell title=\"文本\" />\n    <van-cell title=\"文本\" />\n  </view>\n\n  <view>\n    <van-index-anchor index=\"2\">标题2</van-index-anchor>\n    <van-cell title=\"文本\" />\n    <van-cell title=\"文本\" />\n    <van-cell title=\"文本\" />\n  </view>\n\n  ...\n</van-index-bar>\n```\n\n```javascript\nPage({\n  data: {\n    indexList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n  },\n});\n```\n\n## API\n\n### IndexBar Props\n\n| 参数 | 说明 | 类型 | 默认值 | 版本 |\n| --- | --- | --- | --- | --- |\n| index-list | 索引字符列表 | _string[] \\| number[]_ | `A-Z` | - |\n| z-index | z-index 层级 | _number_ | `1` | - |\n| sticky | 是否开启锚点自动吸顶 | _boolean_ | `true` | - |\n| sticky-offset-top | 锚点自动吸顶时与顶部的距离 | _number_ | `0` | - |\n| highlight-color | 索引字符高亮颜色 | _string_ | `#07c160` | - |\n\n### IndexAnchor Props\n\n| 参数     | 说明                     | 类型               | 默认值  | 版本 |\n| -------- | ------------------------ | ------------------ | ------- | ---- |\n| use-slot | 是否使用自定义内容的插槽 | _boolean_          | `false` | -    |\n| index    | 索引字符                 | _string \\| number_ | -       | -    |\n\n### IndexBar Events\n\n| 事件名 | 说明           | 回调参数        |\n| ------ | -------------- | --------------- |\n| select | 选中字符时触发 | index: 索引字符 |\n\n### IndexAnchor Slots\n\n| 名称 | 说明                             |\n| ---- | -------------------------------- |\n| -    | 锚点位置显示内容，默认为索引字符 |\n\n## 常见问题\n\n### 嵌套在滚动元素中 IndexAnchor 失效？\n\n由于 `<IndexBar />` 内部使用 wx.pageScrollTo 滚动到指定位置，因此只支持页面级滚动，无法在滚动元素中嵌套使用，例如：`view` 使用 `overflow: scroll;` 或者 `scroll-view`，具体可查看[微信小程序文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/wx.pageScrollTo.html)。历史 issue: [#4252](https://github.com/youzan/vant-weapp/issues/4252)\n"
  },
  {
    "path": "packages/index-bar/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tab\": \"../../tab/index\",\n    \"van-tabs\": \"../../tabs/index\",\n    \"van-cell\": \"../../cell/index\",\n    \"van-index-bar\": \"../../index-bar/index\",\n    \"van-index-anchor\": \"../../index-anchor/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/index-bar/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nconst indexList: string[] = [];\nconst charCodeOfA = 'A'.charCodeAt(0);\nfor (let i = 0; i < 26; i++) {\n  indexList.push(String.fromCharCode(charCodeOfA + i));\n}\n\nVantComponent({\n  data: {\n    activeTab: 0,\n    indexList,\n    customIndexList: [1, 2, 3, 4, 5, 6, 8, 9, 10],\n    scrollTop: 0,\n  },\n\n  methods: {\n    onChange(event) {\n      this.setData({\n        activeTab: event.detail.name,\n      });\n    },\n\n    onPageScroll(event) {\n      this.setData({\n        scrollTop: event.scrollTop,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/index-bar/demo/index.wxml",
    "content": "<van-tabs\n  active=\"{{ activeTab }}\"\n  bind:change=\"onChange\"\n>\n  <van-tab title=\"基础用法\">\n    <van-index-bar\n      wx:if=\"{{ activeTab === 0 }}\"\n      scroll-top=\"{{ scrollTop }}\"\n    >\n      <view\n        wx:for=\"{{ indexList }}\"\n        wx:for-item=\"item\"\n        wx:key=\"item\"\n      >\n        <van-index-anchor index=\"{{ item }}\" />\n        <van-cell title=\"文本\" />\n        <van-cell title=\"文本\" />\n        <van-cell title=\"文本\" />\n      </view>\n    </van-index-bar>\n  </van-tab>\n\n  <van-tab title=\"自定义索引列表\">\n    <van-index-bar\n      wx:if=\"{{ activeTab === 1 }}\"\n      index-list=\"{{ customIndexList }}\"\n      scroll-top=\"{{ scrollTop }}\"\n    >\n      <view\n        wx:for=\"{{ customIndexList }}\"\n        wx:key=\"index\"\n      >\n        <van-index-anchor\n          use-slot\n          index=\"{{ item }}\"\n        >\n          <text>标题{{ item }}</text>\n        </van-index-anchor>\n        <van-cell title=\"文本\" />\n        <van-cell title=\"文本\" />\n        <van-cell title=\"文本\" />\n      </view>\n    </van-index-bar>\n  </van-tab>\n</van-tabs>\n"
  },
  {
    "path": "packages/index-bar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/index-bar/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-index-bar {\n  position: relative;\n\n  &__sidebar {\n    position: fixed;\n    top: 50%;\n    right: 0;\n    display: flex;\n    flex-direction: column;\n    text-align: center;\n    transform: translateY(-50%);\n    user-select: none;\n  }\n\n  &__index {\n    font-weight: 500;\n    padding: 0 var(--padding-base, @padding-base) 0\n      var(--padding-md, @padding-md);\n    font-size: var(--index-bar-index-font-size, @index-bar-index-font-size);\n    line-height: var(\n      --index-bar-index-line-height,\n      @index-bar-index-line-height\n    );\n  }\n}\n"
  },
  {
    "path": "packages/index-bar/index.ts",
    "content": "import { GREEN } from '../common/color';\nimport { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nimport { getRect, isDef } from '../common/utils';\nimport { pageScrollMixin } from '../mixins/page-scroll';\n\nconst indexList = () => {\n  const indexList: string[] = [];\n  const charCodeOfA = 'A'.charCodeAt(0);\n\n  for (let i = 0; i < 26; i++) {\n    indexList.push(String.fromCharCode(charCodeOfA + i));\n  }\n\n  return indexList;\n};\n\nVantComponent({\n  relation: useChildren('index-anchor', function () {\n    this.updateData();\n  }),\n\n  props: {\n    sticky: {\n      type: Boolean,\n      value: true,\n    },\n    zIndex: {\n      type: Number,\n      value: 1,\n    },\n    highlightColor: {\n      type: String,\n      value: GREEN,\n    },\n    stickyOffsetTop: {\n      type: Number,\n      value: 0,\n    },\n    indexList: {\n      type: Array,\n      value: indexList(),\n    },\n  },\n\n  mixins: [\n    pageScrollMixin(function (event) {\n      this.scrollTop = event?.scrollTop || 0;\n      this.onScroll();\n    }),\n  ],\n\n  data: {\n    activeAnchorIndex: null,\n    showSidebar: false,\n  },\n\n  created() {\n    this.scrollTop = 0;\n  },\n\n  methods: {\n    updateData() {\n      wx.nextTick(() => {\n        if (this.timer != null) {\n          clearTimeout(this.timer);\n        }\n\n        this.timer = setTimeout(() => {\n          this.setData({\n            showSidebar: !!this.children.length,\n          });\n\n          this.setRect().then(() => {\n            this.onScroll();\n          });\n        }, 0);\n      });\n    },\n\n    setRect() {\n      return Promise.all([\n        this.setAnchorsRect(),\n        this.setListRect(),\n        this.setSiderbarRect(),\n      ]);\n    },\n\n    setAnchorsRect() {\n      return Promise.all(\n        this.children.map((anchor) =>\n          getRect(anchor, '.van-index-anchor-wrapper').then((rect) => {\n            Object.assign(anchor, {\n              height: rect.height,\n              top: rect.top + this.scrollTop,\n            });\n          })\n        )\n      );\n    },\n\n    setListRect() {\n      return getRect(this, '.van-index-bar').then((rect) => {\n        if (!isDef(rect)) {\n          return;\n        }\n        Object.assign(this, {\n          height: rect.height,\n          top: rect.top + this.scrollTop,\n        });\n      });\n    },\n\n    setSiderbarRect() {\n      return getRect(this, '.van-index-bar__sidebar').then((res) => {\n        if (!isDef(res)) {\n          return;\n        }\n        this.sidebar = {\n          height: res.height,\n          top: res.top,\n        };\n      });\n    },\n\n    setDiffData({ target, data }) {\n      const diffData = {};\n\n      Object.keys(data).forEach((key) => {\n        if (target.data[key] !== data[key]) {\n          diffData[key] = data[key];\n        }\n      });\n\n      if (Object.keys(diffData).length) {\n        target.setData(diffData);\n      }\n    },\n\n    getAnchorRect(anchor) {\n      return getRect(anchor, '.van-index-anchor-wrapper').then((rect) => ({\n        height: rect.height,\n        top: rect.top,\n      }));\n    },\n\n    getActiveAnchorIndex() {\n      const { children, scrollTop } = this;\n      const { sticky, stickyOffsetTop } = this.data;\n\n      for (let i = this.children.length - 1; i >= 0; i--) {\n        const preAnchorHeight = i > 0 ? children[i - 1].height : 0;\n        const reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;\n\n        if (reachTop + scrollTop >= children[i].top) {\n          return i;\n        }\n      }\n\n      return -1;\n    },\n\n    onScroll() {\n      const { children = [], scrollTop } = this;\n\n      if (!children.length) {\n        return;\n      }\n\n      const { sticky, stickyOffsetTop, zIndex, highlightColor } = this.data;\n\n      const active = this.getActiveAnchorIndex();\n\n      this.setDiffData({\n        target: this,\n        data: {\n          activeAnchorIndex: active,\n        },\n      });\n\n      if (sticky) {\n        let isActiveAnchorSticky = false;\n\n        if (active !== -1) {\n          isActiveAnchorSticky =\n            children[active].top <= stickyOffsetTop + scrollTop;\n        }\n\n        children.forEach((item, index) => {\n          if (index === active) {\n            let wrapperStyle = '';\n            let anchorStyle = `\n              color: ${highlightColor};\n            `;\n\n            if (isActiveAnchorSticky) {\n              wrapperStyle = `\n                height: ${children[index].height}px;\n              `;\n\n              anchorStyle = `\n                position: fixed;\n                top: ${stickyOffsetTop}px;\n                z-index: ${zIndex};\n                color: ${highlightColor};\n              `;\n            }\n\n            this.setDiffData({\n              target: item,\n              data: {\n                active: true,\n                anchorStyle,\n                wrapperStyle,\n              },\n            });\n          } else if (index === active - 1) {\n            const currentAnchor = children[index];\n\n            const currentOffsetTop = currentAnchor.top;\n            const targetOffsetTop =\n              index === children.length - 1\n                ? this.top\n                : children[index + 1].top;\n\n            const parentOffsetHeight = targetOffsetTop - currentOffsetTop;\n            const translateY = parentOffsetHeight - currentAnchor.height;\n\n            const anchorStyle = `\n              position: relative;\n              transform: translate3d(0, ${translateY}px, 0);\n              z-index: ${zIndex};\n              color: ${highlightColor};\n            `;\n\n            this.setDiffData({\n              target: item,\n              data: {\n                active: true,\n                anchorStyle,\n              },\n            });\n          } else {\n            this.setDiffData({\n              target: item,\n              data: {\n                active: false,\n                anchorStyle: '',\n                wrapperStyle: '',\n              },\n            });\n          }\n        });\n      }\n    },\n\n    onClick(event) {\n      this.scrollToAnchor(event.target.dataset.index);\n    },\n\n    onTouchMove(event) {\n      const sidebarLength = this.children.length;\n      const touch = event.touches[0];\n      const itemHeight = this.sidebar.height / sidebarLength;\n      let index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);\n\n      if (index < 0) {\n        index = 0;\n      } else if (index > sidebarLength - 1) {\n        index = sidebarLength - 1;\n      }\n\n      this.scrollToAnchor(index);\n    },\n\n    onTouchStop() {\n      this.scrollToAnchorIndex = null;\n    },\n\n    scrollToAnchor(index) {\n      if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {\n        return;\n      }\n\n      this.scrollToAnchorIndex = index;\n\n      const anchor = this.children.find(\n        (item) => item.data.index === this.data.indexList[index]\n      );\n\n      if (anchor) {\n        anchor.scrollIntoView(this.scrollTop);\n        this.$emit('select', anchor.data.index);\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/index-bar/index.wxml",
    "content": "<view class=\"van-index-bar\">\n  <slot />\n\n  <view\n    wx:if=\"{{ showSidebar }}\"\n    class=\"van-index-bar__sidebar\"\n    catch:tap=\"onClick\"\n    catch:touchmove=\"onTouchMove\"\n    catch:touchend=\"onTouchStop\"\n    catch:touchcancel=\"onTouchStop\"\n  >\n    <view\n      wx:for=\"{{ indexList }}\"\n      wx:key=\"index\"\n      class=\"van-index-bar__index\"\n      style=\"z-index: {{ zIndex + 1 }}; color: {{ activeAnchorIndex === index ? highlightColor : '' }}\"\n      data-index=\"{{ index }}\"\n    >\n      {{ item }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/index-bar/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <van-tabs\n    bind:change=\"onChange\"\n  >\n    <wx-view\n      class=\"custom-class van-tabs\"\n    >\n      <van-sticky\n        bind:scroll=\"onTouchScroll\"\n      >\n        <wx-view\n          class=\"custom-class van-sticky\"\n          style=\"z-index:1\"\n        >\n          <wx-view\n            class=\"van-sticky-wrap\"\n            style=\"z-index:1\"\n          >\n            <wx-view\n              class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n            >\n              <wx-scroll-view\n                class=\"van-tabs__scroll van-tabs__scroll--line\"\n                scrollLeft=\"{{0}}\"\n                scrollWithAnimation=\"{{false}}\"\n                scrollX=\"{{false}}\"\n                style=\"\"\n              >\n                <wx-view\n                  class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"van-tabs__line\"\n                    style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                  />\n                  <wx-view\n                    class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                    data-index=\"{{0}}\"\n                    style=\"\"\n                    bind:tap=\"onTap\"\n                  >\n                    <wx-view\n                      class=\"van-ellipsis\"\n                      style=\"\"\n                    >\n                      \n              基础用法\n              \n                    </wx-view>\n                  </wx-view>\n                  <wx-view\n                    class=\"tab-class van-ellipsis van-tab\"\n                    data-index=\"{{1}}\"\n                    style=\"\"\n                    bind:tap=\"onTap\"\n                  >\n                    <wx-view\n                      class=\"van-ellipsis\"\n                      style=\"\"\n                    >\n                      \n              自定义索引列表\n              \n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </wx-scroll-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-sticky>\n      <wx-view\n        class=\"van-tabs__content\"\n        bind:touchcancel=\"onTouchEnd\"\n        bind:touchend=\"onTouchEnd\"\n        bind:touchmove=\"onTouchMove\"\n        bind:touchstart=\"onTouchStart\"\n      >\n        <wx-view\n          class=\"van-tabs__track van-tabs__track\"\n          style=\"\"\n        >\n          <van-tab>\n            <wx-view\n              class=\"custom-class van-tab__pane van-tab__pane--active\"\n              style=\"\"\n            >\n              <van-index-bar\n                scrollTop=\"{{0}}\"\n              >\n                <wx-view\n                  class=\"van-index-bar\"\n                >\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            A\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            B\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            C\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            D\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            E\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            F\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            G\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            H\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            I\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            J\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            K\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            L\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            M\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            N\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            O\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            P\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            Q\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            R\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            S\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            T\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            U\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            V\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            W\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            X\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            Y\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                  <wx-view>\n                    <van-index-anchor>\n                      <wx-view\n                        class=\"van-index-anchor-wrapper\"\n                        style=\"\"\n                      >\n                        <wx-view\n                          class=\"van-index-anchor \"\n                          style=\"\"\n                        >\n                          <wx-text>\n                            Z\n                          </wx-text>\n                        </wx-view>\n                      </wx-view>\n                    </van-index-anchor>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                    <van-cell>\n                      <wx-view\n                        class=\"custom-class van-cell\"\n                        hoverClass=\"van-cell--hover hover-class\"\n                        hoverStayTime=\"70\"\n                        style=\"\"\n                        bind:tap=\"onClick\"\n                      >\n                        <wx-view\n                          class=\"van-cell__title title-class\"\n                          style=\"\"\n                        >\n                          文本\n                        </wx-view>\n                        <wx-view\n                          class=\"van-cell__value value-class\"\n                        />\n                      </wx-view>\n                    </van-cell>\n                  </wx-view>\n                </wx-view>\n              </van-index-bar>\n            </wx-view>\n          </van-tab>\n          <van-tab>\n            <wx-view\n              class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n              style=\"display: none;\"\n            />\n          </van-tab>\n        </wx-view>\n      </wx-view>\n    </wx-view>\n  </van-tabs>\n</main>\n`;\n"
  },
  {
    "path": "packages/index-bar/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/info/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/info/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-info {\n  position: absolute;\n  top: 0;\n  right: 0;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  box-sizing: border-box;\n  white-space: nowrap;\n  transform: translate(50%, -50%);\n  transform-origin: 100%;\n  height: var(--info-size, @info-size);\n  min-width: var(--info-size, @info-size);\n  padding: var(--info-padding, @info-padding);\n  color: var(--info-color, @info-color);\n  font-weight: var(--info-font-weight, @info-font-weight);\n  font-size: var(--info-font-size, @info-font-size);\n  font-family: var(--info-font-family, @info-font-family);\n  background-color: var(--info-background-color, @info-background-color);\n  border: var(--info-border-width, @info-border-width) solid @white;\n  border-radius: var(--info-size, @info-size);\n\n  &--dot {\n    min-width: 0;\n    border-radius: 100%;\n    width: var(--info-dot-size, @info-dot-size);\n    height: var(--info-dot-size, @info-dot-size);\n    background-color: var(--info-dot-color, @info-dot-color);\n  }\n}\n"
  },
  {
    "path": "packages/info/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    dot: Boolean,\n    info: null,\n    customStyle: String,\n  },\n});\n"
  },
  {
    "path": "packages/info/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ info !== null && info !== '' || dot }}\"\n  class=\"van-info {{ utils.bem('info', { dot }) }} custom-class\"\n  style=\"{{ customStyle }}\"\n>{{ dot ? '' : info }}</view>\n"
  },
  {
    "path": "packages/loading/README.md",
    "content": "# Loading 加载\n\n### 介绍\n\n加载图标，用于表示加载中的过渡状态。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-loading\": \"@vant/weapp/loading/index\"\n}\n```\n\n## 代码演示\n\n### 加载类型\n\n```html\n<van-loading /> <van-loading type=\"spinner\" />\n```\n\n### 自定义颜色\n\n```html\n<van-loading color=\"#1989fa\" /> <van-loading type=\"spinner\" color=\"#1989fa\" />\n```\n\n### 加载文案\n\n```html\n<van-loading size=\"24px\">加载中...</van-loading>\n```\n\n### 垂直排列\n\n```html\n<van-loading size=\"24px\" vertical>加载中...</van-loading>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| color | 颜色 | _string_ | `#c9c9c9` |\n| type | 类型，可选值为 `spinner` | _string_ | `circular` |\n| size | 加载图标大小，默认单位为 `px` | _string \\| number_ | `30px` |\n| text-size `v1.0.0` | 文字大小，默认单位为为 `px` | _string \\| number_ | `14px` |\n| vertical `v1.0.0` | 是否垂直排列图标和文字内容 | _boolean_ | `false` |\n\n### Slots\n\n| 名称 | 说明     |\n| ---- | -------- |\n| -    | 加载文案 |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n"
  },
  {
    "path": "packages/loading/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-loading\": \"../../loading/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/loading/demo/index.less",
    "content": ".demo-loading {\n  margin: 4px 16px 4px 0;\n}\n"
  },
  {
    "path": "packages/loading/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {},\n});\n"
  },
  {
    "path": "packages/loading/demo/index.wxml",
    "content": "<demo-block title=\"加载类型\" padding>\n  <van-loading custom-class=\"demo-loading\" />\n  <van-loading custom-class=\"demo-loading\" type=\"spinner\" />\n</demo-block>\n\n<demo-block title=\"自定义颜色\" padding>\n  <van-loading custom-class=\"demo-loading\" color=\"#1989fa\" />\n  <van-loading custom-class=\"demo-loading\" type=\"spinner\" color=\"#1989fa\" />\n</demo-block>\n\n<demo-block title=\"加载文案\" padding>\n  <van-loading custom-class=\"demo-loading\" size=\"24px\">加载中...</van-loading>\n</demo-block>\n\n<demo-block title=\"垂直排列\" padding>\n  <van-loading custom-class=\"demo-loading\" size=\"24px\" vertical>加载中...</van-loading>\n</demo-block>\n"
  },
  {
    "path": "packages/loading/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/loading/index.less",
    "content": "@import '../common/style/var.less';\n\n:host {\n  font-size: 0;\n  line-height: 1;\n}\n\n.van-loading {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--loading-spinner-color, @loading-spinner-color);\n\n  &__spinner {\n    position: relative;\n    box-sizing: border-box;\n    width: var(--loading-spinner-size, @loading-spinner-size);\n    // compatible for 0.x, users may set width or height in root element\n    max-width: 100%;\n    max-height: 100%;\n    height: var(--loading-spinner-size, @loading-spinner-size);\n    animation: van-rotate\n      var(\n        --loading-spinner-animation-duration,\n        @loading-spinner-animation-duration\n      )\n      linear infinite;\n\n    &--spinner {\n      animation-timing-function: steps(12);\n    }\n\n    &--circular {\n      border: 1px solid transparent;\n      border-top-color: currentColor;\n      border-radius: 100%;\n    }\n  }\n\n  &__text {\n    margin-left: var(--padding-xs, @padding-xs);\n    color: var(--loading-text-color, @loading-text-color);\n    font-size: var(--loading-text-font-size, @loading-text-font-size);\n    line-height: var(--loading-text-line-height, @loading-text-line-height);\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &--vertical {\n    flex-direction: column;\n\n    .van-loading__text {\n      margin: var(--padding-xs, @padding-xs) 0 0;\n    }\n  }\n\n  &__dot {\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n\n    &::before {\n      display: block;\n      width: 2px;\n      height: 25%;\n      margin: 0 auto;\n      background-color: currentColor;\n      border-radius: 40%;\n      content: ' ';\n    }\n  }\n}\n\n.generate(@n, @i: 1) when (@i =< @n) {\n  .van-loading__dot:nth-of-type(@{i}) {\n    transform: rotate(@i * 30deg);\n    opacity: 1 - (0.75 / 12) * (@i - 1);\n  }\n  .generate(@n, (@i + 1));\n}\n.generate(12);\n\n@keyframes van-rotate {\n  from {\n    transform: rotate(0deg);\n  }\n\n  to {\n    transform: rotate(360deg);\n  }\n}\n"
  },
  {
    "path": "packages/loading/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    color: String,\n    vertical: Boolean,\n    type: {\n      type: String,\n      value: 'circular',\n    },\n    size: String,\n    textSize: String,\n  },\n\n  data: {\n    array12: Array.from({ length: 12 }),\n  },\n});\n"
  },
  {
    "path": "packages/loading/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class {{ utils.bem('loading', { vertical }) }}\">\n  <view\n    class=\"van-loading__spinner van-loading__spinner--{{ type }}\"\n    style=\"{{ computed.spinnerStyle({ color, size }) }}\"\n  >\n    <view\n      wx:if=\"{{ type === 'spinner' }}\"\n      wx:for=\"{{ array12 }}\"\n      wx:key=\"index\"\n      class=\"van-loading__dot\"\n    />\n  </view>\n  <view class=\"van-loading__text\" style=\"{{ computed.textStyle({ textSize }) }}\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/loading/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction spinnerStyle(data) {\n  return style({\n    color: data.color,\n    width: addUnit(data.size),\n    height: addUnit(data.size),\n  });\n}\n\nfunction textStyle(data) {\n  return style({\n    'font-size': addUnit(data.textSize),\n  });\n}\n\nmodule.exports = {\n  spinnerStyle: spinnerStyle,\n  textStyle: textStyle,\n};\n"
  },
  {
    "path": "packages/loading/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载类型\n      </wx-view>\n      <van-loading\n        customClass=\"demo-loading\"\n      >\n        <wx-view\n          class=\"custom-class van-loading\"\n        >\n          <wx-view\n            class=\"van-loading__spinner van-loading__spinner--circular\"\n            style=\"\"\n          />\n          <wx-view\n            class=\"van-loading__text\"\n            style=\"\"\n          />\n        </wx-view>\n      </van-loading>\n      <van-loading\n        customClass=\"demo-loading\"\n      >\n        <wx-view\n          class=\"custom-class van-loading\"\n        >\n          <wx-view\n            class=\"van-loading__spinner van-loading__spinner--spinner\"\n            style=\"\"\n          >\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n          </wx-view>\n          <wx-view\n            class=\"van-loading__text\"\n            style=\"\"\n          />\n        </wx-view>\n      </van-loading>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义颜色\n      </wx-view>\n      <van-loading\n        customClass=\"demo-loading\"\n      >\n        <wx-view\n          class=\"custom-class van-loading\"\n        >\n          <wx-view\n            class=\"van-loading__spinner van-loading__spinner--circular\"\n            style=\"color:#1989fa\"\n          />\n          <wx-view\n            class=\"van-loading__text\"\n            style=\"\"\n          />\n        </wx-view>\n      </van-loading>\n      <van-loading\n        customClass=\"demo-loading\"\n      >\n        <wx-view\n          class=\"custom-class van-loading\"\n        >\n          <wx-view\n            class=\"van-loading__spinner van-loading__spinner--spinner\"\n            style=\"color:#1989fa\"\n          >\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n            <wx-view\n              class=\"van-loading__dot\"\n            />\n          </wx-view>\n          <wx-view\n            class=\"van-loading__text\"\n            style=\"\"\n          />\n        </wx-view>\n      </van-loading>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载文案\n      </wx-view>\n      <van-loading\n        customClass=\"demo-loading\"\n      >\n        <wx-view\n          class=\"custom-class van-loading\"\n        >\n          <wx-view\n            class=\"van-loading__spinner van-loading__spinner--circular\"\n            style=\"width:24px;height:24px\"\n          />\n          <wx-view\n            class=\"van-loading__text\"\n            style=\"\"\n          >\n            加载中...\n          </wx-view>\n        </wx-view>\n      </van-loading>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        垂直排列\n      </wx-view>\n      <van-loading\n        customClass=\"demo-loading\"\n      >\n        <wx-view\n          class=\"custom-class van-loading van-loading--vertical\"\n        >\n          <wx-view\n            class=\"van-loading__spinner van-loading__spinner--circular\"\n            style=\"width:24px;height:24px\"\n          />\n          <wx-view\n            class=\"van-loading__text\"\n            style=\"\"\n          >\n            加载中...\n          </wx-view>\n        </wx-view>\n      </van-loading>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/loading/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/mixins/basic.ts",
    "content": "export const basic = Behavior({\n  methods: {\n    $emit(\n      name: string,\n      detail?: Record<string, unknown>,\n      options?: WechatMiniprogram.Component.TriggerEventOption\n    ) {\n      this.triggerEvent(name, detail, options);\n    },\n\n    set(data: Record<string, unknown>) {\n      this.setData(data);\n\n      return new Promise((resolve) => wx.nextTick(resolve));\n    },\n\n    // high performance setData\n    setView(\n      this: WechatMiniprogram.Component.TrivialInstance,\n      data: Record<string, any>,\n      callback?: () => void\n    ) {\n      const target: Record<string, any> = {};\n      let hasChange = false;\n\n      Object.keys(data).forEach((key) => {\n        if (data[key] !== this.data[key]) {\n          target[key] = data[key];\n          hasChange = true;\n        }\n      });\n\n      if (hasChange) {\n        return this.setData(target, callback);\n      }\n\n      return callback && callback();\n    },\n  },\n});\n"
  },
  {
    "path": "packages/mixins/button.ts",
    "content": "import { canIUseGetUserProfile } from '../common/version';\n\nexport const button = Behavior({\n  externalClasses: ['hover-class'],\n\n  properties: {\n    id: String,\n    buttonId: String,\n    lang: String,\n    businessId: Number,\n    sessionFrom: String,\n    sendMessageTitle: String,\n    sendMessagePath: String,\n    sendMessageImg: String,\n    showMessageCard: Boolean,\n    appParameter: String,\n    ariaLabel: String,\n    openType: String,\n    getUserProfileDesc: String,\n  },\n\n  data: {\n    canIUseGetUserProfile: canIUseGetUserProfile(),\n  },\n\n  methods: {\n    onGetUserInfo(event: WechatMiniprogram.ButtonGetUserInfo) {\n      this.triggerEvent('getuserinfo', event.detail);\n    },\n\n    onContact(event: WechatMiniprogram.ButtonContact) {\n      this.triggerEvent('contact', event.detail);\n    },\n\n    onGetPhoneNumber(event: WechatMiniprogram.ButtonGetPhoneNumber) {\n      this.triggerEvent('getphonenumber', event.detail);\n    },\n\n    onGetRealTimePhoneNumber(event: WechatMiniprogram.ButtonGetPhoneNumber) {\n      this.triggerEvent('getrealtimephonenumber', event.detail);\n    },\n\n    onError(event: WechatMiniprogram.ButtonError) {\n      this.triggerEvent('error', event.detail);\n    },\n\n    onLaunchApp(event: WechatMiniprogram.ButtonLaunchApp) {\n      this.triggerEvent('launchapp', event.detail);\n    },\n\n    onOpenSetting(event: WechatMiniprogram.ButtonOpenSetting) {\n      this.triggerEvent('opensetting', event.detail);\n    },\n\n    onAgreePrivacyAuthorization(event) {\n      this.triggerEvent('agreeprivacyauthorization', event.detail);\n    },\n\n    onChooseAvatar(\n      event: WechatMiniprogram.CustomEvent<\n        WechatMiniprogram.GeneralCallbackResult & { avatarUrl: string }\n      >\n    ) {\n      this.triggerEvent('chooseavatar', event.detail);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/mixins/link.ts",
    "content": "export const link = Behavior({\n  properties: {\n    url: String,\n    linkType: {\n      type: String,\n      value: 'navigateTo',\n    },\n  },\n\n  methods: {\n    jumpLink(urlKey = 'url') {\n      const url = this.data[urlKey];\n      if (url) {\n        if (\n          this.data.linkType === 'navigateTo' &&\n          getCurrentPages().length > 9\n        ) {\n          wx.redirectTo({ url });\n        } else {\n          wx[this.data.linkType]({ url });\n        }\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/mixins/page-scroll.ts",
    "content": "import { isFunction } from '../common/validator';\nimport { getCurrentPage, isDef } from '../common/utils';\n\ntype IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;\ntype Scroller = (\n  this: WechatMiniprogram.Component.TrivialInstance,\n  event?: IPageScrollOption\n) => void;\n\nfunction onPageScroll(event?: IPageScrollOption) {\n  const { vanPageScroller = [] } = getCurrentPage<{\n    vanPageScroller: Scroller[];\n  }>();\n\n  vanPageScroller.forEach((scroller: Scroller) => {\n    if (typeof scroller === 'function') {\n      // @ts-ignore\n      scroller(event);\n    }\n  });\n}\n\nexport function pageScrollMixin(scroller: Scroller) {\n  return Behavior({\n    attached(this: WechatMiniprogram.Component.TrivialInstance) {\n      const page = getCurrentPage<{ vanPageScroller: Scroller[] }>();\n\n      if (!isDef(page)) {\n        return;\n      }\n\n      const _scroller = scroller.bind(this);\n\n      const { vanPageScroller = [] } = page;\n\n      if (isFunction(page.onPageScroll) && page.onPageScroll !== onPageScroll) {\n        vanPageScroller.push(page.onPageScroll.bind(page));\n      }\n\n      vanPageScroller.push(_scroller);\n\n      page.vanPageScroller = vanPageScroller;\n      page.onPageScroll = onPageScroll;\n\n      this._scroller = _scroller;\n    },\n\n    detached(this: WechatMiniprogram.Component.TrivialInstance) {\n      const page = getCurrentPage<{ vanPageScroller: Scroller[] }>();\n\n      if (!isDef(page) || !isDef(page.vanPageScroller)) {\n        return;\n      }\n\n      const { vanPageScroller } = page;\n\n      const index = vanPageScroller.findIndex((v) => v === this._scroller);\n\n      if (index > -1) {\n        page.vanPageScroller.splice(index, 1);\n      }\n\n      this._scroller = undefined;\n    },\n  });\n}\n"
  },
  {
    "path": "packages/mixins/touch.ts",
    "content": "// @ts-nocheck\nconst MIN_DISTANCE = 10;\n\nfunction getDirection(x: number, y: number) {\n  if (x > y && x > MIN_DISTANCE) {\n    return 'horizontal';\n  }\n\n  if (y > x && y > MIN_DISTANCE) {\n    return 'vertical';\n  }\n\n  return '';\n}\n\nexport const touch = Behavior({\n  methods: {\n    resetTouchStatus() {\n      this.direction = '';\n      this.deltaX = 0;\n      this.deltaY = 0;\n      this.offsetX = 0;\n      this.offsetY = 0;\n    },\n\n    touchStart(event: WechatMiniprogram.TouchEvent) {\n      this.resetTouchStatus();\n      const touch = event.touches[0];\n      this.startX = touch.clientX;\n      this.startY = touch.clientY;\n    },\n\n    touchMove(event: WechatMiniprogram.TouchEvent) {\n      const touch = event.touches[0];\n      this.deltaX = touch.clientX - this.startX;\n      this.deltaY = touch.clientY - this.startY;\n      this.offsetX = Math.abs(this.deltaX);\n      this.offsetY = Math.abs(this.deltaY);\n      this.direction =\n        this.direction || getDirection(this.offsetX, this.offsetY);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/mixins/transition.ts",
    "content": "// @ts-nocheck\nimport { requestAnimationFrame } from '../common/utils';\nimport { isObj } from '../common/validator';\n\nconst getClassNames = (name: string) => ({\n  enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`,\n  'enter-to': `van-${name}-enter-to van-${name}-enter-active enter-to-class enter-active-class`,\n  leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`,\n  'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class`,\n});\n\nexport function transition(showDefaultValue: boolean) {\n  return Behavior({\n    properties: {\n      customStyle: String,\n      // @ts-ignore\n      show: {\n        type: Boolean,\n        value: showDefaultValue,\n        observer: 'observeShow',\n      },\n      // @ts-ignore\n      duration: {\n        type: null,\n        value: 300,\n      },\n      name: {\n        type: String,\n        value: 'fade',\n      },\n    },\n\n    data: {\n      type: '',\n      inited: false,\n      display: false,\n    },\n\n    ready() {\n      if (this.data.show === true) {\n        this.observeShow(true, false);\n      }\n    },\n\n    methods: {\n      observeShow(value: boolean, old: boolean) {\n        if (value === old) {\n          return;\n        }\n\n        value ? this.enureEnter() : this.enureLeave();\n      },\n\n      enureEnter() {\n        if (this.enterPromise) return;\n\n        this.enterPromise = new Promise((resolve) => this.enter(resolve));\n      },\n\n      enureLeave() {\n        const { enterPromise } = this;\n\n        if (!enterPromise) return;\n\n        enterPromise\n          .then(() => new Promise((resolve) => this.leave(resolve)))\n          .then(() => {\n            this.enterPromise = null;\n          });\n      },\n\n      enter(resolve: () => void) {\n        const { duration, name } = this.data;\n        const classNames = getClassNames(name);\n        const currentDuration = isObj(duration) ? duration.enter : duration;\n\n        if (this.status === 'enter') {\n          return;\n        }\n\n        this.status = 'enter';\n        this.$emit('before-enter');\n\n        requestAnimationFrame(() => {\n          if (this.status !== 'enter') {\n            return;\n          }\n\n          this.$emit('enter');\n\n          this.setData({\n            inited: true,\n            display: true,\n            classes: classNames.enter,\n            currentDuration,\n          });\n\n          requestAnimationFrame(() => {\n            if (this.status !== 'enter') {\n              return;\n            }\n\n            this.transitionEnded = false;\n            this.setData({ classes: classNames['enter-to'] });\n            resolve();\n          });\n        });\n      },\n\n      leave(resolve: () => void) {\n        if (!this.data.display) {\n          return;\n        }\n\n        const { duration, name } = this.data;\n        const classNames = getClassNames(name);\n        const currentDuration = isObj(duration) ? duration.leave : duration;\n\n        this.status = 'leave';\n        this.$emit('before-leave');\n\n        requestAnimationFrame(() => {\n          if (this.status !== 'leave') {\n            return;\n          }\n\n          this.$emit('leave');\n\n          this.setData({\n            classes: classNames.leave,\n            currentDuration,\n          });\n\n          requestAnimationFrame(() => {\n            if (this.status !== 'leave') {\n              return;\n            }\n\n            this.transitionEnded = false;\n            setTimeout(() => {\n              this.onTransitionEnd();\n              resolve();\n            }, currentDuration);\n\n            this.setData({ classes: classNames['leave-to'] });\n          });\n        });\n      },\n\n      onTransitionEnd() {\n        if (this.transitionEnded) {\n          return;\n        }\n\n        this.transitionEnded = true;\n        this.$emit(`after-${this.status}`);\n\n        const { show, display } = this.data;\n        if (!show && display) {\n          this.setData({ display: false });\n        }\n      },\n    },\n  });\n}\n"
  },
  {
    "path": "packages/nav-bar/README.md",
    "content": "# NavBar 导航栏\n\n### 介绍\n\n为页面提供导航功能，常用于页面顶部。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-nav-bar\": \"@vant/weapp/nav-bar/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-nav-bar\n  title=\"标题\"\n  left-text=\"返回\"\n  right-text=\"按钮\"\n  left-arrow\n  bind:click-left=\"onClickLeft\"\n  bind:click-right=\"onClickRight\"\n/>\n```\n\n```js\nPage({\n  onClickLeft() {\n    wx.showToast({ title: '点击返回', icon: 'none' });\n  },\n  onClickRight() {\n    wx.showToast({ title: '点击按钮', icon: 'none' });\n  },\n});\n```\n\n### 高级用法\n\n通过 slot 定制内容。\n\n```html\n<van-nav-bar title=\"标题\" left-text=\"返回\" left-arrow>\n  <van-icon name=\"search\" slot=\"right\" />\n</van-nav-bar>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| title | 标题 | _string_ | `''` |\n| left-text | 左侧文案 | _string_ | `''` |\n| right-text | 右侧文案 | _string_ | `''` |\n| left-arrow | 是否显示左侧箭头 | _boolean_ | `false` |\n| fixed | 是否固定在顶部 | _boolean_ | `false` |\n| placeholder | 固定在顶部时是否开启占位 | _boolean_ | `false` |\n| border | 是否显示下边框 | _boolean_ | `true` |\n| z-index | 元素 z-index | _number_ | `1` |\n| custom-style | 根节点自定义样式 | _string_ | - |\n| safe-area-inset-top | 是否留出顶部安全距离（状态栏高度） | _boolean_ | `true` |\n\n### Slot\n\n| 名称  | 说明               |\n| ----- | ------------------ |\n| title | 自定义标题         |\n| left  | 自定义左侧区域内容 |\n| right | 自定义右侧区域内容 |\n\n### Events\n\n| 事件名           | 说明               | 参数 |\n| ---------------- | ------------------ | ---- |\n| bind:click-left  | 点击左侧按钮时触发 | -    |\n| bind:click-right | 点击右侧按钮时触发 | -    |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n| title-class  | 标题样式类   |\n"
  },
  {
    "path": "packages/nav-bar/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../../icon/index\",\n    \"van-nav-bar\": \"../../nav-bar/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/nav-bar/demo/index.less",
    "content": ".icon {\n  color: #1989fa;\n}\n"
  },
  {
    "path": "packages/nav-bar/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  methods: {\n    onClickLeft() {\n      wx.showToast({ title: '点击返回', icon: 'none' });\n    },\n\n    onClickRight() {\n      wx.showToast({ title: '点击按钮', icon: 'none' });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/nav-bar/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-nav-bar\n    title=\"标题\"\n    right-text=\"按钮\"\n    left-arrow\n    bind:click-left=\"onClickLeft\"\n    bind:click-right=\"onClickRight\"\n  />\n</demo-block>\n<demo-block title=\"高级用法\">\n  <van-nav-bar title=\"标题\" left-text=\"返回\" left-arrow>\n    <van-icon name=\"search\" slot=\"right\" custom-class=\"icon\" size=\"18\" />\n  </van-nav-bar>\n</demo-block>\n"
  },
  {
    "path": "packages/nav-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/nav-bar/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-nav-bar {\n  position: relative;\n  text-align: center;\n  user-select: none;\n  height: var(--nav-bar-height, @nav-bar-height);\n  line-height: var(--nav-bar-height, @nav-bar-height);\n  background-color: var(--nav-bar-background-color, @nav-bar-background-color);\n  box-sizing: content-box;\n\n  &__content {\n    position: relative;\n    height: 100%;\n  }\n\n  &__text {\n    display: inline-block;\n    vertical-align: middle;\n    margin: 0 calc(-1 * var(--padding-md, @padding-md));\n    padding: 0 var(--padding-md, @padding-md);\n    color: var(--nav-bar-text-color, @nav-bar-text-color);\n\n    &--hover {\n      background-color: @active-color;\n    }\n  }\n\n  &__arrow {\n    vertical-align: middle;\n    font-size: var(--nav-bar-arrow-size, @nav-bar-arrow-size) !important;\n    color: var(--nav-bar-icon-color, @nav-bar-icon-color) !important;\n\n    + .van-nav-bar__text {\n      margin-left: -20px;\n      padding-left: 25px;\n    }\n  }\n\n  &--fixed {\n    position: fixed;\n    top: 0;\n    left: 0;\n    width: 100%;\n  }\n\n  &__title {\n    max-width: 60%;\n    margin: 0 auto;\n    color: var(--nav-bar-title-text-color, @nav-bar-title-text-color);\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n    font-size: var(--nav-bar-title-font-size, @nav-bar-title-font-size);\n  }\n\n  &__left,\n  &__right {\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    display: flex;\n    align-items: center;\n    font-size: var(--font-size-md, @font-size-md);\n  }\n\n  &__left {\n    left: var(--padding-md, @padding-md);\n  }\n\n  &__right {\n    right: var(--padding-md, @padding-md);\n  }\n}\n"
  },
  {
    "path": "packages/nav-bar/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { getRect, getSystemInfoSync } from '../common/utils';\n\nVantComponent({\n  classes: ['title-class'],\n\n  props: {\n    title: String,\n    fixed: {\n      type: Boolean,\n      observer: 'setHeight',\n    },\n    placeholder: {\n      type: Boolean,\n      observer: 'setHeight',\n    },\n    leftText: String,\n    rightText: String,\n    customStyle: String,\n    leftArrow: Boolean,\n    border: {\n      type: Boolean,\n      value: true,\n    },\n    zIndex: {\n      type: Number,\n      value: 1,\n    },\n    safeAreaInsetTop: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  data: {\n    height: 46,\n  },\n\n  created() {\n    const { statusBarHeight } = getSystemInfoSync();\n\n    this.setData({\n      statusBarHeight,\n      height: 46 + statusBarHeight,\n    });\n  },\n\n  mounted() {\n    this.setHeight();\n  },\n\n  methods: {\n    onClickLeft() {\n      this.$emit('click-left');\n    },\n\n    onClickRight() {\n      this.$emit('click-right');\n    },\n\n    setHeight() {\n      if (!this.data.fixed || !this.data.placeholder) {\n        return;\n      }\n\n      wx.nextTick(() => {\n        getRect(this, '.van-nav-bar').then((res) => {\n          if (res && 'height' in res) {\n            this.setData({ height: res.height });\n          }\n        });\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/nav-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view wx:if=\"{{ fixed && placeholder }}\" style=\"height: {{ height }}px;\" />\n\n<view\n  class=\"{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}\"\n  style=\"{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}\"\n>\n  <view class=\"van-nav-bar__content\">\n    <view class=\"van-nav-bar__left\" bind:tap=\"onClickLeft\">\n      <block wx:if=\"{{ leftArrow || leftText }}\">\n        <van-icon\n          wx:if=\"{{ leftArrow }}\"\n          size=\"16px\"\n          name=\"arrow-left\"\n          custom-class=\"van-nav-bar__arrow\"\n        />\n        <view\n          wx:if=\"{{ leftText }}\"\n          class=\"van-nav-bar__text\"\n          hover-class=\"van-nav-bar__text--hover\"\n          hover-stay-time=\"70\"\n        >{{ leftText }}</view>\n      </block>\n      <slot wx:else name=\"left\" />\n    </view>\n    <view class=\"van-nav-bar__title title-class van-ellipsis\">\n      <block wx:if=\"{{ title }}\">{{ title }}</block>\n      <slot wx:else name=\"title\" />\n    </view>\n    <view class=\"van-nav-bar__right\" bind:tap=\"onClickRight\">\n      <view\n        wx:if=\"{{ rightText }}\"\n        class=\"van-nav-bar__text\"\n        hover-class=\"van-nav-bar__text--hover\"\n        hover-stay-time=\"70\"\n      >{{ rightText }}</view>\n      <slot wx:else name=\"right\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/nav-bar/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction barStyle(data) {\n  return style({\n    'z-index': data.zIndex,\n    'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,\n  });\n}\n\nmodule.exports = {\n  barStyle: barStyle,\n};\n"
  },
  {
    "path": "packages/nav-bar/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-nav-bar\n        bind:click-left=\"onClickLeft\"\n        bind:click-right=\"onClickRight\"\n      >\n        <wx-view\n          class=\"van-nav-bar custom-class van-hairline--bottom\"\n          style=\"z-index:1;padding-top:20px; \"\n        >\n          <wx-view\n            class=\"van-nav-bar__content\"\n          >\n            <wx-view\n              class=\"van-nav-bar__left\"\n              bind:tap=\"onClickLeft\"\n            >\n              <van-icon\n                customClass=\"van-nav-bar__arrow\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-arrow-left\"\n                  style=\"font-size:16px\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n            <wx-view\n              class=\"van-nav-bar__title title-class van-ellipsis\"\n            >\n              标题\n            </wx-view>\n            <wx-view\n              class=\"van-nav-bar__right\"\n              bind:tap=\"onClickRight\"\n            >\n              <wx-view\n                class=\"van-nav-bar__text\"\n                hoverClass=\"van-nav-bar__text--hover\"\n                hoverStayTime=\"70\"\n              >\n                按钮\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-nav-bar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        高级用法\n      </wx-view>\n      <van-nav-bar>\n        <wx-view\n          class=\"van-nav-bar custom-class van-hairline--bottom\"\n          style=\"z-index:1;padding-top:20px; \"\n        >\n          <wx-view\n            class=\"van-nav-bar__content\"\n          >\n            <wx-view\n              class=\"van-nav-bar__left\"\n              bind:tap=\"onClickLeft\"\n            >\n              <van-icon\n                customClass=\"van-nav-bar__arrow\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-arrow-left\"\n                  style=\"font-size:16px\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n              <wx-view\n                class=\"van-nav-bar__text\"\n                hoverClass=\"van-nav-bar__text--hover\"\n                hoverStayTime=\"70\"\n              >\n                返回\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-nav-bar__title title-class van-ellipsis\"\n            >\n              标题\n            </wx-view>\n            <wx-view\n              class=\"van-nav-bar__right\"\n              bind:tap=\"onClickRight\"\n            >\n              <van-icon\n                customClass=\"icon\"\n                slot=\"right\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-search\"\n                  style=\"font-size:18px\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-nav-bar>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/nav-bar/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/notice-bar/README.md",
    "content": "# NoticeBar 通知栏\n\n### 介绍\n\n用于循环播放展示一组消息通知。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-notice-bar\": \"@vant/weapp/notice-bar/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-notice-bar\n  left-icon=\"volume-o\"\n  text=\"在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。\"\n/>\n```\n\n### 滚动播放\n\n通知栏的内容长度溢出时会自动开启滚动播放，通过 `scrollable` 属性可以控制该行为。\n\n```html\n<!-- 文字较短时，通过设置 scrollable 属性开启滚动播放 -->\n<van-notice-bar scrollable text=\"技术是开发它的人的共同灵魂。\" />\n\n<!-- 文字较长时，通过禁用 scrollable 属性关闭滚动播放 -->\n<van-notice-bar\n  scrollable=\"{{ false }}\"\n  text=\"在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。\"\n/>\n```\n\n### 多行展示\n\n文字较长时，可以通过设置 `wrapable` 属性来开启多行展示。\n\n```html\n<van-notice-bar\n  wrapable\n  scrollable=\"{{ false }}\"\n  text=\"在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。\"\n/>\n```\n\n### 通知栏模式\n\n通知栏支持 `closeable` 和 `link` 两种模式。\n\n```html\n<!-- closeable 模式，在右侧显示关闭按钮 -->\n<van-notice-bar mode=\"closeable\" text=\"技术是开发它的人的共同灵魂。\" />\n\n<!-- link 模式，在右侧显示链接箭头 -->\n<van-notice-bar mode=\"link\" text=\"技术是开发它的人的共同灵魂。\" />\n```\n\n### 自定义样式\n\n通过 `color` 属性设置文本颜色，通过 `background` 属性设置背景色。\n\n```html\n<van-notice-bar\n  color=\"#1989fa\"\n  background=\"#ecf9ff\"\n  left-icon=\"info-o\"\n  text=\"技术是开发它的人的共同灵魂。\"\n/>\n```\n\n### 自定义滚动速率\n\n使用`speed`属性控制滚动速率。\n\n```html\n<van-notice-bar\n  text=\"{{ text }}\"\n  speed=\"{{speedValue}}\"\n  left-icon=\"//img.yzcdn.cn/public_files/2017/8/10/6af5b7168eed548100d9041f07b7c616.png\"\n/>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| mode | 通知栏模式，可选值为 `closeable` `link` | _string_ | `''` |\n| text | 通知文本内容 | _string_ | `''` |\n| color | 通知文本颜色 | _string_ | `#ed6a0c` |\n| background | 滚动条背景 | _string_ | `#fffbe8` |\n| left-icon | 左侧[图标名称](#/icon)或图片链接 | _string_ | - |\n| delay | 动画延迟时间 (ms) | _number_ | `1` |\n| speed | 滚动速率 (px/s) | _number_ | `60` |\n| scrollable | 是否开启滚动播放，内容长度溢出时默认开启 | _boolean_ | - |\n| wrapable | 是否开启文本换行，只在禁用滚动时生效 | _boolean_ | `false` |\n| open-type | 微信开放能力 | _string_ | `navigate` |\n\n### Events\n\n| 事件名 | 说明             | 参数           |\n| ------ | ---------------- | -------------- |\n| bind:click  | 点击通知栏时触发 | _event: Event_ |\n| bind:close  | 关闭通知栏时触发 | _event: Event_ |\n\n### Slot\n\n| 名称       | 说明                                     |\n| ---------- | ---------------------------------------- |\n| -          | 通知文本内容，仅在 `text` 属性为空时有效 |\n| left-icon  | 自定义左侧图标                           |\n| right-icon | 自定义右侧图标                           |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n\n### 样式变量\n\n组件提供了下列 CSS 变量，可用于自定义样式，使用方法请参考 [ConfigProvider 组件](#/config-provider)。\n\n| 名称 | 默认值 | 描述 |\n| --- | --- | --- |\n| --notice-bar-height | _40px_ | - |\n| --notice-bar-padding | _0 var(--van-padding-md)_ | - |\n| --notice-bar-wrapable-padding | _var(--van-padding-xs) var(--van-padding-md)_ | - |\n| --notice-bar-text-color | _var(--van-orange-dark)_ | - |\n| --notice-bar-font-size | _var(--van-font-size-md)_ | - |\n| --notice-bar-line-height | _24px_ | - |\n| --notice-bar-background-color | _var(--van-orange-light)_ | - |\n| --notice-bar-icon-size | _16px_ | - |\n| --notice-bar-icon-min-width | _24px_ | - |\n"
  },
  {
    "path": "packages/notice-bar/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-notice-bar\": \"../../notice-bar/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/notice-bar/demo/index.less",
    "content": ".margin-top {\n  margin-top: 4px;\n}\n"
  },
  {
    "path": "packages/notice-bar/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    text: '在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。',\n    shortText: '技术是开发它的人的共同灵魂。',\n  },\n});\n"
  },
  {
    "path": "packages/notice-bar/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-notice-bar\n    text=\"{{ text }}\"\n    left-icon=\"volume-o\"\n  />\n</demo-block>\n\n<demo-block title=\"滚动模式\">\n  <van-notice-bar scrollable text=\"{{ shortText }}\" custom-class=\"demo-margin-bottom\" />\n  <van-notice-bar scrollable=\"{{ false }}\" text=\"{{ text }}\" custom-class=\"demo-margin-bottom\" />\n</demo-block>\n\n<demo-block title=\"多行展示\">\n  <van-notice-bar wrapable scrollable=\"{{ false }}\" text=\"{{ text }}\" />\n</demo-block>\n\n<demo-block title=\"通知栏模式\">\n  <van-notice-bar mode=\"closeable\" text=\"{{ shortText }}\" />\n  <van-notice-bar custom-class=\"margin-top\" mode=\"link\" text=\"{{ shortText }}\" />\n</demo-block>\n\n<demo-block title=\"自定义样式\">\n  <van-notice-bar\n    text=\"{{ shortText }}\"\n    color=\"#1989fa\"\n    background=\"#ecf9ff\"\n    left-icon=\"info-o\"\n  >\n  </van-notice-bar>\n</demo-block>\n"
  },
  {
    "path": "packages/notice-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/notice-bar/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-notice-bar {\n  display: flex;\n  align-items: center;\n  height: var(--notice-bar-height, @notice-bar-height);\n  padding: var(--notice-bar-padding, @notice-bar-padding);\n  font-size: var(--notice-bar-font-size, @notice-bar-font-size);\n  color: var(--notice-bar-text-color, @notice-bar-text-color);\n  line-height: var(--notice-bar-line-height, @notice-bar-line-height);\n  background-color: var(\n    --notice-bar-background-color,\n    @notice-bar-background-color\n  );\n\n  &--withicon {\n    position: relative;\n    padding-right: 40px;\n  }\n\n  &--wrapable {\n    height: auto;\n    padding: var(--notice-bar-wrapable-padding, @notice-bar-wrapable-padding);\n\n    .van-notice-bar {\n      &__wrap {\n        height: auto;\n      }\n\n      &__content {\n        position: relative;\n        white-space: normal;\n      }\n    }\n  }\n\n  &__left-icon {\n    display: flex;\n    align-items: center;\n    margin-right: 4px;\n    vertical-align: middle;\n    font-size: var(--notice-bar-icon-size, @notice-bar-icon-size);\n    min-width: var(--notice-bar-icon-min-width, @notice-bar-icon-min-width);\n  }\n\n  &__right-icon {\n    position: absolute;\n    top: 10px;\n    right: 15px;\n    font-size: var(--notice-bar-icon-size, @notice-bar-icon-size);\n    min-width: var(--notice-bar-icon-min-width, @notice-bar-icon-min-width);\n  }\n\n  &__wrap {\n    position: relative;\n    flex: 1;\n    overflow: hidden;\n    height: var(--notice-bar-line-height, @notice-bar-line-height);\n  }\n\n  &__content {\n    position: absolute;\n    white-space: nowrap;\n\n    &.van-ellipsis {\n      max-width: 100%;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/notice-bar/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { getRect, requestAnimationFrame } from '../common/utils';\n\nVantComponent({\n  props: {\n    text: {\n      type: String,\n      value: '',\n      observer: 'init',\n    },\n    mode: {\n      type: String,\n      value: '',\n    },\n    url: {\n      type: String,\n      value: '',\n    },\n    openType: {\n      type: String,\n      value: 'navigate',\n    },\n    delay: {\n      type: Number,\n      value: 1,\n    },\n    speed: {\n      type: Number,\n      value: 60,\n      observer: 'init',\n    },\n    scrollable: null,\n    leftIcon: {\n      type: String,\n      value: '',\n    },\n    color: String,\n    backgroundColor: String,\n    background: String,\n    wrapable: Boolean,\n  },\n\n  data: {\n    show: true,\n  },\n\n  created() {\n    this.resetAnimation = wx.createAnimation({\n      duration: 0,\n      timingFunction: 'linear',\n    });\n  },\n\n  destroyed() {\n    this.timer && clearTimeout(this.timer);\n  },\n\n  mounted() {\n    this.init();\n  },\n\n  methods: {\n    init() {\n      requestAnimationFrame(() => {\n        Promise.all([\n          getRect(this, '.van-notice-bar__content'),\n          getRect(this, '.van-notice-bar__wrap'),\n        ]).then((rects) => {\n          const [contentRect, wrapRect] = rects;\n          const { scrollable } = this.data;\n          if (\n            contentRect == null ||\n            wrapRect == null ||\n            !contentRect.width ||\n            !wrapRect.width ||\n            scrollable === false\n          ) {\n            return;\n          }\n\n          if (scrollable || wrapRect.width < contentRect.width) {\n            this.initAnimation(wrapRect.width, contentRect.width);\n\n            this.scroll(true);\n          } else {\n            this.reset();\n          }\n        });\n      });\n    },\n\n    initAnimation(warpWidth: number, contentWidth: number) {\n      const { speed, delay } = this.data;\n\n      this.wrapWidth = warpWidth;\n      this.contentWidth = contentWidth;\n\n      // begin 0\n      this.contentDuration = (contentWidth / speed) * 1000;\n      // begin -wrapWidth\n      this.duration = ((warpWidth + contentWidth) / speed) * 1000;\n\n      this.animation = wx.createAnimation({\n        duration: this.contentDuration,\n        timingFunction: 'linear',\n        delay,\n      });\n    },\n\n    reset(x = 0) {\n      if (this.timer) {\n        clearTimeout(this.timer);\n        this.timer = null;\n      }\n\n      this.setData({\n        animationData: this.resetAnimation.translateX(x).step().export(),\n      });\n    },\n\n    scroll(isInit = false) {\n      this.reset(isInit ? 0 : this.wrapWidth);\n\n      const duration = isInit ? this.contentDuration : this.duration;\n\n      requestAnimationFrame(() => {\n        this.setData({\n          animationData: this.animation\n            .translateX(-this.contentWidth)\n            .step({ duration })\n            .export(),\n        });\n      });\n\n      this.timer = setTimeout(() => {\n        this.scroll();\n      }, duration + this.data.delay);\n    },\n\n    onClickIcon(event) {\n      if (this.data.mode === 'closeable') {\n        this.timer && clearTimeout(this.timer);\n        this.timer = null;\n\n        this.setData({ show: false });\n        this.$emit('close', event.detail);\n      }\n    },\n\n    onClick(event: WechatMiniprogram.TouchEvent) {\n      this.$emit('click', event);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/notice-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  wx:if=\"{{ show }}\"\n  class=\"custom-class {{ utils.bem('notice-bar', { withicon: mode, wrapable }) }}\"\n  style=\"{{ computed.rootStyle({ color, backgroundColor, background }) }}\"\n  bind:tap=\"onClick\"\n>\n  <van-icon\n    wx:if=\"{{ leftIcon }}\"\n    name=\"{{ leftIcon }}\"\n    class=\"van-notice-bar__left-icon\"\n  />\n  <slot wx:else name=\"left-icon\" />\n\n  <view class=\"van-notice-bar__wrap\">\n    <view class=\"van-notice-bar__content {{ scrollable === false && !wrapable ? 'van-ellipsis' : '' }}\" animation=\"{{ animationData }}\">\n      {{ text }}\n      <slot wx:if=\"{{ !text }}\"></slot>\n    </view>\n  </view>\n\n  <van-icon\n    wx:if=\"{{ mode === 'closeable' }}\"\n    class=\"van-notice-bar__right-icon\"\n    name=\"cross\"\n    catch:tap=\"onClickIcon\"\n  />\n  <navigator\n    wx:elif=\"{{ mode === 'link' }}\"\n    url=\"{{ url }}\"\n    open-type=\"{{ openType }}\"\n  >\n    <van-icon class=\"van-notice-bar__right-icon\" name=\"arrow\" />\n  </navigator>\n  <slot wx:else name=\"right-icon\" />\n</view>\n"
  },
  {
    "path": "packages/notice-bar/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    color: data.color,\n    'background-color': data.backgroundColor,\n    background: data.background,\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "packages/notice-bar/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-notice-bar>\n        <wx-view\n          class=\"custom-class van-notice-bar\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <van-icon\n            class=\"van-notice-bar__left-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-volume-o\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n          <wx-view\n            class=\"van-notice-bar__wrap\"\n          >\n            <wx-view\n              animation=\"\"\n              class=\"van-notice-bar__content \"\n            >\n              \n      在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。\n      \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-notice-bar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        滚动模式\n      </wx-view>\n      <van-notice-bar\n        customClass=\"demo-margin-bottom\"\n      >\n        <wx-view\n          class=\"custom-class van-notice-bar\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-notice-bar__wrap\"\n          >\n            <wx-view\n              animation=\"\"\n              class=\"van-notice-bar__content \"\n            >\n              \n      技术是开发它的人的共同灵魂。\n      \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-notice-bar>\n      <van-notice-bar\n        customClass=\"demo-margin-bottom\"\n      >\n        <wx-view\n          class=\"custom-class van-notice-bar\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-notice-bar__wrap\"\n          >\n            <wx-view\n              animation=\"\"\n              class=\"van-notice-bar__content van-ellipsis\"\n            >\n              \n      在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。\n      \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-notice-bar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        多行展示\n      </wx-view>\n      <van-notice-bar>\n        <wx-view\n          class=\"custom-class van-notice-bar van-notice-bar--wrapable\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-notice-bar__wrap\"\n          >\n            <wx-view\n              animation=\"\"\n              class=\"van-notice-bar__content \"\n            >\n              \n      在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。\n      \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-notice-bar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        通知栏模式\n      </wx-view>\n      <van-notice-bar>\n        <wx-view\n          class=\"custom-class van-notice-bar van-notice-bar--withicon\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-notice-bar__wrap\"\n          >\n            <wx-view\n              animation=\"\"\n              class=\"van-notice-bar__content \"\n            >\n              \n      技术是开发它的人的共同灵魂。\n      \n            </wx-view>\n          </wx-view>\n          <van-icon\n            class=\"van-notice-bar__right-icon\"\n            catch:tap=\"onClickIcon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-cross\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-notice-bar>\n      <van-notice-bar\n        customClass=\"margin-top\"\n      >\n        <wx-view\n          class=\"custom-class van-notice-bar van-notice-bar--withicon\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-notice-bar__wrap\"\n          >\n            <wx-view\n              animation=\"\"\n              class=\"van-notice-bar__content \"\n            >\n              \n      技术是开发它的人的共同灵魂。\n      \n            </wx-view>\n          </wx-view>\n          <wx-navigator\n            openType=\"navigate\"\n            url=\"\"\n          >\n            <van-icon\n              class=\"van-notice-bar__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-navigator>\n        </wx-view>\n      </van-notice-bar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义样式\n      </wx-view>\n      <van-notice-bar>\n        <wx-view\n          class=\"custom-class van-notice-bar\"\n          style=\"color:#1989fa;background:#ecf9ff\"\n          bind:tap=\"onClick\"\n        >\n          <van-icon\n            class=\"van-notice-bar__left-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-info-o\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n          <wx-view\n            class=\"van-notice-bar__wrap\"\n          >\n            <wx-view\n              animation=\"\"\n              class=\"van-notice-bar__content \"\n            >\n              \n      技术是开发它的人的共同灵魂。\n      \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-notice-bar>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/notice-bar/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/notify/README.md",
    "content": "# Notify 消息提示\n\n### 介绍\n\n在页面顶部展示消息提示，支持函数调用和组件调用两种方式。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-notify\": \"@vant/weapp/notify/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```js\nimport Notify from '@vant/weapp/notify/notify';\n\nNotify('通知内容');\n```\n\n```html\n<!-- 在页面内添加对应的节点 -->\n<van-notify id=\"van-notify\" />\n```\n\n### 通知类型\n\n支持`primary`、`success`、`warning`、`danger`四种通知类型，默认为`danger`。\n\n```js\n// 主要通知\nNotify({ type: 'primary', message: '通知内容' });\n\n// 成功通知\nNotify({ type: 'success', message: '通知内容' });\n\n// 危险通知\nNotify({ type: 'danger', message: '通知内容' });\n\n// 警告通知\nNotify({ type: 'warning', message: '通知内容' });\n```\n\n### 自定义通知\n\n自定义消息通知的颜色和展示时长。\n\n```js\nNotify({\n  message: '自定义颜色',\n  color: '#ad0000',\n  background: '#ffe1e1',\n});\n\nNotify({\n  message: '自定义时长',\n  duration: 1000,\n});\n```\n\n### 自定义选择器\n\n```js\nNotify({\n  message: '自定义节点选择器',\n  duration: 1000,\n  selector: '#custom-selector',\n});\n```\n\n```html\n<!-- 在页面内添加自定义节点 -->\n<van-notify id=\"custom-selector\" />\n```\n\n## API\n\n### 方法\n\n| 方法名       | 说明     | 参数                 | 返回值      |\n| ------------ | -------- | -------------------- | ----------- |\n| Notify       | 展示提示 | `options \\| message` | notify 实例 |\n| Notify.clear | 关闭提示 | `options`            | `void`      |\n\n### Options\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| type `v1.0.0` | 类型，可选值为 `primary` `success` `warning` | _string_ | `danger` |\n| message `v1.0.0` | 展示文案，支持通过`\\n`换行 | _string_ | `''` |\n| duration | 展示时长(ms)，值为 0 时，notify 不会消失 | _number_ | `3000` |\n| selector | 自定义节点选择器 | _string_ | `van-notify` |\n| color | 字体颜色 | _string_ | `#fff` |\n| top | 顶部距离 | _number_ | `0` |\n| background | 背景颜色 | _string_ | - |\n| context | 选择器的选择范围，可以传入自定义组件的 this 作为上下文 | _object_ | 当前页面 |\n| onClick | 点击时的回调函数 | _Function_ | - |\n| onOpened | 完全展示后的回调函数 | _Function_ | - |\n| onClose | 关闭时的回调函数 | _Function_ | - |\n| safeAreaInsetTop | 是否留出顶部安全距离（状态栏高度） | _boolean_ | `false` |\n"
  },
  {
    "path": "packages/notify/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../../button/index\",\n    \"van-notify\": \"../../notify/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/notify/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Notify from '../../notify/notify';\n\nVantComponent({\n  methods: {\n    showNotify() {\n      Notify({ context: this, message: '通知内容' });\n    },\n\n    showCustomColor() {\n      Notify({\n        context: this,\n        message: '自定义颜色',\n        color: '#ad0000',\n        background: '#ffe1e1',\n      });\n\n      Notify.clear();\n    },\n\n    showCustomDuration() {\n      Notify({\n        context: this,\n        duration: 1000,\n        message: '自定义时长',\n      });\n    },\n\n    showNotifyByType(event) {\n      const { type } = event.currentTarget.dataset;\n      Notify({\n        type,\n        context: this,\n        message: '通知内容',\n      });\n    },\n\n    showSafe() {\n      Notify({\n        context: this,\n        message: '通知内容',\n        safeAreaInsetTop: true,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/notify/demo/index.wxml",
    "content": "<demo-block padding title=\"基础用法\">\n  <van-button type=\"danger\" bind:click=\"showNotify\">基础用法</van-button>\n</demo-block>\n\n<demo-block padding title=\"通知类型\">\n  <view class=\"demo-margin-bottom\">\n    <van-button class=\"demo-margin-right\" type=\"info\" data-type=\"primary\" bind:click=\"showNotifyByType\">主要通知</van-button>\n    <van-button type=\"primary\" data-type=\"success\" bind:click=\"showNotifyByType\">成功通知</van-button>\n  </view>\n  <view class=\"demo-margin-bottom\">\n    <van-button class=\"demo-margin-right\" type=\"danger\" data-type=\"danger\" bind:click=\"showNotifyByType\">危险通知</van-button>\n    <van-button type=\"warning\" data-type=\"warning\" bind:click=\"showNotifyByType\">警告通知</van-button>\n  </view>\n</demo-block>\n\n<demo-block padding title=\"自定义通知\">\n  <van-button type=\"primary\" class=\"demo-margin-right\" bind:click=\"showCustomColor\">自定义颜色</van-button>\n  <van-button type=\"primary\" bind:click=\"showCustomDuration\">自定义时长</van-button>\n</demo-block>\n\n<demo-block padding title=\"插入状态栏高度\">\n  <van-button type=\"primary\" class=\"demo-margin-right\" bind:click=\"showSafe\">插入状态栏高度</van-button>\n</demo-block>\n\n<van-notify id=\"van-notify\" />\n"
  },
  {
    "path": "packages/notify/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "packages/notify/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-notify {\n  text-align: center;\n  word-wrap: break-word;\n  padding: var(--notify-padding, @notify-padding);\n  font-size: var(--notify-font-size, @notify-font-size);\n  line-height: var(--notify-line-height, @notify-line-height);\n\n  &__container {\n    position: fixed;\n    top: 0;\n    left: 0;\n    box-sizing: border-box;\n    width: 100%;\n  }\n\n  &--primary {\n    background-color: var(\n      --notify-primary-background-color,\n      @notify-primary-background-color\n    );\n  }\n\n  &--success {\n    background-color: var(\n      --notify-success-background-color,\n      @notify-success-background-color\n    );\n  }\n\n  &--danger {\n    background-color: var(\n      --notify-danger-background-color,\n      @notify-danger-background-color\n    );\n  }\n\n  &--warning {\n    background-color: var(\n      --notify-warning-background-color,\n      @notify-warning-background-color\n    );\n  }\n}\n"
  },
  {
    "path": "packages/notify/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { WHITE } from '../common/color';\nimport { getSystemInfoSync } from '../common/utils';\n\nVantComponent({\n  props: {\n    message: String,\n    background: String,\n    type: {\n      type: String,\n      value: 'danger',\n    },\n    color: {\n      type: String,\n      value: WHITE,\n    },\n    duration: {\n      type: Number,\n      value: 3000,\n    },\n    zIndex: {\n      type: Number,\n      value: 110,\n    },\n    safeAreaInsetTop: {\n      type: Boolean,\n      value: false,\n    },\n    top: null,\n  },\n\n  data: {\n    show: false,\n    onOpened: (null as unknown) as () => void,\n    onClose: (null as unknown) as () => void,\n    onClick: (null as unknown) as (detail: Record<string, null>) => void,\n  },\n\n  created() {\n    const { statusBarHeight } = getSystemInfoSync();\n    this.setData({ statusBarHeight });\n  },\n\n  methods: {\n    show() {\n      const { duration, onOpened } = this.data;\n\n      clearTimeout(this.timer);\n      this.setData({ show: true });\n\n      wx.nextTick(onOpened);\n\n      if (duration > 0 && duration !== Infinity) {\n        this.timer = setTimeout(() => {\n          this.hide();\n        }, duration);\n      }\n    },\n\n    hide() {\n      const { onClose } = this.data;\n\n      clearTimeout(this.timer);\n      this.setData({ show: false });\n\n      wx.nextTick(onClose);\n    },\n\n    onTap(event: WechatMiniprogram.TouchEvent) {\n      const { onClick } = this.data;\n      if (onClick) {\n        onClick(event.detail);\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/notify/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-transition\n  name=\"slide-down\"\n  show=\"{{ show }}\"\n  custom-class=\"van-notify__container\"\n  custom-style=\"{{ computed.rootStyle({ zIndex, top }) }}\"\n  bind:tap=\"onTap\"\n>\n  <view\n    class=\"van-notify van-notify--{{ type }}\"\n    style=\"{{ computed.notifyStyle({ background, color }) }}\"\n  >\n    <view\n      wx:if=\"{{ safeAreaInsetTop }}\"\n      style=\"height: {{ statusBarHeight }}px\"\n    />\n    <text>{{ message }}</text>\n  </view>\n</van-transition>\n"
  },
  {
    "path": "packages/notify/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'z-index': data.zIndex,\n    top: addUnit(data.top),\n  });\n}\n\nfunction notifyStyle(data) {\n  return style({\n    background: data.background,\n    color: data.color,\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  notifyStyle: notifyStyle,\n};\n"
  },
  {
    "path": "packages/notify/notify.ts",
    "content": "import { WHITE } from '../common/color';\n\ninterface NotifyOptions {\n  type?: 'primary' | 'success' | 'danger' | 'warning';\n  color?: string;\n  zIndex?: number;\n  top?: number;\n  message: string;\n  context?: any;\n  duration?: number;\n  selector?: string;\n  background?: string;\n  safeAreaInsetTop?: boolean;\n  onClick?: () => void;\n  onOpened?: () => void;\n  onClose?: () => void;\n}\n\nconst defaultOptions: NotifyOptions = {\n  selector: '#van-notify',\n  type: 'danger',\n  message: '',\n  background: '',\n  duration: 3000,\n  zIndex: 110,\n  top: 0,\n  color: WHITE,\n  safeAreaInsetTop: false,\n  onClick: () => {},\n  onOpened: () => {},\n  onClose: () => {},\n};\n\nlet currentOptions: NotifyOptions = { ...defaultOptions };\n\nfunction parseOptions(\n  message?: NotifyOptions | string\n): Partial<NotifyOptions> {\n  if (message == null) {\n    return {};\n  }\n\n  return typeof message === 'string' ? { message } : message;\n}\n\nfunction getContext() {\n  const pages = getCurrentPages();\n  return pages[pages.length - 1];\n}\n\nexport default function Notify(options: NotifyOptions | string) {\n  options = { ...currentOptions, ...parseOptions(options) };\n\n  const context = options.context || getContext();\n  const notify = context.selectComponent(options.selector);\n\n  delete options.context;\n  delete options.selector;\n\n  if (notify) {\n    notify.setData(options);\n    notify.show();\n    return notify;\n  }\n\n  console.warn('未找到 van-notify 节点，请确认 selector 及 context 是否正确');\n}\n\nNotify.clear = function (options?: NotifyOptions) {\n  options = { ...defaultOptions, ...parseOptions(options) };\n\n  const context = options.context || getContext();\n  const notify = context.selectComponent(options.selector);\n\n  if (notify) {\n    notify.hide();\n  }\n};\n\nNotify.setDefaultOptions = (options: NotifyOptions) => {\n  Object.assign(currentOptions, options);\n};\n\nNotify.resetDefaultOptions = () => {\n  currentOptions = { ...defaultOptions };\n};\n"
  },
  {
    "path": "packages/notify/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-button\n        bind:click=\"showNotify\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--danger van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            基础用法\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        通知类型\n      </wx-view>\n      <wx-view\n        class=\"demo-margin-bottom\"\n      >\n        <van-button\n          class=\"demo-margin-right\"\n          data-type=\"primary\"\n          bind:click=\"showNotifyByType\"\n        >\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--info van-button--normal \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              主要通知\n            </wx-view>\n          </wx-button>\n        </van-button>\n        <van-button\n          data-type=\"success\"\n          bind:click=\"showNotifyByType\"\n        >\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--primary van-button--normal \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              成功通知\n            </wx-view>\n          </wx-button>\n        </van-button>\n      </wx-view>\n      <wx-view\n        class=\"demo-margin-bottom\"\n      >\n        <van-button\n          class=\"demo-margin-right\"\n          data-type=\"danger\"\n          bind:click=\"showNotifyByType\"\n        >\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--danger van-button--normal \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              危险通知\n            </wx-view>\n          </wx-button>\n        </van-button>\n        <van-button\n          data-type=\"warning\"\n          bind:click=\"showNotifyByType\"\n        >\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--warning van-button--normal \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              警告通知\n            </wx-view>\n          </wx-button>\n        </van-button>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义通知\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n        bind:click=\"showCustomColor\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            自定义颜色\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button\n        bind:click=\"showCustomDuration\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            自定义时长\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        插入状态栏高度\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n        bind:click=\"showSafe\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            插入状态栏高度\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <van-notify\n    id=\"van-notify\"\n  >\n    <van-transition\n      customClass=\"van-notify__container\"\n      bind:tap=\"onTap\"\n    />\n  </van-notify>\n</main>\n`;\n"
  },
  {
    "path": "packages/notify/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/overlay/README.md",
    "content": "# Overlay 遮罩层\n\n### 介绍\n\n创建一个遮罩层，用于强调特定的页面元素，并阻止用户进行其他操作。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-overlay\": \"@vant/weapp/overlay/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-button type=\"primary\" bind:click=\"onClickShow\">显示遮罩层</van-button>\n<van-overlay show=\"{{ show }}\" bind:click=\"onClickHide\" />\n```\n\n```js\nPage({\n  data: {\n    show: false,\n  },\n\n  onClickShow() {\n    this.setData({ show: true });\n  },\n\n  onClickHide() {\n    this.setData({ show: false });\n  },\n});\n```\n\n### 嵌入内容\n\n通过默认插槽可以在遮罩层上嵌入任意内容。\n\n```html\n<van-button type=\"primary\" bind:click=\"onClickShow\">嵌入内容</van-button>\n<van-overlay show=\"{{ show }}\" bind:click=\"onClickHide\">\n  <view class=\"wrapper\">\n    <view class=\"block\" catch:tap=\"noop\" />\n  </view>\n</van-overlay>\n```\n\n```js\nPage({\n  data: {\n    show: false,\n  },\n\n  onClickShow() {\n    this.setData({ show: true });\n  },\n\n  onClickHide() {\n    this.setData({ show: false });\n  },\n\n  noop() {},\n});\n```\n\n```css\n.wrapper {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n}\n\n.block {\n  width: 120px;\n  height: 120px;\n  background-color: #fff;\n}\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| show | 是否展示遮罩层 | _boolean_ | `false` |\n| z-index | z-index 层级 | _string \\| number_ | `1` |\n| duration | 动画时长，单位秒 | _string \\| number_ | `0.3` |\n| class-name | 自定义类名 | _string_ | - |\n| custom-style | 自定义样式 | _string_ | - |\n| lock-scroll `v1.7.3` | 是否锁定背景滚动，锁定时蒙层里的内容也将无法滚动 | _boolean_ | `true` |\n| root-portal `v1.10.14` | 是否从页面中脱离出来，用于解决各种 fixed 失效问题，微信基础库 >= `2.25.2 ` | _boolean_ | `false` |\n\n### Events\n\n| 事件名     | 说明       | 回调参数 |\n| ---------- | ---------- | -------- |\n| bind:click | 点击时触发 | -        |\n\n### Slots\n\n| 名称 | 说明                               |\n| ---- | ---------------------------------- |\n| -    | 默认插槽，用于在遮罩层上方嵌入内容 |\n\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n"
  },
  {
    "path": "packages/overlay/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../../button/index\",\n    \"van-overlay\": \"../../overlay/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/overlay/demo/index.less",
    "content": ".wrapper {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n}\n\n.block {\n  width: 120px;\n  height: 120px;\n  background-color: #fff;\n}\n"
  },
  {
    "path": "packages/overlay/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    show: false,\n    showEmbedded: false,\n  },\n\n  methods: {\n    onClickShow() {\n      this.setData({ show: true });\n    },\n\n    onClickHide() {\n      this.setData({ show: false });\n    },\n\n    onClickShowEmbedded() {\n      this.setData({ showEmbedded: true });\n    },\n\n    onClickHideEmbedded() {\n      this.setData({ showEmbedded: false });\n    },\n\n    noop() {},\n  },\n});\n"
  },
  {
    "path": "packages/overlay/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n  <van-button type=\"primary\" bind:click=\"onClickShow\">\n    显示遮罩层\n  </van-button>\n  <van-overlay show=\"{{ show }}\" bind:click=\"onClickHide\" />\n</demo-block>\n\n<demo-block title=\"嵌入内容\" padding>\n  <van-button type=\"primary\" bind:click=\"onClickShowEmbedded\">\n    嵌入内容\n  </van-button>\n  <van-overlay show=\"{{ showEmbedded }}\" bind:click=\"onClickHideEmbedded\">\n    <view class=\"wrapper\">\n      <div class=\"block\" catch:tap=\"noop\" />\n    </view>\n  </van-overlay>\n</demo-block>\n"
  },
  {
    "path": "packages/overlay/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "packages/overlay/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-overlay {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: var(--overlay-background-color, @overlay-background-color);\n}\n"
  },
  {
    "path": "packages/overlay/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    show: Boolean,\n    customStyle: String,\n    duration: {\n      type: null,\n      value: 300,\n    },\n    zIndex: {\n      type: Number,\n      value: 1,\n    },\n    lockScroll: {\n      type: Boolean,\n      value: true,\n    },\n    rootPortal: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  methods: {\n    onClick() {\n      this.$emit('click');\n    },\n\n    // for prevent touchmove\n    noop() {},\n  },\n});\n"
  },
  {
    "path": "packages/overlay/index.wxml",
    "content": "<import src=\"./overlay.wxml\" />\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./overlay.wxml\" />\n</root-portal>\n\n<include wx:else src=\"./overlay.wxml\" />\n"
  },
  {
    "path": "packages/overlay/overlay.wxml",
    "content": "<van-transition\n  show=\"{{ show }}\"\n  custom-class=\"van-overlay custom-class\"\n  custom-style=\"z-index: {{ zIndex }}; {{ customStyle }}\"\n  duration=\"{{ duration }}\"\n  bind:tap=\"onClick\"\n  catch:touchmove=\"{{ lockScroll ? 'noop' : ''}}\"\n>\n  <slot></slot>\n</van-transition>"
  },
  {
    "path": "packages/overlay/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-button\n        bind:click=\"onClickShow\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            \n    显示遮罩层\n  \n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-overlay\n        bind:click=\"onClickHide\"\n      >\n        <van-transition\n          customClass=\"van-overlay custom-class\"\n          bind:tap=\"onClick\"\n          catch:touchmove=\"noop\"\n        />\n      </van-overlay>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        嵌入内容\n      </wx-view>\n      <van-button\n        bind:click=\"onClickShowEmbedded\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            \n    嵌入内容\n  \n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-overlay\n        bind:click=\"onClickHideEmbedded\"\n      >\n        <van-transition\n          customClass=\"van-overlay custom-class\"\n          bind:tap=\"onClick\"\n          catch:touchmove=\"noop\"\n        />\n      </van-overlay>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/overlay/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/panel/README.md",
    "content": "# Panel 面板\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-panel\": \"@vant/weapp/panel/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n面板只是一个容器，里面可以放入自定义的内容。\n\n```html\n<van-panel title=\"标题\" desc=\"描述信息\" status=\"状态\">\n  <view>内容</view>\n</van-panel>\n```\n\n### 高级用法\n\n使用`slot`自定义内容。\n\n```html\n<van-panel title=\"标题\" desc=\"描述信息\" status=\"状态\">\n  <view>内容</view>\n  <view slot=\"footer\">\n    <van-button size=\"small\">按钮</van-button>\n    <van-button size=\"small\" type=\"danger\">按钮</van-button>\n  </view>\n</van-panel>\n```\n\n## API\n\n### Props\n\n| 参数   | 说明 | 类型     | 默认值 |\n| ------ | ---- | -------- | ------ |\n| title  | 标题 | _string_ | -      |\n| desc   | 描述 | _string_ | -      |\n| status | 状态 | _string_ | -      |\n\n### Slot\n\n| 名称   | 说明                                                           |\n| ------ | -------------------------------------------------------------- |\n| -      | 自定义内容                                                     |\n| header | 自定义 header，如果设置了`title`、`desc`、`status`属性则不生效 |\n| footer | 自定义 footer                                                  |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n| header-class | 头部样式类   |\n| footer-class | 底部样式类   |\n"
  },
  {
    "path": "packages/panel/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-panel\": \"../../panel/index\",\n    \"van-button\": \"../../button/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/panel/demo/index.less",
    "content": ".content {\n  padding: 20px;\n  font-size: 16px;\n}\n\n.footer {\n  text-align: right;\n}\n"
  },
  {
    "path": "packages/panel/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {},\n});\n"
  },
  {
    "path": "packages/panel/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-panel title=\"标题\" desc=\"描述信息\" status=\"状态\">\n    <view class=\"content\">内容</view>\n  </van-panel>\n</demo-block>\n\n<demo-block title=\"高级用法\">\n  <van-panel title=\"标题\" desc=\"描述信息\" status=\"状态\" use-footer-slot>\n    <view class=\"content\">内容</view>\n    <view slot=\"footer\" class=\"footer\">\n      <van-button size=\"small\" class=\"demo-margin-right\">按钮</van-button>\n      <van-button size=\"small\" type=\"danger\">按钮</van-button>\n    </view>\n  </van-panel>\n</demo-block>\n"
  },
  {
    "path": "packages/panel/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\"\n  }\n}\n"
  },
  {
    "path": "packages/panel/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-panel {\n  background: var(--panel-background-color, @panel-background-color);\n\n  &__header-value {\n    color: var(--panel-header-value-color, @panel-header-value-color);\n  }\n\n  &__footer {\n    padding: var(--panel-footer-padding, @panel-footer-padding);\n\n    &:empty {\n      display: none;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/panel/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  classes: ['header-class', 'footer-class'],\n\n  props: {\n    desc: String,\n    title: String,\n    status: String,\n  },\n});\n"
  },
  {
    "path": "packages/panel/index.wxml",
    "content": "<view class=\"van-panel van-hairline--top-bottom custom-class\">\n  <van-cell\n    wx:if=\"{{ title || desc || status }}\"\n    title=\"{{ title }}\"\n    label=\"{{ desc }}\"\n    value=\"{{ status }}\"\n    custom-class=\"header-class\"\n    value-class=\"van-panel__header-value\"\n  />\n  <slot wx:else name=\"header\" />\n\n  <view class=\"van-panel__content\">\n    <slot />\n  </view>\n\n  <view class=\"van-panel__footer van-hairline--top footer-class\">\n    <slot name=\"footer\" />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/panel/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-panel>\n        <wx-view\n          class=\"van-panel van-hairline--top-bottom custom-class\"\n        >\n          <van-cell\n            customClass=\"header-class\"\n            valueClass=\"van-panel__header-value\"\n          >\n            <wx-view\n              class=\"custom-class van-cell\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                标题\n                <wx-view\n                  class=\"van-cell__label label-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                状态\n              </wx-view>\n            </wx-view>\n          </van-cell>\n          <wx-view\n            class=\"van-panel__content\"\n          >\n            <wx-view\n              class=\"content\"\n            >\n              内容\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-panel__footer van-hairline--top footer-class\"\n          />\n        </wx-view>\n      </van-panel>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        高级用法\n      </wx-view>\n      <van-panel\n        useFooterSlot=\"{{true}}\"\n      >\n        <wx-view\n          class=\"van-panel van-hairline--top-bottom custom-class\"\n        >\n          <van-cell\n            customClass=\"header-class\"\n            valueClass=\"van-panel__header-value\"\n          >\n            <wx-view\n              class=\"custom-class van-cell\"\n              hoverClass=\"van-cell--hover hover-class\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-cell__title title-class\"\n                style=\"\"\n              >\n                标题\n                <wx-view\n                  class=\"van-cell__label label-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-cell__value value-class\"\n              >\n                状态\n              </wx-view>\n            </wx-view>\n          </van-cell>\n          <wx-view\n            class=\"van-panel__content\"\n          >\n            <wx-view\n              class=\"content\"\n            >\n              内容\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-panel__footer van-hairline--top footer-class\"\n          >\n            <wx-view\n              class=\"footer\"\n              slot=\"footer\"\n            >\n              <van-button\n                class=\"demo-margin-right\"\n              >\n                <wx-button\n                  appParameter=\"\"\n                  ariaLabel=\"\"\n                  businessId=\"\"\n                  class=\"custom-class van-button van-button--default van-button--small \"\n                  data-detail=\"{{null}}\"\n                  formType=\"\"\n                  hoverClass=\"van-button--active hover-class\"\n                  id=\"\"\n                  lang=\"\"\n                  openType=\"\"\n                  sendMessageImg=\"\"\n                  sendMessagePath=\"\"\n                  sendMessageTitle=\"\"\n                  sessionFrom=\"\"\n                  showMessageCard=\"{{false}}\"\n                  style=\"\"\n                  bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                  bind:chooseavatar=\"onChooseAvatar\"\n                  bind:contact=\"onContact\"\n                  bind:error=\"onError\"\n                  bind:getphonenumber=\"onGetPhoneNumber\"\n                  bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                  bind:getuserinfo=\"onGetUserInfo\"\n                  bind:launchapp=\"onLaunchApp\"\n                  bind:opensetting=\"onOpenSetting\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-button__text\"\n                  >\n                    按钮\n                  </wx-view>\n                </wx-button>\n              </van-button>\n              <van-button>\n                <wx-button\n                  appParameter=\"\"\n                  ariaLabel=\"\"\n                  businessId=\"\"\n                  class=\"custom-class van-button van-button--danger van-button--small \"\n                  data-detail=\"{{null}}\"\n                  formType=\"\"\n                  hoverClass=\"van-button--active hover-class\"\n                  id=\"\"\n                  lang=\"\"\n                  openType=\"\"\n                  sendMessageImg=\"\"\n                  sendMessagePath=\"\"\n                  sendMessageTitle=\"\"\n                  sessionFrom=\"\"\n                  showMessageCard=\"{{false}}\"\n                  style=\"\"\n                  bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                  bind:chooseavatar=\"onChooseAvatar\"\n                  bind:contact=\"onContact\"\n                  bind:error=\"onError\"\n                  bind:getphonenumber=\"onGetPhoneNumber\"\n                  bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                  bind:getuserinfo=\"onGetUserInfo\"\n                  bind:launchapp=\"onLaunchApp\"\n                  bind:opensetting=\"onOpenSetting\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-button__text\"\n                  >\n                    按钮\n                  </wx-view>\n                </wx-button>\n              </van-button>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-panel>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/panel/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/picker/README.md",
    "content": "# Picker 选择器\n\n### 介绍\n\n提供多个选项集合供用户选择，支持单列选择和多列级联，通常与 [弹出层](#/popup) 组件配合使用。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-picker\": \"@vant/weapp/picker/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-picker columns=\"{{ columns }}\" bind:change=\"onChange\" />\n```\n\n```javascript\nimport Toast from '@vant/weapp/toast/toast';\n\nPage({\n  data: {\n    columns: ['杭州', '宁波', '温州', '嘉兴', '湖州'],\n  },\n\n  onChange(event) {\n    const { picker, value, index } = event.detail;\n    Toast(`当前值：${value}, 当前索引：${index}`);\n  },\n});\n```\n\n### 默认选中项\n\n单列选择器可以直接通过`default-index`属性设置初始选中项的索引值。\n\n```html\n<van-picker\n  columns=\"{{ columns }}\"\n  default-index=\"{{ 2 }}\"\n  bind:change=\"onChange\"\n/>\n```\n\n### 展示顶部栏\n\n```html\n<van-picker\n  show-toolbar\n  title=\"标题\"\n  columns=\"{{ columns }}\"\n  bind:cancel=\"onCancel\"\n  bind:confirm=\"onConfirm\"\n/>\n```\n\n```javascript\nimport Toast from '@vant/weapp/toast/toast';\n\nPage({\n  data: {\n    columns: ['杭州', '宁波', '温州', '嘉兴', '湖州'],\n  },\n\n  onConfirm(event) {\n    const { picker, value, index } = event.detail;\n    Toast(`当前值：${value}, 当前索引：${index}`);\n  },\n\n  onCancel() {\n    Toast('取消');\n  },\n});\n```\n\n### 多列联动\n\n```html\n<van-picker columns=\"{{ columns }}\" bind:change=\"onChange\" />\n```\n\n```javascript\nconst citys = {\n  浙江: ['杭州', '宁波', '温州', '嘉兴', '湖州'],\n  福建: ['福州', '厦门', '莆田', '三明', '泉州'],\n};\n\nPage({\n  data: {\n    columns: [\n      {\n        values: Object.keys(citys),\n        className: 'column1',\n      },\n      {\n        values: citys['浙江'],\n        className: 'column2',\n        defaultIndex: 2,\n      },\n    ],\n  },\n\n  onChange(event) {\n    const { picker, value, index } = event.detail;\n    picker.setColumnValues(1, citys[value[0]]);\n  },\n});\n```\n\n### 禁用选项\n\n选项可以为对象结构，通过设置 disabled 来禁用该选项。\n\n```html\n<van-picker columns=\"{{ columns }}\" />\n```\n\n```javascript\nPage({\n  data: {\n    columns: [\n      { text: '杭州', disabled: true },\n      { text: '宁波' },\n      { text: '温州' },\n    ],\n  },\n});\n```\n\n### 加载状态\n\n当 Picker 数据是通过异步获取时，可以通过 `loading` 属性显示加载提示。\n\n```html\n<van-picker columns=\"{{ columns }}\" loading />\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| columns | 对象数组，配置每一列显示的数据 | _Array_ | `[]` |\n| show-toolbar | 是否显示顶部栏 | _boolean_ | `false` |\n| toolbar-position | 顶部栏位置，可选值为`bottom` | _string_ | `top` |\n| title | 顶部栏标题 | _string_ | `''` |\n| loading | 是否显示加载状态 | _boolean_ | `false` |\n| value-key | 选项对象中，文字对应的 key | _string_ | `text` |\n| item-height | 选项高度 | _number_ | `44` |\n| confirm-button-text | 确认按钮文字 | _string_ | `确认` |\n| cancel-button-text | 取消按钮文字 | _string_ | `取消` |\n| visible-item-count | 可见的选项个数 | _number_ | `6` |\n| default-index | 单列选择器的默认选中项索引，<br>多列选择器请参考下方的 Columns 配置 | _number_ | `0` |\n\n### Events\n\nPicker 组件的事件会根据 columns 是单列或多列返回不同的参数。\n\n| 事件名 | 说明 | 参数 |\n| --- | --- | --- |\n| bind:confirm | 点击完成按钮时触发 | 单列：选中值，选中值对应的索引<br>多列：所有列选中值，所有列选中值对应的索引 |\n| bind:cancel | 点击取消按钮时触发 | 单列：选中值，选中值对应的索引<br>多列：所有列选中值，所有列选中值对应的索引 |\n| bind:change | 选项改变时触发 | 单列：Picker 实例，选中值，选中值对应的索引<br>多列：Picker 实例，所有列选中值，当前列对应的索引 |\n\n### Columns 数据结构\n\n当传入多列数据时，`columns`为一个对象数组，数组中的每一个对象配置每一列，每一列有以下`key`。\n\n| key          | 说明                       |\n| ------------ | -------------------------- |\n| values       | 列中对应的备选值           |\n| defaultIndex | 初始选中项的索引，默认为 0 |\n\n### 外部样式类\n\n| 类名          | 说明         |\n| ------------- | ------------ |\n| custom-class  | 根节点样式类 |\n| active-class  | 选中项样式类 |\n| toolbar-class | 顶部栏样式类 |\n| column-class  | 列样式类     |\n\n### 方法\n\n通过 selectComponent 可以获取到 picker 实例并调用实例方法。\n\n| 方法名 | 参数 | 返回值 | 介绍 |\n| --- | --- | --- | --- |\n| getValues | - | values | 获取所有列选中的值 |\n| setValues | values | - | 设置所有列选中的值 |\n| getIndexes | - | indexes | 获取所有列选中值对应的索引 |\n| setIndexes | indexes | - | 设置所有列选中值对应的索引 |\n| getColumnValue | columnIndex | value | 获取对应列选中的值 |\n| setColumnValue | columnIndex, value | - | 设置对应列选中的值 |\n| getColumnIndex | columnIndex | optionIndex | 获取对应列选中项的索引 |\n| setColumnIndex | columnIndex, optionIndex | - | 设置对应列选中项的索引 |\n| getColumnValues | columnIndex | values | 获取对应列中所有选项 |\n| setColumnValues | columnIndex, values | - | 设置对应列中所有选项 |\n"
  },
  {
    "path": "packages/picker/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-toast\": \"../../toast/index\",\n    \"van-picker\": \"../../picker/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/picker/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  data: {\n    column1: ['杭州', '宁波', '温州', '嘉兴', '湖州'],\n    column2: [\n      { text: '杭州', disabled: true },\n      { text: '宁波' },\n      { text: '温州' },\n    ],\n    column3: {\n      浙江: ['杭州', '宁波', '温州', '嘉兴', '湖州'],\n      福建: ['福州', '厦门', '莆田', '三明', '泉州'],\n    },\n    column4: [\n      {\n        values: ['浙江', '福建'],\n        className: 'column1',\n      },\n      {\n        values: ['杭州', '宁波', '温州', '嘉兴', '湖州'],\n        className: 'column2',\n        defaultIndex: 2,\n      },\n    ],\n  },\n\n  methods: {\n    onChange1(event) {\n      const { value, index } = event.detail;\n      Toast({\n        context: this,\n        message: `Value: ${value}, Index：${index}`,\n      });\n    },\n\n    onConfirm(event) {\n      const { value, index } = event.detail;\n      Toast({\n        context: this,\n        message: `Value: ${value}, Index：${index}`,\n      });\n    },\n\n    onCancel() {\n      Toast({\n        context: this,\n        message: '取消',\n      });\n    },\n\n    onChange2(event) {\n      const { picker, value } = event.detail;\n      picker.setColumnValues(1, this.data.column3[value[0]]);\n      getApp().picker = picker;\n    },\n  },\n});\n"
  },
  {
    "path": "packages/picker/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-picker\n    columns=\"{{ column1 }}\"\n    bind:change=\"onChange1\"\n  />\n</demo-block>\n\n<demo-block title=\"默认选中项\">\n  <van-picker\n    columns=\"{{ column1 }}\"\n    default-index=\"{{ 2 }}\"\n    bind:change=\"onChange1\"\n  />\n</demo-block>\n\n<demo-block title=\"展示顶部栏\">\n  <van-picker\n    show-toolbar\n    title=\"标题\"\n    columns=\"{{ column1 }}\"\n    bind:change=\"onChange1\"\n    bind:confirm=\"onConfirm\"\n    bind:cancel=\"onCancel\"\n  />\n</demo-block>\n\n<demo-block title=\"多列联动\">\n  <van-picker\n    columns=\"{{ column4 }}\"\n    bind:change=\"onChange2\"\n  />\n</demo-block>\n\n<demo-block title=\"禁用选项\">\n  <van-picker columns=\"{{ column2 }}\" />\n</demo-block>\n\n<demo-block title=\"加载状态\">\n  <van-picker\n    loading\n    columns=\"{{ column4 }}\"\n  />\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/picker/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"picker-column\": \"../picker-column/index\",\n    \"loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "packages/picker/index.less",
    "content": "@import '../common/style/var';\n\n.van-picker {\n  position: relative;\n  overflow: hidden;\n  -webkit-text-size-adjust: 100%; /* avoid iOS text size adjust */\n  user-select: none;\n  background-color: var(--picker-background-color, @picker-background-color);\n\n  &__toolbar {\n    display: flex;\n    justify-content: space-between;\n    height: var(--picker-toolbar-height, @picker-toolbar-height);\n    line-height: var(--picker-toolbar-height, @picker-toolbar-height);\n  }\n\n  &__cancel,\n  &__confirm {\n    padding: var(--picker-action-padding, @picker-action-padding);\n    font-size: var(--picker-action-font-size, @picker-action-font-size);\n\n    &--hover {\n      opacity: @active-opacity;\n    }\n  }\n\n  &__confirm {\n    color: var(--picker-confirm-action-color, @picker-confirm-action-color);\n  }\n\n  &__cancel {\n    color: var(--picker-cancel-action-color, @picker-cancel-action-color);\n  }\n\n  &__title {\n    max-width: 50%;\n    text-align: center;\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n    font-size: var(--picker-option-font-size, @picker-option-font-size);\n  }\n\n  &__columns {\n    position: relative;\n    display: flex;\n  }\n\n  &__column {\n    flex: 1 1;\n    width: 0;\n  }\n\n  &__loading {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    z-index: 4;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background-color: var(\n      --picker-loading-mask-color,\n      @picker-loading-mask-color\n    );\n  }\n\n  &__mask {\n    position: absolute;\n    top: 0;\n    left: 0;\n    z-index: 2;\n    width: 100%;\n    height: 100%;\n    background-image: linear-gradient(\n        180deg,\n        hsla(0, 0%, 100%, 0.9),\n        hsla(0, 0%, 100%, 0.4)\n      ),\n      linear-gradient(0deg, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.4));\n    background-repeat: no-repeat;\n    background-position: top, bottom;\n    backface-visibility: hidden;\n    pointer-events: none;\n  }\n\n  &__frame {\n    position: absolute;\n    top: 50%;\n    right: @padding-md;\n    left: @padding-md;\n    z-index: 1;\n    transform: translateY(-50%);\n    pointer-events: none;\n  }\n}\n"
  },
  {
    "path": "packages/picker/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { pickerProps } from './shared';\n\ninterface Column {\n  values: any[];\n  defaultIndex?: number;\n}\n\nVantComponent({\n  classes: ['active-class', 'toolbar-class', 'column-class'],\n\n  props: {\n    ...pickerProps,\n    valueKey: {\n      type: String,\n      value: 'text',\n    },\n    toolbarPosition: {\n      type: String,\n      value: 'top',\n    },\n    defaultIndex: {\n      type: Number,\n      value: 0,\n    },\n    columns: {\n      type: Array,\n      value: [],\n      observer(columns = []) {\n        this.simple = columns.length && !columns[0].values;\n\n        if (Array.isArray(this.children) && this.children.length) {\n          this.setColumns().catch(() => {});\n        }\n      },\n    },\n  },\n\n  beforeCreate() {\n    Object.defineProperty(this, 'children', {\n      get: () => this.selectAllComponents('.van-picker__column') || [],\n    });\n  },\n\n  methods: {\n    noop() {},\n\n    setColumns() {\n      const { data } = this;\n      const columns = this.simple ? [{ values: data.columns }] : data.columns;\n      const stack = columns.map((column: Column, index: number) =>\n        this.setColumnValues(index, column.values)\n      );\n      return Promise.all(stack);\n    },\n\n    emit(event: WechatMiniprogram.TouchEvent) {\n      const { type } = event.currentTarget.dataset;\n      if (this.simple) {\n        this.$emit(type, {\n          value: this.getColumnValue(0),\n          index: this.getColumnIndex(0),\n        });\n      } else {\n        this.$emit(type, {\n          value: this.getValues(),\n          index: this.getIndexes(),\n        });\n      }\n    },\n\n    onChange(event: WechatMiniprogram.CustomEvent) {\n      if (this.simple) {\n        this.$emit('change', {\n          picker: this,\n          value: this.getColumnValue(0),\n          index: this.getColumnIndex(0),\n        });\n      } else {\n        this.$emit('change', {\n          picker: this,\n          value: this.getValues(),\n          index: event.currentTarget.dataset.index,\n        });\n      }\n    },\n\n    // get column instance by index\n    getColumn(index: number) {\n      return this.children[index];\n    },\n\n    // get column value by index\n    getColumnValue(index: number) {\n      const column = this.getColumn(index);\n      return column && column.getValue();\n    },\n\n    // set column value by index\n    setColumnValue(index: number, value: any) {\n      const column = this.getColumn(index);\n\n      if (column == null) {\n        return Promise.reject(new Error('setColumnValue: 对应列不存在'));\n      }\n\n      return column.setValue(value);\n    },\n\n    // get column option index by column index\n    getColumnIndex(columnIndex: number) {\n      return (this.getColumn(columnIndex) || {}).data.currentIndex;\n    },\n\n    // set column option index by column index\n    setColumnIndex(columnIndex: number, optionIndex: number) {\n      const column = this.getColumn(columnIndex);\n\n      if (column == null) {\n        return Promise.reject(new Error('setColumnIndex: 对应列不存在'));\n      }\n\n      return column.setIndex(optionIndex);\n    },\n\n    // get options of column by index\n    getColumnValues(index: number) {\n      return (this.children[index] || {}).data.options;\n    },\n\n    // set options of column by index\n    setColumnValues(index: number, options: any[], needReset = true) {\n      const column = this.children[index];\n\n      if (column == null) {\n        return Promise.reject(new Error('setColumnValues: 对应列不存在'));\n      }\n\n      const isSame =\n        JSON.stringify(column.data.options) === JSON.stringify(options);\n\n      if (isSame) {\n        return Promise.resolve();\n      }\n\n      return column.set({ options }).then(() => {\n        if (needReset) {\n          column.setIndex(0);\n        }\n      });\n    },\n\n    // get values of all columns\n    getValues() {\n      return this.children.map((child) => child.getValue());\n    },\n\n    // set values of all columns\n    setValues(values: any[]) {\n      const stack = values.map((value, index) =>\n        this.setColumnValue(index, value)\n      );\n      return Promise.all(stack);\n    },\n\n    // get indexes of all columns\n    getIndexes() {\n      return this.children.map((child) => child.data.currentIndex);\n    },\n\n    // set indexes of all columns\n    setIndexes(indexes: number[]) {\n      const stack = indexes.map((optionIndex, columnIndex) =>\n        this.setColumnIndex(columnIndex, optionIndex)\n      );\n      return Promise.all(stack);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/picker/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-picker custom-class\">\n  <include wx:if=\"{{ toolbarPosition === 'top' }}\" src=\"./toolbar.wxml\" />\n\n  <view wx:if=\"{{ loading }}\" class=\"van-picker__loading\">\n    <loading color=\"#1989fa\"/>\n  </view>\n\n  <view\n    class=\"van-picker__columns\"\n    style=\"{{ computed.columnsStyle({ itemHeight, visibleItemCount }) }}\"\n    catch:touchmove=\"noop\"\n  >\n    <picker-column\n      class=\"van-picker__column\"\n      wx:for=\"{{ computed.columns(columns) }}\"\n      wx:key=\"index\"\n      data-index=\"{{ index }}\"\n      custom-class=\"column-class\"\n      value-key=\"{{ valueKey }}\"\n      initial-options=\"{{ item.values }}\"\n      default-index=\"{{ item.defaultIndex || defaultIndex }}\"\n      item-height=\"{{ itemHeight }}\"\n      visible-item-count=\"{{ visibleItemCount }}\"\n      active-class=\"active-class\"\n      bind:change=\"onChange\"\n    />\n    <view class=\"van-picker__mask\" style=\"{{ computed.maskStyle({ itemHeight, visibleItemCount }) }}\" />\n    <view\n      class=\"van-picker__frame van-hairline--top-bottom\"\n      style=\"{{ computed.frameStyle({ itemHeight }) }}\"\n    />\n  </view>\n\n  <include wx:if=\"{{ toolbarPosition === 'bottom' }}\" src=\"./toolbar.wxml\" />\n</view>\n"
  },
  {
    "path": "packages/picker/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\nvar array = require('../wxs/array.wxs');\n\nfunction columnsStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight * data.visibleItemCount),\n  });\n}\n\nfunction maskStyle(data) {\n  return style({\n    'background-size':\n      '100% ' + addUnit((data.itemHeight * (data.visibleItemCount - 1)) / 2),\n  });\n}\n\nfunction frameStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight),\n  });\n}\n\nfunction columns(columns) {\n  if (!array.isArray(columns)) {\n    return [];\n  }\n\n  if (columns.length && !columns[0].values) {\n    return [{ values: columns }];\n  }\n\n  return columns;\n}\n\nmodule.exports = {\n  columnsStyle: columnsStyle,\n  frameStyle: frameStyle,\n  maskStyle: maskStyle,\n  columns: columns,\n};\n"
  },
  {
    "path": "packages/picker/shared.ts",
    "content": "export const pickerProps = {\n  title: String,\n  loading: Boolean,\n  showToolbar: Boolean,\n  cancelButtonText: {\n    type: String,\n    value: '取消',\n  },\n  confirmButtonText: {\n    type: String,\n    value: '确认',\n  },\n  visibleItemCount: {\n    type: Number,\n    value: 6,\n  },\n  itemHeight: {\n    type: Number,\n    value: 44,\n  },\n};\n"
  },
  {
    "path": "packages/picker/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-picker\n        bind:change=\"onChange1\"\n      >\n        <wx-view\n          class=\"van-picker custom-class\"\n        >\n          <wx-view\n            class=\"van-picker__columns\"\n            style=\"height:264px\"\n            catch:touchmove=\"noop\"\n          >\n            <picker-column\n              activeClass=\"active-class\"\n              class=\"van-picker__column\"\n              customClass=\"column-class\"\n              data-index=\"{{0}}\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-picker-column custom-class\"\n                style=\"height:264px\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                >\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item van-picker-column__item--selected active-class\"\n                    data-index=\"{{0}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    杭州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{1}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    宁波\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{2}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    温州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{3}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    嘉兴\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{4}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    湖州\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </picker-column>\n            <wx-view\n              class=\"van-picker__mask\"\n              style=\"background-size:100% 110px\"\n            />\n            <wx-view\n              class=\"van-picker__frame van-hairline--top-bottom\"\n              style=\"height:44px\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        默认选中项\n      </wx-view>\n      <van-picker\n        bind:change=\"onChange1\"\n      >\n        <wx-view\n          class=\"van-picker custom-class\"\n        >\n          <wx-view\n            class=\"van-picker__columns\"\n            style=\"height:264px\"\n            catch:touchmove=\"noop\"\n          >\n            <picker-column\n              activeClass=\"active-class\"\n              class=\"van-picker__column\"\n              customClass=\"column-class\"\n              data-index=\"{{0}}\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-picker-column custom-class\"\n                style=\"height:264px\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                >\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{0}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    杭州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{1}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    宁波\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item van-picker-column__item--selected active-class\"\n                    data-index=\"{{2}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    温州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{3}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    嘉兴\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{4}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    湖州\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </picker-column>\n            <wx-view\n              class=\"van-picker__mask\"\n              style=\"background-size:100% 110px\"\n            />\n            <wx-view\n              class=\"van-picker__frame van-hairline--top-bottom\"\n              style=\"height:44px\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示顶部栏\n      </wx-view>\n      <van-picker\n        bind:cancel=\"onCancel\"\n        bind:change=\"onChange1\"\n        bind:confirm=\"onConfirm\"\n      >\n        <wx-view\n          class=\"van-picker custom-class\"\n        >\n          <wx-view\n            class=\"van-picker__toolbar toolbar-class\"\n          >\n            <wx-view\n              class=\"van-picker__cancel\"\n              data-type=\"cancel\"\n              hoverClass=\"van-picker__cancel--hover\"\n              hoverStayTime=\"70\"\n              bind:tap=\"emit\"\n            >\n              \n    取消\n  \n            </wx-view>\n            <wx-view\n              class=\"van-picker__title van-ellipsis\"\n            >\n              标题\n            </wx-view>\n            <wx-view\n              class=\"van-picker__confirm\"\n              data-type=\"confirm\"\n              hoverClass=\"van-picker__confirm--hover\"\n              hoverStayTime=\"70\"\n              bind:tap=\"emit\"\n            >\n              \n    确认\n  \n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"van-picker__columns\"\n            style=\"height:264px\"\n            catch:touchmove=\"noop\"\n          >\n            <picker-column\n              activeClass=\"active-class\"\n              class=\"van-picker__column\"\n              customClass=\"column-class\"\n              data-index=\"{{0}}\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-picker-column custom-class\"\n                style=\"height:264px\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                >\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item van-picker-column__item--selected active-class\"\n                    data-index=\"{{0}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    杭州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{1}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    宁波\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{2}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    温州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{3}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    嘉兴\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{4}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    湖州\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </picker-column>\n            <wx-view\n              class=\"van-picker__mask\"\n              style=\"background-size:100% 110px\"\n            />\n            <wx-view\n              class=\"van-picker__frame van-hairline--top-bottom\"\n              style=\"height:44px\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        多列联动\n      </wx-view>\n      <van-picker\n        bind:change=\"onChange2\"\n      >\n        <wx-view\n          class=\"van-picker custom-class\"\n        >\n          <wx-view\n            class=\"van-picker__columns\"\n            style=\"height:264px\"\n            catch:touchmove=\"noop\"\n          >\n            <picker-column\n              activeClass=\"active-class\"\n              class=\"van-picker__column\"\n              customClass=\"column-class\"\n              data-index=\"{{0}}\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-picker-column custom-class\"\n                style=\"height:264px\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                >\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item van-picker-column__item--selected active-class\"\n                    data-index=\"{{0}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    浙江\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{1}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    福建\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </picker-column>\n            <picker-column\n              activeClass=\"active-class\"\n              class=\"van-picker__column\"\n              customClass=\"column-class\"\n              data-index=\"{{1}}\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-picker-column custom-class\"\n                style=\"height:264px\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                >\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{0}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    杭州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{1}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    宁波\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item van-picker-column__item--selected active-class\"\n                    data-index=\"{{2}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    温州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{3}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    嘉兴\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{4}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    湖州\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </picker-column>\n            <wx-view\n              class=\"van-picker__mask\"\n              style=\"background-size:100% 110px\"\n            />\n            <wx-view\n              class=\"van-picker__frame van-hairline--top-bottom\"\n              style=\"height:44px\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用选项\n      </wx-view>\n      <van-picker>\n        <wx-view\n          class=\"van-picker custom-class\"\n        >\n          <wx-view\n            class=\"van-picker__columns\"\n            style=\"height:264px\"\n            catch:touchmove=\"noop\"\n          >\n            <picker-column\n              activeClass=\"active-class\"\n              class=\"van-picker__column\"\n              customClass=\"column-class\"\n              data-index=\"{{0}}\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-picker-column custom-class\"\n                style=\"height:264px\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                >\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item van-picker-column__item--disabled van-picker-column__item--selected active-class\"\n                    data-index=\"{{0}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    杭州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{1}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    宁波\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{2}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    温州\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </picker-column>\n            <wx-view\n              class=\"van-picker__mask\"\n              style=\"background-size:100% 110px\"\n            />\n            <wx-view\n              class=\"van-picker__frame van-hairline--top-bottom\"\n              style=\"height:44px\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-picker>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载状态\n      </wx-view>\n      <van-picker>\n        <wx-view\n          class=\"van-picker custom-class\"\n        >\n          <wx-view\n            class=\"van-picker__loading\"\n          >\n            <van-loading>\n              <wx-view\n                class=\"custom-class van-loading\"\n              >\n                <wx-view\n                  class=\"van-loading__spinner van-loading__spinner--circular\"\n                  style=\"color:#1989fa\"\n                />\n                <wx-view\n                  class=\"van-loading__text\"\n                  style=\"\"\n                />\n              </wx-view>\n            </van-loading>\n          </wx-view>\n          <wx-view\n            class=\"van-picker__columns\"\n            style=\"height:264px\"\n            catch:touchmove=\"noop\"\n          >\n            <picker-column\n              activeClass=\"active-class\"\n              class=\"van-picker__column\"\n              customClass=\"column-class\"\n              data-index=\"{{0}}\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-picker-column custom-class\"\n                style=\"height:264px\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                >\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item van-picker-column__item--selected active-class\"\n                    data-index=\"{{0}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    浙江\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{1}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    福建\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </picker-column>\n            <picker-column\n              activeClass=\"active-class\"\n              class=\"van-picker__column\"\n              customClass=\"column-class\"\n              data-index=\"{{1}}\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-picker-column custom-class\"\n                style=\"height:264px\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  style=\"transition:transform 0ms;line-height:44px;transform:translate3d(0, 110px, 0)\"\n                >\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{0}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    杭州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{1}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    宁波\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item van-picker-column__item--selected active-class\"\n                    data-index=\"{{2}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    温州\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{3}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    嘉兴\n                  </wx-view>\n                  <wx-view\n                    class=\"van-ellipsis van-picker-column__item \"\n                    data-index=\"{{4}}\"\n                    style=\"height: 44px\"\n                    bind:tap=\"onClickItem\"\n                  >\n                    湖州\n                  </wx-view>\n                </wx-view>\n              </wx-view>\n            </picker-column>\n            <wx-view\n              class=\"van-picker__mask\"\n              style=\"background-size:100% 110px\"\n            />\n            <wx-view\n              class=\"van-picker__frame van-hairline--top-bottom\"\n              style=\"height:44px\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-picker>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/picker/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/picker/toolbar.wxml",
    "content": "<view wx:if=\"{{ showToolbar }}\" class=\"van-picker__toolbar toolbar-class\">\n  <view\n    class=\"van-picker__cancel\"\n    hover-class=\"van-picker__cancel--hover\"\n    hover-stay-time=\"70\"\n    data-type=\"cancel\"\n    bindtap=\"emit\"\n  >\n    {{ cancelButtonText }}\n  </view>\n  <view wx:if=\"{{ title }}\" class=\"van-picker__title van-ellipsis\">{{\n    title\n  }}</view>\n  <view\n    class=\"van-picker__confirm\"\n    hover-class=\"van-picker__confirm--hover\"\n    hover-stay-time=\"70\"\n    data-type=\"confirm\"\n    bindtap=\"emit\"\n  >\n    {{ confirmButtonText }}\n  </view>\n</view>\n"
  },
  {
    "path": "packages/picker-column/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/picker-column/index.less",
    "content": "@import '../common/style/var';\n\n.van-picker-column {\n  overflow: hidden;\n  text-align: center;\n  color: var(--picker-option-text-color, @picker-option-text-color);\n  font-size: var(--picker-option-font-size, @picker-option-font-size);\n\n  &__item {\n    padding: 0 5px;\n\n    &--selected {\n      font-weight: var(--font-weight-bold, @font-weight-bold);\n      color: var(\n        --picker-option-selected-text-color,\n        @picker-option-selected-text-color\n      );\n    }\n\n    &--disabled {\n      opacity: var(\n        --picker-option-disabled-opacity,\n        @picker-option-disabled-opacity\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "packages/picker-column/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { range } from '../common/utils';\nimport { isObj } from '../common/validator';\n\nconst DEFAULT_DURATION = 200;\n\nVantComponent({\n  classes: ['active-class'],\n\n  props: {\n    valueKey: String,\n    className: String,\n    itemHeight: Number,\n    visibleItemCount: Number,\n    initialOptions: {\n      type: Array,\n      value: [],\n    },\n    defaultIndex: {\n      type: Number,\n      value: 0,\n      observer(value: number) {\n        this.setIndex(value);\n      },\n    },\n  },\n\n  data: {\n    startY: 0,\n    offset: 0,\n    duration: 0,\n    startOffset: 0,\n    options: [],\n    currentIndex: 0,\n  },\n\n  created() {\n    const { defaultIndex, initialOptions } = this.data;\n\n    this.set({\n      currentIndex: defaultIndex,\n      options: initialOptions,\n    }).then(() => {\n      this.setIndex(defaultIndex);\n    });\n  },\n\n  methods: {\n    getCount() {\n      return this.data.options.length;\n    },\n\n    onTouchStart(event: WechatMiniprogram.TouchEvent) {\n      this.setData({\n        startY: event.touches[0].clientY,\n        startOffset: this.data.offset,\n        duration: 0,\n      });\n    },\n\n    onTouchMove(event: WechatMiniprogram.TouchEvent) {\n      const { data } = this;\n      const deltaY = event.touches[0].clientY - data.startY;\n      this.setData({\n        offset: range(\n          data.startOffset + deltaY,\n          -(this.getCount() * data.itemHeight),\n          data.itemHeight\n        ),\n      });\n    },\n\n    onTouchEnd() {\n      const { data } = this;\n      if (data.offset !== data.startOffset) {\n        this.setData({ duration: DEFAULT_DURATION });\n\n        const index = range(\n          Math.round(-data.offset / data.itemHeight),\n          0,\n          this.getCount() - 1\n        );\n        this.setIndex(index, true);\n      }\n    },\n\n    onClickItem(event: WechatMiniprogram.TouchEvent) {\n      const { index } = event.currentTarget.dataset;\n      this.setIndex(index, true);\n    },\n\n    adjustIndex(index: number) {\n      const { data } = this;\n      const count = this.getCount();\n\n      index = range(index, 0, count);\n      for (let i = index; i < count; i++) {\n        if (!this.isDisabled(data.options[i])) return i;\n      }\n      for (let i = index - 1; i >= 0; i--) {\n        if (!this.isDisabled(data.options[i])) return i;\n      }\n    },\n\n    isDisabled(option: any) {\n      return isObj(option) && option.disabled;\n    },\n\n    getOptionText(option: any) {\n      const { data } = this;\n      return isObj(option) && data.valueKey in option\n        ? option[data.valueKey]\n        : option;\n    },\n\n    setIndex(index: number, userAction?: boolean) {\n      const { data } = this;\n      index = this.adjustIndex(index) || 0;\n      const offset = -index * data.itemHeight;\n\n      if (index !== data.currentIndex) {\n        return this.set({ offset, currentIndex: index }).then(() => {\n          userAction && this.$emit('change', index);\n        });\n      }\n\n      return this.set({ offset });\n    },\n\n    setValue(value: string) {\n      const { options } = this.data;\n      for (let i = 0; i < options.length; i++) {\n        if (this.getOptionText(options[i]) === value) {\n          return this.setIndex(i);\n        }\n      }\n      return Promise.resolve();\n    },\n\n    getValue() {\n      const { data } = this;\n      return data.options[data.currentIndex];\n    },\n  },\n});\n"
  },
  {
    "path": "packages/picker-column/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-picker-column custom-class\"\n  style=\"{{ computed.rootStyle({ itemHeight, visibleItemCount }) }}\"\n  bind:touchstart=\"onTouchStart\"\n  catch:touchmove=\"onTouchMove\"\n  bind:touchend=\"onTouchEnd\"\n  bind:touchcancel=\"onTouchEnd\"\n>\n  <view style=\"{{ computed.wrapperStyle({ offset, itemHeight, visibleItemCount, duration }) }}\">\n    <view\n      wx:for=\"{{ options }}\"\n      wx:for-item=\"option\"\n      wx:key=\"index\"\n      data-index=\"{{ index }}\"\n      style=\"height: {{ itemHeight }}px\"\n      class=\"van-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: index === currentIndex }) }} {{ index === currentIndex ? 'active-class' : '' }}\"\n      bindtap=\"onClickItem\"\n    >{{ computed.optionText(option, valueKey) }}</view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/picker-column/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction isObj(x) {\n  var type = typeof x;\n  return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction optionText(option, valueKey) {\n  return isObj(option) && option[valueKey] != null ? option[valueKey] : option;\n}\n\nfunction rootStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight * data.visibleItemCount),\n  });\n}\n\nfunction wrapperStyle(data) {\n  var offset = addUnit(\n    data.offset + (data.itemHeight * (data.visibleItemCount - 1)) / 2\n  );\n\n  return style({\n    transition: 'transform ' + data.duration + 'ms',\n    'line-height': addUnit(data.itemHeight),\n    transform: 'translate3d(0, ' + offset + ', 0)',\n  });\n}\n\nmodule.exports = {\n  optionText: optionText,\n  rootStyle: rootStyle,\n  wrapperStyle: wrapperStyle,\n};\n"
  },
  {
    "path": "packages/popup/README.md",
    "content": "# Popup 弹出层\n\n### 介绍\n\n弹出层容器，用于展示弹窗、信息提示等内容，支持多个弹出层叠加展示。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-popup\": \"@vant/weapp/popup/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n通过`show`属性控制弹出层是否展示。\n\n```html\n<van-cell title=\"展示弹出层\" is-link bind:click=\"showPopup\" />\n\n<van-popup show=\"{{ show }}\" bind:close=\"onClose\">内容</van-popup>\n```\n\n```javascript\nPage({\n  data: {\n    show: false,\n  },\n\n  showPopup() {\n    this.setData({ show: true });\n  },\n\n  onClose() {\n    this.setData({ show: false });\n  },\n});\n```\n\n### 弹出位置\n\n通过`position`属性设置弹出位置，默认居中弹出，可以设置为`top`、`bottom`、`left`、`right`。\n\n```html\n<van-popup\n  show=\"{{ show }}\"\n  position=\"top\"\n  custom-style=\"height: 20%;\"\n  bind:close=\"onClose\"\n/>\n```\n\n### 关闭图标\n\n设置`closeable`属性后，会在弹出层的右上角显示关闭图标，并且可以通过`close-icon`属性自定义图标，使用`close-icon-position`属性可以自定义图标位置。\n\n```html\n<van-popup\n  show=\"{{ show }}\"\n  closeable\n  position=\"bottom\"\n  custom-style=\"height: 20%\"\n  bind:close=\"onClose\"\n/>\n\n<!-- 自定义图标 -->\n<van-popup\n  show=\"{{ show }}\"\n  closeable\n  close-icon=\"close\"\n  position=\"bottom\"\n  custom-style=\"height: 20%\"\n  bind:close=\"onClose\"\n/>\n\n<!-- 图标位置 -->\n<van-popup\n  show=\"{{ show }}\"\n  closeable\n  close-icon-position=\"top-left\"\n  position=\"bottom\"\n  custom-style=\"height: 20%\"\n  bind:close=\"onClose\"\n/>\n```\n\n### 圆角弹窗\n\n设置`round`属性后，弹窗会根据弹出位置添加不同的圆角样式。\n\n```html\n<van-popup\n  show=\"{{ show }}\"\n  round\n  position=\"bottom\"\n  custom-style=\"height: 20%\"\n  bind:close=\"onClose\"\n/>\n```\n\n### 禁止滚动穿透\n\n使用组件时，会发现内容部分滚动到底时，继续划动会导致底层页面的滚动，这就是滚动穿透。\n\n目前，组件可以通过 `lock-scroll` 属性处理部分滚动穿透问题。 **但由于小程序自身原因，弹窗内容区域仍会出现滚动穿透。** 不过，我们为开发者提供了一个推荐方案以完整解决滚动穿透：\n\n#### [page-meta](https://developers.weixin.qq.com/miniprogram/dev/component/page-meta.html)\n\n当小程序基础库最低版本在 2.9.0 以上时，即可使用 [page-meta](https://developers.weixin.qq.com/miniprogram/dev/component/page-meta.html) 组件动态修改页面样式\n\n```html\n<!-- page-meta 只能是页面内的第一个节点 -->\n<page-meta page-style=\"{{ show ? 'overflow: hidden;' : '' }}\" />\n\n<van-popup show=\"{{ show }}\" catch:touchstart />\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| show | 是否显示弹出层 | _boolean_ | `false` |\n| z-index | z-index 层级 | _number_ | `100` |\n| overlay | 是否显示遮罩层 | _boolean_ | `true` |\n| position | 弹出位置，可选值为 `top` `bottom` `right` `left` | _string_ | `center` |\n| duration | 动画时长，单位为毫秒 | _number \\| object_ | `300` |\n| round | 是否显示圆角 | _boolean_ | `false` |\n| custom-style | 自定义弹出层样式 | _string_ | `''` |\n| overlay-style | 自定义遮罩层样式 | _string_ | `''` |\n| close-on-click-overlay | 是否在点击遮罩层后关闭 | _boolean_ | `true` |\n| closeable | 是否显示关闭图标 | _boolean_ | `false` |\n| close-icon | 关闭图标名称或图片链接 | _string_ | `cross` |\n| close-icon-position | 关闭图标位置，可选值为 `top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` |\n| safe-area-inset-bottom | 是否为 iPhoneX 留出底部安全距离 | _boolean_ | `true` |\n| safe-area-inset-top | 是否留出顶部安全距离（状态栏高度） | _boolean_ | `false` |\n| safe-area-tab-bar | 是否留出底部 tabbar 安全距离（在使用 tabbar 组件 & 小程序自定义 tabbar 时，popup 组件层级无法盖住 tabbar） | _boolean_ | `false` |\n| lock-scroll `v1.7.3` | 是否锁定背景滚动 | _boolean_ | `true` |\n| root-portal `v1.10.14` | 是否从页面中脱离出来，用于解决各种 fixed 失效问题，微信基础库 >= `2.25.2 ` | _boolean_ | `false` |\n\n### Events\n\n| 事件名             | 说明             | 参数 |\n| ------------------ | ---------------- | ---- |\n| bind:close         | 关闭弹出层时触发 | -    |\n| bind:click-overlay | 点击遮罩层时触发 | -    |\n| bind:before-enter  | 进入前触发       | -    |\n| bind:enter         | 进入中触发       | -    |\n| bind:after-enter   | 进入后触发       | -    |\n| bind:before-leave  | 离开前触发       | -    |\n| bind:leave         | 离开中触发       | -    |\n| bind:after-leave   | 离开后触发       | -    |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n"
  },
  {
    "path": "packages/popup/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-popup\": \"../../popup/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/popup/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    show: {\n      basic: false,\n      top: false,\n      bottom: false,\n      left: false,\n      right: false,\n      round: false,\n      closeIcon: false,\n      customCloseIcon: false,\n      customIconPosition: false,\n    },\n  },\n\n  methods: {\n    toggle(type, show) {\n      this.setData({\n        [`show.${type}`]: show,\n      });\n    },\n\n    showBasic() {\n      this.toggle('basic', true);\n    },\n\n    hideBasic() {\n      this.toggle('basic', false);\n    },\n\n    showTop() {\n      this.toggle('top', true);\n    },\n\n    hideTop() {\n      this.toggle('top', false);\n    },\n\n    showLeft() {\n      this.toggle('left', true);\n    },\n\n    hideLeft() {\n      this.toggle('left', false);\n    },\n\n    showRight() {\n      this.toggle('right', true);\n    },\n\n    hideRight() {\n      this.toggle('right', false);\n    },\n\n    showBottom() {\n      this.toggle('bottom', true);\n    },\n\n    hideBottom() {\n      this.toggle('bottom', false);\n    },\n\n    showRound() {\n      this.toggle('round', true);\n    },\n\n    hideRound() {\n      this.toggle('round', false);\n    },\n\n    showCloseIcon() {\n      this.toggle('closeIcon', true);\n    },\n\n    hideCloseIcon() {\n      this.toggle('closeIcon', false);\n    },\n\n    showCustomCloseIcon() {\n      this.toggle('customCloseIcon', true);\n    },\n\n    hideCustomCloseIcon() {\n      this.toggle('customCloseIcon', false);\n    },\n\n    showCustomIconPosition() {\n      this.toggle('customIconPosition', true);\n    },\n\n    hideCustomIconPosition() {\n      this.toggle('customIconPosition', false);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/popup/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-cell title=\"展示弹出层\" is-link bind:click=\"showBasic\" />\n  <van-popup\n    show=\"{{ show.basic }}\"\n    custom-style=\"padding: 30px 50px\"\n    bind:close=\"hideBasic\"\n  >\n    内容\n  </van-popup>\n</demo-block>\n\n<demo-block title=\"弹出位置\">\n  <van-cell title=\"顶部弹出\" is-link bind:click=\"showTop\" />\n  <van-cell title=\"底部弹出\" is-link bind:click=\"showBottom\" />\n  <van-cell title=\"左侧弹出\" is-link bind:click=\"showLeft\" />\n  <van-cell title=\"右侧弹出\" is-link bind:click=\"showRight\" />\n\n  <van-popup\n    show=\"{{ show.top }}\"\n    position=\"top\"\n    custom-style=\"height: 20%\"\n    bind:close=\"hideTop\"\n  />\n  <van-popup\n    show=\"{{ show.bottom }}\"\n    position=\"bottom\"\n    custom-style=\"height: 20%\"\n    bind:close=\"hideBottom\"\n  />\n  <van-popup\n    show=\"{{ show.left }}\"\n    position=\"left\"\n    custom-style=\"width: 20%; height: 100%\"\n    bind:close=\"hideLeft\"\n  />\n  <van-popup\n    show=\"{{ show.right }}\"\n    position=\"right\"\n    custom-style=\"width: 20%; height: 100%\"\n    bind:close=\"hideRight\"\n  />\n</demo-block>\n\n<demo-block title=\"关闭图标\">\n  <van-cell title=\"关闭图标\" is-link bind:click=\"showCloseIcon\" />\n  <van-cell title=\"自定义图标\" is-link bind:click=\"showCustomCloseIcon\" />\n  <van-cell title=\"图标位置\" is-link bind:click=\"showCustomIconPosition\" />\n\n  <van-popup\n    show=\"{{ show.closeIcon }}\"\n    closeable\n    position=\"bottom\"\n    custom-style=\"height: 20%\"\n    bind:close=\"hideCloseIcon\"\n  />\n\n  <van-popup\n    show=\"{{ show.customCloseIcon }}\"\n    closeable\n    close-icon=\"close\"\n    position=\"bottom\"\n    custom-style=\"height: 20%\"\n    bind:close=\"hideCustomCloseIcon\"\n  />\n\n  <van-popup\n    show=\"{{ show.customIconPosition }}\"\n    closeable\n    close-icon-position=\"top-left\"\n    position=\"bottom\"\n    custom-style=\"height: 20%\"\n    bind:close=\"hideCustomIconPosition\"\n  />\n</demo-block>\n\n<demo-block title=\"圆角弹窗\">\n  <van-cell title=\"圆角弹窗\" is-link bind:click=\"showRound\" />\n\n  <van-popup\n    show=\"{{ show.round }}\"\n    round\n    position=\"bottom\"\n    custom-style=\"height: 20%\"\n    bind:close=\"hideRound\"\n  />\n</demo-block>\n"
  },
  {
    "path": "packages/popup/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-overlay\": \"../overlay/index\"\n  }\n}\n"
  },
  {
    "path": "packages/popup/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-popup {\n  position: fixed;\n  box-sizing: border-box;\n  max-height: 100%;\n  overflow-y: auto;\n  transition-timing-function: ease;\n  animation: ease both;\n  -webkit-overflow-scrolling: touch;\n  background-color: var(--popup-background-color, @popup-background-color);\n\n  &--center {\n    top: 50%;\n    left: 50%;\n    transform: translate3d(-50%, -50%, 0);\n\n    &.van-popup--round {\n      border-radius: var(\n        --popup-round-border-radius,\n        @popup-round-border-radius\n      );\n    }\n  }\n\n  &--top {\n    top: 0;\n    left: 0;\n    width: 100%;\n\n    &.van-popup--round {\n      border-radius: 0 0\n        var(\n          --popup-round-border-radius,\n          var(--popup-round-border-radius, @popup-round-border-radius)\n        )\n        var(\n          --popup-round-border-radius,\n          var(--popup-round-border-radius, @popup-round-border-radius)\n        );\n    }\n  }\n\n  &--right {\n    top: 50%;\n    right: 0;\n    transform: translate3d(0, -50%, 0);\n\n    &.van-popup--round {\n      border-radius: var(\n          --popup-round-border-radius,\n          var(--popup-round-border-radius, @popup-round-border-radius)\n        )\n        0 0\n        var(\n          --popup-round-border-radius,\n          var(--popup-round-border-radius, @popup-round-border-radius)\n        );\n    }\n  }\n\n  &--bottom {\n    bottom: 0;\n    left: 0;\n    width: 100%;\n\n    &.van-popup--round {\n      border-radius: var(\n          --popup-round-border-radius,\n          var(--popup-round-border-radius, @popup-round-border-radius)\n        )\n        var(\n          --popup-round-border-radius,\n          var(--popup-round-border-radius, @popup-round-border-radius)\n        )\n        0 0;\n    }\n  }\n\n  &--left {\n    top: 50%;\n    left: 0;\n    transform: translate3d(0, -50%, 0);\n\n    &.van-popup--round {\n      border-radius: 0\n        var(\n          --popup-round-border-radius,\n          var(--popup-round-border-radius, @popup-round-border-radius)\n        )\n        var(\n          --popup-round-border-radius,\n          var(--popup-round-border-radius, @popup-round-border-radius)\n        )\n        0;\n    }\n  }\n\n  &--bottom&--safe {\n    padding-bottom: constant(safe-area-inset-bottom);\n    padding-bottom: env(safe-area-inset-bottom);\n  }\n\n  &--bottom&--safeTabBar,\n  &--top&--safeTabBar {\n    bottom: var(--tabbar-height, @tabbar-height);\n  }\n\n  &--safeTop {\n    padding-top: constant(safe-area-inset-top);\n    padding-top: env(safe-area-inset-top);\n  }\n\n  &__close-icon {\n    position: absolute;\n    z-index: var(--popup-close-icon-z-index, @popup-close-icon-z-index);\n    color: var(--popup-close-icon-color, @popup-close-icon-color);\n    font-size: var(--popup-close-icon-size, @popup-close-icon-size);\n\n    &--top-left {\n      top: var(--popup-close-icon-margin, @popup-close-icon-margin);\n      left: var(--popup-close-icon-margin, @popup-close-icon-margin);\n    }\n\n    &--top-right {\n      top: var(--popup-close-icon-margin, @popup-close-icon-margin);\n      right: var(--popup-close-icon-margin, @popup-close-icon-margin);\n    }\n\n    &--bottom-left {\n      bottom: var(--popup-close-icon-margin, @popup-close-icon-margin);\n      left: var(--popup-close-icon-margin, @popup-close-icon-margin);\n    }\n\n    &--bottom-right {\n      right: var(--popup-close-icon-margin, @popup-close-icon-margin);\n      bottom: var(--popup-close-icon-margin, @popup-close-icon-margin);\n    }\n\n    &:active {\n      opacity: 0.6;\n    }\n  }\n}\n\n.van-scale-enter-active,\n.van-scale-leave-active {\n  transition-property: opacity, transform;\n}\n\n.van-scale-enter,\n.van-scale-leave-to {\n  transform: translate3d(-50%, -50%, 0) scale(0.7);\n  opacity: 0;\n}\n\n.van-fade-enter-active,\n.van-fade-leave-active {\n  transition-property: opacity;\n}\n\n.van-fade-enter,\n.van-fade-leave-to {\n  opacity: 0;\n}\n\n.van-center-enter-active,\n.van-center-leave-active {\n  transition-property: opacity;\n}\n\n.van-center-enter,\n.van-center-leave-to {\n  opacity: 0;\n}\n\n.van-bottom-enter-active,\n.van-bottom-leave-active,\n.van-top-enter-active,\n.van-top-leave-active,\n.van-left-enter-active,\n.van-left-leave-active,\n.van-right-enter-active,\n.van-right-leave-active {\n  transition-property: transform;\n}\n\n.van-bottom-enter,\n.van-bottom-leave-to {\n  transform: translate3d(0, 100%, 0);\n}\n\n.van-top-enter,\n.van-top-leave-to {\n  transform: translate3d(0, -100%, 0);\n}\n\n.van-left-enter,\n.van-left-leave-to {\n  transform: translate3d(-100%, -50%, 0);\n}\n\n.van-right-enter,\n.van-right-leave-to {\n  transform: translate3d(100%, -50%, 0);\n}\n"
  },
  {
    "path": "packages/popup/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { transition } from '../mixins/transition';\n\nVantComponent({\n  classes: [\n    'enter-class',\n    'enter-active-class',\n    'enter-to-class',\n    'leave-class',\n    'leave-active-class',\n    'leave-to-class',\n    'close-icon-class',\n  ],\n\n  mixins: [transition(false)],\n\n  props: {\n    round: Boolean,\n    closeable: Boolean,\n    customStyle: String,\n    overlayStyle: String,\n    transition: {\n      type: String,\n      observer: 'observeClass',\n    },\n    zIndex: {\n      type: Number,\n      value: 100,\n    },\n    overlay: {\n      type: Boolean,\n      value: true,\n    },\n    closeIcon: {\n      type: String,\n      value: 'cross',\n    },\n    closeIconPosition: {\n      type: String,\n      value: 'top-right',\n    },\n    closeOnClickOverlay: {\n      type: Boolean,\n      value: true,\n    },\n    position: {\n      type: String,\n      value: 'center',\n      observer: 'observeClass',\n    },\n    safeAreaInsetBottom: {\n      type: Boolean,\n      value: true,\n    },\n    safeAreaInsetTop: {\n      type: Boolean,\n      value: false,\n    },\n    safeAreaTabBar: {\n      type: Boolean,\n      value: false,\n    },\n    lockScroll: {\n      type: Boolean,\n      value: true,\n    },\n    rootPortal: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  created() {\n    this.observeClass();\n  },\n\n  methods: {\n    onClickCloseIcon() {\n      this.$emit('close');\n    },\n\n    onClickOverlay() {\n      this.$emit('click-overlay');\n\n      if (this.data.closeOnClickOverlay) {\n        this.$emit('close');\n      }\n    },\n\n    observeClass() {\n      const { transition, position, duration } = this.data;\n\n      const updateData: { [key: string]: any } = {\n        name: transition || position,\n      };\n\n      if (transition === 'none') {\n        updateData.duration = 0;\n        this.originDuration = duration;\n      } else if (this.originDuration != null) {\n        updateData.duration = this.originDuration;\n      }\n\n      this.setData(updateData);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/popup/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<import src=\"./popup.wxml\" />\n\n<van-overlay\n  wx:if=\"{{ overlay }}\"\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  custom-style=\"{{ overlayStyle }}\"\n  duration=\"{{ duration }}\"\n  bind:click=\"onClickOverlay\"\n  lock-scroll=\"{{ lockScroll }}\"\n  root-portal=\"{{ rootPortal }}\"\n/>\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./popup.wxml\" />\n</root-portal>\n\n <include wx:else src=\"./popup.wxml\" />\n"
  },
  {
    "path": "packages/popup/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction popupStyle(data) {\n  return style([\n    {\n      'z-index': data.zIndex,\n      '-webkit-transition-duration': data.currentDuration + 'ms',\n      'transition-duration': data.currentDuration + 'ms',\n    },\n    data.display ? null : 'display: none',\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  popupStyle: popupStyle,\n};\n"
  },
  {
    "path": "packages/popup/popup.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n<view\n  wx:if=\"{{ inited }}\"\n  class=\"custom-class {{ classes }} {{ utils.bem('popup', [position, { round, safe: safeAreaInsetBottom, safeTop: safeAreaInsetTop, safeTabBar: safeAreaTabBar }]) }}\"\n  style=\"{{ computed.popupStyle({ zIndex, currentDuration, display, customStyle }) }}\"\n  bind:transitionend=\"onTransitionEnd\"\n>\n  <slot />\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"{{ closeIcon }}\"\n    class=\"close-icon-class van-popup__close-icon van-popup__close-icon--{{ closeIconPosition }}\"\n    bind:tap=\"onClickCloseIcon\"\n  />\n</view>\n"
  },
  {
    "path": "packages/popup/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-cell\n        bind:click=\"showBasic\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            展示弹出层\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-popup\n        bind:close=\"hideBasic\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        弹出位置\n      </wx-view>\n      <van-cell\n        bind:click=\"showTop\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            顶部弹出\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"showBottom\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            底部弹出\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"showLeft\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            左侧弹出\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"showRight\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            右侧弹出\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-popup\n        bind:close=\"hideTop\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n      <van-popup\n        bind:close=\"hideBottom\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n      <van-popup\n        bind:close=\"hideLeft\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n      <van-popup\n        bind:close=\"hideRight\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        关闭图标\n      </wx-view>\n      <van-cell\n        bind:click=\"showCloseIcon\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            关闭图标\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"showCustomCloseIcon\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            自定义图标\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"showCustomIconPosition\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            图标位置\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-popup\n        bind:close=\"hideCloseIcon\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n      <van-popup\n        bind:close=\"hideCustomCloseIcon\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n      <van-popup\n        bind:close=\"hideCustomIconPosition\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        圆角弹窗\n      </wx-view>\n      <van-cell\n        bind:click=\"showRound\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            圆角弹窗\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-popup\n        bind:close=\"hideRound\"\n      >\n        <van-overlay\n          bind:click=\"onClickOverlay\"\n        >\n          <van-transition\n            customClass=\"van-overlay custom-class\"\n            bind:tap=\"onClick\"\n            catch:touchmove=\"noop\"\n          />\n        </van-overlay>\n      </van-popup>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/popup/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/progress/README.md",
    "content": "# Progress 进度条\n\n### 介绍\n\n用于展示操作的当前进度。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-progress\": \"@vant/weapp/progress/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n进度条默认为蓝色，使用`percentage`属性来设置当前进度。\n\n```html\n<van-progress percentage=\"50\" />\n```\n\n### 线条粗细\n\n通过`stroke-width`可以设置进度条的粗细。\n\n```html\n<van-progress :percentage=\"50\" stroke-width=\"8\" />\n```\n\n### 置灰\n\n设置`inactive`属性后进度条将置灰。\n\n```html\n<van-progress inactive percentage=\"50\" />\n```\n\n### 样式定制\n\n可以使用`pivot-text`属性自定义文字，`color`属性自定义进度条颜色。\n\n```html\n<van-progress pivot-text=\"橙色\" color=\"#f2826a\" percentage=\"25\" />\n\n<van-progress pivot-text=\"红色\" color=\"#ee0a24\" percentage=\"50\" />\n\n<van-progress\n  percentage=\"75\"\n  pivot-text=\"紫色\"\n  pivot-color=\"#7232dd\"\n  color=\"linear-gradient(to right, #be99ff, #7232dd)\"\n/>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| inactive | 是否置灰 | _boolean_ | `false` |\n| percentage | 进度百分比 | _number_ | `0` |\n| stroke-width | 进度条粗细，默认单位为`px` | _string \\| number_ | `4px` |\n| show-pivot | 是否显示进度文字 | _boolean_ | `true` |\n| color | 进度条颜色 | _string_ | `#1989fa` |\n| text-color | 进度文字颜色 | _string_ | `#fff` |\n| track-color | 轨道颜色 | _string_ | `#e5e5e5` |\n| pivot-text | 文字显示 | _string_ | 百分比文字 |\n| pivot-color | 文字背景色 | _string_ | 与进度条颜色一致 |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n"
  },
  {
    "path": "packages/progress/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-progress\": \"../../progress/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/progress/demo/index.less",
    "content": ".progress-position {\n  margin: 5px 15px 20px;\n}\n"
  },
  {
    "path": "packages/progress/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {},\n});\n"
  },
  {
    "path": "packages/progress/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-progress custom-class=\"progress-position\" percentage=\"0\" />\n</demo-block>\n\n<demo-block title=\"线条粗细\">\n  <van-progress custom-class=\"progress-position\" stroke-width=\"8\" percentage=\"100\" />\n</demo-block>\n\n<demo-block title=\"置灰\">\n  <van-progress custom-class=\"progress-position\" inactive percentage=\"50\" />\n</demo-block>\n\n<demo-block title=\"样式定制\">\n  <van-progress custom-class=\"progress-position\" pivot-text=\"橙色\" color=\"#f2826a\" percentage=\"25\" />\n  <van-progress custom-class=\"progress-position\" pivot-text=\"红色\" color=\"#ee0a24\" percentage=\"50\" />\n  <van-progress\n    custom-class=\"progress-position\"\n    percentage=\"75\"\n    pivot-text=\"紫色\"\n    pivot-color=\"#7232dd\"\n    color=\"linear-gradient(to right, #be99ff, #7232dd)\"\n  />\n</demo-block>\n"
  },
  {
    "path": "packages/progress/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/progress/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-progress {\n  position: relative;\n  height: var(--progress-height, @progress-height);\n  border-radius: var(--progress-height, @progress-height);\n  background: var(--progress-background-color, @progress-background-color);\n\n  &__portion {\n    position: absolute;\n    left: 0;\n    height: 100%;\n    border-radius: inherit;\n    background: var(--progress-color, @progress-color);\n  }\n\n  &__pivot {\n    position: absolute;\n    top: 50%;\n    box-sizing: border-box;\n    min-width: 3.6em;\n    text-align: center;\n    word-break: keep-all;\n    border-radius: 1em;\n    transform: translate(0, -50%);\n    color: var(--progress-pivot-text-color, @progress-pivot-text-color);\n    padding: var(--progress-pivot-padding, @progress-pivot-padding);\n    font-size: var(--progress-pivot-font-size, @progress-pivot-font-size);\n    line-height: var(--progress-pivot-line-height, @progress-pivot-line-height);\n    background-color: var(\n      --progress-pivot-background-color,\n      @progress-pivot-background-color\n    );\n  }\n}\n"
  },
  {
    "path": "packages/progress/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { BLUE } from '../common/color';\nimport { getRect } from '../common/utils';\n\nVantComponent({\n  props: {\n    inactive: Boolean,\n    percentage: {\n      type: Number,\n      observer: 'setLeft',\n    },\n    pivotText: String,\n    pivotColor: String,\n    trackColor: String,\n    showPivot: {\n      type: Boolean,\n      value: true,\n    },\n    color: {\n      type: String,\n      value: BLUE,\n    },\n    textColor: {\n      type: String,\n      value: '#fff',\n    },\n    strokeWidth: {\n      type: null,\n      value: 4,\n    },\n  },\n\n  data: {\n    right: 0,\n  },\n\n  mounted() {\n    this.setLeft();\n  },\n\n  methods: {\n    setLeft() {\n      Promise.all([\n        getRect(this, '.van-progress'),\n        getRect(this, '.van-progress__pivot'),\n      ]).then(([portion, pivot]) => {\n        if (portion && pivot) {\n          this.setData({\n            right: (pivot.width * (this.data.percentage - 100)) / 100,\n          });\n        }\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/progress/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-progress custom-class\"\n  style=\"{{ computed.rootStyle({ strokeWidth, trackColor }) }}\"\n>\n  <view\n    class=\"van-progress__portion\"\n    style=\"{{ computed.portionStyle({ percentage, inactive, color }) }}\"\n  >\n    <view\n      wx:if=\"{{ showPivot && computed.pivotText(pivotText, percentage) }}\"\n      style=\"{{ computed.pivotStyle({ textColor, pivotColor, inactive, color, right }) }}\"\n      class=\"van-progress__pivot\"\n    >\n      {{ computed.pivotText(pivotText, percentage) }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/progress/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction pivotText(pivotText, percentage) {\n  return pivotText || percentage + '%';\n}\n\nfunction rootStyle(data) {\n  return style({\n    'height': data.strokeWidth ? utils.addUnit(data.strokeWidth) : '',\n    'background': data.trackColor,\n  });\n}\n\nfunction portionStyle(data) {\n  return style({\n    background: data.inactive ? '#cacaca' : data.color,\n    width: data.percentage ? data.percentage + '%' : '',\n  });\n}\n\nfunction pivotStyle(data) {\n  return style({\n    color: data.textColor,\n    right: data.right + 'px',\n    background: data.pivotColor ? data.pivotColor : data.inactive ? '#cacaca' : data.color,\n  });\n}\n\nmodule.exports = {\n  pivotText: pivotText,\n  rootStyle: rootStyle,\n  portionStyle: portionStyle,\n  pivotStyle: pivotStyle,\n};\n"
  },
  {
    "path": "packages/progress/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-progress\n        customClass=\"progress-position\"\n      >\n        <wx-view\n          class=\"van-progress custom-class\"\n          style=\"height:4px\"\n        >\n          <wx-view\n            class=\"van-progress__portion\"\n            style=\"background:#1989fa\"\n          >\n            <wx-view\n              class=\"van-progress__pivot\"\n              style=\"color:#fff;right:0px;background:#1989fa\"\n            >\n              \n      0%\n    \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-progress>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        线条粗细\n      </wx-view>\n      <van-progress\n        customClass=\"progress-position\"\n      >\n        <wx-view\n          class=\"van-progress custom-class\"\n          style=\"height:8px\"\n        >\n          <wx-view\n            class=\"van-progress__portion\"\n            style=\"background:#1989fa;width:100%\"\n          >\n            <wx-view\n              class=\"van-progress__pivot\"\n              style=\"color:#fff;right:0px;background:#1989fa\"\n            >\n              \n      100%\n    \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-progress>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        置灰\n      </wx-view>\n      <van-progress\n        customClass=\"progress-position\"\n      >\n        <wx-view\n          class=\"van-progress custom-class\"\n          style=\"height:4px\"\n        >\n          <wx-view\n            class=\"van-progress__portion\"\n            style=\"background:#cacaca;width:50%\"\n          >\n            <wx-view\n              class=\"van-progress__pivot\"\n              style=\"color:#fff;right:0px;background:#cacaca\"\n            >\n              \n      50%\n    \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-progress>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        样式定制\n      </wx-view>\n      <van-progress\n        customClass=\"progress-position\"\n      >\n        <wx-view\n          class=\"van-progress custom-class\"\n          style=\"height:4px\"\n        >\n          <wx-view\n            class=\"van-progress__portion\"\n            style=\"background:#f2826a;width:25%\"\n          >\n            <wx-view\n              class=\"van-progress__pivot\"\n              style=\"color:#fff;right:0px;background:#f2826a\"\n            >\n              \n      橙色\n    \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-progress>\n      <van-progress\n        customClass=\"progress-position\"\n      >\n        <wx-view\n          class=\"van-progress custom-class\"\n          style=\"height:4px\"\n        >\n          <wx-view\n            class=\"van-progress__portion\"\n            style=\"background:#ee0a24;width:50%\"\n          >\n            <wx-view\n              class=\"van-progress__pivot\"\n              style=\"color:#fff;right:0px;background:#ee0a24\"\n            >\n              \n      红色\n    \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-progress>\n      <van-progress\n        customClass=\"progress-position\"\n      >\n        <wx-view\n          class=\"van-progress custom-class\"\n          style=\"height:4px\"\n        >\n          <wx-view\n            class=\"van-progress__portion\"\n            style=\"background:linear-gradient(to right, #be99ff, #7232dd);width:75%\"\n          >\n            <wx-view\n              class=\"van-progress__pivot\"\n              style=\"color:#fff;right:0px;background:#7232dd\"\n            >\n              \n      紫色\n    \n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-progress>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/progress/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/radio/README.md",
    "content": "# Radio 单选框\n\n### 介绍\n\n在一组备选项中进行单选。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-radio\": \"@vant/weapp/radio/index\",\n  \"van-radio-group\": \"@vant/weapp/radio-group/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n通过`value`绑定值当前选中项的 name 。\n\n```html\n<van-radio-group value=\"{{ radio }}\" bind:change=\"onChange\">\n  <van-radio name=\"1\">单选框 1</van-radio>\n  <van-radio name=\"2\">单选框 2</van-radio>\n</van-radio-group>\n```\n\n```js\nPage({\n  data: {\n    radio: '1',\n  },\n\n  onChange(event) {\n    this.setData({\n      radio: event.detail,\n    });\n  },\n});\n```\n\n### 水平排列\n\n将`direction`属性设置为`horizontal`后，单选框组会变成水平排列。\n\n```html\n<van-radio-group\n  value=\"{{ radio }}\"\n  bind:change=\"onChange\"\n  direction=\"horizontal\"\n>\n  <van-radio name=\"1\">单选框 1</van-radio>\n  <van-radio name=\"2\">单选框 2</van-radio>\n</van-radio-group>\n```\n\n### 禁用状态\n\n通过`disabled`属性禁止选项切换，在`Radio`上设置`diabled`可以禁用单个选项。\n\n```html\n<van-radio-group value=\"{{ radio }}\" disabled bind:change=\"onChange\">\n  <van-radio name=\"1\">单选框 1</van-radio>\n  <van-radio name=\"2\">单选框 2</van-radio>\n</van-radio-group>\n```\n\n### 自定义形状\n\n将`shape`属性设置为`square`，单选框的形状会变成方形。\n\n```html\n<van-radio-group value=\"{{ radio }}\" bind:change=\"onChange\">\n  <van-radio name=\"1\" shape=\"square\">单选框 1</van-radio>\n  <van-radio name=\"2\" shape=\"square\">单选框 2</van-radio>\n</van-radio-group>\n```\n\n### 自定义颜色\n\n通过`checked-color`属性设置选中状态的图标颜色。\n\n```html\n<van-radio-group value=\"{{ radio }}\" bind:change=\"onChange\">\n  <van-radio name=\"1\" checked-color=\"#07c160\">单选框 1</van-radio>\n  <van-radio name=\"2\" checked-color=\"#07c160\">单选框 2</van-radio>\n</van-radio-group>\n```\n\n### 自定义大小\n\n通过`icon-size`属性可以自定义图标的大小。\n\n```html\n<van-radio-group value=\"{{ radio }}\" bind:change=\"onChange\">\n  <van-radio name=\"1\" icon-size=\"24px\">单选框 1</van-radio>\n  <van-radio name=\"2\" icon-size=\"24px\">单选框 2</van-radio>\n</van-radio-group>\n```\n\n### 自定义图标\n\n通过`icon`插槽自定义图标，需要设置`use-icon-slot`属性。\n\n```html\n<van-radio-group value=\"{{ radio }}\" bind:change=\"onChange\">\n  <van-radio use-icon-slot value=\"{{ radio }}\" name=\"1\">\n    自定义图标\n    <image slot=\"icon\" src=\"{{ radio === '1' ? icon.active : icon.normal }}\" />\n  </van-radio>\n  <van-radio use-icon-slot value=\"{{ radio }}\" name=\"2\">\n    自定义图标\n    <image slot=\"icon\" src=\"{{ radio === '2' ? icon.active : icon.normal }}\" />\n  </van-radio>\n</van-radio-group>\n```\n\n```js\nPage({\n  data: {\n    radio: true,\n    icon: {\n      normal: '//img.yzcdn.cn/icon-normal.png',\n      active: '//img.yzcdn.cn/icon-active.png',\n    },\n  },\n  onChange(event) {\n    this.setData({\n      radio: event.detail,\n    });\n  },\n});\n```\n\n### 禁用文本点击\n\n通过设置`label-disabled`属性可以禁用单选框文本点击。\n\n```html\n<van-radio-group value=\"{{ radio }}\" bind:change=\"onChange\">\n  <van-radio name=\"1\" label-disabled>单选框 1</van-radio>\n  <van-radio name=\"2\" label-disabled>单选框 2</van-radio>\n</van-radio-group>\n```\n\n### 与 Cell 组件一起使用\n\n此时你需要再引入`Cell`和`CellGroup`组件。\n\n```html\n<van-radio-group value=\"{{ radio }}\" bind:change=\"onChange\">\n  <van-cell-group>\n    <van-cell title=\"单选框 1\" clickable data-name=\"1\" bind:click=\"onClick\">\n      <van-radio slot=\"right-icon\" name=\"1\" />\n    </van-cell>\n    <van-cell title=\"单选框 2\" clickable data-name=\"2\" bind:click=\"onClick\">\n      <van-radio slot=\"right-icon\" name=\"2\" />\n    </van-cell>\n  </van-cell-group>\n</van-radio-group>\n```\n\n```js\nPage({\n  data: {\n    radio: '1',\n  },\n\n  onChange(event) {\n    this.setData({\n      radio: event.detail,\n    });\n  },\n\n  onClick(event) {\n    const { name } = event.currentTarget.dataset;\n    this.setData({\n      radio: name,\n    });\n  },\n});\n```\n\n## API\n\n### RadioGroup Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 在表单内提交时的标识符 | _string_ | - |\n| value | 当前选中项的标识符 | _any_ | - |\n| disabled | 是否禁用所有单选框 | _boolean_ | `false` |\n| direction `v1.6.7` | 排列方向，可选值为 `horizontal` | _string_ | `vertical` |\n\n### Radio Props\n\n| 参数           | 说明                      | 类型               | 默认值    |\n| -------------- | ------------------------- | ------------------ | --------- |\n| name           | 标识符                    | _string_           | -         |\n| shape          | 形状，可选值为 `square`   | _string_           | `round`   |\n| disabled       | 是否为禁用状态            | _boolean_          | `false`   |\n| label-disabled | 是否禁用文本内容点击      | _boolean_          | `false`   |\n| label-position | 文本位置，可选值为 `left` | _string_           | `right`   |\n| icon-size      | 图标大小，默认单位为`px`  | _string \\| number_ | `20px`    |\n| checked-color  | 选中状态颜色              | _string_           | `#1989fa` |\n| use-icon-slot  | 是否使用 icon 插槽        | _boolean_          | `false`   |\n\n### Radio Event\n\n| 事件名      | 说明                     | 回调参数          |\n| ----------- | ------------------------ | ----------------- |\n| bind:change | 当绑定值变化时触发的事件 | 当前选中项的 name |\n\n### Radio 外部样式类\n\n| 类名         | 说明           |\n| ------------ | -------------- |\n| custom-class | 根节点样式类   |\n| icon-class   | 图标样式类     |\n| label-class  | 描述信息样式类 |\n\n### RadioGroup Event\n\n| 事件名      | 说明                     | 回调参数          |\n| ----------- | ------------------------ | ----------------- |\n| bind:change | 当绑定值变化时触发的事件 | 当前选中项的 name |\n"
  },
  {
    "path": "packages/radio/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-radio\": \"../../radio/index\",\n    \"van-radio-group\": \"../../radio-group/index\",\n    \"van-cell\": \"../../cell/index\",\n    \"van-cell-group\": \"../../cell-group/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/radio/demo/index.less",
    "content": ".demo-radio {\n  margin-bottom: 10px;\n}\n\n.icon {\n  width: 20px;\n}\n"
  },
  {
    "path": "packages/radio/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    radio1: '1',\n    radio2: '2',\n    radio3: '1',\n    radio4: '1',\n    radio5: '1',\n    radioSize: '1',\n    radioLabel: '1',\n    radioShape: '1',\n    icon: {\n      normal:\n        'https://img.yzcdn.cn/public_files/2017/10/13/c547715be149dd3faa817e4a948b40c4.png',\n      active:\n        'https://img.yzcdn.cn/public_files/2017/10/13/793c77793db8641c4c325b7f25bf130d.png',\n    },\n  },\n\n  methods: {\n    onChange(event) {\n      const { key } = event.currentTarget.dataset;\n      this.setData({ [key]: event.detail });\n    },\n\n    onClick(event) {\n      const { name } = event.currentTarget.dataset;\n      this.setData({\n        radio5: name,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/radio/demo/index.wxml",
    "content": "<demo-block title=\"基本用法\" padding>\n  <van-radio-group\n    value=\"{{ radio1 }}\"\n    data-key=\"radio1\"\n    bind:change=\"onChange\"\n  >\n    <van-radio name=\"1\" custom-class=\"demo-radio\">单选框 1</van-radio>\n    <van-radio name=\"2\">单选框 2</van-radio>\n  </van-radio-group>\n</demo-block>\n\n<demo-block title=\"水平排列\" padding>\n  <van-radio-group\n    value=\"{{ radio1 }}\"\n    data-key=\"radio1\"\n    bind:change=\"onChange\"\n    direction=\"horizontal\"\n  >\n    <van-radio name=\"1\">单选框 1</van-radio>\n    <van-radio name=\"2\">单选框 2</van-radio>\n  </van-radio-group>\n</demo-block>\n\n<demo-block title=\"禁用状态\" padding>\n  <van-radio-group\n    disabled\n    value=\"{{ radio2 }}\"\n    data-key=\"radio2\"\n    bind:change=\"onChange\"\n  >\n    <van-radio name=\"1\" custom-class=\"demo-radio\">单选框 1</van-radio>\n    <van-radio name=\"2\">单选框 2</van-radio>\n  </van-radio-group>\n</demo-block>\n\n<demo-block title=\"自定义形状\" padding>\n  <van-radio-group\n    value=\"{{ radioShape }}\"\n    data-key=\"radioShape\"\n    bind:change=\"onChange\"\n  >\n    <van-radio name=\"1\" shape=\"square\" custom-class=\"demo-radio\"\n    >单选框</van-radio\n    >\n    <van-radio name=\"2\" shape=\"square\">单选框</van-radio>\n  </van-radio-group>\n</demo-block>\n\n<demo-block title=\"自定义颜色\" padding>\n  <van-radio-group\n    value=\"{{ radio3 }}\"\n    data-key=\"radio3\"\n    bind:change=\"onChange\"\n  >\n    <van-radio name=\"1\" custom-class=\"demo-radio\" checked-color=\"#07c160\"\n    >单选框</van-radio\n    >\n    <van-radio name=\"2\" checked-color=\"#07c160\">单选框</van-radio>\n  </van-radio-group>\n</demo-block>\n\n<demo-block title=\"自定义大小\" padding>\n  <van-radio-group\n    value=\"{{ radioSize }}\"\n    data-key=\"radioSize\"\n    bind:change=\"onChange\"\n  >\n    <van-radio name=\"1\" icon-size=\"24px\" custom-class=\"demo-radio\"\n    >单选框</van-radio\n    >\n    <van-radio name=\"2\" icon-size=\"24px\">单选框</van-radio>\n  </van-radio-group>\n</demo-block>\n\n<demo-block title=\"自定义图标\" padding>\n  <van-radio-group\n    value=\"{{ radio4 }}\"\n    data-key=\"radio4\"\n    bind:change=\"onChange\"\n  >\n    <van-radio use-icon-slot name=\"1\">\n      自定义图标\n      <image\n        slot=\"icon\"\n        src=\"{{ radio4 === '1' ? icon.active : icon.normal }}\"\n        class=\"icon\"\n        mode=\"widthFix\"\n      ></image>\n    </van-radio>\n    <van-radio use-icon-slot name=\"2\">\n      自定义图标\n      <image\n        slot=\"icon\"\n        src=\"{{ radio4 === '2' ? icon.active : icon.normal }}\"\n        class=\"icon\"\n        mode=\"widthFix\"\n      ></image>\n    </van-radio>\n  </van-radio-group>\n</demo-block>\n\n<demo-block title=\"禁用文本点击\" padding>\n  <van-radio-group\n    value=\"{{ radioLabel }}\"\n    data-key=\"radioLabel\"\n    bind:change=\"onChange\"\n  >\n    <van-radio label-disabled name=\"1\" custom-class=\"demo-radio\"\n    >单选框 1</van-radio\n    >\n    <van-radio label-disabled name=\"2\">单选框 2</van-radio>\n  </van-radio-group>\n</demo-block>\n\n<demo-block title=\"与 Cell 组件一起使用\">\n  <van-radio-group value=\"{{ radio5 }}\">\n    <van-cell-group>\n      <van-cell title=\"单选框 1\" clickable data-name=\"1\" bind:click=\"onClick\">\n        <van-radio slot=\"right-icon\" name=\"1\"></van-radio>\n      </van-cell>\n      <van-cell title=\"单选框 2\" clickable data-name=\"2\" bind:click=\"onClick\">\n        <van-radio slot=\"right-icon\" name=\"2\"></van-radio>\n      </van-cell>\n    </van-cell-group>\n  </van-radio-group>\n</demo-block>\n"
  },
  {
    "path": "packages/radio/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/radio/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-radio {\n  display: flex;\n  align-items: center;\n  overflow: hidden;\n  user-select: none;\n\n  &__icon-wrap {\n    flex: none;\n  }\n\n  &--horizontal {\n    margin-right: var(--padding-sm, @padding-sm);\n  }\n\n  &__icon {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    box-sizing: border-box;\n    width: 1em;\n    height: 1em;\n    color: transparent;\n    text-align: center;\n    transition-property: color, border-color, background-color;\n    border: 1px solid var(--radio-border-color, @radio-border-color);\n    font-size: var(--radio-size, @radio-size);\n    transition-duration: var(\n      --radio-transition-duration,\n      @radio-transition-duration\n    );\n\n    &--round {\n      border-radius: 100%;\n    }\n\n    &--checked {\n      color: @white;\n      background-color: var(\n        --radio-checked-icon-color,\n        @radio-checked-icon-color\n      );\n      border-color: var(--radio-checked-icon-color, @radio-checked-icon-color);\n    }\n\n    &--disabled {\n      background-color: var(\n        --radio-disabled-background-color,\n        @radio-disabled-background-color\n      );\n      border-color: var(\n        --radio-disabled-icon-color,\n        @radio-disabled-icon-color\n      );\n    }\n\n    &--disabled&--checked {\n      color: var(--radio-disabled-icon-color, @radio-disabled-icon-color);\n    }\n  }\n\n  &__label {\n    word-wrap: break-word;\n    padding-left: var(--radio-label-margin, @radio-label-margin);\n    color: var(--radio-label-color, @radio-label-color);\n    line-height: var(--radio-size, @radio-size);\n\n    &--left {\n      float: left;\n      margin: 0 var(--radio-label-margin, @radio-label-margin) 0 0;\n    }\n\n    &--disabled {\n      color: var(--radio-disabled-label-color, @radio-disabled-label-color);\n    }\n\n    &:empty {\n      margin: 0;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/radio/index.ts",
    "content": "import { canIUseModel } from '../common/version';\nimport { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\n\nVantComponent({\n  field: true,\n\n  relation: useParent('radio-group', function () {\n    this.updateFromParent();\n  }),\n\n  classes: ['icon-class', 'label-class'],\n\n  props: {\n    name: null,\n    value: null,\n    disabled: Boolean,\n    useIconSlot: Boolean,\n    checkedColor: String,\n    labelPosition: {\n      type: String,\n      value: 'right',\n    },\n    labelDisabled: Boolean,\n    shape: {\n      type: String,\n      value: 'round',\n    },\n    iconSize: {\n      type: null,\n      value: 20,\n    },\n  },\n\n  data: {\n    direction: '',\n    parentDisabled: false,\n  },\n\n  methods: {\n    updateFromParent() {\n      if (!this.parent) {\n        return;\n      }\n\n      const { value, disabled: parentDisabled, direction } = this.parent.data;\n\n      this.setData({\n        value,\n        direction,\n        parentDisabled,\n      });\n    },\n\n    emitChange(value: boolean) {\n      const instance = this.parent || this;\n      instance.$emit('input', value);\n      instance.$emit('change', value);\n\n      if (canIUseModel()) {\n        instance.setData({ value });\n      }\n    },\n\n    onChange() {\n      if (!this.data.disabled && !this.data.parentDisabled) {\n        this.emitChange(this.data.name);\n      }\n    },\n\n    onClickLabel() {\n      const { disabled, parentDisabled, labelDisabled, name } = this.data;\n      if (!(disabled || parentDisabled) && !labelDisabled) {\n        this.emitChange(name);\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/radio/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('radio', [direction]) }} custom-class\">\n  <view\n    wx:if=\"{{ labelPosition === 'left' }}\"\n    class=\"{{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }} label-class\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n  <view class=\"van-radio__icon-wrap\" style=\"font-size: {{ utils.addUnit(iconSize) }}\" bindtap=\"onChange\">\n    <slot wx:if=\"{{ useIconSlot }}\" name=\"icon\" />\n    <van-icon\n      wx:else\n      name=\"success\"\n      class=\"{{ utils.bem('radio__icon', [shape, { disabled: disabled || parentDisabled, checked: value === name }]) }}\"\n      style=\"{{ computed.iconStyle({ iconSize, checkedColor, disabled, parentDisabled, value, name }) }}\"\n      custom-class=\"icon-class\"\n      custom-style=\"{{ computed.iconCustomStyle({ iconSize }) }}\"\n    />\n  </view>\n  <view\n    wx:if=\"{{ labelPosition === 'right' }}\"\n    class=\"label-class {{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/radio/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction iconStyle(data) {\n  var styles = {\n    'font-size': addUnit(data.iconSize),\n  };\n\n  if (\n    data.checkedColor &&\n    !(data.disabled || data.parentDisabled) &&\n    data.value === data.name\n  ) {\n    styles['border-color'] = data.checkedColor;\n    styles['background-color'] = data.checkedColor;\n  }\n\n  return style(styles);\n}\n\nfunction iconCustomStyle(data) {\n  return style({\n    'line-height': addUnit(data.iconSize),\n    'font-size': '.8em',\n    display: 'block',\n  });\n}\n\nmodule.exports = {\n  iconStyle: iconStyle,\n  iconCustomStyle: iconCustomStyle,\n};\n"
  },
  {
    "path": "packages/radio/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基本用法\n      </wx-view>\n      <van-radio-group\n        data-key=\"radio1\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-radio-group custom-class\"\n        >\n          <van-radio\n            customClass=\"demo-radio\"\n          >\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round van-radio__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框 1\n              </wx-view>\n            </wx-view>\n          </van-radio>\n          <van-radio>\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框 2\n              </wx-view>\n            </wx-view>\n          </van-radio>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        水平排列\n      </wx-view>\n      <van-radio-group\n        data-key=\"radio1\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-radio-group van-radio-group--horizontal custom-class\"\n        >\n          <van-radio>\n            <wx-view\n              class=\"van-radio van-radio--horizontal custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round van-radio__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框 1\n              </wx-view>\n            </wx-view>\n          </van-radio>\n          <van-radio>\n            <wx-view\n              class=\"van-radio van-radio--horizontal custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框 2\n              </wx-view>\n            </wx-view>\n          </van-radio>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用状态\n      </wx-view>\n      <van-radio-group\n        data-key=\"radio2\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-radio-group custom-class\"\n        >\n          <van-radio\n            customClass=\"demo-radio\"\n          >\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round van-radio__icon--disabled\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right van-radio__label--disabled\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框 1\n              </wx-view>\n            </wx-view>\n          </van-radio>\n          <van-radio>\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round van-radio__icon--disabled van-radio__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right van-radio__label--disabled\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框 2\n              </wx-view>\n            </wx-view>\n          </van-radio>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义形状\n      </wx-view>\n      <van-radio-group\n        data-key=\"radioShape\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-radio-group custom-class\"\n        >\n          <van-radio\n            customClass=\"demo-radio\"\n          >\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--square van-radio__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框\n              </wx-view>\n            </wx-view>\n          </van-radio>\n          <van-radio>\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--square\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框\n              </wx-view>\n            </wx-view>\n          </van-radio>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义颜色\n      </wx-view>\n      <van-radio-group\n        data-key=\"radio3\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-radio-group custom-class\"\n        >\n          <van-radio\n            customClass=\"demo-radio\"\n          >\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round van-radio__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px;border-color:#07c160;background-color:#07c160\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框\n              </wx-view>\n            </wx-view>\n          </van-radio>\n          <van-radio>\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框\n              </wx-view>\n            </wx-view>\n          </van-radio>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义大小\n      </wx-view>\n      <van-radio-group\n        data-key=\"radioSize\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-radio-group custom-class\"\n        >\n          <van-radio\n            customClass=\"demo-radio\"\n          >\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 24px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round van-radio__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:24px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:24px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框\n              </wx-view>\n            </wx-view>\n          </van-radio>\n          <van-radio>\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 24px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:24px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:24px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框\n              </wx-view>\n            </wx-view>\n          </van-radio>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义图标\n      </wx-view>\n      <van-radio-group\n        data-key=\"radio4\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-radio-group custom-class\"\n        >\n          <van-radio>\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <wx-image\n                  class=\"icon\"\n                  mode=\"widthFix\"\n                  slot=\"icon\"\n                  src=\"https://img.yzcdn.cn/public_files/2017/10/13/793c77793db8641c4c325b7f25bf130d.png\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      自定义图标\n      \n              </wx-view>\n            </wx-view>\n          </van-radio>\n          <van-radio>\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <wx-image\n                  class=\"icon\"\n                  mode=\"widthFix\"\n                  slot=\"icon\"\n                  src=\"https://img.yzcdn.cn/public_files/2017/10/13/c547715be149dd3faa817e4a948b40c4.png\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                \n      自定义图标\n      \n              </wx-view>\n            </wx-view>\n          </van-radio>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用文本点击\n      </wx-view>\n      <van-radio-group\n        data-key=\"radioLabel\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-radio-group custom-class\"\n        >\n          <van-radio\n            customClass=\"demo-radio\"\n          >\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round van-radio__icon--checked\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框 1\n              </wx-view>\n            </wx-view>\n          </van-radio>\n          <van-radio>\n            <wx-view\n              class=\"van-radio custom-class\"\n            >\n              <wx-view\n                class=\"van-radio__icon-wrap\"\n                style=\"font-size: 20px\"\n                bind:tap=\"onChange\"\n              >\n                <van-icon\n                  class=\"van-radio__icon van-radio__icon--round\"\n                  customClass=\"icon-class\"\n                  style=\"font-size:20px\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\";line-height:20px;font-size:.8em;display:block\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"label-class van-radio__label van-radio__label--right\"\n                bind:tap=\"onClickLabel\"\n              >\n                单选框 2\n              </wx-view>\n            </wx-view>\n          </van-radio>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        与 Cell 组件一起使用\n      </wx-view>\n      <van-radio-group>\n        <wx-view\n          class=\"van-radio-group custom-class\"\n        >\n          <van-cell-group>\n            <wx-view\n              class=\"custom-class van-cell-group van-hairline--top-bottom\"\n            >\n              <van-cell\n                data-name=\"1\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    单选框 1\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-radio\n                    slot=\"right-icon\"\n                  >\n                    <wx-view\n                      class=\"van-radio custom-class\"\n                    >\n                      <wx-view\n                        class=\"van-radio__icon-wrap\"\n                        style=\"font-size: 20px\"\n                        bind:tap=\"onChange\"\n                      >\n                        <van-icon\n                          class=\"van-radio__icon van-radio__icon--round van-radio__icon--checked\"\n                          customClass=\"icon-class\"\n                          style=\"font-size:20px\"\n                        >\n                          <wx-view\n                            class=\"custom-class van-icon van-icon-success\"\n                            style=\";line-height:20px;font-size:.8em;display:block\"\n                            bind:tap=\"onClick\"\n                          />\n                        </van-icon>\n                      </wx-view>\n                      <wx-view\n                        class=\"label-class van-radio__label van-radio__label--right\"\n                        bind:tap=\"onClickLabel\"\n                      />\n                    </wx-view>\n                  </van-radio>\n                </wx-view>\n              </van-cell>\n              <van-cell\n                data-name=\"2\"\n                bind:click=\"onClick\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--clickable\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"\"\n                  >\n                    单选框 2\n                  </wx-view>\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  />\n                  <van-radio\n                    slot=\"right-icon\"\n                  >\n                    <wx-view\n                      class=\"van-radio custom-class\"\n                    >\n                      <wx-view\n                        class=\"van-radio__icon-wrap\"\n                        style=\"font-size: 20px\"\n                        bind:tap=\"onChange\"\n                      >\n                        <van-icon\n                          class=\"van-radio__icon van-radio__icon--round\"\n                          customClass=\"icon-class\"\n                          style=\"font-size:20px\"\n                        >\n                          <wx-view\n                            class=\"custom-class van-icon van-icon-success\"\n                            style=\";line-height:20px;font-size:.8em;display:block\"\n                            bind:tap=\"onClick\"\n                          />\n                        </van-icon>\n                      </wx-view>\n                      <wx-view\n                        class=\"label-class van-radio__label van-radio__label--right\"\n                        bind:tap=\"onClickLabel\"\n                      />\n                    </wx-view>\n                  </van-radio>\n                </wx-view>\n              </van-cell>\n            </wx-view>\n          </van-cell-group>\n        </wx-view>\n      </van-radio-group>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/radio/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/radio-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/radio-group/index.less",
    "content": ".van-radio-group {\n  &--horizontal {\n    display: flex;\n    flex-wrap: wrap;\n  }\n}\n"
  },
  {
    "path": "packages/radio-group/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\n\nVantComponent({\n  field: true,\n\n  relation: useChildren('radio'),\n\n  props: {\n    value: {\n      type: null,\n      observer: 'updateChildren',\n    },\n    direction: String,\n    disabled: {\n      type: Boolean,\n      observer: 'updateChildren',\n    },\n  },\n\n  methods: {\n    updateChildren() {\n      this.children.forEach((child) => child.updateFromParent());\n    },\n  },\n});\n"
  },
  {
    "path": "packages/radio-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"{{ utils.bem('radio-group', [direction]) }} custom-class\">\n  <slot></slot>\n</view>\n"
  },
  {
    "path": "packages/rate/README.md",
    "content": "# Rate 评分\n\n### 介绍\n\n用于对事物进行评级操作。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-rate\": \"@vant/weapp/rate/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-rate value=\"{{ value }}\" bind:change=\"onChange\" />\n```\n\n```javascript\nPage({\n  data: {\n    value: 3,\n  },\n\n  onChange(event) {\n    this.setData({\n      value: event.detail,\n    });\n  },\n});\n```\n\n### 自定义图标\n\n```html\n<van-rate\n  value=\"{{ value }}\"\n  icon=\"like\"\n  void-icon=\"like-o\"\n  bind:change=\"onChange\"\n/>\n```\n\n### 自定义样式\n\n```html\n<van-rate\n  value=\"{{ value }}\"\n  size=\"{{ 25 }}\"\n  color=\"#ffd21e\"\n  void-icon=\"star\"\n  void-color=\"#eee\"\n  bind:change=\"onChange\"\n/>\n```\n\n### 半星\n\n```html\n<van-rate\n  value=\"{{ value }}\"\n  allow-half\n  void-icon=\"star\"\n  void-color=\"#eee\"\n  bind:change=\"onChange\"\n/>\n```\n\n```javascript\nPage({\n  data: {\n    value: 2.5,\n  },\n\n  onChange(event) {\n    this.setData({\n      value: event.detail,\n    });\n  },\n});\n```\n\n### 自定义数量\n\n```html\n<van-rate value=\"{{ value }}\" count=\"{{ 6 }}\" bind:change=\"onChange\" />\n```\n\n### 禁用状态\n\n```html\n<van-rate disabled value=\"{{ value }}\" bind:change=\"onChange\" />\n```\n\n### 只读状态\n\n```html\n<van-rate readonly value=\"{{ value }}\" bind:change=\"onChange\" />\n```\n\n### 监听 change 事件\n\n评分变化时，会触发 `change` 事件。\n\n```html\n<van-rate value=\"{{ value }}\" bind:change=\"onChange\" />\n```\n\n```javascript\nPage({\n  data: {\n    value: 2,\n  },\n\n  onChange(event) {\n    Toast('当前值：' + event.detail);\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 在表单内提交时的标识符 | _string_ | - |\n| value | 当前分值 | _number_ | - |\n| count | 图标总数 | _number_ | `5` |\n| size | 图标大小，默认单位为 `px` | _string \\| number_ | `20px` |\n| gutter | 图标间距，默认单位为 `px` | _string \\| number_ | `4px` |\n| color | 选中时的颜色 | _string_ | `#ffd21e` |\n| void-color | 未选中时的颜色 | _string_ | `#c7c7c7` |\n| icon | 选中时的图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | `star` |\n| void-icon | 未选中时的图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | `star-o` |\n| allow-half | 是否允许半选 | _boolean_ | `false` |\n| readonly | 是否为只读状态 | _boolean_ | `false` |\n| disabled | 是否禁用评分 | _boolean_ | `false` |\n| disabled-color | 禁用时的颜色 | _string_ | `#bdbdbd` |\n| touchable | 是否可以通过滑动手势选择评分 | _boolean_ | `true` |\n\n### Events\n\n| 事件名称 | 说明                     | 回调参数              |\n| -------- | ------------------------ | --------------------- |\n| bind:change   | 当前分值变化时触发的事件 | event.detail:当前分值 |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n| icon-class   | 图标样式类   |\n"
  },
  {
    "path": "packages/rate/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-rate\": \"../../rate/index\",\n    \"van-toast\": \"../../toast/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/rate/demo/index.less",
    "content": ".rate-position {\n  margin-left: 15px;\n}\n"
  },
  {
    "path": "packages/rate/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  data: {\n    value1: 3,\n    value2: 3,\n    value3: 3,\n    value4: 2.5,\n    value5: 4,\n    value6: 3,\n    value8: 2,\n  },\n\n  methods: {\n    onChange(event) {\n      Toast({\n        context: this,\n        message: '当前值：' + event.detail,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/rate/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-rate\n    custom-class=\"rate-position\"\n    model:value=\"{{ value1 }}\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义图标\">\n  <van-rate\n    custom-class=\"rate-position\"\n    icon=\"like\"\n    void-icon=\"like-o\"\n    model:value=\"{{ value2 }}\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义样式\">\n  <van-rate\n    custom-class=\"rate-position\"\n    model:value=\"{{ value3 }}\"\n    size=\"{{ 25 }}\"\n    color=\"#ffd21e\"\n    void-icon=\"star\"\n    void-color=\"#eee\"\n  />\n</demo-block>\n\n<demo-block title=\"半星\">\n  <van-rate\n    custom-class=\"rate-position\"\n    model:value=\"{{ value4 }}\"\n    allow-half\n    void-icon=\"star\"\n    void-color=\"#eee\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义数量\">\n  <van-rate\n    custom-class=\"rate-position\"\n    model:value=\"{{ value5 }}\"\n    count=\"{{ 6 }}\"\n  />\n</demo-block>\n\n<demo-block title=\"禁用状态\">\n  <van-rate\n    custom-class=\"rate-position\"\n    value=\"{{ value6 }}\"\n    disabled\n  />\n</demo-block>\n\n<demo-block title=\"只读状态\">\n  <van-rate\n    custom-class=\"rate-position\"\n    value=\"{{ value6 }}\"\n    readonly\n  />\n</demo-block>\n\n<demo-block title=\"监听 change 事件\">\n  <van-rate\n    custom-class=\"rate-position\"\n    value=\"{{ value8 }}\"\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/rate/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/rate/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-rate {\n  display: inline-flex;\n  user-select: none;\n\n  &__item {\n    position: relative;\n    padding: 0 var(--rate-horizontal-padding, @rate-horizontal-padding);\n\n    &:not(:last-child) {\n      padding-right: var(--rate-icon-gutter, @rate-icon-gutter);\n    }\n  }\n\n  &__icon {\n    display: block;\n    height: 100%;\n    color: var(--rate-icon-void-color, @rate-icon-void-color);\n    font-size: var(--rate-icon-size, @rate-icon-size);\n\n    &--half {\n      position: absolute;\n      top: 0;\n      width: 0.5em;\n      overflow: hidden;\n      left: var(--rate-horizontal-padding, @rate-horizontal-padding);\n      color: var(--rate-icon-full-color, @rate-icon-full-color);\n    }\n\n    &--full {\n      color: var(--rate-icon-full-color, @rate-icon-full-color);\n    }\n\n    &--disabled {\n      color: var(--rate-icon-disabled-color, @rate-icon-disabled-color);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/rate/index.ts",
    "content": "import { getAllRect } from '../common/utils';\nimport { VantComponent } from '../common/component';\nimport { canIUseModel } from '../common/version';\n\nVantComponent({\n  field: true,\n\n  classes: ['icon-class'],\n\n  props: {\n    value: {\n      type: Number,\n      observer(value: number) {\n        if (value !== this.data.innerValue) {\n          this.setData({ innerValue: value });\n        }\n      },\n    },\n    readonly: Boolean,\n    disabled: Boolean,\n    allowHalf: Boolean,\n    size: null,\n    icon: {\n      type: String,\n      value: 'star',\n    },\n    voidIcon: {\n      type: String,\n      value: 'star-o',\n    },\n    color: String,\n    voidColor: String,\n    disabledColor: String,\n    count: {\n      type: Number,\n      value: 5,\n      observer(value: number) {\n        this.setData({ innerCountArray: Array.from({ length: value }) });\n      },\n    },\n    gutter: null,\n    touchable: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  data: {\n    innerValue: 0,\n    innerCountArray: Array.from({ length: 5 }),\n  },\n\n  methods: {\n    onSelect(event: WechatMiniprogram.CustomEvent) {\n      const { data } = this;\n      const { score } = event.currentTarget.dataset;\n      if (!data.disabled && !data.readonly) {\n        this.setData({ innerValue: score + 1 });\n\n        if (canIUseModel()) {\n          this.setData({ value: score + 1 });\n        }\n\n        wx.nextTick(() => {\n          this.$emit('input', score + 1);\n          this.$emit('change', score + 1);\n        });\n      }\n    },\n\n    onTouchMove(event: WechatMiniprogram.TouchEvent) {\n      const { touchable } = this.data;\n      if (!touchable) return;\n\n      const { clientX } = event.touches[0];\n\n      getAllRect(this, '.van-rate__icon').then((list) => {\n        const target = list\n          .sort((cur, next) => cur.dataset.score - next.dataset.score)\n          .find((item) => clientX >= item.left && clientX <= item.right);\n\n        if (target != null) {\n          this.onSelect({\n            ...event,\n            currentTarget: (target as unknown) as WechatMiniprogram.Target,\n          });\n        }\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/rate/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"../wxs/style.wxs\" module=\"style\" />\n\n<view\n  class=\"{{ utils.bem('rate') }} custom-class\"\n  bind:touchmove=\"onTouchMove\"\n>\n  <view\n    class=\"{{ utils.bem('rate__item') }}\"\n    wx:for=\"{{ innerCountArray }}\"\n    wx:key=\"index\"\n    style=\"{{ style({ paddingRight: index !== count - 1 ? utils.addUnit(gutter) : null }) }}\"\n  >\n    <van-icon\n      name=\"{{ index + 1 <= innerValue ? icon : voidIcon }}\"\n      class=\"{{ utils.bem('rate__icon', [{ disabled, full: index + 1 <= innerValue }])}}\"\n      style=\"{{ style({ fontSize: utils.addUnit(size) }) }}\"\n      custom-class=\"icon-class\"\n      data-score=\"{{ index }}\"\n      color=\"{{ disabled ? disabledColor : index + 1 <= innerValue ? color : voidColor }}\"\n      bind:click=\"onSelect\"\n    />\n\n    <van-icon\n      wx:if=\"{{ allowHalf }}\"\n      name=\"{{ index + 0.5 <= innerValue ? icon : voidIcon }}\"\n      class=\"{{ utils.bem('rate__icon', ['half', { disabled, full: index + 0.5 <= innerValue }]) }}\"\n      style=\"{{ style({ fontSize: utils.addUnit(size) }) }}\"\n      custom-class=\"icon-class\"\n      data-score=\"{{ index - 0.5 }}\"\n      color=\"{{ disabled ? disabledColor : index + 0.5 <= innerValue ? color : voidColor }}\"\n      bind:click=\"onSelect\"\n    />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/rate/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-rate\n        customClass=\"rate-position\"\n      >\n        <wx-view\n          class=\"van-rate custom-class\"\n          bind:touchmove=\"onTouchMove\"\n        >\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{2}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{3}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{4}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </wx-view>\n      </van-rate>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义图标\n      </wx-view>\n      <van-rate\n        customClass=\"rate-position\"\n      >\n        <wx-view\n          class=\"van-rate custom-class\"\n          bind:touchmove=\"onTouchMove\"\n        >\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-like\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-like\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{2}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-like\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{3}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-like-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{4}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-like-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </wx-view>\n      </van-rate>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义样式\n      </wx-view>\n      <van-rate\n        customClass=\"rate-position\"\n      >\n        <wx-view\n          class=\"van-rate custom-class\"\n          bind:touchmove=\"onTouchMove\"\n        >\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0}}\"\n              style=\"font-size:25px\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#ffd21e\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1}}\"\n              style=\"font-size:25px\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#ffd21e\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{2}}\"\n              style=\"font-size:25px\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#ffd21e\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{3}}\"\n              style=\"font-size:25px\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#eee\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{4}}\"\n              style=\"font-size:25px\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#eee\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </wx-view>\n      </van-rate>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        半星\n      </wx-view>\n      <van-rate\n        customClass=\"rate-position\"\n      >\n        <wx-view\n          class=\"van-rate custom-class\"\n          bind:touchmove=\"onTouchMove\"\n        >\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--half van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{-0.5}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--half van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0.5}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{2}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#eee\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--half van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1.5}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{3}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#eee\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--half\"\n              customClass=\"icon-class\"\n              data-score=\"{{2.5}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#eee\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{4}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#eee\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--half\"\n              customClass=\"icon-class\"\n              data-score=\"{{3.5}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"color:#eee\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </wx-view>\n      </van-rate>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义数量\n      </wx-view>\n      <van-rate\n        customClass=\"rate-position\"\n      >\n        <wx-view\n          class=\"van-rate custom-class\"\n          bind:touchmove=\"onTouchMove\"\n        >\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{2}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{3}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{4}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{5}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </wx-view>\n      </van-rate>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用状态\n      </wx-view>\n      <van-rate\n        customClass=\"rate-position\"\n      >\n        <wx-view\n          class=\"van-rate custom-class\"\n          bind:touchmove=\"onTouchMove\"\n        >\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--disabled van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--disabled van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--disabled van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{2}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--disabled\"\n              customClass=\"icon-class\"\n              data-score=\"{{3}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--disabled\"\n              customClass=\"icon-class\"\n              data-score=\"{{4}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </wx-view>\n      </van-rate>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        只读状态\n      </wx-view>\n      <van-rate\n        customClass=\"rate-position\"\n      >\n        <wx-view\n          class=\"van-rate custom-class\"\n          bind:touchmove=\"onTouchMove\"\n        >\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{2}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{3}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{4}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </wx-view>\n      </van-rate>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        监听 change 事件\n      </wx-view>\n      <van-rate\n        customClass=\"rate-position\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-rate custom-class\"\n          bind:touchmove=\"onTouchMove\"\n        >\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{0}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon van-rate__icon--full\"\n              customClass=\"icon-class\"\n              data-score=\"{{1}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{2}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{3}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n          <wx-view\n            class=\"van-rate__item\"\n            style=\"\"\n          >\n            <van-icon\n              class=\"van-rate__icon\"\n              customClass=\"icon-class\"\n              data-score=\"{{4}}\"\n              style=\"\"\n              bind:click=\"onSelect\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-star-o\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </wx-view>\n      </van-rate>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/rate/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/row/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/row/index.less",
    "content": ".van-row {\n  &::after {\n    display: table;\n    clear: both;\n    content: '';\n  }\n}\n"
  },
  {
    "path": "packages/row/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\n\nVantComponent({\n  relation: useChildren('col', function (target) {\n    const { gutter } = this.data;\n\n    if (gutter) {\n      target.setData({ gutter });\n    }\n  }),\n\n  props: {\n    gutter: {\n      type: Number,\n      observer: 'setGutter',\n    },\n  },\n\n  methods: {\n    setGutter() {\n      this.children.forEach((col) => {\n        col.setData(this.data);\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/row/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-row custom-class\" style=\"{{ computed.rootStyle({ gutter }) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/row/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  if (!data.gutter) {\n    return '';\n  }\n\n  return style({\n    'margin-right': addUnit(-data.gutter / 2),\n    'margin-left': addUnit(-data.gutter / 2),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "packages/search/README.md",
    "content": "# Search 搜索\n\n### 介绍\n\n用于搜索场景的输入框组件。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-search\": \"@vant/weapp/search/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n`van-search` 中，value 用于控制搜索框中的文字。background 可以自定义搜索框外部背景色。\n\n```html\n<van-search value=\"{{ value }}\" placeholder=\"请输入搜索关键词\" />\n```\n\n### 事件监听\n\n`van-search` 提供了 search 和 cancel 事件。search 事件在用户点击键盘上的搜索按钮触发。cancel 事件在用户点击搜索框右侧取消按钮时触发。\n\n```html\n<van-search\n  value=\"{{ value }}\"\n  placeholder=\"请输入搜索关键词\"\n  show-action\n  bind:search=\"onSearch\"\n  bind:cancel=\"onCancel\"\n/>\n```\n\n### 搜索框内容对齐\n\n通过 `input-align` 属性可以设置搜索框内容的对齐方式。\n\n```html\n<van-search\n  value=\"{{ value }}\"\n  input-align=\"center\"\n  placeholder=\"请输入搜索关键词\"\n/>\n```\n\n### 禁用搜索框\n\n通过 `disabled` 属性可以将组件设置为禁用状态。\n\n```html\n<van-search disabled value=\"{{ value }}\" placeholder=\"请输入搜索关键词\" />\n```\n\n### 自定义背景色\n\n通过`background`属性可以设置搜索框外部的背景色，通过`shape`属性设置搜索框的形状，可选值为`round`。\n\n```html\n<van-search\n  value=\"{{ value }}\"\n  shape=\"round\"\n  background=\"#4fc08d\"\n  placeholder=\"请输入搜索关键词\"\n/>\n```\n\n### 自定义按钮\n\n`van-search` 支持自定义右侧取消按钮，使用名字为 action 的 slot，并设置 use-action-slot 为 true 即可。\n\n```html\n<van-search\n  value=\"{{ value }}\"\n  label=\"地址\"\n  placeholder=\"请输入搜索关键词\"\n  use-action-slot\n  bind:change=\"onChange\"\n  bind:search=\"onSearch\"\n>\n  <view slot=\"action\" bind:tap=\"onClick\">搜索</view>\n</van-search>\n```\n\n```javascript\nPage({\n  data: {\n    value: '',\n  },\n  onChange(e) {\n    this.setData({\n      value: e.detail,\n    });\n  },\n  onSearch() {\n    Toast('搜索' + this.data.value);\n  },\n  onClick() {\n    Toast('搜索' + this.data.value);\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 在表单内提交时的标识符 | _string_ | - |\n| label | 搜索框左侧文本 | _string_ | - |\n| shape | 形状，可选值为 `round` | _string_ | `square` |\n| value | 当前输入的值 | _string \\| number_ | - |\n| background | 搜索框背景色 | _string_ | `#f2f2f2` |\n| show-action | 是否在搜索框右侧显示取消按钮 | _boolean_ | `false` |\n| action-text `v1.0.0` | 取消按钮文字 | _string_ | `取消` |\n| focus | 获取焦点 | _boolean_ | `false` |\n| error | 是否将输入内容标红 | _boolean_ | `false` |\n| disabled | 是否禁用输入框 | _boolean_ | `false` |\n| readonly | 是否只读 | _boolean_ | `false` |\n| clearable | 是否启用清除控件 | _boolean_ | `true` |\n| clear-trigger `v1.8.4` | 显示清除图标的时机，`always` 表示输入框不为空时展示，<br>`focus` 表示输入框聚焦且不为空时展示 | _string_ | `focus` |\n| clear-icon `v1.8.4` | 清除[图标名称](#/icon)或图片链接 | _string_ | `clear` |\n| maxlength | 最大输入长度，设置为 -1 的时候不限制最大长度 | _number_ | `-1` |\n| use-action-slot | 是否使用 action slot | _boolean_ | `false` |\n| placeholder | 输入框为空时占位符 | _string_ | - |\n| placeholder-style | 指定占位符的样式 | _string_ | - |\n| input-align | 输入框内容对齐方式，可选值为 `center` `right` | _string_ | `left` |\n| use-left-icon-slot | 是否使用输入框左侧图标 slot | _boolean_ | `false` |\n| use-right-icon-slot | 是否使用输入框右侧图标 slot | _boolean_ | `false` |\n| left-icon | 输入框左侧图标名称或图片链接，可选值见 Icon 组件（如果设置了 use-left-icon-slot，则该属性无效） | _string_ | `search` |\n| right-icon | 输入框右侧图标名称或图片链接，可选值见 Icon 组件（如果设置了 use-right-icon-slot，则该属性无效） | _string_ | - |\n| cursor-spacing | 输入框聚焦时底部与键盘的距离 | _number_ | `0` |\n\n### Events\n\n| 事件名           | 说明               | 参数                     |\n| ---------------- | ------------------ | ------------------------ |\n| bind:search      | 确定搜索时触发     | event.detail: 当前输入值 |\n| bind:change      | 输入内容变化时触发 | event.detail: 当前输入值 |\n| bind:cancel      | 取消搜索搜索时触发 | -                        |\n| bind:focus       | 输入框聚焦时触发   | -                        |\n| bind:blur        | 输入框失焦时触发   | -                        |\n| bind:clear       | 点击清空控件时触发 | -                        |\n| bind:click-input | 点击搜索区域时触发 | -                        |\n\n### Slot\n\n| 名称 | 说明 |\n| --- | --- |\n| action | 自定义搜索框右侧按钮，需要在`use-action-slot`为 true 时才会显示 |\n| label | 自定义搜索框左侧文本 |\n| left-icon | 自定义输入框左侧图标，需要在`use-left-icon-slot`为 true 时才会显示 |\n| right-icon | 自定义输入框右侧图标，需要在`use-right-icon-slot`为 true 时才会显示 |\n\n### 外部样式类\n\n| 类名         | 说明           |\n| ------------ | -------------- |\n| custom-class | 根节点样式类   |\n| field-class  | 搜索框样式类   |\n| input-class  | 输入框样式类   |\n| cancel-class | 取消按钮样式类 |\n"
  },
  {
    "path": "packages/search/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-search\": \"../../search/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/search/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    value: '',\n  },\n\n  methods: {\n    onChange(e) {\n      this.setData({\n        value: e.detail,\n      });\n    },\n\n    onSearch() {\n      if (this.data.value) {\n        wx.showToast({\n          title: '搜索：' + this.data.value,\n          icon: 'none',\n        });\n      }\n    },\n\n    onClick() {\n      if (this.data.value) {\n        wx.showToast({\n          title: '搜索：' + this.data.value,\n          icon: 'none',\n        });\n      }\n    },\n\n    onCancel() {\n      wx.showToast({\n        title: '取消',\n        icon: 'none',\n      });\n    },\n\n    onClear() {\n      wx.showToast({\n        title: '清空',\n        icon: 'none',\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/search/demo/index.wxml",
    "content": "<demo-block title=\"基本用法\">\n  <van-search\n    model:value=\"{{ value }}\"\n    placeholder=\"请输入搜索关键词\"\n    bind:search=\"onSearch\"\n  />\n</demo-block>\n\n<demo-block title=\"事件监听\">\n  <van-search\n    model:value=\"{{ value }}\"\n    show-action\n    placeholder=\"请输入搜索关键词\"\n    bind:search=\"onSearch\"\n    bind:cancel=\"onCancel\"\n    bind:clear=\"onClear\"\n  />\n</demo-block>\n\n<demo-block title=\"搜索框内容对齐\">\n  <van-search\n    model:value=\"{{ value }}\"\n    input-align=\"center\"\n    placeholder=\"请输入搜索关键词\"\n  />\n</demo-block>\n\n<demo-block title=\"禁用搜索框\">\n  <van-search\n    disabled\n    model:value=\"{{ value }}\"\n    placeholder=\"请输入搜索关键词\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义背景色\">\n  <van-search\n    model:value=\"{{ value }}\"\n    shape=\"round\"\n    background=\"#4fc08d\"\n    placeholder=\"请输入搜索关键词\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义按钮\">\n  <van-search\n    model:value=\"{{ value }}\"\n    label=\"地址\"\n    shape=\"round\"\n    placeholder=\"请输入搜索关键词\"\n    use-action-slot\n    bind:search=\"onSearch\"\n  >\n    <view slot=\"action\" bind:tap=\"onClick\">搜索</view>\n  </van-search>\n</demo-block>\n"
  },
  {
    "path": "packages/search/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-field\": \"../field/index\"\n  }\n}\n"
  },
  {
    "path": "packages/search/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-search {\n  display: flex;\n  align-items: center;\n  box-sizing: border-box;\n  padding: var(--search-padding, @search-padding);\n\n  &__content {\n    display: flex;\n    flex: 1;\n    padding-left: var(--padding-sm, @padding-sm);\n    border-radius: @border-radius-sm;\n    background-color: var(--search-background-color, @search-background-color);\n\n    &--round {\n      border-radius: @border-radius-max;\n    }\n  }\n\n  &__label {\n    padding: var(--search-label-padding, @search-label-padding);\n    font-size: var(--search-label-font-size, @search-label-font-size);\n    line-height: var(--search-input-height, @search-input-height);\n    color: var(--search-label-color, @search-label-color);\n  }\n\n  &__field {\n    flex: 1;\n\n    &__left-icon {\n      color: var(--search-left-icon-color, @search-left-icon-color);\n    }\n  }\n\n  &--withaction {\n    padding-right: 0;\n  }\n\n  &__action {\n    font-size: var(--search-action-font-size, @search-action-font-size);\n    line-height: var(--search-input-height, @search-input-height);\n    color: var(--search-action-text-color, @search-action-text-color);\n\n    &--hover {\n      background-color: @active-color;\n    }\n\n    &-button {\n      padding: var(--search-action-padding, @search-action-padding);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/search/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { canIUseModel } from '../common/version';\n\nVantComponent({\n  field: true,\n\n  classes: ['field-class', 'input-class', 'cancel-class'],\n\n  props: {\n    value: {\n      type: String,\n      value: '',\n    },\n    label: String,\n    focus: Boolean,\n    error: Boolean,\n    disabled: Boolean,\n    readonly: Boolean,\n    inputAlign: String,\n    showAction: Boolean,\n    useActionSlot: Boolean,\n    useLeftIconSlot: Boolean,\n    useRightIconSlot: Boolean,\n    leftIcon: {\n      type: String,\n      value: 'search',\n    },\n    rightIcon: String,\n    placeholder: String,\n    placeholderStyle: String,\n    actionText: {\n      type: String,\n      value: '取消',\n    },\n    background: {\n      type: String,\n      value: '#ffffff',\n    },\n    maxlength: {\n      type: Number,\n      value: -1,\n    },\n    shape: {\n      type: String,\n      value: 'square',\n    },\n    clearable: {\n      type: Boolean,\n      value: true,\n    },\n    clearTrigger: {\n      type: String,\n      value: 'focus',\n    },\n    clearIcon: {\n      type: String,\n      value: 'clear',\n    },\n    cursorSpacing: {\n      type: Number,\n      value: 0,\n    },\n  },\n\n  methods: {\n    onChange(event: WechatMiniprogram.CustomEvent) {\n      if (canIUseModel()) {\n        this.setData({ value: event.detail });\n      }\n      this.$emit('change', event.detail);\n    },\n\n    onCancel() {\n      /**\n       * 修复修改输入框值时，输入框失焦和赋值同时触发，赋值失效\n       * https://github.com/youzan/vant-weapp/issues/1768\n       */\n      setTimeout(() => {\n        if (canIUseModel()) {\n          this.setData({ value: '' });\n        }\n        this.$emit('cancel');\n        this.$emit('change', '');\n      }, 200);\n    },\n\n    onSearch(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('search', event.detail);\n    },\n\n    onFocus(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('focus', event.detail);\n    },\n\n    onBlur(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('blur', event.detail);\n    },\n\n    onClear(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('clear', event.detail);\n    },\n\n    onClickInput(event) {\n      this.$emit('click-input', event.detail);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/search/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('search', { withaction: showAction || useActionSlot }) }} custom-class\"\n  style=\"background: {{ background }}\"\n>\n  <view class=\"{{ utils.bem('search__content', [shape]) }}\">\n    <view class=\"van-search__label\" wx:if=\"{{ label }}\">{{ label }}</view>\n    <slot wx:else name=\"label\" />\n\n    <van-field\n      type=\"search\"\n      left-icon=\"{{ !useLeftIconSlot ? leftIcon : '' }}\"\n      right-icon=\"{{ !useRightIconSlot ? rightIcon : '' }}\"\n      focus=\"{{ focus }}\"\n      error=\"{{ error }}\"\n      border=\"{{ false }}\"\n      confirm-type=\"search\"\n      class=\"van-search__field field-class\"\n      value=\"{{ value }}\"\n      disabled=\"{{ disabled }}\"\n      readonly=\"{{ readonly }}\"\n      clearable=\"{{ clearable }}\"\n      clear-trigger=\"{{ clearTrigger }}\"\n      clear-icon=\"{{ clearIcon }}\"\n      maxlength=\"{{ maxlength }}\"\n      input-align=\"{{ inputAlign }}\"\n      input-class=\"input-class\"\n      placeholder=\"{{ placeholder }}\"\n      placeholder-style=\"{{ placeholderStyle }}\"\n      cursor-spacing=\"{{ cursorSpacing }}\"\n      custom-style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n      bind:blur=\"onBlur\"\n      bind:focus=\"onFocus\"\n      bind:change=\"onChange\"\n      bind:confirm=\"onSearch\"\n      bind:clear=\"onClear\"\n      bind:click-input=\"onClickInput\"\n    >\n      <slot wx:if=\"{{ useLeftIconSlot }}\" name=\"left-icon\" slot=\"left-icon\" />\n      <slot wx:if=\"{{ useRightIconSlot }}\" name=\"right-icon\" slot=\"right-icon\" />\n    </van-field>\n  </view>\n\n  <view\n    wx:if=\"{{ showAction || useActionSlot }}\"\n    class=\"van-search__action\"\n    hover-class=\"van-search__action--hover\"\n    hover-stay-time=\"70\"\n  >\n    <slot wx:if=\"{{ useActionSlot }}\" name=\"action\" />\n    <view wx:else bind:tap=\"onCancel\" class=\"van-search__action-button cancel-class\">{{ actionText }}</view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/search/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基本用法\n      </wx-view>\n      <van-search\n        bind:search=\"onSearch\"\n      >\n        <wx-view\n          class=\"van-search custom-class\"\n          style=\"background: #ffffff\"\n        >\n          <wx-view\n            class=\"van-search__content van-search__content--square\"\n          >\n            <van-field\n              class=\"van-search__field field-class\"\n              inputClass=\"input-class\"\n              bind:blur=\"onBlur\"\n              bind:change=\"onChange\"\n              bind:clear=\"onClear\"\n              bind:click-input=\"onClickInput\"\n              bind:confirm=\"onSearch\"\n              bind:focus=\"onFocus\"\n            >\n              <van-cell\n                customClass=\"custom-class van-field\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n                  bind:tap=\"onClick\"\n                >\n                  <van-icon\n                    class=\"van-cell__left-icon-wrap\"\n                    customClass=\"van-cell__left-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                  />\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  >\n                    <wx-view\n                      class=\"van-field__body van-field__body--search\"\n                    >\n                      <wx-view\n                        class=\"van-field__control van-field__control--custom\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-input\n                        adjustPosition=\"{{true}}\"\n                        alwaysEmbed=\"{{false}}\"\n                        autoFocus=\"{{false}}\"\n                        class=\"van-field__control input-class\"\n                        confirmHold=\"{{false}}\"\n                        confirmType=\"search\"\n                        cursor=\"{{-1}}\"\n                        cursorSpacing=\"{{0}}\"\n                        disabled=\"{{false}}\"\n                        focus=\"{{false}}\"\n                        holdKeyboard=\"{{false}}\"\n                        id=\"\"\n                        maxlength=\"{{-1}}\"\n                        password=\"{{false}}\"\n                        placeholder=\"请输入搜索关键词\"\n                        placeholderClass=\"van-field__placeholder\"\n                        placeholderStyle=\"\"\n                        selectionEnd=\"{{-1}}\"\n                        selectionStart=\"{{-1}}\"\n                        type=\"search\"\n                        value=\"\"\n                        bind:blur=\"onBlur\"\n                        bind:confirm=\"onConfirm\"\n                        bind:focus=\"onFocus\"\n                        bind:input=\"onInput\"\n                        bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                        bind:nicknamereview=\"onBindNicknameReview\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-view\n                        class=\"van-field__icon-container\"\n                        bind:tap=\"onClickIcon\"\n                      />\n                      <wx-view\n                        class=\"van-field__button\"\n                      />\n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </van-cell>\n            </van-field>\n          </wx-view>\n        </wx-view>\n      </van-search>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        事件监听\n      </wx-view>\n      <van-search\n        bind:cancel=\"onCancel\"\n        bind:clear=\"onClear\"\n        bind:search=\"onSearch\"\n      >\n        <wx-view\n          class=\"van-search van-search--withaction custom-class\"\n          style=\"background: #ffffff\"\n        >\n          <wx-view\n            class=\"van-search__content van-search__content--square\"\n          >\n            <van-field\n              class=\"van-search__field field-class\"\n              inputClass=\"input-class\"\n              bind:blur=\"onBlur\"\n              bind:change=\"onChange\"\n              bind:clear=\"onClear\"\n              bind:click-input=\"onClickInput\"\n              bind:confirm=\"onSearch\"\n              bind:focus=\"onFocus\"\n            >\n              <van-cell\n                customClass=\"custom-class van-field\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n                  bind:tap=\"onClick\"\n                >\n                  <van-icon\n                    class=\"van-cell__left-icon-wrap\"\n                    customClass=\"van-cell__left-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                  />\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  >\n                    <wx-view\n                      class=\"van-field__body van-field__body--search\"\n                    >\n                      <wx-view\n                        class=\"van-field__control van-field__control--custom\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-input\n                        adjustPosition=\"{{true}}\"\n                        alwaysEmbed=\"{{false}}\"\n                        autoFocus=\"{{false}}\"\n                        class=\"van-field__control input-class\"\n                        confirmHold=\"{{false}}\"\n                        confirmType=\"search\"\n                        cursor=\"{{-1}}\"\n                        cursorSpacing=\"{{0}}\"\n                        disabled=\"{{false}}\"\n                        focus=\"{{false}}\"\n                        holdKeyboard=\"{{false}}\"\n                        id=\"\"\n                        maxlength=\"{{-1}}\"\n                        password=\"{{false}}\"\n                        placeholder=\"请输入搜索关键词\"\n                        placeholderClass=\"van-field__placeholder\"\n                        placeholderStyle=\"\"\n                        selectionEnd=\"{{-1}}\"\n                        selectionStart=\"{{-1}}\"\n                        type=\"search\"\n                        value=\"\"\n                        bind:blur=\"onBlur\"\n                        bind:confirm=\"onConfirm\"\n                        bind:focus=\"onFocus\"\n                        bind:input=\"onInput\"\n                        bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                        bind:nicknamereview=\"onBindNicknameReview\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-view\n                        class=\"van-field__icon-container\"\n                        bind:tap=\"onClickIcon\"\n                      />\n                      <wx-view\n                        class=\"van-field__button\"\n                      />\n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </van-cell>\n            </van-field>\n          </wx-view>\n          <wx-view\n            class=\"van-search__action\"\n            hoverClass=\"van-search__action--hover\"\n            hoverStayTime=\"70\"\n          >\n            <wx-view\n              class=\"van-search__action-button cancel-class\"\n              bind:tap=\"onCancel\"\n            >\n              取消\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-search>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        搜索框内容对齐\n      </wx-view>\n      <van-search>\n        <wx-view\n          class=\"van-search custom-class\"\n          style=\"background: #ffffff\"\n        >\n          <wx-view\n            class=\"van-search__content van-search__content--square\"\n          >\n            <van-field\n              class=\"van-search__field field-class\"\n              inputClass=\"input-class\"\n              bind:blur=\"onBlur\"\n              bind:change=\"onChange\"\n              bind:clear=\"onClear\"\n              bind:click-input=\"onClickInput\"\n              bind:confirm=\"onSearch\"\n              bind:focus=\"onFocus\"\n            >\n              <van-cell\n                customClass=\"custom-class van-field\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n                  bind:tap=\"onClick\"\n                >\n                  <van-icon\n                    class=\"van-cell__left-icon-wrap\"\n                    customClass=\"van-cell__left-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                  />\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  >\n                    <wx-view\n                      class=\"van-field__body van-field__body--search\"\n                    >\n                      <wx-view\n                        class=\"van-field__control van-field__control--center van-field__control--custom\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-input\n                        adjustPosition=\"{{true}}\"\n                        alwaysEmbed=\"{{false}}\"\n                        autoFocus=\"{{false}}\"\n                        class=\"van-field__control van-field__control--center input-class\"\n                        confirmHold=\"{{false}}\"\n                        confirmType=\"search\"\n                        cursor=\"{{-1}}\"\n                        cursorSpacing=\"{{0}}\"\n                        disabled=\"{{false}}\"\n                        focus=\"{{false}}\"\n                        holdKeyboard=\"{{false}}\"\n                        id=\"\"\n                        maxlength=\"{{-1}}\"\n                        password=\"{{false}}\"\n                        placeholder=\"请输入搜索关键词\"\n                        placeholderClass=\"van-field__placeholder\"\n                        placeholderStyle=\"\"\n                        selectionEnd=\"{{-1}}\"\n                        selectionStart=\"{{-1}}\"\n                        type=\"search\"\n                        value=\"\"\n                        bind:blur=\"onBlur\"\n                        bind:confirm=\"onConfirm\"\n                        bind:focus=\"onFocus\"\n                        bind:input=\"onInput\"\n                        bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                        bind:nicknamereview=\"onBindNicknameReview\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-view\n                        class=\"van-field__icon-container\"\n                        bind:tap=\"onClickIcon\"\n                      />\n                      <wx-view\n                        class=\"van-field__button\"\n                      />\n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </van-cell>\n            </van-field>\n          </wx-view>\n        </wx-view>\n      </van-search>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用搜索框\n      </wx-view>\n      <van-search>\n        <wx-view\n          class=\"van-search custom-class\"\n          style=\"background: #ffffff\"\n        >\n          <wx-view\n            class=\"van-search__content van-search__content--square\"\n          >\n            <van-field\n              class=\"van-search__field field-class\"\n              inputClass=\"input-class\"\n              bind:blur=\"onBlur\"\n              bind:change=\"onChange\"\n              bind:clear=\"onClear\"\n              bind:click-input=\"onClickInput\"\n              bind:confirm=\"onSearch\"\n              bind:focus=\"onFocus\"\n            >\n              <van-cell\n                customClass=\"custom-class van-field\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n                  bind:tap=\"onClick\"\n                >\n                  <van-icon\n                    class=\"van-cell__left-icon-wrap\"\n                    customClass=\"van-cell__left-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                  />\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  >\n                    <wx-view\n                      class=\"van-field__body van-field__body--search\"\n                    >\n                      <wx-view\n                        class=\"van-field__control van-field__control--custom\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-input\n                        adjustPosition=\"{{true}}\"\n                        alwaysEmbed=\"{{false}}\"\n                        autoFocus=\"{{false}}\"\n                        class=\"van-field__control van-field__control--disabled input-class\"\n                        confirmHold=\"{{false}}\"\n                        confirmType=\"search\"\n                        cursor=\"{{-1}}\"\n                        cursorSpacing=\"{{0}}\"\n                        disabled=\"{{true}}\"\n                        focus=\"{{false}}\"\n                        holdKeyboard=\"{{false}}\"\n                        id=\"\"\n                        maxlength=\"{{-1}}\"\n                        password=\"{{false}}\"\n                        placeholder=\"请输入搜索关键词\"\n                        placeholderClass=\"van-field__placeholder\"\n                        placeholderStyle=\"\"\n                        selectionEnd=\"{{-1}}\"\n                        selectionStart=\"{{-1}}\"\n                        type=\"search\"\n                        value=\"\"\n                        bind:blur=\"onBlur\"\n                        bind:confirm=\"onConfirm\"\n                        bind:focus=\"onFocus\"\n                        bind:input=\"onInput\"\n                        bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                        bind:nicknamereview=\"onBindNicknameReview\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-view\n                        class=\"van-field__icon-container\"\n                        bind:tap=\"onClickIcon\"\n                      />\n                      <wx-view\n                        class=\"van-field__button\"\n                      />\n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </van-cell>\n            </van-field>\n          </wx-view>\n        </wx-view>\n      </van-search>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义背景色\n      </wx-view>\n      <van-search>\n        <wx-view\n          class=\"van-search custom-class\"\n          style=\"background: #4fc08d\"\n        >\n          <wx-view\n            class=\"van-search__content van-search__content--round\"\n          >\n            <van-field\n              class=\"van-search__field field-class\"\n              inputClass=\"input-class\"\n              bind:blur=\"onBlur\"\n              bind:change=\"onChange\"\n              bind:clear=\"onClear\"\n              bind:click-input=\"onClickInput\"\n              bind:confirm=\"onSearch\"\n              bind:focus=\"onFocus\"\n            >\n              <van-cell\n                customClass=\"custom-class van-field\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n                  bind:tap=\"onClick\"\n                >\n                  <van-icon\n                    class=\"van-cell__left-icon-wrap\"\n                    customClass=\"van-cell__left-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                  />\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  >\n                    <wx-view\n                      class=\"van-field__body van-field__body--search\"\n                    >\n                      <wx-view\n                        class=\"van-field__control van-field__control--custom\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-input\n                        adjustPosition=\"{{true}}\"\n                        alwaysEmbed=\"{{false}}\"\n                        autoFocus=\"{{false}}\"\n                        class=\"van-field__control input-class\"\n                        confirmHold=\"{{false}}\"\n                        confirmType=\"search\"\n                        cursor=\"{{-1}}\"\n                        cursorSpacing=\"{{0}}\"\n                        disabled=\"{{false}}\"\n                        focus=\"{{false}}\"\n                        holdKeyboard=\"{{false}}\"\n                        id=\"\"\n                        maxlength=\"{{-1}}\"\n                        password=\"{{false}}\"\n                        placeholder=\"请输入搜索关键词\"\n                        placeholderClass=\"van-field__placeholder\"\n                        placeholderStyle=\"\"\n                        selectionEnd=\"{{-1}}\"\n                        selectionStart=\"{{-1}}\"\n                        type=\"search\"\n                        value=\"\"\n                        bind:blur=\"onBlur\"\n                        bind:confirm=\"onConfirm\"\n                        bind:focus=\"onFocus\"\n                        bind:input=\"onInput\"\n                        bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                        bind:nicknamereview=\"onBindNicknameReview\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-view\n                        class=\"van-field__icon-container\"\n                        bind:tap=\"onClickIcon\"\n                      />\n                      <wx-view\n                        class=\"van-field__button\"\n                      />\n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </van-cell>\n            </van-field>\n          </wx-view>\n        </wx-view>\n      </van-search>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义按钮\n      </wx-view>\n      <van-search\n        bind:search=\"onSearch\"\n      >\n        <wx-view\n          class=\"van-search van-search--withaction custom-class\"\n          style=\"background: #ffffff\"\n        >\n          <wx-view\n            class=\"van-search__content van-search__content--round\"\n          >\n            <wx-view\n              class=\"van-search__label\"\n            >\n              地址\n            </wx-view>\n            <van-field\n              class=\"van-search__field field-class\"\n              inputClass=\"input-class\"\n              bind:blur=\"onBlur\"\n              bind:change=\"onChange\"\n              bind:clear=\"onClear\"\n              bind:click-input=\"onClickInput\"\n              bind:confirm=\"onSearch\"\n              bind:focus=\"onFocus\"\n            >\n              <van-cell\n                customClass=\"custom-class van-field\"\n              >\n                <wx-view\n                  class=\"custom-class van-cell van-cell--borderless\"\n                  hoverClass=\"van-cell--hover hover-class\"\n                  hoverStayTime=\"70\"\n                  style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n                  bind:tap=\"onClick\"\n                >\n                  <van-icon\n                    class=\"van-cell__left-icon-wrap\"\n                    customClass=\"van-cell__left-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                  <wx-view\n                    class=\"van-cell__title title-class\"\n                    style=\"max-width:6.2em;min-width:6.2em;margin-right: 12px;\"\n                  />\n                  <wx-view\n                    class=\"van-cell__value value-class\"\n                  >\n                    <wx-view\n                      class=\"van-field__body van-field__body--search\"\n                    >\n                      <wx-view\n                        class=\"van-field__control van-field__control--custom\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-input\n                        adjustPosition=\"{{true}}\"\n                        alwaysEmbed=\"{{false}}\"\n                        autoFocus=\"{{false}}\"\n                        class=\"van-field__control input-class\"\n                        confirmHold=\"{{false}}\"\n                        confirmType=\"search\"\n                        cursor=\"{{-1}}\"\n                        cursorSpacing=\"{{0}}\"\n                        disabled=\"{{false}}\"\n                        focus=\"{{false}}\"\n                        holdKeyboard=\"{{false}}\"\n                        id=\"\"\n                        maxlength=\"{{-1}}\"\n                        password=\"{{false}}\"\n                        placeholder=\"请输入搜索关键词\"\n                        placeholderClass=\"van-field__placeholder\"\n                        placeholderStyle=\"\"\n                        selectionEnd=\"{{-1}}\"\n                        selectionStart=\"{{-1}}\"\n                        type=\"search\"\n                        value=\"\"\n                        bind:blur=\"onBlur\"\n                        bind:confirm=\"onConfirm\"\n                        bind:focus=\"onFocus\"\n                        bind:input=\"onInput\"\n                        bind:keyboardheightchange=\"onKeyboardHeightChange\"\n                        bind:nicknamereview=\"onBindNicknameReview\"\n                        bind:tap=\"onClickInput\"\n                      />\n                      <wx-view\n                        class=\"van-field__icon-container\"\n                        bind:tap=\"onClickIcon\"\n                      />\n                      <wx-view\n                        class=\"van-field__button\"\n                      />\n                    </wx-view>\n                  </wx-view>\n                </wx-view>\n              </van-cell>\n            </van-field>\n          </wx-view>\n          <wx-view\n            class=\"van-search__action\"\n            hoverClass=\"van-search__action--hover\"\n            hoverStayTime=\"70\"\n          >\n            <wx-view\n              slot=\"action\"\n              bind:tap=\"onClick\"\n            >\n              搜索\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-search>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/search/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/share-sheet/README.md",
    "content": "# ShareSheet 分享面板\n\n### 介绍\n\n底部弹起的分享面板，用于展示各分享渠道对应的操作按钮，不含具体的分享逻辑。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-share-sheet\": \"@vant/weapp/share-sheet/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n分享面板通过 `options` 属性来定义分享选项，数组的每一项是一个对象，对象格式见文档下方表格。\n\n```html\n<van-cell title=\"显示分享面板\" bind:click=\"onClick\" />\n<van-share-sheet\n  show=\"{{ showShare }}\"\n  title=\"立即分享给好友\"\n  options=\"{{ options }}\"\n  bind:select=\"onSelect\"\n  bind:close=\"onClose\"\n/>\n```\n\n```js\nPage({\n  data: {\n    showShare: false,\n    options: [\n      { name: '微信', icon: 'wechat', openType: 'share' },\n      { name: '微博', icon: 'weibo' },\n      { name: '复制链接', icon: 'link' },\n      { name: '分享海报', icon: 'poster' },\n      { name: '二维码', icon: 'qrcode' },\n    ],\n  },\n\n  onClick(event) {\n    this.setData({ showShare: true });\n  },\n\n  onClose() {\n    this.setData({ showShare: false });\n  },\n\n  onSelect(event) {\n    Toast(event.detail.name);\n    this.onClose();\n  },\n});\n```\n\n### 展示多行选项\n\n当分享选项的数量较多时，可以将 `options` 定义为数组嵌套的格式，每个子数组会作为一行选项展示。\n\n```html\n<van-share-sheet\n  show=\"{{ showShare }}\"\n  title=\"立即分享给好友\"\n  options=\"{{ options }}\"\n/>\n```\n\n```js\nPage({\n  data: {\n    showShare: false,\n    options: [\n      [\n        { name: '微信', icon: 'wechat' },\n        { name: '微博', icon: 'weibo' },\n        { name: 'QQ', icon: 'qq' },\n      ],\n      [\n        { name: '复制链接', icon: 'link' },\n        { name: '分享海报', icon: 'poster' },\n        { name: '二维码', icon: 'qrcode' },\n      ],\n    ],\n  },\n});\n```\n\n### 自定义图标\n\n除了使用内置的几种图标外，可以直接在 `icon` 中传入图片 URL 来使用自定义的图标。\n\n```html\n<van-share-sheet show=\"{{ showShare }}\" options=\"{{ options }}\" />\n```\n\n```js\nPage({\n  data: {\n    showShare: false,\n    options: [\n      {\n        name: '名称',\n        icon: 'https://img.yzcdn.cn/vant/custom-icon-fire.png',\n      },\n      {\n        name: '名称',\n        icon: 'https://img.yzcdn.cn/vant/custom-icon-light.png',\n      },\n      {\n        name: '名称',\n        icon: 'https://img.yzcdn.cn/vant/custom-icon-water.png',\n      },\n    ],\n  },\n});\n```\n\n### 展示描述信息\n\n通过 `description` 属性可以设置标题下方的描述文字, 在 `options` 内设置 `description` 属性可以添加分享选项描述。\n\n```html\n<van-share-sheet\n  show=\"{{ showShare }}\"\n  options=\"{{ options }}\"\n  title=\"立即分享给好友\"\n  description=\"描述信息\"\n/>\n```\n\n```js\nPage({\n  data: {\n    showShare: false,\n    options: [\n      { name: '微信', icon: 'wechat' },\n      { name: '微博', icon: 'weibo' },\n      {\n        name: '复制链接',\n        icon: 'link',\n        description: '描述信息',\n      },\n      { name: '分享海报', icon: 'poster' },\n      { name: '二维码', icon: 'qrcode' },\n    ],\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| show | 是否显示分享面板 | _boolean_ | `false` |\n| options | 分享选项 | _Option[]_ | `[]` |\n| title | 顶部标题 | _string_ | - |\n| cancel-text | 取消按钮文字 | _string_ | `'取消'` |\n| description | 标题下方的辅助描述文字 | _string_ | - |\n| duration | 动画时长，单位毫秒 | _number \\| string_ | `300` |\n| overlay | 是否显示遮罩层 | _boolean_ | `true` |\n| close-on-click-overlay | 是否在点击遮罩层后关闭 | _boolean_ | `true` |\n| safe-area-inset-bottom | 是否开启底部安全区适配 | _boolean_ | `true` |\n| root-portal `v1.11.3` | 是否从页面子树中脱离出来，用于解决各种 fixed 失效问题，微信基础库 >= `2.25.2 `  | _boolean_ | `false` |\n\n### Option 数据结构\n\n`options`属性为一个对象数组，数组中的每个对象配置一列，对象可以包含以下值：\n\n| 键名 | 说明 | 类型 |\n| --- | --- | --- |\n| name | 分享渠道名称 | _string_ |\n| description | 分享选项描述 | _string_ |\n| icon | 图标，可选值为 `qq` `link` `weibo` `wechat` `poster` `qrcode` `weapp-qrcode` `wechat-moments`，支持传入图片 URL | _string_ |\n| openType | 按钮 `open-type`，可用于实现分享功能，可选值为 `share` | _string_ |\n\n### Events\n\n| 事件名        | 说明               | 回调参数                        |\n| ------------- | ------------------ | ------------------------------- |\n| bind:select        | 点击分享选项时触发 | _option: Option, index: number_ |\n| bind:close         | 关闭时触发         | -                               |\n| bind:cancel        | 点击取消按钮时触发 | -                               |\n| bind:click-overlay | 点击遮罩层时触发   | -                               |\n\n### Slots\n\n| 名称        | 说明           |\n| ----------- | -------------- |\n| title       | 自定义顶部标题 |\n| description | 自定义描述文字 |\n"
  },
  {
    "path": "packages/share-sheet/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-toast\": \"../../toast/index\",\n    \"van-share-sheet\": \"../../share-sheet/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/share-sheet/demo/index.less",
    "content": ".container {\n  height: 100vh;\n  background-color: #fff;\n}\n\n.tag,\n.button {\n  margin-right: 5px;\n}\n\n.van-card__footer {\n  margin-top: 5px;\n}\n"
  },
  {
    "path": "packages/share-sheet/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  data: {\n    show: {\n      basic: false,\n      withDesc: false,\n      multiLine: false,\n      customIcon: false,\n    },\n    options: [\n      { name: '微信', icon: 'wechat', openType: 'share' },\n      { name: '朋友圈', icon: 'wechat-moments' },\n      { name: 'QQ', icon: 'qq' },\n      { name: '微博', icon: 'weibo' },\n      { name: '复制链接', icon: 'link' },\n      { name: '分享海报', icon: 'poster' },\n      { name: '二维码', icon: 'qrcode' },\n      { name: '小程序码', icon: 'weapp-qrcode' },\n    ],\n\n    multiLineOptions: [\n      [\n        { name: '微信', icon: 'wechat' },\n        { name: '微博', icon: 'weibo' },\n        { name: 'QQ', icon: 'qq' },\n      ],\n      [\n        { name: '复制链接', icon: 'link' },\n        { name: '分享海报', icon: 'poster' },\n        { name: '二维码', icon: 'qrcode' },\n      ],\n    ],\n\n    customIconOptions: [\n      {\n        name: '名称',\n        icon: 'https://img.yzcdn.cn/vant/custom-icon-fire.png',\n      },\n      {\n        name: '名称',\n        icon: 'https://img.yzcdn.cn/vant/custom-icon-light.png',\n      },\n      {\n        name: '名称',\n        icon: 'https://img.yzcdn.cn/vant/custom-icon-water.png',\n      },\n    ],\n\n    optionsWithDesc: [\n      { name: '微信', icon: 'wechat' },\n      { name: '微博', icon: 'weibo' },\n      {\n        name: '复制链接',\n        icon: 'link',\n        description: '描述信息',\n      },\n      { name: '分享海报', icon: 'poster' },\n      { name: '二维码', icon: 'qrcode' },\n    ],\n  },\n\n  methods: {\n    onShowShareSheet(event) {\n      this.setData({\n        [`show.${event.target.dataset.type}`]: true,\n      });\n    },\n\n    onClose() {\n      this.setData({\n        show: {\n          basic: false,\n          withDesc: false,\n          multiLine: false,\n          customIcon: false,\n        },\n      });\n    },\n\n    onSelect(event) {\n      Toast({ context: this, message: event.detail.name });\n      this.onClose();\n    },\n  },\n});\n"
  },
  {
    "path": "packages/share-sheet/demo/index.wxml",
    "content": "<demo-block card title=\"基础用法\">\n  <van-cell is-link title=\"显示分享面板\" data-type=\"basic\" bind:click=\"onShowShareSheet\" />\n  <van-share-sheet\n    show=\"{{ show.basic }}\"\n    title=\"立即分享给好友\"\n    options=\"{{ options }}\"\n    bind:close=\"onClose\"\n    bind:select=\"onSelect\"\n  />\n</demo-block>\n\n<demo-block card title=\"展示多行选项\">\n  <van-cell is-link title=\"显示分享面板\" data-type=\"multiLine\" bind:click=\"onShowShareSheet\" />\n  <van-share-sheet\n    show=\"{{ show.multiLine }}\"\n    title=\"立即分享给好友\"\n    options=\"{{ multiLineOptions }}\"\n    bind:close=\"onClose\"\n    bind:select=\"onSelect\"\n  />\n</demo-block>\n\n<demo-block card title=\"自定义图标\">\n  <van-cell is-link title=\"显示分享面板\" data-type=\"customIcon\" bind:click=\"onShowShareSheet\" />\n  <van-share-sheet\n    show=\"{{ show.customIcon }}\"\n    options=\"{{ customIconOptions }}\"\n    bind:close=\"onClose\"\n    bind:select=\"onSelect\"\n  />\n</demo-block>\n\n<demo-block card title=\"展示描述信息\">\n  <van-cell is-link title=\"显示分享面板\" data-type=\"withDesc\" bind:click=\"onShowShareSheet\" />\n  <van-share-sheet\n    show=\"{{ show.withDesc }}\"\n    title=\"立即分享给好友\"\n    options=\"{{ optionsWithDesc }}\"\n    description=\"描述信息\"\n    bind:close=\"onClose\"\n    bind:select=\"onSelect\"\n  />\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/share-sheet/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"options\": \"./options\"\n  }\n}\n"
  },
  {
    "path": "packages/share-sheet/index.less",
    "content": "@import '../common/style/var';\n@import '../common/style/mixins/hairline.less';\n\n.van-share-sheet {\n  &__header {\n    padding: @share-sheet-header-padding;\n    text-align: center;\n  }\n\n  &__title {\n    margin-top: @padding-xs;\n    color: @share-sheet-title-color;\n    font-weight: normal;\n    font-size: @share-sheet-title-font-size;\n    line-height: @share-sheet-title-line-height;\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &__title:not(:empty) + &__title {\n    display: none;\n  }\n\n  &__description {\n    display: block;\n    margin-top: @padding-xs;\n    color: @share-sheet-description-color;\n    font-size: @share-sheet-description-font-size;\n    line-height: @share-sheet-description-line-height;\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &__description:not(:empty) + &__description {\n    display: none;\n  }\n\n  &__cancel {\n    display: block;\n    box-sizing: content-box;\n    width: 100%;\n    height: auto;\n    padding: 0;\n    font-size: @share-sheet-cancel-button-font-size;\n    line-height: @share-sheet-cancel-button-height;\n    text-align: center;\n    background: @share-sheet-cancel-button-background;\n    border: none;\n\n    &::before {\n      display: block;\n      height: @padding-xs;\n      background-color: @background-color;\n      content: ' ';\n    }\n\n    &::after {\n      display: none;\n    }\n\n    &:active {\n      background-color: @active-color;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/share-sheet/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    // whether to show popup\n    show: Boolean,\n    // overlay custom style\n    overlayStyle: String,\n    // z-index\n    zIndex: {\n      type: Number,\n      value: 100,\n    },\n    title: String,\n    cancelText: {\n      type: String,\n      value: '取消',\n    },\n    description: String,\n    options: {\n      type: Array,\n      value: [],\n    },\n    overlay: {\n      type: Boolean,\n      value: true,\n    },\n    safeAreaInsetBottom: {\n      type: Boolean,\n      value: true,\n    },\n    closeOnClickOverlay: {\n      type: Boolean,\n      value: true,\n    },\n    duration: {\n      type: null,\n      value: 300,\n    },\n    rootPortal: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  methods: {\n    onClickOverlay() {\n      this.$emit('click-overlay');\n    },\n\n    onCancel() {\n      this.onClose();\n      this.$emit('cancel');\n    },\n\n    onSelect(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('select', event.detail);\n    },\n\n    onClose() {\n      this.$emit('close');\n    },\n  },\n});\n"
  },
  {
    "path": "packages/share-sheet/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-popup\n  round\n  class=\"van-share-sheet\"\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  overlay=\"{{ overlay }}\"\n  duration=\"{{ duration }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay-style=\"{{ overlayStyle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClose\"\n  bind:click-overlay=\"onClickOverlay\"\n>\n  <view class=\"van-share-sheet__header\">\n    <view class=\"van-share-sheet__title\">\n      <slot name=\"title\" />\n    </view>\n    <view wx:if=\"{{ title }}\" class=\"van-share-sheet__title\">{{ title }}</view>\n\n    <view class=\"van-share-sheet__description\">\n      <slot name=\"description\" />\n    </view>\n    <view wx:if=\"{{ description }}\" class=\"van-share-sheet__description\">\n      {{ description }}\n    </view>\n  </view>\n\n  <block wx:if=\"{{ computed.isMulti(options) }}\">\n    <options\n      wx:for=\"{{ options }}\"\n      show-border=\"{{ index !== 0 }}\"\n      wx:key=\"index\"\n      options=\"{{ item }}\"\n      bind:select=\"onSelect\"\n    />\n  </block>\n\n  <options wx:else options=\"{{ options }}\" bind:select=\"onSelect\" />\n\n  <button type=\"button\" class=\"van-share-sheet__cancel\" bindtap=\"onCancel\">\n    {{ cancelText }}\n  </button>\n</van-popup>\n"
  },
  {
    "path": "packages/share-sheet/index.wxs",
    "content": "/* eslint-disable */\nfunction isMulti(options) {\n  if (options == null || options[0] == null) {\n    return false;\n  }\n\n  return \"Array\" === options.constructor && \"Array\" === options[0].constructor;\n}\n\nmodule.exports = {\n  isMulti: isMulti\n};\n"
  },
  {
    "path": "packages/share-sheet/options.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/share-sheet/options.less",
    "content": "@import '../common/style/var';\n@import '../common/style/mixins/hairline.less';\n\n.van-share-sheet {\n  &__options {\n    position: relative;\n    display: flex;\n    padding: @padding-md 0 @padding-md @padding-xs;\n    overflow-x: auto;\n    overflow-y: visible;\n    -webkit-overflow-scrolling: touch;\n\n    &--border::before {\n      .hairline-top(@cell-border-color, @padding-md);\n    }\n\n    &::-webkit-scrollbar {\n      height: 0;\n    }\n  }\n\n  &__option {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    user-select: none;\n\n    &:active {\n      opacity: @active-opacity;\n    }\n  }\n\n  &__button {\n    height: auto;\n    padding: 0;\n    line-height: inherit;\n    background-color: transparent;\n    border: 0;\n\n    &::after {\n      border: 0;\n    }\n  }\n\n  &__icon {\n    width: @share-sheet-icon-size;\n    height: @share-sheet-icon-size;\n    margin: 0 @padding-md;\n  }\n\n  &__name {\n    margin-top: @padding-xs;\n    padding: 0 @padding-base;\n    color: @share-sheet-option-name-color;\n    font-size: @share-sheet-option-name-font-size;\n  }\n\n  &__option-description {\n    padding: 0 @padding-base;\n    color: @share-sheet-option-description-color;\n    font-size: @share-sheet-option-description-font-size;\n  }\n}\n"
  },
  {
    "path": "packages/share-sheet/options.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    options: Array,\n    showBorder: Boolean,\n  },\n\n  methods: {\n    onSelect(event) {\n      const { index } = event.currentTarget.dataset;\n      const option = this.data.options[index];\n      this.$emit('select', { ...option, index });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/share-sheet/options.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./options.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('share-sheet__options', { border: showBorder }) }}\">\n  <view\n    wx:for=\"{{ options }}\"\n    wx:key=\"index\"\n    class=\"van-share-sheet__option\"\n    data-index=\"{{ index }}\"\n    bindtap=\"onSelect\"\n  >\n    <button class=\"van-share-sheet__button\" open-type=\"{{ item.openType }}\">\n      <image src=\"{{ computed.getIconURL(item.icon) }}\" class=\"van-share-sheet__icon\" /> \n      <view wx:if=\"{{ item.name }}\" class=\"van-share-sheet__name\">{{ item.name }}</view>\n      <view wx:if=\"{{ item.description }}\" class=\"van-share-sheet__option-description\">\n        {{ item.description }}\n      </view>\n    </button>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/share-sheet/options.wxs",
    "content": "/* eslint-disable */\nvar PRESET_ICONS = ['qq', 'link', 'weibo', 'wechat', 'poster', 'qrcode', 'weapp-qrcode', 'wechat-moments'];\n\nfunction getIconURL(icon) {\n  if (PRESET_ICONS.indexOf(icon) !== -1) {\n    return 'https://img.yzcdn.cn/vant/share-sheet-' + icon + '.png';\n  }\n\n  return icon;\n}\n\nmodule.exports = {\n  getIconURL: getIconURL,\n};\n"
  },
  {
    "path": "packages/share-sheet/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <wx-view\n        class=\"demo-block__card\"\n      >\n        <van-cell\n          data-type=\"basic\"\n          bind:click=\"onShowShareSheet\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              显示分享面板\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n        <van-share-sheet\n          bind:close=\"onClose\"\n          bind:select=\"onSelect\"\n        >\n          <van-popup\n            class=\"van-share-sheet\"\n            bind:click-overlay=\"onClickOverlay\"\n            bind:close=\"onClose\"\n          >\n            <van-overlay\n              bind:click=\"onClickOverlay\"\n            >\n              <van-transition\n                customClass=\"van-overlay custom-class\"\n                bind:tap=\"onClick\"\n                catch:touchmove=\"noop\"\n              />\n            </van-overlay>\n          </van-popup>\n        </van-share-sheet>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示多行选项\n      </wx-view>\n      <wx-view\n        class=\"demo-block__card\"\n      >\n        <van-cell\n          data-type=\"multiLine\"\n          bind:click=\"onShowShareSheet\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              显示分享面板\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n        <van-share-sheet\n          bind:close=\"onClose\"\n          bind:select=\"onSelect\"\n        >\n          <van-popup\n            class=\"van-share-sheet\"\n            bind:click-overlay=\"onClickOverlay\"\n            bind:close=\"onClose\"\n          >\n            <van-overlay\n              bind:click=\"onClickOverlay\"\n            >\n              <van-transition\n                customClass=\"van-overlay custom-class\"\n                bind:tap=\"onClick\"\n                catch:touchmove=\"noop\"\n              />\n            </van-overlay>\n          </van-popup>\n        </van-share-sheet>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义图标\n      </wx-view>\n      <wx-view\n        class=\"demo-block__card\"\n      >\n        <van-cell\n          data-type=\"customIcon\"\n          bind:click=\"onShowShareSheet\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              显示分享面板\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n        <van-share-sheet\n          bind:close=\"onClose\"\n          bind:select=\"onSelect\"\n        >\n          <van-popup\n            class=\"van-share-sheet\"\n            bind:click-overlay=\"onClickOverlay\"\n            bind:close=\"onClose\"\n          >\n            <van-overlay\n              bind:click=\"onClickOverlay\"\n            >\n              <van-transition\n                customClass=\"van-overlay custom-class\"\n                bind:tap=\"onClick\"\n                catch:touchmove=\"noop\"\n              />\n            </van-overlay>\n          </van-popup>\n        </van-share-sheet>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示描述信息\n      </wx-view>\n      <wx-view\n        class=\"demo-block__card\"\n      >\n        <van-cell\n          data-type=\"withDesc\"\n          bind:click=\"onShowShareSheet\"\n        >\n          <wx-view\n            class=\"custom-class van-cell van-cell--clickable\"\n            hoverClass=\"van-cell--hover hover-class\"\n            hoverStayTime=\"70\"\n            style=\"\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-cell__title title-class\"\n              style=\"\"\n            >\n              显示分享面板\n            </wx-view>\n            <wx-view\n              class=\"van-cell__value value-class\"\n            />\n            <van-icon\n              class=\"van-cell__right-icon-wrap right-icon-class\"\n              customClass=\"van-cell__right-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-arrow\"\n                style=\"\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n          </wx-view>\n        </van-cell>\n        <van-share-sheet\n          bind:close=\"onClose\"\n          bind:select=\"onSelect\"\n        >\n          <van-popup\n            class=\"van-share-sheet\"\n            bind:click-overlay=\"onClickOverlay\"\n            bind:close=\"onClose\"\n          >\n            <van-overlay\n              bind:click=\"onClickOverlay\"\n            >\n              <van-transition\n                customClass=\"van-overlay custom-class\"\n                bind:tap=\"onClick\"\n                catch:touchmove=\"noop\"\n              />\n            </van-overlay>\n          </van-popup>\n        </van-share-sheet>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/share-sheet/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/sidebar/README.md",
    "content": "# Sidebar 侧边导航\n\n### 介绍\n\n垂直展示的导航栏，用于在不同的内容区域之间进行切换。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-sidebar\": \"@vant/weapp/sidebar/index\",\n  \"van-sidebar-item\": \"@vant/weapp/sidebar-item/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)\n\n## 代码演示\n\n### 基础用法\n\n通过在`van-sidebar`上设置`activeKey`属性来控制选中项。\n\n```html\n<van-sidebar active-key=\"{{ activeKey }}\">\n  <van-sidebar-item title=\"标签名\" />\n  <van-sidebar-item title=\"标签名\" />\n  <van-sidebar-item title=\"标签名\" />\n</van-sidebar>\n```\n\n```javascript\nPage({\n  data: {\n    activeKey: 0,\n  },\n});\n```\n\n### 徽标提示\n\n设置`dot`属性后，会在右上角展示一个小红点。设置`badge`属性后，会在右上角展示相应的徽标。\n\n```html\n<van-sidebar active-key=\"{{ activeKey }}\">\n  <van-sidebar-item title=\"标签名\" dot />\n  <van-sidebar-item title=\"标签名\" badge=\"5\" />\n  <van-sidebar-item title=\"标签名\" badge=\"99+\" />\n</van-sidebar>\n```\n\n### 禁用选项\n\n通过`disabled`属性禁用选项。\n\n```html\n<van-sidebar active-key=\"{{ activeKey }}\">\n  <van-sidebar-item title=\"标签名\" />\n  <van-sidebar-item title=\"标签名\" disabled />\n  <van-sidebar-item title=\"标签名\" />\n</van-sidebar>\n```\n\n### 监听切换事件\n\n设置`change`方法来监听切换导航项时的事件。\n\n```html\n<van-sidebar active-key=\"{{ activeKey }}\" bind:change=\"onChange\">\n  <van-sidebar-item title=\"标签名 1\" />\n  <van-sidebar-item title=\"标签名 2\" />\n  <van-sidebar-item title=\"标签名 3\" />\n</van-sidebar>\n\n<van-notify id=\"van-notify\" />\n```\n\n```js\nimport Notify from '@vant/weapp/notify/notify';\n\nPage({\n  data: {\n    activeKey: 0,\n  },\n\n  onChange(event) {\n    Notify({ type: 'primary', message: event.detail });\n  },\n});\n```\n\n## API\n\n### Sidebar Props\n\n| 参数      | 说明         | 类型               | 默认值 |\n| --------- | ------------ | ------------------ | ------ |\n| activeKey | 选中项的索引 | _string \\| number_ | `0`    |\n\n### Sidebar Event\n\n| 事件名 | 说明           | 参数               |\n| ------ | -------------- | ------------------ |\n| change | 切换徽章时触发 | 当前选中徽章的索引 |\n\n### Sidebar 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n\n### SidebarItem Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| title | 内容 | _string_ | `''` |\n| dot | 是否显示右上角小红点 | _boolean_ | `false` |\n| info | 图标右上角徽标的内容（已废弃，请使用 badge 属性） | _string \\| number_ | `''` |\n| badge `v1.5.0` | 图标右上角徽标的内容 | _string \\| number_ | `''` |\n| disabled | 是否禁用该项 | _boolean_ | `false` |\n\n### SidebarItem Slot\n\n| 名称  | 说明                                        |\n| ----- | ------------------------------------------- |\n| title | 自定义标题栏，如果设置了`title`属性则不生效 |\n\n### SidebarItem Event\n\n| 事件名 | 说明           | 参数                            |\n| ------ | -------------- | ------------------------------- |\n| click  | 点击徽章时触发 | `event.detail` 为当前徽章的索引 |\n\n### SidebarItem 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n"
  },
  {
    "path": "packages/sidebar/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-grid\": \"../../grid/index\",\n    \"van-grid-item\": \"../../grid-item/index\",\n    \"van-sidebar\": \"../../sidebar/index\",\n    \"van-sidebar-item\": \"../../sidebar-item/index\",\n    \"van-notify\": \"../../notify/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/sidebar/demo/index.less",
    "content": ".custom-sidebar {\n  margin-left: 16px;\n}\n\n.demo-sidebar {\n  background-color: #fff;\n}\n\n.demo-sidebar-title {\n  margin-bottom: 16px;\n  color: #969799;\n  font-weight: normal;\n  font-size: 14px;\n}\n"
  },
  {
    "path": "packages/sidebar/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Notify from '../../notify/notify';\n\nVantComponent({\n  methods: {\n    onChange(event) {\n      Notify({\n        context: this,\n        type: 'primary',\n        message: `切换至第${event.detail}项`,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/sidebar/demo/index.wxml",
    "content": "<van-grid column-num=\"{{ 2 }}\" border=\"{{ false }}\">\n  <van-grid-item use-slot>\n    <h3 class=\"demo-sidebar-title\">基础用法</h3>\n    <van-sidebar custom-class=\"custom-sidebar\">\n      <van-sidebar-item title=\"标签名\" />\n      <van-sidebar-item title=\"标签名\" />\n      <van-sidebar-item title=\"标签名\" />\n    </van-sidebar>\n  </van-grid-item>\n\n  <van-grid-item use-slot>\n    <h3 class=\"demo-sidebar-title\">徽标提示</h3>\n    <van-sidebar custom-class=\"custom-sidebar\">\n      <van-sidebar-item title=\"标签名\" dot />\n      <van-sidebar-item title=\"标签名\" badge=\"5\" />\n      <van-sidebar-item title=\"标签名\" badge=\"99+\" />\n    </van-sidebar>\n  </van-grid-item>\n\n  <van-grid-item use-slot>\n    <h3 class=\"demo-sidebar-title\">禁用选项</h3>\n    <van-sidebar custom-class=\"custom-sidebar\">\n      <van-sidebar-item title=\"标签名\" />\n      <van-sidebar-item title=\"标签名\" disabled />\n      <van-sidebar-item title=\"标签名\" />\n    </van-sidebar>\n  </van-grid-item>\n\n  <van-grid-item use-slot>\n    <h3 class=\"demo-sidebar-title\">监听切换事件</h3>\n    <van-sidebar custom-class=\"custom-sidebar\" bind:change=\"onChange\">\n      <van-sidebar-item title=\"标签名 1\" />\n      <van-sidebar-item title=\"标签名 2\" />\n      <van-sidebar-item title=\"标签名 3\" />\n    </van-sidebar>\n  </van-grid-item>\n</van-grid>\n\n<van-notify id=\"van-notify\" />\n"
  },
  {
    "path": "packages/sidebar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/sidebar/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-sidebar {\n  width: var(--sidebar-width, @sidebar-width);\n}\n"
  },
  {
    "path": "packages/sidebar/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\n\nVantComponent({\n  relation: useChildren('sidebar-item', function () {\n    this.setActive(this.data.activeKey);\n  }),\n\n  props: {\n    activeKey: {\n      type: Number,\n      value: 0,\n      observer: 'setActive',\n    },\n  },\n\n  beforeCreate() {\n    this.currentActive = -1;\n  },\n\n  methods: {\n    setActive(activeKey: number) {\n      const { children, currentActive } = this;\n\n      if (!children.length) {\n        return Promise.resolve();\n      }\n\n      this.currentActive = activeKey;\n\n      const stack: Promise<unknown>[] = [];\n\n      if (currentActive !== activeKey && children[currentActive]) {\n        stack.push(children[currentActive].setActive(false));\n      }\n\n      if (children[activeKey]) {\n        stack.push(children[activeKey].setActive(true));\n      }\n\n      return Promise.all(stack);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/sidebar/index.wxml",
    "content": "<view class=\"van-sidebar custom-class\">\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/sidebar/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <van-grid>\n    <wx-view\n      class=\"van-grid custom-class \"\n      style=\"padding-left:0px\"\n    >\n      <van-grid-item>\n        <wx-view\n          class=\"custom-class van-grid-item\"\n          style=\"width:50%;padding-right:0px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"content-class van-grid-item__content van-grid-item__content--center \"\n            style=\"\"\n          >\n            <h3\n              class=\"demo-sidebar-title\"\n            >\n              基础用法\n            </h3>\n            <van-sidebar\n              customClass=\"custom-sidebar\"\n            >\n              <wx-view\n                class=\"van-sidebar custom-class\"\n              >\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--selected active-class  custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n              </wx-view>\n            </van-sidebar>\n          </wx-view>\n        </wx-view>\n      </van-grid-item>\n      <van-grid-item>\n        <wx-view\n          class=\"custom-class van-grid-item\"\n          style=\"width:50%;padding-right:0px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"content-class van-grid-item__content van-grid-item__content--center \"\n            style=\"\"\n          >\n            <h3\n              class=\"demo-sidebar-title\"\n            >\n              徽标提示\n            </h3>\n            <van-sidebar\n              customClass=\"custom-sidebar\"\n            >\n              <wx-view\n                class=\"van-sidebar custom-class\"\n              >\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--selected active-class  custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info>\n                        <wx-view\n                          class=\"van-info van-info van-info--dot custom-class\"\n                          style=\"\"\n                        >\n                          \n                        </wx-view>\n                      </van-info>\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info>\n                        <wx-view\n                          class=\"van-info van-info custom-class\"\n                          style=\"\"\n                        >\n                          5\n                        </wx-view>\n                      </van-info>\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info>\n                        <wx-view\n                          class=\"van-info van-info custom-class\"\n                          style=\"\"\n                        >\n                          99+\n                        </wx-view>\n                      </van-info>\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n              </wx-view>\n            </van-sidebar>\n          </wx-view>\n        </wx-view>\n      </van-grid-item>\n      <van-grid-item>\n        <wx-view\n          class=\"custom-class van-grid-item\"\n          style=\"width:50%;padding-right:0px;margin-top:0px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"content-class van-grid-item__content van-grid-item__content--center \"\n            style=\"\"\n          >\n            <h3\n              class=\"demo-sidebar-title\"\n            >\n              禁用选项\n            </h3>\n            <van-sidebar\n              customClass=\"custom-sidebar\"\n            >\n              <wx-view\n                class=\"van-sidebar custom-class\"\n              >\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--selected active-class  custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--disabled  disabled-class custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n              </wx-view>\n            </van-sidebar>\n          </wx-view>\n        </wx-view>\n      </van-grid-item>\n      <van-grid-item>\n        <wx-view\n          class=\"custom-class van-grid-item\"\n          style=\"width:50%;padding-right:0px;margin-top:0px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"content-class van-grid-item__content van-grid-item__content--center \"\n            style=\"\"\n          >\n            <h3\n              class=\"demo-sidebar-title\"\n            >\n              监听切换事件\n            </h3>\n            <van-sidebar\n              customClass=\"custom-sidebar\"\n              bind:change=\"onChange\"\n            >\n              <wx-view\n                class=\"van-sidebar custom-class\"\n              >\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--selected active-class  custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名 1\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名 2\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item>\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <wx-view>\n                        标签名 3\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n              </wx-view>\n            </van-sidebar>\n          </wx-view>\n        </wx-view>\n      </van-grid-item>\n    </wx-view>\n  </van-grid>\n  <van-notify\n    id=\"van-notify\"\n  >\n    <van-transition\n      customClass=\"van-notify__container\"\n      bind:tap=\"onTap\"\n    />\n  </van-notify>\n</main>\n`;\n"
  },
  {
    "path": "packages/sidebar/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/sidebar-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "packages/sidebar-item/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-sidebar-item {\n  display: block;\n  box-sizing: border-box;\n  overflow: hidden;\n  border-left: 3px solid transparent;\n  user-select: none;\n  padding: var(--sidebar-padding, @sidebar-padding);\n  font-size: var(--sidebar-font-size, @sidebar-font-size);\n  line-height: var(--sidebar-line-height, @sidebar-line-height);\n  color: var(--sidebar-text-color, @sidebar-text-color);\n  background-color: var(--sidebar-background-color, @sidebar-background-color);\n\n  &__text {\n    position: relative;\n    display: inline-block;\n    word-break: break-all;\n  }\n\n  &--hover:not(&--disabled) {\n    background-color: var(--sidebar-active-color, @sidebar-active-color);\n  }\n\n  &::after {\n    border-bottom-width: 1px;\n  }\n\n  &--selected {\n    color: var(--sidebar-selected-text-color, @sidebar-selected-text-color);\n    font-weight: var(\n      --sidebar-selected-font-weight,\n      @sidebar-selected-font-weight\n    );\n    border-color: var(\n      --sidebar-selected-border-color,\n      @sidebar-selected-border-color\n    );\n\n    &::after {\n      border-right-width: 1px;\n    }\n  }\n\n  &--selected,\n  &--selected&--hover {\n    background-color: var(\n      --sidebar-selected-background-color,\n      @sidebar-selected-background-color\n    );\n  }\n\n  &--disabled {\n    color: var(--sidebar-disabled-text-color, @sidebar-disabled-text-color);\n  }\n}\n"
  },
  {
    "path": "packages/sidebar-item/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\n\nVantComponent({\n  classes: ['active-class', 'disabled-class'],\n\n  relation: useParent('sidebar'),\n\n  props: {\n    dot: Boolean,\n    badge: null,\n    info: null,\n    title: String,\n    disabled: Boolean,\n  },\n\n  methods: {\n    onClick() {\n      const { parent } = this;\n\n      if (!parent || this.data.disabled) {\n        return;\n      }\n\n      const index = parent.children.indexOf(this);\n\n      parent.setActive(index).then(() => {\n        this.$emit('click', index);\n        parent.$emit('change', index);\n      });\n    },\n\n    setActive(selected: boolean) {\n      return this.setData({ selected });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/sidebar-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class\"\n  hover-class=\"van-sidebar-item--hover\"\n  hover-stay-time=\"70\"\n  bind:tap=\"onClick\"\n>\n  <view class=\"van-sidebar-item__text\">\n    <van-info\n      wx:if=\"{{ badge != null || info !== null || dot }}\"\n      dot=\"{{ dot }}\"\n      info=\"{{ badge != null ? badge : info }}\"\n    />\n    <view wx:if=\"{{ title }}\">{{ title }}</view>\n    <slot wx:else name=\"title\" />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/skeleton/README.md",
    "content": "# Skeleton 骨架屏\n\n### 介绍\n\n用于在内容加载过程中展示一组占位图形。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-skeleton\": \"@vant/weapp/skeleton/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)\n\n## 代码演示\n\n### 基础用法\n\n通过`title`属性显示标题占位图，通过`row`属性配置占位段落行数。\n\n```html\n<van-skeleton title row=\"3\" />\n```\n\n### 显示头像\n\n通过`avatar`属性显示头像占位图。\n\n```html\n<van-skeleton title avatar row=\"3\" />\n```\n\n### 展示子组件\n\n将`loading`属性设置成`false`表示内容加载完成，此时会隐藏占位图，并显示`Skeleton`的子组件。\n\n```html\n<van-skeleton title avatar row=\"3\" loading=\"{{ loading }}\">\n  <view>实际内容</view>\n</van-skeleton>\n```\n\n```js\nPage({\n  data: {\n    loading: true,\n  },\n  onReady() {\n    this.setData({\n      loading: false,\n    });\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| row | 段落占位图行数 | _number_ | `0` |\n| row-width | 段落占位图宽度，可传数组来设置每一行的宽度 | _string \\| string[]_ | `100%` |\n| title | 是否显示标题占位图 | _boolean_ | `false` |\n| title-width | 标题占位图宽度 | _string \\| number_ | `40%` |\n| avatar | 是否显示头像占位图 | _boolean_ | `false` |\n| avatar-size | 头像占位图大小 | _string \\| number_ | `32px` |\n| avatar-shape | 头像占位图形状，可选值为`square` | _string_ | `round` |\n| loading | 是否显示占位图，传`false`时会展示子组件内容 | _boolean_ | `true` |\n| animate | 是否开启动画 | _boolean_ | `true` |\n\n### 外部样式类\n\n| 类名             | 说明               |\n| ---------------- | ------------------ |\n| custom-class     | 根节点样式类       |\n| row-class        | 段落占位样式类       |\n| avatar-class        | 头像占位样式类         |\n| title-class | 标题占位样式类   |\n"
  },
  {
    "path": "packages/skeleton/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-switch\": \"../../switch/index\",\n    \"van-skeleton\": \"../../skeleton/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/skeleton/demo/index.less",
    "content": ".van-switch {\n  margin: 0 16px 8px;\n}\n\n.demo-preview {\n  display: flex;\n  padding: 0 16px;\n}\n\n.demo-content {\n  padding-top: 6px;\n}\n\n.demo-content-h3 {\n  margin: 0;\n  font-size: 18px;\n  line-height: 20px;\n}\n\n.demo-content-p {\n  margin: 13px 0 0;\n  font-size: 14px;\n  line-height: 20px;\n}\n\n.demo-preview-img {\n  flex-shrink: 0;\n  width: 32px;\n  height: 32px;\n  margin-right: 16px;\n}\n"
  },
  {
    "path": "packages/skeleton/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    show: false,\n  },\n\n  methods: {\n    onChange({ detail }) {\n      this.setData({ show: detail });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/skeleton/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-skeleton\n    title\n    row=\"3\"\n    row-width=\"{{ ['100%', '100%', '80%'] }}\"\n  />\n</demo-block>\n\n<demo-block title=\"显示头像\">\n  <van-skeleton\n    title\n    avatar\n    row=\"3\"\n  />\n</demo-block>\n\n<demo-block title=\"展示子组件\">\n  <van-switch\n    checked=\"{{ show }}\"\n    size=\"24px\"\n    bind:change=\"onChange\"\n  />\n  <van-skeleton\n    title\n    avatar\n    row=\"3\"\n    loading=\"{{ !show }}\"\n  >\n    <view class=\"demo-preview\">\n      <image class=\"demo-preview-img\" src=\"https://img.yzcdn.cn/vant/logo.png\" />\n      <view class=\"demo-content\">\n        <view class=\"demo-content-h3\">关于 Vant Weapp</view>\n        <view class=\"domo-content-p\">Vant Weapp 是移动端 Vue 组件库 Vant 的小程序版本，两者基于相同的视觉规范，提供一致的 API 接口，助力开发者快速搭建小程序应用。</view>\n      </view>\n    </view>\n  </van-skeleton>\n</demo-block>\n"
  },
  {
    "path": "packages/skeleton/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "packages/skeleton/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-skeleton {\n  display: flex;\n  box-sizing: border-box;\n  width: 100%;\n  padding: var(--skeleton-padding, @skeleton-padding);\n\n  &__avatar {\n    flex-shrink: 0;\n    margin-right: var(--padding-md, @padding-md);\n    background-color: var(\n      --skeleton-avatar-background-color,\n      @skeleton-avatar-background-color\n    );\n\n    &--round {\n      border-radius: 100%;\n    }\n  }\n\n  &__content {\n    flex: 1;\n  }\n\n  &__avatar + &__content {\n    padding-top: var(--padding-xs, @padding-xs);\n  }\n\n  &__row,\n  &__title {\n    height: var(--skeleton-row-height, @skeleton-row-height);\n    background-color: var(\n      --skeleton-row-background-color,\n      @skeleton-row-background-color\n    );\n  }\n\n  &__title {\n    margin: 0;\n  }\n\n  &__row {\n    &:not(:first-child) {\n      margin-top: var(--skeleton-row-margin-top, @skeleton-row-margin-top);\n    }\n  }\n\n  &__title + &__row {\n    margin-top: 20px;\n  }\n\n  &--animate {\n    animation: van-skeleton-blink @skeleton-animation-duration ease-in-out\n      infinite;\n  }\n}\n\n@keyframes van-skeleton-blink {\n  50% {\n    opacity: 0.6;\n  }\n}\n"
  },
  {
    "path": "packages/skeleton/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  classes: ['avatar-class', 'title-class', 'row-class'],\n  props: {\n    row: {\n      type: Number,\n      value: 0,\n      observer(value: number) {\n        this.setData({ rowArray: Array.from({ length: value }) });\n      },\n    },\n    title: Boolean,\n    avatar: Boolean,\n    loading: {\n      type: Boolean,\n      value: true,\n    },\n    animate: {\n      type: Boolean,\n      value: true,\n    },\n    avatarSize: {\n      type: String,\n      value: '32px',\n    },\n    avatarShape: {\n      type: String,\n      value: 'round',\n    },\n    titleWidth: {\n      type: String,\n      value: '40%',\n    },\n    rowWidth: {\n      type: null,\n      value: '100%',\n      observer(val) {\n        this.setData({ isArray: val instanceof Array });\n      },\n    },\n  },\n\n  data: {\n    isArray: false,\n    rowArray: [],\n  },\n});\n"
  },
  {
    "path": "packages/skeleton/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ loading }}\"\n  class=\"custom-class {{ utils.bem('skeleton', [{animate}]) }}\"\n>\n  <view\n    wx:if=\"{{ avatar }}\"\n    class=\"avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}\"\n    style=\"{{ 'width:' + avatarSize + ';height:' + avatarSize }}\"\n  />\n  <view class=\"{{ utils.bem('skeleton__content')}}\">\n    <view\n      wx:if=\"{{ title }}\"\n      class=\"title-class {{ utils.bem('skeleton__title') }}\"\n      style=\"{{ 'width:' + titleWidth }}\"\n    />\n    <view\n      wx:for=\"{{ rowArray }}\"\n      wx:key=\"index\"\n      wx:for-index=\"index\"\n      class=\"row-class {{ utils.bem('skeleton__row') }}\"\n      style=\"{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}\"\n    />\n  </view>\n</view>\n<view wx:else class=\"{{ utils.bem('skeleton__content')}}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/skeleton/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-skeleton>\n        <wx-view\n          class=\"custom-class van-skeleton van-skeleton--animate\"\n        >\n          <wx-view\n            class=\"van-skeleton__content\"\n          >\n            <wx-view\n              class=\"title-class van-skeleton__title\"\n              style=\"width:40%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:100%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:100%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:80%\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-skeleton>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        显示头像\n      </wx-view>\n      <van-skeleton>\n        <wx-view\n          class=\"custom-class van-skeleton van-skeleton--animate\"\n        >\n          <wx-view\n            class=\"avatar-class van-skeleton__avatar van-skeleton__avatar--round\"\n            style=\"width:32px;height:32px\"\n          />\n          <wx-view\n            class=\"van-skeleton__content\"\n          >\n            <wx-view\n              class=\"title-class van-skeleton__title\"\n              style=\"width:40%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:100%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:100%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:100%\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-skeleton>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        展示子组件\n      </wx-view>\n      <van-switch\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-switch custom-class\"\n          style=\"font-size:24px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-switch__node node-class\"\n          />\n        </wx-view>\n      </van-switch>\n      <van-skeleton>\n        <wx-view\n          class=\"custom-class van-skeleton van-skeleton--animate\"\n        >\n          <wx-view\n            class=\"avatar-class van-skeleton__avatar van-skeleton__avatar--round\"\n            style=\"width:32px;height:32px\"\n          />\n          <wx-view\n            class=\"van-skeleton__content\"\n          >\n            <wx-view\n              class=\"title-class van-skeleton__title\"\n              style=\"width:40%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:100%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:100%\"\n            />\n            <wx-view\n              class=\"row-class van-skeleton__row\"\n              style=\"width:100%\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-skeleton>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/skeleton/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/slider/README.md",
    "content": "# Slider 滑块\n\n### 介绍\n\n滑动输入条，用于在给定的范围内选择一个值。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-slider\": \"@vant/weapp/slider/index\"\n}\n```\n\n## 代码演示\n\n### 基本用法\n\n```html\n<van-slider value=\"50\" bind:change=\"onChange\" />\n```\n\n```js\nPage({\n  onChange(event) {\n    wx.showToast({\n      icon: 'none',\n      title: `当前值：${event.detail}`,\n    });\n  },\n});\n```\n\n### 双滑块\n\n添加 `range` 属性就可以开启双滑块模式，确保 `value` 的值是一个数组。\n\n```html\n<van-slider value=\"{{ [10, 50] }}\" range @change=\"onChange\" />\n```\n\n```js\nPage({\n  onChange(event) {\n    wx.showToast({\n      icon: 'none',\n      title: `当前值：${event.detail}`,\n    });\n  },\n});\n```\n\n### 指定选择范围\n\n```html\n<van-slider min=\"-50\" max=\"50\" />\n```\n\n### 禁用\n\n```html\n<van-slider value=\"50\" disabled />\n```\n\n### 指定步长\n\n```html\n<van-slider value=\"50\" step=\"10\" />\n```\n\n### 自定义样式\n\n```html\n<van-slider value=\"50\" bar-height=\"4px\" active-color=\"#ee0a24\" />\n```\n\n### 自定义按钮\n\n```html\n<van-slider value=\"{{ currentValue }}\" use-button-slot bind:drag=\"onDrag\">\n  <view class=\"custom-button\" slot=\"button\">{{ currentValue }}/100</view>\n</van-slider>\n```\n\n```js\nPage({\n  data: {\n    currentValue: 50,\n  },\n\n  onDrag(event) {\n    this.setData({\n      currentValue: event.detail.value,\n    });\n  },\n});\n```\n\n### 垂直方向\n\n设置 `vertical` 属性后，滑块会垂直展示，且高度为 100% 父元素高度。\n\n```html\n<view style=\"height: 150px;\">\n  <van-slider value=\"50\" vertical bind:change=\"onChange\" />\n  <van-slider\n    value=\"{{ [10, 50] }}\"\n    range\n    vertical\n    style=\"margin-left: 100px;\"\n    bind:change=\"onChange\"\n  />\n</view>\n```\n\n```js\nPage({\n  onChange(event) {\n    wx.showToast({\n      icon: 'none',\n      title: `当前值：${event.detail}`,\n    });\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| value | 当前进度百分比，在双滑块模式下为数组格式 | _number \\| number[]_ | `0` |\n| disabled | 是否禁用滑块 | _boolean_ | `false` |\n| max | 最大值 | _number_ | `100` |\n| min | 最小值 | _number_ | `0` |\n| step | 步长 | _number_ | `1` |\n| bar-height | 进度条高度，默认单位为 `px` | _string \\| number_ | `2px` |\n| active-color | 进度条激活态颜色 | _string_ | `#1989fa` |\n| inactive-color | 进度条默认颜色 | _string_ | `#e5e5e5` |\n| use-button-slot | 是否使用按钮插槽 | _boolean_ | `false` |\n| range `v1.8.4` | 是否开启双滑块模式 | _boolean_ | `false` |\n| vertical `v1.8.5` | 是否垂直展示 | _boolean_ | `false` |\n\n### Events\n\n| 事件名          | 说明             | 参数                         |\n| --------------- | ---------------- | ---------------------------- |\n| bind:drag       | 拖动进度条时触发 | event.detail.value: 当前进度 |\n| bind:change     | 进度值改变后触发 | event.detail: 当前进度       |\n| bind:drag-start | 开始拖动时触发   | -                            |\n| bind:drag-end   | 结束拖动时触发   | -                            |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n\n### Slots\n\n| 名称 | 说明 | 参数 |\n| --- | --- | --- |\n| button | 自定义滑块按钮 | _{ value: number }_ |\n| left-button `v1.8.4` | 自定义左侧滑块按钮（双滑块模式下） | _{ value: number }_ |\n| right-button `v1.8.4` | 自定义右侧滑块按钮 （双滑块模式下） | _{ value: number }_ |\n"
  },
  {
    "path": "packages/slider/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-slider\": \"../../slider/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/slider/demo/index.less",
    "content": ".slider {\n  margin: 0 15px 30px;\n}\n\n.custom-button {\n  width: 26px;\n  color: #fff;\n  font-size: 10px;\n  line-height: 18px;\n  text-align: center;\n  border-radius: 100px;\n  background-color: #ee0a24;\n}\n"
  },
  {
    "path": "packages/slider/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    currentValue: 50,\n  },\n\n  methods: {\n    onChange(event) {\n      wx.showToast({\n        icon: 'none',\n        title: `当前值：${event.detail}`,\n      });\n    },\n\n    onDrag(event) {\n      this.setData({\n        currentValue: event.detail.value,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/slider/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-slider\n    value=\"50\"\n    custom-class=\"slider\"\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"双滑块\">\n  <van-slider\n    range\n    value=\"{{ [20, 60 ] }}\"\n    custom-class=\"slider\"\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"指定选择范围\">\n  <van-slider\n    custom-class=\"slider\"\n    min=\"-50\"\n    max=\"50\"\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"禁用\">\n  <van-slider\n    custom-class=\"slider\"\n    value=\"50\"\n    disabled\n  />\n</demo-block>\n\n<demo-block title=\"指定步长\">\n  <van-slider\n    custom-class=\"slider\"\n    value=\"50\"\n    step=\"10\"\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义样式\">\n  <van-slider\n    value=\"50\"\n    custom-class=\"slider\"\n    bar-height=\"4px\"\n    active-color=\"#ee0a24\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义按钮\">\n  <van-slider\n    value=\"{{ currentValue }}\"\n    custom-class=\"slider\"\n    use-button-slot\n    active-color=\"#ee0a24\"\n    bind:drag=\"onDrag\"\n  >\n    <view class=\"custom-button\" slot=\"button\">\n      {{ currentValue }}\n    </view>\n  </van-slider>\n</demo-block>\n\n<demo-block title=\"垂直方向\">\n  <view style=\"height: 150px; padding-left: 30px;\">\n    <van-slider\n      value=\"{{ 50 }}\"\n      vertical\n      custom-class=\"slider\"\n      bind:change=\"onChange\"\n    />\n    <van-slider\n      value=\"{{ [20, 60 ] }}\"\n      vertical\n      range\n      custom-class=\"slider\"\n      bind:change=\"onChange\"\n    />\n  </view>\n</demo-block>\n"
  },
  {
    "path": "packages/slider/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/slider/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-slider {\n  position: relative;\n  height: var(--slider-bar-height, @slider-bar-height);\n  border-radius: @border-radius-max;\n  background-color: var(\n    --slider-inactive-background-color,\n    @slider-inactive-background-color\n  );\n\n  // use pseudo element to expand click area\n  &::before {\n    position: absolute;\n    right: 0;\n    left: 0;\n    content: '';\n    top: calc(-1 * var(--padding-xs, @padding-xs));\n    bottom: calc(-1 * var(--padding-xs, @padding-xs));\n  }\n\n  &__bar {\n    position: relative;\n    width: 100%;\n    height: 100%;\n    background-color: var(\n      --slider-active-background-color,\n      @slider-active-background-color\n    );\n    border-radius: inherit;\n    transition: all @animation-duration-fast;\n  }\n\n  &__button {\n    width: var(--slider-button-width, @slider-button-width);\n    height: var(--slider-button-height, @slider-button-height);\n    border-radius: var(\n      --slider-button-border-radius,\n      @slider-button-border-radius\n    );\n    box-shadow: var(--slider-button-box-shadow, @slider-button-box-shadow);\n    background-color: var(\n      --slider-button-background-color,\n      @slider-button-background-color\n    );\n\n    &-wrapper,\n    &-wrapper-right {\n      position: absolute;\n      top: 50%;\n      right: 0;\n      transform: translate3d(50%, -50%, 0);\n    }\n\n    &-wrapper-left {\n      position: absolute;\n      top: 50%;\n      left: 0;\n      transform: translate3d(-50%, -50%, 0);\n    }\n  }\n\n  &--disabled {\n    opacity: var(--slider-disabled-opacity, @slider-disabled-opacity);\n  }\n\n  &--vertical {\n    display: inline-block;\n    width: var(--slider-bar-height, @slider-bar-height);\n    height: 100%;\n\n    .van-slider__button-wrapper,\n    .van-slider__button-wrapper-right {\n      top: auto;\n      right: 50%;\n      bottom: 0;\n      transform: translate3d(50%, 50%, 0);\n    }\n\n    .van-slider__button-wrapper-left {\n      top: 0;\n      right: 50%;\n      left: auto;\n      transform: translate3d(50%, -50%, 0);\n    }\n\n    // use pseudo element to expand click area\n    &::before {\n      top: 0;\n      right: -@padding-xs;\n      bottom: 0;\n      left: -@padding-xs;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/slider/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { touch } from '../mixins/touch';\nimport { canIUseModel } from '../common/version';\nimport { getRect, addUnit, nextTick, addNumber, clamp } from '../common/utils';\n\ntype SliderValue = number | [number, number];\n\nconst DRAG_STATUS = {\n  START: 'start',\n  MOVING: 'moving',\n  END: 'end',\n};\n\nVantComponent({\n  mixins: [touch],\n\n  props: {\n    range: Boolean,\n    disabled: Boolean,\n    useButtonSlot: Boolean,\n    activeColor: String,\n    inactiveColor: String,\n    max: {\n      type: Number,\n      value: 100,\n    },\n    min: {\n      type: Number,\n      value: 0,\n    },\n    step: {\n      type: Number,\n      value: 1,\n    },\n    value: {\n      type: null,\n      value: 0,\n      observer(val) {\n        if (val !== this.value) {\n          this.updateValue(val);\n        }\n      },\n    },\n    vertical: Boolean,\n    barHeight: null,\n  },\n\n  created() {\n    this.updateValue(this.data.value);\n  },\n\n  methods: {\n    onTouchStart(event: WechatMiniprogram.TouchEvent) {\n      if (this.data.disabled) return;\n\n      const { index } = event.currentTarget.dataset;\n      if (typeof index === 'number') {\n        this.buttonIndex = index;\n      }\n\n      this.touchStart(event);\n      this.startValue = this.format(this.value);\n      this.newValue = this.value;\n\n      if (this.isRange(this.newValue)) {\n        this.startValue = this.newValue.map((val) => this.format(val)) as [\n          number,\n          number\n        ];\n      } else {\n        this.startValue = this.format(this.newValue);\n      }\n\n      this.dragStatus = DRAG_STATUS.START;\n    },\n\n    onTouchMove(event: WechatMiniprogram.TouchEvent) {\n      if (this.data.disabled) return;\n\n      if (this.dragStatus === DRAG_STATUS.START) {\n        this.$emit('drag-start');\n      }\n\n      this.touchMove(event);\n      this.dragStatus = DRAG_STATUS.MOVING;\n\n      getRect(this, '.van-slider').then((rect) => {\n        const { vertical } = this.data;\n        const delta = vertical ? this.deltaY : this.deltaX;\n        const total = vertical ? rect.height : rect.width;\n        const diff = (delta / total) * this.getRange();\n\n        if (this.isRange(this.startValue)) {\n          (this.newValue as [number, number])[this.buttonIndex] =\n            this.startValue[this.buttonIndex] + diff;\n        } else {\n          this.newValue = this.startValue + diff;\n        }\n\n        this.updateValue(this.newValue, false, true);\n      });\n    },\n\n    onTouchEnd() {\n      if (this.data.disabled) return;\n\n      if (this.dragStatus === DRAG_STATUS.MOVING) {\n        this.dragStatus = DRAG_STATUS.END;\n\n        nextTick(() => {\n          this.updateValue(this.newValue, true);\n          this.$emit('drag-end');\n        });\n      }\n    },\n\n    onClick(event: WechatMiniprogram.TouchEvent) {\n      if (this.data.disabled) return;\n\n      const { min } = this.data;\n\n      getRect(this, '.van-slider').then((rect) => {\n        const { vertical } = this.data;\n        const touch = event.touches[0];\n        const delta = vertical\n          ? touch.clientY - rect.top\n          : touch.clientX - rect.left;\n        const total = vertical ? rect.height : rect.width;\n        const value = Number(min) + (delta / total) * this.getRange();\n\n        if (this.isRange(this.value)) {\n          const [left, right] = this.value;\n          const middle = (left + right) / 2;\n\n          if (value <= middle) {\n            this.updateValue([value, right], true);\n          } else {\n            this.updateValue([left, value], true);\n          }\n        } else {\n          this.updateValue(value, true);\n        }\n      });\n    },\n\n    isRange(val: unknown): val is [number, number] {\n      const { range } = this.data;\n      return range && Array.isArray(val);\n    },\n\n    handleOverlap(value: [number, number]) {\n      if (value[0] > value[1]) {\n        return value.slice(0).reverse();\n      }\n      return value;\n    },\n\n    updateValue(value: SliderValue, end?: boolean, drag?: boolean) {\n      if (this.isRange(value)) {\n        value = this.handleOverlap(value).map((val) => this.format(val)) as [\n          number,\n          number\n        ];\n      } else {\n        value = this.format(value);\n      }\n\n      this.value = value;\n\n      const { vertical } = this.data;\n      const mainAxis = vertical ? 'height' : 'width';\n\n      this.setData({\n        wrapperStyle: `\n          background: ${this.data.inactiveColor || ''};\n          ${vertical ? 'width' : 'height'}: ${\n          addUnit(this.data.barHeight) || ''\n        };\n        `,\n        barStyle: `\n          ${mainAxis}: ${this.calcMainAxis()};\n          left: ${vertical ? 0 : this.calcOffset()};\n          top: ${vertical ? this.calcOffset() : 0};\n          ${drag ? 'transition: none;' : ''}\n        `,\n      });\n\n      if (drag) {\n        this.$emit('drag', { value });\n      }\n\n      if (end) {\n        this.$emit('change', value);\n      }\n\n      if ((drag || end) && canIUseModel()) {\n        this.setData({ value });\n      }\n    },\n\n    getScope() {\n      return Number(this.data.max) - Number(this.data.min);\n    },\n\n    getRange() {\n      const { max, min } = this.data;\n      return max - min;\n    },\n\n    getOffsetWidth(current: number, min: number) {\n      const scope = this.getScope();\n\n      // 避免最小值小于最小step时出现负数情况\n      return `${Math.max(((current - min) * 100) / scope, 0)}%`;\n    },\n\n    // 计算选中条的长度百分比\n    calcMainAxis() {\n      const { value } = this;\n      const { min } = this.data;\n\n      if (this.isRange(value)) {\n        return this.getOffsetWidth(value[1], value[0]);\n      }\n\n      return this.getOffsetWidth(value, Number(min));\n    },\n\n    // 计算选中条的开始位置的偏移量\n    calcOffset() {\n      const { value } = this;\n      const { min } = this.data;\n      const scope = this.getScope();\n      if (this.isRange(value)) {\n        return `${((value[0] - Number(min)) * 100) / scope}%`;\n      }\n      return '0%';\n    },\n\n    format(value: number) {\n      const min = +this.data.min;\n      const max = +this.data.max;\n      const step = +this.data.step;\n\n      value = clamp(value, min, max);\n      const diff = Math.round((value - min) / step) * step;\n      return addNumber(min, diff);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/slider/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"../wxs/style.wxs\" module=\"style\" />\n\n<view\n  class=\"custom-class {{ utils.bem('slider', { disabled, vertical }) }}\"\n  style=\"{{ wrapperStyle }}\"\n  bind:tap=\"onClick\"\n>\n  <view\n    class=\"{{ utils.bem('slider__bar') }}\"\n    style=\"{{ barStyle }}; {{ style({ backgroundColor: activeColor }) }}\"\n  >\n    <view\n      wx:if=\"{{ range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper-left') }}\"\n      data-index=\"{{ 0 }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"left-button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n    <view\n      wx:if=\"{{ range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper-right') }}\"\n      data-index=\"{{ 1 }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"right-button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n\n    <view\n      wx:if=\"{{ !range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper') }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/slider/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction barStyle(barHeight, activeColor) {\n  return style({\n    height: addUnit(barHeight),\n    background: activeColor,\n  });\n}\n\nmodule.exports = {\n  barStyle: barStyle,\n};\n"
  },
  {
    "path": "packages/slider/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-slider\n        customClass=\"slider\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-slider\"\n          style=\"\n          background: ;\n          height: ;\n        \"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-slider__bar\"\n            style=\"\n          width: 50%;\n          left: 0%;\n          top: 0;\n          \n        ; \"\n          >\n            <wx-view\n              class=\"van-slider__button-wrapper\"\n              bind:touchcancel=\"onTouchEnd\"\n              bind:touchend=\"onTouchEnd\"\n              catch:touchmove=\"onTouchMove\"\n              bind:touchstart=\"onTouchStart\"\n            >\n              <wx-view\n                class=\"van-slider__button\"\n              />\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-slider>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        双滑块\n      </wx-view>\n      <van-slider\n        customClass=\"slider\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-slider\"\n          style=\"\n          background: ;\n          height: ;\n        \"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-slider__bar\"\n            style=\"\n          width: 40%;\n          left: 20%;\n          top: 0;\n          \n        ; \"\n          >\n            <wx-view\n              class=\"van-slider__button-wrapper-left\"\n              data-index=\"{{0}}\"\n              bind:touchcancel=\"onTouchEnd\"\n              bind:touchend=\"onTouchEnd\"\n              catch:touchmove=\"onTouchMove\"\n              bind:touchstart=\"onTouchStart\"\n            >\n              <wx-view\n                class=\"van-slider__button\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-slider__button-wrapper-right\"\n              data-index=\"{{1}}\"\n              bind:touchcancel=\"onTouchEnd\"\n              bind:touchend=\"onTouchEnd\"\n              catch:touchmove=\"onTouchMove\"\n              bind:touchstart=\"onTouchStart\"\n            >\n              <wx-view\n                class=\"van-slider__button\"\n              />\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-slider>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        指定选择范围\n      </wx-view>\n      <van-slider\n        customClass=\"slider\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-slider\"\n          style=\"\n          background: ;\n          height: ;\n        \"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-slider__bar\"\n            style=\"\n          width: 50%;\n          left: 0%;\n          top: 0;\n          \n        ; \"\n          >\n            <wx-view\n              class=\"van-slider__button-wrapper\"\n              bind:touchcancel=\"onTouchEnd\"\n              bind:touchend=\"onTouchEnd\"\n              catch:touchmove=\"onTouchMove\"\n              bind:touchstart=\"onTouchStart\"\n            >\n              <wx-view\n                class=\"van-slider__button\"\n              />\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-slider>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用\n      </wx-view>\n      <van-slider\n        customClass=\"slider\"\n      >\n        <wx-view\n          class=\"custom-class van-slider van-slider--disabled\"\n          style=\"\n          background: ;\n          height: ;\n        \"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-slider__bar\"\n            style=\"\n          width: 50%;\n          left: 0%;\n          top: 0;\n          \n        ; \"\n          >\n            <wx-view\n              class=\"van-slider__button-wrapper\"\n              bind:touchcancel=\"onTouchEnd\"\n              bind:touchend=\"onTouchEnd\"\n              catch:touchmove=\"onTouchMove\"\n              bind:touchstart=\"onTouchStart\"\n            >\n              <wx-view\n                class=\"van-slider__button\"\n              />\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-slider>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        指定步长\n      </wx-view>\n      <van-slider\n        customClass=\"slider\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-slider\"\n          style=\"\n          background: ;\n          height: ;\n        \"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-slider__bar\"\n            style=\"\n          width: 50%;\n          left: 0%;\n          top: 0;\n          \n        ; \"\n          >\n            <wx-view\n              class=\"van-slider__button-wrapper\"\n              bind:touchcancel=\"onTouchEnd\"\n              bind:touchend=\"onTouchEnd\"\n              catch:touchmove=\"onTouchMove\"\n              bind:touchstart=\"onTouchStart\"\n            >\n              <wx-view\n                class=\"van-slider__button\"\n              />\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-slider>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义样式\n      </wx-view>\n      <van-slider\n        customClass=\"slider\"\n      >\n        <wx-view\n          class=\"custom-class van-slider\"\n          style=\"\n          background: ;\n          height: 4px;\n        \"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-slider__bar\"\n            style=\"\n          width: 50%;\n          left: 0%;\n          top: 0;\n          \n        ; background-color:#ee0a24\"\n          >\n            <wx-view\n              class=\"van-slider__button-wrapper\"\n              bind:touchcancel=\"onTouchEnd\"\n              bind:touchend=\"onTouchEnd\"\n              catch:touchmove=\"onTouchMove\"\n              bind:touchstart=\"onTouchStart\"\n            >\n              <wx-view\n                class=\"van-slider__button\"\n              />\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-slider>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义按钮\n      </wx-view>\n      <van-slider\n        customClass=\"slider\"\n        bind:drag=\"onDrag\"\n      >\n        <wx-view\n          class=\"custom-class van-slider\"\n          style=\"\n          background: ;\n          height: ;\n        \"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-slider__bar\"\n            style=\"\n          width: 50%;\n          left: 0%;\n          top: 0;\n          \n        ; background-color:#ee0a24\"\n          >\n            <wx-view\n              class=\"van-slider__button-wrapper\"\n              bind:touchcancel=\"onTouchEnd\"\n              bind:touchend=\"onTouchEnd\"\n              catch:touchmove=\"onTouchMove\"\n              bind:touchstart=\"onTouchStart\"\n            >\n              <wx-view\n                class=\"custom-button\"\n                slot=\"button\"\n              >\n                \n      50\n    \n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-slider>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        垂直方向\n      </wx-view>\n      <wx-view\n        style=\"height: 150px; padding-left: 30px;\"\n      >\n        <van-slider\n          customClass=\"slider\"\n          bind:change=\"onChange\"\n        >\n          <wx-view\n            class=\"custom-class van-slider van-slider--vertical\"\n            style=\"\n          background: ;\n          width: ;\n        \"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-slider__bar\"\n              style=\"\n          height: 50%;\n          left: 0;\n          top: 0%;\n          \n        ; \"\n            >\n              <wx-view\n                class=\"van-slider__button-wrapper\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  class=\"van-slider__button\"\n                />\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </van-slider>\n        <van-slider\n          customClass=\"slider\"\n          bind:change=\"onChange\"\n        >\n          <wx-view\n            class=\"custom-class van-slider van-slider--vertical\"\n            style=\"\n          background: ;\n          width: ;\n        \"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-slider__bar\"\n              style=\"\n          height: 40%;\n          left: 0;\n          top: 20%;\n          \n        ; \"\n            >\n              <wx-view\n                class=\"van-slider__button-wrapper-left\"\n                data-index=\"{{0}}\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  class=\"van-slider__button\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-slider__button-wrapper-right\"\n                data-index=\"{{1}}\"\n                bind:touchcancel=\"onTouchEnd\"\n                bind:touchend=\"onTouchEnd\"\n                catch:touchmove=\"onTouchMove\"\n                bind:touchstart=\"onTouchStart\"\n              >\n                <wx-view\n                  class=\"van-slider__button\"\n                />\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </van-slider>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/slider/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/stepper/README.md",
    "content": "# Stepper 步进器\n\n### 介绍\n\n步进器由增加按钮、减少按钮和输入框组成，用于在一定范围内输入、调整数字。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-stepper\": \"@vant/weapp/stepper/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n通过`value`设置输入值，可以通过`change`事件监听到输入值的变化。\n\n```html\n<van-stepper value=\"{{ 1 }}\" bind:change=\"onChange\" />\n```\n\n```js\nPage({\n  onChange(event) {\n    console.log(event.detail);\n  },\n});\n```\n\n### 步长设置\n\n通过`step`属性设置每次点击增加或减少按钮时变化的值，默认为`1`。\n\n```html\n<van-stepper value=\"{{ 1 }}\" step=\"2\" />\n```\n\n### 限制输入范围\n\n通过`min`和`max`属性限制输入值的范围。\n\n```html\n<van-stepper value=\"{{ 5 }}\" min=\"5\" max=\"8\" />\n```\n\n### 限制输入整数\n\n设置`integer`属性后，输入框将限制只能输入整数。\n\n```html\n<van-stepper value=\"{{ 1 }}\" integer />\n```\n\n### 禁用状态\n\n通过设置`disabled`属性来禁用步进器，禁用状态下无法点击按钮或修改输入框。\n\n```html\n<van-stepper value=\"{{ 1 }}\" disabled />\n```\n\n### 关闭长按\n\n通过设置`long-press`属性决定步进器是否开启长按手势。\n\n```html\n<van-stepper value=\"{{ 1 }}\" long-press=\"{{ false }}\" />\n```\n\n### 固定小数位数\n\n通过设置`decimal-length`属性可以保留固定的小数位数。\n\n```html\n<van-stepper value=\"{{ 1 }}\" step=\"0.2\" decimal-length=\"{{ 1 }}\" />\n```\n\n### 异步变更\n\n如果需要异步地修改输入框的值，可以设置`async-change`属性，并在`change`事件中手动修改`value`。\n\n```html\n<van-stepper value=\"{{ value }}\" async-change bind:change=\"onChange\" />\n```\n\n```js\nPage({\n  data: {\n    value: 1,\n  },\n\n  onChange(event) {\n    Toast.loading({ forbidClick: true });\n\n    setTimeout(() => {\n      Toast.clear();\n      this.setData({ value: event.detail });\n    }, 500);\n  },\n});\n```\n\n### 自定义大小\n\n通过`input-width`属性设置输入框宽度，通过`button-size`属性设置按钮大小和输入框高度。\n\n```html\n<van-stepper value=\"{{ 1 }}\" input-width=\"40px\" button-size=\"32px\" />\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 在表单内提交时的标识符 | _string_ | - |\n| value | 输入值 | _string \\| number_ | 最小值 |\n| min | 最小值 | _string \\| number_ | `1` |\n| max | 最大值 | _string \\| number_ | - |\n| step | 步长 | _string \\| number_ | `1` |\n| integer | 是否只允许输入整数 | _boolean_ | `false` |\n| disabled | 是否禁用 | _boolean_ | `false` |\n| disable-input | 是否禁用输入框 | _boolean_ | `false` |\n| async-change | 是否开启异步变更，开启后需要手动控制输入值 | _boolean_ | `false` |\n| input-width | 输入框宽度，默认单位为 `px` | _string \\| number_ | `32px` |\n| button-size | 按钮大小，默认单位为 `px`，输入框高度会和按钮大小保持一致 | _string \\| number_ | `28px` |\n| show-plus | 是否显示增加按钮 | _boolean_ | `true` |\n| show-minus | 是否显示减少按钮 | _boolean_ | `true` |\n| decimal-length | 固定显示的小数位数 | _number_ | - |\n| theme | 样式风格，可选值为 `round` | _string_ | - |\n| disable-plus | 是否禁用增加按钮 | _boolean_ | - |\n| disable-minus | 是否禁用减少按钮 | _boolean_ | - |\n| long-press | 是否开启长按手势 | _boolean_ | `true` |\n| always-embed `v1.9.3` | 强制 input 处于同层状态，默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) | _boolean_ | `false` |\n\n### Events\n\n| 事件名         | 说明                     | 回调参数                   |\n| -------------- | ------------------------ | -------------------------- |\n| bind:change    | 当绑定值变化时触发的事件 | event.detail: 当前输入的值 |\n| bind:overlimit | 点击不可用的按钮时触发   | -                          |\n| bind:plus      | 点击增加按钮时触发       | -                          |\n| bind:minus     | 点击减少按钮时触发       | -                          |\n| bind:focus     | 输入框聚焦时触发         | -                          |\n| bind:blur      | 输入框失焦时触发         | -                          |\n\n### Slot\n\n| 名称  | 说明     |\n| ----- | -------- |\n| plus  | 加号按钮 |\n| minus | 减号按钮 |\n\n### 外部样式类\n\n| 类名         | 说明           |\n| ------------ | -------------- |\n| custom-class | 根节点样式类   |\n| input-class  | 输入框样式类   |\n| plus-class   | 加号按钮样式类 |\n| minus-class  | 减号按钮样式类 |\n"
  },
  {
    "path": "packages/stepper/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-toast\": \"../../toast/index\",\n    \"van-stepper\": \"../../stepper/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/stepper/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  data: {\n    value: 1,\n  },\n\n  methods: {\n    onChange(event) {\n      Toast.loading({\n        context: this,\n        forbidClick: true,\n      });\n\n      setTimeout(() => {\n        Toast.clear();\n        this.setData({ value: event.detail });\n      }, 500);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/stepper/demo/index.wxml",
    "content": "<van-cell center title=\"基础用法\">\n  <van-stepper value=\"{{ 1 }}\" />\n</van-cell>\n\n<van-cell center title=\"步长设置\">\n  <van-stepper value=\"{{ 1 }}\" step=\"2\" />\n</van-cell>\n\n<van-cell center title=\"限制输入范围\">\n  <van-stepper value=\"{{ 1 }}\" min=\"5\" max=\"8\" />\n</van-cell>\n\n<van-cell center title=\"限制输入整数\">\n  <van-stepper value=\"{{ 1 }}\" integer />\n</van-cell>\n\n<van-cell center title=\"禁用状态\">\n  <van-stepper value=\"{{ 1 }}\" disabled />\n</van-cell>\n\n<van-cell center title=\"禁用长按\">\n  <van-stepper value=\"{{ 1 }}\" long-press=\"{{ false }}\" />\n</van-cell>\n\n<van-cell center title=\"固定小数位数\">\n  <van-stepper value=\"{{ 1 }}\" step=\"0.2\" decimal-length=\"{{ 1 }}\" />\n</van-cell>\n\n<van-cell center title=\"异步变更\">\n  <van-stepper\n    value=\"{{ value }}\"\n    async-change\n    bind:change=\"onChange\"\n  />\n</van-cell>\n\n<van-cell center title=\"自定义大小\">\n  <van-stepper value=\"{{ 1 }}\" input-width=\"40px\" button-size=\"32px\" />\n</van-cell>\n\n<van-cell center title=\"圆角风格\">\n  <van-stepper value=\"{{ 1 }}\" theme=\"round\" button-size=\"22px\" />\n</van-cell>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/stepper/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/stepper/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-stepper {\n  font-size: 0;\n\n  &__minus,\n  &__plus {\n    position: relative;\n    display: inline-block;\n    box-sizing: border-box;\n    margin: 1px;\n    vertical-align: middle;\n    border: 0;\n    background-color: var(\n      --stepper-background-color,\n      @stepper-background-color\n    );\n    color: var(--stepper-button-icon-color, @stepper-button-icon-color);\n    width: var(--stepper-input-height, @stepper-input-height);\n    height: var(--stepper-input-height, @stepper-input-height);\n    padding: var(--padding-base, @padding-base);\n\n    &::before {\n      width: 9px;\n      height: 1px;\n    }\n\n    &::after {\n      width: 1px;\n      height: 9px;\n    }\n\n    &:empty&::before,\n    &:empty&::after {\n      position: absolute;\n      top: 0;\n      right: 0;\n      bottom: 0;\n      left: 0;\n      margin: auto;\n      background-color: currentColor;\n      content: '';\n    }\n\n    &--hover {\n      background-color: var(--stepper-active-color, @stepper-active-color);\n    }\n\n    &--disabled {\n      color: var(\n        --stepper-button-disabled-icon-color,\n        @stepper-button-disabled-icon-color\n      );\n      background-color: var(\n        --stepper-button-disabled-color,\n        @stepper-button-disabled-color\n      );\n    }\n\n    &--disabled&--hover {\n      background-color: var(\n        --stepper-button-disabled-color,\n        @stepper-button-disabled-color\n      );\n    }\n  }\n\n  &__minus {\n    border-radius: var(\n        --stepper-border-radius,\n        var(--stepper-border-radius, @stepper-border-radius)\n      )\n      0 0\n      var(\n        --stepper-border-radius,\n        var(--stepper-border-radius, @stepper-border-radius)\n      );\n\n    &::after {\n      display: none;\n    }\n  }\n\n  &__plus {\n    border-radius: 0\n      var(\n        --stepper-border-radius,\n        var(--stepper-border-radius, @stepper-border-radius)\n      )\n      var(\n        --stepper-border-radius,\n        var(--stepper-border-radius, @stepper-border-radius)\n      )\n      0;\n  }\n\n  &--round {\n    .van-stepper__input {\n      background-color: transparent !important;\n    }\n\n    .van-stepper__plus,\n    .van-stepper__minus {\n      border-radius: 100%;\n\n      &:active {\n        opacity: @active-opacity;\n      }\n\n      &--disabled {\n        &,\n        &:active {\n          opacity: 0.3;\n        }\n      }\n    }\n\n    .van-stepper__plus {\n      color: @white;\n      background-color: @stepper-button-round-theme-color;\n    }\n\n    .van-stepper__minus {\n      color: @stepper-button-round-theme-color;\n      background-color: @white;\n      border: 1px solid @stepper-button-round-theme-color;\n    }\n  }\n\n  &__input {\n    display: inline-block;\n    box-sizing: border-box;\n    // 覆盖 common style 中 input 的 min-height: 1.4rem;\n    // 避免 button-size 对 input 设置的 height 不生效\n    min-height: 0;\n    margin: 1px;\n    padding: 1px;\n    text-align: center;\n    vertical-align: middle;\n    border: 0;\n    border-width: 1px 0;\n    border-radius: 0;\n    -webkit-appearance: none;\n    font-size: var(--stepper-input-font-size, @stepper-input-font-size);\n    color: var(--stepper-input-text-color, @stepper-input-text-color);\n    background-color: var(\n      --stepper-background-color,\n      @stepper-background-color\n    );\n    width: var(--stepper-input-width, @stepper-input-width);\n    height: var(--stepper-input-height, @stepper-input-height);\n\n    &--disabled {\n      color: var(\n        --stepper-input-disabled-text-color,\n        @stepper-input-disabled-text-color\n      );\n      background-color: var(\n        --stepper-input-disabled-background-color,\n        @stepper-input-disabled-background-color\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "packages/stepper/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { isDef } from '../common/validator';\n\nconst LONG_PRESS_START_TIME = 600;\nconst LONG_PRESS_INTERVAL = 200;\n\n// add num and avoid float number\nfunction add(num1: number, num2: number) {\n  const cardinal = 10 ** 10;\n  return Math.round((num1 + num2) * cardinal) / cardinal;\n}\n\nfunction equal(value1: number | string, value2: number | string) {\n  return String(value1) === String(value2);\n}\n\nVantComponent({\n  field: true,\n\n  classes: ['input-class', 'plus-class', 'minus-class'],\n\n  props: {\n    value: {\n      type: null,\n    },\n    integer: {\n      type: Boolean,\n      observer: 'check',\n    },\n    disabled: Boolean,\n    inputWidth: String,\n    buttonSize: String,\n    asyncChange: Boolean,\n    disableInput: Boolean,\n    decimalLength: {\n      type: Number,\n      value: null as unknown as number,\n      observer: 'check',\n    },\n    min: {\n      type: null,\n      value: 1,\n      observer: 'check',\n    },\n    max: {\n      type: null,\n      value: Number.MAX_SAFE_INTEGER,\n      observer: 'check',\n    },\n    step: {\n      type: null,\n      value: 1,\n    },\n    showPlus: {\n      type: Boolean,\n      value: true,\n    },\n    showMinus: {\n      type: Boolean,\n      value: true,\n    },\n    disablePlus: Boolean,\n    disableMinus: Boolean,\n    longPress: {\n      type: Boolean,\n      value: true,\n    },\n    theme: String,\n    alwaysEmbed: Boolean,\n  },\n\n  data: {\n    currentValue: '',\n  },\n\n  watch: {\n    value() {\n      this.observeValue();\n    },\n  },\n\n  created() {\n    this.setData({\n      currentValue: this.format(this.data.value).newValue,\n    });\n  },\n\n  methods: {\n    observeValue() {\n      const { value } = this.data;\n      this.setData({ currentValue: this.format(value).newValue });\n    },\n\n    check() {\n      const { newValue } = this.format(this.data.currentValue);\n\n      if (!equal(newValue, this.data.currentValue)) {\n        this.setData({ currentValue: newValue });\n      }\n    },\n\n    isDisabled(type: string) {\n      const { disabled, disablePlus, disableMinus, currentValue, max, min } =\n        this.data;\n\n      if (type === 'plus') {\n        return disabled || disablePlus || +currentValue >= +max;\n      }\n\n      return disabled || disableMinus || +currentValue <= +min;\n    },\n\n    onFocus(event: WechatMiniprogram.InputFocus) {\n      this.$emit('focus', event.detail);\n    },\n\n    onBlur(event: WechatMiniprogram.InputBlur) {\n      const data = this.format(event.detail.value);\n\n      this.setData({ currentValue: data.newValue });\n\n      this.emitChange(data);\n\n      this.$emit('blur', {\n        ...event.detail,\n        value: +data.newValue,\n      });\n    },\n\n    // filter illegal characters\n    filter(value: string): string {\n      value = String(value).replace(/[^0-9.-]/g, '');\n\n      if (this.data.integer && value.indexOf('.') !== -1) {\n        value = value.split('.')[0];\n      }\n\n      return value;\n    },\n\n    format(value: string) {\n      // filter illegal characters and format integer\n      const safeValue = this.filter(value);\n\n      // format range\n      const rangeValue = Math.max(\n        Math.min(this.data.max, +safeValue),\n        this.data.min\n      );\n\n      // format decimal\n      const newValue = isDef(this.data.decimalLength)\n        ? rangeValue.toFixed(this.data.decimalLength)\n        : String(rangeValue);\n\n      return { value, newValue };\n    },\n\n    onInput(event: WechatMiniprogram.Input) {\n      const { value = '' } = event.detail || {};\n\n      // allow input to be empty\n      if (value === '') {\n        return;\n      }\n\n      const formatted = this.format(value);\n\n      this.emitChange(formatted);\n    },\n\n    emitChange(data: { value: string; newValue: string }) {\n      const { value, newValue } = data;\n\n      if (!this.data.asyncChange) {\n        // fix when input 11. parsed to 11, unable to enter decimal\n        this.setData({ currentValue: +value === +newValue ? value : newValue });\n      }\n\n      this.$emit('change', +newValue);\n    },\n\n    onChange() {\n      const { type } = this;\n\n      if (this.isDisabled(type)) {\n        this.$emit('overlimit', type);\n        return;\n      }\n\n      const diff = type === 'minus' ? -this.data.step : +this.data.step;\n\n      const value = this.format(String(add(+this.data.currentValue, diff)));\n\n      this.emitChange(value);\n      this.$emit(type);\n    },\n\n    longPressStep() {\n      this.longPressTimer = setTimeout(() => {\n        this.onChange();\n        this.longPressStep();\n      }, LONG_PRESS_INTERVAL);\n    },\n\n    onTap(event: WechatMiniprogram.TouchEvent) {\n      const { type } = event.currentTarget.dataset;\n      this.type = type;\n      this.onChange();\n    },\n\n    onTouchStart(event: WechatMiniprogram.TouchEvent) {\n      if (!this.data.longPress) {\n        return;\n      }\n      clearTimeout(this.longPressTimer);\n\n      const { type } = event.currentTarget.dataset;\n      this.type = type;\n      this.isLongPress = false;\n\n      this.longPressTimer = setTimeout(() => {\n        this.isLongPress = true;\n        this.onChange();\n        this.longPressStep();\n      }, LONG_PRESS_START_TIME);\n    },\n\n    onTouchEnd() {\n      if (!this.data.longPress) {\n        return;\n      }\n\n      clearTimeout(this.longPressTimer);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/stepper/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('stepper', [theme]) }} custom-class\">\n  <view\n    wx:if=\"{{ showMinus }}\"\n    data-type=\"minus\"\n    style=\"{{ computed.buttonStyle({ buttonSize }) }}\"\n    class=\"minus-class {{ utils.bem('stepper__minus', { disabled: disabled || disableMinus || currentValue <= min }) }}\"\n    hover-class=\"van-stepper__minus--hover\"\n    hover-stay-time=\"70\"\n    bind:tap=\"onTap\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchend=\"onTouchEnd\"\n  >\n    <slot name=\"minus\" />\n  </view>\n  <input\n    type=\"{{ integer ? 'number' : 'digit' }}\"\n    class=\"input-class {{ utils.bem('stepper__input', { disabled: disabled || disableInput }) }}\"\n    style=\"{{ computed.inputStyle({ buttonSize, inputWidth }) }}\"\n    value=\"{{ currentValue }}\"\n    focus=\"{{ focus }}\"\n    disabled=\"{{ disabled || disableInput }}\"\n    always-embed=\"{{ alwaysEmbed }}\"\n    bindinput=\"onInput\"\n    bind:focus=\"onFocus\"\n    bind:blur=\"onBlur\"\n  />\n  <view\n    wx:if=\"{{ showPlus }}\"\n    data-type=\"plus\"\n    style=\"{{ computed.buttonStyle({ buttonSize }) }}\"\n    class=\"plus-class {{ utils.bem('stepper__plus', { disabled: disabled || disablePlus || currentValue >= max }) }}\"\n    hover-class=\"van-stepper__plus--hover\"\n    hover-stay-time=\"70\"\n    bind:tap=\"onTap\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchend=\"onTouchEnd\"\n  >\n    <slot name=\"plus\" />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/stepper/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction buttonStyle(data) {\n  return style({\n    width: addUnit(data.buttonSize),\n    height: addUnit(data.buttonSize),\n  });\n}\n\nfunction inputStyle(data) {\n  return style({\n    width: addUnit(data.inputWidth),\n    height: addUnit(data.buttonSize),\n  });\n}\n\nmodule.exports = {\n  buttonStyle: buttonStyle,\n  inputStyle: inputStyle,\n};\n"
  },
  {
    "path": "packages/stepper/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        基础用法\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"\"\n              type=\"digit\"\n              value=\"1\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        步长设置\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"\"\n              type=\"digit\"\n              value=\"1\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        限制输入范围\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"\"\n              type=\"digit\"\n              value=\"5\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        限制输入整数\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"\"\n              type=\"number\"\n              value=\"1\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        禁用状态\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input van-stepper__input--disabled\"\n              disabled=\"{{true}}\"\n              focus=\"\"\n              style=\"\"\n              type=\"digit\"\n              value=\"1\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus van-stepper__plus--disabled\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        禁用长按\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"\"\n              type=\"digit\"\n              value=\"1\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        固定小数位数\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"\"\n              type=\"digit\"\n              value=\"1.0\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        异步变更\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper\n          bind:change=\"onChange\"\n        >\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"\"\n              type=\"digit\"\n              value=\"1\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        自定义大小\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"width:32px;height:32px\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"width:40px;height:32px\"\n              type=\"digit\"\n              value=\"1\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"width:32px;height:32px\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-cell>\n    <wx-view\n      class=\"custom-class van-cell van-cell--center\"\n      hoverClass=\"van-cell--hover hover-class\"\n      hoverStayTime=\"70\"\n      style=\"\"\n      bind:tap=\"onClick\"\n    >\n      <wx-view\n        class=\"van-cell__title title-class\"\n        style=\"\"\n      >\n        圆角风格\n      </wx-view>\n      <wx-view\n        class=\"van-cell__value value-class\"\n      >\n        <van-stepper>\n          <wx-view\n            class=\"van-stepper van-stepper--round custom-class\"\n          >\n            <wx-view\n              class=\"minus-class van-stepper__minus van-stepper__minus--disabled\"\n              data-type=\"minus\"\n              hoverClass=\"van-stepper__minus--hover\"\n              hoverStayTime=\"70\"\n              style=\"width:22px;height:22px\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n            <wx-input\n              alwaysEmbed=\"{{false}}\"\n              class=\"input-class van-stepper__input\"\n              disabled=\"{{false}}\"\n              focus=\"\"\n              style=\"height:22px\"\n              type=\"digit\"\n              value=\"1\"\n              bind:blur=\"onBlur\"\n              bind:focus=\"onFocus\"\n              bind:input=\"onInput\"\n            />\n            <wx-view\n              class=\"plus-class van-stepper__plus\"\n              data-type=\"plus\"\n              hoverClass=\"van-stepper__plus--hover\"\n              hoverStayTime=\"70\"\n              style=\"width:22px;height:22px\"\n              bind:tap=\"onTap\"\n              bind:touchend=\"onTouchEnd\"\n              bind:touchstart=\"onTouchStart\"\n            />\n          </wx-view>\n        </van-stepper>\n      </wx-view>\n    </wx-view>\n  </van-cell>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/stepper/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/steps/README.md",
    "content": "# Steps 步骤条\n\n### 介绍\n\n用于展示操作流程的各个环节，让用户了解当前的操作在整体流程中的位置。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-steps\": \"@vant/weapp/steps/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-steps steps=\"{{ steps }}\" active=\"{{ active }}\" />\n```\n\n```javascript\nPage({\n  data: {\n    steps: [\n      {\n        text: '步骤一',\n        desc: '描述信息',\n      },\n      {\n        text: '步骤二',\n        desc: '描述信息',\n      },\n      {\n        text: '步骤三',\n        desc: '描述信息',\n      },\n      {\n        text: '步骤四',\n        desc: '描述信息',\n      },\n    ],\n  },\n});\n```\n\n### 自定义样式\n\n可以通过 `active-icon` 和 `active-color` 属性设置激活状态下的图标和颜色。\n\n```html\n<van-steps\n  steps=\"{{ steps }}\"\n  active=\"{{ active }}\"\n  active-icon=\"success\"\n  active-color=\"#38f\"\n/>\n```\n\n### 自定义图标\n\n可以通过 `inactiveIcon` 和 `activeIcon` 属性分别设置每一项的图标。\n\n```html\n<van-steps steps=\"{{ steps }}\" active=\"{{ active }}\" />\n```\n\n```javascript\nPage({\n  data: {\n    steps: [\n      {\n        text: '步骤一',\n        desc: '描述信息',\n        inactiveIcon: 'location-o',\n        activeIcon: 'success',\n      },\n      {\n        text: '步骤二',\n        desc: '描述信息',\n        inactiveIcon: 'like-o',\n        activeIcon: 'plus',\n      },\n      {\n        text: '步骤三',\n        desc: '描述信息',\n        inactiveIcon: 'star-o',\n        activeIcon: 'cross',\n      },\n      {\n        text: '步骤四',\n        desc: '描述信息',\n        inactiveIcon: 'phone-o',\n        activeIcon: 'fail',\n      },\n    ],\n  },\n});\n```\n\n### 竖向步骤条\n\n可以通过设置`direction`属性来改变步骤条的显示方式。\n\n```html\n<van-steps\n  steps=\"{{ steps }}\"\n  active=\"{{ active }}\"\n  direction=\"vertical\"\n  active-color=\"#ee0a24\"\n/>\n```\n\n## API\n\n### Steps Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| active | 当前步骤 | _number_ | 0 |\n| steps | 步骤配置集合，见下面配置项 | _Step 配置项数组_ | `[]` |\n| direction | 显示方向，可选值为 `horizontal` `vertical` | _string_ | `horizontal` |\n| active-color | 激活状态颜色 | _string_ | `#07c160` |\n| inactive-color | 未激活状态颜色 | _string_ | `#969799` |\n| active-icon | 激活状态底部图标，可选值见 [Icon 组件](#/icon) | _string_ | `checked` |\n| inactive-icon | 未激活状态底部图标，可选值见 [Icon 组件](#/icon) | _string_ | - |\n\n### Events\n\n| 事件名称        | 说明                 | 回调参数                    |\n| --------------- | -------------------- | --------------------------- |\n| bind:click-step | 点击步骤时触发的事件 | event.detail:当前步骤的索引 |\n\n### 外部样式类\n\n| 类名         | 说明           |\n| ------------ | -------------- |\n| custom-class | 根节点样式类   |\n| desc-class   | 描述信息样式类 |\n\n### Step 配置项\n\n| 键名         | 说明                                                     | 类型     |\n| ------------ | -------------------------------------------------------- | -------- |\n| text         | 当前步骤名称                                             | _string_ |\n| desc         | 当前步骤描述信息                                         | _string_ |\n| activeIcon   | 当前步骤激活状态底部图标                                 | _string_ |\n| inactiveIcon | 当前步骤未激活状态底部图标，可选值见 [Icon 组件](#/icon) | _string_ |\n"
  },
  {
    "path": "packages/steps/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-steps\": \"../../steps/index\",\n    \"van-toast\": \"../../toast/index\",\n    \"van-button\": \"../../button/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/steps/demo/index.less",
    "content": ".demo-margin-left {\n  margin-left: 10px;\n}\n\n.demo-margin-bottom {\n  display: block;\n  margin-bottom: 15px;\n}\n"
  },
  {
    "path": "packages/steps/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\nimport icons from '@vant/icons/src/config';\n\nconst steps = [\n  {\n    text: '步骤一',\n    desc: '描述信息',\n  },\n  {\n    text: '步骤二',\n    desc: '描述信息',\n  },\n  {\n    text: '步骤三',\n    desc: '描述信息',\n  },\n  {\n    text: '步骤四',\n    desc: '描述信息',\n  },\n];\n\nVantComponent({\n  data: {\n    active: 1,\n    steps,\n    customIconSteps: steps.map((item, index) => ({\n      ...item,\n      inactiveIcon: icons.outline[index],\n      activeIcon: icons.basic[index],\n    })),\n  },\n\n  methods: {\n    nextStep() {\n      this.setData({\n        active: ++this.data.active % 4,\n      });\n    },\n\n    onClick(event) {\n      Toast({\n        context: this,\n        message: `Index: ${event.detail}`,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/steps/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-steps\n    steps=\"{{ steps }}\"\n    active=\"{{ active }}\"\n    bind:click-step=\"onClick\"\n    custom-class=\"demo-margin-bottom\"\n  />\n\n  <van-button custom-class=\"demo-margin-left\" bind:click=\"nextStep\">下一步</van-button>\n</demo-block>\n\n<demo-block title=\"自定义样式\">\n  <van-steps\n    steps=\"{{ steps }}\"\n    active=\"{{ active }}\"\n    active-icon=\"success\"\n    active-color=\"#38f\"\n    inactive-icon=\"arrow\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义图标\">\n  <van-steps\n    steps=\"{{ customIconSteps }}\"\n    active=\"{{ active }}\"\n  />\n</demo-block>\n\n<demo-block title=\"竖向步骤条\">\n  <van-steps\n    steps=\"{{ steps }}\"\n    active=\"{{ active }}\"\n    direction=\"vertical\"\n    active-color=\"#ee0a24\"\n  />\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/steps/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/steps/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-steps {\n  overflow: hidden;\n  background-color: var(--steps-background-color, @steps-background-color);\n\n  &--horizontal {\n    padding: 10px;\n\n    .van-step__wrapper {\n      position: relative;\n      display: flex;\n      overflow: hidden;\n    }\n  }\n\n  &--vertical {\n    padding-left: 10px;\n\n    .van-step__wrapper {\n      padding: 0 0 0 20px;\n    }\n  }\n}\n\n.van-step {\n  position: relative;\n  flex: 1;\n  font-size: var(--step-font-size, @step-font-size);\n  color: var(--step-text-color, @step-text-color);\n\n  &--finish {\n    color: var(--step-finish-text-color, @step-finish-text-color);\n  }\n\n  &__circle {\n    border-radius: 50%;\n    width: var(--step-circle-size, @step-circle-size);\n    height: var(--step-circle-size, @step-circle-size);\n    background-color: var(--step-circle-color, @step-circle-color);\n  }\n\n  &--horizontal {\n    padding-bottom: 14px;\n\n    &:first-child {\n      .van-step__title {\n        transform: none;\n      }\n\n      .van-step__circle-container {\n        padding: 0 8px 0 0;\n        transform: translate3d(0, 50%, 0);\n      }\n    }\n\n    &:last-child {\n      position: absolute;\n      top: 0;\n      bottom: 0;\n      right: 0;\n      width: auto;\n\n      .van-step__title {\n        text-align: right;\n        transform: none;\n      }\n\n      .van-step__circle-container {\n        right: 0;\n        padding: 0 0 0 8px;\n        transform: translate3d(0, 50%, 0);\n      }\n    }\n\n    .van-step__circle-container {\n      position: absolute;\n      bottom: 6px;\n      z-index: 1;\n      transform: translate3d(-50%, 50%, 0);\n      background-color: @white;\n      padding: 0 var(--padding-xs, @padding-xs);\n    }\n\n    .van-step__title {\n      display: inline-block;\n      transform: translate3d(-50%, 0, 0);\n      font-size: var(\n        --step-horizontal-title-font-size,\n        @step-horizontal-title-font-size\n      );\n    }\n\n    .van-step__line {\n      position: absolute;\n      right: 0;\n      bottom: 6px;\n      left: 0;\n      height: 1px;\n      transform: translate3d(0, 50%, 0);\n      background-color: var(--step-line-color, @step-line-color);\n    }\n\n    &.van-step--process {\n      color: var(--step-process-text-color, @step-process-text-color);\n\n      .van-step__icon {\n        display: block;\n        line-height: 1;\n        font-size: var(--step-icon-size, @step-icon-size);\n      }\n    }\n  }\n\n  &--vertical {\n    padding: 10px 10px 10px 0;\n    line-height: 18px;\n\n    &::after {\n      border-bottom-width: 1px;\n    }\n\n    &:last-child::after {\n      border-bottom-width: none;\n    }\n\n    &:first-child {\n      &::before {\n        position: absolute;\n        top: 0;\n        left: -15px;\n        z-index: 1;\n        width: 1px;\n        height: 20px;\n        content: '';\n        background-color: @white;\n      }\n    }\n\n    .van-step__icon,\n    .van-step__circle,\n    .van-step__line {\n      position: absolute;\n      top: 19px;\n      left: -14px;\n      z-index: 2;\n      transform: translate3d(-50%, -50%, 0);\n    }\n\n    .van-step__icon {\n      line-height: 1;\n      font-size: var(--step-icon-size, @step-icon-size);\n      background-color: var(--steps-background-color, @steps-background-color);\n    }\n\n    .van-step__line {\n      z-index: 1;\n      width: 1px;\n      height: 100%;\n      transform: translate3d(-50%, 0, 0);\n      background-color: var(--step-line-color, @step-line-color);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/steps/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { GREEN, GRAY_DARK } from '../common/color';\n\nVantComponent({\n  classes: ['desc-class'],\n\n  props: {\n    icon: String,\n    steps: Array,\n    active: Number,\n    direction: {\n      type: String,\n      value: 'horizontal',\n    },\n    activeColor: {\n      type: String,\n      value: GREEN,\n    },\n    inactiveColor: {\n      type: String,\n      value: GRAY_DARK,\n    },\n    activeIcon: {\n      type: String,\n      value: 'checked',\n    },\n    inactiveIcon: String,\n  },\n\n  methods: {\n    onClick(event: WechatMiniprogram.TouchEvent) {\n      const { index } = event.currentTarget.dataset;\n      this.$emit('click-step', index);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/steps/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class {{ utils.bem('steps', [direction]) }}\">\n  <view class=\"van-step__wrapper\">\n    <view\n      wx:for=\"{{ steps }}\"\n      wx:key=\"index\"\n      bindtap=\"onClick\"\n      data-index=\"{{ index }}\"\n      class=\"{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline\"\n      style=\"{{ status(index, active) === 'inactive' ? 'color: ' + inactiveColor: '' }}\"\n    >\n      <view class=\"van-step__title\" style=\"{{ index === active ? 'color: ' + activeColor : '' }}\">\n        <view>{{ item.text }}</view>\n        <view class=\"desc-class\">{{ item.desc }}</view>\n      </view>\n      <view class=\"van-step__circle-container\">\n        <block wx:if=\"{{ index !== active }}\">\n          <van-icon\n            wx:if=\"{{ item.inactiveIcon || inactiveIcon }}\"\n            color=\"{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}\"\n            name=\"{{ item.inactiveIcon || inactiveIcon }}\"\n            class=\"van-step__icon\"\n          />\n          <view\n            wx:else\n            class=\"van-step__circle\"\n            style=\"{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}\"\n          />\n        </block>\n\n        <van-icon wx:else name=\"{{ item.activeIcon || activeIcon }}\" color=\"{{ activeColor }}\" class=\"van-step__icon\" />\n      </view>\n      <view\n        wx:if=\"{{ index !== steps.length - 1 }}\"\n        class=\"van-step__line\" style=\"{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}\"\n      />\n    </view>\n  </view>\n</view>\n\n<wxs module=\"status\">\nfunction get(index, active) {\n  if (index < active) {\n    return 'finish';\n  } else if (index === active) {\n    return 'process';\n  }\n\n  return 'inactive';\n}\n\nmodule.exports = get;\n</wxs>\n"
  },
  {
    "path": "packages/steps/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-steps\n        customClass=\"demo-margin-bottom\"\n        bind:click-step=\"onClick\"\n      >\n        <wx-view\n          class=\"custom-class van-steps van-steps--horizontal\"\n        >\n          <wx-view\n            class=\"van-step__wrapper\"\n          >\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--finish van-hairline\"\n              data-index=\"{{0}}\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤一\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <wx-view\n                  class=\"van-step__circle\"\n                  style=\"background-color: #07c160\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #07c160\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--process van-hairline\"\n              data-index=\"{{1}}\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"color: #07c160\"\n              >\n                <wx-view>\n                  步骤二\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-checked\"\n                    style=\"color:#07c160\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #969799\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--inactive van-hairline\"\n              data-index=\"{{2}}\"\n              style=\"color: #969799\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤三\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <wx-view\n                  class=\"van-step__circle\"\n                  style=\"background-color: #969799\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #969799\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--inactive van-hairline\"\n              data-index=\"{{3}}\"\n              style=\"color: #969799\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤四\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <wx-view\n                  class=\"van-step__circle\"\n                  style=\"background-color: #969799\"\n                />\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-steps>\n      <van-button\n        customClass=\"demo-margin-left\"\n        bind:click=\"nextStep\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--default van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            下一步\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义样式\n      </wx-view>\n      <van-steps>\n        <wx-view\n          class=\"custom-class van-steps van-steps--horizontal\"\n        >\n          <wx-view\n            class=\"van-step__wrapper\"\n          >\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--finish van-hairline\"\n              data-index=\"{{0}}\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤一\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-arrow\"\n                    style=\"color:#38f\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #38f\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--process van-hairline\"\n              data-index=\"{{1}}\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"color: #38f\"\n              >\n                <wx-view>\n                  步骤二\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-success\"\n                    style=\"color:#38f\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #969799\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--inactive van-hairline\"\n              data-index=\"{{2}}\"\n              style=\"color: #969799\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤三\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-arrow\"\n                    style=\"color:#969799\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #969799\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--inactive van-hairline\"\n              data-index=\"{{3}}\"\n              style=\"color: #969799\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤四\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-arrow\"\n                    style=\"color:#969799\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-steps>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义图标\n      </wx-view>\n      <van-steps>\n        <wx-view\n          class=\"custom-class van-steps van-steps--horizontal\"\n        >\n          <wx-view\n            class=\"van-step__wrapper\"\n          >\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--finish van-hairline\"\n              data-index=\"{{0}}\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤一\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-location-o\"\n                    style=\"color:#07c160\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #07c160\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--process van-hairline\"\n              data-index=\"{{1}}\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"color: #07c160\"\n              >\n                <wx-view>\n                  步骤二\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-arrow-left\"\n                    style=\"color:#07c160\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #969799\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--inactive van-hairline\"\n              data-index=\"{{2}}\"\n              style=\"color: #969799\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤三\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-star-o\"\n                    style=\"color:#969799\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #969799\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--horizontal van-step--inactive van-hairline\"\n              data-index=\"{{3}}\"\n              style=\"color: #969799\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤四\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-phone-o\"\n                    style=\"color:#969799\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-steps>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        竖向步骤条\n      </wx-view>\n      <van-steps>\n        <wx-view\n          class=\"custom-class van-steps van-steps--vertical\"\n        >\n          <wx-view\n            class=\"van-step__wrapper\"\n          >\n            <wx-view\n              class=\"van-step van-step--vertical van-step--finish van-hairline\"\n              data-index=\"{{0}}\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤一\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <wx-view\n                  class=\"van-step__circle\"\n                  style=\"background-color: #ee0a24\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #ee0a24\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--vertical van-step--process van-hairline\"\n              data-index=\"{{1}}\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"color: #ee0a24\"\n              >\n                <wx-view>\n                  步骤二\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <van-icon\n                  class=\"van-step__icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-checked\"\n                    style=\"color:#ee0a24\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #969799\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--vertical van-step--inactive van-hairline\"\n              data-index=\"{{2}}\"\n              style=\"color: #969799\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤三\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <wx-view\n                  class=\"van-step__circle\"\n                  style=\"background-color: #969799\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-step__line\"\n                style=\"background-color: #969799\"\n              />\n            </wx-view>\n            <wx-view\n              class=\"van-step van-step--vertical van-step--inactive van-hairline\"\n              data-index=\"{{3}}\"\n              style=\"color: #969799\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-step__title\"\n                style=\"\"\n              >\n                <wx-view>\n                  步骤四\n                </wx-view>\n                <wx-view\n                  class=\"desc-class\"\n                >\n                  描述信息\n                </wx-view>\n              </wx-view>\n              <wx-view\n                class=\"van-step__circle-container\"\n              >\n                <wx-view\n                  class=\"van-step__circle\"\n                  style=\"background-color: #969799\"\n                />\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-steps>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/steps/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/sticky/README.md",
    "content": "# Sticky 粘性布局\n\n### 介绍\n\nSticky 组件与 CSS 中`position: sticky`属性实现的效果一致，当组件在屏幕范围内时，会按照正常的布局排列，当组件滚出屏幕范围时，始终会固定在屏幕顶部。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-sticky\": \"@vant/weapp/sticky/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)\n\n## 代码演示\n\n### 基础用法\n\n将内容包裹在`Sticky`组件内即可。\n\n```html\n<van-sticky>\n  <van-button type=\"primary\">基础用法</van-button>\n</van-sticky>\n```\n\n### 吸顶距离\n\n通过`offset-top`属性可以设置组件在吸顶时与顶部的距离。\n\n```html\n<van-sticky offset-top=\"{{ 50 }}\">\n  <van-button type=\"info\">吸顶距离</van-button>\n</van-sticky>\n```\n\n### 指定容器\n\n通过`container`属性可以指定组件的容器，页面滚动时，组件会始终保持在容器范围内，当组件即将超出容器底部时，会返回原位置。\n\n```html\n<view id=\"container\" style=\"height: 150px;\">\n  <van-sticky container=\"{{ container }}\">\n    <van-button type=\"warning\">指定容器</van-button>\n  </van-sticky>\n</view>\n```\n\n```js\nPage({\n  data: {\n    container: null,\n  },\n\n  onReady() {\n    this.setData({\n      container: () => wx.createSelectorQuery().select('#container'),\n    });\n  },\n});\n```\n\n### 嵌套在 scroll-view 内使用\n\n通过 `scroll-top` 与 `offset-top` 属性可以实现在 scroll-view 内嵌套使用。\n\n```html\n<scroll-view\n  bind:scroll=\"onScroll\"\n  scroll-y\n  id=\"scroller\"\n  style=\"height: 200px;\"\n>\n  <view style=\"height: 400px; padding-top: 50px;\">\n    <van-sticky scroll-top=\"{{ scrollTop }}\" offset-top=\"{{ offsetTop }}\">\n      <van-button type=\"warning\">嵌套在 scroll-view 内</van-button>\n    </van-sticky>\n  </view>\n</scroll-view>\n```\n\n```js\nPage({\n  data: {\n    scrollTop: 0,\n    offsetTop: 0,\n  },\n\n  onScroll(event) {\n    wx.createSelectorQuery()\n      .select('#scroller')\n      .boundingClientRect((res) => {\n        this.setData({\n          scrollTop: event.detail.scrollTop,\n          offsetTop: res.top,\n        });\n      })\n      .exec();\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| offset-top | 吸顶时与顶部的距离，单位`px` | _number_ | `0` |\n| z-index | 吸顶时的 z-index | _number_ | `99` |\n| container | 一个函数，返回容器对应的 NodesRef 节点 | _function_ | - |\n| scroll-top | 当前滚动区域的滚动位置，非 `null` 时会禁用页面滚动事件的监听 | _number_ | - |\n\n### Events\n\n| 事件名 | 说明       | 回调参数                                       |\n| ------ | ---------- | ---------------------------------------------- |\n| bind:scroll | 滚动时触发 | { scrollTop: 距离顶部位置, isFixed: 是否吸顶 } |\n"
  },
  {
    "path": "packages/sticky/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-sticky\": \"../../sticky/index\",\n    \"van-button\": \"../../button/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/sticky/demo/index.less",
    "content": ".van-button {\n  margin-left: 16px;\n}\n\n.sticky-container {\n  position: relative;\n  z-index: -1;\n  height: 150px;\n  background-color: #fff;\n}\n"
  },
  {
    "path": "packages/sticky/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    container: () => {},\n    scrollTop: 0,\n    offsetTop: 0,\n  },\n\n  mounted() {\n    this.setData({\n      container: () => this.createSelectorQuery().select('#container'),\n    });\n  },\n\n  methods: {\n    onScroll(event) {\n      this.createSelectorQuery()\n        .select('#scroller')\n        .boundingClientRect((res) => {\n          this.setData({\n            scrollTop: event.detail.scrollTop,\n            offsetTop: res.top,\n          });\n        })\n        .exec();\n    },\n  },\n});\n"
  },
  {
    "path": "packages/sticky/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-sticky>\n    <van-button type=\"primary\" custom-style=\"margin-left: 15px\">\n      基础用法\n    </van-button>\n  </van-sticky>\n</demo-block>\n\n<demo-block title=\"吸顶距离\">\n  <van-sticky offset-top=\"{{ 50 }}\">\n    <van-button type=\"info\" custom-style=\"margin-left: 115px\">\n      吸顶距离\n    </van-button>\n  </van-sticky>\n</demo-block>\n\n<demo-block title=\"指定容器\">\n  <view id=\"container\" style=\"height: 150px; background-color: #fff;\">\n    <van-sticky container=\"{{ container }}\">\n      <van-button type=\"warning\" custom-style=\"margin-left: 215px;\">\n        指定容器\n      </van-button>\n    </van-sticky>\n  </view>\n</demo-block>\n\n<demo-block title=\"嵌套在 scroll-view 内使用\">\n  <scroll-view\n    bind:scroll=\"onScroll\"\n    scroll-y\n    id=\"scroller\"\n    style=\"height: 200px; background-color: #fff;\"\n  >\n    <view style=\"height: 400px; padding-top: 50px;\">\n      <van-sticky scroll-top=\"{{ scrollTop }}\" offset-top=\"{{ offsetTop }}\">\n        <van-button type=\"warning\">\n          嵌套在 scroll-view 内\n        </van-button>\n      </van-sticky>\n    </view>\n  </scroll-view>\n</demo-block>\n"
  },
  {
    "path": "packages/sticky/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/sticky/index.less",
    "content": ".van-sticky {\n  position: relative;\n\n  &-wrap {\n    &--fixed {\n      position: fixed;\n      right: 0;\n      left: 0;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/sticky/index.ts",
    "content": "import { getRect } from '../common/utils';\nimport { VantComponent } from '../common/component';\nimport { isDef } from '../common/validator';\nimport { pageScrollMixin } from '../mixins/page-scroll';\n\nconst ROOT_ELEMENT = '.van-sticky';\n\nVantComponent({\n  props: {\n    zIndex: {\n      type: Number,\n      value: 99,\n    },\n    offsetTop: {\n      type: Number,\n      value: 0,\n      observer: 'onScroll',\n    },\n    disabled: {\n      type: Boolean,\n      observer: 'onScroll',\n    },\n    container: {\n      type: null,\n      observer: 'onScroll',\n    },\n    scrollTop: {\n      type: null,\n      observer(val) {\n        this.onScroll({ scrollTop: val });\n      },\n    },\n  },\n\n  mixins: [\n    pageScrollMixin(function (event) {\n      if (this.data.scrollTop != null) {\n        return;\n      }\n      this.onScroll(event);\n    }),\n  ],\n\n  data: {\n    height: 0,\n    fixed: false,\n    transform: 0,\n  },\n\n  mounted() {\n    this.onScroll();\n  },\n\n  methods: {\n    onScroll({ scrollTop }: { scrollTop?: number } = {}) {\n      const { container, offsetTop, disabled } = this.data;\n\n      if (disabled) {\n        this.setDataAfterDiff({\n          fixed: false,\n          transform: 0,\n        });\n        return;\n      }\n\n      this.scrollTop = scrollTop || this.scrollTop;\n\n      if (typeof container === 'function') {\n        Promise.all([getRect(this, ROOT_ELEMENT), this.getContainerRect()])\n          .then(([root, container]) => {\n            if (offsetTop + root.height > container.height + container.top) {\n              this.setDataAfterDiff({\n                fixed: false,\n                transform: container.height - root.height,\n              });\n            } else if (offsetTop >= root.top) {\n              this.setDataAfterDiff({\n                fixed: true,\n                height: root.height,\n                transform: 0,\n              });\n            } else {\n              this.setDataAfterDiff({ fixed: false, transform: 0 });\n            }\n          })\n          .catch(() => {});\n\n        return;\n      }\n\n      getRect(this, ROOT_ELEMENT).then((root) => {\n        if (!isDef(root) || (!root.width && !root.height)) {\n          return;\n        }\n        if (offsetTop >= root.top) {\n          this.setDataAfterDiff({ fixed: true, height: root.height });\n          this.transform = 0;\n        } else {\n          this.setDataAfterDiff({ fixed: false });\n        }\n      });\n    },\n\n    setDataAfterDiff(data) {\n      wx.nextTick(() => {\n        const diff = Object.keys(data).reduce((prev, key) => {\n          if (data[key] !== this.data[key]) {\n            prev[key] = data[key];\n          }\n\n          return prev;\n        }, {});\n\n        if (Object.keys(diff).length > 0) {\n          this.setData(diff);\n        }\n\n        this.$emit('scroll', {\n          scrollTop: this.scrollTop,\n          isFixed: data.fixed || this.data.fixed,\n        });\n      });\n    },\n\n    getContainerRect() {\n      const nodesRef: WechatMiniprogram.NodesRef = this.data.container();\n\n      if (!nodesRef) {\n        return Promise.reject(new Error('not found container'));\n      }\n\n      return new Promise<WechatMiniprogram.BoundingClientRectCallbackResult>(\n        (resolve) => nodesRef.boundingClientRect(resolve).exec()\n      );\n    },\n  },\n});\n"
  },
  {
    "path": "packages/sticky/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class van-sticky\" style=\"{{ computed.containerStyle({ fixed, height, zIndex }) }}\">\n  <view class=\"{{ utils.bem('sticky-wrap', { fixed }) }}\" style=\"{{ computed.wrapStyle({ fixed, offsetTop, transform, zIndex }) }}\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/sticky/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction wrapStyle(data) {\n  return style({\n    transform: data.transform\n      ? 'translate3d(0, ' + data.transform + 'px, 0)'\n      : '',\n    top: data.fixed ? addUnit(data.offsetTop) : '',\n    'z-index': data.zIndex,\n  });\n}\n\nfunction containerStyle(data) {\n  return style({\n    height: data.fixed ? addUnit(data.height) : '',\n    'z-index': data.zIndex,\n  });\n}\n\nmodule.exports = {\n  wrapStyle: wrapStyle,\n  containerStyle: containerStyle,\n};\n"
  },
  {
    "path": "packages/sticky/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-sticky>\n        <wx-view\n          class=\"custom-class van-sticky\"\n          style=\"z-index:99\"\n        >\n          <wx-view\n            class=\"van-sticky-wrap\"\n            style=\"z-index:99\"\n          >\n            <van-button>\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--primary van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"margin-left: 15px\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n      基础用法\n    \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </wx-view>\n        </wx-view>\n      </van-sticky>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        吸顶距离\n      </wx-view>\n      <van-sticky>\n        <wx-view\n          class=\"custom-class van-sticky\"\n          style=\"z-index:99\"\n        >\n          <wx-view\n            class=\"van-sticky-wrap\"\n            style=\"z-index:99\"\n          >\n            <van-button>\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--info van-button--normal \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"margin-left: 115px\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n      吸顶距离\n    \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </wx-view>\n        </wx-view>\n      </van-sticky>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        指定容器\n      </wx-view>\n      <wx-view\n        id=\"container\"\n        style=\"height: 150px; background-color: #fff;\"\n      >\n        <van-sticky>\n          <wx-view\n            class=\"custom-class van-sticky\"\n            style=\"z-index:99\"\n          >\n            <wx-view\n              class=\"van-sticky-wrap\"\n              style=\"z-index:99\"\n            >\n              <van-button>\n                <wx-button\n                  appParameter=\"\"\n                  ariaLabel=\"\"\n                  businessId=\"\"\n                  class=\"custom-class van-button van-button--warning van-button--normal \"\n                  data-detail=\"{{null}}\"\n                  formType=\"\"\n                  hoverClass=\"van-button--active hover-class\"\n                  id=\"\"\n                  lang=\"\"\n                  openType=\"\"\n                  sendMessageImg=\"\"\n                  sendMessagePath=\"\"\n                  sendMessageTitle=\"\"\n                  sessionFrom=\"\"\n                  showMessageCard=\"{{false}}\"\n                  style=\"margin-left: 215px;\"\n                  bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                  bind:chooseavatar=\"onChooseAvatar\"\n                  bind:contact=\"onContact\"\n                  bind:error=\"onError\"\n                  bind:getphonenumber=\"onGetPhoneNumber\"\n                  bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                  bind:getuserinfo=\"onGetUserInfo\"\n                  bind:launchapp=\"onLaunchApp\"\n                  bind:opensetting=\"onOpenSetting\"\n                  bind:tap=\"onClick\"\n                >\n                  <wx-view\n                    class=\"van-button__text\"\n                  >\n                    \n        指定容器\n      \n                  </wx-view>\n                </wx-button>\n              </van-button>\n            </wx-view>\n          </wx-view>\n        </van-sticky>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        嵌套在 scroll-view 内使用\n      </wx-view>\n      <wx-scroll-view\n        id=\"scroller\"\n        scrollY=\"{{true}}\"\n        style=\"height: 200px; background-color: #fff;\"\n        bind:scroll=\"onScroll\"\n      >\n        <wx-view\n          style=\"height: 400px; padding-top: 50px;\"\n        >\n          <van-sticky>\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:99\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:99\"\n              >\n                <van-button>\n                  <wx-button\n                    appParameter=\"\"\n                    ariaLabel=\"\"\n                    businessId=\"\"\n                    class=\"custom-class van-button van-button--warning van-button--normal \"\n                    data-detail=\"{{null}}\"\n                    formType=\"\"\n                    hoverClass=\"van-button--active hover-class\"\n                    id=\"\"\n                    lang=\"\"\n                    openType=\"\"\n                    sendMessageImg=\"\"\n                    sendMessagePath=\"\"\n                    sendMessageTitle=\"\"\n                    sessionFrom=\"\"\n                    showMessageCard=\"{{false}}\"\n                    style=\"\"\n                    bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                    bind:chooseavatar=\"onChooseAvatar\"\n                    bind:contact=\"onContact\"\n                    bind:error=\"onError\"\n                    bind:getphonenumber=\"onGetPhoneNumber\"\n                    bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                    bind:getuserinfo=\"onGetUserInfo\"\n                    bind:launchapp=\"onLaunchApp\"\n                    bind:opensetting=\"onOpenSetting\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-button__text\"\n                    >\n                      \n          嵌套在 scroll-view 内\n        \n                    </wx-view>\n                  </wx-button>\n                </van-button>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n        </wx-view>\n      </wx-scroll-view>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/sticky/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/submit-bar/README.md",
    "content": "# SubmitBar 提交订单栏\n\n### 介绍\n\n用于展示订单金额与提交订单。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-submit-bar\": \"@vant/weapp/submit-bar/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-submit-bar\n  price=\"{{ 3050 }}\"\n  button-text=\"提交订单\"\n  bind:submit=\"onSubmit\"\n/>\n```\n\n### 禁用状态\n\n禁用状态下不会触发`submit`事件。\n\n```html\n<van-submit-bar\n  disabled\n  price=\"{{ 3050 }}\"\n  button-text=\"提交订单\"\n  tip=\"您的收货地址不支持同城送, 我们已为您推荐快递\"\n  tip-icon=\"info-o\"\n  bind:submit=\"onSubmit\"\n/>\n```\n\n### 加载状态\n\n加载状态下不会触发`submit`事件。\n\n```html\n<van-submit-bar\n  loading\n  price=\"{{ 3050 }}\"\n  button-text=\"提交订单\"\n  bind:submit=\"onSubmit\"\n/>\n```\n\n### 高级用法\n\n通过插槽插入自定义内容。\n\n```html\n<van-submit-bar\n  price=\"{{ 3050 }}\"\n  button-text=\"提交订单\"\n  bind:submit=\"onClickButton\"\n  tip=\"{{ true }}\"\n>\n  <van-tag type=\"primary\">标签</van-tag>\n  <view slot=\"tip\">您的收货地址不支持同城送, <text>修改地址</text></view>\n</van-submit-bar>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| price | 价格（单位分） | _number_ | - |\n| label | 价格文案 | _string_ | `合计：` |\n| suffix-label | 价格右侧文案 | _string_ | - |\n| button-text | 按钮文字 | _string_ | - |\n| button-type | 按钮类型 | _string_ | `danger` |\n| tip | 提示文案 | _string \\| boolean_ | - |\n| tip-icon | 图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | - |\n| disabled | 是否禁用按钮 | _boolean_ | `false` |\n| loading | 是否显示加载中的按钮 | _boolean_ | `false` |\n| currency | 货币符号 | _string_ | `¥` |\n| safe-area-inset-bottom | 是否为 iPhoneX 留出底部安全距离 | _boolean_ | `true` |\n| decimal-length | 价格小数点后位数 | _number_ | `2` |\n\n### Events\n\n| 事件名 | 说明             | 参数 |\n| ------ | ---------------- | ---- |\n| bind:submit | 按钮点击事件回调 | -    |\n\n### Slot\n\n| 名称 | 说明                       |\n| ---- | -------------------------- |\n| -    | 自定义订单栏左侧内容       |\n| top  | 自定义订单栏上方内容       |\n| tip  | 提示文案中的额外操作和说明 |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n| price-class  | 价格样式类   |\n| button-class | 按钮样式类   |\n| bar-class    | 订单栏样式类 |\n"
  },
  {
    "path": "packages/submit-bar/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tag\": \"../../tag/index\",\n    \"van-toast\": \"../../toast/index\",\n    \"van-submit-bar\": \"../../submit-bar/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/submit-bar/demo/index.less",
    "content": ".van-submit-bar {\n  position: relative !important;\n}\n\n.edit-address {\n  color: #1989fa;\n}\n\n.submit-tag {\n  margin-left: 15px;\n}\n"
  },
  {
    "path": "packages/submit-bar/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  methods: {\n    onClickButton() {\n      Toast({\n        context: this,\n        message: '点击按钮',\n      });\n    },\n    onClickLink() {\n      Toast({\n        context: this,\n        message: '修改地址',\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/submit-bar/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-submit-bar\n    price=\"{{ 3050 }}\"\n    button-text=\"提交订单\"\n    bind:submit=\"onClickButton\"\n    custom-class=\"van-submit-bar\"\n    safe-area-inset-bottom=\"{{ false }}\"\n  />\n</demo-block>\n\n<demo-block title=\"禁用状态\">\n  <van-submit-bar\n    disabled\n    price=\"{{ 3050 }}\"\n    button-text=\"提交订单\"\n    tip=\"您的收货地址不支持同城送, 我们已为您推荐快递\"\n    tip-icon=\"info-o\"\n    bind:submit=\"onClickButton\"\n    custom-class=\"van-submit-bar\"\n    safe-area-inset-bottom=\"{{ false }}\"\n  />\n</demo-block>\n\n<demo-block title=\"加载状态\">\n  <van-submit-bar\n    loading\n    price=\"{{ 3050 }}\"\n    button-text=\"提交订单\"\n    bind:submit=\"onClickButton\"\n    custom-class=\"van-submit-bar\"\n    safe-area-inset-bottom=\"{{ false }}\"\n  />\n</demo-block>\n\n<demo-block title=\"高级用法\">\n  <van-submit-bar\n    price=\"{{ 3050 }}\"\n    button-text=\"提交订单\"\n    bind:submit=\"onClickButton\"\n    custom-class=\"van-submit-bar\"\n    tip=\"{{ true }}\"\n    safe-area-inset-bottom=\"{{ false }}\"\n  >\n    <van-tag type=\"primary\" custom-class=\"submit-tag\">标签</van-tag>\n    <view slot=\"tip\">\n      您的收货地址不支持同城送\n      <text class=\"edit-address\" bindtap=\"onClickLink\">修改地址</text>\n    </view>\n  </van-submit-bar>\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/submit-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../button/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/submit-bar/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-submit-bar {\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  user-select: none;\n  z-index: var(--submit-bar-z-index, @submit-bar-z-index);\n  background-color: var(\n    --submit-bar-background-color,\n    @submit-bar-background-color\n  );\n\n  &__tip {\n    padding: var(--submit-bar-tip-padding, @submit-bar-tip-padding);\n    color: var(--submit-bar-tip-color, @submit-bar-tip-color);\n    font-size: var(--submit-bar-tip-font-size, @submit-bar-tip-font-size);\n    line-height: var(--submit-bar-tip-line-height, @submit-bar-tip-line-height);\n    background-color: var(\n      --submit-bar-tip-background-color,\n      @submit-bar-tip-background-color\n    );\n\n    &:empty {\n      display: none;\n    }\n  }\n\n  &__tip-icon {\n    margin-right: 4px;\n    vertical-align: middle;\n  }\n\n  &__tip-text {\n    display: inline;\n    vertical-align: middle;\n  }\n\n  &__bar {\n    display: flex;\n    align-items: center;\n    justify-content: flex-end;\n    padding: var(--submit-bar-padding, @submit-bar-padding);\n    height: var(--submit-bar-height, @submit-bar-height);\n    font-size: var(--submit-bar-text-font-size, @submit-bar-text-font-size);\n    background-color: var(\n      --submit-bar-background-color,\n      @submit-bar-background-color\n    );\n  }\n\n  &__safe {\n    height: constant(safe-area-inset-bottom);\n    height: env(safe-area-inset-bottom);\n  }\n\n  &__text {\n    flex: 1;\n    text-align: right;\n    color: var(--submit-bar-text-color, @submit-bar-text-color);\n    padding-right: var(--padding-sm, @padding-sm);\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n  }\n\n  &__price {\n    color: var(--submit-bar-price-color, @submit-bar-price-color);\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n    font-size: var(--submit-bar-price-font-size, @submit-bar-price-font-size);\n\n    &-integer {\n      font-size: @submit-bar-price-integer-font-size;\n      font-family: @submit-bar-price-font-family;\n    }\n  }\n\n  &__currency {\n    font-size: var(\n      --submit-bar-currency-font-size,\n      @submit-bar-currency-font-size\n    );\n  }\n\n  &__suffix-label {\n    margin-left: 5px;\n  }\n\n  &__button {\n    width: var(--submit-bar-button-width, @submit-bar-button-width);\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n\n    --button-default-height: var(\n      --submit-bar-button-height,\n      @submit-bar-button-height\n    ) !important;\n    --button-line-height: var(\n      --submit-bar-button-height,\n      @submit-bar-button-height\n    ) !important;\n  }\n}\n"
  },
  {
    "path": "packages/submit-bar/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  classes: ['bar-class', 'price-class', 'button-class'],\n\n  props: {\n    tip: {\n      type: null,\n      observer: 'updateTip',\n    },\n    tipIcon: String,\n    type: Number,\n    price: {\n      type: null,\n      observer: 'updatePrice',\n    },\n    label: String,\n    loading: Boolean,\n    disabled: Boolean,\n    buttonText: String,\n    currency: {\n      type: String,\n      value: '¥',\n    },\n    buttonType: {\n      type: String,\n      value: 'danger',\n    },\n    decimalLength: {\n      type: Number,\n      value: 2,\n      observer: 'updatePrice',\n    },\n    suffixLabel: String,\n    safeAreaInsetBottom: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  methods: {\n    updatePrice() {\n      const { price, decimalLength } = this.data;\n      const priceStrArr =\n        typeof price === 'number' &&\n        (price / 100).toFixed(decimalLength).split('.');\n      this.setData({\n        hasPrice: typeof price === 'number',\n        integerStr: priceStrArr && priceStrArr[0],\n        decimalStr: decimalLength && priceStrArr ? `.${priceStrArr[1]}` : '',\n      });\n    },\n\n    updateTip() {\n      this.setData({ hasTip: typeof this.data.tip === 'string' });\n    },\n\n    onSubmit(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('submit', event.detail);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/submit-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-submit-bar custom-class\">\n  <slot name=\"top\" />\n\n  <view class=\"van-submit-bar__tip\">\n    <van-icon\n      wx:if=\"{{ tipIcon }}\"\n      size=\"12px\"\n      name=\"{{ tipIcon }}\"\n      custom-class=\"van-submit-bar__tip-icon\"\n    />\n    <view wx:if=\"{{ hasTip }}\" class=\"van-submit-bar__tip-text\">\n      {{ tip }}\n    </view>\n    <slot name=\"tip\" />\n  </view>\n\n  <view class=\"bar-class van-submit-bar__bar\">\n    <slot />\n    <view wx:if=\"{{ hasPrice }}\" class=\"van-submit-bar__text\">\n      <text>{{ label || '合计：' }}</text>\n      <text class=\"van-submit-bar__price price-class\">\n        <text class=\"van-submit-bar__currency\">{{ currency }} </text>\n        <text class=\"van-submit-bar__price-integer\">{{ integerStr }}</text><text>{{decimalStr}}</text>\n      </text>\n      <text class=\"van-submit-bar__suffix-label\">{{ suffixLabel }}</text>\n    </view>\n    <van-button\n      round\n      type=\"{{ buttonType }}\"\n      loading=\"{{ loading }}\"\n      disabled=\"{{ disabled }}\"\n      class=\"van-submit-bar__button\"\n      custom-class=\"button-class\"\n      custom-style=\"width: 100%;\"\n      bind:click=\"onSubmit\"\n    >\n      {{ loading ? '' : buttonText }}\n    </van-button>\n  </view>\n\n  <view wx:if=\"{{ safeAreaInsetBottom }}\" class=\"van-submit-bar__safe\" />\n</view>\n"
  },
  {
    "path": "packages/submit-bar/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-submit-bar\n        customClass=\"van-submit-bar\"\n        bind:submit=\"onClickButton\"\n      >\n        <wx-view\n          class=\"van-submit-bar custom-class\"\n        >\n          <wx-view\n            class=\"van-submit-bar__tip\"\n          />\n          <wx-view\n            class=\"bar-class van-submit-bar__bar\"\n          >\n            <wx-view\n              class=\"van-submit-bar__text\"\n            >\n              <wx-text>\n                合计：\n              </wx-text>\n              <wx-text\n                class=\"van-submit-bar__price price-class\"\n              >\n                <wx-text\n                  class=\"van-submit-bar__currency\"\n                >\n                  ¥ \n                </wx-text>\n                <wx-text\n                  class=\"van-submit-bar__price-integer\"\n                >\n                  30\n                </wx-text>\n                <wx-text>\n                  .50\n                </wx-text>\n              </wx-text>\n              <wx-text\n                class=\"van-submit-bar__suffix-label\"\n              >\n                \n              </wx-text>\n            </wx-view>\n            <van-button\n              class=\"van-submit-bar__button\"\n              customClass=\"button-class\"\n              bind:click=\"onSubmit\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal van-button--round \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"width: 100%;\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n      提交订单\n    \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </wx-view>\n        </wx-view>\n      </van-submit-bar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用状态\n      </wx-view>\n      <van-submit-bar\n        customClass=\"van-submit-bar\"\n        bind:submit=\"onClickButton\"\n      >\n        <wx-view\n          class=\"van-submit-bar custom-class\"\n        >\n          <wx-view\n            class=\"van-submit-bar__tip\"\n          >\n            <van-icon\n              customClass=\"van-submit-bar__tip-icon\"\n            >\n              <wx-view\n                class=\"custom-class van-icon van-icon-info-o\"\n                style=\"font-size:12px\"\n                bind:tap=\"onClick\"\n              />\n            </van-icon>\n            <wx-view\n              class=\"van-submit-bar__tip-text\"\n            >\n              \n      您的收货地址不支持同城送, 我们已为您推荐快递\n    \n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"bar-class van-submit-bar__bar\"\n          >\n            <wx-view\n              class=\"van-submit-bar__text\"\n            >\n              <wx-text>\n                合计：\n              </wx-text>\n              <wx-text\n                class=\"van-submit-bar__price price-class\"\n              >\n                <wx-text\n                  class=\"van-submit-bar__currency\"\n                >\n                  ¥ \n                </wx-text>\n                <wx-text\n                  class=\"van-submit-bar__price-integer\"\n                >\n                  30\n                </wx-text>\n                <wx-text>\n                  .50\n                </wx-text>\n              </wx-text>\n              <wx-text\n                class=\"van-submit-bar__suffix-label\"\n              >\n                \n              </wx-text>\n            </wx-view>\n            <van-button\n              class=\"van-submit-bar__button\"\n              customClass=\"button-class\"\n              bind:click=\"onSubmit\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal van-button--round van-button--disabled van-button--unclickable \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"width: 100%;\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n      提交订单\n    \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </wx-view>\n        </wx-view>\n      </van-submit-bar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载状态\n      </wx-view>\n      <van-submit-bar\n        customClass=\"van-submit-bar\"\n        bind:submit=\"onClickButton\"\n      >\n        <wx-view\n          class=\"van-submit-bar custom-class\"\n        >\n          <wx-view\n            class=\"van-submit-bar__tip\"\n          />\n          <wx-view\n            class=\"bar-class van-submit-bar__bar\"\n          >\n            <wx-view\n              class=\"van-submit-bar__text\"\n            >\n              <wx-text>\n                合计：\n              </wx-text>\n              <wx-text\n                class=\"van-submit-bar__price price-class\"\n              >\n                <wx-text\n                  class=\"van-submit-bar__currency\"\n                >\n                  ¥ \n                </wx-text>\n                <wx-text\n                  class=\"van-submit-bar__price-integer\"\n                >\n                  30\n                </wx-text>\n                <wx-text>\n                  .50\n                </wx-text>\n              </wx-text>\n              <wx-text\n                class=\"van-submit-bar__suffix-label\"\n              >\n                \n              </wx-text>\n            </wx-view>\n            <van-button\n              class=\"van-submit-bar__button\"\n              customClass=\"button-class\"\n              bind:click=\"onSubmit\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal van-button--round van-button--loading van-button--unclickable \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"width: 100%;\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"\"\n              >\n                <van-loading\n                  customClass=\"loading-class\"\n                >\n                  <wx-view\n                    class=\"custom-class van-loading\"\n                  >\n                    <wx-view\n                      class=\"van-loading__spinner van-loading__spinner--circular\"\n                      style=\"color:#fff;width:20px;height:20px\"\n                    />\n                    <wx-view\n                      class=\"van-loading__text\"\n                      style=\"\"\n                    />\n                  </wx-view>\n                </van-loading>\n              </wx-button>\n            </van-button>\n          </wx-view>\n        </wx-view>\n      </van-submit-bar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        高级用法\n      </wx-view>\n      <van-submit-bar\n        customClass=\"van-submit-bar\"\n        bind:submit=\"onClickButton\"\n      >\n        <wx-view\n          class=\"van-submit-bar custom-class\"\n        >\n          <wx-view\n            class=\"van-submit-bar__tip\"\n          >\n            <wx-view\n              slot=\"tip\"\n            >\n              \n      您的收货地址不支持同城送\n      \n              <wx-text\n                class=\"edit-address\"\n                bind:tap=\"onClickLink\"\n              >\n                修改地址\n              </wx-text>\n            </wx-view>\n          </wx-view>\n          <wx-view\n            class=\"bar-class van-submit-bar__bar\"\n          >\n            <van-tag\n              customClass=\"submit-tag\"\n            >\n              <wx-view\n                class=\"custom-class van-tag van-tag--primary\"\n                style=\"\"\n              >\n                标签\n              </wx-view>\n            </van-tag>\n            <wx-view\n              class=\"van-submit-bar__text\"\n            >\n              <wx-text>\n                合计：\n              </wx-text>\n              <wx-text\n                class=\"van-submit-bar__price price-class\"\n              >\n                <wx-text\n                  class=\"van-submit-bar__currency\"\n                >\n                  ¥ \n                </wx-text>\n                <wx-text\n                  class=\"van-submit-bar__price-integer\"\n                >\n                  30\n                </wx-text>\n                <wx-text>\n                  .50\n                </wx-text>\n              </wx-text>\n              <wx-text\n                class=\"van-submit-bar__suffix-label\"\n              >\n                \n              </wx-text>\n            </wx-view>\n            <van-button\n              class=\"van-submit-bar__button\"\n              customClass=\"button-class\"\n              bind:click=\"onSubmit\"\n            >\n              <wx-button\n                appParameter=\"\"\n                ariaLabel=\"\"\n                businessId=\"\"\n                class=\"custom-class van-button van-button--danger van-button--normal van-button--round \"\n                data-detail=\"{{null}}\"\n                formType=\"\"\n                hoverClass=\"van-button--active hover-class\"\n                id=\"\"\n                lang=\"\"\n                openType=\"\"\n                sendMessageImg=\"\"\n                sendMessagePath=\"\"\n                sendMessageTitle=\"\"\n                sessionFrom=\"\"\n                showMessageCard=\"{{false}}\"\n                style=\"width: 100%;\"\n                bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                bind:chooseavatar=\"onChooseAvatar\"\n                bind:contact=\"onContact\"\n                bind:error=\"onError\"\n                bind:getphonenumber=\"onGetPhoneNumber\"\n                bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                bind:getuserinfo=\"onGetUserInfo\"\n                bind:launchapp=\"onLaunchApp\"\n                bind:opensetting=\"onOpenSetting\"\n                bind:tap=\"onClick\"\n              >\n                <wx-view\n                  class=\"van-button__text\"\n                >\n                  \n      提交订单\n    \n                </wx-view>\n              </wx-button>\n            </van-button>\n          </wx-view>\n        </wx-view>\n      </van-submit-bar>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/submit-bar/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/swipe-cell/README.md",
    "content": "# SwipeCell 滑动单元格\n\n### 介绍\n\n可以左右滑动来展示操作按钮的单元格组件。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-swipe-cell\": \"@vant/weapp/swipe-cell/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-swipe-cell right-width=\"{{ 65 }}\" left-width=\"{{ 65 }}\">\n  <view slot=\"left\" class=\"van-swipe-cell__left\">选择</view>\n  <van-cell-group>\n    <van-cell title=\"单元格\" value=\"内容\" />\n  </van-cell-group>\n  <view slot=\"right\" class=\"van-swipe-cell__right\">删除</view>\n</van-swipe-cell>\n```\n\n### 异步关闭\n\n当开启`async-close`时， 通过绑定`close`事件，可以自定义两侧滑动内容点击时的关闭行为。\n\n```html\n<van-swipe-cell\n  id=\"swipe-cell\"\n  right-width=\"{{ 65 }}\"\n  left-width=\"{{ 65 }}\"\n  async-close\n  bind:close=\"onClose\"\n>\n  <view slot=\"left\">选择</view>\n  <van-cell-group>\n    <van-cell title=\"单元格\" value=\"内容\" />\n  </van-cell-group>\n  <view slot=\"right\">删除</view>\n</van-swipe-cell>\n```\n\n```js\nPage({\n  onClose(event) {\n    const { position, instance } = event.detail;\n    switch (position) {\n      case 'left':\n      case 'cell':\n        instance.close();\n        break;\n      case 'right':\n        Dialog.confirm({\n          message: '确定删除吗？',\n        }).then(() => {\n          instance.close();\n        });\n        break;\n    }\n  },\n});\n```\n\n### 主动打开\n\n```html\n<van-swipe-cell\n  id=\"swipe-cell2\"\n  right-width=\"{{ 65 }}\"\n  left-width=\"{{ 65 }}\"\n  name=\"示例\"\n  bind:open=\"onOpen\"\n>\n  <view slot=\"left\" class=\"van-swipe-cell__left\">选择</view>\n  <van-cell-group>\n    <van-cell title=\"单元格\" value=\"内容\" />\n  </van-cell-group>\n  <view slot=\"right\" class=\"van-swipe-cell__right\">删除</view>\n</van-swipe-cell>\n```\n\n```js\nPage({\n  onOpen(event) {\n    const { position, name } = event.detail;\n    switch (position) {\n      case 'left':\n        Notify({\n          type: 'primary',\n          message: `${name}${position}部分展示open事件被触发`,\n        });\n        break;\n      case 'right':\n        Notify({\n          type: 'primary',\n          message: `${name}${position}部分展示open事件被触发`,\n        });\n        break;\n    }\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 标识符，可以在 close 事件的参数中获取到 | _string \\| number_ | - |\n| left-width | 左侧滑动区域宽度 | _number_ | `0` |\n| right-width | 右侧滑动区域宽度 | _number_ | `0` |\n| async-close | 是否异步关闭 | _boolean_ | `false` |\n| disabled `v1.3.4` | 是否禁用滑动 | _boolean_ | `false` |\n\n### Slot\n\n| 名称  | 说明           |\n| ----- | -------------- |\n| -     | 自定义显示内容 |\n| left  | 左侧滑动内容   |\n| right | 右侧滑动内容   |\n\n### Events\n\n| 事件名 | 说明 | 参数 |\n| --- | --- | --- |\n| bind:click | 点击时触发 | 关闭时的点击位置 (`left` `right` `cell` `outside`) |\n| bind:close | 关闭时触发 | { position: 'left' \\| 'right' , instance , name: string } |\n| bind:open | 打开时触发 | { position: 'left' \\| 'right' , name: string } |\n\n### close 参数\n\n| 参数     | 类型     | 说明                                               |\n| -------- | -------- | -------------------------------------------------- |\n| position | _string_ | 关闭时的点击位置 (`left` `right` `cell` `outside`) |\n| instance | _object_ | SwipeCell 实例                                     |\n| name     | 标识符   | _string_                                           |\n\n### 方法\n\n通过 selectComponent 可以获取到 SwipeCell 实例并调用实例方法\n\n| 方法名 | 参数                      | 返回值 | 介绍             |\n| ------ | ------------------------- | ------ | ---------------- |\n| open   | position: `left \\| right` | -      | 打开单元格侧边栏 |\n| close  | -                         | -      | 收起单元格侧边栏 |\n"
  },
  {
    "path": "packages/swipe-cell/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-dialog\": \"../../dialog/index\",\n    \"van-notify\": \"../../notify/index\",\n    \"van-swipe-cell\": \"../../swipe-cell/index\",\n    \"van-cell-group\": \"../../cell-group/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/swipe-cell/demo/index.less",
    "content": ".demo-swipe-cell {\n  user-select: none;\n}\n\n.van-swipe-cell__left,\n.van-swipe-cell__right {\n  display: inline-block;\n  width: 65px;\n  height: 44px;\n  font-size: 15px;\n  line-height: 44px;\n  color: #fff;\n  text-align: center;\n  background-color: #ee0a24;\n}\n"
  },
  {
    "path": "packages/swipe-cell/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Dialog from '../../dialog/dialog';\nimport Notify from '../../notify/notify';\n\nVantComponent({\n  methods: {\n    onClose(event) {\n      const { position, instance } = event.detail;\n      switch (position) {\n        case 'left':\n        case 'cell':\n          instance.close();\n          break;\n        case 'right':\n          Dialog.confirm({\n            context: this,\n            message: '确定删除吗？',\n          }).then(() => {\n            instance.close();\n          });\n          break;\n      }\n    },\n\n    onOpen(event) {\n      const { position, name } = event.detail;\n      switch (position) {\n        case 'left':\n          Notify({\n            context: this,\n            type: 'primary',\n            message: `${name}${position}部分展示open事件被触发`,\n          });\n          break;\n        case 'right':\n          Notify({\n            context: this,\n            type: 'primary',\n            message: `${name}${position}部分展示open事件被触发`,\n          });\n          break;\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/swipe-cell/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-swipe-cell right-width=\"{{ 65 }}\" left-width=\"{{ 65 }}\">\n    <view slot=\"left\" class=\"van-swipe-cell__left\">选择</view>\n    <van-cell-group>\n      <van-cell title=\"单元格\" value=\"内容\" />\n    </van-cell-group>\n    <view slot=\"right\" class=\"van-swipe-cell__right\">删除</view>\n  </van-swipe-cell>\n</demo-block>\n\n<demo-block title=\"异步关闭\">\n  <van-swipe-cell id=\"swipe-cell\" right-width=\"{{ 65 }}\" left-width=\"{{ 65 }}\" async-close bind:close=\"onClose\">\n    <view slot=\"left\" class=\"van-swipe-cell__left\">选择</view>\n    <van-cell-group>\n      <van-cell title=\"单元格\" value=\"内容\" />\n    </van-cell-group>\n    <view slot=\"right\" class=\"van-swipe-cell__right\">删除</view>\n  </van-swipe-cell>\n</demo-block>\n\n<demo-block title=\"主动打开\">\n  <van-swipe-cell id=\"swipe-cell2\" right-width=\"{{ 65 }}\" left-width=\"{{ 65 }}\" name=\"示例\" bind:open=\"onOpen\" >\n    <view slot=\"left\" class=\"van-swipe-cell__left\">选择</view>\n    <van-cell-group>\n      <van-cell title=\"单元格\" value=\"内容\" />\n    </van-cell-group>\n    <view slot=\"right\" class=\"van-swipe-cell__right\">删除</view>\n  </van-swipe-cell>\n</demo-block>\n\n<van-dialog id=\"van-dialog\" />\n<van-notify id=\"van-notify\" />\n"
  },
  {
    "path": "packages/swipe-cell/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/swipe-cell/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-swipe-cell {\n  position: relative;\n  overflow: hidden;\n\n  &__left,\n  &__right {\n    position: absolute;\n    top: 0;\n    height: 100%;\n  }\n\n  &__left {\n    left: 0;\n    transform: translate3d(-100%, 0, 0);\n  }\n\n  &__right {\n    right: 0;\n    transform: translate3d(100%, 0, 0);\n  }\n}\n"
  },
  {
    "path": "packages/swipe-cell/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { touch } from '../mixins/touch';\nimport { range } from '../common/utils';\n\nconst THRESHOLD = 0.3;\nlet ARRAY: WechatMiniprogram.Component.TrivialInstance[] = [];\n\nVantComponent({\n  props: {\n    disabled: Boolean,\n    leftWidth: {\n      type: Number,\n      value: 0,\n      observer(leftWidth = 0) {\n        if (this.offset > 0) {\n          this.swipeMove(leftWidth);\n        }\n      },\n    },\n    rightWidth: {\n      type: Number,\n      value: 0,\n      observer(rightWidth = 0) {\n        if (this.offset < 0) {\n          this.swipeMove(-rightWidth);\n        }\n      },\n    },\n    asyncClose: Boolean,\n    name: {\n      type: null,\n      value: '',\n    },\n  },\n\n  mixins: [touch],\n\n  data: {\n    catchMove: false,\n    wrapperStyle: '',\n  },\n\n  created() {\n    this.offset = 0;\n    ARRAY.push(this);\n  },\n\n  destroyed() {\n    ARRAY = ARRAY.filter((item) => item !== this);\n  },\n\n  methods: {\n    open(position: 'left' | 'right') {\n      const { leftWidth, rightWidth } = this.data;\n      const offset = position === 'left' ? leftWidth : -rightWidth;\n      this.swipeMove(offset);\n\n      this.$emit('open', {\n        position,\n        name: this.data.name,\n      });\n    },\n\n    close() {\n      this.swipeMove(0);\n    },\n\n    swipeMove(offset = 0) {\n      this.offset = range(offset, -this.data.rightWidth, this.data.leftWidth);\n\n      const transform = `translate3d(${this.offset}px, 0, 0)`;\n      const transition = this.dragging\n        ? 'none'\n        : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';\n\n      this.setData({\n        wrapperStyle: `\n        -webkit-transform: ${transform};\n        -webkit-transition: ${transition};\n        transform: ${transform};\n        transition: ${transition};\n      `,\n      });\n    },\n\n    swipeLeaveTransition() {\n      const { leftWidth, rightWidth } = this.data;\n      const { offset } = this;\n\n      if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) {\n        this.open('right');\n      } else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) {\n        this.open('left');\n      } else {\n        this.swipeMove(0);\n      }\n      this.setData({ catchMove: false });\n    },\n\n    startDrag(event: WechatMiniprogram.TouchEvent) {\n      if (this.data.disabled) {\n        return;\n      }\n\n      this.startOffset = this.offset;\n      this.touchStart(event);\n    },\n\n    noop() {},\n\n    onDrag(event: WechatMiniprogram.TouchEvent) {\n      if (this.data.disabled) {\n        return;\n      }\n\n      this.touchMove(event);\n\n      if (this.direction !== 'horizontal') {\n        return;\n      }\n\n      this.dragging = true;\n\n      ARRAY.filter(\n        (item) => item !== this && item.offset !== 0\n      ).forEach((item) => item.close());\n\n      this.setData({ catchMove: true });\n      this.swipeMove(this.startOffset + this.deltaX);\n    },\n\n    endDrag() {\n      if (this.data.disabled) {\n        return;\n      }\n\n      this.dragging = false;\n      this.swipeLeaveTransition();\n    },\n\n    onClick(event: WechatMiniprogram.TouchEvent) {\n      const { key: position = 'outside' } = event.currentTarget.dataset;\n      this.$emit('click', position);\n\n      if (!this.offset) {\n        return;\n      }\n\n      if (this.data.asyncClose) {\n        this.$emit('close', {\n          position,\n          instance: this,\n          name: this.data.name,\n        });\n      } else {\n        this.swipeMove(0);\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/swipe-cell/index.wxml",
    "content": "<view\n  class=\"van-swipe-cell custom-class\"\n  data-key=\"cell\"\n  catchtap=\"onClick\"\n  bindtouchstart=\"startDrag\"\n  catchtouchmove=\"{{ catchMove ? 'noop' : '' }}\"\n  capture-bind:touchmove=\"onDrag\"\n  bindtouchend=\"endDrag\"\n  bindtouchcancel=\"endDrag\"\n>\n  <view style=\"{{ wrapperStyle }}\">\n    <view wx:if=\"{{ leftWidth }}\" class=\"van-swipe-cell__left\" data-key=\"left\" catch:tap=\"onClick\">\n      <slot name=\"left\" />\n    </view>\n    <slot />\n    <view wx:if=\"{{ rightWidth }}\" class=\"van-swipe-cell__right\" data-key=\"right\" catch:tap=\"onClick\">\n      <slot name=\"right\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/swipe-cell/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-swipe-cell>\n        <wx-view\n          class=\"van-swipe-cell custom-class\"\n          data-key=\"cell\"\n          catch:tap=\"onClick\"\n          bind:touchcancel=\"endDrag\"\n          bind:touchend=\"endDrag\"\n          catch:touchmove=\"\"\n          bind:touchstart=\"startDrag\"\n        >\n          <wx-view\n            style=\"\"\n          >\n            <wx-view\n              class=\"van-swipe-cell__left\"\n              data-key=\"left\"\n              catch:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-swipe-cell__left\"\n                slot=\"left\"\n              >\n                选择\n              </wx-view>\n            </wx-view>\n            <van-cell-group>\n              <wx-view\n                class=\"custom-class van-cell-group van-hairline--top-bottom\"\n              >\n                <van-cell>\n                  <wx-view\n                    class=\"custom-class van-cell\"\n                    hoverClass=\"van-cell--hover hover-class\"\n                    hoverStayTime=\"70\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-cell__title title-class\"\n                      style=\"\"\n                    >\n                      单元格\n                    </wx-view>\n                    <wx-view\n                      class=\"van-cell__value value-class\"\n                    >\n                      内容\n                    </wx-view>\n                  </wx-view>\n                </van-cell>\n              </wx-view>\n            </van-cell-group>\n            <wx-view\n              class=\"van-swipe-cell__right\"\n              data-key=\"right\"\n              catch:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-swipe-cell__right\"\n                slot=\"right\"\n              >\n                删除\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-swipe-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        异步关闭\n      </wx-view>\n      <van-swipe-cell\n        id=\"swipe-cell\"\n        bind:close=\"onClose\"\n      >\n        <wx-view\n          class=\"van-swipe-cell custom-class\"\n          data-key=\"cell\"\n          catch:tap=\"onClick\"\n          bind:touchcancel=\"endDrag\"\n          bind:touchend=\"endDrag\"\n          catch:touchmove=\"\"\n          bind:touchstart=\"startDrag\"\n        >\n          <wx-view\n            style=\"\"\n          >\n            <wx-view\n              class=\"van-swipe-cell__left\"\n              data-key=\"left\"\n              catch:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-swipe-cell__left\"\n                slot=\"left\"\n              >\n                选择\n              </wx-view>\n            </wx-view>\n            <van-cell-group>\n              <wx-view\n                class=\"custom-class van-cell-group van-hairline--top-bottom\"\n              >\n                <van-cell>\n                  <wx-view\n                    class=\"custom-class van-cell\"\n                    hoverClass=\"van-cell--hover hover-class\"\n                    hoverStayTime=\"70\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-cell__title title-class\"\n                      style=\"\"\n                    >\n                      单元格\n                    </wx-view>\n                    <wx-view\n                      class=\"van-cell__value value-class\"\n                    >\n                      内容\n                    </wx-view>\n                  </wx-view>\n                </van-cell>\n              </wx-view>\n            </van-cell-group>\n            <wx-view\n              class=\"van-swipe-cell__right\"\n              data-key=\"right\"\n              catch:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-swipe-cell__right\"\n                slot=\"right\"\n              >\n                删除\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-swipe-cell>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        主动打开\n      </wx-view>\n      <van-swipe-cell\n        id=\"swipe-cell2\"\n        bind:open=\"onOpen\"\n      >\n        <wx-view\n          class=\"van-swipe-cell custom-class\"\n          data-key=\"cell\"\n          catch:tap=\"onClick\"\n          bind:touchcancel=\"endDrag\"\n          bind:touchend=\"endDrag\"\n          catch:touchmove=\"\"\n          bind:touchstart=\"startDrag\"\n        >\n          <wx-view\n            style=\"\"\n          >\n            <wx-view\n              class=\"van-swipe-cell__left\"\n              data-key=\"left\"\n              catch:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-swipe-cell__left\"\n                slot=\"left\"\n              >\n                选择\n              </wx-view>\n            </wx-view>\n            <van-cell-group>\n              <wx-view\n                class=\"custom-class van-cell-group van-hairline--top-bottom\"\n              >\n                <van-cell>\n                  <wx-view\n                    class=\"custom-class van-cell\"\n                    hoverClass=\"van-cell--hover hover-class\"\n                    hoverStayTime=\"70\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-cell__title title-class\"\n                      style=\"\"\n                    >\n                      单元格\n                    </wx-view>\n                    <wx-view\n                      class=\"van-cell__value value-class\"\n                    >\n                      内容\n                    </wx-view>\n                  </wx-view>\n                </van-cell>\n              </wx-view>\n            </van-cell-group>\n            <wx-view\n              class=\"van-swipe-cell__right\"\n              data-key=\"right\"\n              catch:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-swipe-cell__right\"\n                slot=\"right\"\n              >\n                删除\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-swipe-cell>\n    </wx-view>\n  </demo-block>\n  <van-dialog>\n    <van-popup\n      customClass=\"van-dialog van-dialog--default custom-class\"\n      bind:after-leave=\"onAfterLeave\"\n      bind:close=\"onClickOverlay\"\n    >\n      <van-overlay\n        bind:click=\"onClickOverlay\"\n      >\n        <van-transition\n          customClass=\"van-overlay custom-class\"\n          bind:tap=\"onClick\"\n          catch:touchmove=\"noop\"\n        />\n      </van-overlay>\n    </van-popup>\n  </van-dialog>\n  <van-notify\n    id=\"van-notify\"\n  >\n    <van-transition\n      customClass=\"van-notify__container\"\n      bind:tap=\"onTap\"\n    />\n  </van-notify>\n</main>\n`;\n"
  },
  {
    "path": "packages/swipe-cell/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/switch/README.md",
    "content": "# Switch 开关\n\n### 介绍\n\n用于在打开和关闭状态之间进行切换。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-switch\": \"@vant/weapp/switch/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-switch checked=\"{{ checked }}\" bind:change=\"onChange\" />\n```\n\n```javascript\nPage({\n  data: {\n    checked: true,\n  },\n\n  onChange({ detail }) {\n    // 需要手动对 checked 状态进行更新\n    this.setData({ checked: detail });\n  },\n});\n```\n\n### 禁用状态\n\n```html\n<van-switch checked=\"{{ checked }}\" disabled />\n```\n\n### 加载状态\n\n```html\n<van-switch checked=\"{{ checked }}\" loading />\n```\n\n### 自定义大小\n\n```html\n<van-switch checked=\"{{ checked }}\" size=\"24px\" />\n```\n\n### 自定义颜色\n\n```html\n<van-switch\n  checked=\"{{ checked }}\"\n  active-color=\"#07c160\"\n  inactive-color=\"#ee0a24\"\n/>\n```\n\n### 异步控制\n\n```html\n<van-switch checked=\"{{ checked }}\" bind:change=\"onChange\" />\n```\n\n```js\nPage({\n  data: {\n    checked: true,\n  },\n\n  onChange({ detail }) {\n    wx.showModal({\n      title: '提示',\n      content: '是否切换开关？',\n      success: (res) => {\n        if (res.confirm) {\n          this.setData({ checked2: detail });\n        }\n      },\n    });\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数           | 说明                   | 类型      | 默认值    |\n| -------------- | ---------------------- | --------- | --------- |\n| name           | 在表单内提交时的标识符 | _string_  | -         |\n| checked        | 开关选中状态           | _any_     | `false`   |\n| loading        | 是否为加载状态         | _boolean_ | `false`   |\n| disabled       | 是否为禁用状态         | _boolean_ | `false`   |\n| size           | 开关尺寸               | _string_  | `30px`    |\n| active-color   | 打开时的背景色         | _string_  | `#1989fa` |\n| inactive-color | 关闭时的背景色         | _string_  | `#fff`    |\n| active-value   | 打开时的值             | _any_     | `true`    |\n| inactive-value | 关闭时的值             | _any_     | `false`   |\n\n### Events\n\n| 事件名      | 说明             | 参数                       |\n| ----------- | ---------------- | -------------------------- |\n| bind:change | 开关状态切换回调 | event.detail: 是否选中开关 |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n| node-class   | 圆点样式类   |\n"
  },
  {
    "path": "packages/switch/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-switch\": \"../../switch/index\",\n    \"van-dialog\": \"../../dialog/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/switch/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Dialog from '../../dialog/dialog';\n\nVantComponent({\n  data: {\n    checked: true,\n    checked2: true,\n  },\n\n  methods: {\n    onChange({ detail }) {\n      this.setData({ checked: detail });\n    },\n\n    onChange2({ detail }) {\n      Dialog.confirm({\n        context: this,\n        title: '提示',\n        message: '是否切换开关？',\n      }).then(() => {\n        this.setData({ checked2: detail });\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/switch/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n  <van-switch\n    checked=\"{{ checked }}\"\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"禁用状态\" padding>\n  <van-switch\n    checked=\"{{ checked }}\"\n    disabled\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"加载状态\" padding>\n  <van-switch\n    checked=\"{{ checked }}\"\n    loading\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义大小\" padding>\n  <van-switch\n    checked=\"{{ checked }}\"\n    size=\"24px\"\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义颜色\" padding>\n  <van-switch\n    checked=\"{{ checked }}\"\n    active-color=\"#07c160\"\n    inactive-color=\"#ee0a24\"\n    bind:change=\"onChange\"\n  />\n</demo-block>\n\n<demo-block title=\"异步控制\" padding>\n  <van-switch\n    checked=\"{{ checked2 }}\"\n    size=\"36px\"\n    bind:change=\"onChange2\"\n  />\n</demo-block>\n\n<van-dialog id=\"van-dialog\" />\n"
  },
  {
    "path": "packages/switch/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "packages/switch/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-switch {\n  position: relative;\n  display: inline-block;\n  box-sizing: content-box;\n  width: var(--switch-width, @switch-width);\n  height: var(--switch-height, @switch-height);\n  background-color: var(--switch-background-color, @switch-background-color);\n  border: var(--switch-border, @switch-border);\n  border-radius: var(--switch-node-size, @switch-node-size);\n  transition: background-color\n    var(--switch-transition-duration, @switch-transition-duration);\n\n  &__node {\n    position: absolute;\n    top: 0;\n    left: 0;\n    border-radius: 100%;\n    z-index: var(--switch-node-z-index, @switch-node-z-index);\n    width: var(--switch-node-size, @switch-node-size);\n    height: var(--switch-node-size, @switch-node-size);\n    background-color: var(\n      --switch-node-background-color,\n      @switch-node-background-color\n    );\n    box-shadow: var(--switch-node-box-shadow, @switch-node-box-shadow);\n    transition: var(--switch-transition-duration, @switch-transition-duration)\n      cubic-bezier(0.3, 1.05, 0.4, 1.05);\n  }\n\n  &__loading {\n    position: absolute !important;\n    top: 25%;\n    left: 25%;\n    width: 50%;\n    height: 50%;\n  }\n\n  &--on {\n    background-color: var(\n      --switch-on-background-color,\n      @switch-on-background-color\n    );\n\n    .van-switch__node {\n      transform: translateX(\n        calc(\n          var(--switch-width, @switch-width) -\n            var(--switch-node-size, @switch-node-size)\n        )\n      );\n    }\n  }\n\n  &--disabled {\n    opacity: var(--switch-disabled-opacity, @switch-disabled-opacity);\n  }\n}\n"
  },
  {
    "path": "packages/switch/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  field: true,\n\n  classes: ['node-class'],\n\n  props: {\n    checked: null,\n    loading: Boolean,\n    disabled: Boolean,\n    activeColor: String,\n    inactiveColor: String,\n    size: {\n      type: String,\n      value: '30',\n    },\n    activeValue: {\n      type: null,\n      value: true,\n    },\n    inactiveValue: {\n      type: null,\n      value: false,\n    },\n  },\n\n  methods: {\n    onClick() {\n      const { activeValue, inactiveValue, disabled, loading } = this.data;\n\n      if (disabled || loading) {\n        return;\n      }\n\n      const checked = this.data.checked === activeValue;\n      const value = checked ? inactiveValue : activeValue;\n\n      this.$emit('input', value);\n      this.$emit('change', value);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/switch/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class\"\n  style=\"{{ computed.rootStyle({ size, checked, activeColor, inactiveColor, activeValue }) }}\"\n  bind:tap=\"onClick\"\n>\n  <view class=\"van-switch__node node-class\">\n    <van-loading\n      wx:if=\"{{ loading }}\"\n      color=\"{{ computed.loadingColor({ checked, activeColor, inactiveColor, activeValue }) }}\"\n      custom-class=\"van-switch__loading\"\n    />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/switch/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  var currentColor = data.checked === data.activeValue ? data.activeColor : data.inactiveColor;\n\n  return style({\n    'font-size': addUnit(data.size),\n    'background-color': currentColor,\n  });\n}\n\nvar BLUE = '#1989fa';\nvar GRAY_DARK = '#969799';\n\nfunction loadingColor(data) {\n  return data.checked === data.activeValue\n    ? data.activeColor || BLUE\n    : data.inactiveColor || GRAY_DARK;\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  loadingColor: loadingColor,\n};\n"
  },
  {
    "path": "packages/switch/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-switch\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-switch van-switch--on custom-class\"\n          style=\"font-size:30px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-switch__node node-class\"\n          />\n        </wx-view>\n      </van-switch>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用状态\n      </wx-view>\n      <van-switch\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-switch van-switch--on van-switch--disabled custom-class\"\n          style=\"font-size:30px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-switch__node node-class\"\n          />\n        </wx-view>\n      </van-switch>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载状态\n      </wx-view>\n      <van-switch\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-switch van-switch--on custom-class\"\n          style=\"font-size:30px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-switch__node node-class\"\n          >\n            <van-loading\n              customClass=\"van-switch__loading\"\n            >\n              <wx-view\n                class=\"custom-class van-loading\"\n              >\n                <wx-view\n                  class=\"van-loading__spinner van-loading__spinner--circular\"\n                  style=\"color:#1989fa\"\n                />\n                <wx-view\n                  class=\"van-loading__text\"\n                  style=\"\"\n                />\n              </wx-view>\n            </van-loading>\n          </wx-view>\n        </wx-view>\n      </van-switch>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义大小\n      </wx-view>\n      <van-switch\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-switch van-switch--on custom-class\"\n          style=\"font-size:24px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-switch__node node-class\"\n          />\n        </wx-view>\n      </van-switch>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义颜色\n      </wx-view>\n      <van-switch\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-switch van-switch--on custom-class\"\n          style=\"font-size:30px;background-color:#07c160\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-switch__node node-class\"\n          />\n        </wx-view>\n      </van-switch>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        异步控制\n      </wx-view>\n      <van-switch\n        bind:change=\"onChange2\"\n      >\n        <wx-view\n          class=\"van-switch van-switch--on custom-class\"\n          style=\"font-size:36px\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-switch__node node-class\"\n          />\n        </wx-view>\n      </van-switch>\n    </wx-view>\n  </demo-block>\n  <van-dialog>\n    <van-popup\n      customClass=\"van-dialog van-dialog--default custom-class\"\n      bind:after-leave=\"onAfterLeave\"\n      bind:close=\"onClickOverlay\"\n    >\n      <van-overlay\n        bind:click=\"onClickOverlay\"\n      >\n        <van-transition\n          customClass=\"van-overlay custom-class\"\n          bind:tap=\"onClick\"\n          catch:touchmove=\"noop\"\n        />\n      </van-overlay>\n    </van-popup>\n  </van-dialog>\n</main>\n`;\n"
  },
  {
    "path": "packages/switch/test/__snapshots__/index.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`switch should allow to custom active-value and inactive-value 1`] = `\n<wx-view\n  class=\"van-switch van-switch--on custom-class\"\n  style=\"font-size:30px;background-color:#07c160\"\n  bind:tap=\"onClick\"\n>\n  <wx-view\n    class=\"van-switch__node node-class\"\n  />\n</wx-view>\n`;\n\nexports[`switch should allow to custom active-value and inactive-value 2`] = `\n<wx-view\n  class=\"van-switch custom-class\"\n  style=\"font-size:30px;background-color:#ee0a24\"\n  bind:tap=\"onClick\"\n>\n  <wx-view\n    class=\"van-switch__node node-class\"\n  />\n</wx-view>\n`;\n"
  },
  {
    "path": "packages/switch/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/switch/test/index.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ndescribe('switch', () => {\n  const VanSwitch = simulate.load(\n    path.resolve(__dirname, '../../switch/index'),\n    'van-switch',\n    {\n      rootPath: path.resolve(__dirname, '../../'),\n    }\n  );\n\n  test('should allow to custom active-value and inactive-value', async () => {\n    const comp = simulate.render(\n      simulate.load({\n        usingComponents: {\n          'van-switch': VanSwitch,\n        },\n        template: `\n          <van-switch\n            id=\"wrapper\"\n            checked=\"{{ checked }}\"\n            active-color=\"#07c160\"\n            inactive-color=\"#ee0a24\"\n            active-value=\"on\"\n            inactive-value=\"off\"\n            bind:change=\"onChange\"\n          />\n        `,\n        data: {\n          checked: 'on',\n        },\n        methods: {\n          onChange({ detail }) {\n            this.setData({ checked: detail });\n          },\n        },\n      })\n    );\n    comp.attach(document.createElement('parent-wrapper'));\n\n    const wrapper = comp.querySelector('#wrapper');\n    const btn = wrapper?.querySelector('.van-switch');\n    expect((btn as any).toJSON()).toMatchSnapshot();\n    btn?.dispatchEvent('tap');\n    await simulate.sleep(10);\n    expect((btn as any).toJSON()).toMatchSnapshot();\n    expect(comp.data.checked).toEqual('off');\n  });\n});\n"
  },
  {
    "path": "packages/tab/README.md",
    "content": "# Tab 标签页\n\n### 介绍\n\n选项卡组件，用于在不同的内容区域之间进行切换。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-tab\": \"@vant/weapp/tab/index\",\n  \"van-tabs\": \"@vant/weapp/tabs/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n通过`active`设定当前激活标签对应的索引值，默认情况下启用第一个标签。\n\n```html\n<van-tabs active=\"{{ active }}\" bind:change=\"onChange\">\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\">内容 2</van-tab>\n  <van-tab title=\"标签 3\">内容 3</van-tab>\n  <van-tab title=\"标签 4\">内容 4</van-tab>\n</van-tabs>\n```\n\n```js\nPage({\n  data: {\n    active: 1,\n  },\n\n  onChange(event) {\n    wx.showToast({\n      title: `切换到标签 ${event.detail.name}`,\n      icon: 'none',\n    });\n  },\n});\n```\n\n### 通过名称匹配\n\n在标签指定`name`属性的情况下，`active`的值为当前标签的`name`（此时无法通过索引值来匹配标签）。\n\n```html\n<van-tabs active=\"a\">\n  <van-tab title=\"标签 1\" name=\"a\">内容 1</van-tab>\n  <van-tab title=\"标签 2\" name=\"b\">内容 2</van-tab>\n  <van-tab title=\"标签 3\" name=\"c\">内容 3</van-tab>\n</van-tabs>\n```\n\n### 横向滚动\n\n多于 5 个标签时，Tab 可以横向滚动。\n\n```html\n<van-tabs active=\"{{ active }}\">\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\">内容 2</van-tab>\n  <van-tab title=\"标签 3\">内容 3</van-tab>\n  <van-tab title=\"标签 4\">内容 4</van-tab>\n  <van-tab title=\"标签 5\">内容 5</van-tab>\n  <van-tab title=\"标签 6\">内容 6</van-tab>\n</van-tabs>\n```\n\n### 禁用标签\n\n设置`disabled`属性即可禁用标签。如果需要监听禁用标签的点击事件，可以在`van-tabs`上监听`disabled`事件。\n\n```html\n<van-tabs bind:disabled=\"onClickDisabled\">\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\" disabled>内容 2</van-tab>\n  <van-tab title=\"标签 3\">内容 3</van-tab>\n</van-tabs>\n```\n\n```javascript\nPage({\n  onClickDisabled(event) {\n    wx.showToast({\n      title: `标签 ${event.detail.name} 已被禁用`,\n      icon: 'none',\n    });\n  },\n});\n```\n\n### 样式风格\n\n`Tab`支持两种样式风格：`line`和`card`，默认为`line`样式，可以通过`type`属性修改样式风格。\n\n```html\n<van-tabs type=\"card\">\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\">内容 2</van-tab>\n  <van-tab title=\"标签 3\">内容 3</van-tab>\n</van-tabs>\n```\n\n### 点击事件\n\n可以在`van-tabs`上绑定`click`事件，在回调参数的`event.detail`中可以取得被点击标签的标题和标识符。\n\n```html\n<van-tabs bind:click=\"onClick\">\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\">内容 2</van-tab>\n</van-tabs>\n```\n\n```javascript\nPage({\n  onClick(event) {\n    wx.showToast({\n      title: `点击标签 ${event.detail.name}`,\n      icon: 'none',\n    });\n  },\n});\n```\n\n### 粘性布局\n\n通过`sticky`属性可以开启粘性布局，粘性布局下，当 Tab 滚动到顶部时会自动吸顶。\n\n```html\n<van-tabs sticky>\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\">内容 2</van-tab>\n  <van-tab title=\"标签 3\">内容 3</van-tab>\n  <van-tab title=\"标签 4\">内容 4</van-tab>\n</van-tabs>\n```\n\n### 切换动画\n\n可以通过`animated`来设置是否启用切换 tab 时的动画。\n\n```html\n<van-tabs animated>\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\">内容 2</van-tab>\n  <van-tab title=\"标签 3\">内容 3</van-tab>\n  <van-tab title=\"标签 4\">内容 4</van-tab>\n</van-tabs>\n```\n\n### 滑动切换\n\n通过`swipeable`属性可以开启滑动切换标签页。\n\n```html\n<van-tabs swipeable>\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\">内容 2</van-tab>\n  <van-tab title=\"标签 3\">内容 3</van-tab>\n  <van-tab title=\"标签 4\">内容 4</van-tab>\n</van-tabs>\n```\n\n### 嵌套 popup\n\n如果将 van-tabs 嵌套在 van-popup 等会隐藏内容的组件或节点内，当 van-tabs 显示时下划线将不会正常显示。\n\n此时可以通过使用 `wx:if` 手动控制 van-tabs 的渲染来规避这种场景。\n\n```html\n<van-popup show=\"{{ show }}\">\n  <van-tabs wx:if=\"{{ show }}\">\n    <van-tab title=\"标签 1\">内容 1</van-tab>\n    <van-tab title=\"标签 2\">内容 2</van-tab>\n    <van-tab title=\"标签 3\">内容 3</van-tab>\n    <van-tab title=\"标签 4\">内容 4</van-tab>\n  </van-tabs>\n</van-popup>\n```\n\n### 异步切换\n\n通过 `before-change` 事件可以在切换标签前执行特定的逻辑，实现切换前校验、异步切换的目的\n\n```html\n<van-tabs active=\"{{ active }}\" use-before-change=\"{{ true }}\" bind:change=\"onChange\" bind:before-change=\"onBeforeChange\" >\n  <van-tab title=\"标签 1\">内容 1</van-tab>\n  <van-tab title=\"标签 2\">内容 2</van-tab>\n  <van-tab title=\"标签 3\">内容 3</van-tab>\n  <van-tab title=\"标签 4\">内容 4</van-tab>\n</van-tabs>\n```\n\n```js\nPage({\n  data: {\n    active: 1,\n  },\n\n  onChange(event) {\n    wx.showToast({\n      title: `切换到标签 ${event.detail.name}`,\n      icon: 'none',\n    });\n  },\n  onBeforeChange(event) {\n    const { callback, title } = event.detail;\n    \n    wx.showModal({\n      title: '异步切换',\n      content: `确定要切换至 ${title} tab吗？`,\n      success: (res) => {\n        if (res.confirm) {\n          callback(true)\n        } else if (res.cancel) {\n          callback(false)\n        }\n      },\n    })\n  }\n});\n```\n\n## API\n\n### Tabs Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| type | 样式风格，可选值为`card` | _string_ | `line` |\n| color | 标签主题色 | _string_ | `#ee0a24` |\n| active | 当前选中标签的标识符 | _string \\| number_ | `0` |\n| duration | 动画时间，单位秒 | _number_ | `0.3` |\n| line-width | 底部条宽度，默认单位`px` | _string \\| number_ | `40px` |\n| line-height | 底部条高度，默认单位`px` | _string \\| number_ | `3px` |\n| animated | 是否开启切换标签内容时的转场动画 | _boolean_ | `false` |\n| border | 是否展示外边框，仅在 `line` 风格下生效 | _boolean_ | `false` |\n| ellipsis | 是否省略过长的标题文字 | _boolean_ | `true` |\n| sticky | 是否使用粘性定位布局 | _boolean_ | `false` |\n| swipeable | 是否开启手势滑动切换 | _boolean_ | `false` |\n| lazy-render | 是否开启标签页内容延迟渲染 | _boolean_ | `true` |\n| offset-top | 粘性定位布局下与顶部的最小距离，单位`px` | _number_ | - |\n| swipe-threshold | 滚动阈值，标签数量超过阈值且总宽度超过标签栏宽度时开始横向滚动 | _number_ | `5` |\n| title-active-color | 标题选中态颜色 | _string_ | - |\n| title-inactive-color | 标题默认态颜色 | _string_ | - |\n| z-index | z-index 层级 | _number_ | `1` |\n| use-before-change `v1.10.10` | 是否开启切换前校验 | _boolean_ | `false` |\n\n### Tab Props\n\n| 参数        | 说明                       | 类型               | 默认值       |\n| ----------- | -------------------------- | ------------------ | ------------ |\n| name        | 标签名称，作为匹配的标识符 | _string \\| number_ | 标签的索引值 |\n| title       | 标题                       | _string_           | -            |\n| disabled    | 是否禁用标签               | _boolean_          | `false`      |\n| dot         | 是否显示小红点             | _boolean_          | -            |\n| info        | 图标右上角提示信息         | _string \\| number_ | -            |\n| title-style | 自定义标题样式             | _string_           | -            |\n\n### Tabs Slot\n\n| 名称      | 说明         |\n| --------- | ------------ |\n| nav-left  | 标题左侧内容 |\n| nav-right | 标题右侧内容 |\n\n### Tab Slot\n\n| 名称 | 说明       |\n| ---- | ---------- |\n| -    | 标签页内容 |\n\n### Tabs Event\n\n| 事件名 | 说明 | 参数 |\n| --- | --- | --- |\n| bind:click | 点击标签时触发 | name：标签标识符，title：标题 |\n| bind:before-change `v1.10.10` | tab 切换前会触发，在回调函数中返回 `false` 可终止 tab 切换，绑定事件的同时需要将`use-before-change`属性设置为`true` | `event.detail.name`: 当前切换的 tab 标识符， `event.detail.title`: 当前切换的 tab 标题， `event.detail.index`: 当前切换的 tab 下标，`event.detail.callback`: 回调函数，调用`callback(false)`终止 tab 切换 |\n| bind:change | 当前激活的标签改变时触发 | name：标签标识符，title：标题 |\n| bind:disabled | 点击被禁用的标签时触发 | name：标签标识符，title：标题 |\n| bind:scroll | 滚动时触发 | { scrollTop: 距离顶部位置, isFixed: 是否吸顶 } |\n\n### 外部样式类\n\n| 类名             | 说明               |\n| ---------------- | ------------------ |\n| custom-class     | 根节点样式类       |\n| nav-class        | 标签栏样式类       |\n| tab-class        | 标签样式类         |\n| tab-active-class | 标签激活态样式类   |\n| wrap-class       | 标签栏根节点样式类 |\n\n### 方法\n\n通过 selectComponent 可以获取到 Tabs 实例并调用实例方法。\n\n| 方法名 | 参数 | 返回值 | 介绍 |\n| --- | --- | --- | --- |\n| resize | - | - | 外层元素大小或组件显示状态变化时，可以调用此方法来触发重绘 |\n\n## 常见问题\n\n### 组件从隐藏状态切换到显示状态时，底部条位置错误？\n\nTabs 组件在挂载时，会获取自身的宽度，并计算出底部条的位置。如果组件一开始处于隐藏状态，则获取到的宽度永远为 0，因此无法展示底部条位置。\n\n#### 解决方法\n\n方法一，使用 `wx:if` 来控制组件展示，使组件重新初始化。\n\n```html\n<van-tabs wx:if=\"show\" />\n```\n\n方法二，调用组件的 resize 方法来主动触发重绘。\n\n```html\n<van-tabs id=\"tabs\" />\n```\n\n```js\nthis.selectComponent('#tabs').resize();\n```\n"
  },
  {
    "path": "packages/tab/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tab\": \"../../tab/index\",\n    \"van-tabs\": \"../../tabs/index\",\n    \"van-icon\": \"../../icon/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/tab/demo/index.less",
    "content": ".content {\n  padding: 20px;\n  background-color: #fff;\n}\n\n.content-2 {\n  padding: 20px;\n}\n\n.right-nav {\n  padding: 0 10px;\n  line-height: 44px !important;\n  background-color: #fff;\n}\n\n.special-tab {\n  transition: all 0.25s ease-in-out;\n}\n\n.special-tab-active {\n  font-size: 1.05em !important;\n}\n"
  },
  {
    "path": "packages/tab/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    tabs2: [1, 2],\n    tabs3: [1, 2, 3],\n    tabs4: [1, 2, 3, 4],\n    tabs6: [1, 2, 3, 4, 5, 6],\n    tabsWithName: [\n      { name: 'a', index: 1 },\n      { name: 'b', index: 2 },\n      { name: 'c', index: 3 },\n    ],\n  },\n\n  methods: {\n    onClickDisabled(event) {\n      wx.showToast({\n        title: `标签 ${event.detail.index + 1} 已被禁用`,\n        icon: 'none',\n      });\n    },\n\n    onChange(event) {\n      wx.showToast({\n        title: `切换到标签 ${event.detail.index + 1}`,\n        icon: 'none',\n      });\n    },\n\n    onClickNavRight() {\n      wx.showToast({\n        title: '点击 right nav',\n        icon: 'none',\n      });\n    },\n\n    onClick(event) {\n      wx.showToast({\n        title: `点击标签 ${event.detail.index + 1}`,\n        icon: 'none',\n      });\n    },\n    onBeforeChange(event) {\n      const { callback, title } = event.detail;\n\n      wx.showModal({\n        title: '异步切换',\n        content: `确定要切换至 ${title} tab吗？`,\n        success: (res) => {\n          if (res.confirm) {\n            callback(true);\n          } else if (res.cancel) {\n            callback(false);\n          }\n        },\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tab/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-tabs active=\"{{ 1 }}\" bind:change=\"onChange\">\n    <van-tab\n      wx:for=\"{{ tabs4 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"通过名称匹配\">\n  <van-tabs active=\"b\">\n    <van-tab\n      wx:for=\"{{ tabsWithName }}\"\n      wx:key=\"index\"\n      name=\"{{ item.name }}\"\n      title=\"{{ '标签 ' + item.index }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item.index}}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"横向滚动\">\n  <van-tabs>\n    <van-tab\n      wx:for=\"{{ tabs6 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"禁用标签\">\n  <van-tabs bind:disabled=\"onClickDisabled\">\n    <van-tab\n      wx:for=\"{{ tabs3 }}\"\n      wx:key=\"index\"\n      disabled=\"{{ index === 1 }}\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"样式风格\">\n  <van-tabs type=\"card\" tab-class=\"special-tab\">\n    <van-tab\n      wx:for=\"{{ tabs3 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content-2\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"点击事件\">\n  <van-tabs bind:click=\"onClick\">\n    <van-tab\n      wx:for=\"{{ tabs2 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"粘性布局\">\n  <van-tabs sticky>\n    <van-tab\n      wx:for=\"{{ tabs4 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"切换动画\">\n  <van-tabs animated>\n    <van-tab\n      wx:for=\"{{ tabs4 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"滑动切换\">\n  <van-tabs swipeable>\n    <van-tab\n      wx:for=\"{{ tabs4 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"自定义标题\">\n  <van-tabs active=\"{{ 1 }}\" bind:change=\"onChange\" tab-class=\"special-tab\" tab-active-class=\"special-tab-active\">\n    <van-icon\n      slot=\"nav-right\"\n      name=\"search\"\n      custom-class=\"right-nav\"\n      bind:click=\"onClickNavRight\"\n    />\n    <van-tab\n      wx:for=\"{{ tabs4 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n      dot=\"{{ index === 1 }}\"\n      info=\"{{ index === 2 ? 99 : null }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n<demo-block title=\"异步切换\">\n  <van-tabs active=\"{{ 1 }}\" swipeable use-before-change bind:change=\"onChange\" bind:before-change=\"onBeforeChange\" >\n   <van-tab\n      wx:for=\"{{ tabs4 }}\"\n      wx:key=\"index\"\n      title=\"{{ '标签 ' + item }}\"\n    >\n      <view class=\"content\">\n        {{ '内容' + item }}\n      </view>\n    </van-tab>\n  </van-tabs>\n</demo-block>\n\n"
  },
  {
    "path": "packages/tab/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/tab/index.less",
    "content": ":host {\n  flex-shrink: 0;\n  box-sizing: border-box;\n  width: 100%;\n}\n\n.van-tab__pane {\n  box-sizing: border-box;\n  overflow-y: auto;\n  -webkit-overflow-scrolling: touch;\n\n  &--active {\n    height: auto;\n  }\n\n  &--inactive {\n    height: 0;\n    overflow: visible;\n  }\n}\n"
  },
  {
    "path": "packages/tab/index.ts",
    "content": "import { useParent } from '../common/relation';\nimport { VantComponent } from '../common/component';\n\nVantComponent({\n  relation: useParent('tabs'),\n\n  props: {\n    dot: {\n      type: Boolean,\n      observer: 'update',\n    },\n    info: {\n      type: null,\n      observer: 'update',\n    },\n    title: {\n      type: String,\n      observer: 'update',\n    },\n    disabled: {\n      type: Boolean,\n      observer: 'update',\n    },\n    titleStyle: {\n      type: String,\n      observer: 'update',\n    },\n    name: {\n      type: null,\n      value: '',\n    },\n  },\n\n  data: {\n    active: false,\n  },\n\n  methods: {\n    getComputedName() {\n      if (this.data.name !== '') {\n        return this.data.name;\n      }\n      return this.index;\n    },\n\n    updateRender(active, parent) {\n      const { data: parentData } = parent;\n\n      this.inited = this.inited || active;\n      this.setData({\n        active,\n        shouldRender: this.inited || !parentData.lazyRender,\n        shouldShow: active || parentData.animated,\n      });\n    },\n\n    update() {\n      if (this.parent) {\n        this.parent.updateTabs();\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tab/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"custom-class {{ utils.bem('tab__pane', { active, inactive: !active }) }}\"\n  style=\"{{ shouldShow ? '' : 'display: none;' }}\"\n>\n  <slot wx:if=\"{{ shouldRender }}\" />\n</view>\n"
  },
  {
    "path": "packages/tab/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-tabs\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{3}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 4\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容2\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        通过名称匹配\n      </wx-view>\n      <van-tabs>\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容2\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        横向滚动\n      </wx-view>\n      <van-tabs>\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap van-tabs__wrap--scrollable  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{true}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{0}}\"\n                        style=\"flex-basis:17.6%\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{1}}\"\n                        style=\"flex-basis:17.6%\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"flex-basis:17.6%\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{3}}\"\n                        style=\"flex-basis:17.6%\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 4\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{4}}\"\n                        style=\"flex-basis:17.6%\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 5\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{5}}\"\n                        style=\"flex-basis:17.6%\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 6\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容1\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        禁用标签\n      </wx-view>\n      <van-tabs\n        bind:disabled=\"onClickDisabled\"\n      >\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab van-tab--disabled\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容1\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        样式风格\n      </wx-view>\n      <van-tabs\n        tabClass=\"special-tab\"\n      >\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--card van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--card\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--card nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content-2\"\n                  >\n                    \n        内容1\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        点击事件\n      </wx-view>\n      <van-tabs\n        bind:click=\"onClick\"\n      >\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容1\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        粘性布局\n      </wx-view>\n      <van-tabs>\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{3}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 4\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容1\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        切换动画\n      </wx-view>\n      <van-tabs>\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{3}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 4\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track--animated van-tabs__track\"\n              style=\"left:0%;transition-duration:0.3s;-webkit-transition-duration:0.3s\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容1\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        滑动切换\n      </wx-view>\n      <van-tabs>\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{3}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 4\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容1\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义标题\n      </wx-view>\n      <van-tabs\n        tabActiveClass=\"special-tab-active\"\n        tabClass=\"special-tab\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                          <van-info\n                            customClass=\"van-tab__title__info\"\n                          >\n                            <wx-view\n                              class=\"van-info van-info van-info--dot custom-class\"\n                              style=\"\"\n                            >\n                              \n                            </wx-view>\n                          </van-info>\n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                          <van-info\n                            customClass=\"van-tab__title__info\"\n                          >\n                            <wx-view\n                              class=\"van-info van-info custom-class\"\n                              style=\"\"\n                            >\n                              99\n                            </wx-view>\n                          </van-info>\n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{3}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 4\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                  <van-icon\n                    customClass=\"right-nav\"\n                    slot=\"nav-right\"\n                    bind:click=\"onClickNavRight\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-search\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容2\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        异步切换\n      </wx-view>\n      <van-tabs\n        bind:before-change=\"onBeforeChange\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"custom-class van-tabs\"\n        >\n          <van-sticky\n            bind:scroll=\"onTouchScroll\"\n          >\n            <wx-view\n              class=\"custom-class van-sticky\"\n              style=\"z-index:1\"\n            >\n              <wx-view\n                class=\"van-sticky-wrap\"\n                style=\"z-index:1\"\n              >\n                <wx-view\n                  class=\"van-tabs--line van-tabs__wrap  wrap-class\"\n                >\n                  <wx-scroll-view\n                    class=\"van-tabs__scroll van-tabs__scroll--line\"\n                    scrollLeft=\"{{0}}\"\n                    scrollWithAnimation=\"{{false}}\"\n                    scrollX=\"{{false}}\"\n                    style=\"\"\n                  >\n                    <wx-view\n                      class=\"van-tabs__nav van-tabs__nav--line nav-class\"\n                      style=\"\"\n                    >\n                      <wx-view\n                        class=\"van-tabs__line\"\n                        style=\"width:40px;opacity:0;transform:translateX(0px);-webkit-transform:translateX(0px)\"\n                      />\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{0}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 1\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class tab-active-class van-ellipsis van-tab van-tab--active\"\n                        data-index=\"{{1}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 2\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{2}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 3\n              \n                        </wx-view>\n                      </wx-view>\n                      <wx-view\n                        class=\"tab-class van-ellipsis van-tab\"\n                        data-index=\"{{3}}\"\n                        style=\"\"\n                        bind:tap=\"onTap\"\n                      >\n                        <wx-view\n                          class=\"van-ellipsis\"\n                          style=\"\"\n                        >\n                          \n              标签 4\n              \n                        </wx-view>\n                      </wx-view>\n                    </wx-view>\n                  </wx-scroll-view>\n                </wx-view>\n              </wx-view>\n            </wx-view>\n          </van-sticky>\n          <wx-view\n            class=\"van-tabs__content\"\n            bind:touchcancel=\"onTouchEnd\"\n            bind:touchend=\"onTouchEnd\"\n            bind:touchmove=\"onTouchMove\"\n            bind:touchstart=\"onTouchStart\"\n          >\n            <wx-view\n              class=\"van-tabs__track van-tabs__track\"\n              style=\"\"\n            >\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--active\"\n                  style=\"\"\n                >\n                  <wx-view\n                    class=\"content\"\n                  >\n                    \n        内容2\n      \n                  </wx-view>\n                </wx-view>\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n              <van-tab>\n                <wx-view\n                  class=\"custom-class van-tab__pane van-tab__pane--inactive\"\n                  style=\"display: none;\"\n                />\n              </van-tab>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-tabs>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/tab/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/tabbar/README.md",
    "content": "# Tabbar 标签栏\n\n### 介绍\n\n底部导航栏，用于在不同页面之间进行切换。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-tabbar\": \"@vant/weapp/tabbar/index\",\n  \"van-tabbar-item\": \"@vant/weapp/tabbar-item/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n```html\n<van-tabbar active=\"{{ active }}\" bind:change=\"onChange\">\n  <van-tabbar-item icon=\"home-o\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"search\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"friends-o\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"setting-o\">标签</van-tabbar-item>\n</van-tabbar>\n```\n\n```javascript\nPage({\n  data: {\n    active: 0,\n  },\n  onChange(event) {\n    // event.detail 的值为当前选中项的索引\n    this.setData({ active: event.detail });\n  },\n});\n```\n\n### 通过名称匹配\n\n在标签指定`name`属性的情况下，`v-model`的值为当前标签的`name`。\n\n```html\n<van-tabbar active=\"{{ active }}\" bind:change=\"onChange\">\n  <van-tabbar-item name=\"home\" icon=\"home-o\">标签</van-tabbar-item>\n  <van-tabbar-item name=\"search\" icon=\"search\">标签</van-tabbar-item>\n  <van-tabbar-item name=\"friends\" icon=\"friends-o\">标签</van-tabbar-item>\n  <van-tabbar-item name=\"setting\" icon=\"setting-o\">标签</van-tabbar-item>\n</van-tabbar>\n```\n\n```javascript\nPage({\n  data: {\n    active: 'home',\n  },\n  onChange(event) {\n    this.setData({ active: event.detail });\n  },\n});\n```\n\n### 显示徽标\n\n```html\n<van-tabbar active=\"{{ active }}\" bind:change=\"onChange\">\n  <van-tabbar-item icon=\"home-o\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"search\" dot>标签</van-tabbar-item>\n  <van-tabbar-item icon=\"friends-o\" info=\"5\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"setting-o\" info=\"20\">标签</van-tabbar-item>\n</van-tabbar>\n```\n\n### 自定义图标\n\n可以通过 slot 自定义图标，其中 icon slot 代表未选中状态下的图标，icon-active slot 代表选中状态下的图标。\n\n```html\n<van-tabbar active=\"{{ active }}\" bind:change=\"onChange\">\n  <van-tabbar-item info=\"3\">\n    <image\n      slot=\"icon\"\n      src=\"{{ icon.normal }}\"\n      mode=\"aspectFit\"\n      style=\"width: 30px; height: 18px;\"\n    />\n    <image\n      slot=\"icon-active\"\n      src=\"{{ icon.active }}\"\n      mode=\"aspectFit\"\n      style=\"width: 30px; height: 18px;\"\n    />\n    自定义\n  </van-tabbar-item>\n  <van-tabbar-item icon=\"search\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"setting-o\">标签</van-tabbar-item>\n</van-tabbar>\n```\n\n```javascript\nPage({\n  data: {\n    active: 0,\n    icon: {\n      normal: 'https://img.yzcdn.cn/vant/user-inactive.png',\n      active: 'https://img.yzcdn.cn/vant/user-active.png',\n    },\n  },\n  onChange(event) {\n    this.setData({ active: event.detail });\n  },\n});\n```\n\n### 自定义颜色\n\n```html\n<van-tabbar\n  active=\"{{ active }}\"\n  active-color=\"#07c160\"\n  inactive-color=\"#000\"\n  bind:change=\"onChange\"\n>\n  <van-tabbar-item icon=\"home-o\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"search\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"friends-o\">标签</van-tabbar-item>\n  <van-tabbar-item icon=\"setting-o\">标签</van-tabbar-item>\n</van-tabbar>\n```\n\n```javascript\nPage({\n  data: {\n    active: 0,\n  },\n  onChange(event) {\n    this.setData({ active: event.detail });\n  },\n});\n```\n\n### 切换标签事件\n\n```html\n<van-tabbar active=\"{{ active }}\" bind:change=\"onChange\">\n  <van-tabbar-item icon=\"home-o\">标签1</van-tabbar-item>\n  <van-tabbar-item icon=\"search\">标签2</van-tabbar-item>\n  <van-tabbar-item icon=\"friends-o\">标签3</van-tabbar-item>\n  <van-tabbar-item icon=\"setting-o\">标签4</van-tabbar-item>\n</van-tabbar>\n```\n\n```javascript\nPage({\n  data: {\n    active: 0,\n  },\n  onClick(event) {\n    wx.showToast({\n      title: `点击标签 ${event.detail + 1}`,\n      icon: 'none',\n    });\n  },\n});\n```\n\n### 结合自定义 tabBar\n\n请参考 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/custom-tabbar.html) 与 [代码片段](https://developers.weixin.qq.com/s/vaXgTsmQ7hnm)。\n\n## API\n\n### Tabbar Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| active | 当前选中标签的索引 | _number_ | - |\n| fixed | 是否固定在底部 | _boolean_ | `true` |\n| placeholder | 固定在底部时，是否在标签位置生成一个等高的占位元素 | _boolean_ | `false` |\n| border | 是否展示外边框 | _boolean_ | `true` |\n| z-index | 元素 z-index | _number_ | `1` |\n| active-color | 选中标签的颜色 | _string_ | `#1989fa` |\n| inactive-color | 未选中标签的颜色 | _string_ | `#7d7e80` |\n| safe-area-inset-bottom | 是否为 iPhoneX 留出底部安全距离 | _boolean_ | `true` |\n\n### Tabbar Event\n\n| 事件名      | 说明           | 参数                                     |\n| ----------- | -------------- | ---------------------------------------- |\n| bind:change | 切换标签时触发 | event.detail: 当前选中标签的名称或索引值 |\n\n### TabbarItem Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 标签名称，作为匹配的标识符 | _string \\| number_ | 当前标签的索引值 |\n| icon | 图标名称或图片链接，可选值见 [Icon 组件](#/icon) | _string_ | - |\n| icon-prefix | 图标类名前缀，同 Icon 组件的 [class-prefix 属性](#/icon#props) | _string_ | `van-icon` |\n| dot | 是否显示小红点 | _boolean_ | - |\n| info | 图标右上角提示信息 | _string \\| number_ | - |\n| url `v1.10.13` | 点击后跳转的链接地址, 需要以 `/` 开头 | _string_ | - |\n| link-type `v1.10.13` | 链接跳转类型，可选值为 `redirectTo`、`switchTab`、`reLaunch` | _string_ | `redirectTo` |\n\n### TabbarItem Slot\n\n| 名称        | 说明           |\n| ----------- | -------------- |\n| icon        | 未选中时的图标 |\n| icon-active | 选中时的图标   |\n"
  },
  {
    "path": "packages/tabbar/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tabbar\": \"../../tabbar/index\",\n    \"van-tabbar-item\": \"../../tabbar-item/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/tabbar/demo/index.less",
    "content": ".tabbar-position {\n  position: relative !important;\n}\n"
  },
  {
    "path": "packages/tabbar/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    active: 0,\n    active2: 'home',\n    active3: 0,\n    active4: 0,\n    active5: 0,\n    active6: 0,\n    icon: {\n      normal: 'https://img.yzcdn.cn/vant/user-inactive.png',\n      active: 'https://img.yzcdn.cn/vant/user-active.png',\n    },\n  },\n\n  methods: {\n    onChange(event) {\n      const { key } = event.currentTarget.dataset;\n      this.setData({ [key]: event.detail });\n    },\n\n    handleChange(event) {\n      const { key } = event.currentTarget.dataset;\n      this.setData({ [key]: event.detail });\n      wx.showToast({ title: `点击标签 ${event.detail + 1}`, icon: 'none' });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tabbar/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\">\n  <van-tabbar\n    active=\"{{ active }}\"\n    data-key=\"active\"\n    custom-class=\"tabbar-position\"\n    safe-area-inset-bottom=\"{{ false }}\"\n    bind:change=\"onChange\"\n  >\n    <van-tabbar-item icon=\"home-o\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"search\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"friends-o\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"setting-o\">标签</van-tabbar-item>\n  </van-tabbar>\n</demo-block>\n\n<demo-block title=\"通过名称匹配\">\n  <van-tabbar\n    active=\"{{ active2 }}\"\n    data-key=\"active2\"\n    custom-class=\"tabbar-position\"\n    safe-area-inset-bottom=\"{{ false }}\"\n    bind:change=\"onChange\"\n  >\n    <van-tabbar-item name=\"home\" icon=\"home-o\">标签</van-tabbar-item>\n    <van-tabbar-item name=\"search\" icon=\"search\">标签</van-tabbar-item>\n    <van-tabbar-item name=\"friends\" icon=\"friends-o\">标签</van-tabbar-item>\n    <van-tabbar-item name=\"setting\" icon=\"setting-o\">标签</van-tabbar-item>\n  </van-tabbar>\n</demo-block>\n\n<demo-block title=\"显示徽标\">\n  <van-tabbar\n    active=\"{{ active3 }}\"\n    data-key=\"active3\"\n    custom-class=\"tabbar-position\"\n    safe-area-inset-bottom=\"{{ false }}\"\n    bind:change=\"onChange\"\n  >\n    <van-tabbar-item icon=\"home-o\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"search\" dot>标签</van-tabbar-item>\n    <van-tabbar-item icon=\"friends-o\" info=\"5\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"setting-o\" info=\"20\">标签</van-tabbar-item>\n  </van-tabbar>\n</demo-block>\n\n<demo-block title=\"自定义图标\">\n  <van-tabbar\n    active=\"{{ active4 }}\"\n    data-key=\"active4\"\n    custom-class=\"tabbar-position\"\n    safe-area-inset-bottom=\"{{ false }}\"\n    bind:change=\"onChange\"\n  >\n    <van-tabbar-item info=\"3\">\n      <image\n        slot=\"icon\"\n        src=\"{{ icon.normal }}\"\n        mode=\"aspectFit\"\n        style=\"width: 30px; height: 18px;\"\n      />\n      <image\n        slot=\"icon-active\"\n        src=\"{{ icon.active }}\"\n        mode=\"aspectFit\"\n        style=\"width: 30px; height: 18px;\"\n      />\n      自定义\n    </van-tabbar-item>\n    <van-tabbar-item icon=\"search\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"setting-o\">标签</van-tabbar-item>\n  </van-tabbar>\n</demo-block>\n\n<demo-block title=\"自定义颜色\">\n  <van-tabbar\n    active=\"{{ active5 }}\"\n    data-key=\"active5\"\n    custom-class=\"tabbar-position\"\n    active-color=\"#07c160\"\n    inactive-color=\"#000\"\n    safe-area-inset-bottom=\"{{ false }}\"\n    bind:change=\"onChange\"\n  >\n    <van-tabbar-item icon=\"home-o\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"search\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"friends-o\">标签</van-tabbar-item>\n    <van-tabbar-item icon=\"setting-o\">标签</van-tabbar-item>\n  </van-tabbar>\n</demo-block>\n\n\n<demo-block title=\"切换标签事件\">\n  <van-tabbar\n    active=\"{{ active6 }}\"\n    data-key=\"active6\"\n    custom-class=\"tabbar-position\"\n    safe-area-inset-bottom=\"{{ false }}\"\n    bind:change=\"handleChange\"\n  >\n    <van-tabbar-item icon=\"home-o\">标签1</van-tabbar-item>\n    <van-tabbar-item icon=\"search\">标签2</van-tabbar-item>\n    <van-tabbar-item icon=\"friends-o\">标签3</van-tabbar-item>\n    <van-tabbar-item icon=\"setting-o\">标签4</van-tabbar-item>\n  </van-tabbar>\n</demo-block>\n"
  },
  {
    "path": "packages/tabbar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/tabbar/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-tabbar {\n  display: flex;\n  box-sizing: content-box;\n  width: 100%;\n  height: var(--tabbar-height, @tabbar-height);\n  background-color: var(--tabbar-background-color, @tabbar-background-color);\n\n  &--fixed {\n    position: fixed;\n    bottom: 0;\n    left: 0;\n  }\n\n  &--safe {\n    padding-bottom: constant(safe-area-inset-bottom);\n    padding-bottom: env(safe-area-inset-bottom);\n  }\n}\n"
  },
  {
    "path": "packages/tabbar/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useChildren } from '../common/relation';\nimport { getRect } from '../common/utils';\n\ntype TrivialInstance = WechatMiniprogram.Component.TrivialInstance;\n\nVantComponent({\n  relation: useChildren('tabbar-item', function () {\n    this.updateChildren();\n  }),\n\n  props: {\n    active: {\n      type: null,\n      observer: 'updateChildren',\n    },\n    activeColor: {\n      type: String,\n      observer: 'updateChildren',\n    },\n    inactiveColor: {\n      type: String,\n      observer: 'updateChildren',\n    },\n    fixed: {\n      type: Boolean,\n      value: true,\n      observer: 'setHeight',\n    },\n    placeholder: {\n      type: Boolean,\n      observer: 'setHeight',\n    },\n    border: {\n      type: Boolean,\n      value: true,\n    },\n    zIndex: {\n      type: Number,\n      value: 1,\n    },\n    safeAreaInsetBottom: {\n      type: Boolean,\n      value: true,\n    },\n  },\n\n  data: {\n    height: 50,\n  },\n\n  methods: {\n    updateChildren() {\n      const { children } = this;\n      if (!Array.isArray(children) || !children.length) {\n        return;\n      }\n\n      children.forEach((child: TrivialInstance) => child.updateFromParent());\n    },\n\n    setHeight() {\n      if (!this.data.fixed || !this.data.placeholder) {\n        return;\n      }\n\n      wx.nextTick(() => {\n        getRect(this, '.van-tabbar').then((res) => {\n          this.setData({ height: res.height });\n        });\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tabbar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ border ? 'van-hairline--top-bottom' : '' }} {{ utils.bem('tabbar', { fixed, safe: safeAreaInsetBottom }) }} custom-class\"\n  style=\"{{ zIndex ? 'z-index: ' + zIndex : '' }}\"\n>\n  <slot />\n</view>\n\n<view wx:if=\"{{ fixed && placeholder }}\" style=\"height: {{ height }}px;\"></view>\n"
  },
  {
    "path": "packages/tabbar/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-tabbar\n        customClass=\"tabbar-position\"\n        data-key=\"active\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-hairline--top-bottom van-tabbar van-tabbar--fixed custom-class\"\n          style=\"z-index: 1\"\n        >\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item van-tabbar-item--active custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-home-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-search\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-friends-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-setting-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n        </wx-view>\n      </van-tabbar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        通过名称匹配\n      </wx-view>\n      <van-tabbar\n        customClass=\"tabbar-position\"\n        data-key=\"active2\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-hairline--top-bottom van-tabbar van-tabbar--fixed custom-class\"\n          style=\"z-index: 1\"\n        >\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item van-tabbar-item--active custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-home-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-search\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-friends-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-setting-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n        </wx-view>\n      </van-tabbar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        显示徽标\n      </wx-view>\n      <van-tabbar\n        customClass=\"tabbar-position\"\n        data-key=\"active3\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-hairline--top-bottom van-tabbar van-tabbar--fixed custom-class\"\n          style=\"z-index: 1\"\n        >\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item van-tabbar-item--active custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-home-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-search\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                >\n                  <wx-view\n                    class=\"van-info van-info van-info--dot custom-class\"\n                    style=\"\"\n                  >\n                    \n                  </wx-view>\n                </van-info>\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-friends-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                >\n                  <wx-view\n                    class=\"van-info van-info custom-class\"\n                    style=\"\"\n                  >\n                    5\n                  </wx-view>\n                </van-info>\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-setting-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                >\n                  <wx-view\n                    class=\"van-info van-info custom-class\"\n                    style=\"\"\n                  >\n                    20\n                  </wx-view>\n                </van-info>\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n        </wx-view>\n      </van-tabbar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义图标\n      </wx-view>\n      <van-tabbar\n        customClass=\"tabbar-position\"\n        data-key=\"active4\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-hairline--top-bottom van-tabbar van-tabbar--fixed custom-class\"\n          style=\"z-index: 1\"\n        >\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item van-tabbar-item--active custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <wx-image\n                  mode=\"aspectFit\"\n                  slot=\"icon\"\n                  src=\"https://img.yzcdn.cn/vant/user-inactive.png\"\n                  style=\"width: 30px; height: 18px;\"\n                />\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                >\n                  <wx-view\n                    class=\"van-info van-info custom-class\"\n                    style=\"\"\n                  >\n                    3\n                  </wx-view>\n                </van-info>\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                \n      自定义\n    \n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-search\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-setting-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n        </wx-view>\n      </van-tabbar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义颜色\n      </wx-view>\n      <van-tabbar\n        customClass=\"tabbar-position\"\n        data-key=\"active5\"\n        bind:change=\"onChange\"\n      >\n        <wx-view\n          class=\"van-hairline--top-bottom van-tabbar van-tabbar--fixed custom-class\"\n          style=\"z-index: 1\"\n        >\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item van-tabbar-item--active custom-class\"\n              style=\"color: #07c160\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-home-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: #000\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-search\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: #000\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-friends-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: #000\"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-setting-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n        </wx-view>\n      </van-tabbar>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        切换标签事件\n      </wx-view>\n      <van-tabbar\n        customClass=\"tabbar-position\"\n        data-key=\"active6\"\n        bind:change=\"handleChange\"\n      >\n        <wx-view\n          class=\"van-hairline--top-bottom van-tabbar van-tabbar--fixed custom-class\"\n          style=\"z-index: 1\"\n        >\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item van-tabbar-item--active custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-home-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签1\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-search\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签2\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-friends-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签3\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n          <van-tabbar-item>\n            <wx-view\n              class=\"van-tabbar-item custom-class\"\n              style=\"color: \"\n              bind:tap=\"onClick\"\n            >\n              <wx-view\n                class=\"van-tabbar-item__icon\"\n              >\n                <van-icon\n                  customClass=\"van-tabbar-item__icon__inner\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-setting-o\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <van-info\n                  customClass=\"van-tabbar-item__info\"\n                />\n              </wx-view>\n              <wx-view\n                class=\"van-tabbar-item__text\"\n              >\n                标签4\n              </wx-view>\n            </wx-view>\n          </van-tabbar-item>\n        </wx-view>\n      </van-tabbar>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/tabbar/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/tabbar-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "packages/tabbar-item/index.less",
    "content": "@import '../common/style/var.less';\n\n:host {\n  flex: 1;\n}\n\n.van-tabbar-item {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n  color: var(--tabbar-item-text-color, @tabbar-item-text-color);\n  font-size: var(--tabbar-item-font-size, @tabbar-item-font-size);\n  line-height: var(--tabbar-item-line-height, @tabbar-item-line-height);\n\n  &__icon {\n    position: relative;\n    margin-bottom: var(--tabbar-item-margin-bottom, @tabbar-item-margin-bottom);\n    font-size: var(--tabbar-item-icon-size, @tabbar-item-icon-size);\n\n    &__inner {\n      display: block;\n      min-width: 1em;\n    }\n  }\n\n  &--active {\n    color: var(--tabbar-item-active-color, @tabbar-item-active-color);\n  }\n\n  &__info {\n    margin-top: 2px;\n  }\n}\n"
  },
  {
    "path": "packages/tabbar-item/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { useParent } from '../common/relation';\n\nVantComponent({\n  props: {\n    info: null,\n    name: null,\n    icon: String,\n    dot: Boolean,\n    url: {\n      type: String,\n      value: '',\n    },\n    linkType: {\n      type: String,\n      value: 'redirectTo',\n    },\n    iconPrefix: {\n      type: String,\n      value: 'van-icon',\n    },\n  },\n\n  relation: useParent('tabbar'),\n\n  data: {\n    active: false,\n    activeColor: '',\n    inactiveColor: '',\n  },\n\n  methods: {\n    onClick() {\n      const { parent } = this;\n\n      if (parent) {\n        const index = parent.children.indexOf(this);\n        const active = this.data.name || index;\n\n        if (active !== this.data.active) {\n          parent.$emit('change', active);\n        }\n      }\n\n      const { url, linkType } = this.data;\n\n      if (url && wx[linkType]) {\n        return wx[linkType]({ url });\n      }\n\n      this.$emit('click');\n    },\n\n    updateFromParent() {\n      const { parent } = this;\n      if (!parent) {\n        return;\n      }\n\n      const index = parent.children.indexOf(this);\n      const parentData = parent.data;\n      const { data } = this;\n      const active = (data.name || index) === parentData.active;\n      const patch: Record<string, unknown> = {};\n\n      if (active !== data.active) {\n        patch.active = active;\n      }\n      if (parentData.activeColor !== data.activeColor) {\n        patch.activeColor = parentData.activeColor;\n      }\n      if (parentData.inactiveColor !== data.inactiveColor) {\n        patch.inactiveColor = parentData.inactiveColor;\n      }\n\n      if (Object.keys(patch).length > 0) {\n        this.setData(patch);\n      }\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tabbar-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('tabbar-item', { active }) }} custom-class\"\n  style=\"color: {{ active ? activeColor : inactiveColor }}\"\n  bindtap=\"onClick\"\n>\n  <view class=\"van-tabbar-item__icon\">\n    <van-icon\n      wx:if=\"{{ icon }}\"\n      name=\"{{ icon }}\"\n      class-prefix=\"{{ iconPrefix }}\"\n      custom-class=\"van-tabbar-item__icon__inner\"\n    />\n    <block wx:else>\n      <slot wx:if=\"{{ active }}\" name=\"icon-active\" />\n      <slot wx:else name=\"icon\" />\n    </block>\n    <van-info\n      dot=\"{{ dot }}\"\n      info=\"{{ info }}\"\n      custom-class=\"van-tabbar-item__info\"\n    />\n  </view>\n  <view class=\"van-tabbar-item__text\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "packages/tabs/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\",\n    \"van-sticky\": \"../sticky/index\"\n  }\n}\n"
  },
  {
    "path": "packages/tabs/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-tabs {\n  position: relative;\n  -webkit-tap-highlight-color: transparent;\n\n  &__wrap {\n    display: flex;\n    overflow: hidden;\n\n    &--scrollable {\n      .van-tab {\n        flex: 0 0 22%;\n\n        &--complete {\n          flex: 1 0 auto !important;\n          padding: 0 @padding-sm;\n        }\n      }\n\n      .van-tabs__nav {\n        &--complete {\n          padding-right: 8px;\n          padding-left: 8px;\n        }\n      }\n    }\n  }\n\n  &__scroll {\n    background-color: var(\n      --tabs-nav-background-color,\n      @tabs-nav-background-color\n    );\n    overflow: auto;\n\n    &--line {\n      box-sizing: content-box;\n      // 15px padding to hide scrollbar in mobile safari\n      height: calc(100% + 15px);\n    }\n\n    &--card {\n      box-sizing: border-box;\n      margin: 0 var(--padding-md, @padding-md);\n      border: @border-width-base solid\n        var(--tabs-default-color, @tabs-default-color);\n      width: calc(100% - calc(var(--padding-md, @padding-md) * 2));\n      border-radius: @border-radius-sm;\n    }\n\n    &::-webkit-scrollbar {\n      display: none;\n    }\n  }\n\n  &__nav {\n    position: relative;\n    display: flex;\n    user-select: none;\n\n    &--card {\n      box-sizing: border-box;\n      height: var(--tabs-card-height, @tabs-card-height);\n\n      .van-tab {\n        color: var(--tabs-default-color, @tabs-default-color);\n        line-height: calc(\n          var(--tabs-card-height, @tabs-card-height) - 2 * @border-width-base\n        );\n        border-right: @border-width-base solid\n          var(--tabs-default-color, @tabs-default-color);\n\n        &:last-child {\n          border-right: none;\n        }\n\n        &.van-tab--active {\n          color: @white;\n          background-color: var(--tabs-default-color, @tabs-default-color);\n        }\n\n        &--disabled {\n          color: var(--tab-disabled-text-color, @tab-disabled-text-color);\n        }\n      }\n    }\n  }\n\n  &__line {\n    position: absolute;\n    bottom: 0;\n    left: 0;\n    z-index: 1;\n    opacity: 0;\n    height: var(--tabs-bottom-bar-height, @tabs-bottom-bar-height);\n    border-radius: var(--tabs-bottom-bar-height, @tabs-bottom-bar-height);\n    background-color: var(--tabs-bottom-bar-color, @tabs-bottom-bar-color);\n  }\n\n  &__track {\n    position: relative;\n    width: 100%;\n    height: 100%;\n\n    &--animated {\n      display: flex;\n      transition-property: left;\n    }\n  }\n\n  &__content {\n    overflow: hidden;\n  }\n\n  &--line {\n    height: var(--tabs-line-height, @tabs-line-height);\n  }\n\n  &--card {\n    height: var(--tabs-card-height, @tabs-card-height);\n  }\n}\n\n.van-tab {\n  position: relative;\n  flex: 1;\n  box-sizing: border-box;\n  min-width: 0; /* hack for flex ellipsis */\n  padding: 0 5px;\n  text-align: center;\n  cursor: pointer;\n  color: var(--tab-text-color, @tab-text-color);\n  font-size: var(--tab-font-size, @tab-font-size);\n  line-height: var(--tabs-line-height, @tabs-line-height);\n\n  &--active {\n    font-weight: var(--font-weight-bold, @font-weight-bold);\n    color: var(--tab-active-text-color, @tab-active-text-color);\n  }\n\n  &--disabled {\n    color: var(--tab-disabled-text-color, @tab-disabled-text-color);\n  }\n\n  &__title {\n    &__info {\n      position: relative !important;\n      top: -1px !important;\n      transform: translateX(0) !important;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/tabs/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { touch } from '../mixins/touch';\nimport {\n  getAllRect,\n  getRect,\n  groupSetData,\n  nextTick,\n  requestAnimationFrame,\n} from '../common/utils';\nimport { isDef } from '../common/validator';\nimport { useChildren } from '../common/relation';\n\ntype TrivialInstance = WechatMiniprogram.Component.TrivialInstance;\n\nVantComponent({\n  mixins: [touch],\n\n  classes: [\n    'nav-class',\n    'tab-class',\n    'tab-active-class',\n    'line-class',\n    'wrap-class',\n  ],\n\n  relation: useChildren('tab', function () {\n    this.updateTabs();\n  }),\n\n  props: {\n    sticky: Boolean,\n    border: Boolean,\n    swipeable: Boolean,\n    titleActiveColor: String,\n    titleInactiveColor: String,\n    color: String,\n    animated: {\n      type: Boolean,\n      observer() {\n        this.children.forEach((child, index) =>\n          child.updateRender(index === this.data.currentIndex, this)\n        );\n      },\n    },\n    lineWidth: {\n      type: null,\n      value: 40,\n      observer: 'resize',\n    },\n    lineHeight: {\n      type: null,\n      value: -1,\n    },\n    active: {\n      type: null,\n      value: 0,\n      observer(name) {\n        if (name !== this.getCurrentName()) {\n          this.setCurrentIndexByName(name);\n        }\n      },\n    },\n    type: {\n      type: String,\n      value: 'line',\n    },\n    ellipsis: {\n      type: Boolean,\n      value: true,\n    },\n    duration: {\n      type: Number,\n      value: 0.3,\n    },\n    zIndex: {\n      type: Number,\n      value: 1,\n    },\n    swipeThreshold: {\n      type: Number,\n      value: 5,\n      observer(value) {\n        this.setData({\n          scrollable: this.children.length > value || !this.data.ellipsis,\n        });\n      },\n    },\n    offsetTop: {\n      type: Number,\n      value: 0,\n    },\n    lazyRender: {\n      type: Boolean,\n      value: true,\n    },\n    useBeforeChange: {\n      type: Boolean,\n      value: false,\n    },\n  },\n\n  data: {\n    tabs: [] as Record<string, unknown>[],\n    scrollLeft: 0,\n    scrollable: false,\n    currentIndex: 0,\n    container: null as unknown as () => WechatMiniprogram.NodesRef,\n    skipTransition: true,\n    scrollWithAnimation: false,\n    lineOffsetLeft: 0,\n    inited: false,\n  },\n\n  mounted() {\n    requestAnimationFrame(() => {\n      this.swiping = true;\n      this.setData({\n        container: () => this.createSelectorQuery().select('.van-tabs'),\n      });\n\n      this.resize();\n      this.scrollIntoView();\n    });\n  },\n\n  methods: {\n    updateTabs() {\n      const { children = [], data } = this;\n      this.setData({\n        tabs: children.map((child: TrivialInstance) => child.data),\n        scrollable:\n          this.children.length > data.swipeThreshold || !data.ellipsis,\n      });\n\n      this.setCurrentIndexByName(data.active || this.getCurrentName());\n    },\n\n    trigger(eventName: string, child?: TrivialInstance) {\n      const { currentIndex } = this.data;\n\n      const data = this.getChildData(currentIndex, child);\n\n      if (!isDef(data)) {\n        return;\n      }\n\n      this.$emit(eventName, data);\n    },\n\n    onTap(event: WechatMiniprogram.TouchEvent) {\n      const { index } = event.currentTarget.dataset;\n      const child = this.children[index];\n\n      if (child.data.disabled) {\n        this.trigger('disabled', child);\n        return;\n      }\n\n      this.onBeforeChange(index).then(() => {\n        this.setCurrentIndex(index);\n        nextTick(() => {\n          this.trigger('click');\n        });\n      });\n    },\n\n    // correct the index of active tab\n    setCurrentIndexByName(name) {\n      const { children = [] } = this;\n      const matched = children.filter(\n        (child: TrivialInstance) => child.getComputedName() === name\n      );\n\n      if (matched.length) {\n        this.setCurrentIndex(matched[0].index);\n      }\n    },\n\n    setCurrentIndex(currentIndex) {\n      const { data, children = [] } = this;\n\n      if (\n        !isDef(currentIndex) ||\n        currentIndex >= children.length ||\n        currentIndex < 0\n      ) {\n        return;\n      }\n\n      groupSetData(this, () => {\n        children.forEach((item: TrivialInstance, index: number) => {\n          const active = index === currentIndex;\n          if (active !== item.data.active || !item.inited) {\n            item.updateRender(active, this);\n          }\n        });\n      });\n\n      if (currentIndex === data.currentIndex) {\n        if (!data.inited) {\n          this.resize();\n        }\n        return;\n      }\n\n      const shouldEmitChange = data.currentIndex !== null;\n      this.setData({ currentIndex });\n\n      requestAnimationFrame(() => {\n        this.resize();\n        this.scrollIntoView();\n      });\n\n      nextTick(() => {\n        this.trigger('input');\n        if (shouldEmitChange) {\n          this.trigger('change');\n        }\n      });\n    },\n\n    getCurrentName() {\n      const activeTab = this.children[this.data.currentIndex];\n\n      if (activeTab) {\n        return activeTab.getComputedName();\n      }\n    },\n\n    resize() {\n      if (this.data.type !== 'line') {\n        return;\n      }\n\n      const { currentIndex, ellipsis, skipTransition } = this.data;\n\n      Promise.all([\n        getAllRect(this, '.van-tab'),\n        getRect(this, '.van-tabs__line'),\n      ]).then(([rects = [], lineRect]) => {\n        const rect = rects[currentIndex];\n\n        if (rect == null) {\n          return;\n        }\n\n        let lineOffsetLeft = rects\n          .slice(0, currentIndex)\n          .reduce((prev, curr) => prev + curr.width, 0);\n\n        lineOffsetLeft +=\n          (rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);\n\n        this.setData({ lineOffsetLeft, inited: true });\n        this.swiping = true;\n\n        if (skipTransition) {\n          // waiting transition end\n          setTimeout(() => {\n            this.setData({ skipTransition: false });\n          }, this.data.duration);\n        }\n      });\n    },\n\n    // scroll active tab into view\n    scrollIntoView() {\n      const { currentIndex, scrollable, scrollWithAnimation } = this.data;\n\n      if (!scrollable) {\n        return;\n      }\n\n      Promise.all([\n        getAllRect(this, '.van-tab'),\n        getRect(this, '.van-tabs__nav'),\n      ]).then(([tabRects, navRect]) => {\n        const tabRect = tabRects[currentIndex];\n        const offsetLeft = tabRects\n          .slice(0, currentIndex)\n          .reduce((prev, curr) => prev + curr.width, 0);\n\n        this.setData({\n          scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,\n        });\n\n        if (!scrollWithAnimation) {\n          nextTick(() => {\n            this.setData({ scrollWithAnimation: true });\n          });\n        }\n      });\n    },\n\n    onTouchScroll(event: WechatMiniprogram.CustomEvent) {\n      this.$emit('scroll', event.detail);\n    },\n\n    onTouchStart(event: WechatMiniprogram.TouchEvent) {\n      if (!this.data.swipeable) return;\n      this.swiping = true;\n\n      this.touchStart(event);\n    },\n\n    onTouchMove(event: WechatMiniprogram.TouchEvent) {\n      if (!this.data.swipeable || !this.swiping) return;\n\n      this.touchMove(event);\n    },\n\n    // watch swipe touch end\n    onTouchEnd() {\n      if (!this.data.swipeable || !this.swiping) return;\n\n      const { direction, deltaX, offsetX } = this;\n      const minSwipeDistance = 50;\n\n      if (direction === 'horizontal' && offsetX >= minSwipeDistance) {\n        const index = this.getAvaiableTab(deltaX);\n        if (index !== -1) {\n          this.onBeforeChange(index).then(() => this.setCurrentIndex(index));\n        }\n      }\n\n      this.swiping = false;\n    },\n\n    getAvaiableTab(direction: number) {\n      const { tabs, currentIndex } = this.data;\n      const step = direction > 0 ? -1 : 1;\n\n      for (\n        let i = step;\n        currentIndex + i < tabs.length && currentIndex + i >= 0;\n        i += step\n      ) {\n        const index = currentIndex + i;\n\n        if (\n          index >= 0 &&\n          index < tabs.length &&\n          tabs[index] &&\n          !tabs[index].disabled\n        ) {\n          return index;\n        }\n      }\n\n      return -1;\n    },\n    onBeforeChange(index: number): Promise<void> {\n      const { useBeforeChange } = this.data;\n\n      if (!useBeforeChange) {\n        return Promise.resolve();\n      }\n\n      return new Promise((resolve, reject) => {\n        this.$emit('before-change', {\n          ...this.getChildData(index),\n          callback: (status) => (status ? resolve() : reject()),\n        });\n      });\n    },\n    getChildData(index: number, child?: TrivialInstance) {\n      const currentChild = child || this.children[index];\n\n      if (!isDef(currentChild)) {\n        return;\n      }\n\n      return {\n        index: currentChild.index,\n        name: currentChild.getComputedName(),\n        title: currentChild.data.title,\n      };\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tabs/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class {{ utils.bem('tabs') }}\">\n  <van-sticky\n    disabled=\"{{ !sticky }}\"\n    z-index=\"{{ zIndex }}\"\n    offset-top=\"{{ offsetTop }}\"\n    container=\"{{ container }}\"\n    bind:scroll=\"onTouchScroll\"\n  >\n    <view class=\"{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class\">\n      <slot name=\"nav-left\" />\n\n      <scroll-view\n        scroll-x=\"{{ scrollable }}\"\n        scroll-with-animation=\"{{ scrollWithAnimation }}\"\n        scroll-left=\"{{ scrollLeft }}\"\n        class=\"{{ utils.bem('tabs__scroll', [type]) }}\"\n        style=\"{{ color ? 'border-color: ' + color : '' }}\"\n      >\n        <view class=\"{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class\" style=\"{{ computed.navStyle(color, type) }}\">\n          <view wx:if=\"{{ type === 'line' }}\" class=\"van-tabs__line\" style=\"{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}\" />\n          <view\n            wx:for=\"{{ tabs }}\"\n            wx:key=\"index\"\n            data-index=\"{{ index }}\"\n            class=\"{{ computed.tabClass(index === currentIndex, ellipsis) }} {{ utils.bem('tab', { active: index === currentIndex, disabled: item.disabled, complete: !ellipsis }) }}\"\n            style=\"{{ computed.tabStyle({ active: index === currentIndex, ellipsis, color, type, disabled: item.disabled, titleActiveColor, titleInactiveColor, swipeThreshold, scrollable }) }}\"\n            bind:tap=\"onTap\"\n          >\n            <view class=\"{{ ellipsis ? 'van-ellipsis' : '' }}\" style=\"{{ item.titleStyle }}\">\n              {{ item.title }}\n              <van-info\n                wx:if=\"{{ item.info !== null || item.dot }}\"\n                info=\"{{ item.info }}\"\n                dot=\"{{ item.dot }}\"\n                custom-class=\"van-tab__title__info\"\n              />\n            </view>\n          </view>\n        </view>\n      </scroll-view>\n\n      <slot name=\"nav-right\" />\n    </view>\n  </van-sticky>\n\n  <view\n    class=\"van-tabs__content\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchmove=\"onTouchMove\"\n    bind:touchend=\"onTouchEnd\"\n    bind:touchcancel=\"onTouchEnd\"\n  >\n    <view\n      class=\"{{ utils.bem('tabs__track', [{ animated }]) }} van-tabs__track\"\n      style=\"{{ computed.trackStyle({ duration, currentIndex, animated }) }}\"\n    >\n      <slot />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/tabs/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction tabClass(active, ellipsis) {\n  var classes = ['tab-class'];\n\n  if (active) {\n    classes.push('tab-active-class');\n  }\n\n  if (ellipsis) {\n    classes.push('van-ellipsis');\n  }\n\n  return classes.join(' ');\n}\n\nfunction tabStyle(data) {\n  var titleColor = data.active\n    ? data.titleActiveColor\n    : data.titleInactiveColor;\n\n  var ellipsis = data.scrollable && data.ellipsis;\n\n  // card theme color\n  if (data.type === 'card') {\n    return style({\n      'border-color': data.color,\n      'background-color': !data.disabled && data.active ? data.color : null,\n      color: titleColor || (!data.disabled && !data.active ? data.color : null),\n      'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,\n    });\n  }\n\n  return style({\n    color: titleColor,\n    'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,\n  });\n}\n\nfunction navStyle(color, type) {\n  return style({\n    'border-color': type === 'card' && color ? color : null,\n  });\n}\n\nfunction trackStyle(data) {\n  if (!data.animated) {\n    return '';\n  }\n\n  return style({\n    left: -100 * data.currentIndex + '%',\n    'transition-duration': data.duration + 's',\n    '-webkit-transition-duration': data.duration + 's',\n  });\n}\n\nfunction lineStyle(data) {\n  return style({\n    width: utils.addUnit(data.lineWidth),\n    opacity: data.inited ? 1 : 0,\n    transform: 'translateX(' + data.lineOffsetLeft + 'px)',\n    '-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',\n    'background-color': data.color,\n    height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,\n    'border-radius':\n      data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,\n    'transition-duration': !data.skipTransition ? data.duration + 's' : null,\n    '-webkit-transition-duration': !data.skipTransition\n      ? data.duration + 's'\n      : null,\n  });\n}\n\nmodule.exports = {\n  tabClass: tabClass,\n  tabStyle: tabStyle,\n  trackStyle: trackStyle,\n  lineStyle: lineStyle,\n  navStyle: navStyle,\n};\n"
  },
  {
    "path": "packages/tag/README.md",
    "content": "# Tag 标签\n\n### 介绍\n\n用于标记关键词和概括主要内容。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-tag\": \"@vant/weapp/tag/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n通过 `type` 属性控制标签颜色，默认为灰色。\n\n```html\n<van-tag type=\"primary\">标签</van-tag>\n<van-tag type=\"success\">标签</van-tag>\n<van-tag type=\"danger\">标签</van-tag>\n<van-tag type=\"warning\">标签</van-tag>\n```\n\n### 空心样式\n\n设置 `plain` 属性设置为空心样式。\n\n```html\n<van-tag plain type=\"primary\">标签</van-tag>\n<van-tag plain type=\"success\">标签</van-tag>\n<van-tag plain type=\"danger\">标签</van-tag>\n<van-tag plain type=\"warning\">标签</van-tag>\n```\n\n### 圆角样式\n\n通过 `round` 设置为圆角样式。\n\n```html\n<van-tag round type=\"primary\">标签</van-tag>\n<van-tag round type=\"success\">标签</van-tag>\n<van-tag round type=\"danger\">标签</van-tag>\n<van-tag round type=\"warning\">标签</van-tag>\n```\n\n### 标记样式\n\n通过 `mark` 设置为标记样式(半圆角)。\n\n```html\n<van-tag mark type=\"primary\">标签</van-tag>\n<van-tag mark type=\"success\">标签</van-tag>\n<van-tag mark type=\"danger\">标签</van-tag>\n<van-tag mark type=\"warning\">标签</van-tag>\n```\n\n### 自定义颜色\n\n```html\n<van-tag color=\"#f2826a\">标签</van-tag>\n<van-tag color=\"#7232dd\">标签</van-tag>\n<van-tag color=\"#7232dd\" plain>标签</van-tag>\n<van-tag color=\"#ffe1e1\" text-color=\"#ad0000\">标签</van-tag>\n```\n\n### 标签大小\n\n```html\n<van-tag type=\"danger\">标签</van-tag>\n<van-tag type=\"danger\" size=\"medium\">标签</van-tag>\n<van-tag type=\"danger\" size=\"large\">标签</van-tag>\n```\n\n### 可关闭标签\n\n添加 `closeable` 属性表示标签是可关闭的，关闭标签时会触发 `close` 事件，在 `close` 事件中可以执行隐藏标签的逻辑。\n\n```html\n<van-tag\n  wx:if=\"{{ show.primary }}\"\n  closeable\n  size=\"medium\"\n  type=\"primary\"\n  id=\"primary\"\n  bind:close=\"onClose\"\n>\n  标签\n</van-tag>\n<van-tag\n  wx:if=\"{{ show.success }}\"\n  closeable\n  size=\"medium\"\n  type=\"success\"\n  id=\"success\"\n  bind:close=\"onClose\"\n>\n  标签\n</van-tag>\n```\n\n```js\nPage({\n  data: {\n    show: {\n      primary: true,\n      success: true,\n    },\n  },\n  onClose(event) {\n    this.setData({\n      [`show.${event.target.id}`]: false,\n    });\n  },\n});\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| type | 类型，可选值为 `primary` `success` `danger` `warning` | _string_ | - |\n| size | 大小, 可选值为 `large` `medium` | _string_ | - |\n| color | 标签颜色 | _string_ | - |\n| plain | 是否为空心样式 | _boolean_ | `false` |\n| round | 是否为圆角样式 | _boolean_ | `false` |\n| mark | 是否为标记样式 | _boolean_ | `false` |\n| text-color | 文本颜色，优先级高于 `color` 属性 | _string_ | `white` |\n| closeable | 是否为可关闭标签 | _boolean_ | `false` |\n\n### Slot\n\n| 名称 | 说明                |\n| ---- | ------------------- |\n| -    | 自定义 Tag 显示内容 |\n\n### Events\n\n| 事件名 | 说明           | 回调参数 |\n| ------ | -------------- | -------- |\n| bind:close  | 关闭标签时触发 | -        |\n\n### 外部样式类\n\n| 类名         | 说明         |\n| ------------ | ------------ |\n| custom-class | 根节点样式类 |\n"
  },
  {
    "path": "packages/tag/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tag\": \"../../tag/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/tag/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    show: {\n      success: true,\n      primary: true,\n    },\n  },\n\n  methods: {\n    onClose(event) {\n      this.setData({\n        [`show.${event.target.id}`]: false,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tag/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n  <van-tag class=\"demo-margin-right\" type=\"primary\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" type=\"success\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" type=\"danger\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" type=\"warning\">标签</van-tag>\n</demo-block>\n\n<demo-block title=\"圆角样式\" padding>\n  <van-tag class=\"demo-margin-right\" round type=\"primary\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" round type=\"success\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" round type=\"danger\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" round type=\"warning\">标签</van-tag>\n</demo-block>\n\n<demo-block title=\"标记样式\" padding>\n  <van-tag class=\"demo-margin-right\" mark type=\"primary\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" mark type=\"success\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" mark type=\"danger\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" mark type=\"warning\">标签</van-tag>\n</demo-block>\n\n<demo-block title=\"空心样式\" padding>\n  <van-tag class=\"demo-margin-right\" plain type=\"primary\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" plain type=\"success\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" plain type=\"danger\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" plain type=\"warning\">标签</van-tag>\n</demo-block>\n\n<demo-block title=\"自定义颜色\" padding>\n  <van-tag class=\"demo-margin-right\" color=\"#f2826a\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" color=\"#7232dd\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" color=\"#7232dd\" plain>标签</van-tag>\n  <van-tag class=\"demo-margin-right\" color=\"#ffe1e1\" text-color=\"#ad0000\"\n  >标签</van-tag\n  >\n</demo-block>\n\n<demo-block title=\"标签大小\" padding>\n  <van-tag class=\"demo-margin-right\" type=\"danger\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" type=\"danger\" size=\"medium\">标签</van-tag>\n  <van-tag class=\"demo-margin-right\" type=\"danger\" size=\"large\">标签</van-tag>\n</demo-block>\n\n<demo-block title=\"可关闭标签\" padding>\n  <van-tag\n    wx:if=\"{{ show.primary }}\"\n    class=\"demo-margin-right\"\n    type=\"primary\"\n    size=\"medium\"\n    closeable\n    id=\"primary\"\n    bind:close=\"onClose\"\n  >标签</van-tag\n  >\n  <van-tag\n    wx:if=\"{{ show.success }}\"\n    class=\"demo-margin-right\"\n    type=\"success\"\n    size=\"medium\"\n    closeable\n    id=\"success\"\n    bind:close=\"onClose\"\n  >标签</van-tag\n  >\n</demo-block>\n"
  },
  {
    "path": "packages/tag/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "packages/tag/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-tag {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  padding: var(--tag-padding, @tag-padding);\n  color: var(--tag-text-color, @tag-text-color);\n  font-size: var(--tag-font-size, @tag-font-size);\n  line-height: var(--tag-line-height, @tag-line-height);\n  border-radius: var(--tag-border-radius, @tag-border-radius);\n\n  &--default {\n    background-color: var(--tag-default-color, @tag-default-color);\n\n    &.van-tag--plain {\n      color: var(--tag-default-color, @tag-default-color);\n    }\n  }\n\n  &--danger {\n    background-color: var(--tag-danger-color, @tag-danger-color);\n\n    &.van-tag--plain {\n      color: var(--tag-danger-color, @tag-danger-color);\n    }\n  }\n\n  &--primary {\n    background-color: var(--tag-primary-color, @tag-primary-color);\n\n    &.van-tag--plain {\n      color: var(--tag-primary-color, @tag-primary-color);\n    }\n  }\n\n  &--success {\n    background-color: var(--tag-success-color, @tag-success-color);\n\n    &.van-tag--plain {\n      color: var(--tag-success-color, @tag-success-color);\n    }\n  }\n\n  &--warning {\n    background-color: var(--tag-warning-color, @tag-warning-color);\n\n    &.van-tag--plain {\n      color: var(--tag-warning-color, @tag-warning-color);\n    }\n  }\n\n  &--plain {\n    background-color: var(\n      --tag-plain-background-color,\n      @tag-plain-background-color\n    );\n\n    &::before {\n      position: absolute;\n      top: 0;\n      right: 0;\n      bottom: 0;\n      left: 0;\n      border: 1px solid currentColor;\n      border-radius: inherit;\n      content: '';\n      pointer-events: none;\n    }\n  }\n\n  &--medium {\n    padding: var(--tag-medium-padding, @tag-medium-padding);\n  }\n\n  &--large {\n    padding: var(--tag-large-padding, @tag-large-padding);\n    font-size: var(--tag-large-font-size, @tag-large-font-size);\n    border-radius: var(--tag-large-border-radius, @tag-large-border-radius);\n  }\n\n  &--mark {\n    border-radius: 0\n      var(\n        --tag-round-border-radius,\n        var(--tag-round-border-radius, @tag-round-border-radius)\n      )\n      var(\n        --tag-round-border-radius,\n        var(--tag-round-border-radius, @tag-round-border-radius)\n      )\n      0;\n\n    &::after {\n      display: block;\n      width: 2px;\n      content: '';\n    }\n  }\n\n  &--round {\n    border-radius: var(--tag-round-border-radius, @tag-round-border-radius);\n  }\n\n  &__close {\n    min-width: 1em;\n    margin-left: 2px;\n  }\n}\n"
  },
  {
    "path": "packages/tag/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    size: String,\n    mark: Boolean,\n    color: String,\n    plain: Boolean,\n    round: Boolean,\n    textColor: String,\n    type: {\n      type: String,\n      value: 'default',\n    },\n    closeable: Boolean,\n  },\n\n  methods: {\n    onClose() {\n      this.$emit('close');\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tag/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('tag', [type, size, { mark, plain, round }]) }}\"\n  style=\"{{ computed.rootStyle({ plain, color, textColor }) }}\"\n>\n  <slot />\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"cross\"\n    custom-class=\"van-tag__close\"\n    bind:click=\"onClose\"\n  />\n</view>\n"
  },
  {
    "path": "packages/tag/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'background-color': data.plain ? '' : data.color,\n    color: data.textColor || data.plain ? data.textColor || data.color : '',\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "packages/tag/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--primary\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--success\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--danger\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--warning\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        圆角样式\n      </wx-view>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--primary van-tag--round\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--success van-tag--round\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--danger van-tag--round\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--warning van-tag--round\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        标记样式\n      </wx-view>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--primary van-tag--mark\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--success van-tag--mark\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--danger van-tag--mark\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--warning van-tag--mark\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        空心样式\n      </wx-view>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--primary van-tag--plain\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--success van-tag--plain\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--danger van-tag--plain\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--warning van-tag--plain\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义颜色\n      </wx-view>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--default\"\n          style=\"background-color:#f2826a\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--default\"\n          style=\"background-color:#7232dd\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--default van-tag--plain\"\n          style=\"color:#7232dd\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--default\"\n          style=\"background-color:#ffe1e1;color:#ad0000\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        标签大小\n      </wx-view>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--danger\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--danger van-tag--medium\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--danger van-tag--large\"\n          style=\"\"\n        >\n          标签\n        </wx-view>\n      </van-tag>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        可关闭标签\n      </wx-view>\n      <van-tag\n        class=\"demo-margin-right\"\n        id=\"primary\"\n        bind:close=\"onClose\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--primary van-tag--medium\"\n          style=\"\"\n        >\n          标签\n          <van-icon\n            customClass=\"van-tag__close\"\n            bind:click=\"onClose\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-cross\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-tag>\n      <van-tag\n        class=\"demo-margin-right\"\n        id=\"success\"\n        bind:close=\"onClose\"\n      >\n        <wx-view\n          class=\"custom-class van-tag van-tag--success van-tag--medium\"\n          style=\"\"\n        >\n          标签\n          <van-icon\n            customClass=\"van-tag__close\"\n            bind:click=\"onClose\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-cross\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-tag>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/tag/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/toast/README.md",
    "content": "# Toast 轻提示\n\n### 介绍\n\n在页面中间弹出黑色半透明提示，用于消息通知、加载提示、操作结果提示等场景。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-toast\": \"@vant/weapp/toast/index\"\n}\n```\n\n## 代码演示\n\n### 文字提示\n\n```javascript\nimport Toast from '@vant/weapp/toast/toast';\n\nToast('我是提示文案，建议不超过十五字~');\n```\n\n```html\n<van-toast id=\"van-toast\" />\n```\n\n### 加载提示\n\n使用 `Toast.loading` 方法展示加载提示，通过 `forbidClick` 属性可以禁用背景点击，通过 `loadingType` 属性可以自定义加载图标类型。\n\n```javascript\nToast.loading({\n  message: '加载中...',\n  forbidClick: true,\n});\n\n// 自定义加载图标\nToast.loading({\n  message: '加载中...',\n  forbidClick: true,\n  loadingType: 'spinner',\n});\n```\n\n### 成功/失败提示\n\n```javascript\nToast.success('成功文案');\nToast.fail('失败文案');\n```\n\n### 动态更新提示\n\n```javascript\nconst toast = Toast.loading({\n  duration: 0, // 持续展示 toast\n  forbidClick: true,\n  message: '倒计时 3 秒',\n  selector: '#custom-selector',\n});\n\nlet second = 3;\nconst timer = setInterval(() => {\n  second--;\n  if (second) {\n    toast.setData({\n      message: `倒计时 ${second} 秒`,\n    });\n  } else {\n    clearInterval(timer);\n    Toast.clear();\n  }\n}, 1000);\n```\n\n```html\n<van-toast id=\"custom-selector\" />\n```\n\n### OnClose 回调函数\n\n```javascript\nToast({\n  type: 'success',\n  message: '提交成功',\n  onClose: () => {\n    console.log('执行OnClose函数');\n  },\n});\n```\n\n## API\n\n### 方法\n\n| 方法名 | 参数 | 返回值 | 介绍 |\n| --- | --- | --- | --- |\n| Toast | `options \\| message` | toast 实例 | 展示提示 |\n| Toast.loading | `options \\| message` | toast 实例 | 展示加载提示 |\n| Toast.success | `options \\| message` | toast 实例 | 展示成功提示 |\n| Toast.fail | `options \\| message` | toast 实例 | 展示失败提示 |\n| Toast.clear | `clearAll` | `void` | 关闭提示 |\n| Toast.setDefaultOptions | `options` | `void` | 修改默认配置，对所有 Toast 生效 |\n| Toast.resetDefaultOptions | - | `void` | 重置默认配置，对所有 Toast 生效 |\n\n### Options\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| type | 提示类型，可选值为 `loading` `success` `fail` `html` | _string_ | `text` |\n| position | 位置，可选值为 `top` `middle` `bottom` | _string_ | `middle` |\n| message | 内容 | _string_ | `''` |\n| mask | 是否显示遮罩层 | _boolean_ | `false` |\n| forbidClick | 是否禁止背景点击 | _boolean_ | `false` |\n| loadingType | 加载图标类型, 可选值为 `spinner` | _string_ | `circular` |\n| zIndex | z-index 层级 | _number_ | `1000` |\n| duration | 展示时长(ms)，值为 0 时，toast 不会消失 | _number_ | `2000` |\n| selector | 自定义选择器 | _string_ | `van-toast` |\n| context | 选择器的选择范围，可以传入自定义组件的 this 作为上下文 | _object_ | 当前页面 |\n| onClose | 关闭时的回调函数 | _Function_ | - |\n\n### Slot\n\n| 名称 | 说明       |\n| ---- | ---------- |\n| -    | 自定义内容 |\n"
  },
  {
    "path": "packages/toast/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-toast\": \"../../toast/index\",\n    \"van-button\": \"../../button/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/toast/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\nimport Toast from '../../toast/toast';\n\nVantComponent({\n  methods: {\n    showToast() {\n      Toast({ context: this, message: '提示内容' });\n    },\n\n    showLongToast() {\n      Toast({\n        context: this,\n        message: '这是一条长文字提示，超过一定字数就会换行',\n      });\n    },\n\n    showLoadingToast() {\n      Toast.loading({ context: this, message: '加载中...', forbidClick: true });\n    },\n\n    showCustomLoadingToast() {\n      Toast.loading({\n        context: this,\n        message: '加载中...',\n        forbidClick: true,\n        loadingType: 'spinner',\n      });\n    },\n\n    showSuccessToast() {\n      Toast.success({ context: this, message: '成功文案' });\n    },\n\n    showFailToast() {\n      Toast.fail({ context: this, message: '失败提示' });\n    },\n\n    showCustomizedToast() {\n      const text = (second) => `倒计时 ${second} 秒`;\n      const toast = Toast.loading({\n        context: this,\n        duration: 0,\n        forbidClick: true,\n        message: text(3),\n      });\n\n      let second = 3;\n      const timer = setInterval(() => {\n        second--;\n        if (second) {\n          toast?.setData({ message: text(second) });\n        } else {\n          clearInterval(timer);\n          Toast.clear();\n        }\n      }, 1000);\n    },\n  },\n});\n"
  },
  {
    "path": "packages/toast/demo/index.wxml",
    "content": "<demo-block title=\"文字提示\" padding>\n  <van-button type=\"primary\" bind:tap=\"showToast\" class=\"demo-margin-right\">文字提示</van-button>\n  <van-button type=\"primary\" bind:tap=\"showLongToast\">长文字提示</van-button>\n</demo-block>\n\n<demo-block title=\"加载提示\" padding>\n  <van-button type=\"primary\" bind:tap=\"showLoadingToast\" class=\"demo-margin-right\">加载提示</van-button>\n  <van-button type=\"primary\" bind:tap=\"showCustomLoadingToast\">自定义加载图标</van-button>\n</demo-block>\n\n<demo-block title=\"成功/失败提示\" padding>\n  <van-button type=\"info\" bind:tap=\"showSuccessToast\" class=\"demo-margin-right\">成功提示</van-button>\n  <van-button type=\"danger\" bind:tap=\"showFailToast\">失败提示</van-button>\n</demo-block>\n\n<demo-block title=\"动态更新提示\" padding>\n  <van-button type=\"primary\" bind:tap=\"showCustomizedToast\">动态更新提示</van-button>\n</demo-block>\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "packages/toast/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\",\n    \"van-overlay\": \"../overlay/index\",\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "packages/toast/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-toast {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  box-sizing: content-box;\n  color: var(--toast-text-color, @toast-text-color);\n  font-size: var(--toast-font-size, @toast-font-size);\n  line-height: var(--toast-line-height, @toast-line-height);\n\n  // allow newline charactor\n  white-space: pre-wrap;\n  word-wrap: break-word;\n  background-color: var(--toast-background-color, @toast-background-color);\n  border-radius: var(--toast-border-radius, @toast-border-radius);\n\n  &__container {\n    position: fixed;\n    top: 50%;\n    left: 50%;\n    // hack for avoid max-width when use left & fixed\n    width: fit-content;\n    transform: translate(-50%, -50%);\n    max-width: var(--toast-max-width, @toast-max-width);\n  }\n\n  &--text {\n    min-width: var(--toast-text-min-width, @toast-text-min-width);\n    padding: var(--toast-text-padding, @toast-text-padding);\n  }\n\n  &--icon {\n    width: var(--toast-default-width, @toast-default-width);\n    min-height: var(--toast-default-min-height, @toast-default-min-height);\n    padding: var(--toast-default-padding, @toast-default-padding);\n\n    .van-toast__icon {\n      font-size: var(--toast-icon-size, @toast-icon-size);\n    }\n\n    .van-toast__text {\n      padding-top: @padding-xs;\n    }\n  }\n\n  &__loading {\n    margin: 10px 0;\n  }\n\n  &--top {\n    transform: translate(0, -30vh);\n  }\n\n  &--bottom {\n    transform: translate(0, 30vh);\n  }\n}\n"
  },
  {
    "path": "packages/toast/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  props: {\n    show: Boolean,\n    mask: Boolean,\n    message: String,\n    forbidClick: Boolean,\n    zIndex: {\n      type: Number,\n      value: 1000,\n    },\n    type: {\n      type: String,\n      value: 'text',\n    },\n    loadingType: {\n      type: String,\n      value: 'circular',\n    },\n    position: {\n      type: String,\n      value: 'middle',\n    },\n  },\n\n  methods: {\n    // for prevent touchmove\n    noop() {},\n  },\n});\n"
  },
  {
    "path": "packages/toast/index.wxml",
    "content": "<van-overlay\n  wx:if=\"{{ mask || forbidClick }}\"\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  custom-style=\"{{ mask ? '' : 'background-color: transparent;' }}\"\n/>\n<van-transition\n  show=\"{{ show }}\"\n  custom-style=\"z-index: {{ zIndex }}\"\n  custom-class=\"van-toast__container\"\n>\n  <view\n    class=\"van-toast van-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }} van-toast--{{ position }}\"\n    catch:touchmove=\"noop\"\n  >\n    <!-- text only -->\n    <text wx:if=\"{{ type === 'text' }}\">{{ message }}</text>\n\n    <!-- html only -->\n    <rich-text wx:elif=\"{{ type === 'html' }}\" nodes=\"{{ message }}\"></rich-text>\n\n    <!-- with icon -->\n    <block wx:else>\n      <van-loading\n        wx:if=\"{{ type === 'loading' }}\"\n        color=\"white\"\n        type=\"{{ loadingType }}\"\n        custom-class=\"van-toast__loading\"\n      />\n      <van-icon wx:else class=\"van-toast__icon\" name=\"{{ type }}\" />\n      <text wx:if=\"{{ message }}\" class=\"van-toast__text\">{{ message }}</text>\n    </block>\n\n    <slot />\n  </view>\n</van-transition>\n"
  },
  {
    "path": "packages/toast/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        文字提示\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n        bind:tap=\"showToast\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            文字提示\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button\n        bind:tap=\"showLongToast\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            长文字提示\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        加载提示\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n        bind:tap=\"showLoadingToast\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            加载提示\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button\n        bind:tap=\"showCustomLoadingToast\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            自定义加载图标\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        成功/失败提示\n      </wx-view>\n      <van-button\n        class=\"demo-margin-right\"\n        bind:tap=\"showSuccessToast\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--info van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            成功提示\n          </wx-view>\n        </wx-button>\n      </van-button>\n      <van-button\n        bind:tap=\"showFailToast\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--danger van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            失败提示\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        动态更新提示\n      </wx-view>\n      <van-button\n        bind:tap=\"showCustomizedToast\"\n      >\n        <wx-button\n          appParameter=\"\"\n          ariaLabel=\"\"\n          businessId=\"\"\n          class=\"custom-class van-button van-button--primary van-button--normal \"\n          data-detail=\"{{null}}\"\n          formType=\"\"\n          hoverClass=\"van-button--active hover-class\"\n          id=\"\"\n          lang=\"\"\n          openType=\"\"\n          sendMessageImg=\"\"\n          sendMessagePath=\"\"\n          sendMessageTitle=\"\"\n          sessionFrom=\"\"\n          showMessageCard=\"{{false}}\"\n          style=\"\"\n          bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n          bind:chooseavatar=\"onChooseAvatar\"\n          bind:contact=\"onContact\"\n          bind:error=\"onError\"\n          bind:getphonenumber=\"onGetPhoneNumber\"\n          bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n          bind:getuserinfo=\"onGetUserInfo\"\n          bind:launchapp=\"onLaunchApp\"\n          bind:opensetting=\"onOpenSetting\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-button__text\"\n          >\n            动态更新提示\n          </wx-view>\n        </wx-button>\n      </van-button>\n    </wx-view>\n  </demo-block>\n  <van-toast\n    id=\"van-toast\"\n  >\n    <van-transition\n      customClass=\"van-toast__container\"\n    />\n  </van-toast>\n</main>\n`;\n"
  },
  {
    "path": "packages/toast/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/toast/toast.ts",
    "content": "import { isObj } from '../common/validator';\n\ntype ToastMessage = string | number;\ntype ToastContext =\n  | WechatMiniprogram.Component.TrivialInstance\n  | WechatMiniprogram.Page.TrivialInstance;\n\ninterface ToastOptions {\n  show?: boolean;\n  type?: string;\n  mask?: boolean;\n  zIndex?: number;\n  context?: (() => ToastContext) | ToastContext;\n  position?: string;\n  duration?: number;\n  selector?: string;\n  forbidClick?: boolean;\n  loadingType?: string;\n  message?: ToastMessage;\n  onClose?: () => void;\n}\n\nconst defaultOptions = {\n  type: 'text',\n  mask: false,\n  message: '',\n  show: true,\n  zIndex: 1000,\n  duration: 2000,\n  position: 'middle',\n  forbidClick: false,\n  loadingType: 'circular',\n  selector: '#van-toast',\n};\n\nlet queue: WechatMiniprogram.Component.TrivialInstance[] = [];\nlet currentOptions: ToastOptions = { ...defaultOptions };\n\nfunction parseOptions(message): ToastOptions {\n  return isObj(message) ? message : { message };\n}\n\nfunction getContext() {\n  const pages = getCurrentPages();\n  return pages[pages.length - 1];\n}\n\nfunction Toast(toastOptions: ToastOptions | ToastMessage) {\n  const options = {\n    ...currentOptions,\n    ...parseOptions(toastOptions),\n  } as ToastOptions;\n\n  const context =\n    (typeof options.context === 'function'\n      ? options.context()\n      : options.context) || getContext();\n  const toast = context.selectComponent(options.selector as string);\n\n  if (!toast) {\n    console.warn('未找到 van-toast 节点，请确认 selector 及 context 是否正确');\n    return;\n  }\n\n  delete options.context;\n  delete options.selector;\n\n  toast.clear = () => {\n    toast.setData({ show: false });\n\n    if (options.onClose) {\n      options.onClose();\n    }\n  };\n\n  queue.push(toast);\n  toast.setData(options);\n  clearTimeout(toast.timer);\n\n  if (options.duration != null && options.duration > 0) {\n    toast.timer = setTimeout(() => {\n      toast.clear();\n      queue = queue.filter((item) => item !== toast);\n    }, options.duration);\n  }\n\n  return toast;\n}\n\nconst createMethod = (type: string) => (options: ToastOptions | ToastMessage) =>\n  Toast({\n    type,\n    ...parseOptions(options),\n  });\n\nToast.loading = createMethod('loading');\nToast.success = createMethod('success');\nToast.fail = createMethod('fail');\n\nToast.clear = () => {\n  queue.forEach((toast) => {\n    toast.clear();\n  });\n  queue = [];\n};\n\nToast.setDefaultOptions = (options: ToastOptions) => {\n  Object.assign(currentOptions, options);\n};\n\nToast.resetDefaultOptions = () => {\n  currentOptions = { ...defaultOptions };\n};\n\nexport default Toast;\n"
  },
  {
    "path": "packages/transition/README.md",
    "content": "# Transition 动画\n\n### 介绍\n\n使元素从一种样式逐渐变化为另一种样式的效果。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-transition\": \"@vant/weapp/transition/index\"\n}\n```\n\n## 代码演示\n\n### 基础用法\n\n将元素包裹在 transition 组件内，在元素展示/隐藏时，会有相应的过渡动画。\n\n```html\n<van-transition show=\"{{ show }}\" custom-class=\"block\">内容</van-transition>\n```\n\n### 动画类型\n\ntransition 组件内置了多种动画，可以通过`name`字段指定动画类型。\n\n```html\n<van-transition name=\"fade-up\" />\n```\n\n### 高级用法\n\n可以通过外部样式类自定义过渡效果，还可以定制进入和移出的持续时间。\n\n```html\n<van-transition\n  show=\"{{ show }}\"\n  name=\"\"\n  duration=\"{{ { enter: 300, leave: 1000 } }}\"\n  enter-class=\"van-enter-class\"\n  enter-active-class=\"van-enter-active-class\"\n  leave-active-class=\"van-leave-active-class\"\n  leave-to-class=\"van-leave-to-class\"\n/>\n```\n\n```css\n.van-enter-active-class,\n.van-leave-active-class {\n  transition-property: background-color, transform;\n}\n\n.van-enter-class,\n.van-leave-to-class {\n  background-color: red;\n  transform: rotate(-360deg) translate3d(-100%, -100%, 0);\n}\n```\n\n## API\n\n### Props\n\n| 参数         | 说明                 | 类型               | 默认值 |\n| ------------ | -------------------- | ------------------ | ------ |\n| name         | 动画类型             | _string_           | `fade` |\n| show         | 是否展示组件         | _boolean_          | `true` |\n| duration     | 动画时长，单位为毫秒 | _number \\| object_ | `300`  |\n| custom-style | 自定义样式           | _string_           | -      |\n\n### Events\n\n| 事件名            | 说明       | 参数 |\n| ----------------- | ---------- | ---- |\n| bind:before-enter | 进入前触发 | -    |\n| bind:enter        | 进入中触发 | -    |\n| bind:after-enter  | 进入后触发 | -    |\n| bind:before-leave | 离开前触发 | -    |\n| bind:leave        | 离开中触发 | -    |\n| bind:after-leave  | 离开后触发 | -    |\n\n### 外部样式类\n\n| 类名 | 说明 |\n| --- | --- |\n| custom-class | 根节点样式类 |\n| enter-class | 定义进入过渡的开始状态。在元素被插入之前生效，在元素被插入之后的下一帧移除。 |\n| enter-active-class | 定义进入过渡生效时的状态。在整个进入过渡的阶段中应用，在元素被插入之前生效，在过渡/动画完成之后移除。这个类可以被用来定义进入过渡的过程时间，延迟和曲线函数。 |\n| enter-to-class | 定义进入过渡的结束状态。在元素被插入之后下一帧生效 (与此同时 enter-class 被移除)，在过渡/动画完成之后移除。 |\n| leave-class | 定义离开过渡的开始状态。在离开过渡被触发时立刻生效，下一帧被移除。 |\n| leave-active-class | 定义离开过渡生效时的状态。在整个离开过渡的阶段中应用，在离开过渡被触发时立刻生效，在过渡/动画完成之后移除。这个类可以被用来定义离开过渡的过程时间，延迟和曲线函数。 |\n| leave-to-class | 定义离开过渡的结束状态。在离开过渡被触发之后下一帧生效 (与此同时 leave-class 被删除)，在过渡/动画完成之后移除。 |\n\n### 动画类型\n\n| 名称        | 说明     |\n| ----------- | -------- |\n| fade        | 淡入     |\n| fade-up     | 上滑淡入 |\n| fade-down   | 下滑淡入 |\n| fade-left   | 左滑淡入 |\n| fade-right  | 右滑淡入 |\n| slide-up    | 上滑进入 |\n| slide-down  | 下滑进入 |\n| slide-left  | 左滑进入 |\n| slide-right | 右滑进入 |\n"
  },
  {
    "path": "packages/transition/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../../cell/index\",\n    \"van-transition\": \"../../transition/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/transition/demo/index.less",
    "content": ".block {\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  width: 100px;\n  height: 100px;\n  margin: -50px 0 0 -50px;\n  background-color: #1989fa;\n}\n\n.van-enter-active-class,\n.van-leave-active-class {\n  transition-property: background-color, transform;\n}\n\n.van-enter-class,\n.van-leave-to-class {\n  background-color: red;\n  transform: rotate(-360deg) translate3d(-100%, -100%, 0);\n}\n"
  },
  {
    "path": "packages/transition/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    show: false,\n    name: 'fade',\n    showCustom: false,\n  },\n\n  methods: {\n    onClickFade() {\n      this.trigger('fade');\n    },\n\n    onClickFadeUp() {\n      this.trigger('fade-up');\n    },\n\n    onClickFadeDown() {\n      this.trigger('fade-down');\n    },\n\n    onClickFadeLeft() {\n      this.trigger('fade-left');\n    },\n\n    onClickFadeRight() {\n      this.trigger('fade-right');\n    },\n\n    onClickSlideUp() {\n      this.trigger('slide-up');\n    },\n\n    onClickSlideDown() {\n      this.trigger('slide-down');\n    },\n\n    onClickSlideLeft() {\n      this.trigger('slide-left');\n    },\n\n    onClickSlideRight() {\n      this.trigger('slide-right');\n    },\n\n    trigger(name) {\n      this.setData({ name, show: true });\n      setTimeout(() => {\n        this.setData({ show: false });\n      }, 500);\n    },\n\n    onClickCustom() {\n      this.setData({ showCustom: true });\n\n      setTimeout(() => {\n        this.setData({ showCustom: false });\n      }, 1000);\n    },\n\n    onBeforeEnter() {\n      console.log('before enter');\n    },\n\n    onEnter() {\n      console.log('enter');\n    },\n\n    onAfterEnter() {\n      console.log('after enter');\n    },\n\n    onBeforeLeave() {\n      console.log('before leave');\n    },\n\n    onLeave() {\n      console.log('leave');\n    },\n\n    onAfterLeave() {\n      console.log('after leave');\n    },\n  },\n});\n"
  },
  {
    "path": "packages/transition/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n  <van-cell title=\"Fade\" bind:click=\"onClickFade\" is-link />\n  <van-cell title=\"Fade Up\" bind:click=\"onClickFadeUp\" is-link />\n  <van-cell title=\"Fade Down\" bind:click=\"onClickFadeDown\" is-link />\n  <van-cell title=\"Fade Left\" bind:click=\"onClickFadeLeft\" is-link />\n  <van-cell title=\"Fade Right\" bind:click=\"onClickFadeRight\" is-link />\n  <van-cell title=\"Slide Up\" bind:click=\"onClickSlideUp\" is-link />\n  <van-cell title=\"Slide Down\" bind:click=\"onClickSlideDown\" is-link />\n  <van-cell title=\"Slide Left\" bind:click=\"onClickSlideLeft\" is-link />\n  <van-cell title=\"Slide Right\" bind:click=\"onClickSlideRight\" is-link />\n  <van-cell title=\"Custom\" bind:click=\"onClickCustom\" is-link />\n\n  <van-transition\n    show=\"{{ show }}\"\n    name=\"{{ name }}\"\n    custom-class=\"block\"\n  />\n\n  <van-transition\n    show=\"{{ showCustom }}\"\n    name=\"\"\n    duration=\"{{ { enter: 300, leave: 1000 } }}\"\n    custom-class=\"block\"\n    enter-class=\"van-enter-class\"\n    enter-active-class=\"van-enter-active-class\"\n    leave-active-class=\"van-leave-active-class\"\n    leave-to-class=\"van-leave-to-class\"\n    bind:before-enter=\"onBeforeEnter\"\n    bind:enter=\"onEnter\"\n    bind:after-enter=\"onAfterEnter\"\n    bind:before-leave=\"onBeforeLeave\"\n    bind:leave=\"onLeave\"\n    bind:after-leave=\"onAfterLeave\"\n  />\n</demo-block>\n"
  },
  {
    "path": "packages/transition/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "packages/transition/index.less",
    "content": ".van-transition {\n  transition-timing-function: ease;\n}\n\n.van-fade-enter-active,\n.van-fade-leave-active {\n  transition-property: opacity;\n}\n\n.van-fade-enter,\n.van-fade-leave-to {\n  opacity: 0;\n}\n\n.van-fade-up-enter-active,\n.van-fade-up-leave-active,\n.van-fade-down-enter-active,\n.van-fade-down-leave-active,\n.van-fade-left-enter-active,\n.van-fade-left-leave-active,\n.van-fade-right-enter-active,\n.van-fade-right-leave-active {\n  transition-property: opacity, transform;\n}\n\n.van-fade-up-enter,\n.van-fade-up-leave-to {\n  transform: translate3d(0, 100%, 0);\n  opacity: 0;\n}\n\n.van-fade-down-enter,\n.van-fade-down-leave-to {\n  transform: translate3d(0, -100%, 0);\n  opacity: 0;\n}\n\n.van-fade-left-enter,\n.van-fade-left-leave-to {\n  transform: translate3d(-100%, 0, 0);\n  opacity: 0;\n}\n\n.van-fade-right-enter,\n.van-fade-right-leave-to {\n  transform: translate3d(100%, 0, 0);\n  opacity: 0;\n}\n\n.van-slide-up-enter-active,\n.van-slide-up-leave-active,\n.van-slide-down-enter-active,\n.van-slide-down-leave-active,\n.van-slide-left-enter-active,\n.van-slide-left-leave-active,\n.van-slide-right-enter-active,\n.van-slide-right-leave-active {\n  transition-property: transform;\n}\n\n.van-slide-up-enter,\n.van-slide-up-leave-to {\n  transform: translate3d(0, 100%, 0);\n}\n\n.van-slide-down-enter,\n.van-slide-down-leave-to {\n  transform: translate3d(0, -100%, 0);\n}\n\n.van-slide-left-enter,\n.van-slide-left-leave-to {\n  transform: translate3d(-100%, 0, 0);\n}\n\n.van-slide-right-enter,\n.van-slide-right-leave-to {\n  transform: translate3d(100%, 0, 0);\n}\n"
  },
  {
    "path": "packages/transition/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { transition } from '../mixins/transition';\n\nVantComponent({\n  classes: [\n    'enter-class',\n    'enter-active-class',\n    'enter-to-class',\n    'leave-class',\n    'leave-active-class',\n    'leave-to-class',\n  ],\n\n  mixins: [transition(true)],\n});\n"
  },
  {
    "path": "packages/transition/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  wx:if=\"{{ inited }}\"\n  class=\"van-transition custom-class {{ classes }}\"\n  style=\"{{ computed.rootStyle({ currentDuration, display, customStyle }) }}\"\n  bind:transitionend=\"onTransitionEnd\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "packages/transition/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      '-webkit-transition-duration': data.currentDuration + 'ms',\n      'transition-duration': data.currentDuration + 'ms',\n    },\n    data.display ? null : 'display: none',\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "packages/transition/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-cell\n        bind:click=\"onClickFade\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Fade\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickFadeUp\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Fade Up\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickFadeDown\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Fade Down\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickFadeLeft\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Fade Left\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickFadeRight\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Fade Right\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickSlideUp\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Slide Up\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickSlideDown\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Slide Down\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickSlideLeft\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Slide Left\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickSlideRight\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Slide Right\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-cell\n        bind:click=\"onClickCustom\"\n      >\n        <wx-view\n          class=\"custom-class van-cell van-cell--clickable\"\n          hoverClass=\"van-cell--hover hover-class\"\n          hoverStayTime=\"70\"\n          style=\"\"\n          bind:tap=\"onClick\"\n        >\n          <wx-view\n            class=\"van-cell__title title-class\"\n            style=\"\"\n          >\n            Custom\n          </wx-view>\n          <wx-view\n            class=\"van-cell__value value-class\"\n          />\n          <van-icon\n            class=\"van-cell__right-icon-wrap right-icon-class\"\n            customClass=\"van-cell__right-icon\"\n          >\n            <wx-view\n              class=\"custom-class van-icon van-icon-arrow\"\n              style=\"\"\n              bind:tap=\"onClick\"\n            />\n          </van-icon>\n        </wx-view>\n      </van-cell>\n      <van-transition\n        customClass=\"block\"\n      />\n      <van-transition\n        customClass=\"block\"\n        enterActiveClass=\"van-enter-active-class\"\n        enterClass=\"van-enter-class\"\n        leaveActiveClass=\"van-leave-active-class\"\n        leaveToClass=\"van-leave-to-class\"\n        bind:after-enter=\"onAfterEnter\"\n        bind:after-leave=\"onAfterLeave\"\n        bind:before-enter=\"onBeforeEnter\"\n        bind:before-leave=\"onBeforeLeave\"\n        bind:enter=\"onEnter\"\n        bind:leave=\"onLeave\"\n      />\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/transition/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/tree-select/README.md",
    "content": "# TreeSelect 分类选择\n\n### 介绍\n\n用于从一组相关联的数据集合中进行选择。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。\n\n```json\n\"usingComponents\": {\n  \"van-tree-select\": \"@vant/weapp/tree-select/index\"\n}\n```\n\n## 代码演示\n\n### 单选模式\n\n可以在任意位置上使用 van-tree-select 标签。传入对应的数据即可。此组件支持单选或多选，具体行为完全基于事件 click-item 的实现逻辑如何为属性 active-id 赋值，当 active-id 为数组时即为多选状态。\n\n```html\n<van-tree-select\n  items=\"{{ items }}\"\n  main-active-index=\"{{ mainActiveIndex }}\"\n  active-id=\"{{ activeId }}\"\n  bind:click-nav=\"onClickNav\"\n  bind:click-item=\"onClickItem\"\n/>\n```\n\n```javascript\nPage({\n  data: {\n    mainActiveIndex: 0,\n    activeId: null,\n  },\n\n  onClickNav({ detail = {} }) {\n    this.setData({\n      mainActiveIndex: detail.index || 0,\n    });\n  },\n\n  onClickItem({ detail = {} }) {\n    const activeId = this.data.activeId === detail.id ? null : detail.id;\n\n    this.setData({ activeId });\n  },\n});\n```\n\n### 多选模式\n\n```html\n<van-tree-select\n  items=\"{{ items }}\"\n  main-active-index=\"{{ mainActiveIndex }}\"\n  active-id=\"{{ activeId }}\"\n  max=\"{{ max }}\"\n  bind:click-nav=\"onClickNav\"\n  bind:click-item=\"onClickItem\"\n/>\n```\n\n```javascript\nPage({\n  data: {\n    mainActiveIndex: 0,\n    activeId: [],\n    max: 2,\n  },\n\n  onClickNav({ detail = {} }) {\n    this.setData({\n      mainActiveIndex: detail.index || 0,\n    });\n  },\n\n  onClickItem({ detail = {} }) {\n    const { activeId } = this.data;\n\n    const index = activeId.indexOf(detail.id);\n    if (index > -1) {\n      activeId.splice(index, 1);\n    } else {\n      activeId.push(detail.id);\n    }\n\n    this.setData({ activeId });\n  },\n});\n```\n\n### 自定义内容\n\n```html\n<van-tree-select\n  items=\"{{ items }}\"\n  height=\"55vw\"\n  main-active-index=\"{{ mainActiveIndex }}\"\n  active-id=\"{{ activeId }}\"\n  bind:click-nav=\"onClickNav\"\n  bind:click-item=\"onClickItem\"\n>\n  <image src=\"https://img.yzcdn.cn/vant/apple-1.jpg\" slot=\"content\" />\n</van-tree-select>\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| items | 分类显示所需的数据 | _Array_ | `[]` |\n| height | 高度，默认单位为`px` | _number \\| string_ | `300` |\n| main-active-index | 左侧选中项的索引 | _number_ | `0` |\n| active-id | 右侧选中项的 id，支持传入数组 | _string \\| number \\| Array_ | `0` |\n| max | 右侧项最大选中个数 | _number_ | _Infinity_ |\n| selected-icon `v1.5.0` | 自定义右侧栏选中状态的图标 | _string_ | `success` |\n\n### Events\n\n| 事件名 | 说明 | 回调参数 |\n| --- | --- | --- |\n| bind:click-nav | 左侧导航点击时，触发的事件 | event.detail.index：被点击的导航的索引 |\n| bind:click-item | 右侧选择项被点击时，会触发的事件 | event.detail: 该点击项的数据 |\n\n### Slots\n\n| 名称    | 说明                                             |\n| ------- | ------------------------------------------------ |\n| content | 自定义右侧区域内容，如果存在 items，则插入在顶部 |\n\n### items 数据结构\n\n`items` 整体为一个数组，数组内包含一系列描述分类的对象。每个分类里，text 表示当前分类的名称。children 表示分类里的可选项，为数组结构，id 被用来唯一标识每个选项。\n\n```javascript\n[\n  {\n    // 导航名称\n    text: '所有城市',\n    // 导航名称右上角徽标，1.5.0 版本开始支持\n    badge: 3,\n    // 是否在导航名称右上角显示小红点，1.5.0 版本开始支持\n    dot: true,\n    // 禁用选项\n    disabled: false,\n    // 该导航下所有的可选项\n    children: [\n      {\n        // 名称\n        text: '温州',\n        // id，作为匹配选中状态的标识\n        id: 1,\n        // 禁用选项\n        disabled: true,\n      },\n      {\n        text: '杭州',\n        id: 2,\n      },\n    ],\n  },\n];\n```\n\n### 外部样式类\n\n| 类名                   | 说明               |\n| ---------------------- | ------------------ |\n| main-item-class        | 左侧选项样式类     |\n| content-item-class     | 右侧选项样式类     |\n| main-active-class      | 左侧选项选中样式类 |\n| content-active-class   | 右侧选项选中样式类 |\n| main-disabled-class    | 左侧选项禁用样式类 |\n| content-disabled-class | 右侧选项禁用样式类 |\n"
  },
  {
    "path": "packages/tree-select/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-image\": \"../../image/index\",\n    \"van-tree-select\": \"../../tree-select/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/tree-select/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nconst config = {\n  pro1Name: '浙江',\n  pro1: [\n    {\n      text: '杭州',\n      id: 1,\n    },\n    {\n      text: '温州',\n      id: 2,\n    },\n    {\n      text: '宁波',\n      id: 3,\n      disabled: true,\n    },\n    {\n      text: '义乌',\n      id: 4,\n    },\n  ],\n  pro2Name: '江苏',\n  pro2: [\n    {\n      text: '南京',\n      id: 5,\n    },\n    {\n      text: '无锡',\n      id: 6,\n    },\n    {\n      text: '徐州',\n      id: 7,\n    },\n    {\n      text: '苏州',\n      id: 8,\n    },\n  ],\n  pro3Name: '福建',\n  pro3: [\n    {\n      text: '泉州',\n      id: 9,\n    },\n    {\n      text: '厦门',\n      id: 10,\n    },\n  ],\n};\nconst items = [\n  {\n    text: config.pro1Name,\n    children: config.pro1,\n  },\n  {\n    text: config.pro2Name,\n    children: config.pro2,\n  },\n  {\n    text: config.pro3Name,\n    disabled: true,\n    children: config.pro3,\n  },\n];\n\nVantComponent({\n  data: {\n    items,\n    badgeItems: items.slice(0, 2).map((item, index) => {\n      if (index === 0) {\n        return { ...item, dot: true };\n      }\n      if (index === 1) {\n        return { ...item, badge: 5 };\n      }\n\n      return item;\n    }),\n    mainActiveIndex: 0,\n    activeId: 0,\n    mainActiveIndexMulti: 0,\n    activeIdMulti: [],\n  },\n\n  methods: {\n    onClickNav({ detail }) {\n      this.setData({\n        mainActiveIndex: detail.index || 0,\n      });\n    },\n\n    onClickItem({ detail }) {\n      const activeId = this.data.activeId === detail.id ? null : detail.id;\n\n      this.setData({ activeId });\n    },\n\n    onClickNavMulti({ detail }) {\n      this.setData({\n        mainActiveIndexMulti: detail.index || 0,\n      });\n    },\n\n    onClickItemMulti({ detail }) {\n      const { activeIdMulti }: { activeIdMulti: any } = this.data;\n      const idx = activeIdMulti.indexOf(detail.id);\n      if (idx > -1) {\n        activeIdMulti.splice(idx, 1);\n      } else {\n        activeIdMulti.push(detail.id);\n      }\n\n      this.setData({ activeIdMulti });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tree-select/demo/index.wxml",
    "content": "<demo-block title=\"单选模式\">\n  <van-tree-select\n    items=\"{{ items }}\"\n    main-active-index=\"{{ mainActiveIndex }}\"\n    active-id=\"{{ activeId }}\"\n    bind:click-item=\"onClickItem\"\n    bind:click-nav=\"onClickNav\"\n  ></van-tree-select>\n</demo-block>\n\n<demo-block title=\"多选模式\">\n  <van-tree-select\n    max=\"2\"\n    items=\"{{ items }}\"\n    main-active-index=\"{{ mainActiveIndexMulti }}\"\n    active-id=\"{{ activeIdMulti }}\"\n    bind:click-item=\"onClickItemMulti\"\n    bind:click-nav=\"onClickNavMulti\"\n  ></van-tree-select>\n</demo-block>\n\n<demo-block title=\"自定义内容\">\n  <van-tree-select\n    items=\"{{ [{ text: '分组 1' }, { text: '分组 2' }] }}\"\n    height=\"55vw\"\n    main-active-index=\"{{ mainActiveIndex }}\"\n    active-id=\"{{ activeId }}\"\n    bind:click-item=\"onClickItem\"\n    bind:click-nav=\"onClickNav\"\n  >\n    <van-image\n      wx:if=\"{{ mainActiveIndex === 0 }}\"\n      src=\"https://img.yzcdn.cn/vant/apple-1.jpg\"\n      width=\"100%\"\n      height=\"100%\"\n      slot=\"content\"\n    />\n    <van-image\n      wx:elif=\"{{ mainActiveIndex === 1 }}\"\n      src=\"https://img.yzcdn.cn/vant/apple-2.jpg\"\n      width=\"100%\"\n      height=\"100%\"\n      slot=\"content\"\n    />\n  </van-tree-select>\n</demo-block>\n\n<demo-block title=\"徽标提示\">\n  <van-tree-select\n    items=\"{{ badgeItems }}\"\n    main-active-index=\"{{ mainActiveIndex }}\"\n    active-id=\"{{ activeId }}\"\n    bind:click-item=\"onClickItem\"\n    bind:click-nav=\"onClickNav\"\n  ></van-tree-select>\n</demo-block>\n"
  },
  {
    "path": "packages/tree-select/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-sidebar\": \"../sidebar/index\",\n    \"van-sidebar-item\": \"../sidebar-item/index\"\n  }\n}\n"
  },
  {
    "path": "packages/tree-select/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-tree-select {\n  position: relative;\n  display: flex;\n  user-select: none;\n  font-size: var(--tree-select-font-size, @tree-select-font-size);\n\n  &__nav {\n    flex: 1;\n    background-color: var(\n      --tree-select-nav-background-color,\n      @tree-select-nav-background-color\n    );\n\n    &__inner {\n      width: 100% !important;\n      height: 100%;\n    }\n\n    --sidebar-padding: @tree-select-nav-item-padding;\n  }\n\n  &__content {\n    flex: 2;\n    background-color: var(\n      --tree-select-content-background-color,\n      @tree-select-content-background-color\n    );\n  }\n\n  &__item {\n    position: relative;\n    font-weight: bold;\n    padding: 0 32px 0 var(--padding-md, @padding-md);\n    line-height: var(--tree-select-item-height, @tree-select-item-height);\n\n    &--active {\n      color: var(\n        --tree-select-item-active-color,\n        @tree-select-item-active-color\n      );\n    }\n\n    &--disabled {\n      color: var(\n        --tree-select-item-disabled-color,\n        @tree-select-item-disabled-color\n      );\n    }\n  }\n\n  &__selected {\n    position: absolute;\n    top: 50%;\n    transform: translateY(-50%);\n    right: var(--padding-md, @padding-md);\n  }\n}\n"
  },
  {
    "path": "packages/tree-select/index.ts",
    "content": "import { VantComponent } from '../common/component';\n\nVantComponent({\n  classes: [\n    'main-item-class',\n    'content-item-class',\n    'main-active-class',\n    'content-active-class',\n    'main-disabled-class',\n    'content-disabled-class',\n  ],\n\n  props: {\n    items: {\n      type: Array,\n      observer: 'updateSubItems',\n    },\n    activeId: null,\n    mainActiveIndex: {\n      type: Number,\n      value: 0,\n      observer: 'updateSubItems',\n    },\n    height: {\n      type: null,\n      value: 300,\n    },\n    max: {\n      type: Number,\n      value: Infinity,\n    },\n    selectedIcon: {\n      type: String,\n      value: 'success',\n    },\n  },\n\n  data: {\n    subItems: [],\n  },\n\n  methods: {\n    // 当一个子项被选择时\n    onSelectItem(event: WechatMiniprogram.TouchEvent) {\n      const { item } = event.currentTarget.dataset;\n      const isArray = Array.isArray(this.data.activeId);\n      // 判断有没有超出右侧选择的最大数\n      const isOverMax = isArray && this.data.activeId.length >= this.data.max;\n      // 判断该项有没有被选中, 如果有被选中，则忽视是否超出的条件\n      const isSelected = isArray\n        ? this.data.activeId.indexOf(item.id) > -1\n        : this.data.activeId === item.id;\n\n      if (!item.disabled && (!isOverMax || isSelected)) {\n        this.$emit('click-item', item);\n      }\n    },\n\n    // 当一个导航被点击时\n    onClickNav(event: WechatMiniprogram.CustomEvent) {\n      const index = (event.detail as unknown) as number;\n      const item = this.data.items[index];\n      if (!item.disabled) {\n        this.$emit('click-nav', { index });\n      }\n    },\n\n    // 更新子项列表\n    updateSubItems() {\n      const { items, mainActiveIndex } = this.data;\n      const { children = [] } = items[mainActiveIndex] || {};\n\n      this.setData({ subItems: children });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/tree-select/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"wxs\" />\n\n<view\n  class=\"van-tree-select\"\n  style=\"height: {{ utils.addUnit(height) }}\"\n>\n  <scroll-view scroll-y class=\"van-tree-select__nav\">\n    <van-sidebar active-key=\"{{ mainActiveIndex }}\" bind:change=\"onClickNav\" custom-class=\"van-tree-select__nav__inner\">\n      <van-sidebar-item\n        wx:for=\"{{ items }}\"\n        wx:key=\"index\"\n        custom-class=\"main-item-class\"\n        active-class=\"main-active-class\"\n        disabled-class=\"main-disabled-class\"\n        badge=\"{{ item.badge }}\"\n        dot=\"{{ item.dot }}\"\n        title=\"{{ item.text }}\"\n        disabled=\"{{ item.disabled }}\"\n      />\n    </van-sidebar>\n  </scroll-view>\n  <scroll-view scroll-y class=\"van-tree-select__content\">\n    <slot name=\"content\" />\n    <view\n      wx:for=\"{{ subItems }}\"\n      wx:key=\"id\"\n      class=\"van-ellipsis content-item-class {{ utils.bem('tree-select__item', { active: wxs.isActive(activeId, item.id), disabled: item.disabled }) }} {{ wxs.isActive(activeId, item.id) ? 'content-active-class' : '' }} {{ item.disabled ? 'content-disabled-class' : '' }}\"\n      data-item=\"{{ item }}\"\n      bind:tap=\"onSelectItem\"\n    >\n      {{ item.text }}\n      <van-icon\n        wx:if=\"{{ wxs.isActive(activeId, item.id) }}\"\n        name=\"{{ selectedIcon }}\"\n        size=\"16px\"\n        class=\"van-tree-select__selected\"\n      />\n    </view>\n  </scroll-view>\n</view>\n"
  },
  {
    "path": "packages/tree-select/index.wxs",
    "content": "/* eslint-disable */\nvar array = require('../wxs/array.wxs');\n\nfunction isActive (activeList, itemId) {\n  if (array.isArray(activeList)) {\n    return activeList.indexOf(itemId) > -1;\n  }\n\n  return activeList === itemId;\n}\n\nmodule.exports.isActive = isActive;\n"
  },
  {
    "path": "packages/tree-select/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        单选模式\n      </wx-view>\n      <van-tree-select\n        bind:click-item=\"onClickItem\"\n        bind:click-nav=\"onClickNav\"\n      >\n        <wx-view\n          class=\"van-tree-select\"\n          style=\"height: 300px\"\n        >\n          <wx-scroll-view\n            class=\"van-tree-select__nav\"\n            scrollY=\"{{true}}\"\n          >\n            <van-sidebar\n              customClass=\"van-tree-select__nav__inner\"\n              bind:change=\"onClickNav\"\n            >\n              <wx-view\n                class=\"van-sidebar custom-class\"\n              >\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--selected active-class  custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info />\n                      <wx-view>\n                        浙江\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info />\n                      <wx-view>\n                        江苏\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--disabled  disabled-class custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info />\n                      <wx-view>\n                        福建\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n              </wx-view>\n            </van-sidebar>\n          </wx-scroll-view>\n          <wx-scroll-view\n            class=\"van-tree-select__content\"\n            scrollY=\"{{true}}\"\n          >\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 1,\n                  \"text\": \"杭州\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      杭州\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 2,\n                  \"text\": \"温州\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      温州\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item van-tree-select__item--disabled  content-disabled-class\"\n              data-item=\"{{\n                Object {\n                  \"disabled\": true,\n                  \"id\": 3,\n                  \"text\": \"宁波\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      宁波\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 4,\n                  \"text\": \"义乌\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      义乌\n      \n            </wx-view>\n          </wx-scroll-view>\n        </wx-view>\n      </van-tree-select>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        多选模式\n      </wx-view>\n      <van-tree-select\n        bind:click-item=\"onClickItemMulti\"\n        bind:click-nav=\"onClickNavMulti\"\n      >\n        <wx-view\n          class=\"van-tree-select\"\n          style=\"height: 300px\"\n        >\n          <wx-scroll-view\n            class=\"van-tree-select__nav\"\n            scrollY=\"{{true}}\"\n          >\n            <van-sidebar\n              customClass=\"van-tree-select__nav__inner\"\n              bind:change=\"onClickNav\"\n            >\n              <wx-view\n                class=\"van-sidebar custom-class\"\n              >\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--selected active-class  custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info />\n                      <wx-view>\n                        浙江\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info />\n                      <wx-view>\n                        江苏\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--disabled  disabled-class custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info />\n                      <wx-view>\n                        福建\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n              </wx-view>\n            </van-sidebar>\n          </wx-scroll-view>\n          <wx-scroll-view\n            class=\"van-tree-select__content\"\n            scrollY=\"{{true}}\"\n          >\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 1,\n                  \"text\": \"杭州\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      杭州\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 2,\n                  \"text\": \"温州\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      温州\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item van-tree-select__item--disabled  content-disabled-class\"\n              data-item=\"{{\n                Object {\n                  \"disabled\": true,\n                  \"id\": 3,\n                  \"text\": \"宁波\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      宁波\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 4,\n                  \"text\": \"义乌\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      义乌\n      \n            </wx-view>\n          </wx-scroll-view>\n        </wx-view>\n      </van-tree-select>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义内容\n      </wx-view>\n      <van-tree-select\n        bind:click-item=\"onClickItem\"\n        bind:click-nav=\"onClickNav\"\n      >\n        <wx-view\n          class=\"van-tree-select\"\n          style=\"height: 55vw\"\n        >\n          <wx-scroll-view\n            class=\"van-tree-select__nav\"\n            scrollY=\"{{true}}\"\n          >\n            <van-sidebar\n              customClass=\"van-tree-select__nav__inner\"\n              bind:change=\"onClickNav\"\n            >\n              <wx-view\n                class=\"van-sidebar custom-class\"\n              >\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--selected active-class  custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info />\n                      <wx-view>\n                        分组 1\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info />\n                      <wx-view>\n                        分组 2\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n              </wx-view>\n            </van-sidebar>\n          </wx-scroll-view>\n          <wx-scroll-view\n            class=\"van-tree-select__content\"\n            scrollY=\"{{true}}\"\n          >\n            <van-image\n              slot=\"content\"\n            >\n              <wx-view\n                class=\"custom-class van-image\"\n                style=\"width:100%;height:100%\"\n                bind:tap=\"onClick\"\n              >\n                <wx-image\n                  class=\"image-class van-image__img\"\n                  lazyLoad=\"{{false}}\"\n                  mode=\"scaleToFill\"\n                  showMenuByLongpress=\"{{false}}\"\n                  src=\"https://img.yzcdn.cn/vant/apple-1.jpg\"\n                  webp=\"{{false}}\"\n                  bind:error=\"onError\"\n                  bind:load=\"onLoad\"\n                />\n                <wx-view\n                  class=\"loading-class van-image__loading\"\n                >\n                  <van-icon\n                    customClass=\"van-image__loading-icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo\"\n                      style=\"\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                </wx-view>\n              </wx-view>\n            </van-image>\n          </wx-scroll-view>\n        </wx-view>\n      </van-tree-select>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix \"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        徽标提示\n      </wx-view>\n      <van-tree-select\n        bind:click-item=\"onClickItem\"\n        bind:click-nav=\"onClickNav\"\n      >\n        <wx-view\n          class=\"van-tree-select\"\n          style=\"height: 300px\"\n        >\n          <wx-scroll-view\n            class=\"van-tree-select__nav\"\n            scrollY=\"{{true}}\"\n          >\n            <van-sidebar\n              customClass=\"van-tree-select__nav__inner\"\n              bind:change=\"onClickNav\"\n            >\n              <wx-view\n                class=\"van-sidebar custom-class\"\n              >\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item van-sidebar-item--selected active-class  custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info>\n                        <wx-view\n                          class=\"van-info van-info van-info--dot custom-class\"\n                          style=\"\"\n                        >\n                          \n                        </wx-view>\n                      </van-info>\n                      <wx-view>\n                        浙江\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n                <van-sidebar-item\n                  activeClass=\"main-active-class\"\n                  customClass=\"main-item-class\"\n                  disabledClass=\"main-disabled-class\"\n                >\n                  <wx-view\n                    class=\"van-sidebar-item   custom-class\"\n                    hoverClass=\"van-sidebar-item--hover\"\n                    hoverStayTime=\"70\"\n                    bind:tap=\"onClick\"\n                  >\n                    <wx-view\n                      class=\"van-sidebar-item__text\"\n                    >\n                      <van-info>\n                        <wx-view\n                          class=\"van-info van-info custom-class\"\n                          style=\"\"\n                        >\n                          5\n                        </wx-view>\n                      </van-info>\n                      <wx-view>\n                        江苏\n                      </wx-view>\n                    </wx-view>\n                  </wx-view>\n                </van-sidebar-item>\n              </wx-view>\n            </van-sidebar>\n          </wx-scroll-view>\n          <wx-scroll-view\n            class=\"van-tree-select__content\"\n            scrollY=\"{{true}}\"\n          >\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 1,\n                  \"text\": \"杭州\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      杭州\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 2,\n                  \"text\": \"温州\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      温州\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item van-tree-select__item--disabled  content-disabled-class\"\n              data-item=\"{{\n                Object {\n                  \"disabled\": true,\n                  \"id\": 3,\n                  \"text\": \"宁波\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      宁波\n      \n            </wx-view>\n            <wx-view\n              class=\"van-ellipsis content-item-class van-tree-select__item  \"\n              data-item=\"{{\n                Object {\n                  \"id\": 4,\n                  \"text\": \"义乌\",\n                }\n              }}\"\n              bind:tap=\"onSelectItem\"\n            >\n              \n      义乌\n      \n            </wx-view>\n          </wx-scroll-view>\n        </wx-view>\n      </van-tree-select>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/tree-select/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  try {\n    const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n      rootPath: path.resolve(__dirname, '../../'),\n    });\n    const comp = simulate.render(id);\n    comp.attach(document.createElement('parent-wrapper'));\n    expect(comp.toJSON()).toMatchSnapshot();\n  } catch (e) {\n    console.error(e);\n  }\n});\n"
  },
  {
    "path": "packages/uploader/README.md",
    "content": "# Uploader 文件上传\n\n### 介绍\n\n用于将本地的图片或文件上传至服务器，并在上传过程中展示预览图和上传进度。目前 Uploader 组件不包含将文件上传至服务器的接口逻辑，该步骤需要自行实现。\n\n### 引入\n\n在`app.json`或`index.json`中引入组件，默认为`ES6`版本，`ES5`引入方式参见[快速上手](#/quickstart)。\n\n```json\n\"usingComponents\": {\n  \"van-uploader\": \"@vant/weapp/uploader/index\"\n}\n```\n\n> Vant Weapp 1.0 版本开始支持此组件，升级方式参见[快速上手](#/quickstart)\n\n## 代码演示\n\n### 基础用法\n\n文件上传完毕后会触发`after-read`回调函数，获取到对应的文件的临时地址，然后再使用`wx.uploadFile`将图片上传到远程服务器上。\n\n```html\n<van-uploader file-list=\"{{ fileList }}\" bind:after-read=\"afterRead\" />\n```\n\n```js\nPage({\n  data: {\n    fileList: [],\n  },\n\n  afterRead(event) {\n    const { file } = event.detail;\n    // 当设置 mutiple 为 true 时, file 为数组格式，否则为对象格式\n    wx.uploadFile({\n      url: 'https://example.weixin.qq.com/upload', // 仅为示例，非真实的接口地址\n      filePath: file.url,\n      name: 'file',\n      formData: { user: 'test' },\n      success(res) {\n        // 上传完成需要更新 fileList\n        const { fileList = [] } = this.data;\n        fileList.push({ ...file, url: res.data });\n        this.setData({ fileList });\n      },\n    });\n  },\n});\n```\n\n### 图片预览\n\n通过向组件传入`file-list`属性，可以绑定已经上传的图片列表，并展示图片列表的预览图。file-list 的详细结构可见下方。\n\n```html\n<van-uploader file-list=\"{{ fileList }}\" />\n```\n\n```js\nPage({\n  data: {\n    fileList: [\n      {\n        url: 'https://img.yzcdn.cn/vant/leaf.jpg',\n        name: '图片1',\n      },\n      // Uploader 根据文件后缀来判断是否为图片文件\n      // 如果图片 URL 中不包含类型信息，可以添加 isImage 标记来声明\n      {\n        url: 'http://iph.href.lu/60x60?text=default',\n        name: '图片2',\n        isImage: true,\n        deletable: true,\n      },\n    ],\n  },\n});\n```\n\n### 图片可删除状态\n\n通过`deletable`属性可控制是否开启所有图片的可删除状态，`deletable`默认为`true`，即所有图片都可删除。\n\n若希望控制单张图片的可删除状态，可将`deletable`属性设置为`true`，并在`fileList`中为每一项设置`deletable`属性。\n\n```html\n<van-uploader file-list=\"{{ fileList }}\" deletable=\"{{ true }}\" />\n```\n\n```js\nPage({\n  data: {\n    fileList: [\n      {\n        url: 'https://img.yzcdn.cn/vant/leaf.jpg',\n      },\n      {\n        url: 'https://img.yzcdn.cn/vant/tree.jpg',\n        deletable: false,\n      },\n    ],\n  },\n});\n```\n\n### 上传状态\n\n通过`status`属性可以标识上传状态，`uploading`表示上传中，`failed`表示上传失败，`done`表示上传完成。\n\n```html\n<van-uploader file-list=\"{{ fileList }}\" />\n```\n\n```js\nPage({\n  data: {\n    fileList: [\n      {\n        url: 'https://img.yzcdn.cn/vant/leaf.jpg',\n        status: 'uploading',\n        message: '上传中',\n      },\n      {\n        url: 'https://img.yzcdn.cn/vant/tree.jpg',\n        status: 'failed',\n        message: '上传失败',\n      },\n    ],\n  },\n});\n```\n\n### 限制上传数量\n\n通过`max-count`属性可以限制上传文件的数量，上传数量达到限制后，会自动隐藏上传区域。\n\n```html\n<van-uploader\n  file-list=\"{{ fileList }}\"\n  max-count=\"2\"\n  bind:after-read=\"afterRead\"\n/>\n```\n\n### 自定义上传样式\n\n通过插槽可以自定义上传区域的样式。\n\n```html\n<van-uploader>\n  <van-button icon=\"photo\" type=\"primary\">上传图片</van-button>\n</van-uploader>\n```\n\n### 上传前校验\n\n将`use-before-read`属性设置为`true`，然后绑定 `before-read` 事件可以在上传前进行校验，调用 `callback` 方法传入 `true` 表示校验通过，传入 `false` 表示校验失败。\n\n```html\n<van-uploader\n  file-list=\"{{ fileList }}\"\n  accept=\"media\"\n  use-before-read\n  bind:before-read=\"beforeRead\"\n  bind:after-read=\"afterRead\"\n/>\n```\n\n```js\nPage({\n  data: {\n    fileList: [],\n  },\n\n  beforeRead(event) {\n    const { file, callback } = event.detail;\n    callback(file.type === 'image');\n  },\n});\n```\n\n## 云开发示例\n\n### 上传图片至云存储\n\n在开发中，可以利用[小程序云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)的云存储能力，将图片上传至云存储内。然后根据返回的`fileiId`来下载图片、删除图片和替换临时链接。\n\n```js\n// 上传图片\nuploadToCloud() {\n  wx.cloud.init();\n  const { fileList } = this.data;\n  if (!fileList.length) {\n    wx.showToast({ title: '请选择图片', icon: 'none' });\n  } else {\n    const uploadTasks = fileList.map((file, index) => this.uploadFilePromise(`my-photo${index}.png`, file));\n    Promise.all(uploadTasks)\n      .then(data => {\n        wx.showToast({ title: '上传成功', icon: 'none' });\n        const newFileList = data.map(item => ({ url: item.fileID }));\n        this.setData({ cloudPath: data, fileList: newFileList });\n      })\n      .catch(e => {\n        wx.showToast({ title: '上传失败', icon: 'none' });\n        console.log(e);\n      });\n  }\n}\n\nuploadFilePromise(fileName, chooseResult) {\n  return wx.cloud.uploadFile({\n    cloudPath: fileName,\n    filePath: chooseResult.url\n  });\n}\n```\n\n## API\n\n### Props\n\n| 参数 | 说明 | 类型 | 默认值 |\n| --- | --- | --- | --- |\n| name | 标识符，可以在回调函数的第二项参数中获取 | _string \\| number_ | - |\n| accept | 接受的文件类型, 可选值为`all` `media` `image` `file` `video` | _string_ | `image` |\n| sizeType | 所选的图片的尺寸, 当`accept`为`image` \\| `media` 类型时设置所选图片的尺寸可选值为`original` `compressed` | _string[]_ | `['original','compressed']` |\n| preview-size | 预览图和上传区域的尺寸，默认单位为`px` | _string \\| number_ | `80px` |\n| preview-image | 是否在上传完成后展示预览图 | _boolean_ | `true` |\n| preview-full-image | 是否在点击预览图后展示全屏图片预览 | _boolean_ | `true` |\n| preview-file `v1.11.7` | 是否在点击文件预览图后预览文件 | _boolean_ | `true` |\n| multiple | 是否开启图片多选，部分安卓机型不支持 | _boolean_ | `false` |\n| disabled | 是否禁用文件上传 | _boolean_ | `false` |\n| show-upload | 是否展示文件上传按钮 | _boolean_ | `true` |\n| deletable | 是否展示删除按钮 | _boolean_ | `true` |\n| capture | 图片或者视频选取模式，当`accept`为`image` \\| `media` 类型时设置`capture`可选值为`camera`可以直接调起摄像头 | _string[]_ | `['album', 'camera']` |\n| max-size | 文件大小限制，单位为`byte` | _number_ | - |\n| max-count | 文件上传数量限制 | _number_ | - |\n| upload-text | 上传区域文字提示 | _string_ | - |\n| video-fit `1.10.21` | video 封面的预览图模式，可选值参考小程序`video`组件的`object-fit`属性 | _string_ | `contain` |\n| image-fit | 预览图裁剪模式，可选值参考小程序`image`组件的`mode`属性 | _string_ | `scaleToFill` |\n| use-before-read | 是否开启文件读取前事件 | _boolean_ | - |\n| camera | 当 accept 为 `video` \\| `media` 时生效，可选值为 `back` `front` | _string_ | - |\n| compressed | 当 accept 为 `video` 时生效，是否压缩视频，默认为`true` | _boolean_ | - |\n| max-duration | 当 accept 为 `video` \\| `media` 时生效，拍摄视频最长拍摄时间，单位秒 | _number_ | `60` |\n| media-type `v1.10.8` | 当 accept 为 `media` 时生效，选择的文件的文件类型，可选值为 `image` `video` `mix` | _string[]_ | `['image', 'video', 'mix']` |\n| extension `v1.10.11` | 当 accept 为 `file` 时生效，根据文件拓展名过滤可选择文件。每一项都不能是空字符串。默认不过滤 | _string[] \\| undefined_ | - |\n| showmenu `v1.10.13` | 预览图片时，是否显示长按菜单 | _boolean_ | `true` |\n| upload-icon | 上传区域图标，可选值见 [Icon 组件](#/icon) | _string_ | `plus` |\n| referrer-policy `v1.11.6` | 当 accept 为 video 时生效，具体用法参考 [微信官方 - 媒体组件 / video](https://developers.weixin.qq.com/miniprogram/dev/component/video.html) | string | `no-referrer` |\n\n#### accept 的合法值\n\n| 参数    | 说明                                 |\n| ------- | ------------------------------------ |\n| `media` | 图片和视频                           |\n| `image` | 图片                                 |\n| `video` | 视频                                 |\n| `file`  | 从客户端会话选择图片和视频以外的文件 |\n| `all`   | 从客户端会话选择所有文件             |\n\n### FileList\n\n`file-list` 为一个对象数组，数组中的每一个对象包含以下 `key`。\n\n| 参数 | 说明 |\n| --- | --- |\n| `url` | 图片和视频的网络资源地址 |\n| `name` | 文件名称，视频将在全屏预览时作为标题显示 |\n| `thumb` | 图片缩略图或视频封面的网络资源地址，仅对图片和视频有效，`accept` 为 `video`时，真机不会返回该属性，建议使用 `media` 和 `media-type` 配合完成视频上传 |\n| `type` | 文件类型，可选值`image` `video` `file` |\n| `isImage` | 手动标记图片资源 |\n| `isVideo` | 手动标记视频资源 |\n\n### Slot\n\n| 名称 | 说明           |\n| ---- | -------------- |\n| -    | 自定义上传区域 |\n\n### Events\n\n| 事件名 | 说明 | 回调参数 |\n| --- | --- | --- |\n| bind:before-read | 文件读取前，在回调函数中返回 `false` 可终止文件读取，绑定事件的同时需要将`use-before-read`属性设置为`true` | `event.detail.file`: 当前读取的文件，`event.detail.callback`: 回调函数，调用`callback(false)`终止文件读取 |\n| bind:after-read | 文件读取完成后 | `event.detail.file`: 当前读取的文件 |\n| bind:oversize | 文件超出大小限制 | - |\n| bind:click-preview | 点击预览图片 | `event.detail.index`: 点击图片的序号值 |\n| bind:delete | 删除图片 | `event.detail.index`: 删除图片的序号值 |\n"
  },
  {
    "path": "packages/uploader/demo/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../../button/index\",\n    \"van-uploader\": \"../../uploader/index\",\n    \"demo-block\": \"../../../example/components/demo-block/index\"\n  }\n}\n"
  },
  {
    "path": "packages/uploader/demo/index.ts",
    "content": "import { VantComponent } from '../../common/component';\n\nVantComponent({\n  data: {\n    fileList1: [],\n    fileList2: [\n      { url: 'https://img.yzcdn.cn/vant/leaf.jpg' },\n      { url: 'https://img.yzcdn.cn/vant/tree.jpg' },\n    ],\n    fileList3: [{ url: 'https://img.yzcdn.cn/vant/sand.jpg' }],\n    fileList4: [],\n    fileList5: [],\n    fileList6: [],\n    cloudPath: [],\n    fileList7: [],\n    fileList8: [\n      {\n        url: 'https://img.yzcdn.cn/vant/leaf.jpg',\n        status: 'uploading',\n        message: '上传中',\n      },\n      {\n        url: 'https://img.yzcdn.cn/vant/tree.jpg',\n        status: 'failed',\n        message: '上传失败',\n      },\n    ],\n  },\n\n  methods: {\n    beforeRead(event) {\n      const { file, callback = () => {} } = event.detail;\n      if (file.url.indexOf('jpeg') < 0) {\n        wx.showToast({ title: '请选择jpg图片上传', icon: 'none' });\n        callback(false);\n        return;\n      }\n      callback(true);\n    },\n\n    afterRead(event) {\n      const { file, name } = event.detail;\n      console.log(JSON.stringify(file, null, 2));\n      const fileList = this.data[`fileList${name}`];\n\n      this.setData({ [`fileList${name}`]: fileList.concat(file) });\n    },\n\n    oversize() {\n      wx.showToast({ title: '文件超出大小限制', icon: 'none' });\n    },\n\n    delete(event) {\n      const { index, name } = event.detail;\n      const fileList = this.data[`fileList${name}`];\n      fileList.splice(index, 1);\n      this.setData({ [`fileList${name}`]: fileList });\n    },\n\n    clickPreview() {},\n\n    uploadToCloud() {\n      wx.cloud.init();\n      const { fileList6: fileList = [] } = this.data;\n      if (!fileList.length) {\n        wx.showToast({ title: '请选择图片', icon: 'none' });\n      } else {\n        const uploadTasks = fileList.map((file, index) =>\n          this.uploadFilePromise(`my-photo${index}.png`, file)\n        );\n        Promise.all(uploadTasks)\n          .then((data) => {\n            wx.showToast({ title: '上传成功', icon: 'none' });\n            const fileList = data.map((item) => ({ url: item.fileID }));\n            this.setData({\n              cloudPath: data as any,\n              fileList6: fileList as any,\n            });\n          })\n          .catch((e) => {\n            wx.showToast({ title: '上传失败', icon: 'none' });\n            console.log(e);\n          });\n      }\n    },\n\n    uploadFilePromise(fileName, chooseResult) {\n      return wx.cloud.uploadFile({\n        cloudPath: fileName,\n        filePath: chooseResult.path,\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/uploader/demo/index.wxml",
    "content": "<demo-block title=\"基础用法\" padding>\n  <van-uploader\n    name=\"1\"\n    file-list=\"{{ fileList1 }}\"\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n    bind:click-preview=\"clickPreview\"\n  />\n</demo-block>\n\n<demo-block title=\"上传视频\" padding>\n  <van-uploader\n    name=\"7\"\n    accept=\"video\"\n    file-list=\"{{ fileList7 }}\"\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n  />\n</demo-block>\n\n<demo-block title=\"文件预览\" padding>\n  <van-uploader\n    name=\"2\"\n    file-list=\"{{ fileList2 }}\"\n    multiple\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n    bind:click-preview=\"clickPreview\"\n  />\n</demo-block>\n\n<demo-block title=\"隐藏上传按钮\" padding>\n  <van-uploader\n    name=\"2\"\n    file-list=\"{{ fileList2 }}\"\n    multiple\n    show-upload=\"{{ false }}\"\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n    bind:click-preview=\"clickPreview\"\n  />\n</demo-block>\n\n<demo-block title=\"上传状态\" padding>\n  <van-uploader\n    name=\"8\"\n    file-list=\"{{ fileList8 }}\"\n    multiple\n    max-count=\"{{ 2 }}\"\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n    bind:click-preview=\"clickPreview\"\n  />\n</demo-block>\n\n<demo-block title=\"限制上传数量\" padding>\n  <van-uploader\n    name=\"3\"\n    file-list=\"{{ fileList3 }}\"\n    multiple\n    max-count=\"{{ 2 }}\"\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n    bind:click-preview=\"clickPreview\"\n  />\n</demo-block>\n\n<demo-block title=\"自定义上传样式\" padding>\n  <van-uploader\n    name=\"4\"\n    file-list=\"{{ fileList4 }}\"\n    max-count=\"{{ 2 }}\"\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n    bind:click-preview=\"clickPreview\"\n    use-slot=\"{{ true }}\"\n  >\n    <van-button icon=\"photo\" type=\"primary\">上传图片</van-button>\n  </van-uploader>\n</demo-block>\n\n<demo-block title=\"上传前校验\" padding>\n  <van-uploader\n    name=\"5\"\n    file-list=\"{{ fileList5 }}\"\n    bind:before-read=\"beforeRead\"\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n    bind:click-preview=\"clickPreview\"\n    use-before-read=\"{{ true }}\"\n  />\n</demo-block>\n\n<demo-block title=\"云存储上传\" padding>\n  <van-uploader\n    name=\"6\"\n    file-list=\"{{ fileList6 }}\"\n    bind:before-read=\"beforeRead\"\n    bind:after-read=\"afterRead\"\n    bind:delete=\"delete\"\n    bind:click-preview=\"clickPreview\"\n    use-before-read=\"{{ true }}\"\n  />\n  <view class=\"demo-margin-bottom\">\n    <van-button type=\"primary\" bind:click=\"uploadToCloud\">上传至云存储</van-button>\n  </view>\n</demo-block>\n"
  },
  {
    "path": "packages/uploader/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "packages/uploader/index.less",
    "content": "@import '../common/style/var.less';\n\n.van-uploader {\n  position: relative;\n  display: inline-block;\n\n  &__wrapper {\n    display: flex;\n    flex-wrap: wrap;\n  }\n\n  &__slot:empty {\n    display: none;\n  }\n\n  &__slot:not(:empty) + &__upload {\n    display: none !important;\n  }\n\n  &__upload {\n    position: relative;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    box-sizing: border-box;\n    width: var(--uploader-size, @uploader-size);\n    height: var(--uploader-size, @uploader-size);\n    margin: 0 @padding-xs @padding-xs 0;\n    background-color: var(\n      --uploader-upload-background-color,\n      @uploader-upload-background-color\n    );\n\n    &:active {\n      background-color: var(\n        --uploader-upload-active-color,\n        @uploader-upload-active-color\n      );\n    }\n\n    &-icon {\n      color: var(--uploader-icon-color, @uploader-icon-color);\n      font-size: var(--uploader-icon-size, @uploader-icon-size);\n    }\n\n    &-text {\n      margin-top: var(--padding-xs, @padding-xs);\n      color: var(--uploader-text-color, @uploader-text-color);\n      font-size: var(--uploader-text-font-size, @uploader-text-font-size);\n    }\n\n    &--disabled {\n      opacity: var(--uploader-disabled-opacity, @uploader-disabled-opacity);\n    }\n  }\n\n  &__preview {\n    position: relative;\n    cursor: pointer;\n    margin: 0 @padding-xs @padding-xs 0;\n\n    &-image {\n      display: block;\n      overflow: hidden;\n      width: var(--uploader-size, @uploader-size);\n      height: var(--uploader-size, @uploader-size);\n    }\n\n    &-delete {\n      position: absolute;\n      top: 0;\n      right: 0;\n      width: var(--uploader-delete-icon-size, @uploader-delete-icon-size);\n      height: var(--uploader-delete-icon-size, @uploader-delete-icon-size);\n\n      &::after {\n        position: absolute;\n        top: 0;\n        right: 0;\n        content: '';\n        width: var(--uploader-delete-icon-size, @uploader-delete-icon-size);\n        height: var(--uploader-delete-icon-size, @uploader-delete-icon-size);\n        background-color: var(\n          --uploader-delete-background-color,\n          @uploader-delete-background-color\n        );\n        border-radius: 0 0 0 12px;\n      }\n\n      &-icon {\n        position: absolute;\n        top: 0;\n        right: 0;\n        z-index: 1;\n        color: var(--uploader-delete-color, @uploader-delete-color);\n        font-size: var(--uploader-delete-icon-size, @uploader-delete-icon-size);\n        transform: scale(0.7) translate(10%, -10%);\n      }\n    }\n  }\n\n  &__file {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    width: var(--uploader-size, @uploader-size);\n    height: var(--uploader-size, @uploader-size);\n    background-color: var(\n      --uploader-file-background-color,\n      @uploader-file-background-color\n    );\n\n    &-icon {\n      color: var(--uploader-file-icon-color, @uploader-file-icon-color);\n      font-size: var(--uploader-file-icon-size, @uploader-file-icon-size);\n    }\n\n    &-name {\n      box-sizing: border-box;\n      width: 100%;\n      text-align: center;\n      margin-top: var(\n        --uploader-file-name-margin-top,\n        @uploader-file-name-margin-top\n      );\n      padding: var(--uploader-file-name-padding, @uploader-file-name-padding);\n      color: var(\n        --uploader-file-name-text-color,\n        @uploader-file-name-text-color\n      );\n      font-size: var(\n        --uploader-file-name-font-size,\n        @uploader-file-name-font-size\n      );\n    }\n  }\n\n  &__mask {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    color: @white;\n    background-color: var(\n      --uploader-mask-background-color,\n      @uploader-mask-background-color\n    );\n\n    &-icon {\n      font-size: var(--uploader-mask-icon-size, @uploader-mask-icon-size);\n    }\n\n    &-message {\n      margin-top: 6px;\n      padding: 0 var(--padding-base, @padding-base);\n      font-size: var(\n        --uploader-mask-message-font-size,\n        @uploader-mask-message-font-size\n      );\n      line-height: var(\n        --uploader-mask-message-line-height,\n        @uploader-mask-message-line-height\n      );\n    }\n  }\n\n  &__loading {\n    width: var(--uploader-loading-icon-size, @uploader-loading-icon-size);\n    height: var(--uploader-loading-icon-size, @uploader-loading-icon-size);\n    color: var(\n      --uploader-loading-icon-color,\n      @uploader-loading-icon-color\n    ) !important;\n  }\n}\n"
  },
  {
    "path": "packages/uploader/index.ts",
    "content": "import { VantComponent } from '../common/component';\nimport { isBoolean, isPromise } from '../common/validator';\nimport { imageProps, mediaProps, messageFileProps, videoProps } from './shared';\nimport { chooseFile, File, isImageFile, isVideoFile } from './utils';\n\nVantComponent({\n  props: {\n    disabled: Boolean,\n    multiple: Boolean,\n    uploadText: String,\n    useBeforeRead: Boolean,\n    afterRead: null,\n    beforeRead: null,\n    previewSize: {\n      type: null,\n      value: 80,\n    },\n    name: {\n      type: null,\n      value: '',\n    },\n    accept: {\n      type: String,\n      value: 'image',\n    },\n    fileList: {\n      type: Array,\n      value: [],\n      observer: 'formatFileList',\n    },\n    maxSize: {\n      type: Number,\n      value: Number.MAX_VALUE,\n    },\n    maxCount: {\n      type: Number,\n      value: 100,\n    },\n    deletable: {\n      type: Boolean,\n      value: true,\n    },\n    showUpload: {\n      type: Boolean,\n      value: true,\n    },\n    previewImage: {\n      type: Boolean,\n      value: true,\n    },\n    previewFullImage: {\n      type: Boolean,\n      value: true,\n    },\n    videoFit: {\n      type: String,\n      value: 'contain',\n    },\n    imageFit: {\n      type: String,\n      value: 'scaleToFill',\n    },\n    uploadIcon: {\n      type: String,\n      value: 'photograph',\n    },\n    ...imageProps,\n    ...videoProps,\n    ...mediaProps,\n    ...messageFileProps,\n  },\n\n  data: {\n    lists: [] as File[],\n    isInCount: true,\n  },\n\n  methods: {\n    formatFileList() {\n      const { fileList = [], maxCount } = this.data;\n      const lists = fileList.map((item) => ({\n        ...item,\n        isImage: isImageFile(item),\n        isVideo: isVideoFile(item),\n        deletable: isBoolean(item.deletable) ? item.deletable : true,\n      }));\n\n      this.setData({ lists, isInCount: lists.length < maxCount });\n    },\n\n    getDetail(index?: number) {\n      return {\n        name: this.data.name,\n        index: index == null ? this.data.fileList.length : index,\n      };\n    },\n\n    startUpload() {\n      const { maxCount, multiple, lists, disabled } = this.data;\n\n      if (disabled) return;\n\n      chooseFile({\n        ...this.data,\n        maxCount: maxCount - lists.length,\n      })\n        .then((res) => {\n          this.onBeforeRead(multiple ? res : res[0]);\n        })\n        .catch((error) => {\n          this.$emit('error', error);\n        });\n    },\n\n    onBeforeRead(file: File) {\n      const { beforeRead, useBeforeRead } = this.data;\n      let res: boolean | Promise<void> = true;\n\n      if (typeof beforeRead === 'function') {\n        res = beforeRead(file, this.getDetail());\n      }\n\n      if (useBeforeRead) {\n        res = new Promise<void>((resolve, reject) => {\n          this.$emit('before-read', {\n            file,\n            ...this.getDetail(),\n            callback: (ok: boolean) => {\n              ok ? resolve() : reject();\n            },\n          });\n        });\n      }\n\n      if (!res) {\n        return;\n      }\n\n      if (isPromise(res)) {\n        res.then((data: any) => this.onAfterRead(data || file));\n      } else {\n        this.onAfterRead(file);\n      }\n    },\n\n    onAfterRead(file) {\n      const { maxSize, afterRead } = this.data;\n      const oversize = Array.isArray(file)\n        ? file.some((item) => item.size > maxSize)\n        : file.size > maxSize;\n\n      if (oversize) {\n        this.$emit('oversize', { file, ...this.getDetail() });\n        return;\n      }\n\n      if (typeof afterRead === 'function') {\n        afterRead(file, this.getDetail());\n      }\n\n      this.$emit('after-read', { file, ...this.getDetail() });\n    },\n\n    deleteItem(event) {\n      const { index } = event.currentTarget.dataset;\n\n      this.$emit('delete', {\n        ...this.getDetail(index),\n        file: this.data.fileList[index],\n      });\n    },\n\n    onPreviewImage(event) {\n      if (!this.data.previewFullImage) return;\n\n      const { index } = event.currentTarget.dataset;\n      const { lists, showmenu } = this.data;\n      const item = lists[index];\n\n      wx.previewImage({\n        urls: lists.filter((item) => isImageFile(item)).map((item) => item.url),\n        current: item.url,\n        showmenu,\n        fail() {\n          wx.showToast({ title: '预览图片失败', icon: 'none' });\n        },\n      });\n    },\n\n    onPreviewVideo(event) {\n      if (!this.data.previewFullImage) return;\n      const { index } = event.currentTarget.dataset;\n      const { lists } = this.data as { lists: File[] };\n\n      const sources: WechatMiniprogram.MediaSource[] = [];\n\n      const current = lists.reduce((sum, cur, curIndex) => {\n        if (!isVideoFile(cur)) {\n          return sum;\n        }\n\n        sources.push({ ...cur, type: 'video' });\n\n        if (curIndex < index) {\n          sum++;\n        }\n\n        return sum;\n      }, 0);\n\n      wx.previewMedia({\n        sources,\n        current,\n        fail() {\n          wx.showToast({ title: '预览视频失败', icon: 'none' });\n        },\n      });\n    },\n\n    onPreviewFile(event: WechatMiniprogram.TouchEvent) {\n      if (!this.data.previewFile) return;\n\n      const { index } = event.currentTarget.dataset;\n\n      wx.openDocument({\n        filePath: this.data.lists[index].url,\n        showMenu: true,\n      });\n    },\n\n    onClickPreview(event) {\n      const { index } = event.currentTarget.dataset;\n      const item: File = this.data.lists[index];\n\n      this.$emit('click-preview', {\n        ...item,\n        ...this.getDetail(index),\n      });\n    },\n  },\n});\n"
  },
  {
    "path": "packages/uploader/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-uploader\">\n  <view class=\"van-uploader__wrapper\">\n    <!-- 预览样式 -->\n    <view\n      wx:if=\"{{ previewImage }}\"\n      wx:for=\"{{ lists }}\"\n      wx:key=\"index\"\n      class=\"van-uploader__preview\"\n      data-index=\"{{ index }}\"\n      bindtap=\"onClickPreview\"\n    >\n      <image\n        wx:if=\"{{ item.isImage }}\"\n        mode=\"{{ imageFit }}\"\n        src=\"{{ item.thumb || item.url }}\"\n        alt=\"{{ item.name || ('图片' + index) }}\"\n        class=\"van-uploader__preview-image\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewImage\"\n      />\n      <video\n        wx:elif=\"{{ item.isVideo }}\"\n        src=\"{{ item.url }}\"\n        title=\"{{ item.name || ('视频' + index) }}\"\n        poster=\"{{ item.thumb }}\"\n        autoplay=\"{{ item.autoplay }}\"\n        object-fit=\"{{videoFit}}\"\n        referrer-policy=\"{{ referrerPolicy }}\"\n        class=\"van-uploader__preview-image\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewVideo\"\n      >\n      </video>\n      <view\n        wx:else\n        class=\"van-uploader__file\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewFile\"\n      >\n        <van-icon name=\"description\" class=\"van-uploader__file-icon\" />\n        <view class=\"van-uploader__file-name van-ellipsis\">{{ item.name || item.url }}</view>\n      </view>\n      <view\n        wx:if=\"{{ item.status === 'uploading' || item.status === 'failed' }}\"\n        class=\"van-uploader__mask\"\n      >\n       <van-icon wx:if=\"{{ item.status === 'failed' }}\" name=\"close\" class=\"van-uploader__mask-icon\" />\n       <van-loading wx:else custom-class=\"van-uploader__loading\" />\n       <text wx:if=\"{{ item.message }}\" class=\"van-uploader__mask-message\">{{ item.message }}</text>\n      </view>\n      <view\n        wx:if=\"{{ deletable && item.deletable }}\"\n        data-index=\"{{ index }}\"\n        class=\"van-uploader__preview-delete\"\n        catch:tap=\"deleteItem\"\n      >\n        <van-icon name=\"cross\" class=\"van-uploader__preview-delete-icon\" />\n      </view>\n    </view>\n\n    <!-- 上传样式 -->\n    <block wx:if=\"{{ isInCount }}\">\n      <view class=\"van-uploader__slot\" bindtap=\"startUpload\">\n        <slot />\n      </view>\n\n      <!-- 默认上传样式 -->\n      <view\n        wx:if=\"{{ showUpload }}\"\n        class=\"van-uploader__upload {{ disabled ? 'van-uploader__upload--disabled': ''}}\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        bindtap=\"startUpload\"\n      >\n        <van-icon name=\"{{ uploadIcon }}\" class=\"van-uploader__upload-icon\" />\n        <text wx:if=\"{{ uploadText }}\" class=\"van-uploader__upload-text\">{{ uploadText }}</text>\n      </view>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "packages/uploader/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction sizeStyle(data) {\n  return \"Array\" === data.previewSize.constructor ? style({\n    width: addUnit(data.previewSize[0]),\n    height: addUnit(data.previewSize[1]),\n  }) : style({\n    width: addUnit(data.previewSize),\n    height: addUnit(data.previewSize),\n  });\n}\n\nmodule.exports = {\n  sizeStyle: sizeStyle,\n};\n"
  },
  {
    "path": "packages/uploader/shared.ts",
    "content": "// props for image\nexport const imageProps = {\n  sizeType: {\n    type: Array,\n    value: ['original', 'compressed'],\n  },\n  capture: {\n    type: Array,\n    value: ['album', 'camera'],\n  },\n  showmenu: {\n    type: Boolean,\n    value: true,\n  },\n};\n\n// props for video\nexport const videoProps = {\n  capture: {\n    type: Array,\n    value: ['album', 'camera'],\n  },\n  compressed: {\n    type: Boolean,\n    value: true,\n  },\n  maxDuration: {\n    type: Number,\n    value: 60,\n  },\n  camera: {\n    type: String,\n    value: 'back',\n  },\n  referrerPolicy: {\n    type: String,\n    value: 'no-referrer',\n  },\n};\n\n// props for media\nexport const mediaProps = {\n  capture: {\n    type: Array,\n    value: ['album', 'camera'],\n  },\n  mediaType: {\n    type: Array,\n    value: ['image', 'video', 'mix'],\n  },\n  maxDuration: {\n    type: Number,\n    value: 60,\n  },\n  camera: {\n    type: String,\n    value: 'back',\n  },\n};\n\n// props for file\nexport const messageFileProps = {\n  extension: null,\n  previewFile: {\n    type: Boolean,\n    value: true,\n  },\n};\n"
  },
  {
    "path": "packages/uploader/test/__snapshots__/demo.spec.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should render demo and match snapshot 1`] = `\n<main>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        基础用法\n      </wx-view>\n      <van-uploader\n        bind:after-read=\"afterRead\"\n        bind:click-preview=\"clickPreview\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__slot\"\n              bind:tap=\"startUpload\"\n            />\n            <wx-view\n              class=\"van-uploader__upload \"\n              style=\"width:80px;height:80px\"\n              bind:tap=\"startUpload\"\n            >\n              <van-icon\n                class=\"van-uploader__upload-icon\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-photograph\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        上传视频\n      </wx-view>\n      <van-uploader\n        bind:after-read=\"afterRead\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__slot\"\n              bind:tap=\"startUpload\"\n            />\n            <wx-view\n              class=\"van-uploader__upload \"\n              style=\"width:80px;height:80px\"\n              bind:tap=\"startUpload\"\n            >\n              <van-icon\n                class=\"van-uploader__upload-icon\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-photograph\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        文件预览\n      </wx-view>\n      <van-uploader\n        bind:after-read=\"afterRead\"\n        bind:click-preview=\"clickPreview\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__preview\"\n              data-index=\"{{0}}\"\n              bind:tap=\"onClickPreview\"\n            >\n              <wx-image\n                alt=\"图片0\"\n                class=\"van-uploader__preview-image\"\n                data-index=\"{{0}}\"\n                mode=\"scaleToFill\"\n                src=\"https://img.yzcdn.cn/vant/leaf.jpg\"\n                style=\"width:80px;height:80px\"\n                bind:tap=\"onPreviewImage\"\n              />\n              <wx-view\n                class=\"van-uploader__preview-delete\"\n                data-index=\"{{0}}\"\n                catch:tap=\"deleteItem\"\n              >\n                <van-icon\n                  class=\"van-uploader__preview-delete-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-cross\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-uploader__preview\"\n              data-index=\"{{1}}\"\n              bind:tap=\"onClickPreview\"\n            >\n              <wx-image\n                alt=\"图片1\"\n                class=\"van-uploader__preview-image\"\n                data-index=\"{{1}}\"\n                mode=\"scaleToFill\"\n                src=\"https://img.yzcdn.cn/vant/tree.jpg\"\n                style=\"width:80px;height:80px\"\n                bind:tap=\"onPreviewImage\"\n              />\n              <wx-view\n                class=\"van-uploader__preview-delete\"\n                data-index=\"{{1}}\"\n                catch:tap=\"deleteItem\"\n              >\n                <van-icon\n                  class=\"van-uploader__preview-delete-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-cross\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-uploader__slot\"\n              bind:tap=\"startUpload\"\n            />\n            <wx-view\n              class=\"van-uploader__upload \"\n              style=\"width:80px;height:80px\"\n              bind:tap=\"startUpload\"\n            >\n              <van-icon\n                class=\"van-uploader__upload-icon\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-photograph\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        隐藏上传按钮\n      </wx-view>\n      <van-uploader\n        bind:after-read=\"afterRead\"\n        bind:click-preview=\"clickPreview\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__preview\"\n              data-index=\"{{0}}\"\n              bind:tap=\"onClickPreview\"\n            >\n              <wx-image\n                alt=\"图片0\"\n                class=\"van-uploader__preview-image\"\n                data-index=\"{{0}}\"\n                mode=\"scaleToFill\"\n                src=\"https://img.yzcdn.cn/vant/leaf.jpg\"\n                style=\"width:80px;height:80px\"\n                bind:tap=\"onPreviewImage\"\n              />\n              <wx-view\n                class=\"van-uploader__preview-delete\"\n                data-index=\"{{0}}\"\n                catch:tap=\"deleteItem\"\n              >\n                <van-icon\n                  class=\"van-uploader__preview-delete-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-cross\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-uploader__preview\"\n              data-index=\"{{1}}\"\n              bind:tap=\"onClickPreview\"\n            >\n              <wx-image\n                alt=\"图片1\"\n                class=\"van-uploader__preview-image\"\n                data-index=\"{{1}}\"\n                mode=\"scaleToFill\"\n                src=\"https://img.yzcdn.cn/vant/tree.jpg\"\n                style=\"width:80px;height:80px\"\n                bind:tap=\"onPreviewImage\"\n              />\n              <wx-view\n                class=\"van-uploader__preview-delete\"\n                data-index=\"{{1}}\"\n                catch:tap=\"deleteItem\"\n              >\n                <van-icon\n                  class=\"van-uploader__preview-delete-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-cross\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-uploader__slot\"\n              bind:tap=\"startUpload\"\n            />\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        上传状态\n      </wx-view>\n      <van-uploader\n        bind:after-read=\"afterRead\"\n        bind:click-preview=\"clickPreview\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__preview\"\n              data-index=\"{{0}}\"\n              bind:tap=\"onClickPreview\"\n            >\n              <wx-image\n                alt=\"图片0\"\n                class=\"van-uploader__preview-image\"\n                data-index=\"{{0}}\"\n                mode=\"scaleToFill\"\n                src=\"https://img.yzcdn.cn/vant/leaf.jpg\"\n                style=\"width:80px;height:80px\"\n                bind:tap=\"onPreviewImage\"\n              />\n              <wx-view\n                class=\"van-uploader__mask\"\n              >\n                <van-loading\n                  customClass=\"van-uploader__loading\"\n                >\n                  <wx-view\n                    class=\"custom-class van-loading\"\n                  >\n                    <wx-view\n                      class=\"van-loading__spinner van-loading__spinner--circular\"\n                      style=\"\"\n                    />\n                    <wx-view\n                      class=\"van-loading__text\"\n                      style=\"\"\n                    />\n                  </wx-view>\n                </van-loading>\n                <wx-text\n                  class=\"van-uploader__mask-message\"\n                >\n                  上传中\n                </wx-text>\n              </wx-view>\n              <wx-view\n                class=\"van-uploader__preview-delete\"\n                data-index=\"{{0}}\"\n                catch:tap=\"deleteItem\"\n              >\n                <van-icon\n                  class=\"van-uploader__preview-delete-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-cross\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-uploader__preview\"\n              data-index=\"{{1}}\"\n              bind:tap=\"onClickPreview\"\n            >\n              <wx-image\n                alt=\"图片1\"\n                class=\"van-uploader__preview-image\"\n                data-index=\"{{1}}\"\n                mode=\"scaleToFill\"\n                src=\"https://img.yzcdn.cn/vant/tree.jpg\"\n                style=\"width:80px;height:80px\"\n                bind:tap=\"onPreviewImage\"\n              />\n              <wx-view\n                class=\"van-uploader__mask\"\n              >\n                <van-icon\n                  class=\"van-uploader__mask-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-close\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n                <wx-text\n                  class=\"van-uploader__mask-message\"\n                >\n                  上传失败\n                </wx-text>\n              </wx-view>\n              <wx-view\n                class=\"van-uploader__preview-delete\"\n                data-index=\"{{1}}\"\n                catch:tap=\"deleteItem\"\n              >\n                <van-icon\n                  class=\"van-uploader__preview-delete-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-cross\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        限制上传数量\n      </wx-view>\n      <van-uploader\n        bind:after-read=\"afterRead\"\n        bind:click-preview=\"clickPreview\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__preview\"\n              data-index=\"{{0}}\"\n              bind:tap=\"onClickPreview\"\n            >\n              <wx-image\n                alt=\"图片0\"\n                class=\"van-uploader__preview-image\"\n                data-index=\"{{0}}\"\n                mode=\"scaleToFill\"\n                src=\"https://img.yzcdn.cn/vant/sand.jpg\"\n                style=\"width:80px;height:80px\"\n                bind:tap=\"onPreviewImage\"\n              />\n              <wx-view\n                class=\"van-uploader__preview-delete\"\n                data-index=\"{{0}}\"\n                catch:tap=\"deleteItem\"\n              >\n                <van-icon\n                  class=\"van-uploader__preview-delete-icon\"\n                >\n                  <wx-view\n                    class=\"custom-class van-icon van-icon-cross\"\n                    style=\"\"\n                    bind:tap=\"onClick\"\n                  />\n                </van-icon>\n              </wx-view>\n            </wx-view>\n            <wx-view\n              class=\"van-uploader__slot\"\n              bind:tap=\"startUpload\"\n            />\n            <wx-view\n              class=\"van-uploader__upload \"\n              style=\"width:80px;height:80px\"\n              bind:tap=\"startUpload\"\n            >\n              <van-icon\n                class=\"van-uploader__upload-icon\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-photograph\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        自定义上传样式\n      </wx-view>\n      <van-uploader\n        useSlot=\"{{true}}\"\n        bind:after-read=\"afterRead\"\n        bind:click-preview=\"clickPreview\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__slot\"\n              bind:tap=\"startUpload\"\n            >\n              <van-button>\n                <wx-button\n                  appParameter=\"\"\n                  ariaLabel=\"\"\n                  businessId=\"\"\n                  class=\"custom-class van-button van-button--primary van-button--normal \"\n                  data-detail=\"{{null}}\"\n                  formType=\"\"\n                  hoverClass=\"van-button--active hover-class\"\n                  id=\"\"\n                  lang=\"\"\n                  openType=\"\"\n                  sendMessageImg=\"\"\n                  sendMessagePath=\"\"\n                  sendMessageTitle=\"\"\n                  sessionFrom=\"\"\n                  showMessageCard=\"{{false}}\"\n                  style=\"\"\n                  bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n                  bind:chooseavatar=\"onChooseAvatar\"\n                  bind:contact=\"onContact\"\n                  bind:error=\"onError\"\n                  bind:getphonenumber=\"onGetPhoneNumber\"\n                  bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n                  bind:getuserinfo=\"onGetUserInfo\"\n                  bind:launchapp=\"onLaunchApp\"\n                  bind:opensetting=\"onOpenSetting\"\n                  bind:tap=\"onClick\"\n                >\n                  <van-icon\n                    class=\"van-button__icon\"\n                  >\n                    <wx-view\n                      class=\"custom-class van-icon van-icon-photo\"\n                      style=\"font-size:1.2em;line-height: inherit;\"\n                      bind:tap=\"onClick\"\n                    />\n                  </van-icon>\n                  <wx-view\n                    class=\"van-button__text\"\n                  >\n                    上传图片\n                  </wx-view>\n                </wx-button>\n              </van-button>\n            </wx-view>\n            <wx-view\n              class=\"van-uploader__upload \"\n              style=\"width:80px;height:80px\"\n              bind:tap=\"startUpload\"\n            >\n              <van-icon\n                class=\"van-uploader__upload-icon\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-photograph\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        上传前校验\n      </wx-view>\n      <van-uploader\n        bind:after-read=\"afterRead\"\n        bind:before-read=\"beforeRead\"\n        bind:click-preview=\"clickPreview\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__slot\"\n              bind:tap=\"startUpload\"\n            />\n            <wx-view\n              class=\"van-uploader__upload \"\n              style=\"width:80px;height:80px\"\n              bind:tap=\"startUpload\"\n            >\n              <van-icon\n                class=\"van-uploader__upload-icon\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-photograph\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n    </wx-view>\n  </demo-block>\n  <demo-block>\n    <wx-view\n      class=\"custom-class demo-block van-clearfix demo-block--padding\"\n    >\n      <wx-view\n        class=\"demo-block__title\"\n      >\n        云存储上传\n      </wx-view>\n      <van-uploader\n        bind:after-read=\"afterRead\"\n        bind:before-read=\"beforeRead\"\n        bind:click-preview=\"clickPreview\"\n        bind:delete=\"delete\"\n      >\n        <wx-view\n          class=\"van-uploader\"\n        >\n          <wx-view\n            class=\"van-uploader__wrapper\"\n          >\n            <wx-view\n              class=\"van-uploader__slot\"\n              bind:tap=\"startUpload\"\n            />\n            <wx-view\n              class=\"van-uploader__upload \"\n              style=\"width:80px;height:80px\"\n              bind:tap=\"startUpload\"\n            >\n              <van-icon\n                class=\"van-uploader__upload-icon\"\n              >\n                <wx-view\n                  class=\"custom-class van-icon van-icon-photograph\"\n                  style=\"\"\n                  bind:tap=\"onClick\"\n                />\n              </van-icon>\n            </wx-view>\n          </wx-view>\n        </wx-view>\n      </van-uploader>\n      <wx-view\n        class=\"demo-margin-bottom\"\n      >\n        <van-button\n          bind:click=\"uploadToCloud\"\n        >\n          <wx-button\n            appParameter=\"\"\n            ariaLabel=\"\"\n            businessId=\"\"\n            class=\"custom-class van-button van-button--primary van-button--normal \"\n            data-detail=\"{{null}}\"\n            formType=\"\"\n            hoverClass=\"van-button--active hover-class\"\n            id=\"\"\n            lang=\"\"\n            openType=\"\"\n            sendMessageImg=\"\"\n            sendMessagePath=\"\"\n            sendMessageTitle=\"\"\n            sessionFrom=\"\"\n            showMessageCard=\"{{false}}\"\n            style=\"\"\n            bind:agreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n            bind:chooseavatar=\"onChooseAvatar\"\n            bind:contact=\"onContact\"\n            bind:error=\"onError\"\n            bind:getphonenumber=\"onGetPhoneNumber\"\n            bind:getrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n            bind:getuserinfo=\"onGetUserInfo\"\n            bind:launchapp=\"onLaunchApp\"\n            bind:opensetting=\"onOpenSetting\"\n            bind:tap=\"onClick\"\n          >\n            <wx-view\n              class=\"van-button__text\"\n            >\n              上传至云存储\n            </wx-view>\n          </wx-button>\n        </van-button>\n      </wx-view>\n    </wx-view>\n  </demo-block>\n</main>\n`;\n"
  },
  {
    "path": "packages/uploader/test/demo.spec.ts",
    "content": "import path from 'path';\nimport simulate from 'miniprogram-simulate';\n\ntest('should render demo and match snapshot', () => {\n  const id = simulate.load(path.resolve(__dirname, '../demo/index'), {\n    rootPath: path.resolve(__dirname, '../../'),\n  });\n  const comp = simulate.render(id);\n  comp.attach(document.createElement('parent-wrapper'));\n  expect(comp.toJSON()).toMatchSnapshot();\n});\n"
  },
  {
    "path": "packages/uploader/utils.ts",
    "content": "import { pickExclude, isPC, isWxWork } from '../common/utils';\nimport { isImageUrl, isVideoUrl } from '../common/validator';\n\nexport interface File {\n  url: string; // 上传临时地址\n  size?: number; // 上传大小\n  name?: string;\n  type: string; // 上传类型\n  duration?: number; // 上传时间\n  time?: number; // 消息文件时间\n  isImage?: boolean;\n  isVideo?: boolean;\n}\n\nexport function isImageFile(item: File): boolean {\n  if (item.isImage != null) {\n    return item.isImage;\n  }\n\n  if (item.type) {\n    return item.type === 'image';\n  }\n\n  if (item.url) {\n    return isImageUrl(item.url);\n  }\n\n  return false;\n}\n\nexport function isVideoFile(item: File): boolean {\n  if (item.isVideo != null) {\n    return item.isVideo;\n  }\n\n  if (item.type) {\n    return item.type === 'video';\n  }\n\n  if (item.url) {\n    return isVideoUrl(item.url);\n  }\n\n  return false;\n}\n\nfunction formatImage(\n  res:\n    | WechatMiniprogram.ChooseMediaSuccessCallbackResult\n    | WechatMiniprogram.ChooseImageSuccessCallbackResult\n): File[] {\n  return res.tempFiles.map((item) => ({\n    ...pickExclude(item, ['path']),\n    type: 'image',\n    url: item.tempFilePath || item.path,\n    thumb: item.tempFilePath || item.path,\n  }));\n}\n\nfunction formatVideo(\n  res: WechatMiniprogram.ChooseVideoSuccessCallbackResult & Record<string, any>\n) {\n  return [\n    {\n      ...pickExclude(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg']),\n      type: 'video',\n      url: res.tempFilePath,\n      thumb: res.thumbTempFilePath,\n    },\n  ];\n}\n\nfunction formatMedia(res: WechatMiniprogram.ChooseMediaSuccessCallbackResult) {\n  return res.tempFiles.map((item) => ({\n    ...pickExclude(item, ['fileType', 'thumbTempFilePath', 'tempFilePath']),\n    type: item.fileType,\n    url: item.tempFilePath,\n    thumb:\n      item.fileType === 'video' ? item.thumbTempFilePath : item.tempFilePath,\n  }));\n}\n\nfunction formatFile(\n  res: WechatMiniprogram.ChooseMessageFileSuccessCallbackResult\n) {\n  return res.tempFiles.map((item) => ({\n    ...pickExclude(item, ['path']),\n    url: item.path,\n  })) as File[];\n}\n\nexport function chooseFile({\n  accept,\n  multiple,\n  capture,\n  compressed,\n  maxDuration,\n  sizeType,\n  camera,\n  maxCount,\n  mediaType,\n  extension,\n}) {\n  return new Promise<File | File[]>((resolve, reject) => {\n    switch (accept) {\n      case 'image':\n        if (isPC || isWxWork) {\n          wx.chooseImage({\n            count: multiple ? Math.min(maxCount, 9) : 1,\n            sourceType: capture,\n            sizeType,\n            success: (res) => resolve(formatImage(res)),\n            fail: reject,\n          });\n        } else {\n          wx.chooseMedia({\n            count: multiple ? Math.min(maxCount, 9) : 1,\n            mediaType: ['image'],\n            sourceType: capture,\n            maxDuration,\n            sizeType,\n            camera,\n            success: (res) => resolve(formatImage(res)),\n            fail: reject,\n          });\n        }\n        break;\n      case 'media':\n        wx.chooseMedia({\n          count: multiple ? Math.min(maxCount, 9) : 1,\n          mediaType,\n          sourceType: capture,\n          maxDuration,\n          sizeType,\n          camera,\n          success: (res) => resolve(formatMedia(res)),\n          fail: reject,\n        });\n        break;\n      case 'video':\n        wx.chooseVideo({\n          sourceType: capture,\n          compressed,\n          maxDuration,\n          camera,\n          success: (res) => resolve(formatVideo(res)),\n          fail: reject,\n        });\n        break;\n      default:\n        wx.chooseMessageFile({\n          count: multiple ? maxCount : 1,\n          type: accept,\n          ...(extension ? { extension } : {}),\n          success: (res) => resolve(formatFile(res)),\n          fail: reject,\n        });\n        break;\n    }\n  });\n}\n"
  },
  {
    "path": "packages/wxs/add-unit.wxs",
    "content": "/* eslint-disable */\nvar REGEXP = getRegExp('^-?\\d+(\\.\\d+)?$');\n\nfunction addUnit(value) {\n  if (value == null) {\n    return undefined;\n  }\n\n  return REGEXP.test('' + value) ? value + 'px' : value;\n}\n\nmodule.exports = addUnit;\n"
  },
  {
    "path": "packages/wxs/array.wxs",
    "content": "function isArray(array) {\n  return array && array.constructor === 'Array';\n}\n\nmodule.exports.isArray = isArray;\n"
  },
  {
    "path": "packages/wxs/bem.wxs",
    "content": "/* eslint-disable */\nvar array = require('./array.wxs');\nvar object = require('./object.wxs');\nvar PREFIX = 'van-';\n\nfunction join(name, mods) {\n  name = PREFIX + name;\n  mods = mods.map(function(mod) {\n    return name + '--' + mod;\n  });\n  mods.unshift(name);\n  return mods.join(' ');\n}\n\nfunction traversing(mods, conf) {\n  if (!conf) {\n    return;\n  }\n\n  if (typeof conf === 'string' || typeof conf === 'number') {\n    mods.push(conf);\n  } else if (array.isArray(conf)) {\n    conf.forEach(function(item) {\n      traversing(mods, item);\n    });\n  } else if (typeof conf === 'object') {\n    object.keys(conf).forEach(function(key) {\n      conf[key] && mods.push(key);\n    });\n  }\n}\n\nfunction bem(name, conf) {\n  var mods = [];\n  traversing(mods, conf);\n  return join(name, mods);\n}\n\nmodule.exports = bem;\n"
  },
  {
    "path": "packages/wxs/memoize.wxs",
    "content": "/**\n * Simple memoize\n * wxs doesn't support fn.apply, so this memoize only support up to 2 args\n */\n/* eslint-disable */\n\nfunction isPrimitive(value) {\n  var type = typeof value;\n  return (\n    type === 'boolean' ||\n    type === 'number' ||\n    type === 'string' ||\n    type === 'undefined' ||\n    value === null\n  );\n}\n\n// mock simple fn.call in wxs\nfunction call(fn, args) {\n  if (args.length === 2) {\n    return fn(args[0], args[1]);\n  }\n\n  if (args.length === 1) {\n    return fn(args[0]);\n  }\n\n  return fn();\n}\n\nfunction serializer(args) {\n  if (args.length === 1 && isPrimitive(args[0])) {\n    return args[0];\n  }\n  var obj = {};\n  for (var i = 0; i < args.length; i++) {\n    obj['key' + i] = args[i];\n  }\n  return JSON.stringify(obj);\n}\n\nfunction memoize(fn) {\n  var cache = {};\n\n  return function() {\n    var key = serializer(arguments);\n    if (cache[key] === undefined) {\n      cache[key] = call(fn, arguments);\n    }\n\n    return cache[key];\n  };\n}\n\nmodule.exports = memoize;\n"
  },
  {
    "path": "packages/wxs/object.wxs",
    "content": "/* eslint-disable */\nvar REGEXP = getRegExp('{|}|\"', 'g');\n\nfunction keys(obj) {\n  return JSON.stringify(obj)\n    .replace(REGEXP, '')\n    .split(',')\n    .map(function(item) {\n      return item.split(':')[0];\n    });\n}\n\nmodule.exports.keys = keys;\n"
  },
  {
    "path": "packages/wxs/style.wxs",
    "content": "/* eslint-disable */\nvar object = require('./object.wxs');\nvar array = require('./array.wxs');\n\nfunction kebabCase(word) {\n  var newWord = word\n    .replace(getRegExp(\"[A-Z]\", 'g'), function (i) {\n      return '-' + i;\n    })\n    .toLowerCase()\n\n  return newWord;\n}\n\nfunction style(styles) {\n  if (array.isArray(styles)) {\n    return styles\n      .filter(function (item) {\n        return item != null && item !== '';\n      })\n      .map(function (item) {\n        return style(item);\n      })\n      .join(';');\n  }\n\n  if ('Object' === styles.constructor) {\n    return object\n      .keys(styles)\n      .filter(function (key) {\n        return styles[key] != null && styles[key] !== '';\n      })\n      .map(function (key) {\n        return [kebabCase(key), [styles[key]]].join(':');\n      })\n      .join(';');\n  }\n\n  return styles;\n}\n\nmodule.exports = style;\n"
  },
  {
    "path": "packages/wxs/utils.wxs",
    "content": "/* eslint-disable */\nvar bem = require('./bem.wxs');\nvar memoize = require('./memoize.wxs');\nvar addUnit = require('./add-unit.wxs');\n\nmodule.exports = {\n  bem: memoize(bem),\n  memoize: memoize,\n  addUnit: addUnit\n};\n"
  },
  {
    "path": "postcss.config.js",
    "content": "module.exports = {\n  plugins: {\n    autoprefixer: {},\n    cssnano: {\n      preset: 'default'\n    }\n  }\n};\n"
  },
  {
    "path": "rsbuild.config.ts",
    "content": "export default {\n  server: {\n    proxy: {\n      '/vant/v2': 'https://vant-ui.github.io',\n    },\n  },\n};\n"
  },
  {
    "path": "tsconfig.example.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"watch\": true,\n    \"outDir\": \"example/dist\"\n  },\n  \"exclude\": [\"packages/**/test/*\"]\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"es6\",\n    \"esModuleInterop\": true,\n    \"target\": \"es6\",\n    \"declaration\": true,\n    \"noImplicitAny\": false,\n    \"outDir\": \"dist\",\n    \"baseUrl\": \".\",\n    \"sourceMap\": false,\n    \"strict\": true,\n    \"lib\": [\"ESNext\", \"dom\"],\n    \"types\": [\"@types/jest\", \"node\", \"miniprogram-api-typings\"],\n    \"paths\": {\n      \"definitions/*\": [\"./packages/definitions/*\"]\n    },\n    \"moduleResolution\": \"node\",\n    \"skipLibCheck\": true\n  },\n  \"include\": [\"packages/**/*\"],\n  \"exclude\": [\"packages/**/test/*\", \"packages/**/demo/*\"]\n}\n"
  },
  {
    "path": "tsconfig.lib.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"target\": \"es5\",\n    \"lib\": [\"es2015\", \"es2017\", \"dom\"],\n    \"declaration\": false,\n    \"outDir\": \"lib\"\n  }\n}\n"
  },
  {
    "path": "vant.config.mjs",
    "content": "export default {\n  name: 'vant-weapp',\n  build: {\n    srcDir: 'packages',\n    site: {\n      publicPath: '/vant-weapp/',\n    },\n  },\n  site: {\n    versions: [{ label: '0.x', link: '/vant-weapp/0.x' }],\n    title: 'Vant Weapp',\n    description: '轻量、可靠的小程序 UI 组件库',\n    logo: 'https://img.yzcdn.cn/vant/logo.png',\n    simulator: {\n      url: '/vant/v2/mobile.html?weapp=1',\n      routeMapper: (path) => {\n        const map = {\n          '/common': '/style',\n          '/transition': '/style',\n        };\n        return `/zh-CN${map[path] || path}`;\n      },\n      syncPathFromSimulator: false,\n    },\n    icpLicense: {\n      text: '浙ICP备2021036118号',\n      link: 'https://beian.miit.gov.cn/',\n    },\n    headHtml: `<script>\nif (location.host === 'youzan.github.io') {\nlocation.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');\n}\n</script>\n`,\n    links: [\n      {\n        logo: 'https://img.yzcdn.cn/vant/vant-o.svg',\n        url: '/vant/',\n      },\n      {\n        logo: 'https://b.yzcdn.cn/vant/logo/github.svg',\n        url: 'https://github.com/youzan/vant-weapp',\n      },\n    ],\n    baiduAnalytics: {\n      seed: 'af5d41bc4e446e76665dbe3ec18d55c3',\n    },\n    nav: [\n      {\n        title: '开发指南',\n        items: [\n          {\n            path: 'home',\n            title: '介绍',\n          },\n          {\n            path: 'quickstart',\n            title: '快速上手',\n          },\n          {\n            path: 'changelog',\n            title: '更新日志',\n          },\n          {\n            path: 'custom-style',\n            title: '样式覆盖',\n          },\n          {\n            path: 'theme',\n            title: '定制主题',\n          },\n        ],\n      },\n      {\n        title: '基础组件',\n        items: [\n          {\n            path: 'button',\n            title: 'Button 按钮',\n          },\n          {\n            path: 'cell',\n            title: 'Cell 单元格',\n          },\n          {\n            path: 'config-provider',\n            title: 'ConfigProvider 全局配置',\n          },\n          {\n            path: 'icon',\n            title: 'Icon 图标',\n          },\n          {\n            path: 'image',\n            title: 'Image 图片',\n          },\n          {\n            path: 'col',\n            title: 'Layout 布局',\n          },\n          {\n            path: 'popup',\n            title: 'Popup 弹出层',\n          },\n          {\n            path: 'common',\n            title: 'Style 内置样式',\n          },\n          {\n            path: 'toast',\n            title: 'Toast 轻提示',\n          },\n          {\n            path: 'transition',\n            title: 'transition 动画',\n          },\n        ],\n      },\n      {\n        title: '表单组件',\n        items: [\n          {\n            path: 'calendar',\n            title: 'Calendar 日历',\n          },\n          {\n            path: 'cascader',\n            title: 'Cascader 级联选择',\n          },\n          {\n            path: 'checkbox',\n            title: 'Checkbox 复选框',\n          },\n          {\n            path: 'datetime-picker',\n            title: 'DatetimePicker 时间选择',\n          },\n          {\n            path: 'field',\n            title: 'Field 输入框',\n          },\n          {\n            path: 'picker',\n            title: 'Picker 选择器',\n          },\n          {\n            path: 'radio',\n            title: 'Radio 单选框',\n          },\n          {\n            path: 'rate',\n            title: 'Rate 评分',\n          },\n          {\n            path: 'search',\n            title: 'Search 搜索',\n          },\n          {\n            path: 'slider',\n            title: 'Slider 滑块',\n          },\n          {\n            path: 'stepper',\n            title: 'Stepper 步进器',\n          },\n          {\n            path: 'switch',\n            title: 'Switch 开关',\n          },\n          {\n            path: 'uploader',\n            title: 'Uploader 文件上传',\n          },\n        ],\n      },\n      {\n        title: '反馈组件',\n        items: [\n          {\n            path: 'action-sheet',\n            title: 'ActionSheet 动作面板',\n          },\n          {\n            path: 'dialog',\n            title: 'Dialog 弹出框',\n          },\n          {\n            path: 'dropdown-menu',\n            title: 'DropdownMenu 下拉菜单',\n          },\n          {\n            path: 'loading',\n            title: 'Loading 加载',\n          },\n          {\n            path: 'notify',\n            title: 'Notify 消息通知',\n          },\n          {\n            path: 'overlay',\n            title: 'Overlay 遮罩层',\n          },\n          {\n            path: 'share-sheet',\n            title: 'ShareSheet 分享面板',\n          },\n          {\n            path: 'swipe-cell',\n            title: 'SwipeCell 滑动单元格',\n          },\n        ],\n      },\n      {\n        title: '展示组件',\n        items: [\n          {\n            path: 'circle',\n            title: 'Circle 环形进度条',\n          },\n          {\n            path: 'collapse',\n            title: 'Collapse 折叠面板',\n          },\n          {\n            path: 'count-down',\n            title: 'CountDown 倒计时',\n          },\n          {\n            path: 'divider',\n            title: 'Divider 分割线',\n          },\n          {\n            path: 'empty',\n            title: 'Empty 空状态',\n          },\n          {\n            path: 'notice-bar',\n            title: 'NoticeBar 通知栏',\n          },\n          {\n            path: 'progress',\n            title: 'Progress 进度条',\n          },\n          {\n            path: 'skeleton',\n            title: 'Skeleton 骨架屏',\n          },\n          {\n            path: 'steps',\n            title: 'Steps 步骤条',\n          },\n          {\n            path: 'sticky',\n            title: 'Sticky 粘性布局',\n          },\n          {\n            path: 'tag',\n            title: 'Tag 标签',\n          },\n        ],\n      },\n      {\n        title: '导航组件',\n        items: [\n          {\n            path: 'grid',\n            title: 'Grid 宫格',\n          },\n          {\n            path: 'index-bar',\n            title: 'IndexBar 索引栏',\n          },\n          {\n            path: 'nav-bar',\n            title: 'NavBar 导航栏',\n          },\n          {\n            path: 'sidebar',\n            title: 'Sidebar 侧边导航',\n          },\n          {\n            path: 'tab',\n            title: 'Tab 标签页',\n          },\n          {\n            path: 'tabbar',\n            title: 'Tabbar 标签栏',\n          },\n          {\n            path: 'tree-select',\n            title: 'TreeSelect 分类选择',\n          },\n        ],\n      },\n      {\n        title: '业务组件',\n        items: [\n          {\n            path: 'area',\n            title: 'Area 省市区选择',\n          },\n          {\n            path: 'card',\n            title: 'Card 商品卡片',\n          },\n          {\n            path: 'submit-bar',\n            title: 'SubmitBar 提交订单栏',\n          },\n          {\n            path: 'goods-action',\n            title: 'GoodsAction 商品导航',\n          },\n        ],\n      },\n      {\n        title: '废弃',\n        items: [\n          {\n            path: 'panel',\n            title: 'Panel 面板',\n          },\n        ],\n      },\n    ],\n  },\n};\n"
  }
]