From bdebbc3a3b2915ebd65308567e987ca6d84b73e5 Mon Sep 17 00:00:00 2001 From: bearyan Date: Tue, 18 Apr 2017 17:14:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=90=91=E5=B7=A6?= =?UTF-8?q?=E6=BB=91=E5=8A=A8=E5=87=BA=E7=8E=B0=E6=8C=89=E9=92=AE=20#559?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/example/fragment/list.html | 14 +++++++++ src/style/weui.less | 1 + .../widget/weui-cell/weui-cell_global.less | 10 ++++++ .../widget/weui-cell/weui-cell_swiped.less | 31 +++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 src/style/widget/weui-cell/weui-cell_swiped.less diff --git a/src/example/fragment/list.html b/src/example/fragment/list.html index 9fc317a..b3c8428 100644 --- a/src/example/fragment/list.html +++ b/src/example/fragment/list.html @@ -12,7 +12,21 @@
说明文字
+
+
+
+
+

标题文字

+
+
说明文字
+
+
+
+ 删除 +
+
+
带图标、说明的列表项
diff --git a/src/style/weui.less b/src/style/weui.less index 898451f..d848540 100644 --- a/src/style/weui.less +++ b/src/style/weui.less @@ -9,6 +9,7 @@ // cell @import "./widget/weui-cell/weui-cell_global"; +@import "./widget/weui-cell/weui-cell_swiped"; @import "./widget/weui-cell/weui-access"; @import "./widget/weui-cell/weui-check"; diff --git a/src/style/widget/weui-cell/weui-cell_global.less b/src/style/widget/weui-cell/weui-cell_global.less index 396bd91..908ffaa 100644 --- a/src/style/widget/weui-cell/weui-cell_global.less +++ b/src/style/widget/weui-cell/weui-cell_global.less @@ -1,5 +1,12 @@ @import "../../base/fn"; +/* +z-index: +0: .weui-swiped-btn +1: .weui-cell_swiped .weui-cell__bd +2: .weui-cells和.weui-cell的1px线 +*/ + .weui-cells { margin-top: @weuiCellsMarginTop; background-color: @weuiCellBg; @@ -12,9 +19,11 @@ position: relative; &:before { .setTopLine(@weuiCellBorderColor); + z-index: 2; } &:after { .setBottomLine(@weuiCellBorderColor); + z-index: 2; } } @@ -47,6 +56,7 @@ &:before { .setTopLine(@weuiCellBorderColor); left: @weuiCellGapH; + z-index: 2; } &:first-child { &:before { diff --git a/src/style/widget/weui-cell/weui-cell_swiped.less b/src/style/widget/weui-cell/weui-cell_swiped.less new file mode 100644 index 0000000..3963447 --- /dev/null +++ b/src/style/widget/weui-cell/weui-cell_swiped.less @@ -0,0 +1,31 @@ +@import "../../base/fn"; + +.weui-cell_swiped { + display: block; + padding: 0; + > .weui-cell__bd { + position: relative; + z-index: 1; + background-color: #FFFFFF; + } + > .weui-cell__ft { + position: absolute; + right: 0; + top: 0; + bottom: 0; + display: flex; + color: #FFFFFF; + } +} +.weui-swiped-btn { + display: block; + padding: @weuiCellGapV 1em; + line-height: @weuiCellLineHeight; + color: inherit; +} +.weui-swiped-btn_default { + background-color: #C7C7CC; +} +.weui-swiped-btn_warn { + background-color: #FF3B30; +} \ No newline at end of file