Browse Source

upd: update docs

suzigang 3 years ago
parent
commit
c7f3d66838

+ 6 - 6
src/packages/__VUE/input/doc.en-US.md

@@ -389,12 +389,12 @@ After setting the `maxlength` and `show-word-limit` attributes, word count will
 
 | Event   | Description      | Arguments    |
 |--------|----------------|-------------|
-| update:model-value | Emitted when input value changed | val  |
-| focus  | Emitted when input is focused     | event |
-| blur   | Emitted when input is blurred     | event  |
-| clear  | Emitted when the clear icon is clicked   | event  |
-| click  | Emitted when component is clicked	      | event  |
-| click-input      | Emitted when the input is clicked      | event  |
+| update:model-value | Emitted when input value changed | `val`  |
+| focus  | Emitted when input is focused     | `event` |
+| blur   | Emitted when input is blurred     | `event`  |
+| clear  | Emitted when the clear icon is clicked   | `event`  |
+| click  | Emitted when component is clicked	      | `event`  |
+| click-input      | Emitted when the input is clicked      | `event`  |
 
 ### Slots
 | Name  | Description     | 

+ 7 - 7
src/packages/__VUE/input/doc.md

@@ -181,7 +181,7 @@ app.use(Input);
 
 ### 配合表单使用
 
-结合nut-form与nut-form-item使用
+结合 `nut-form`  `nut-form-item` 使用
 
 :::demo
 
@@ -408,12 +408,12 @@ app.use(Input);
 
 | 事件名   | 说明           | 回调参数    |
 |--------|----------------|-------------|
-| update:model-value | 输入框内容变化时触发 | val  |
-| focus  | 输入框聚焦时触发     | event |
-| blur   | 输入框失焦时触发     | event  |
-| clear  | 点击清除按钮时触发   | event  |
-| click  | 点击组件时触发      | event  |
-| click-input      | 点击输入区域时触发      | event  |
+| update:model-value | 输入框内容变化时触发 | `val`  |
+| focus  | 输入框聚焦时触发     | `event` |
+| blur   | 输入框失焦时触发     | `event`  |
+| clear  | 点击清除按钮时触发   | `event`  |
+| click  | 点击组件时触发      | `event`  |
+| click-input      | 点击输入区域时触发      | `event`  |
 ### Slots
 | 名称  | 说明     | 
 |-------|----------|

+ 8 - 8
src/packages/__VUE/input/doc.taro.md

@@ -165,7 +165,7 @@ app.use(Input);
 
 ### 配合表单使用
 
-结合nut-form与nut-form-item使用
+结合 `nut-form`  `nut-form-item` 使用
 
 :::demo
 
@@ -388,18 +388,18 @@ app.use(Input);
 | format-trigger | 格式化函数触发的时机,可选值为 `onChange`、`onBlur` | string | - |
 | confirm-type | 键盘右下角按钮的文字,仅在`type='text'`时生效,可选值 `send`:发送、`search`:搜索、`next`:下一个、`go`:前往、`done`:完成 | string |   `done`   |
 | adjust-position | 键盘弹起时,是否自动上推页面     | boolean | `true` |
-| always-system | 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,`confirm-type`、`confirm-hold` 可能失效    | boolean | `false` |
+| always-system | 是否强制使用系统键盘和 `Web-view` 创建的 `input` 元素。为 `true` 时,`confirm-type`、`confirm-hold` 可能失效    | boolean | `false` |
 
 ### Events
 
 | 事件名   | 说明           | 回调参数    |
 |--------|----------------|-------------|
-| update:model-value | 输入框内容变化时触发 | val  |
-| focus  | 输入框聚焦时触发     | event |
-| blur   | 输入框失焦时触发     | event  |
-| clear  | 点击清除按钮时触发   | event  |
-| click  | 点击组件时触发      | event  |
-| click-input      | 点击输入区域时触发      | event  |
+| update:model-value | 输入框内容变化时触发 | `val`  |
+| focus  | 输入框聚焦时触发     | `event` |
+| blur   | 输入框失焦时触发     | `event`  |
+| clear  | 点击清除按钮时触发   | `event`  |
+| click  | 点击组件时触发      | `event`  |
+| click-input      | 点击输入区域时触发      | `event`  |
 
 ### Slots
 | 名称  | 说明     | 

+ 5 - 5
src/packages/__VUE/radio/demo.vue

@@ -121,11 +121,11 @@ export default createDemo({
   setup() {
     initTranslate();
     const data = reactive({
-      radioVal: 1,
-      radioVal2: 2,
-      radioVal3: 1,
-      radioVal4: 1,
-      radioVal5: 1,
+      radioVal: '1',
+      radioVal2: '2',
+      radioVal3: '1',
+      radioVal4: '1',
+      radioVal5: '1',
       radioVal6: '1'
     });
     const handleChange = (value: any) => {

+ 4 - 1
src/packages/__VUE/radio/doc.en-US.md

@@ -160,8 +160,12 @@ Customize the icon through the slot, it is recommended to set the `icon` and `ch
 </template>
 <script lang="ts">
   import { ref } from 'vue';
+  import { Checklist } from '@nutui/icons-vue';
   export default {
     props: {},
+    components: {
+      Checklist
+    },
     setup() {
       const radioVal = ref('1');
       return { radioVal };
@@ -253,5 +257,4 @@ The component provides the following CSS variables, which can be used to customi
 |  --nut-radio-label-font-size|  _14px_  |
 |  --nut-radio-button-font-size|  _12px_  |
 |  --nut-radio-button-padding|  _5px 18px_  |
-|  --nut-radio-icon-font-size|  _18px_  |
 |  --nut-radio-icon-disable-color2|  _var(--nut-help-color)_  |

+ 6 - 3
src/packages/__VUE/radio/doc.md

@@ -135,7 +135,7 @@ app.use(Checklist);
 
 ### 自定义图标
 
-通过slot自定义图标,建议同时设置`icon`和`checkedIcon`两个插槽
+通过 `slot` 自定义图标,建议同时设置`icon`和`checkedIcon`两个插槽
 
 :::demo
 
@@ -160,8 +160,12 @@ app.use(Checklist);
 </template>
 <script lang="ts">
   import { ref } from 'vue';
+  import { Checklist } from '@nutui/icons-vue';
   export default {
     props: {},
+    components: {
+      Checklist
+    },
     setup() {
       const radioVal = ref('1');
       return { radioVal };
@@ -213,7 +217,7 @@ app.use(Checklist);
 | disabled         | 是否禁用选择                                                 | boolean                 | `false`           |
 | icon-size        | [图标尺寸](#/zh-CN/component/icon)                                           | string \| number          | `18`              |
 | label            | 单选框标识                                                   | string \| number \| boolean | -                 |
-| shape            | 形状,可选值为 button、round                                 | string                  | `round`             |
+| shape            | 形状,可选值为 `button``round`                                 | string                  | `round`             |
 
 ### Radio Slots
 | 名称 | 说明 |
@@ -253,5 +257,4 @@ app.use(Checklist);
 |  --nut-radio-label-font-size|  _14px_  |
 |  --nut-radio-button-font-size|  _12px_  |
 |  --nut-radio-button-padding|  _5px 18px_  |
-|  --nut-radio-icon-font-size|  _18px_  |
 |  --nut-radio-icon-disable-color2|  _var(--nut-help-color)_  |

+ 5 - 2
src/packages/__VUE/radio/doc.taro.md

@@ -135,7 +135,7 @@ app.use(Checklist);
 
 ### 自定义图标
 
-通过slot自定义图标,建议同时设置`icon`和`checkedIcon`两个插槽
+通过 `slot` 自定义图标,建议同时设置`icon`和`checkedIcon`两个插槽
 
 :::demo
 
@@ -160,8 +160,12 @@ app.use(Checklist);
 </template>
 <script lang="ts">
   import { ref } from 'vue';
+  import { Checklist } from '@nutui/icons-vue-taro';
   export default {
     props: {},
+    components: {
+      Checklist
+    },
     setup() {
       const radioVal = ref('1');
       return { radioVal };
@@ -253,5 +257,4 @@ app.use(Checklist);
 |  --nut-radio-label-font-size|  _14px_  |
 |  --nut-radio-button-font-size|  _12px_  |
 |  --nut-radio-button-padding|  _5px 18px_  |
-|  --nut-radio-icon-font-size|  _18px_  |
 |  --nut-radio-icon-disable-color2|  _var(--nut-help-color)_  |

+ 0 - 1
src/packages/__VUE/radio/index.scss

@@ -81,7 +81,6 @@
     color: $radio-label-font-active-color;
     transition-duration: 0.3s;
     transition-property: color, border-color, background-color;
-    font-size: $radio-icon-font-size;
   }
   &__icon--unchecked {
     color: $radio-icon-disable-color;

+ 0 - 19
src/packages/__VUE/rate/doc.taro.md

@@ -100,25 +100,6 @@ export default {
 ```
 :::
 
-:::demo
-```html
-<template>
-    <nut-cell class="cell">
-        <nut-rate disabled v-model="value" />
-    </nut-cell>
-</template>
-<script lang="ts">
-import { ref } from 'vue';
-export default {
-    setup() {
-        const value = ref(3);
-        return { value }
-    }
-}
-</script>
-```
-:::
-
 ### 禁用状态
 
 :::demo

+ 6 - 6
src/sites/mobile-taro/vue/src/dentry/pages/radio/index.vue

@@ -98,12 +98,12 @@ export default {
     const env = Taro.getEnv();
 
     const data = reactive({
-      radioVal: 1,
-      radioVal2: 2,
-      radioVal3: 1,
-      radioVal4: 1,
-      radioVal5: 1,
-      radioVal6: 1
+      radioVal: '1',
+      radioVal2: '2',
+      radioVal3: '1',
+      radioVal4: '1',
+      radioVal5: '1',
+      radioVal6: '1'
     });
     const handleChange = (value: any) => {
       console.log(value);