From 7c14a40b57f2cbd58e58e03e041005fba208936a Mon Sep 17 00:00:00 2001 From: zhongyuan Date: Tue, 25 Oct 2022 10:11:13 +0800 Subject: [PATCH 1/3] docs(Toast): update Toast sample code --- .../__test__/__snapshots__/demo.test.jsx.snap | 191 +++++++++++++----- src/toast/demos/icon.vue | 20 +- src/toast/demos/iconText.vue | 58 ++++-- src/toast/demos/mask.vue | 43 +++- src/toast/demos/mobile.vue | 55 +++-- src/toast/demos/position.vue | 36 ++-- src/toast/demos/text.vue | 40 ++-- 7 files changed, 297 insertions(+), 146 deletions(-) diff --git a/src/toast/__test__/__snapshots__/demo.test.jsx.snap b/src/toast/__test__/__snapshots__/demo.test.jsx.snap index ece3a2918..35f62fb9e 100644 --- a/src/toast/__test__/__snapshots__/demo.test.jsx.snap +++ b/src/toast/__test__/__snapshots__/demo.test.jsx.snap @@ -6,7 +6,7 @@ exports[`Toast > Toast iconTextVue demo works fine 1`] = ` > + @@ -93,7 +105,7 @@ exports[`Toast > Toast iconVue demo works fine 1`] = ` class="t-button__text" > - 失败 + 警告 @@ -136,7 +148,7 @@ exports[`Toast > Toast maskVue demo works fine 1`] = ` > + + + @@ -346,21 +400,7 @@ exports[`Toast > Toast mobileVue demo works fine 1`] = ` > - @@ -414,7 +454,7 @@ exports[`Toast > Toast mobileVue demo works fine 1`] = `

- 弹窗可显示遮罩,可配置 Overlay 属性 + 弹窗可显示遮罩,禁止滑动和点击

Toast mobileVue demo works fine 1`] = ` > @@ -443,12 +483,12 @@ exports[`Toast > Toast mobileVue demo works fine 1`] = `

- 04 透传 Overlay + 04 手动关闭

- 向 Overlay 遮罩透传属性 + 手动关闭轻提示

Toast mobileVue demo works fine 1`] = ` > + @@ -477,12 +531,12 @@ exports[`Toast > Toast mobileVue demo works fine 1`] = `

- 05 禁止滑动和点击 + 05 透传 Overlay

- 弹窗禁止滑动和点击 + 向 Overlay 遮罩透传属性

Toast mobileVue demo works fine 1`] = ` > @@ -514,7 +568,7 @@ exports[`Toast > Toast positionVue demo works fine 1`] = ` > @@ -564,7 +617,7 @@ exports[`Toast > Toast textVue demo works fine 1`] = ` > + + diff --git a/src/toast/demos/icon.vue b/src/toast/demos/icon.vue index c10497764..d092c4158 100644 --- a/src/toast/demos/icon.vue +++ b/src/toast/demos/icon.vue @@ -1,25 +1,19 @@ - diff --git a/src/toast/demos/iconText.vue b/src/toast/demos/iconText.vue index b00eb3f44..dd2aea3c0 100644 --- a/src/toast/demos/iconText.vue +++ b/src/toast/demos/iconText.vue @@ -1,25 +1,49 @@ - diff --git a/src/toast/demos/mask.vue b/src/toast/demos/mask.vue index 6586fe3da..b01c09cfe 100644 --- a/src/toast/demos/mask.vue +++ b/src/toast/demos/mask.vue @@ -1,18 +1,41 @@ - diff --git a/src/toast/demos/mobile.vue b/src/toast/demos/mobile.vue index 1af351f8c..4a4e10536 100644 --- a/src/toast/demos/mobile.vue +++ b/src/toast/demos/mobile.vue @@ -21,26 +21,32 @@
- 顶部Top - 中间Middle - 底部Bottom - 显示 5 秒 + 顶部展示1秒 + 中间展示2秒 + 底部展示3秒
- +
- 弹窗显示遮罩 + 禁止滑动和点击
- +
- 可滑动和点击透明遮罩 + 显示提示 + 关闭提示
- +
- 禁止滑动和点击 + 可滑动和点击透明遮罩
@@ -48,7 +54,7 @@ diff --git a/src/toast/demos/text.vue b/src/toast/demos/text.vue index d178ad8fe..617404c7e 100644 --- a/src/toast/demos/text.vue +++ b/src/toast/demos/text.vue @@ -1,28 +1,28 @@ - From 52afbdb3887d3820cc3624fc3db60d8daaa080e4 Mon Sep 17 00:00:00 2001 From: zhongyuan Date: Tue, 25 Oct 2022 16:04:10 +0800 Subject: [PATCH 2/3] docs(Toast): update Toast mobile demo --- src/toast/__test__/demo.test.jsx | 4 + src/toast/demos/icon.vue | 2 +- src/toast/demos/iconText.vue | 2 +- src/toast/demos/mask.vue | 26 +--- src/toast/demos/mobile.vue | 155 ++--------------------- src/toast/demos/overlay.vue | 21 +++ src/toast/demos/position.vue | 2 +- src/toast/demos/preventScrollThrough.vue | 22 ++++ src/toast/demos/text.vue | 2 +- 9 files changed, 65 insertions(+), 171 deletions(-) create mode 100644 src/toast/demos/overlay.vue create mode 100644 src/toast/demos/preventScrollThrough.vue diff --git a/src/toast/__test__/demo.test.jsx b/src/toast/__test__/demo.test.jsx index 9620d66ec..cd0c1bdc9 100644 --- a/src/toast/__test__/demo.test.jsx +++ b/src/toast/__test__/demo.test.jsx @@ -7,7 +7,9 @@ import iconVue from '@/toast/demos/icon.vue'; import iconTextVue from '@/toast/demos/iconText.vue'; import maskVue from '@/toast/demos/mask.vue'; import mobileVue from '@/toast/demos/mobile.vue'; +import overlayVue from '@/toast/demos/overlay.vue'; import positionVue from '@/toast/demos/position.vue'; +import preventScrollThroughVue from '@/toast/demos/preventScrollThrough.vue'; import textVue from '@/toast/demos/text.vue'; const mapper = { @@ -15,7 +17,9 @@ const mapper = { iconTextVue, maskVue, mobileVue, + overlayVue, positionVue, + preventScrollThroughVue, textVue, }; diff --git a/src/toast/demos/icon.vue b/src/toast/demos/icon.vue index d092c4158..728e89d82 100644 --- a/src/toast/demos/icon.vue +++ b/src/toast/demos/icon.vue @@ -1,5 +1,5 @@