From 1b8128c63af934fbc180635d4ab60ea1b948d1c2 Mon Sep 17 00:00:00 2001 From: cos2004 Date: Fri, 28 Sep 2018 22:02:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(button):=20=E4=BF=AE=E6=94=B9button?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E3=80=81avatar=E6=9D=A1=E4=BB=B6=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/markdown/button.md | 4 +--- src/components/avatar/index.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/markdown/button.md b/docs/markdown/button.md index 18e60d06f..5dafec604 100644 --- a/docs/markdown/button.md +++ b/docs/markdown/button.md @@ -33,11 +33,10 @@ import { AtButton } from 'taro-ui' ``` ::: -## 带Icon +## 带 loading icon :::demo ```html -按钮文案 按钮文案 ``` ::: @@ -48,7 +47,6 @@ import { AtButton } from 'taro-ui' |:-----|:---|:---------|:-----------------------------|:--------|:-----------------------|:---------| | √ | √ | type | 按钮的类型 | String | `primary`, `secondary` | - | | √ | √ | size | 按钮的大小 | String | `normal`, `small` | `normal` | -| √ | √ | icon | 按钮的图标名字 | String | 见文档 `Icon 图标` | - | | √ | √ | circle | 设置按钮圆角 | Boolean | - | false | | √ | √ | loading | 设置按钮的载入状态 | Boolean | - | false | | √ | √ | disabled | 设置按钮为禁用态(不可点击) | Boolean | - | false | diff --git a/src/components/avatar/index.js b/src/components/avatar/index.js index b6c325f69..6274039b7 100644 --- a/src/components/avatar/index.js +++ b/src/components/avatar/index.js @@ -43,7 +43,7 @@ export default class AtAvatar extends AtComponent { if (text) letter = text[0] let elem - if (openData.type === 'userAvatarUrl' && Taro.getEnv() === Taro.ENV_TYPE.WEAPP) { + if (openData && openData.type === 'userAvatarUrl' && Taro.getEnv() === Taro.ENV_TYPE.WEAPP) { elem = () } else if (image) { elem = ()