diff --git a/packages/vant/src/collapse/README.md b/packages/vant/src/collapse/README.md index e14068af3..2e20656c0 100644 --- a/packages/vant/src/collapse/README.md +++ b/packages/vant/src/collapse/README.md @@ -25,9 +25,9 @@ Use `v-model` to control the name of active panels. ```html - Content - Content - Content + Content 1 + Content 2 + Content 3 ``` @@ -48,9 +48,9 @@ In accordion mode, only one panel can be expanded at the same time. ```html - Content - Content - Content + Content 1 + Content 2 + Content 3 ``` @@ -71,12 +71,12 @@ Use the `disabled` prop to disable CollapseItem. ```html - Content + Content 1 - Content + Content 2 - Content + Content 3 ``` @@ -89,10 +89,10 @@ Use the `disabled` prop to disable CollapseItem. - Content + Content 1 - Content + Content 2 ``` diff --git a/packages/vant/src/collapse/README.zh-CN.md b/packages/vant/src/collapse/README.zh-CN.md index b0dfe0e43..9f55a9fb5 100644 --- a/packages/vant/src/collapse/README.zh-CN.md +++ b/packages/vant/src/collapse/README.zh-CN.md @@ -25,9 +25,15 @@ app.use(CollapseItem); ```html - 内容 - 内容 - 内容 + + 代码是写出来给人看的,附带能在机器上运行。 + + + 技术无非就是那些开发它的人的共同灵魂。 + + + 在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。 + ``` @@ -48,9 +54,15 @@ export default { ```html - 内容 - 内容 - 内容 + + 代码是写出来给人看的,附带能在机器上运行。 + + + 技术无非就是那些开发它的人的共同灵魂。 + + + 在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。 + ``` @@ -71,9 +83,15 @@ export default { ```html - 内容 - 内容 - 内容 + + 代码是写出来给人看的,附带能在机器上运行。 + + + 技术无非就是那些开发它的人的共同灵魂。 + + + 在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。 + ``` @@ -87,10 +105,10 @@ export default { - 内容 + 代码是写出来给人看的,附带能在机器上运行。 - 内容 + 技术无非就是那些开发它的人的共同灵魂。 ``` diff --git a/packages/vant/src/collapse/demo/index.vue b/packages/vant/src/collapse/demo/index.vue index e0d69a050..4eca23131 100644 --- a/packages/vant/src/collapse/demo/index.vue +++ b/packages/vant/src/collapse/demo/index.vue @@ -7,14 +7,18 @@ import { useTranslate } from '../../../docs/site/use-translate'; const t = useTranslate({ 'zh-CN': { + text1: '代码是写出来给人看的,附带能在机器上运行。', + text2: '技术无非就是那些开发它的人的共同灵魂。', + text3: '在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。', accordion: '手风琴', titleSlot: '自定义标题内容', - text: '代码是写出来给人看的,附带能在机器上运行', }, 'en-US': { + text1: 'Content 1', + text2: 'Content 2', + text3: 'Content 3', accordion: 'Accordion', titleSlot: 'Custom title', - text: 'Content', }, }); @@ -28,13 +32,13 @@ const active4 = ref([]); - {{ t('text') }} + {{ t('text1') }} - {{ t('text') }} + {{ t('text2') }} - {{ t('text') }} + {{ t('text3') }} @@ -42,13 +46,13 @@ const active4 = ref([]); - {{ t('text') }} + {{ t('text1') }} - {{ t('text') }} + {{ t('text2') }} - {{ t('text') }} + {{ t('text3') }} @@ -56,13 +60,13 @@ const active4 = ref([]); - {{ t('text') }} + {{ t('text1') }} - {{ t('text') }} + {{ t('text2') }} - {{ t('text') }} + {{ t('text3') }} @@ -73,14 +77,14 @@ const active4 = ref([]); - {{ t('text') }} + {{ t('text1') }} - {{ t('text') }} + {{ t('text2') }} diff --git a/packages/vant/src/collapse/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/collapse/test/__snapshots__/demo.spec.ts.snap index 7693a1511..ae5409411 100644 --- a/packages/vant/src/collapse/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/collapse/test/__snapshots__/demo.spec.ts.snap @@ -19,7 +19,7 @@ exports[`should render demo and match snapshot 1`] = `
- Content + Content 1
@@ -73,7 +73,7 @@ exports[`should render demo and match snapshot 1`] = `
- Content + Content 1
diff --git a/packages/vant/src/dialog/README.zh-CN.md b/packages/vant/src/dialog/README.zh-CN.md index 8cb80eadd..c88ffdcba 100644 --- a/packages/vant/src/dialog/README.zh-CN.md +++ b/packages/vant/src/dialog/README.zh-CN.md @@ -58,13 +58,13 @@ export default { ```js Dialog.alert({ title: '标题', - message: '弹窗内容', + message: '代码是写出来给人看的,附带能在机器上运行。', }).then(() => { // on close }); Dialog.alert({ - message: '弹窗内容', + message: '生命远不止连轴转和忙到极限,人类的体验远比这辽阔、丰富得多。', }).then(() => { // on close }); @@ -77,7 +77,8 @@ Dialog.alert({ ```js Dialog.confirm({ title: '标题', - message: '弹窗内容', + message: + '如果解决方法是丑陋的,那就肯定还有更好的解决方法,只是还没有发现而已。', }) .then(() => { // on confirm @@ -94,14 +95,14 @@ Dialog.confirm({ ```js Dialog.alert({ title: '标题', - message: '弹窗内容', + message: '代码是写出来给人看的,附带能在机器上运行。', theme: 'round-button', }).then(() => { // on close }); Dialog.alert({ - message: '弹窗内容', + message: '生命远不止连轴转和忙到极限,人类的体验远比这辽阔、丰富得多。', theme: 'round-button', }).then(() => { // on close @@ -127,7 +128,8 @@ const beforeClose = (action) => Dialog.confirm({ title: '标题', - message: '弹窗内容', + message: + '如果解决方法是丑陋的,那就肯定还有更好的解决方法,只是还没有发现而已。', beforeClose, }); ``` diff --git a/packages/vant/src/dialog/demo/index.vue b/packages/vant/src/dialog/demo/index.vue index 3ac5f1dbe..30dc145da 100644 --- a/packages/vant/src/dialog/demo/index.vue +++ b/packages/vant/src/dialog/demo/index.vue @@ -3,7 +3,7 @@ import VanCell from '../../cell'; import { Dialog } from '..'; import { ref } from 'vue'; import { useTranslate } from '../../../docs/site/use-translate'; -import type { DialogAction } from '../Dialog'; +import type { DialogAction } from '../types'; const VanDialog = Dialog.Component; @@ -13,16 +13,22 @@ const t = useTranslate({ alert1: '提示弹窗', alert2: '提示弹窗(无标题)', confirm: '确认弹窗', + content1: '代码是写出来给人看的,附带能在机器上运行。', + content2: '生命远不止连轴转和忙到极限,人类的体验远比这辽阔、丰富得多。', + content3: + '如果解决方法是丑陋的,那就肯定还有更好的解决方法,只是还没有发现而已。', beforeClose: '异步关闭', roundButton: '圆角按钮样式', componentCall: '组件调用', - content: '代码是写出来给人看的,附带能在机器上运行', }, 'en-US': { title: 'Title', alert1: 'Alert', alert2: 'Alert without title', confirm: 'Confirm dialog', + content1: 'Content', + content2: 'Content', + content3: 'Content', beforeClose: 'Before Close', roundButton: 'Round Button Style', componentCall: 'Component Call', @@ -35,13 +41,13 @@ const image = 'https://img.yzcdn.cn/vant/apple-3.jpg'; const onClickAlert = () => { Dialog.alert({ title: t('title'), - message: t('content'), + message: t('content1'), }); }; const onClickAlert2 = () => { Dialog.alert({ - message: t('content'), + message: t('content2'), }); }; @@ -49,21 +55,21 @@ const onClickRound = () => { Dialog.alert({ theme: 'round-button', title: t('title'), - message: t('content'), + message: t('content1'), }); }; const onClickRound2 = () => { Dialog.alert({ theme: 'round-button', - message: t('content'), + message: t('content2'), }); }; const onClickConfirm = () => { Dialog.confirm({ title: t('title'), - message: t('content'), + message: t('content3'), }); }; @@ -75,7 +81,7 @@ const onClickBeforeClose = () => { Dialog.confirm({ title: t('title'), - message: t('content'), + message: t('content3'), beforeClose, }); }; diff --git a/packages/vant/src/notice-bar/README.md b/packages/vant/src/notice-bar/README.md index 09c6bf0e5..87cb6cefc 100644 --- a/packages/vant/src/notice-bar/README.md +++ b/packages/vant/src/notice-bar/README.md @@ -21,14 +21,17 @@ app.use(NoticeBar); ### Basic Usage ```html - + ``` ### Scrollable ```html - + Notice Content + + Technology is the common soul of the people who developed it. + ``` ### Mode ```html -Notice Content +Short Content -Notice Content +Short Content ``` ### Custom Style ```html - Notice Content + Short Content ``` diff --git a/packages/vant/src/notice-bar/README.zh-CN.md b/packages/vant/src/notice-bar/README.zh-CN.md index 16a33d780..55b7f6a7a 100644 --- a/packages/vant/src/notice-bar/README.zh-CN.md +++ b/packages/vant/src/notice-bar/README.zh-CN.md @@ -25,7 +25,7 @@ app.use(NoticeBar); ```html ``` @@ -35,12 +35,12 @@ app.use(NoticeBar); ```html - + ``` @@ -52,7 +52,7 @@ app.use(NoticeBar); ``` @@ -62,10 +62,10 @@ app.use(NoticeBar); ```html -技术是开发它的人的共同灵魂。 +米袋虽空——樱花开哉! -技术是开发它的人的共同灵魂。 +米袋虽空——樱花开哉! ``` ### 自定义样式 @@ -74,13 +74,13 @@ app.use(NoticeBar); ```html - 技术是开发它的人的共同灵魂。 + 米袋虽空——樱花开哉! ``` ### 垂直滚动 -搭配 NoticeBar 和 Swipe 组件可以实现垂直滚动的效果。 +搭配 NoticeBar 和 Swipe 组件,可以实现垂直滚动的效果。 ```html @@ -90,9 +90,9 @@ app.use(NoticeBar); :autoplay="3000" :show-indicators="false" > - 内容 1 - 内容 2 - 内容 3 + 明月直入,无心可猜。 + 仙人抚我顶,结发受长生。 + 今人不见古时月,今月曾经照古人。 diff --git a/packages/vant/src/notice-bar/demo/index.vue b/packages/vant/src/notice-bar/demo/index.vue index 5deda6343..17f71b48f 100644 --- a/packages/vant/src/notice-bar/demo/index.vue +++ b/packages/vant/src/notice-bar/demo/index.vue @@ -6,21 +6,28 @@ import { useTranslate } from '../../../docs/site/use-translate'; const t = useTranslate({ 'zh-CN': { - text: '在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。', mode: '通知栏模式', - content: '内容', + text1: '无论我们能活多久,我们能够享受的只有无法分割的此刻,此外别无其他。', + text2: + '不会回头的东西有四件:说出口的话、离弦的箭、逝去的生活和失去的机会。', + haiku: '米袋虽空——樱花开哉!', + poetry1: '明月直入,无心可猜。', + poetry2: '仙人抚我顶,结发受长生。', + poetry3: '今人不见古时月,今月曾经照古人。', wrapable: '多行展示', - shortText: '技术是开发它的人的共同灵魂。', scrollable: '滚动播放', customStyle: '自定义样式', verticalScroll: '垂直滚动', }, 'en-US': { - text: 'Technology is the common soul of the people who developed it.', mode: 'Mode', - content: 'Content', + text1: 'Technology is the common soul of the people who developed it.', + text2: 'Technology is the common soul of the people who developed it.', + haiku: 'Short Content', + poetry1: 'Content 1', + poetry2: 'Content 2', + poetry3: 'Content 3', wrapable: 'Wrapable', - shortText: 'Some short text.', customStyle: 'Custom Style', scrollable: 'Scrollable', verticalScroll: 'Vertical Scroll', @@ -30,26 +37,26 @@ const t = useTranslate({