From 590435487cf911a608d9548955fd7ff5da59f4e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E6=9D=BE=E8=BF=9C?= <61470255@qq.com> Date: Wed, 13 Nov 2019 15:06:05 +0800 Subject: [PATCH] Update index.js --- src/components/button/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/button/index.js b/src/components/button/index.js index 71301ef6b..9f5eee6cc 100644 --- a/src/components/button/index.js +++ b/src/components/button/index.js @@ -23,6 +23,7 @@ export default class AtButton extends AtComponent { isWEB: Taro.getEnv() === Taro.ENV_TYPE.WEB, isWEAPP: Taro.getEnv() === Taro.ENV_TYPE.WEAPP, isALIPAY: Taro.getEnv() === Taro.ENV_TYPE.ALIPAY, + isSWAN: Taro.getEnv() === Taro.ENV_TYPE.SWAN, } } @@ -93,6 +94,7 @@ export default class AtButton extends AtComponent { isWEAPP, isALIPAY, isWEB, + isSWAN, } = this.state const rootClassName = ['at-button'] const classObject = { @@ -141,7 +143,7 @@ export default class AtButton extends AtComponent { > {isWEB && !disabled && webButton} {isWEAPP && !disabled &&
} - {isALIPAY && !disabled && button} + {(isALIPAY || isSWAN) && !disabled && button} {component}