Skip to content

Commit

Permalink
fix(button): 修复button案例页
Browse files Browse the repository at this point in the history
  • Loading branch information
cos2004 committed Sep 20, 2018
1 parent 0faddd3 commit 1439894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/basic/button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class ButtonPage extends Taro.Component {
}

onButtonClick () {
const content = arguments.length === 2 ? arguments[0] : ''
const content = [...arguments].find(item => typeof item === 'string')
const ENV = Taro.getEnv()
if (ENV === 'WEAPP') Taro.showModal({ content: content || '您点击了!', showCancel: false })
else if (ENV === 'WEB') alert(content || '您点击了!')
Expand Down

0 comments on commit 1439894

Please sign in to comment.