From bb875c2a924f61cc03b8d013fd1a8f5ee8e22972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=84=B6=E5=88=99?= Date: Thu, 1 Sep 2016 13:03:55 +0800 Subject: [PATCH] fix all component z-index --- components/list-view/style/index.less | 2 +- components/modal/style/Dialog.less | 17 ++++++++++++++++- components/modal/style/Mask.less | 15 --------------- components/modal/style/index.less | 1 - components/progress/style/index.less | 2 +- components/style/themes/default.less | 14 +++++++++----- package.json | 2 +- 7 files changed, 28 insertions(+), 25 deletions(-) delete mode 100644 components/modal/style/Mask.less diff --git a/components/list-view/style/index.less b/components/list-view/style/index.less index 43705716d8..98521e4961 100644 --- a/components/list-view/style/index.less +++ b/components/list-view/style/index.less @@ -23,7 +23,7 @@ position: fixed; top: 0; right: 0; - z-index: 1999; + z-index: @listViewQsbZIndex; text-align: center; color: @color-link; font-size: @font-size-caption; diff --git a/components/modal/style/Dialog.less b/components/modal/style/Dialog.less index 67839c9e0c..7c4c4fbdcb 100644 --- a/components/modal/style/Dialog.less +++ b/components/modal/style/Dialog.less @@ -1,5 +1,20 @@ .@{modalPrefixClass} { position: relative; + + &-mask { + position: fixed; + top: 0; + right: 0; + left: 0; + bottom: 0; + height: 100%; + z-index: @modalZIndex; + background-color: @fill-overlay-inverse; + &-hidden { + display: none; + } + } + &-wrap { position: fixed; overflow: auto; @@ -8,7 +23,7 @@ bottom: 0; left: 0; height: 100%; - z-index: 1050; + z-index: @modalZIndex; -webkit-overflow-scrolling: touch; outline: 0; .display-box(); diff --git a/components/modal/style/Mask.less b/components/modal/style/Mask.less deleted file mode 100644 index b91d2cb930..0000000000 --- a/components/modal/style/Mask.less +++ /dev/null @@ -1,15 +0,0 @@ -.@{modalPrefixClass} { - &-mask { - position: fixed; - top: 0; - right: 0; - left: 0; - bottom: 0; - height: 100%; - z-index: 1050; - background-color: @fill-overlay-inverse; - &-hidden { - display: none; - } - } -} diff --git a/components/modal/style/index.less b/components/modal/style/index.less index 00ea953961..03c11f3bba 100644 --- a/components/modal/style/index.less +++ b/components/modal/style/index.less @@ -3,7 +3,6 @@ @modalPrefixClass: am-modal; -@import './Mask.less'; @import './Dialog.less'; .@{modalPrefixClass} { diff --git a/components/progress/style/index.less b/components/progress/style/index.less index a4a9bedcf6..d9aead98a9 100644 --- a/components/progress/style/index.less +++ b/components/progress/style/index.less @@ -13,7 +13,7 @@ width: 100%; top: 0; left: 0; - z-index: 999; + z-index: @progressZIndex; } &-hide-outer { background-color: transparent; diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 8a26f7194a..0d99627bb5 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -165,9 +165,13 @@ @table-title-height: 60px; // z-index -@actionSheetZIndex: 1000; -@datePickerZIndex: 1000; +@popoverZIndex: 1999; // 最大 +@toastZIndex: 1999; // 最大 +@actionSheetZIndex: 1000; // actonsheet 会放到 popup / modal 中 +@datePickerZIndex: 1000; // picker 会放到 popup / modal 中 @pickerZIndex: 1000; -@popupZIndex: 1000; -@popoverZIndex: 1999; -@toastZIndex: 1999; +@popupZIndex: 999; +@modalZIndex: 999; // modal.alert 应该最大,其他应该较小 +// other z-index +@progressZIndex: 2000; +@listViewQsbZIndex: 998; diff --git a/package.json b/package.json index 20046fe7e6..76d9d82208 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd-mobile", - "version": "0.8.0", + "version": "0.8.1", "description": "基于 React 的移动设计规范实现", "homepage": "http://mobile.ant.design", "keywords": [