diff --git a/package.json b/package.json index ab83cfce..1ca7107e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "release": "sh build/release.sh", "release:site": "sh build/release-site.sh", "build:lib": "yarn && npx gulp -f build/compiler.js --series buildEs buildLib", - "build:changelog": "vant changelog --tag v1.3.0 ./docs/markdown/changelog.generated.md", + "build:changelog": "vant-cli changelog", "upload:weapp": "node build/upload.js" }, "files": [ @@ -43,7 +43,7 @@ }, "homepage": "https://github.com/youzan/vant-weapp#readme", "devDependencies": { - "@vant/cli": "^3.9.3", + "@vant/cli": "^3.10.0", "@vant/icons": "1.5.2", "cross-env": "^7.0.0", "cssnano": "^4.1.10", diff --git a/vant.config.js b/vant.config.js index 6c71e949..360289d1 100644 --- a/vant.config.js +++ b/vant.config.js @@ -7,16 +7,26 @@ module.exports = { }, }, site: { - // versions: [ - // { label: 'Vant v1', link: '/vant/v1/' }, - // { label: 'Vant v2', link: '/vant/' }, - // { label: 'Vant Weapp', link: '/vant-weapp/' }, - // ], + versions: [{ label: '0.x', link: '/vant-weapp/0.x' }], title: 'Vant Weapp', description: '轻量、可靠的小程序 UI 组件库', logo: 'https://img.yzcdn.cn/vant/logo.png', - simulatorUrl: 'https://vant-contrib.gitee.io/vant/mobile.html#/zh-CN/', + simulator: { + url: 'https://vant-contrib.gitee.io/vant/mobile.html?weapp=1', + routeMapper: (path) => { + const map = { + '/common': '/style', + '/transition': '/style', + }; + return `/zh-CN${map[path] || path}`; + }, + syncPathFromSimulator: false, + }, links: [ + { + logo: 'https://img.yzcdn.cn/vant/vant-o.svg', + url: 'https://vant-contrib.gitee.io/vant/', + }, { logo: 'https://b.yzcdn.cn/vant/logo/github.svg', url: 'https://github.com/youzan/vant-weapp', @@ -79,13 +89,17 @@ module.exports = { title: 'Popup 弹出层', }, { - path: 'style', + path: 'common', title: 'Style 内置样式', }, { path: 'toast', title: 'Toast 轻提示', }, + { + path: 'transition', + title: 'transition 动画', + }, ], }, { @@ -95,10 +109,6 @@ module.exports = { path: 'calendar', title: 'Calendar 日历', }, - { - path: 'cascader', - title: 'Cascader 级联选择', - }, { path: 'checkbox', title: 'Checkbox 复选框', @@ -111,18 +121,6 @@ module.exports = { path: 'field', title: 'Field 输入框', }, - { - path: 'form', - title: 'Form 表单', - }, - { - path: 'number-keyboard', - title: 'NumberKeyboard 数字键盘', - }, - { - path: 'password-input', - title: 'PasswordInput 密码输入框', - }, { path: 'picker', title: 'Picker 选择器', @@ -184,10 +182,6 @@ module.exports = { path: 'overlay', title: 'Overlay 遮罩层', }, - { - path: 'pull-refresh', - title: 'PullRefresh 下拉刷新', - }, { path: 'share-sheet', title: 'ShareSheet 分享面板', @@ -201,10 +195,6 @@ module.exports = { { title: '展示组件', items: [ - { - path: 'badge', - title: 'Badge 徽标', - }, { path: 'circle', title: 'Circle 环形进度条', @@ -225,26 +215,10 @@ module.exports = { path: 'empty', title: 'Empty 空状态', }, - { - path: 'image-preview', - title: 'ImagePreview 图片预览', - }, - { - path: 'lazyload', - title: 'Lazyload 懒加载', - }, - { - path: 'list', - title: 'List 列表', - }, { path: 'notice-bar', title: 'NoticeBar 通知栏', }, - { - path: 'popover', - title: 'Popover 气泡弹出框', - }, { path: 'progress', title: 'Progress 进度条', @@ -261,10 +235,6 @@ module.exports = { path: 'sticky', title: 'Sticky 粘性布局', }, - { - path: 'swipe', - title: 'Swipe 轮播', - }, { path: 'tag', title: 'Tag 标签', @@ -274,10 +244,6 @@ module.exports = { { title: '导航组件', items: [ - { - path: 'action-bar', - title: 'ActionBar 动作栏', - }, { path: 'grid', title: 'Grid 宫格', @@ -290,10 +256,6 @@ module.exports = { path: 'nav-bar', title: 'NavBar 导航栏', }, - { - path: 'pagination', - title: 'Pagination 分页', - }, { path: 'sidebar', title: 'Sidebar 侧边导航', @@ -315,14 +277,6 @@ module.exports = { { title: '业务组件', items: [ - { - path: 'address-edit', - title: 'AddressEdit 地址编辑', - }, - { - path: 'address-list', - title: 'AddressList 地址列表', - }, { path: 'area', title: 'Area 省市区选择', @@ -331,26 +285,23 @@ module.exports = { path: 'card', title: 'Card 商品卡片', }, - { - path: 'contact-card', - title: 'ContactCard 联系人卡片', - }, - { - path: 'contact-edit', - title: 'ContactEdit 联系人编辑', - }, - { - path: 'contact-list', - title: 'ContactList 联系人列表', - }, - { - path: 'coupon-list', - title: 'Coupon 优惠券', - }, { path: 'submit-bar', title: 'SubmitBar 提交订单栏', }, + { + path: 'goods-action', + title: 'GoodsAction 商品导航', + }, + ], + }, + { + title: '废弃', + items: [ + { + path: 'panel', + title: 'Panel 面板', + }, ], }, ], diff --git a/yarn.lock b/yarn.lock index ec7631d5..be482bf8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3032,10 +3032,10 @@ "@typescript-eslint/types" "4.21.0" eslint-visitor-keys "^2.0.0" -"@vant/cli@^3.9.3": - version "3.9.3" - resolved "https://registry.npm.taobao.org/@vant/cli/download/@vant/cli-3.9.3.tgz#f9c6d347607d3c740aedc4af398fc2408c944467" - integrity sha1-+cbTR2B9PHQK7cSvOY/CQIyURGc= +"@vant/cli@^3.10.0": + version "3.10.0" + resolved "https://registry.npmjs.org/@vant/cli/-/cli-3.10.0.tgz#a129adb56f15a3c31a7a2701e288ed9a642e734d" + integrity sha512-+Nj6YHxYgsgmDFrS31PiT2UwB70KO5EH3QLbzYDihoj0QfYEQmHdk+DAOeZ6IXgZR5Nb3EbZFFLKmebngYaisg== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-transform-runtime" "^7.12.10"