From f6be2db4965d5a111aa550c5e5739aa82a7b1829 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 5 Sep 2019 16:45:22 +0800 Subject: [PATCH] feat(Popup): add closeable prop (#1964) --- example/pages/popup/index.js | 11 ++++++++++- example/pages/popup/index.wxml | 13 +++++++++++++ packages/common/style/var.less | 4 ++++ packages/popup/README.md | 1 + packages/popup/index.json | 1 + packages/popup/index.less | 13 +++++++++++++ packages/popup/index.ts | 5 +++++ packages/popup/index.wxml | 6 ++++++ 8 files changed, 53 insertions(+), 1 deletion(-) diff --git a/example/pages/popup/index.js b/example/pages/popup/index.js index d52a7255..9394ac40 100644 --- a/example/pages/popup/index.js +++ b/example/pages/popup/index.js @@ -8,7 +8,8 @@ Page({ bottom: false, left: false, right: false, - round: false + round: false, + closeIcon: false } }, @@ -64,5 +65,13 @@ Page({ hideRound() { this.toggle('round', false); + }, + + showCloseIcon() { + this.toggle('closeIcon', true); + }, + + hideCloseIcon() { + this.toggle('closeIcon', false); } }); diff --git a/example/pages/popup/index.wxml b/example/pages/popup/index.wxml index 82186ec4..656c4640 100644 --- a/example/pages/popup/index.wxml +++ b/example/pages/popup/index.wxml @@ -44,11 +44,24 @@ /> + + 关闭图标 + + + + 圆角弹窗 +