From 253cc876320556614062e10a90b213d2b8f34f4c Mon Sep 17 00:00:00 2001 From: Nino Date: Fri, 17 Feb 2017 10:39:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20:first-child=20=E5=92=8C=20:last-child=20?= =?UTF-8?q?=E8=BF=99=E4=B8=A4=E4=B8=AA=E4=BC=AA=E7=B1=BB=20(#13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add package json * 小程序已经支持 first-child 和 last-child 两个伪类 --- dist/btn/index.wxss | 5 +++-- dist/cell/index.wxss | 3 ++- example/btn/index.wxml | 6 +++--- example/cell/index.wxml | 16 ++++++++-------- package.json | 22 ++++++++++++++++++++++ 5 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 package.json diff --git a/dist/btn/index.wxss b/dist/btn/index.wxss index e4bf4478..7e945c87 100644 --- a/dist/btn/index.wxss +++ b/dist/btn/index.wxss @@ -133,8 +133,9 @@ opacity: 1 ! important; } -/* ::last-child */ -.zan-btn--last-child { +/* :last-child */ +.zan-btn--last-child, +.zan-btn:last-child { margin-bottom: 0; margin-right: 0; } diff --git a/dist/cell/index.wxss b/dist/cell/index.wxss index 0b64fca8..387480ef 100644 --- a/dist/cell/index.wxss +++ b/dist/cell/index.wxss @@ -25,7 +25,8 @@ color: #666; } -.zan-cell--last-child::after { +.zan-cell--last-child::after, +.zan-cell:last-child::after { display: none; } diff --git a/example/btn/index.wxml b/example/btn/index.wxml index 7006b5c3..4967a4d2 100644 --- a/example/btn/index.wxml +++ b/example/btn/index.wxml @@ -8,7 +8,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -49,7 +49,7 @@ - + diff --git a/example/cell/index.wxml b/example/cell/index.wxml index 6272b0f3..d779392c 100644 --- a/example/cell/index.wxml +++ b/example/cell/index.wxml @@ -3,27 +3,27 @@ CELL - + 单行列表 - + 单行列表 详细信息 - + 单行列表 - + 单行列表 详细信息 @@ -36,7 +36,7 @@ 多行列表 - + 多行列表 @@ -50,7 +50,7 @@ 多行列表 详细信息 - + 多行列表 详细信息 @@ -65,7 +65,7 @@ 多行列表 - + 多行列表 @@ -80,7 +80,7 @@ 多行列表 详细信息 - + 多行列表 详细信息 diff --git a/package.json b/package.json new file mode 100644 index 00000000..a735562a --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "zanui-weapp", + "version": "2.0.0", + "description": "高颜值、好用、易扩展的小程序 UI 库,Powered by 有赞", + "main": "app.js", + "directories": { + "example": "example" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/youzan/zanui-weapp.git" + }, + "author": "youzan", + "license": "ISC", + "bugs": { + "url": "https://github.com/youzan/zanui-weapp/issues" + }, + "homepage": "https://github.com/youzan/zanui-weapp#readme" +}