diff --git a/docs/examples-docs/image-pewview.md b/docs/examples-docs/image-preview.md similarity index 100% rename from docs/examples-docs/image-pewview.md rename to docs/examples-docs/image-preview.md diff --git a/docs/examples/image-pewview.vue b/docs/examples/image-pewview.vue deleted file mode 100644 index 4d6deff92..000000000 --- a/docs/examples/image-pewview.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/docs/examples/image-preview.vue b/docs/examples/image-preview.vue new file mode 100644 index 000000000..cf3297d9e --- /dev/null +++ b/docs/examples/image-preview.vue @@ -0,0 +1,18 @@ + + + diff --git a/docs/nav.config.json b/docs/nav.config.json index aa6d7e287..4abfcb2a5 100644 --- a/docs/nav.config.json +++ b/docs/nav.config.json @@ -131,7 +131,7 @@ }, { "path": "/image-preview", - "title": "ImagePreview 图片预览" + "title": "ImagePreview" } ] } diff --git a/packages/dialog/src/dialog.vue b/packages/dialog/src/dialog.vue index ca6b55ed7..b91ea033c 100644 --- a/packages/dialog/src/dialog.vue +++ b/packages/dialog/src/dialog.vue @@ -70,10 +70,8 @@ export default { setTimeout(() => { if (this.modal && this.bodyOverflow !== 'hidden') { document.body.style.overflow = this.bodyOverflow; - document.body.style.paddingRight = this.bodyPaddingRight; } this.bodyOverflow = null; - this.bodyPaddingRight = null; }, 200); } diff --git a/packages/image-preview/index.js b/packages/image-preview/index.js index 3fffcc094..6ad473649 100644 --- a/packages/image-preview/index.js +++ b/packages/image-preview/index.js @@ -1,3 +1,3 @@ -import ImagePreview from './src/image-preview'; +import ImagePreview from './src/image-preview.vue'; export default ImagePreview; diff --git a/packages/image-preview/src/image-preview.js b/packages/image-preview/src/image-preview.js new file mode 100644 index 000000000..e69de29bb diff --git a/packages/image-preview/src/image-preview.vue b/packages/image-preview/src/image-preview.vue index 0d2c38ebd..7c559222b 100644 --- a/packages/image-preview/src/image-preview.vue +++ b/packages/image-preview/src/image-preview.vue @@ -1,18 +1,73 @@ diff --git a/packages/zanui-css/src/image_preview.css b/packages/zanui-css/src/image_preview.css new file mode 100644 index 000000000..2ae2a76ce --- /dev/null +++ b/packages/zanui-css/src/image_preview.css @@ -0,0 +1,15 @@ +@component-namespace zan { + @b image-preview { + position: absolute; + width: 100%; + height: 75%; + overflow: hidden; + + @e image { + display: block; + width: 100%; + height: auto; + margin: 0 auto; + } + } +} diff --git a/packages/zanui-css/src/index.css b/packages/zanui-css/src/index.css index 3f89bef3c..2493b72b2 100644 --- a/packages/zanui-css/src/index.css +++ b/packages/zanui-css/src/index.css @@ -19,3 +19,4 @@ @import './steps.css'; @import './tag.css'; @import './checkbox.css'; +@import './image_preview.css';