From d712da5778f0adc875311e96967375d835dde6a0 Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 3 Jul 2022 13:58:38 +0800 Subject: [PATCH 1/8] chore(cli): remove custom font (#10784) --- packages/vant-cli/site/common/style/base.less | 1 - packages/vant-cli/site/common/style/font.less | 163 ------------------ 2 files changed, 164 deletions(-) delete mode 100644 packages/vant-cli/site/common/style/font.less diff --git a/packages/vant-cli/site/common/style/base.less b/packages/vant-cli/site/common/style/base.less index dec735122..cf0a4b857 100644 --- a/packages/vant-cli/site/common/style/base.less +++ b/packages/vant-cli/site/common/style/base.less @@ -1,5 +1,4 @@ @import './var'; -@import './font.less'; body { min-width: 1100px; diff --git a/packages/vant-cli/site/common/style/font.less b/packages/vant-cli/site/common/style/font.less deleted file mode 100644 index 9e87d5d8b..000000000 --- a/packages/vant-cli/site/common/style/font.less +++ /dev/null @@ -1,163 +0,0 @@ -/* cyrillic-ext */ -@font-face { - font-weight: 400; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans Regular'), local('OpenSans-Regular'), - url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFWJ0bf8pkAp6a.woff2) - format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} - -/* cyrillic */ -@font-face { - font-weight: 400; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans Regular'), local('OpenSans-Regular'), - url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFUZ0bf8pkAp6a.woff2) - format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} - -/* greek-ext */ -@font-face { - font-weight: 400; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans Regular'), local('OpenSans-Regular'), - url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFWZ0bf8pkAp6a.woff2) - format('woff2'); - unicode-range: U+1F00-1FFF; -} - -/* greek */ -@font-face { - font-weight: 400; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans Regular'), local('OpenSans-Regular'), - url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFVp0bf8pkAp6a.woff2) - format('woff2'); - unicode-range: U+0370-03FF; -} - -/* vietnamese */ -@font-face { - font-weight: 400; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans Regular'), local('OpenSans-Regular'), - url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFWp0bf8pkAp6a.woff2) - format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, - U+01AF-01B0, U+1EA0-1EF9, U+20AB; -} - -/* latin-ext */ -@font-face { - font-weight: 400; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans Regular'), local('OpenSans-Regular'), - url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFW50bf8pkAp6a.woff2) - format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, - U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} - -/* latin */ -@font-face { - font-weight: 400; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans Regular'), local('OpenSans-Regular'), - url(https://b.yzcdn.cn/vant/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2) - format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, - U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, - U+FEFF, U+FFFD; -} - -/* cyrillic-ext */ -@font-face { - font-weight: 600; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), - url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOX-hpKKSTj5PW.woff2) - format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} - -/* cyrillic */ -@font-face { - font-weight: 600; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), - url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOVuhpKKSTj5PW.woff2) - format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} - -/* greek-ext */ -@font-face { - font-weight: 600; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), - url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOXuhpKKSTj5PW.woff2) - format('woff2'); - unicode-range: U+1F00-1FFF; -} - -/* greek */ -@font-face { - font-weight: 600; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), - url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOUehpKKSTj5PW.woff2) - format('woff2'); - unicode-range: U+0370-03FF; -} - -/* vietnamese */ -@font-face { - font-weight: 600; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), - url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOXehpKKSTj5PW.woff2) - format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, - U+01AF-01B0, U+1EA0-1EF9, U+20AB; -} - -/* latin-ext */ -@font-face { - font-weight: 600; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), - url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOXOhpKKSTj5PW.woff2) - format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, - U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} - -/* latin */ -@font-face { - font-weight: 600; - font-family: 'Open Sans'; - font-style: normal; - src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), - url(https://b.yzcdn.cn/vant/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) - format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, - U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, - U+FEFF, U+FFFD; -} From 419a8e4f0e6454b9aac30d5800318deabec099cb Mon Sep 17 00:00:00 2001 From: Alan Wang Date: Mon, 4 Jul 2022 20:34:20 +0800 Subject: [PATCH 2/8] feat(Calendar): expose getSelectedDate method --- packages/vant/src/calendar/Calendar.tsx | 3 +++ packages/vant/src/calendar/README.md | 1 + packages/vant/src/calendar/README.zh-CN.md | 1 + packages/vant/src/calendar/types.ts | 1 + 4 files changed, 6 insertions(+) diff --git a/packages/vant/src/calendar/Calendar.tsx b/packages/vant/src/calendar/Calendar.tsx index 05f4ee973..4cc859925 100644 --- a/packages/vant/src/calendar/Calendar.tsx +++ b/packages/vant/src/calendar/Calendar.tsx @@ -214,6 +214,8 @@ export default defineComponent({ return !currentDate.value; }); + const getSelectedDate = () => currentDate.value; + // calculate the position of the elements // and find the elements that needs to be rendered const onScroll = () => { @@ -554,6 +556,7 @@ export default defineComponent({ useExpose({ reset, scrollToDate, + getSelectedDate, }); onMountedOrActivated(init); diff --git a/packages/vant/src/calendar/README.md b/packages/vant/src/calendar/README.md index 89e9b0af2..964920756 100644 --- a/packages/vant/src/calendar/README.md +++ b/packages/vant/src/calendar/README.md @@ -348,6 +348,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Calend | --- | --- | --- | --- | | reset | Reset selected date, will reset to default date when no params passed | _date?: Date \| Date[]_ | - | | scrollToDate | Scroll to date | _date: Date_ | - | +| getSelectedDate | get selected date | - | _Date \| Date[] \| null_ | ### Types diff --git a/packages/vant/src/calendar/README.zh-CN.md b/packages/vant/src/calendar/README.zh-CN.md index 9e498ec6f..ed397d9b1 100644 --- a/packages/vant/src/calendar/README.zh-CN.md +++ b/packages/vant/src/calendar/README.zh-CN.md @@ -354,6 +354,7 @@ export default { | --- | --- | --- | --- | | reset | 将选中的日期重置到指定日期,未传参时会重置到默认日期 | _date?: Date \| Date[]_ | - | | scrollToDate | 滚动到某个日期 | _date: Date_ | - | +| getSelectedDate | 获取选中的日期 | - | _Date \| Date[] \| null_ | ### 类型定义 diff --git a/packages/vant/src/calendar/types.ts b/packages/vant/src/calendar/types.ts index 2310b07ca..43f5e7e6e 100644 --- a/packages/vant/src/calendar/types.ts +++ b/packages/vant/src/calendar/types.ts @@ -29,6 +29,7 @@ export type CalendarDayItem = { export type CalendarExpose = { reset: (date?: Date | Date[]) => void; scrollToDate: (targetDate: Date) => void; + getSelectedDate: () => Date | Date[] | null; }; export type CalendarInstance = ComponentPublicInstance< From 9a6bc32cf496cbffaaee88127586ceb3340238d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=BB=E8=BD=A8?= <41716931+huogui@users.noreply.github.com> Date: Thu, 7 Jul 2022 21:46:38 +0800 Subject: [PATCH 3/8] fix(Uploader): should not preview failed images (#10790) Co-authored-by: Rail --- packages/vant/src/uploader/Uploader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vant/src/uploader/Uploader.tsx b/packages/vant/src/uploader/Uploader.tsx index 09c8a3498..ed9e93888 100644 --- a/packages/vant/src/uploader/Uploader.tsx +++ b/packages/vant/src/uploader/Uploader.tsx @@ -230,7 +230,7 @@ export default defineComponent({ const imageFiles = props.modelValue.filter(isImageFile); const images = imageFiles .map((item) => { - if (item.file && !item.url) { + if (item.file && !item.url && item.status !== 'failed') { item.url = URL.createObjectURL(item.file); urls.push(item.url); } From ba95cad78da3d10166be743ae2ede4db223061b4 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 7 Jul 2022 22:27:48 +0800 Subject: [PATCH 4/8] docs: update website domain (#10798) --- .github/workflows/release-tag.yml | 4 ++-- README.md | 8 ++++---- README.zh-CN.md | 2 +- packages/vant-cli/docs/config.md | 2 +- packages/vant-cli/docs/config.zh-CN.md | 2 +- packages/vant-icons/README.md | 4 ++-- packages/vant/docs/markdown/changelog.en-US.md | 4 ++-- packages/vant/docs/markdown/changelog.zh-CN.md | 6 +++--- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index cb9d9e7f4..c85fc8ddb 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -20,6 +20,6 @@ jobs: with: tag_name: ${{ github.ref }} body: | - 更新内容参见 [CHANGELOG](https://youzan.github.io/vant/#/zh-CN/changelog)。 + 更新内容参见 [CHANGELOG](https://vant-ui.github.io/vant/#/zh-CN/changelog)。 - Please refer to [CHANGELOG](https://youzan.github.io/vant/#/en-US/changelog) for details. + Please refer to [CHANGELOG](https://vant-ui.github.io/vant/#/en-US/changelog) for details. diff --git a/README.md b/README.md index d4810fb7e..d8f6c4db4 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@

🔥 文档网站(国内)   - 🌈 文档网站(GitHub) + 🌈 文档网站(GitHub)   🇨🇳 中文版介绍

@@ -74,7 +74,7 @@ const app = createApp(); app.use(Button); ``` -See more in [Quickstart](https://youzan.github.io/vant#/en-US/quickstart). +See more in [Quickstart](https://vant-ui.github.io/vant#/en-US/quickstart). ## Browser Support @@ -106,8 +106,8 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3) ## Links -- [Documentation](https://youzan.github.io/vant) -- [Changelog](https://youzan.github.io/vant#/en-US/changelog) +- [Documentation](https://vant-ui.github.io/vant) +- [Changelog](https://vant-ui.github.io/vant#/en-US/changelog) - [Gitter](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link) ## Preview diff --git a/README.zh-CN.md b/README.zh-CN.md index e0ff482af..7e4979d32 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -18,7 +18,7 @@

🔥 文档网站(国内)   - 🌈 文档网站(GitHub) + 🌈 文档网站(GitHub)

--- diff --git a/packages/vant-cli/docs/config.md b/packages/vant-cli/docs/config.md index f364651f8..47de3e1c3 100644 --- a/packages/vant-cli/docs/config.md +++ b/packages/vant-cli/docs/config.md @@ -325,7 +325,7 @@ module.exports = { versions: [ { label: 'v1', - link: 'https://youzan.github.io/vant/v1/', + link: 'https://vant-ui.github.io/vant/v1/', }, ], }, diff --git a/packages/vant-cli/docs/config.zh-CN.md b/packages/vant-cli/docs/config.zh-CN.md index e8e22a532..19a74be15 100644 --- a/packages/vant-cli/docs/config.zh-CN.md +++ b/packages/vant-cli/docs/config.zh-CN.md @@ -327,7 +327,7 @@ module.exports = { versions: [ { label: 'v1', - link: 'https://youzan.github.io/vant/v1/', + link: 'https://vant-ui.github.io/vant/v1/', }, ], }, diff --git a/packages/vant-icons/README.md b/packages/vant-icons/README.md index af0809483..1fba6f1e7 100644 --- a/packages/vant-icons/README.md +++ b/packages/vant-icons/README.md @@ -15,5 +15,5 @@ pnpm add @vant/icons ## Document -- [Usage in Vue](https://youzan.github.io/vant/#/zh-CN/icon) -- [Usage in Weapp](https://youzan.github.io/vant-weapp/#/icon) +- [Usage in Vue](https://vant-ui.github.io/vant/#/zh-CN/icon) +- [Usage in Weapp](https://vant-ui.github.io/vant-weapp/#/icon) diff --git a/packages/vant/docs/markdown/changelog.en-US.md b/packages/vant/docs/markdown/changelog.en-US.md index 0112da328..c0a4d65f5 100644 --- a/packages/vant/docs/markdown/changelog.en-US.md +++ b/packages/vant/docs/markdown/changelog.en-US.md @@ -4,8 +4,8 @@ The current document is the changelog of Vant 3, other versions: -- [Vant 2 Changelog](https://youzan.github.io/vant/v2/#/en-US/changelog) -- [Vant 4 Changelog](https://youzan.github.io/vant/v4/#/en-US/changelog) +- [Vant 2 Changelog](https://vant-ui.github.io/vant/v2/#/en-US/changelog) +- [Vant 4 Changelog](https://vant-ui.github.io/vant/v4/#/en-US/changelog) ### Intro diff --git a/packages/vant/docs/markdown/changelog.zh-CN.md b/packages/vant/docs/markdown/changelog.zh-CN.md index c5198817e..a6cf0fea3 100644 --- a/packages/vant/docs/markdown/changelog.zh-CN.md +++ b/packages/vant/docs/markdown/changelog.zh-CN.md @@ -4,8 +4,8 @@ 当前文档为 Vant 3 的更新日志,其他版本请参考: -- [Vant 2 更新日志](https://youzan.github.io/vant/v2/#/zh-CN/changelog) -- [Vant 4 更新日志](https://youzan.github.io/vant/v4/#/zh-CN/changelog) +- [Vant 2 更新日志](https://vant-ui.github.io/vant/v2/#/zh-CN/changelog) +- [Vant 4 更新日志](https://vant-ui.github.io/vant/v4/#/zh-CN/changelog) ### 介绍 @@ -1493,4 +1493,4 @@ webpack、vite 等构建工具默认支持 `.mjs` 后缀,因此不需要额外 - Lazyload、Panel 和 Sku 组件暂未完成 Vue 3 适配 -> 详细改动请参考 [从 v2 升级](https://youzan.github.io/vant/v3/#/zh-CN/migrate-from-v2)。 +> 详细改动请参考 [从 v2 升级](https://vant-ui.github.io/vant/v3/#/zh-CN/migrate-from-v2)。 From 5179891faa50ec506b255e02398da8ec19f787bf Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 7 Jul 2022 22:41:44 +0800 Subject: [PATCH 5/8] chore(cli): using npx to run gh-pages (#10799) --- .../generators/vue2/package.json.tpl | 2 +- .../generators/vue3/package.json.tpl | 2 +- packages/vant-cli/package.json | 1 - packages/vant/package.json | 2 +- pnpm-lock.yaml | 107 ------------------ 5 files changed, 3 insertions(+), 111 deletions(-) diff --git a/packages/create-vant-cli-app/generators/vue2/package.json.tpl b/packages/create-vant-cli-app/generators/vue2/package.json.tpl index f3907a2c0..1a2cedd49 100644 --- a/packages/create-vant-cli-app/generators/vue2/package.json.tpl +++ b/packages/create-vant-cli-app/generators/vue2/package.json.tpl @@ -15,7 +15,7 @@ "build": "vant-cli build", "release": "vant-cli release", "test:coverage": "open test/coverage/index.html", - "build-site": "vant-cli build-site && gh-pages -d site-dist" + "build-site": "vant-cli build-site && npx gh-pages -d site-dist" }, "author": "", "husky": { diff --git a/packages/create-vant-cli-app/generators/vue3/package.json.tpl b/packages/create-vant-cli-app/generators/vue3/package.json.tpl index 808f95fbf..fddc1be47 100644 --- a/packages/create-vant-cli-app/generators/vue3/package.json.tpl +++ b/packages/create-vant-cli-app/generators/vue3/package.json.tpl @@ -17,7 +17,7 @@ "build": "vant-cli build", "build:site": "vant-cli build-site", "release": "vant-cli release --tag next", - "release:site": "pnpm build:site && gh-pages -d site-dist", + "release:site": "pnpm build:site && npx gh-pages -d site-dist", "test:watch": "vant-cli test --watch", "test:coverage": "open test/coverage/index.html" }, diff --git a/packages/vant-cli/package.json b/packages/vant-cli/package.json index fb951d0c4..93b3d880e 100644 --- a/packages/vant-cli/package.json +++ b/packages/vant-cli/package.json @@ -69,7 +69,6 @@ "execa": "^5.1.1", "fast-glob": "^3.2.7", "fs-extra": "^10.0.0", - "gh-pages": "^3.2.3", "hash-sum": "^2.0.0", "highlight.js": "^11.3.1", "husky": "^8.0.1", diff --git a/packages/vant/package.json b/packages/vant/package.json index f99e6e7c4..b6947fa13 100644 --- a/packages/vant/package.json +++ b/packages/vant/package.json @@ -20,7 +20,7 @@ "build": "vant-cli build", "build:site": "vant-cli build-site", "release": "cp ../../README.md ./ && vant-cli release && rm ./README.md", - "release:site": "pnpm build:site && gh-pages -d site-dist --add", + "release:site": "pnpm build:site && npx gh-pages -d site-dist --add", "test:watch": "vant-cli test --watch", "test:coverage": "open test/coverage/index.html" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eda68f2d8..a6bc0d98b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -113,7 +113,6 @@ importers: execa: ^5.1.1 fast-glob: ^3.2.7 fs-extra: ^10.0.0 - gh-pages: ^3.2.3 hash-sum: ^2.0.0 highlight.js: ^11.3.1 husky: ^8.0.1 @@ -162,7 +161,6 @@ importers: execa: 5.1.1 fast-glob: 3.2.11 fs-extra: 10.1.0 - gh-pages: 3.2.3 hash-sum: 2.0.0 highlight.js: 11.5.1 husky: 8.0.1 @@ -1877,22 +1875,10 @@ packages: is-string: 1.0.7 dev: false - /array-union/1.0.2: - resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} - engines: {node: '>=0.10.0'} - dependencies: - array-uniq: 1.0.3 - dev: false - /array-union/2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - /array-uniq/1.0.3: - resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} - engines: {node: '>=0.10.0'} - dev: false - /array.prototype.flat/1.3.0: resolution: {integrity: sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==} engines: {node: '>= 0.4'} @@ -1932,12 +1918,6 @@ packages: dependencies: retry: 0.13.1 - /async/2.6.4: - resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} - dependencies: - lodash: 4.17.21 - dev: false - /async/3.2.4: resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} dev: false @@ -2358,10 +2338,6 @@ packages: engines: {node: ^12.20.0 || >=14} dev: false - /commondir/1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - dev: false - /compare-func/2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} dependencies: @@ -2858,10 +2834,6 @@ packages: /electron-to-chromium/1.4.177: resolution: {integrity: sha512-FYPir3NSBEGexSZUEeht81oVhHfLFl6mhUKSkjHN/iB/TwEIt/WHQrqVGfTLN5gQxwJCQkIJBe05eOXjI7omgg==} - /email-addresses/3.1.0: - resolution: {integrity: sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==} - dev: false - /emittery/0.8.1: resolution: {integrity: sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==} engines: {node: '>=10'} @@ -3557,20 +3529,6 @@ packages: minimatch: 5.1.0 dev: false - /filename-reserved-regex/2.0.0: - resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} - engines: {node: '>=4'} - dev: false - - /filenamify/4.3.0: - resolution: {integrity: sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==} - engines: {node: '>=8'} - dependencies: - filename-reserved-regex: 2.0.0 - strip-outer: 1.0.1 - trim-repeated: 1.0.0 - dev: false - /fill-range/7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -3581,15 +3539,6 @@ packages: resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} engines: {node: '>=0.10.0'} - /find-cache-dir/3.3.2: - resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} - engines: {node: '>=8'} - dependencies: - commondir: 1.0.1 - make-dir: 3.1.0 - pkg-dir: 4.2.0 - dev: false - /find-up/2.1.0: resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} engines: {node: '>=4'} @@ -3757,20 +3706,6 @@ packages: transitivePeerDependencies: - supports-color - /gh-pages/3.2.3: - resolution: {integrity: sha512-jA1PbapQ1jqzacECfjUaO9gV8uBgU6XNMV0oXLtfCX3haGLe5Atq8BxlrADhbD6/UdG9j6tZLWAkAybndOXTJg==} - engines: {node: '>=10'} - hasBin: true - dependencies: - async: 2.6.4 - commander: 2.20.3 - email-addresses: 3.1.0 - filenamify: 4.3.0 - find-cache-dir: 3.3.2 - fs-extra: 8.1.0 - globby: 6.1.0 - dev: false - /git-raw-commits/2.0.11: resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} engines: {node: '>=10'} @@ -3890,17 +3825,6 @@ packages: merge2: 1.4.1 slash: 4.0.0 - /globby/6.1.0: - resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} - engines: {node: '>=0.10.0'} - dependencies: - array-union: 1.0.2 - glob: 7.2.3 - object-assign: 4.1.1 - pify: 2.3.0 - pinkie-promise: 2.0.1 - dev: false - /globjoin/0.1.4: resolution: {integrity: sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==} @@ -5674,11 +5598,6 @@ packages: resolution: {integrity: sha512-JYOWTeFoS0Z93587vRJgASD5Ut11fYl5NyihP3KrYBvMe1FRRs6RN7m20SA/16GM4P6hTnZjT+UmDOt38UeXNg==} dev: false - /object-assign/4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - dev: false - /object-inspect/1.12.2: resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} @@ -6005,18 +5924,6 @@ packages: dev: false optional: true - /pinkie-promise/2.0.1: - resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} - engines: {node: '>=0.10.0'} - dependencies: - pinkie: 2.0.4 - dev: false - - /pinkie/2.0.4: - resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} - engines: {node: '>=0.10.0'} - dev: false - /pirates/4.0.5: resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} engines: {node: '>= 6'} @@ -6875,13 +6782,6 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - /strip-outer/1.0.1: - resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} - engines: {node: '>=0.10.0'} - dependencies: - escape-string-regexp: 1.0.5 - dev: false - /style-search/0.1.0: resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==} @@ -7139,13 +7039,6 @@ packages: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} - /trim-repeated/1.0.0: - resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} - engines: {node: '>=0.10.0'} - dependencies: - escape-string-regexp: 1.0.5 - dev: false - /trough/1.0.5: resolution: {integrity: sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==} From a53dc02b0a9bc8412e059b2b9f10e556e88fa838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E6=9D=B1=E9=99=BD?= Date: Sat, 9 Jul 2022 18:10:50 +0800 Subject: [PATCH 6/8] chore: add typescript dev deps to vant-markdown-vetur (#10805) --- packages/vant-markdown-vetur/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vant-markdown-vetur/package.json b/packages/vant-markdown-vetur/package.json index ba45e0a40..3d0ecff08 100644 --- a/packages/vant-markdown-vetur/package.json +++ b/packages/vant-markdown-vetur/package.json @@ -29,6 +29,7 @@ "fs-extra": "^10.0.0" }, "devDependencies": { - "@types/fs-extra": "^9.0.13" + "@types/fs-extra": "^9.0.13", + "typescript": "^4.7.4" } } From 53162941da79b152565145f87591cb04cfaa4e4a Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Sat, 9 Jul 2022 20:55:30 +0800 Subject: [PATCH 7/8] chore: update lock file --- pnpm-lock.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6bc0d98b..c36b59db0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -227,11 +227,13 @@ importers: '@types/fs-extra': ^9.0.13 fast-glob: ^3.2.2 fs-extra: ^10.0.0 + typescript: ^4.7.4 dependencies: fast-glob: 3.2.11 fs-extra: 10.1.0 devDependencies: '@types/fs-extra': 9.0.13 + typescript: 4.7.4 packages/vant-popperjs: specifiers: From 1ac1bb94e7e82a1b7f86544c7667ecc4298164f1 Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 10 Jul 2022 21:20:32 +0800 Subject: [PATCH 8/8] feat(cli): support site.headHtml option (#10807) * feat(cli): support site.headHtml option * docs: update * docs: update --- packages/vant-cli/docs/config.md | 9 ++++++++- packages/vant-cli/docs/config.zh-CN.md | 9 ++++++++- packages/vant-cli/site/index.html | 3 +++ packages/vant-cli/site/mobile.html | 3 +++ packages/vant-cli/src/config/vite.site.ts | 2 ++ packages/vant/vant.config.mjs | 8 +++++++- 6 files changed, 31 insertions(+), 3 deletions(-) diff --git a/packages/vant-cli/docs/config.md b/packages/vant-cli/docs/config.md index 47de3e1c3..047161d21 100644 --- a/packages/vant-cli/docs/config.md +++ b/packages/vant-cli/docs/config.md @@ -380,12 +380,19 @@ Customize iframe URL. Customize HTML meta tag, key means name, value means content. +### site.headHtml + +- Type: `string` +- Default: `undefined` + +Insert a custom HTML content in the `` tag. + ### site.enableVConsole - Type: `boolean` - Default: `false` -Should use [vConsole](https://github.com/Tencent/vConsole) to debug when dev. For mobile. +Whether to enable [vConsole](https://github.com/Tencent/vConsole) debugging in dev, usually used for mobile debugging. ## PostCSS diff --git a/packages/vant-cli/docs/config.zh-CN.md b/packages/vant-cli/docs/config.zh-CN.md index 19a74be15..c1e01715c 100644 --- a/packages/vant-cli/docs/config.zh-CN.md +++ b/packages/vant-cli/docs/config.zh-CN.md @@ -337,7 +337,7 @@ module.exports = { ### site.baiduAnalytics - Type: `object` -- Default: `undefied` +- Default: `undefined` 文档网站的百度统计配置,添加这项配置后,会自动在构建文档网站时加载百度统计的脚本。 @@ -384,6 +384,13 @@ module.exports = { 配置 HTML 中的 meta 标签,对象的 key 为 name,value 为 content。 +### site.headHtml + +- Type: `string` +- Default: `undefined` + +在 `` 标签中插入一段自定义的 HTML 内容。 + ### site.enableVConsole - Type: `boolean` diff --git a/packages/vant-cli/site/index.html b/packages/vant-cli/site/index.html index eba05322b..98a063899 100644 --- a/packages/vant-cli/site/index.html +++ b/packages/vant-cli/site/index.html @@ -15,6 +15,9 @@ + <% if (headHtml) { %> + <%- headHtml %> + <% } %> <% if (baiduAnalytics) { %> +`, locales: { 'zh-CN': { title: 'Vant 3',