Browse Source

docs(button): upd icon slot docs

eiinu 3 years ago
parent
commit
a0276cc0c1

+ 7 - 0
src/packages/__VUE/button/doc.en-US.md

@@ -203,6 +203,13 @@ The color of the button can be customized through the color property.
 | block    | Whether to set display block      | boolean | `false`   |
 | loading  | Whether to show loading status     | boolean | `false`   |
 
+### Slots
+
+| Name | Description |
+|-|-|
+| default | button content |
+| icon | button icon |
+
 ### Events
 
 | Event | Description           | Arguments          |

+ 7 - 1
src/packages/__VUE/button/doc.taro.md

@@ -198,9 +198,15 @@ app.use(Button);
 | plain    | 是否为朴素按钮                                               | boolean | `false`   |
 | disabled | 是否禁用按钮                                                 | boolean | `false`   |
 | block    | 是否为块级元素                                               | boolean | `false`   |
-| icon     | 按钮图标,同 `Icon` 组件 `name` 属性                             | string  | -         |
 | loading  | 按钮 `loading` 状态                                            | boolean | `false`   |
 
+### Slots
+
+| 名称 | 说明 |
+|-|-|
+| default | 按钮内容 |
+| icon | 按钮图标 |
+
 ### Events
 
 | 事件名 | 说明           | 回调参数          |

+ 0 - 12
src/packages/__VUE/button/index.taro.vue

@@ -47,18 +47,6 @@ export default create({
     block: {
       type: Boolean,
       default: false
-    },
-    icon: {
-      type: String,
-      default: ''
-    },
-    iconClassPrefix: {
-      type: String,
-      default: 'nut-icon'
-    },
-    iconFontClassName: {
-      type: String,
-      default: 'nutui-iconfont'
     }
   },
   emits: ['click'],