From 58bd17f142a0bc3c713774e6e214383dce186577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=95=8F?= Date: Fri, 28 Apr 2017 15:27:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Apopup=E7=9A=84zIndex?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E4=B8=BAnumber=20(#24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/popup/index.js | 5 ++--- src/mixins/popup/popup-context.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mixins/popup/index.js b/src/mixins/popup/index.js index 4ecc1e418..388528bab 100644 --- a/src/mixins/popup/index.js +++ b/src/mixins/popup/index.js @@ -66,15 +66,14 @@ export default { /** * 显示popup */ - open(options) { + open() { if (this.opened) return; this.opening = true; this.$emit('input', true); - const props = merge({}, this, options); - const zIndex = props.zIndex; + const zIndex = this.zIndex; // 如果属性中传入了`zIndex`,则覆盖`popupContext`中对应的`zIndex` if (zIndex) { diff --git a/src/mixins/popup/popup-context.js b/src/mixins/popup/popup-context.js index a4cccf692..66dae4ea2 100644 --- a/src/mixins/popup/popup-context.js +++ b/src/mixins/popup/popup-context.js @@ -25,7 +25,7 @@ const PopupContext = { }, plusKeyByOne(key) { - const oldVal = context[key]; + const oldVal = +context[key]; context[key] = oldVal + 1; return oldVal;