From f4290318923cfc3bfd88a6a61eb646a7490634f9 Mon Sep 17 00:00:00 2001 From: zhongyuan Date: Fri, 4 Nov 2022 15:12:23 +0800 Subject: [PATCH 1/3] docs(image-viewer): update demo --- src/image-viewer/demos/base.vue | 47 +++++++++++------------ src/image-viewer/demos/closeBtn.vue | 46 +++++++++++----------- src/image-viewer/demos/closeEvent.vue | 52 ++++++++++++------------- src/image-viewer/demos/mobile.vue | 55 ++++----------------------- 4 files changed, 79 insertions(+), 121 deletions(-) diff --git a/src/image-viewer/demos/base.vue b/src/image-viewer/demos/base.vue index 73a19817d..4dd9e399d 100644 --- a/src/image-viewer/demos/base.vue +++ b/src/image-viewer/demos/base.vue @@ -1,29 +1,28 @@ - + diff --git a/src/image-viewer/demos/closeBtn.vue b/src/image-viewer/demos/closeBtn.vue index ff7c15771..949a1d224 100644 --- a/src/image-viewer/demos/closeBtn.vue +++ b/src/image-viewer/demos/closeBtn.vue @@ -1,29 +1,29 @@ - + diff --git a/src/image-viewer/demos/closeEvent.vue b/src/image-viewer/demos/closeEvent.vue index 1bdd9094c..1d0462a4b 100644 --- a/src/image-viewer/demos/closeEvent.vue +++ b/src/image-viewer/demos/closeEvent.vue @@ -1,33 +1,33 @@ - + diff --git a/src/image-viewer/demos/mobile.vue b/src/image-viewer/demos/mobile.vue index fa461a067..8880ea124 100644 --- a/src/image-viewer/demos/mobile.vue +++ b/src/image-viewer/demos/mobile.vue @@ -3,55 +3,14 @@

ImageViewer 图片预览

图片全屏放大预览效果,包含全屏背景色、页码位置样式、增加操作等规范

-
- 基础用法 - 不展示关闭按钮 - 监听关闭事件 -
+ + +
- - - - - From ac74a6f0694c8f909b7ea206fc86a5b927c10b0e Mon Sep 17 00:00:00 2001 From: zhongyuan Date: Fri, 4 Nov 2022 15:19:24 +0800 Subject: [PATCH 2/3] fix(image-viewer): update snap --- .../__test__/__snapshots__/demo.test.jsx.snap | 367 +++++++----------- 1 file changed, 140 insertions(+), 227 deletions(-) diff --git a/src/image-viewer/__test__/__snapshots__/demo.test.jsx.snap b/src/image-viewer/__test__/__snapshots__/demo.test.jsx.snap index 5f6061050..d51a25830 100644 --- a/src/image-viewer/__test__/__snapshots__/demo.test.jsx.snap +++ b/src/image-viewer/__test__/__snapshots__/demo.test.jsx.snap @@ -72,212 +72,119 @@ exports[`ImageViewer > ImageViewer backgroundVue demo works fine 1`] = ` `; exports[`ImageViewer > ImageViewer baseVue demo works fine 1`] = ` -
-
+ + -
+
`; exports[`ImageViewer > ImageViewer closeBtnVue demo works fine 1`] = ` -
-
+ + -
+
`; exports[`ImageViewer > ImageViewer closeEventVue demo works fine 1`] = ` -
-
+ + -
+
`; @@ -424,23 +331,19 @@ exports[`ImageViewer > ImageViewer initialIndexVue demo works fine 1`] = ` exports[`ImageViewer > ImageViewer mobileVue demo works fine 1`] = `

ImageViewer 图片预览

图片全屏放大预览效果,包含全屏背景色、页码位置样式、增加操作等规范

ImageViewer mobileVue demo works fine 1`] = `
+ + + +
+
+ + + +
+
+ + +

- - - - - - - - -
`; From 778a4b7605bfc8c0432be02d67b61ba881a671b8 Mon Sep 17 00:00:00 2001 From: zhongyuan Date: Mon, 7 Nov 2022 22:30:31 +0800 Subject: [PATCH 3/3] fix(image-viewer): fix cr --- src/image-viewer/demos/base.vue | 1 - src/image-viewer/demos/closeBtn.vue | 1 - src/image-viewer/demos/closeEvent.vue | 1 - 3 files changed, 3 deletions(-) diff --git a/src/image-viewer/demos/base.vue b/src/image-viewer/demos/base.vue index 4dd9e399d..d0e0c82c3 100644 --- a/src/image-viewer/demos/base.vue +++ b/src/image-viewer/demos/base.vue @@ -22,7 +22,6 @@ const tapShow = () => { margin: 0 16px; button { margin-bottom: 16px; - background-color: #fff; } } diff --git a/src/image-viewer/demos/closeBtn.vue b/src/image-viewer/demos/closeBtn.vue index 949a1d224..3c5f84d60 100644 --- a/src/image-viewer/demos/closeBtn.vue +++ b/src/image-viewer/demos/closeBtn.vue @@ -23,7 +23,6 @@ function tapShow() { margin: 0 16px; button { margin-bottom: 16px; - background-color: #fff; } } diff --git a/src/image-viewer/demos/closeEvent.vue b/src/image-viewer/demos/closeEvent.vue index 1d0462a4b..191d642fa 100644 --- a/src/image-viewer/demos/closeEvent.vue +++ b/src/image-viewer/demos/closeEvent.vue @@ -27,7 +27,6 @@ function onClose(context: { trigger: 'close-btn' | 'overlay' | 'esc'; e: MouseEv margin: 0 16px; button { margin-bottom: 16px; - background-color: #fff; } }