ソースを参照

feat: 更新ActionSheet组件

songchenglin3 5 年 前
コミット
45460c7a13

+ 40 - 40
src/packages/actionsheet/actionsheet.scss

@@ -1,43 +1,25 @@
-@import '../../styles/animation/fade';
-@import '../../styles/animation/slide-up';
-
-.nut-actionsheet-mask {
-	@include fix-fullscreen();
-}
-
-.nut-actionsheet-panel {
-	position: fixed;
-	left: 0;
-	right: 0;
-	bottom: 0;
-	width: 100%;
-	max-height: 80%;
-	overflow: auto;
-	z-index: $zindex-actionsheet;
-	background-color: $body-background;
-}
-
 .nut-actionsheet-modal {
-	padding: 10px;
+	padding: 13px 30px 13px;
 	margin: 0;
 	text-align: center;
 	background-color: #fff;
-	border-bottom: 1px solid $light-color;
-
-	.nut-actionsheet-title,
-	.nut-actionsheet-sub-title {
-		padding: 5px 0;
-	}
-
+	border-bottom: 1px solid rgba(230,230,230,1);
+	line-height: 22px;
 	.nut-actionsheet-title {
-		font-size: $font-size-base;
-		color: $title-color;
+		font-size: 15px;
+		font-weight: bold;
+		color: #323232;
 	}
 
 	.nut-actionsheet-sub-title {
-		font-size: $font-size-small;
-		color: $title-color;
+		font-size: 14px;
+		color: #969696;
 		margin-inline-start: 0;
+		div{
+			overflow: hidden;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+		}
 	}
 }
 
@@ -49,28 +31,46 @@
 
 .nut-actionsheet-cancel,
 .nut-actionsheet-item {
-	height: 24px;
+	height: 28px;
 	padding: 10px;
-	line-height: 24px;
-	font-size: $font-size-base;
-	color: $title-color;
+	line-height: 28px;
+	font-size: 15px;
+	color: #323232;
 	text-align: center;
 	background-color: #fff;
 }
 
 .nut-actionsheet-item {
-	border-bottom: 1px solid $light-color;
+	border-top: 1px solid rgba(230,230,230,1);
+	&:first-child{
+		border-top: 0;
+	}
 }
 
 .nut-actionsheet-item-active {
-	color: $primary-color;
+	color: $primary-color; // #E1251B
 }
 
 .nut-actionsheet-item-disabled {
-	color: #e1e1e1;
+	color: #C8C8C8;
 }
 
 .nut-actionsheet-cancel {
-	margin-top: 5px;
-	border-top: 1px solid $light-color;
+	border-top: 1px solid rgba(230,230,230,1);
+	color: #C8C8C8;
+}
+
+.nut-actionsheet-confirm {
+	padding: 12px 15px;
+	border-top: 1px solid rgba(230,230,230,1);
+	color: #FFF;
+	.confirm-btn{
+		width: 100%;
+		height: 40px;
+		background: rgba(225,37,27,1);
+		border-radius: 4px;
+		font-size: 15px;
+		line-height: 40px;
+		text-align: center;
+	}
 }

+ 49 - 48
src/packages/actionsheet/actionsheet.vue

@@ -1,52 +1,54 @@
 <template>
   <div class="nut-actionsheet">
-    <transition :name="isAnimation ? 'nutFade' : ''" v-if="isShowMask">
-      <div class="nut-actionsheet-mask" @click="clickActionSheetMask" v-show="isVisible"></div>
-    </transition>
-    <transition :name="isAnimation ? 'nutSlideUp' : ''">
-      <div class="nut-actionsheet-panel" v-show="isVisible">
-        <div class="nut-actionsheet-custom" slot-scope>
-          <slot name="custom"></slot>
-        </div>
-        <dl class="nut-actionsheet-modal" v-if="$slots.title || $slots.subTitle">
-          <dt class="nut-actionsheet-title"><slot name="title" slot-scope></slot></dt>
-          <dd class="nut-actionsheet-sub-title"><slot name="sub-title" slot-scope></slot></dd>
-        </dl>
-        <ul class="nut-actionsheet-menu">
-          <li
-            class="nut-actionsheet-item"
-            :class="{ 'nut-actionsheet-item-active': isHighlight(item), 'nut-actionsheet-item-disabled': item.disable }"
-            v-for="(item, index) of menuItems"
-            :key="index"
-            @click="chooseItem(item, index)"
-            >{{ item[optionTag] }}</li
+    <nut-popup
+      v-model="isVisiblePopup"
+      position="bottom"
+      round
+      @close="closeActionSheet" 
+      :close-on-click-overlay="isClickCloseMask"
+    > 
+        <div class="nut-actionsheet-panel">
+          <dl class="nut-actionsheet-modal" v-if="$slots.title || $slots.desc">
+            <dt class="nut-actionsheet-title">
+              <slot name="title" slot-scope></slot>
+            </dt>
+            <dd class="nut-actionsheet-sub-title">
+              <slot name="desc" slot-scope></slot>
+            </dd>
+          </dl>
+          <ul class="nut-actionsheet-menu">
+            <li
+              class="nut-actionsheet-item"
+              :class="{ 'nut-actionsheet-item-active': isHighlight(item), 'nut-actionsheet-item-disabled': item.disable }"
+              v-for="(item, index) of optionList"
+              :key="index"
+              @click="chooseItem(item, index)"
+            >{{ item[optionTag] }}</li>
+          </ul>
+          <div
+            class="nut-actionsheet-cancel"
+            v-if="isCancleBtn"
+            @click="cancelActionSheet"
+          >取消</div>
+          <div
+            class="nut-actionsheet-confirm"
+            v-if="isConfirmBtn"
+            @click="cancelActionSheet"
           >
-        </ul>
-        <div class="nut-actionsheet-cancel" v-if="cancelTxt" @click="cancelActionSheet">{{ cancelTxt }}</div>
+            <div class="confirm-btn">确定</div>
+          </div>
       </div>
-    </transition>
+  </nut-popup>
   </div>
 </template>
 <script>
 export default {
   name: 'nut-actionsheet',
   props: {
-    isAnimation: {
-      type: Boolean,
-      default: true
-    },
-    isLockBgScroll: {
-      type: Boolean,
-      default: false
-    },
     isVisible: {
       type: Boolean,
       default: false
     },
-    isShowMask: {
-      type: Boolean,
-      default: true
-    },
     isClickChooseClose: {
       type: Boolean,
       default: true
@@ -55,9 +57,13 @@ export default {
       type: Boolean,
       default: true
     },
-    cancelTxt: {
-      type: String,
-      default: ''
+    isCancleBtn: {
+      type: Boolean,
+      default: false
+    },
+    isConfirmBtn: {
+      type: Boolean,
+      default: false
     },
     optionTag: {
       type: String,
@@ -67,24 +73,19 @@ export default {
       type: String,
       default: ''
     },
-    menuItems: {
+    optionList: {
       type: Array,
       default: () => []
     }
   },
   data() {
-    return {};
+    return {
+      isVisiblePopup: false
+    };
   },
   watch: {
     isVisible(value) {
-      !!value && this.$emit('open');
-      if (this.isLockBgScroll) {
-        if (value) {
-          document.body.classList.add('nut-overflow-hidden');
-        } else {
-          document.body.classList.remove('nut-overflow-hidden');
-        }
-      }
+      this.isVisiblePopup = this.isVisible;
     }
   },
   methods: {

+ 152 - 108
src/packages/actionsheet/demo.vue

@@ -1,83 +1,113 @@
 <template>
   <div class="demo-list">
-    <h4>基本用法(选择类)</h4>
+    <h4>基础样式</h4>
     <div>
-      <nut-cell :showIcon="true" :isLink="true" @click.native="switchActionSheet('isVisible')">
-        <span slot="title"><label>性别</label></span>
-        <div slot="desc" class="selected-option">{{ sex }}</div>
+      <nut-cell 
+        :show-icon="true" 
+        title="基础样式" 
+        :desc="option" 
+        @click.native="openSwitch('isVisible')">
       </nut-cell>
-      <nut-cell :showIcon="true" :isLink="true" @click.native="switchActionSheet('isVisible1')">
-        <span slot="title"><label>性别</label></span>
-        <span slot="sub-title">带取消按钮~~~~</span>
-        <div slot="desc" class="selected-option">{{ sex1 }}</div>
+      <nut-actionsheet 
+        :is-visible="isVisible"
+        @close="closeSwitch('isVisible')" 
+        :option-list="optionList" 
+        @choose="choose"
+      ></nut-actionsheet>
+
+      <nut-cell 
+        :show-icon="true" 
+        title="带取消按钮" 
+        :desc="option1" 
+        @click.native="openSwitch('isVisible1')">
       </nut-cell>
-      <nut-cell :showIcon="true" :isLink="true" @click.native="switchActionSheet('isVisible2')">
-        <span slot="title"><label>性别</label></span>
-        <span slot="sub-title">高亮选中项~~~~</span>
-        <div slot="desc" class="selected-option">{{ sex2 }}</div>
+      <nut-actionsheet
+        :is-visible="isVisible1"
+        @close="closeSwitch('isVisible1')"
+        :is-cancle-btn="true"
+        :option-list="optionList" 
+        @choose="choose1"
+      ></nut-actionsheet>
+
+      <nut-cell 
+        :show-icon="true" 
+        title="展示标题" 
+        :desc="option2" 
+        @click.native="openSwitch('isVisible2')">
       </nut-cell>
-      <nut-cell :showIcon="true" :isLink="true" @click.native="switchActionSheet('isVisible3')">
-        <span slot="title"><label>性别</label></span>
-        <span slot="sub-title">设置禁用状态~~~~</span>
-        <div slot="desc" class="selected-option">{{ sex3 }}</div>
+      <nut-actionsheet
+        :is-visible="isVisible2"
+        @close="closeSwitch('isVisible2')"
+        :is-cancle-btn="true"
+        :option-list="optionList" 
+        @choose="choose2"
+      >
+        <div slot="title">面板标题</div>
+      </nut-actionsheet>
+
+      <nut-cell 
+        :show-icon="true" 
+        title="展示描述信息" 
+        :desc="option3" 
+        @click.native="openSwitch('isVisible3')">
       </nut-cell>
+      <nut-actionsheet
+        :is-visible="isVisible3"
+        @close="closeSwitch('isVisible3')"
+        :is-cancle-btn="true"
+        :option-list="optionList" 
+        @choose="choose3"
+      >
+        <div slot="desc">这里是一段描述,一段描述,一段描述,一段描述</div>
+      </nut-actionsheet>
+
     </div>
-    <h4>提示类</h4>
+    <h4>其他样式</h4>
     <div>
-      <nut-cell :isLink="true" @click.native="switchActionSheet('isVisible4')">
-        <span slot="title"><label>我就列表测试数据</label></span>
-        <span slot="sub-title">我是描述~~~~</span>
-        <div slot="desc" class="selected-option">删除本条</div>
+      <nut-cell 
+        :show-icon="true" 
+        title="带确认按钮" 
+        :desc="option4" 
+        @click.native="openSwitch('isVisible4')">
       </nut-cell>
-    </div>
-    <h4>自定义类</h4>
-    <div>
-      <nut-cell :isLink="true" @click.native="switchActionSheet('isVisible5')">
-        <span slot="title"><label>内容自定义</label></span>
-        <div slot="desc" class="selected-option">打开</div>
+      <nut-actionsheet
+        :is-visible="isVisible4"
+        @close="closeSwitch('isVisible4')"
+        :is-confirm-btn="true"
+        :option-list="optionList" 
+        @choose="choose4"
+      >
+        <div slot="title">面板标题</div>
+      </nut-actionsheet>
+
+      <nut-cell 
+        :show-icon="true" 
+        title="设置禁用状态" 
+        :desc="option5" 
+        @click.native="openSwitch('isVisible5')">
       </nut-cell>
+      <nut-actionsheet
+        :is-visible="isVisible5"
+        :option-list="optionListDis" 
+        @close="closeSwitch('isVisible5')"
+        @choose="choose5"
+      ></nut-actionsheet>
+
+      <nut-cell 
+        :show-icon="true" 
+        title="高亮选中项" 
+        :desc="option6" 
+        @click.native="openSwitch('isVisible6')">
+      </nut-cell>
+      <nut-actionsheet
+        :is-visible="isVisible6"
+        :option-list="optionList" 
+        :chooseTagValue="option6"
+        @close="closeSwitch('isVisible6')"
+        @choose="choose6"
+      ></nut-actionsheet>
+
     </div>
-    <!-- demo -->
-    <nut-actionsheet :is-visible="isVisible" @close="switchActionSheet('isVisible')" :menu-items="menuItems" @choose="chooseItem"></nut-actionsheet>
-    <!-- demo(带取消按钮) -->
-    <nut-actionsheet
-      :is-visible="isVisible1"
-      @close="switchActionSheet('isVisible1')"
-      cancelTxt="取消"
-      :menu-items="menuItems2"
-      @choose="chooseItemAgeSpec"
-    ></nut-actionsheet>
-    <!-- demo(高亮选中)-->
-    <nut-actionsheet
-      :is-visible="isVisible2"
-      :menu-items="menuItems2"
-      :chooseTagValue="sex2"
-      @close="switchActionSheet('isVisible2')"
-      @choose="chooseItemAge"
-    ></nut-actionsheet>
-    <!-- demo(设置禁用状态)-->
-    <nut-actionsheet
-      :is-visible="isVisible3"
-      :menu-items="menuItems3"
-      @close="switchActionSheet('isVisible3')"
-      @choose="chooseItemConstellation"
-    ></nut-actionsheet>
-    <!-- demo 提示类 -->
-    <nut-actionsheet
-      :is-visible="isVisible4"
-      :menu-items="menuItems4"
-      :chooseTagValue="`确定`"
-      cancelTxt="取消"
-      @close="switchActionSheet('isVisible4')"
-    >
-      <span slot="title"><label>确定删除吗?</label></span>
-      <span slot="sub-title">删除之后不能,描述信息,删除之后不能,描述信息</span>
-    </nut-actionsheet>
-    <!-- demo 自定义类 -->
-    <nut-actionsheet :is-visible="isVisible5" @close="switchActionSheet('isVisible5')">
-      <div slot="custom" class="custom-wrap"><span>自定义</span></div>
-    </nut-actionsheet>
-    <div style="height: 400px;"></div>
   </div>
 </template>
 
@@ -85,75 +115,89 @@
 export default {
   data() {
     return {
-      sex: '请选择',
+      option: '',
       isVisible: false,
-      menuItems: [
+      option1: '',
+      isVisible1: false,
+      option2: '',
+      isVisible2: false,
+      option3: '',
+      isVisible3: false,
+      option4: '',
+      isVisible4: false,
+      option5: '',
+      isVisible5: false,
+      option6: '选项B',
+      isVisible6: false,
+      optionList: [
         {
-          name: '男',
+          name: '选项A',
           value: 0
         },
         {
-          name: '女',
+          name: '选项B',
           value: 1
-        }
-      ],
-      sex1: '请选择',
-      isVisible1: false,
-      sex2: '请选择',
-      isVisible2: false,
-      menuItems2: [
-        {
-          name: '男',
-          value: 0
         },
         {
-          name: '',
+          name: '选项C',
           value: 1
         }
       ],
-      sex3: '请选择',
-      isVisible3: false,
-      menuItems3: [
+      optionListDis: [
         {
-          name: '男',
-          value: 0,
-          disable: false
+          name: '选项A',
+          value: 0
         },
         {
-          name: '',
+          name: '选项B',
           value: 1,
           disable: true
-        }
-      ],
-      isVisible4: false,
-      menuItems4: [
+        },
         {
-          name: '确定'
+          name: '选项C',
+          value: 1
         }
-      ],
-      isVisible5: false
+      ]
     };
   },
   methods: {
-    switchActionSheet(param) {
-      this[`${param}`] = !this[`${param}`];
+    openSwitch(param) {
+      this[`${param}`] = true;
     },
 
-    chooseItem(itemParams) {
-      this.sex = itemParams.name;
+    closeSwitch(param) {
+      console.log('关闭');
+      this[`${param}`] = false;
     },
 
-    chooseItemAgeSpec(itemParams) {
-      this.sex1 = itemParams.name;
+    // demo 1
+    choose(itemParams) {
+      this.option = itemParams.name;
     },
 
-    chooseItemAge(itemParams) {
-      this.sex2 = itemParams.name;
+    choose1(itemParams) {
+      this.option1 = itemParams.name;
     },
 
-    chooseItemConstellation(itemParams) {
-      this.sex3 = itemParams.title;
-    }
+    choose2(itemParams) {
+      this.option2 = itemParams.name;
+    },
+
+    choose3(itemParams) {
+      this.option3 = itemParams.name;
+    },
+
+    choose4(itemParams) {
+      this.option4 = itemParams.name;
+    },
+
+    choose5(itemParams) {
+      this.option5 = itemParams.name;
+    },
+
+    choose6(itemParams) {
+      this.option6 = itemParams.name;
+    },
   }
 };
 </script>

+ 329 - 185
src/packages/actionsheet/doc.md

@@ -2,274 +2,418 @@
 
 从底部弹出的动作菜单面板。
 
-## 基本用法(选择类)
+## 基础样式
 
-默认
+基础样式
 ```html
-<div @click.native="switchActionSheet">
-    <span class="title"><label>性别</label></span>
-    <span class="selected-option">{{sex}}</span>
-</div>
-<nut-actionsheet :is-visible="isVisible" 
-    @close="switchActionSheet"
-    :menu-items="menuItems"
-    @choose="chooseItem"
+<nut-cell 
+    :show-icon="true" 
+    title="基础样式" 
+    :desc="option" 
+    @click.native="openSwitch('isVisible')">
+</nut-cell>
+<nut-actionsheet 
+    :is-visible="isVisible"
+    @close="closeSwitch('isVisible')" 
+    :option-list="optionList" 
+    @choose="choose"
 ></nut-actionsheet>
 ```
 ```javascript
 export default {
-    data() {
-        return {
-            sex: '请选择',
-            isVisible: false,
-            menuItems: [
-                {
-                    'name': '男',
-                    'value': 0
-                },
-                {
-                    'name': '女',
-                    'value': 1
-                }
-            ]
-        };
-    },
-    methods: {
-        switchActionSheet() {
-            this.isVisible = !this.isVisible;
+  data() {
+    return {
+      option: '',
+      isVisible: false,
+      optionList: [
+        {
+          name: '选项A',
+          value: 0
         },
-
-        chooseItem(itemParams) {
-            this.sex = itemParams.name;
+        {
+          name: '选项B',
+          value: 1
+        },
+        {
+          name: '选项C',
+          value: 1
         }
+      ]
+    };
+  },
+  methods: {
+    openSwitch(param) {
+      this[`${param}`] = true;
+    },
+
+    closeSwitch(param) {
+      this[`${param}`] = false;
+    },
+
+    choose(itemParams) {
+      this.option = itemParams.name;
     }
+  }
 };
 ```
 
 带取消按钮
 ```html
-<div @click.native="switchActionSheet">
-    <span class="title"><label>性别</label></span>
-    <span class="selected-option">{{sex}}</span>
-</div>
- <nut-actionsheet :is-visible="isVisible" 
-    @close="switchActionSheet"
-    :menu-items="menuItems"
-    @choose="chooseItem"
-    cancelTxt="取消"
+<nut-cell 
+    :show-icon="true" 
+    title="带取消按钮" 
+    :desc="option" 
+    @click.native="openSwitch('isVisible')">
+</nut-cell>
+<nut-actionsheet 
+    :is-visible="isVisible"
+    @close="closeSwitch('isVisible')" 
+    :is-cancle-btn="true"
+    :option-list="optionList" 
+    @choose="choose"
 ></nut-actionsheet>
 ```
 ```javascript
 export default {
-    data() {
-        return {
-            sex: '请选择',
-            isVisible: false,
-            menuItems: [
-                {
-                    'name': '男',
-                    'value': 0
-                },
-                {
-                    'name': '女',
-                    'value': 1
-                }
-            ]
-        };
-    },
-    methods: {
-        switchActionSheet() {
-            this.isVisible = !this.isVisible;
+  data() {
+    return {
+      option: '',
+      isVisible: false,
+      optionList: [
+        {
+          name: '选项A',
+          value: 0
         },
-
-        chooseItem(itemParams) {
-            this.sex = itemParams.name;
+        {
+          name: '选项B',
+          value: 1
+        },
+        {
+          name: '选项C',
+          value: 1
         }
+      ]
+    };
+  },
+  methods: {
+    openSwitch(param) {
+      this[`${param}`] = true;
+    },
+
+    closeSwitch(param) {
+      this[`${param}`] = false;
+    },
+
+    choose(itemParams) {
+      this.option = itemParams.name;
     }
+  }
 };
 ```
 
-高亮已选项
+展示标题
 ```html
-<div @click.native="switchActionSheet">
-    <span class="title"><label>性别</label></span>
-    <span class="selected-option">{{sex}}</span>
-</div>
-<nut-actionsheet :is-visible="isVisible" 
-    @close="switchActionSheet"
-    :menu-items="menuItems"
-    @choose="chooseItem"
-    :chooseTagValue="sex"
-></nut-actionsheet>
+<nut-cell 
+    :show-icon="true" 
+    title="展示标题" 
+    :desc="option" 
+    @click.native="openSwitch('isVisible')">
+</nut-cell>
+<nut-actionsheet 
+    :is-visible="isVisible"
+    @close="closeSwitch('isVisible')" 
+    :is-cancle-btn="true"
+    :option-list="optionList" 
+    @choose="choose"
+>
+    <div slot="title">面板标题</div>
+</nut-actionsheet>
 ```
 ```javascript
 export default {
-    data() {
-        return {
-            sex: '请选择',
-            isVisible: false,
-            menuItems: [
-                {
-                    'name': '男',
-                    'value': 0
-                },
-                {
-                    'name': '女',
-                    'value': 1
-                }
-            ]
-        };
-    },
-    methods: {
-        switchActionSheet() {
-            this.isVisible = !this.isVisible;
+  data() {
+    return {
+      option: '',
+      isVisible: false,
+      optionList: [
+        {
+          name: '选项A',
+          value: 0
         },
-
-        chooseItem(itemParams) {
-            this.sex = itemParams.name;
+        {
+          name: '选项B',
+          value: 1
+        },
+        {
+          name: '选项C',
+          value: 1
         }
+      ]
+    };
+  },
+  methods: {
+    openSwitch(param) {
+      this[`${param}`] = true;
+    },
+
+    closeSwitch(param) {
+      this[`${param}`] = false;
+    },
+
+    choose(itemParams) {
+      this.option = itemParams.name;
     }
+  }
 };
 ```
 
-设置禁用状态
+
+展示描述信息
 ```html
-<div @click.native="switchActionSheet">
-    <span class="title"><label>性别</label></span>
-    <span class="selected-option">{{sex}}</span>
-</div>
-<nut-actionsheet :is-visible="isVisible" 
-    @close="switchActionSheet"
-    :menu-items="menuItems"
-    @choose="chooseItem"
-    :chooseTagValue="sex"
-></nut-actionsheet>
+<nut-cell 
+    :show-icon="true" 
+    title="展示描述信息" 
+    :desc="option" 
+    @click.native="openSwitch('isVisible')">
+</nut-cell>
+<nut-actionsheet 
+    :is-visible="isVisible"
+    @close="closeSwitch('isVisible')" 
+    :is-cancle-btn="true"
+    :option-list="optionList" 
+    @choose="choose"
+>
+    <div slot="desc">这里是一段描述,一段描述,一段描述,一段描述</div>
+</nut-actionsheet>
 ```
 ```javascript
 export default {
-    data() {
-        return {
-            sex: '请选择',
-            isVisible: false,
-            menuItems: [
-                {
-                    'name': '男',
-                    'value': 0,
-                    'disable': false
-                },
-                {
-                    'name': '女',
-                    'value': 1,
-                    'disable': true
-                }
-            ]
-        };
-    },
-    methods: {
-        switchActionSheet() {
-            this.isVisible = !this.isVisible;
+  data() {
+    return {
+      option: '',
+      isVisible: false,
+      optionList: [
+        {
+          name: '选项A',
+          value: 0
         },
-
-        chooseItem(itemParams) {
-            this.sex = itemParams.name;
+        {
+          name: '选项B',
+          value: 1
+        },
+        {
+          name: '选项C',
+          value: 1
         }
+      ]
+    };
+  },
+  methods: {
+    openSwitch(param) {
+      this[`${param}`] = true;
+    },
+
+    closeSwitch(param) {
+      this[`${param}`] = false;
+    },
+
+    choose(itemParams) {
+      this.option = itemParams.name;
     }
+  }
 };
 ```
 
-## 提示
+## 其他样式
+
+带确认按钮
 ```html
-<div @click.native="switchActionSheet">
-    <span class="title"><label>我就列表测试数据</label></span>
-    <span class="sub-title">我是描述~~~~</span>
-    <div class="selected-option">删除本条</div>
-</div>
-<nut-actionsheet :is-visible="isVisible" 
-    :menu-items="menuItems4" 
-    chooseTagValue="确定"
-    cancelTxt="取消"
-    @close="switchActionSheet"
-    @choos="choose"
+<nut-cell 
+    :show-icon="true" 
+    title="带确认按钮" 
+    :desc="option" 
+    @click.native="openSwitch('isVisible')">
+</nut-cell>
+<nut-actionsheet 
+    :is-visible="isVisible"
+    @close="closeSwitch('isVisible')" 
+    :is-confirm-btn="true"
+    :option-list="optionList" 
+    @choose="choose"
 >
-    <span slot="title"><label>确定删除吗?</label></span>
-    <span slot="sub-title">删除之后不能,描述信息,删除之后不能,描述信息</span>
+    <div slot="title">面板标题</div>
 </nut-actionsheet>
 ```
 ```javascript
 export default {
-    data() {
-        return {
-            sex: '请选择',
-            isVisible: false,
-            menuItems: [
-                {
-                     'name': '确定'
-                }
-            ]
-        };
-    },
-    methods: {
-        switchActionSheet() {
-            this.isVisible = !this.isVisible;
+  data() {
+    return {
+      option: '',
+      isVisible: false,
+      optionList: [
+        {
+          name: '选项A',
+          value: 0
         },
-
-        choose(itemParams) {
-            
+        {
+          name: '选项B',
+          value: 1
+        },
+        {
+          name: '选项C',
+          value: 1
         }
+      ]
+    };
+  },
+  methods: {
+    openSwitch(param) {
+      this[`${param}`] = true;
+    },
+
+    closeSwitch(param) {
+      this[`${param}`] = false;
+    },
+
+    choose(itemParams) {
+      this.option = itemParams.name;
     }
+  }
 };
 ```
 
-## 自定义内容
+带确认按钮
 ```html
-<div @click.native="switchActionSheet">
-    <span class="title"><label>内容自定义</label></span>
-    <div class="selected-option">打开</div>
-</div>
-<nut-actionsheet :is-visible="isVisible" 
-    @close="switchActionSheet"
+<nut-cell 
+    :show-icon="true" 
+    title="设置禁用状态" 
+    :desc="option" 
+    @click.native="openSwitch('isVisible')">
+</nut-cell>
+<nut-actionsheet 
+    :is-visible="isVisible"
+    @close="closeSwitch('isVisible')" 
+    :option-list="optionList" 
+    @choose="choose"
 >
-    <div slot="custom" class="custom-wrap"><span>自定义</span></div>
 </nut-actionsheet>
 ```
 ```javascript
-
 export default {
-    data() {
-        return {
-            isVisible: false
-        }   
+  data() {
+    return {
+      option: '',
+      isVisible: false,
+      optionList: [
+        {
+          name: '选项A',
+          value: 0
+        },
+        {
+          name: '选项B',
+          value: 1,
+          disable: true
+        },
+        {
+          name: '选项C',
+          value: 1
+        }
+      ]
+    };
+  },
+  methods: {
+    openSwitch(param) {
+      this[`${param}`] = true;
     },
-    methods: {
-        switchActionSheet() {
-            this.isVisible = !this.isVisible;
+
+    closeSwitch(param) {
+      this[`${param}`] = false;
+    },
+
+    choose(itemParams) {
+      this.option = itemParams.name;
+    }
+  }
+};
+```
+
+高亮选中项
+```html
+<nut-cell 
+    :show-icon="true" 
+    title="高亮选中项" 
+    :desc="option" 
+    @click.native="openSwitch('isVisible')">
+</nut-cell>
+<nut-actionsheet 
+    :is-visible="isVisible"
+    @close="closeSwitch('isVisible')" 
+    :chooseTagValue="option6"
+    :option-list="optionList" 
+    @choose="choose"
+>
+</nut-actionsheet>
+```
+```javascript
+export default {
+  data() {
+    return {
+      option: '',
+      isVisible: false,
+      optionList: [
+        {
+          name: '选项A',
+          value: 0
+        },
+        {
+          name: '选项B',
+          value: 1,
+          disable: true
+        },
+        {
+          name: '选项C',
+          value: 1
         }
+      ]
+    };
+  },
+  methods: {
+    openSwitch(param) {
+      this[`${param}`] = true;
+    },
+
+    closeSwitch(param) {
+      this[`${param}`] = false;
+    },
+
+    choose(itemParams) {
+      this.option = itemParams.name;
     }
+  }
 };
 ```
 
+
+
 ## Prop
 
 | 字段 | 说明 | 类型 | 默认值
 |----- | ----- | ----- | ----- 
-| is-animation | 是否开启动画 | Boolean | true
-| is-lock-bg-scroll | 是否锁定背景滚动 | Boolean | false
 | is-visible | 是否可见 | Boolean | false
-| is-show-mask | 是否显示背景遮罩 | Boolean | true
 | is-click-choose-close | 是否点击列表项后立即关闭 | Boolean | true
 | is-click-close-mask | 是否点击mask蒙层关闭 | Boolean | true
-| cancel-txt | 取消文案 | String | '取消'
+| isCancelBtn | 是否有确认按钮 | Boolean | false
+| isConfirmBtn | 是否有确认按钮 | Boolean | false
 | choose-tag-value | 已选值,如果填写,高亮显示 | String | -
-| menu-items | 列表项 | Array | [ ]
+| option-list | 列表项 | Array | [ ]
 | option-tag | 设置列表项展示使用参数 | String | 'name'
 
 ## Slot
 
 | 名称 | 说明 
 |----- | ----- 
-| custom | 自定义内容
 | title | 自定义标题
-| subTitle | 自定义副标题  
+| desc | 自定义描述
 
 ## Event