Browse Source

upd: actionsheet shortpassword taro doc (#517)

* fix: checkbox间距调整,官网案例样式调整

* fix: checkbox样式调整

* fix: taro drag

* fix: taro drag doc

* fix: checkbox间距调整

* upd: actionsheet shortpassword taro doc
Drjingfubo 4 years ago
parent
commit
bdf464ac92

+ 0 - 2
src/config.json

@@ -161,7 +161,6 @@
         {
           "name": "ActionSheet",
           "taro": true,
-          "tarodoc": true,
           "sort": "1",
           "cName": "动作面板",
           "type": "component",
@@ -607,7 +606,6 @@
           "version": "3.0.0",
           "name": "ShortPassword",
           "taro": true,
-          "tarodoc": true,
           "type": "component",
           "cName": "短密码",
           "desc": "短密码组件",

+ 15 - 0
src/packages/__VUE/actionsheet/doc.md

@@ -1,7 +1,22 @@
 # ActionSheet 动作面板
 
+
+### 介绍
 从底部弹出的动作菜单面板。
 
+### 安装
+
+``` javascript
+import { createApp } from 'vue';
+//vue
+import { ActionSheet } from '@nutui/nutui';
+//mp
+import { ActionSheet } from '@nutui/nutui@taro';
+
+const app = createApp();
+app.use(ActionSheet);
+```
+
 ## 基本用法
 
 默认

+ 0 - 113
src/packages/__VUE/actionsheet/doc.taro.md

@@ -1,113 +0,0 @@
-# ActionSheet 动作面板
-
-从底部弹出的动作菜单面板。
-
-## 基本用法
-
-默认
-``` html
-<div @click="switchActionSheet">
-   <span><label>基础用法</label></span>
-   <div class="selected-option" v-html="state.val"></div>
-</div>
-<nut-actionsheet
-  v-model:visible="state.isVisible"
-  :menu-items="menuItems"
-  @choose="chooseItem"
-></nut-actionsheet>
-```
-
-## 展示取消按钮
-```html
-<div @click="switchActionSheet">
-  <span><label>展示取消按钮</label></span>
-  <div class="selected-option" v-html="state.val"></div>
-</div>
-<nut-actionsheet v-model:visible="isVisible" 
-  @close="switchActionSheet"
-  :menu-items="menuItems"
-  @choose="chooseItem"
-  cancel-txt="取消"
-></nut-actionsheet>
-```
-## 展示描述信息
-```html
-<div @click.native="switchActionSheet">
-   <span><label>展示取消按钮</label></span>
-    <div class="selected-option" v-html="state.val"></div>
-</div>
- <nut-actionsheet v-model:visible="isVisible" 
-    @close="switchActionSheet"
-    description="state.desc"
-    :menu-items="menuItems"
-    @choose="chooseItem"
-    cancel-txt="取消"
-></nut-actionsheet>
-```
-
-## 选项状态
-```html
-<div @click.native="switchActionSheet">
-    <span class="title"><label>性别</label></span>
-    <span class="selected-option" v-html="sex"></span>
-</div>
-<nut-actionsheet
-@close="switchActionSheet"
-  v-model:visible="state.isVisible4"
-  cancel-txt="取消"
-  :menu-items="menuItemsThree"
-></nut-actionsheet>
-```
-
-```javascript
-setup() {
-    const state = reactive({
-      isVisible: false,
-      value: '',
-      desc: '这是一段描述信息'
-    });
-    const menuItems = [
-      {
-        name: '选项一',
-        value: 0
-      },
-      {
-        name: '选项二',
-        value: 1
-      },
-      {
-        name: '选项三',
-        value: 2
-      }
-    ];
-     const switchActionSheet = () => {
-       state.isVisible = !state.isVisible
-    };
-    const chooseItem = (item,index) => {
-      console.log(item,index);
-    };
-
-```
-
-## Prop
-
-| 字段             | 说明                                   | 类型    | 默认值    |
-|------------------|----------------------------------------|---------|-----------|
-| cancel-txt       | 取消文案                               | String  | '取消'    |
-| menu-items       | 列表项                                 | Array   | [ ]       |
-| option-tag       | 设置列表项展示使用参数                 | String  | 'name'    |
-| v-model:visible       | 遮罩层可见                             | Boolean | false     |
-| option-sub-tag   | 设置列表项描述展示使用参数             | String  | 'subname' |
-| choose-tag-value | 设置选中项的值,和'option-tag'的值对应 | String  | ''        |
-| title            | 设置列表项标题                         | String  | ''        |
-| description      | 设置列表项副标题/描述                  | String  | ''        |
-| color            | 高亮颜色                               | String  | '#ee0a24' |
-| close-abled      | 遮罩层是否可关闭                       | Boolean | true      |
-
-
-## Event
-
-| 字段   | 说明               | 回调参数                          |
-|--------|--------------------|-----------------------------------|
-| choose | 选择之后触发       | 选中列表项item, 选中的索引值index |
-| cancel | 点击取消文案时触发 | 无                                |

+ 3 - 0
src/packages/__VUE/shortpassword/doc.md

@@ -7,7 +7,10 @@
 
 ``` javascript
 import { createApp } from 'vue';
+//vue
 import { ShortPassword } from '@nutui/nutui';
+//mp
+import { ShortPassword } from '@nutui/nutui@taro';
 
 const app = createApp();
 app.use(ShortPassword);

+ 0 - 121
src/packages/__VUE/shortpassword/doc.taro.md

@@ -1,121 +0,0 @@
-# ShortPassword 短密码组件
-
-### 介绍
-
-短密码输入框,可用于输入密码、短信验证码等
-### 安装
-
-``` javascript
-import { createApp } from 'vue';
-import { ShortPassword } from '@nutui/nutui';
-
-const app = createApp();
-app.use(ShortPassword);
-
-```
-
-## 代码示例
-
-### 公用片段
-
-``` html
-<nut-shortpassword
-  v-model="state.value"
-  v-model:visible="state.visible"
-  :no-button="state.noButton"
-  :length="state.length"
-  :error-msg="state.errorMsg"
-  @change="methods.onChange"
-  @complete="methods.onComplete"
-  @ok="methods.onOk"
-  @tips="methods.onTips">
-</nut-shortpassword>
-```
-
-``` javascript
-import { reactive, getCurrentInstance } from 'vue';
-setup() {
-  let { proxy } = getCurrentInstance();
-  const state = reactive({
-    visible: false,
-    noButton: true,
-    value: '',
-    errorMsg: '',
-    length: 6
-  });
-  const methods = {
-    onChange(val: string) {
-      val && proxy.$toast.text(val);
-    },
-    onOk(val: string) {
-      val && proxy.$toast.text(val);
-      state.visible = false;
-    },
-    onComplete() {
-      
-    },
-    onTips() {
-      proxy.$toast.text('执行忘记密码逻辑');
-    }
-  };
-  return {
-    state,
-    methods
-  };
-}
-
-```
-### 基础用法
-
-``` html
-<nut-cell title="基础用法" is-link @click="state.visible = true;"></nut-cell>
-```
-
-### 显示按钮组
-
-``` html
-<nut-cell title="显示按钮组" is-link @click="state.visible = true;state.noButton = false;"></nut-cell>
-```
-
-### 自定义密码长度4
-
-``` html
-<nut-cell title="自定义密码长度4" is-link @click="state.visible = true;state.length = 4;"></nut-cell>
-```
-### 忘记密码提示语事件回调
-
-``` html
-<nut-cell title="忘记密码提示语事件回调" is-link @click="state.visible = true;"></nut-cell>
-```
-
-### 错误提示语
-``` html
-<nut-cell title="错误提示语" is-link @click="state.visible = true;state.errorMsg = '请输入正确密码';"></nut-cell>
-```
-
-### Prop
-
-
-| 字段                   | 说明                | 类型           | 默认值                       |
-|------------------------|---------------------|----------------|------------------------------|
-| v-model                | 密码初始值          | String         |                              |
-| v-model:visible        | 是否展示短密码框    | Boolean        | false                        |
-| title                  | 标题                | String         | 请输入密码                   |
-| desc                   | 密码框描述          | String         | 您使用了虚拟资产,请进行验证 |
-| tips                   | 提示语              | String         | 忘记密码                     |
-| close-on-click-overlay | 是否点击遮罩关闭    | Boolean        | true                         |
-| no-button              | 是否隐藏底部按钮    | Boolean        | true                         |
-| length                 | 密码长度,取值为4~6 | String、Number | 6                            |
-| error-msg              | 错误信息提示        | String         | ''                           |
-
-
-### Event
-
-| 事件名称 | 说明                   | 回调参数 |
-|----------|------------------------|----------|
-| change   | 输入密码时触发事件     |  当前输入框值value    |
-| ok       | 点击确实时触发事件     | 当前输入框值value    |
-| cancel   | 点击取消时触发事件     | -    |
-| close    | 点击关闭图标时触发事件 | -    |
-| complete | 输入完成的回调         | 当前输入框值value    |
-