ソースを参照

refactor: review button cell 等组件 (#402)

* fix: 优化

* fix: review price组件,优化input组件

* fix: 优化rate avatar 组件

* fix: review button cell 组件

* fix: 优化config

* fix: review cell button 组件

Co-authored-by: guoxiaoxiao8 <guoxiao158@126.com>
Co-authored-by: richard1015 <51844712@qq.com>
Co-authored-by: guoxiaoxiao8 <guo>
郭晓 4 年 前
コミット
04273b3e7a

+ 3 - 1
src/packages/button/demo.vue

@@ -28,7 +28,9 @@
       <nut-button type="info">圆形按钮</nut-button>
     </div>
     <h2>加载状态</h2>
-
+    <div class="demo-button-row2">
+      <nut-button loading></nut-button>
+    </div>
     <h2>图标按钮</h2>
     <div class="demo-button-row2">
       <nut-button

+ 14 - 0
src/packages/button/doc.md

@@ -57,6 +57,20 @@ app.use(Button);
 <nut-button type="info">圆形按钮</nut-button>
 ```
 
+### 加载状态
+
+```html
+<nut-button loading></nut-button>
+<nut-button loading>加载中</nut-button>
+```
+
+### 图标按钮
+
+```html
+  <nut-button shape="square" plain type="primary" icon="star-fill"></nut-button>
+  <nut-button shape="square" type="primary" icon="star">收藏</nut-button>
+```
+
 ### 按钮尺寸
 
 支持 `large`、`normal`、`small` 三种尺寸,默认为 `normal`。

+ 15 - 2
src/packages/cell/demo.vue

@@ -2,11 +2,24 @@
   <div class="demo">
     <h2>基本用法</h2>
     <nut-cell title="我是标题" desc="描述文字"></nut-cell>
-    <nut-cell title="我是标题" sub-title="副标题描述" desc="描述文字"></nut-cell>
+    <nut-cell
+      title="我是标题"
+      sub-title="副标题描述"
+      desc="描述文字"
+    ></nut-cell>
     <nut-cell title="点击测试" @click="testClick"></nut-cell>
+    <h2>直接使用插槽(slot)</h2>
+    <nut-cell title="我是标题" desc="描述文字">
+      <div>自定义内容</div>
+    </nut-cell>
     <h2>链接</h2>
     <nut-cell title="链接" is-link></nut-cell>
-    <nut-cell title="URL 跳转" desc="https://jd.com" is-link url="https://jd.com"></nut-cell>
+    <nut-cell
+      title="URL 跳转"
+      desc="https://jd.com"
+      is-link
+      url="https://jd.com"
+    ></nut-cell>
     <nut-cell title="路由跳转 ’/‘ " to="/"></nut-cell>
     <h2>展示图标</h2>
     <nut-cell title="姓名" icon="my" desc="张三"></nut-cell>

+ 8 - 0
src/packages/cell/doc.md

@@ -36,6 +36,14 @@ setup() {
 // ...
 ```
 
+### 直接使用插槽
+
+``` html
+ <nut-cell title="我是标题" desc="描述文字">
+  <div>自定义内容</div>
+ </nut-cell>  
+```
+
 ### 链接
 
 ``` html