From a0a2a6bd01d6872e31ed498837ecc6b493e25920 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Wed, 8 Nov 2023 16:05:25 +0800 Subject: [PATCH] chore(business): move to setup sugar (#2643) --- .../src/business/pages/address/index.vue | 460 ++++----- .../src/business/pages/addresslist/index.vue | 109 +-- .../src/business/pages/barrage/index.vue | 29 +- .../src/business/pages/category/index.vue | 78 +- .../src/business/pages/comment/index.vue | 60 +- .../src/business/pages/ecard/index.vue | 67 +- .../src/business/pages/invoice/index.vue | 170 ++-- .../src/business/pages/signature/index.vue | 85 +- .../src/business/pages/sku/index.vue | 307 +++--- .../src/business/pages/timeselect/index.vue | 259 +++-- src/packages/__VUE/address/demo.vue | 503 +++++----- src/packages/__VUE/address/doc.en-US.md | 917 +++++++++-------- src/packages/__VUE/address/doc.md | 919 +++++++++--------- src/packages/__VUE/address/doc.taro.md | 919 +++++++++--------- src/packages/__VUE/addresslist/demo.vue | 136 ++- src/packages/__VUE/addresslist/doc.en-US.md | 340 +++---- src/packages/__VUE/addresslist/doc.md | 340 +++---- src/packages/__VUE/addresslist/doc.taro.md | 340 +++---- src/packages/__VUE/barrage/demo.vue | 51 +- src/packages/__VUE/barrage/doc.en-US.md | 56 +- src/packages/__VUE/barrage/doc.md | 56 +- src/packages/__VUE/barrage/doc.taro.md | 54 +- src/packages/__VUE/card/demo.vue | 66 +- src/packages/__VUE/category/demo.vue | 133 ++- src/packages/__VUE/category/doc.en-US.md | 276 +++--- src/packages/__VUE/category/doc.md | 276 +++--- src/packages/__VUE/category/doc.taro.md | 242 ++--- src/packages/__VUE/comment/demo.vue | 87 +- src/packages/__VUE/comment/doc.en-US.md | 171 ++-- src/packages/__VUE/comment/doc.md | 171 ++-- src/packages/__VUE/comment/doc.taro.md | 171 ++-- src/packages/__VUE/ecard/demo.vue | 84 +- src/packages/__VUE/ecard/doc.en-US.md | 131 ++- src/packages/__VUE/ecard/doc.md | 111 +-- src/packages/__VUE/ecard/doc.taro.md | 129 ++- src/packages/__VUE/invoice/demo.vue | 190 ++-- src/packages/__VUE/invoice/doc.en-US.md | 214 ++-- src/packages/__VUE/invoice/doc.md | 214 ++-- src/packages/__VUE/invoice/doc.taro.md | 214 ++-- src/packages/__VUE/signature/demo.vue | 117 +-- src/packages/__VUE/sku/demo.vue | 336 +++---- src/packages/__VUE/sku/doc.en-US.md | 653 ++++++------- src/packages/__VUE/sku/doc.md | 653 ++++++------- src/packages/__VUE/sku/doc.taro.md | 658 ++++++------- src/packages/__VUE/timeselect/demo.vue | 270 +++-- src/packages/__VUE/timeselect/doc.en-US.md | 522 +++++----- src/packages/__VUE/timeselect/doc.md | 522 +++++----- src/packages/__VUE/timeselect/doc.taro.md | 511 +++++----- 48 files changed, 6174 insertions(+), 7203 deletions(-) diff --git a/packages/nutui-taro-demo/src/business/pages/address/index.vue b/packages/nutui-taro-demo/src/business/pages/address/index.vue index 5f98b3c9a0..fa5fd70f93 100644 --- a/packages/nutui-taro-demo/src/business/pages/address/index.vue +++ b/packages/nutui-taro-demo/src/business/pages/address/index.vue @@ -2,44 +2,44 @@

选择自定义地址

- +

选中省市区

- +

选择自定义地址2

- +

选择已有地址

- +

自定义图标

- + - ``` @@ -437,17 +406,17 @@ If you want to select a province, you need to set the region ID in the order of :::demo -```html +```vue - ``` @@ -577,66 +528,66 @@ If you want to select a province, you need to set the region ID in the order of # API -| Attribute | Description | Type | Default | -| ---------------------- | ------------------------------------------------------------- | ---------------- | ------------------------ | -| v-model:visible | Whether to open address | boolean | `false` | -| v-model:value | Default value | Array | `[]` | -| type | Choose type: `exist/custom/custom2` | string | `custom` | -| province | Province data | Array | `[]` | -| city | City data | Array | `[]` | -| country | Country data | Array | `[]` | -| town | Town dta | Array | `[]` | -| height | Popup height | string \| number | `200px` | -| exist-address | Exist address list data | Array | `[]` | -| is-show-custom-address | Whether to change custom address | boolean | `true` | -| custom-address-title | Custom address title | string | `Select Region` | -| exist-address-title | Exist address title | string | `Delivery To` | -| custom-and-exist-title | Custom address and existing address switch button copywriting | string | `Choose Another Address` | -| columns-placeholder | Columns placeholder text | string \| Array | `Select` | -| lock-scroll | Whether the background is locked | boolean | `true` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| v-model:visible | Whether to open address | boolean | `false` | +| v-model:value | Default value | Array | `[]` | +| type | Choose type: `exist/custom/custom2` | string | `custom` | +| province | Province data | Array | `[]` | +| city | City data | Array | `[]` | +| country | Country data | Array | `[]` | +| town | Town dta | Array | `[]` | +| height | Popup height | string \| number | `200px` | +| exist-address | Exist address list data | Array | `[]` | +| is-show-custom-address | Whether to change custom address | boolean | `true` | +| custom-address-title | Custom address title | string | `Select Region` | +| exist-address-title | Exist address title | string | `Delivery To` | +| custom-and-exist-title | Custom address and existing address switch button copywriting | string | `Choose Another Address` | +| columns-placeholder | Columns placeholder text | string \| Array | `Select` | +| lock-scroll | Whether the background is locked | boolean | `true` | ## Event -| Event | Description | Arguments | -| ------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------- | -| change | Emitted when to selected custom address | reference `onChange` | -| selected | Emitted when to selected exist address | reference `selected` | -| close | Emitted when to close | reference `close` | -| close-mask | Emitted when to close mask | {closeWay:'mask'/'cross'} | +| Event | Description | Arguments | +| --- | --- | --- | +| change | Emitted when to selected custom address | reference `onChange` | +| selected | Emitted when to selected exist address | reference `selected` | +| close | Emitted when to close | reference `close` | +| close-mask | Emitted when to close mask | {closeWay:'mask'/'cross'} | | switch-module | Click to select another address or custom address to select the upper left corner of the return button triggered | {type:'exist'/'custom'/'custom2'} | ## change -| Attribute | Description | Options | -| --------- | ------------------------------------------------------------- | ---------------------------------- | -| custom | The administrative region currently clicked | `province / city / country / town` | -| next | The next level of the administrative region currently clicked | `province / city / country / town` | -| value | The value of the currently clicked administrative region | `{}` | +| Attribute | Description | Options | +| --- | --- | --- | +| custom | The administrative region currently clicked | `province / city / country / town` | +| next | The next level of the administrative region currently clicked | `province / city / country / town` | +| value | The value of the currently clicked administrative region | `{}` | ## selected -| Attribute | Description | Options | -| ---------------------------- | ----------------------------------------- | ------- | -| First Option(prevExistAdd) | Select the previously selected address | `{}` | -| Second Option(nowExistAdd) | Currently selected address | `{}` | -| Third Option(arr) | After selecting the existing address list | `{}` | +| Attribute | Description | Options | +| --- | --- | --- | +| First Option(prevExistAdd) | Select the previously selected address | `{}` | +| Second Option(nowExistAdd) | Currently selected address | `{}` | +| Third Option(arr) | After selecting the existing address list | `{}` | ## close -| Attribute | Description | Options | -| --------- | ------------- | ---------------------- | -| type | Selected Type | `exist/custom/custom2` | -| data | Selected Data | `{}` | +| Attribute | Description | Options | +| --- | --- | --- | +| type | Selected Type | `exist/custom/custom2` | +| data | Selected Data | `{}` | ## Slot -| Name | Description | -| --------------- | -------------------- | -| bottom | Bottom slot | -| icon | Selected icon slot | +| Name | Description | +| --- | --- | +| bottom | Bottom slot | +| icon | Selected icon slot | | unselected-icon | Unselected icon slot | -| close-icon | Close icon slot | -| back-icon | Change icon slot | +| close-icon | Close icon slot | +| back-icon | Change icon slot | ## Theming @@ -644,17 +595,17 @@ If you want to select a province, you need to set the region ID in the order of The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/component/configprovider). -| Name | Default Value | -| ------------------------------------------------ | ------------------------------------------------------------------------------- | -| --nut-address-region-tab-line | _linear-gradient(90deg, var(--nut-primary-color) 0%, rgba(#fa2c19, 0.15) 100%)_ | -| --nut-address-icon-color | _var(--nut-primary-color)_ | -| --nut-address-header-title-font-size | _18px_ | -| --nut-address-header-title-color | _#262626_ | -| --nut-address-region-tab-font-size | _13px_ | -| --nut-address-region-tab-color | _#1d1e1e_ | -| --nut-address-region-tab-active-item-font-weight | _bold_ | -| --nut-address-region-tab-line-border-radius | _0_ | -| --nut-address-region-tab-line-opacity | _1_ | -| --nut-address-region-item-color | _#333_ | -| --nut-address-region-item-font-size | _var(--nut-font-size-1)_ | -| --nut-address-item-margin-right | _9px_ | +| Name | Default Value | +| --- | --- | +| --nut-address-region-tab-line | _linear-gradient(90deg, var(--nut-primary-color) 0%, rgba(#fa2c19, 0.15) 100%)_ | +| --nut-address-icon-color | _var(--nut-primary-color)_ | +| --nut-address-header-title-font-size | _18px_ | +| --nut-address-header-title-color | _#262626_ | +| --nut-address-region-tab-font-size | _13px_ | +| --nut-address-region-tab-color | _#1d1e1e_ | +| --nut-address-region-tab-active-item-font-weight | _bold_ | +| --nut-address-region-tab-line-border-radius | _0_ | +| --nut-address-region-tab-line-opacity | _1_ | +| --nut-address-region-item-color | _#333_ | +| --nut-address-region-item-font-size | _var(--nut-font-size-1)_ | +| --nut-address-item-margin-right | _9px_ | diff --git a/src/packages/__VUE/address/doc.md b/src/packages/__VUE/address/doc.md index 35afc37496..4e9e059559 100644 --- a/src/packages/__VUE/address/doc.md +++ b/src/packages/__VUE/address/doc.md @@ -6,7 +6,7 @@ ### 安装 -```javascript +```js import { createApp } from 'vue'; import { Address } from '@nutui/nutui'; @@ -18,65 +18,59 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -88,68 +82,62 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -159,72 +147,66 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -234,7 +216,7 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -320,7 +296,7 @@ app.use(Address); :::demo -```html +```vue - - ``` @@ -437,17 +406,17 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -579,23 +530,23 @@ app.use(Address); ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ---------------- | -| v-model:visible | 是否打开地址选择 | boolean | `false` | -| v-model:value | 设置默认选中值 | Array | `[]` | -| type | 地址选择类型 `exist/custom/custom2` | string | `custom` | -| province | 省,每个省的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | -| city | 市,每个市的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | -| country | 县,每个县的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | -| town | 乡/镇,每个乡/镇的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | -| height | 弹层中内容容器的高度,仅在 `type="custom2"` 时有效 | string \| number | `200px` | -| exist-address | 已存在地址列表,每个地址对象中,必传值 `provinceName`、`cityName`、`countyName`、`townName`、`addressDetail`、`selectedAddress`(字段解释见下) | Array | `[]` | -| is-show-custom-address | 是否可以切换自定义地址选择,`type=‘exist’` 时生效 | boolean | `true` | -| custom-address-title | 自定义地址选择文案,`type='custom'` 时生效 | string | `请选择所在地区` | -| exist-address-title | 已有地址文案 ,`type=‘exist’` 时生效 | string | `配送至` | -| custom-and-exist-title | 自定义地址与已有地址切换按钮文案 ,`type=‘exist’` 时生效 | string | `选择其他地址` | -| columns-placeholder | 列提示文字 | string \| Array | `请选择` | -| lock-scroll | 背景是否锁定 | boolean | `true` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| v-model:visible | 是否打开地址选择 | boolean | `false` | +| v-model:value | 设置默认选中值 | Array | `[]` | +| type | 地址选择类型 `exist/custom/custom2` | string | `custom` | +| province | 省,每个省的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | +| city | 市,每个市的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | +| country | 县,每个县的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | +| town | 乡/镇,每个乡/镇的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | +| height | 弹层中内容容器的高度,仅在 `type="custom2"` 时有效 | string \| number | `200px` | +| exist-address | 已存在地址列表,每个地址对象中,必传值 `provinceName`、`cityName`、`countyName`、`townName`、`addressDetail`、`selectedAddress`(字段解释见下) | Array | `[]` | +| is-show-custom-address | 是否可以切换自定义地址选择,`type=‘exist’` 时生效 | boolean | `true` | +| custom-address-title | 自定义地址选择文案,`type='custom'` 时生效 | string | `请选择所在地区` | +| exist-address-title | 已有地址文案 ,`type=‘exist’` 时生效 | string | `配送至` | +| custom-and-exist-title | 自定义地址与已有地址切换按钮文案 ,`type=‘exist’` 时生效 | string | `选择其他地址` | +| columns-placeholder | 列提示文字 | string \| Array | `请选择` | +| lock-scroll | 背景是否锁定 | boolean | `true` | - `provinceName` 省的名字 - `cityName` 市的名字 @@ -606,46 +557,46 @@ app.use(Address); ### Events -| 事件名 | 说明 | 回调参数 | -| ------------- | ---------------------------------------------------- | --------------------------------- | -| change | 自定义选择地址时,选择地区时触发 | 参考 `onChange` | -| selected | 选择已有地址列表时触发 | 参考 `selected` | -| close | 地址选择弹框关闭时触发 | 参考 `close` | -| close-mask | 点击遮罩层或点击右上角叉号关闭时触发 | {closeWay:'mask'/'cross'} | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| change | 自定义选择地址时,选择地区时触发 | 参考 `onChange` | +| selected | 选择已有地址列表时触发 | 参考 `selected` | +| close | 地址选择弹框关闭时触发 | 参考 `close` | +| close-mask | 点击遮罩层或点击右上角叉号关闭时触发 | {closeWay:'mask'/'cross'} | | switch-module | 点击‘选择其他地址’或自定义地址选择左上角返回按钮触发 | {type:'exist'/'custom'/'custom2'} | ### change 回调参数 -| 参数 | 说明 | 可选值 | -| ------ | -------------------------------------- | -------------------------------------------------- | -| custom | 当前点击的行政区域 | `province(省) / city(市) / country(县) / town(乡)` | -| next | 当前点击的行政区域的下一级 | `province(省) / city(市) / country(县) / town(乡)` | -| value | 当前点击的行政区域的值(返回传入的值) | `{}` | +| 参数 | 说明 | 可选值 | +| --- | --- | --- | +| custom | 当前点击的行政区域 | `province(省) / city(市) / country(县) / town(乡)` | +| next | 当前点击的行政区域的下一级 | `province(省) / city(市) / country(县) / town(乡)` | +| value | 当前点击的行政区域的值(返回传入的值) | `{}` | ### selected 回调参数 -| 参数 | 说明 | 可能值 | -| ---------------------------- | -------------------------------------------------------- | ------ | -| 第一个参数`(prevExistAdd)` | 选择前选中的地址 | `{}` | -| 第二个参数`(nowExistAdd)` | 当前选中的地址 | `{}` | -| 第三个参数`(arr)` | 选择完之后的已有地址列表(`selectedAddress` 值发生改变) | `{}` | +| 参数 | 说明 | 可能值 | +| --- | --- | --- | +| 第一个参数`(prevExistAdd)` | 选择前选中的地址 | `{}` | +| 第二个参数`(nowExistAdd)` | 当前选中的地址 | `{}` | +| 第三个参数`(arr)` | 选择完之后的已有地址列表(`selectedAddress` 值发生改变) | `{}` | ### close 回调参数 -| 参数 | 说明 | 可能值 | -| ---- | ------------------------------------------------------- | ---------------------- | -| type | 地址选择类型 `exist/custom/custom2` | `exist/custom/custom2` | -| data | 选择地址的值,`custom` 时,`addressStr` 为选择的地址组合 | `{}` | +| 参数 | 说明 | 可能值 | +| --- | --- | --- | +| type | 地址选择类型 `exist/custom/custom2` | `exist/custom/custom2` | +| data | 选择地址的值,`custom` 时,`addressStr` 为选择的地址组合 | `{}` | ### Slots -| 名称 | 说明 | -| --------------- | ------------------------------------ | -| bottom | 可自定义底部 | -| icon | 自定义选中项的图标 | -| unselected-icon | 未选中地址时的图标 | -| close-icon | 关闭弹层的图标 | -| back-icon | 自定义地址与已有地址切换时返回的图标 | +| 名称 | 说明 | +| --- | --- | +| bottom | 可自定义底部 | +| icon | 自定义选中项的图标 | +| unselected-icon | 未选中地址时的图标 | +| close-icon | 关闭弹层的图标 | +| back-icon | 自定义地址与已有地址切换时返回的图标 | ## 主题定制 @@ -653,17 +604,17 @@ app.use(Address); 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| ------------------------------------------------ | ------------------------------------------------------------------------------- | -| --nut-address-region-tab-line | _linear-gradient(90deg, var(--nut-primary-color) 0%, rgba(#fa2c19, 0.15) 100%)_ | -| --nut-address-icon-color | _var(--nut-primary-color)_ | -| --nut-address-header-title-font-size | _18px_ | -| --nut-address-header-title-color | _#262626_ | -| --nut-address-region-tab-font-size | _13px_ | -| --nut-address-region-tab-color | _#1d1e1e_ | -| --nut-address-region-tab-active-item-font-weight | _bold_ | -| --nut-address-region-tab-line-border-radius | _0_ | -| --nut-address-region-tab-line-opacity | _1_ | -| --nut-address-region-item-color | _#333_ | -| --nut-address-region-item-font-size | _var(--nut-font-size-1)_ | -| --nut-address-item-margin-right | _9px_ | +| 名称 | 默认值 | +| --- | --- | +| --nut-address-region-tab-line | _linear-gradient(90deg, var(--nut-primary-color) 0%, rgba(#fa2c19, 0.15) 100%)_ | +| --nut-address-icon-color | _var(--nut-primary-color)_ | +| --nut-address-header-title-font-size | _18px_ | +| --nut-address-header-title-color | _#262626_ | +| --nut-address-region-tab-font-size | _13px_ | +| --nut-address-region-tab-color | _#1d1e1e_ | +| --nut-address-region-tab-active-item-font-weight | _bold_ | +| --nut-address-region-tab-line-border-radius | _0_ | +| --nut-address-region-tab-line-opacity | _1_ | +| --nut-address-region-item-color | _#333_ | +| --nut-address-region-item-font-size | _var(--nut-font-size-1)_ | +| --nut-address-item-margin-right | _9px_ | diff --git a/src/packages/__VUE/address/doc.taro.md b/src/packages/__VUE/address/doc.taro.md index b3b58bd23a..b3a0021445 100644 --- a/src/packages/__VUE/address/doc.taro.md +++ b/src/packages/__VUE/address/doc.taro.md @@ -6,7 +6,7 @@ ### 安装 -```javascript +```js import { createApp } from 'vue'; import { Address } from '@nutui/nutui-taro'; @@ -18,65 +18,59 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -88,68 +82,62 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -159,72 +147,66 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -234,7 +216,7 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -320,7 +296,7 @@ app.use(Address); :::demo -```html +```vue - - ``` @@ -437,17 +406,17 @@ app.use(Address); :::demo -```html +```vue - ``` @@ -579,23 +530,23 @@ app.use(Address); ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ---------------- | -| v-model:visible | 是否打开地址选择 | boolean | `false` | -| v-model:value | 设置默认选中值 | Array | `[]` | -| type | 地址选择类型 `exist/custom/custom2` | string | `custom` | -| province | 省,每个省的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | -| city | 市,每个市的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | -| country | 县,每个县的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | -| town | 乡/镇,每个乡/镇的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | -| height | 弹层中内容容器的高度,仅在 `type="custom2"` 时有效 | string \| number | `200px` | -| exist-address | 已存在地址列表,每个地址对象中,必传值 `provinceName`、`cityName`、`countyName`、`townName`、`addressDetail`、`selectedAddress`(字段解释见下) | Array | `[]` | -| is-show-custom-address | 是否可以切换自定义地址选择,`type=‘exist’` 时生效 | boolean | `true` | -| custom-address-title | 自定义地址选择文案,`type='custom'` 时生效 | string | `请选择所在地区` | -| exist-address-title | 已有地址文案 ,`type=‘exist’` 时生效 | string | `配送至` | -| custom-and-exist-title | 自定义地址与已有地址切换按钮文案 ,`type=‘exist’` 时生效 | string | `选择其他地址` | -| columns-placeholder | 列提示文字 | string \| Array | `请选择` | -| lock-scroll | 背景是否锁定 | boolean | `true` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| v-model:visible | 是否打开地址选择 | boolean | `false` | +| v-model:value | 设置默认选中值 | Array | `[]` | +| type | 地址选择类型 `exist/custom/custom2` | string | `custom` | +| province | 省,每个省的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | +| city | 市,每个市的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | +| country | 县,每个县的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | +| town | 乡/镇,每个乡/镇的对象中,必须有 `name` 字段,如果类型选择 `custom2`,必须指定 `title` 字段为首字母 | Array | `[]` | +| height | 弹层中内容容器的高度,仅在 `type="custom2"` 时有效 | string \| number | `200px` | +| exist-address | 已存在地址列表,每个地址对象中,必传值 `provinceName`、`cityName`、`countyName`、`townName`、`addressDetail`、`selectedAddress`(字段解释见下) | Array | `[]` | +| is-show-custom-address | 是否可以切换自定义地址选择,`type=‘exist’` 时生效 | boolean | `true` | +| custom-address-title | 自定义地址选择文案,`type='custom'` 时生效 | string | `请选择所在地区` | +| exist-address-title | 已有地址文案 ,`type=‘exist’` 时生效 | string | `配送至` | +| custom-and-exist-title | 自定义地址与已有地址切换按钮文案 ,`type=‘exist’` 时生效 | string | `选择其他地址` | +| columns-placeholder | 列提示文字 | string \| Array | `请选择` | +| lock-scroll | 背景是否锁定 | boolean | `true` | - `provinceName` 省的名字 - `cityName` 市的名字 @@ -606,46 +557,46 @@ app.use(Address); ### Events -| 事件名 | 说明 | 回调参数 | -| ------------- | ---------------------------------------------------- | --------------------------------- | -| change | 自定义选择地址时,选择地区时触发 | 参考 `onChange` | -| selected | 选择已有地址列表时触发 | 参考 `selected` | -| close | 地址选择弹框关闭时触发 | 参考 `close` | -| close-mask | 点击遮罩层或点击右上角叉号关闭时触发 | {closeWay:'mask'/'cross'} | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| change | 自定义选择地址时,选择地区时触发 | 参考 `onChange` | +| selected | 选择已有地址列表时触发 | 参考 `selected` | +| close | 地址选择弹框关闭时触发 | 参考 `close` | +| close-mask | 点击遮罩层或点击右上角叉号关闭时触发 | {closeWay:'mask'/'cross'} | | switch-module | 点击‘选择其他地址’或自定义地址选择左上角返回按钮触发 | {type:'exist'/'custom'/'custom2'} | ### change 回调参数 -| 参数 | 说明 | 可选值 | -| ------ | -------------------------------------- | -------------------------------------------------- | -| custom | 当前点击的行政区域 | `province(省) / city(市) / country(县) / town(乡)` | -| next | 当前点击的行政区域的下一级 | `province(省) / city(市) / country(县) / town(乡)` | -| value | 当前点击的行政区域的值(返回传入的值) | `{}` | +| 参数 | 说明 | 可选值 | +| --- | --- | --- | +| custom | 当前点击的行政区域 | `province(省) / city(市) / country(县) / town(乡)` | +| next | 当前点击的行政区域的下一级 | `province(省) / city(市) / country(县) / town(乡)` | +| value | 当前点击的行政区域的值(返回传入的值) | `{}` | ### selected 回调参数 -| 参数 | 说明 | 可能值 | -| ---------------------------- | -------------------------------------------------------- | ------ | -| 第一个参数`(prevExistAdd)` | 选择前选中的地址 | `{}` | -| 第二个参数`(nowExistAdd)` | 当前选中的地址 | `{}` | -| 第三个参数`(arr)` | 选择完之后的已有地址列表(`selectedAddress` 值发生改变) | `{}` | +| 参数 | 说明 | 可能值 | +| --- | --- | --- | +| 第一个参数`(prevExistAdd)` | 选择前选中的地址 | `{}` | +| 第二个参数`(nowExistAdd)` | 当前选中的地址 | `{}` | +| 第三个参数`(arr)` | 选择完之后的已有地址列表(`selectedAddress` 值发生改变) | `{}` | ### close 回调参数 -| 参数 | 说明 | 可能值 | -| ---- | ------------------------------------------------------- | ---------------------- | -| type | 地址选择类型 `exist/custom/custom2` | `exist/custom/custom2` | -| data | 选择地址的值,`custom` 时,`addressStr` 为选择的地址组合 | `{}` | +| 参数 | 说明 | 可能值 | +| --- | --- | --- | +| type | 地址选择类型 `exist/custom/custom2` | `exist/custom/custom2` | +| data | 选择地址的值,`custom` 时,`addressStr` 为选择的地址组合 | `{}` | ### Slots -| 名称 | 说明 | -| --------------- | ------------------------------------ | -| bottom | 可自定义底部 | -| icon | 自定义选中项的图标 | -| unselected-icon | 未选中地址时的图标 | -| close-icon | 关闭弹层的图标 | -| back-icon | 自定义地址与已有地址切换时返回的图标 | +| 名称 | 说明 | +| --- | --- | +| bottom | 可自定义底部 | +| icon | 自定义选中项的图标 | +| unselected-icon | 未选中地址时的图标 | +| close-icon | 关闭弹层的图标 | +| back-icon | 自定义地址与已有地址切换时返回的图标 | ## 主题定制 @@ -653,17 +604,17 @@ app.use(Address); 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| ------------------------------------------------ | ------------------------------------------------------------------------------- | -| --nut-address-region-tab-line | _linear-gradient(90deg, var(--nut-primary-color) 0%, rgba(#fa2c19, 0.15) 100%)_ | -| --nut-address-icon-color | _var(--nut-primary-color)_ | -| --nut-address-header-title-font-size | _18px_ | -| --nut-address-header-title-color | _#262626_ | -| --nut-address-region-tab-font-size | _13px_ | -| --nut-address-region-tab-color | _#1d1e1e_ | -| --nut-address-region-tab-active-item-font-weight | _bold_ | -| --nut-address-region-tab-line-border-radius | _0_ | -| --nut-address-region-tab-line-opacity | _1_ | -| --nut-address-region-item-color | _#333_ | -| --nut-address-region-item-font-size | _var(--nut-font-size-1)_ | -| --nut-address-item-margin-right | _9px_ | +| 名称 | 默认值 | +| --- | --- | +| --nut-address-region-tab-line | _linear-gradient(90deg, var(--nut-primary-color) 0%, rgba(#fa2c19, 0.15) 100%)_ | +| --nut-address-icon-color | _var(--nut-primary-color)_ | +| --nut-address-header-title-font-size | _18px_ | +| --nut-address-header-title-color | _#262626_ | +| --nut-address-region-tab-font-size | _13px_ | +| --nut-address-region-tab-color | _#1d1e1e_ | +| --nut-address-region-tab-active-item-font-weight | _bold_ | +| --nut-address-region-tab-line-border-radius | _0_ | +| --nut-address-region-tab-line-opacity | _1_ | +| --nut-address-region-item-color | _#333_ | +| --nut-address-region-item-font-size | _var(--nut-font-size-1)_ | +| --nut-address-item-margin-right | _9px_ | diff --git a/src/packages/__VUE/addresslist/demo.vue b/src/packages/__VUE/addresslist/demo.vue index 060b86a63e..0be60823de 100644 --- a/src/packages/__VUE/addresslist/demo.vue +++ b/src/packages/__VUE/addresslist/demo.vue @@ -40,89 +40,69 @@
- diff --git a/src/packages/__VUE/ecard/doc.en-US.md b/src/packages/__VUE/ecard/doc.en-US.md index 5f76c05562..7a8e2b1464 100644 --- a/src/packages/__VUE/ecard/doc.en-US.md +++ b/src/packages/__VUE/ecard/doc.en-US.md @@ -6,7 +6,7 @@ Virtual e-card selection ### Install -```javascript +```js import { createApp } from 'vue'; import { Ecard } from '@nutui/nutui'; @@ -18,54 +18,45 @@ app.use(Ecard); :::demo -```html +```vue - ``` @@ -75,32 +66,32 @@ app.use(Ecard); ### Props -| Attribute | Description | Type | Default | -| ---------------- | ---------------- | ------ | ------------- | -| modelValue | Price | number | `0` | -| choose-text | Main Title | string | `Select` | -| other-value-text | Other Text | string | `Other Value` | -| data-list | Ecard List | Array | `DataList[]` | -| card-amount-min | Other Min Value | number | `1` | -| card-amount-max | Other Max Value | number | `9999` | -| card-buy-min | Choose Min Value | number | `1` | -| card-buy-max | Choose Max Value | number | `9999` | -| placeholder | Placeholder | string | `Placeholder` | -| suffix | Symbol mark | string | `¥` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| modelValue | Price | number | `0` | +| choose-text | Main Title | string | `Select` | +| other-value-text | Other Text | string | `Other Value` | +| data-list | Ecard List | Array | `DataList[]` | +| card-amount-min | Other Min Value | number | `1` | +| card-amount-max | Other Max Value | number | `9999` | +| card-buy-min | Choose Min Value | number | `1` | +| card-buy-max | Choose Max Value | number | `9999` | +| placeholder | Placeholder | string | `Placeholder` | +| suffix | Symbol mark | string | `¥` | ### Events -| Event | Description | Arguments | -| ------------ | -------------------------------------- | ------------------- | -| change | Trigger event when Ecard is clicker | `value` | -| input-change | Triggered when the value changes | `value` | -| change-step | Triggered when the steps value changes | `value,modelValue` | +| Event | Description | Arguments | +| --- | --- | --- | +| change | Trigger event when Ecard is clicker | `value` | +| input-change | Triggered when the value changes | `value` | +| change-step | Triggered when the steps value changes | `value,modelValue` | ### Data Structure of DataList -| key | Description | Description | -| ----- | ----------- | ----------- | -| price | price | string | +| key | Description | Description | +| --- | --- | --- | +| price | price | string | ## Theming @@ -108,6 +99,6 @@ app.use(Ecard); The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/component/configprovider). -| Name | Default Value | -| -------------------- | ------------- | -| --nut-ecard-bg-color | _#f0f2f5_ | +| Name | Default Value | +| --- | --- | +| --nut-ecard-bg-color | _#f0f2f5_ | diff --git a/src/packages/__VUE/ecard/doc.md b/src/packages/__VUE/ecard/doc.md index 4a757f2fc9..0851ea19d1 100644 --- a/src/packages/__VUE/ecard/doc.md +++ b/src/packages/__VUE/ecard/doc.md @@ -6,7 +6,7 @@ ### 安装 -```javascript +```js import { createApp } from 'vue'; import { Ecard } from '@nutui/nutui'; @@ -18,7 +18,7 @@ app.use(Ecard); :::demo -```html +```vue - ``` @@ -77,31 +66,31 @@ app.use(Ecard); ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------------- | ------------------ | ------ | ------------------ | -| modelValue | 购买电子卡所需价钱 | number | `0` | -| choose-text | 选择面值文案 | string | `请选择电子卡面值` | -| other-value-text | 其他面值文案 | string | `其他面值` | -| data-list | 电子卡面值列表 | Array | `DataList[]` | -| card-amount-min | 其它面值最小值 | number | `1` | -| card-amount-max | 其他面值最大值 | number | `9999` | -| card-buy-min | 购买数量最小值 | number | `1` | -| card-buy-max | 购买数量最大值 | number | `9999` | -| placeholder | 其他面值默认提示语 | string | `请输入1-5000整数` | -| suffix | 符号标示 | string | `¥` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| modelValue | 购买电子卡所需价钱 | number | `0` | +| choose-text | 选择面值文案 | string | `请选择电子卡面值` | +| other-value-text | 其他面值文案 | string | `其他面值` | +| data-list | 电子卡面值列表 | Array | `DataList[]` | +| card-amount-min | 其它面值最小值 | number | `1` | +| card-amount-max | 其他面值最大值 | number | `9999` | +| card-buy-min | 购买数量最小值 | number | `1` | +| card-buy-max | 购买数量最大值 | number | `9999` | +| placeholder | 其他面值默认提示语 | string | `请输入1-5000整数` | +| suffix | 符号标示 | string | `¥` | ### Events -| 事件名 | 说明 | 回调参数 | -| ------------ | ----------------------- | -------------------------- | -| change | 选中电子卡事件 | 点击的数据 | -| input-change | 更改 `input` 框触发事件 | 输入的数据 | -| change-step | 更改数量时触发 | 当前数量,当前选中的卡面值 | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| change | 选中电子卡事件 | 点击的数据 | +| input-change | 更改 `input` 框触发事件 | 输入的数据 | +| change-step | 更改数量时触发 | 当前数量,当前选中的卡面值 | ### DataList 数据结构 -| 键名 | 说明 | 类型 | -| ----- | -------------- | ------ | +| 键名 | 说明 | 类型 | +| --- | --- | --- | | price | 每张电子卡价格 | string | ## 主题定制 @@ -110,6 +99,6 @@ app.use(Ecard); 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| -------------------- | --------- | +| 名称 | 默认值 | +| --- | --- | | --nut-ecard-bg-color | _#f0f2f5_ | diff --git a/src/packages/__VUE/ecard/doc.taro.md b/src/packages/__VUE/ecard/doc.taro.md index 1b22f54ad8..194f888665 100644 --- a/src/packages/__VUE/ecard/doc.taro.md +++ b/src/packages/__VUE/ecard/doc.taro.md @@ -6,7 +6,7 @@ ### 安装 -```javascript +```js import { createApp } from 'vue'; import { Ecard } from '@nutui/nutui-taro'; @@ -18,54 +18,45 @@ app.use(Ecard); :::demo -```html +```vue - ``` @@ -75,31 +66,31 @@ app.use(Ecard); ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------------- | ------------------ | ------ | ------------------ | -| modelValue | 购买电子卡所需价钱 | number | `0` | -| choose-text | 选择面值文案 | string | `请选择电子卡面值` | -| other-value-text | 其他面值文案 | string | `其他面值` | -| data-list | 电子卡面值列表 | Array | `DataList[]` | -| card-amount-min | 其它面值最小值 | number | `1` | -| card-amount-max | 其他面值最大值 | number | `9999` | -| card-buy-min | 购买数量最小值 | number | `1` | -| card-buy-max | 购买数量最大值 | number | `9999` | -| placeholder | 其他面值默认提示语 | string | `请输入1-5000整数` | -| suffix | 符号标示 | string | `¥` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| modelValue | 购买电子卡所需价钱 | number | `0` | +| choose-text | 选择面值文案 | string | `请选择电子卡面值` | +| other-value-text | 其他面值文案 | string | `其他面值` | +| data-list | 电子卡面值列表 | Array | `DataList[]` | +| card-amount-min | 其它面值最小值 | number | `1` | +| card-amount-max | 其他面值最大值 | number | `9999` | +| card-buy-min | 购买数量最小值 | number | `1` | +| card-buy-max | 购买数量最大值 | number | `9999` | +| placeholder | 其他面值默认提示语 | string | `请输入1-5000整数` | +| suffix | 符号标示 | string | `¥` | ### Events -| 事件名 | 说明 | 回调参数 | -| ------------ | ----------------------- | -------------------------- | -| change | 选中电子卡事件 | 点击的数据 | -| input-change | 更改 `input` 框触发事件 | 输入的数据 | -| change-step | 更改数量时触发 | 当前数量,当前选中的卡面值 | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| change | 选中电子卡事件 | 点击的数据 | +| input-change | 更改 `input` 框触发事件 | 输入的数据 | +| change-step | 更改数量时触发 | 当前数量,当前选中的卡面值 | ### DataList 数据结构 -| 键名 | 说明 | 类型 | -| ----- | -------------- | ------ | +| 键名 | 说明 | 类型 | +| --- | --- | --- | | price | 每张电子卡价格 | string | ## 主题定制 @@ -108,6 +99,6 @@ app.use(Ecard); 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | 描述 | -| -------------------- | --------- | ---- | -| --nut-ecard-bg-color | _#f0f2f5_ | - | +| 名称 | 默认值 | +| --- | --- | +| --nut-ecard-bg-color | _#f0f2f5_ | diff --git a/src/packages/__VUE/invoice/demo.vue b/src/packages/__VUE/invoice/demo.vue index 0a9b0333ef..f44454197c 100644 --- a/src/packages/__VUE/invoice/demo.vue +++ b/src/packages/__VUE/invoice/demo.vue @@ -5,122 +5,106 @@ - ``` @@ -174,13 +164,13 @@ You can configure the maximum value and minimum value of the digital input box a :::demo -```html +```vue - ``` @@ -261,13 +245,13 @@ The default partition is divided into several areas, which are defined as slots :::demo -```html +```vue - ``` @@ -427,49 +406,49 @@ The default partition is divided into several areas, which are defined as slots ### Props -| Attribute | Description | Type | Default | -| ------------------ | --------------------------------------------- | ------------------- | -------------- | -| v-model:visible | Whether to open popup | boolean | `false` | -| sku | Sku data | Array | `[]` | -| goods | Product Info | object | - | -| stepper-max | Stepper max | string \| number | `99999` | -| stepper-min | Stepper min | string \| number | `1` | -| btn-options | Bottom button | Array | `[confirm]` | -| btn-extra-text | Add text above button | string | - | -| stepper-title | Stepper left text | string | `Buy Num` | -| stepper-extra-text | The text between the stepper and the headline | Function \| boolean | `false` | -| buy-text | Buy button text | string | `Buy It Now` | -| add-cart-text | Add cart button text | string | `Add To cart` | -| confirm-text | Confirm button text | string | `Confirm` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| v-model:visible | Whether to open popup | boolean | `false` | +| sku | Sku data | Array | `[]` | +| goods | Product Info | object | - | +| stepper-max | Stepper max | string \| number | `99999` | +| stepper-min | Stepper min | string \| number | `1` | +| btn-options | Bottom button | Array | `[confirm]` | +| btn-extra-text | Add text above button | string | - | +| stepper-title | Stepper left text | string | `Buy Num` | +| stepper-extra-text | The text between the stepper and the headline | Function \| boolean | `false` | +| buy-text | Buy button text | string | `Buy It Now` | +| add-cart-text | Add cart button text | string | `Add To cart` | +| confirm-text | Confirm button text | string | `Confirm` | ### Events -| Attribute | Description | Arguments | -| ----------------- | ------------------------------------------ | ------------------------------------------ | -| select-sku | Emitted when select sku | {sku,skuIndex,parentSku,parentIndex} | -| add | Emitted when click stepper add button | value | -| reduce | Emitted when click stepper reduce button | value | -| overLimit | Emitted when click stepper disabled button | value | -| change-stepper | Emitted when click stepper change | value | -| click-btn-operate | Emitted when click bottom button | {type:'confirm',value:'inputNumber value'} | -| click-close-icon | Emitted when click close button | - | -| click-overlay | Emitted when click mask | - | -| close | Emitted when popup close | - | +| Attribute | Description | Arguments | +| --- | --- | --- | +| select-sku | Emitted when select sku | {sku,skuIndex,parentSku,parentIndex} | +| add | Emitted when click stepper add button | value | +| reduce | Emitted when click stepper reduce button | value | +| overLimit | Emitted when click stepper disabled button | value | +| change-stepper | Emitted when click stepper change | value | +| click-btn-operate | Emitted when click bottom button | {type:'confirm',value:'inputNumber value'} | +| click-close-icon | Emitted when click close button | - | +| click-overlay | Emitted when click mask | - | +| close | Emitted when popup close | - | ### Slots The default partition is divided into several areas, which are defined as slots that can be replaced as required。 -| Event | Description | -| ------------------ | ------------------------------- | -| sku-header | Custom header | -| sku-header-price | Custom header price area | -| sku-header-extra | Extra header area | -| sku-select-top | Custom select top | -| sku-select | Custom sku | -| sku-stepper | Custom stepper | -| sku-stepper-bottom | Custom stepper bottom | -| sku-operate | Custom stepper bottom operation | +| Event | Description | +| --- | --- | +| sku-header | Custom header | +| sku-header-price | Custom header price area | +| sku-header-extra | Extra header area | +| sku-select-top | Custom select top | +| sku-select | Custom sku | +| sku-stepper | Custom stepper | +| sku-stepper-bottom | Custom stepper bottom | +| sku-operate | Custom stepper bottom operation | ### goods Data Structure @@ -581,30 +560,30 @@ sku: [ The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/component/configprovider). -| Name | Default Value | -| -------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| --nut-sku-item-border | _1px solid var(--nut-primary-color)_ | -| --nut-sku-item-disable-line | _line-through_ | -| --nut-sku-opetate-bg-default | _linear-gradient(90deg, var(--nut-primary-color), var(--nut-primary-color-end) 100%)_ | -| --nut-sku-item-active-bg | _var(--nut-primary-color)_ | -| --nut-sku-opetate-bg-buy | _linear-gradient(135deg,rgba(255, 186, 13, 1) 0%,rgba(255, 195, 13, 1) 69%,rgba(255, 207, 13, 1) 100%)_ | -| --nut-sku-spec-height | _30px_ | -| --nut-sku-spec-line-height | _var(--nut-sku-spec-height)_ | -| --nut-sku-spec-font-size | _11px_ | -| --nut-sku-spec-background | _rgba(242, 242, 242, 1)_ | -| --nut-sku-spec-color | _var(--nut-black)_ | -| --nut-sku-spec-margin-right | _12px_ | -| --nut-sku-spec-padding | _0 18px_ | -| --nut-sku-spec-title-font-weight | _bold_ | -| --nut-sku-spec-title-font-size | _13px_ | -| --nut-sku-spec-title-color | _var(--nut-black)_ | -| --nut-sku-spec-title-margin-bottom | _18px_ | -| --nut-sku-operate-btn-height | _54px_ | -| --nut-sku-operate-btn-border-top | _0_ | -| --nut-sku-operate-btn-item-height | _40px_ | -| --nut-sku-operate-btn-item-line-height | _var(--nut-sku-operate-btn-item-height)_ | -| --nut-sku-operate-btn-item-font-size | _15px_ | -| --nut-sku-operate-btn-item-font-weight | _normal_ | -| --nut-sku-product-img-width | _100px_ | -| --nut-sku-product-img-height | _var(--nut-sku-product-img-width)_ | -| --nut-sku-product-img-border-radius | _0_ | +| Name | Default Value | +| --- | --- | +| --nut-sku-item-border | _1px solid var(--nut-primary-color)_ | +| --nut-sku-item-disable-line | _line-through_ | +| --nut-sku-opetate-bg-default | _linear-gradient(90deg, var(--nut-primary-color), var(--nut-primary-color-end) 100%)_ | +| --nut-sku-item-active-bg | _var(--nut-primary-color)_ | +| --nut-sku-opetate-bg-buy | _linear-gradient(135deg,rgba(255, 186, 13, 1) 0%,rgba(255, 195, 13, 1) 69%,rgba(255, 207, 13, 1) 100%)_ | +| --nut-sku-spec-height | _30px_ | +| --nut-sku-spec-line-height | _var(--nut-sku-spec-height)_ | +| --nut-sku-spec-font-size | _11px_ | +| --nut-sku-spec-background | _rgba(242, 242, 242, 1)_ | +| --nut-sku-spec-color | _var(--nut-black)_ | +| --nut-sku-spec-margin-right | _12px_ | +| --nut-sku-spec-padding | _0 18px_ | +| --nut-sku-spec-title-font-weight | _bold_ | +| --nut-sku-spec-title-font-size | _13px_ | +| --nut-sku-spec-title-color | _var(--nut-black)_ | +| --nut-sku-spec-title-margin-bottom | _18px_ | +| --nut-sku-operate-btn-height | _54px_ | +| --nut-sku-operate-btn-border-top | _0_ | +| --nut-sku-operate-btn-item-height | _40px_ | +| --nut-sku-operate-btn-item-line-height | _var(--nut-sku-operate-btn-item-height)_ | +| --nut-sku-operate-btn-item-font-size | _15px_ | +| --nut-sku-operate-btn-item-font-weight | _normal_ | +| --nut-sku-product-img-width | _100px_ | +| --nut-sku-product-img-height | _var(--nut-sku-product-img-width)_ | +| --nut-sku-product-img-border-radius | _0_ | diff --git a/src/packages/__VUE/sku/doc.md b/src/packages/__VUE/sku/doc.md index e8854ff263..3dad664e03 100644 --- a/src/packages/__VUE/sku/doc.md +++ b/src/packages/__VUE/sku/doc.md @@ -6,7 +6,7 @@ ### 安装 -```javascript +```js import { createApp } from 'vue'; import { Sku } from '@nutui/nutui'; @@ -18,60 +18,55 @@ app.use(Sku); :::demo -```html +```vue - ``` @@ -81,13 +76,13 @@ app.use(Sku); :::demo -```html +```vue - ``` @@ -174,13 +164,13 @@ app.use(Sku); :::demo -```html +```vue - ``` @@ -261,13 +245,13 @@ Sku 组件默认划分为若干区域,这些区域都定义成了插槽,可 :::demo -```html +```vue - ``` @@ -427,49 +406,49 @@ Sku 组件默认划分为若干区域,这些区域都定义成了插槽,可 ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ------------------ | ---------------------------------------------------------------------------- | ------------------- | ------------- | -| v-model:visible | 是否显示商品规格弹框 | boolean | `false` | -| sku | 商品 sku 数据 | Array | `[]` | -| goods | 商品信息 | object | - | -| stepper-max | 设置 inputNumber 最大值 | string \| number | `99999` | -| stepper-min | 设置 inputNumber 最小值 | string \| number | `1` | -| btn-options | 底部按钮设置。[`confirm`, `buy`, `cart` ] 分别对应确定、立即购买、加入购物车 | Array | `[confirm]` | -| btn-extra-text | 按钮上部添加文案,默认为空,有值时显示 | string | - | -| stepper-title | 数量选择组件左侧文案 | string | `购买数量` | -| stepper-extra-text | InputNumber 与标题之间的文案 | Function \| boolean | `false` | -| buy-text | 立即购买按钮文案 | string | `立即购买` | -| add-cart-text | 加入购物车按钮文案 | string | `加入购物车 ` | -| confirm-text | 确定按钮文案 | string | `确定` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| v-model:visible | 是否显示商品规格弹框 | boolean | `false` | +| sku | 商品 sku 数据 | Array | `[]` | +| goods | 商品信息 | object | - | +| stepper-max | 设置 inputNumber 最大值 | string \| number | `99999` | +| stepper-min | 设置 inputNumber 最小值 | string \| number | `1` | +| btn-options | 底部按钮设置。[`confirm`, `buy`, `cart` ] 分别对应确定、立即购买、加入购物车 | Array | `[confirm]` | +| btn-extra-text | 按钮上部添加文案,默认为空,有值时显示 | string | - | +| stepper-title | 数量选择组件左侧文案 | string | `购买数量` | +| stepper-extra-text | InputNumber 与标题之间的文案 | Function \| boolean | `false` | +| buy-text | 立即购买按钮文案 | string | `立即购买` | +| add-cart-text | 加入购物车按钮文案 | string | `加入购物车 ` | +| confirm-text | 确定按钮文案 | string | `确定` | ### Events -| 事件名 | 说明 | 回调参数 | -| ----------------- | ---------------------------------- | ------------------------------------------ | -| select-sku | 切换规格类目时触发 | {sku,skuIndex,parentSku,parentIndex} | -| add | InputNumber 点击增加按钮时触发 | value | -| reduce | InputNumber 点击减少按钮时触发 | value | -| overLimit | InputNumber 点击不可用的按钮时触发 | value | -| change-stepper | 购买变化时触发 | value | -| click-btn-operate | 点击底部按钮时触发 | {type:'confirm',value:'inputNumber value'} | -| click-close-icon | 点击左上角关闭 icon 时触发 | - | -| click-overlay | 点击遮罩时触发 | - | -| close | 关闭弹层时触发 | - | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| select-sku | 切换规格类目时触发 | {sku,skuIndex,parentSku,parentIndex} | +| add | InputNumber 点击增加按钮时触发 | value | +| reduce | InputNumber 点击减少按钮时触发 | value | +| overLimit | InputNumber 点击不可用的按钮时触发 | value | +| change-stepper | 购买变化时触发 | value | +| click-btn-operate | 点击底部按钮时触发 | {type:'confirm',value:'inputNumber value'} | +| click-close-icon | 点击左上角关闭 icon 时触发 | - | +| click-overlay | 点击遮罩时触发 | - | +| close | 关闭弹层时触发 | - | ### Slots Sku 组件默认划分为若干区域,这些区域都定义成了插槽,可以按照需求进行替换。 -| 名称 | 说明 | -| ------------------ | ------------------------------------------------------ | -| sku-header | 商品信息展示区,包含商品图片、价格、编号 | -| sku-header-price | 商品信息展示区,价格区域展示 | -| sku-header-extra | 商品信息展示区,编号区域展示 | -| sku-select-top | Sku 展示区上方与商品信息展示区下方区域,无默认展示内容 | -| sku-select | Sku 展示区 | -| sku-stepper | 数量选择区 | -| sku-stepper-bottom | 数量选择区下方区域 | -| sku-operate | 底部按钮操作区域 | +| 名称 | 说明 | +| --- | --- | +| sku-header | 商品信息展示区,包含商品图片、价格、编号 | +| sku-header-price | 商品信息展示区,价格区域展示 | +| sku-header-extra | 商品信息展示区,编号区域展示 | +| sku-select-top | Sku 展示区上方与商品信息展示区下方区域,无默认展示内容 | +| sku-select | Sku 展示区 | +| sku-stepper | 数量选择区 | +| sku-stepper-bottom | 数量选择区下方区域 | +| sku-operate | 底部按钮操作区域 | ### goods 对象结构 @@ -581,30 +560,30 @@ sku: [ 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| -------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| --nut-sku-item-border | _1px solid var(--nut-primary-color)_ | -| --nut-sku-item-disable-line | _line-through_ | -| --nut-sku-opetate-bg-default | _linear-gradient(90deg, var(--nut-primary-color), var(--nut-primary-color-end) 100%)_ | -| --nut-sku-item-active-bg | _var(--nut-primary-color)_ | -| --nut-sku-opetate-bg-buy | _linear-gradient(135deg,rgba(255, 186, 13, 1) 0%,rgba(255, 195, 13, 1) 69%,rgba(255, 207, 13, 1) 100%)_ | -| --nut-sku-spec-height | _30px_ | -| --nut-sku-spec-line-height | _var(--nut-sku-spec-height)_ | -| --nut-sku-spec-font-size | _11px_ | -| --nut-sku-spec-background | _rgba(242, 242, 242, 1)_ | -| --nut-sku-spec-color | _var(--nut-black)_ | -| --nut-sku-spec-margin-right | _12px_ | -| --nut-sku-spec-padding | _0 18px_ | -| --nut-sku-spec-title-font-weight | _bold_ | -| --nut-sku-spec-title-font-size | _13px_ | -| --nut-sku-spec-title-color | _var(--nut-black)_ | -| --nut-sku-spec-title-margin-bottom | _18px_ | -| --nut-sku-operate-btn-height | _54px_ | -| --nut-sku-operate-btn-border-top | _0_ | -| --nut-sku-operate-btn-item-height | _40px_ | -| --nut-sku-operate-btn-item-line-height | _var(--nut-sku-operate-btn-item-height)_ | -| --nut-sku-operate-btn-item-font-size | _15px_ | -| --nut-sku-operate-btn-item-font-weight | _normal_ | -| --nut-sku-product-img-width | _100px_ | -| --nut-sku-product-img-height | _var(--nut-sku-product-img-width)_ | -| --nut-sku-product-img-border-radius | _0_ | +| 名称 | 默认值 | +| --- | --- | +| --nut-sku-item-border | _1px solid var(--nut-primary-color)_ | +| --nut-sku-item-disable-line | _line-through_ | +| --nut-sku-opetate-bg-default | _linear-gradient(90deg, var(--nut-primary-color), var(--nut-primary-color-end) 100%)_ | +| --nut-sku-item-active-bg | _var(--nut-primary-color)_ | +| --nut-sku-opetate-bg-buy | _linear-gradient(135deg,rgba(255, 186, 13, 1) 0%,rgba(255, 195, 13, 1) 69%,rgba(255, 207, 13, 1) 100%)_ | +| --nut-sku-spec-height | _30px_ | +| --nut-sku-spec-line-height | _var(--nut-sku-spec-height)_ | +| --nut-sku-spec-font-size | _11px_ | +| --nut-sku-spec-background | _rgba(242, 242, 242, 1)_ | +| --nut-sku-spec-color | _var(--nut-black)_ | +| --nut-sku-spec-margin-right | _12px_ | +| --nut-sku-spec-padding | _0 18px_ | +| --nut-sku-spec-title-font-weight | _bold_ | +| --nut-sku-spec-title-font-size | _13px_ | +| --nut-sku-spec-title-color | _var(--nut-black)_ | +| --nut-sku-spec-title-margin-bottom | _18px_ | +| --nut-sku-operate-btn-height | _54px_ | +| --nut-sku-operate-btn-border-top | _0_ | +| --nut-sku-operate-btn-item-height | _40px_ | +| --nut-sku-operate-btn-item-line-height | _var(--nut-sku-operate-btn-item-height)_ | +| --nut-sku-operate-btn-item-font-size | _15px_ | +| --nut-sku-operate-btn-item-font-weight | _normal_ | +| --nut-sku-product-img-width | _100px_ | +| --nut-sku-product-img-height | _var(--nut-sku-product-img-width)_ | +| --nut-sku-product-img-border-radius | _0_ | diff --git a/src/packages/__VUE/sku/doc.taro.md b/src/packages/__VUE/sku/doc.taro.md index 1df6afe766..932a727847 100644 --- a/src/packages/__VUE/sku/doc.taro.md +++ b/src/packages/__VUE/sku/doc.taro.md @@ -6,7 +6,7 @@ ### 安装 -```javascript +```js import { createApp } from 'vue'; import { Sku } from '@nutui/nutui-taro'; @@ -18,62 +18,57 @@ app.use(Sku); :::demo -```html +```vue - ``` @@ -83,13 +78,13 @@ app.use(Sku); :::demo -```html +```vue - ``` @@ -178,13 +168,13 @@ app.use(Sku); :::demo -```html +```vue - ``` @@ -265,13 +250,13 @@ Sku 组件默认划分为若干区域,这些区域都定义成了插槽,可 :::demo -```html +```vue - ``` @@ -433,49 +413,49 @@ Sku 组件默认划分为若干区域,这些区域都定义成了插槽,可 ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ------------------ | --------------------------------------------------------------------------- | ------------------- | ------------- | -| v-model:visible | 是否显示商品规格弹框 | boolean | `false` | -| sku | 商品 sku 数据 | Array | `[]` | -| goods | 商品信息 | object | - | -| stepper-max | 设置 inputNumber 最大值 | string \| number | `99999` | -| stepper-min | 设置 inputNumber 最小值 | string \| number | `1` | -| btn-options | 底部按钮设置。[`confirm`, `buy`, `cart`] 分别对应确定、立即购买、加入购物车 | Array | `[confirm]` | -| btn-extra-text | 按钮上部添加文案,默认为空,有值时显示 | string | - | -| stepper-title | 数量选择组件左侧文案 | string | `购买数量` | -| stepper-extra-text | InputNumber 与标题之间的文案 | Function \| boolean | `false` | -| buy-text | 立即购买按钮文案 | string | `立即购买` | -| add-cart-text | 加入购物车按钮文案 | string | `加入购物车 ` | -| confirm-text | 确定按钮文案 | string | `确定` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| v-model:visible | 是否显示商品规格弹框 | boolean | `false` | +| sku | 商品 sku 数据 | Array | `[]` | +| goods | 商品信息 | object | - | +| stepper-max | 设置 inputNumber 最大值 | string \| number | `99999` | +| stepper-min | 设置 inputNumber 最小值 | string \| number | `1` | +| btn-options | 底部按钮设置。[`confirm`, `buy`, `cart`] 分别对应确定、立即购买、加入购物车 | Array | `[confirm]` | +| btn-extra-text | 按钮上部添加文案,默认为空,有值时显示 | string | - | +| stepper-title | 数量选择组件左侧文案 | string | `购买数量` | +| stepper-extra-text | InputNumber 与标题之间的文案 | Function \| boolean | `false` | +| buy-text | 立即购买按钮文案 | string | `立即购买` | +| add-cart-text | 加入购物车按钮文案 | string | `加入购物车 ` | +| confirm-text | 确定按钮文案 | string | `确定` | ### Events -| 事件名 | 说明 | 回调参数 | -| ----------------- | ---------------------------------- | ------------------------------------------ | -| select-sku | 切换规格类目时触发 | {sku,skuIndex,parentSku,parentIndex} | -| add | InputNumber 点击增加按钮时触发 | value | -| reduce | InputNumber 点击减少按钮时触发 | value | -| overLimit | InputNumber 点击不可用的按钮时触发 | value | -| change-stepper | 购买变化时触发 | value | -| click-btn-operate | 点击底部按钮时触发 | {type:'confirm',value:'inputNumber value'} | -| click-close-icon | 点击左上角关闭 icon 时触发 | - | -| click-overlay | 点击遮罩时触发 | - | -| close | 关闭弹层时触发 | - | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| select-sku | 切换规格类目时触发 | {sku,skuIndex,parentSku,parentIndex} | +| add | InputNumber 点击增加按钮时触发 | value | +| reduce | InputNumber 点击减少按钮时触发 | value | +| overLimit | InputNumber 点击不可用的按钮时触发 | value | +| change-stepper | 购买变化时触发 | value | +| click-btn-operate | 点击底部按钮时触发 | {type:'confirm',value:'inputNumber value'} | +| click-close-icon | 点击左上角关闭 icon 时触发 | - | +| click-overlay | 点击遮罩时触发 | - | +| close | 关闭弹层时触发 | - | ### Slots Sku 组件默认划分为若干区域,这些区域都定义成了插槽,可以按照需求进行替换。 -| 名称 | 说明 | -| ------------------ | ------------------------------------------------------ | -| sku-header | 商品信息展示区,包含商品图片、价格、编号 | -| sku-header-price | 商品信息展示区,价格区域展示 | -| sku-header-extra | 商品信息展示区,编号区域展示 | -| sku-select-top | Sku 展示区上方与商品信息展示区下方区域,无默认展示内容 | -| sku-select | Sku 展示区 | -| sku-stepper | 数量选择区 | -| sku-stepper-bottom | 数量选择区下方区域 | -| sku-operate | 底部按钮操作区域 | +| 名称 | 说明 | +| --- | --- | +| sku-header | 商品信息展示区,包含商品图片、价格、编号 | +| sku-header-price | 商品信息展示区,价格区域展示 | +| sku-header-extra | 商品信息展示区,编号区域展示 | +| sku-select-top | Sku 展示区上方与商品信息展示区下方区域,无默认展示内容 | +| sku-select | Sku 展示区 | +| sku-stepper | 数量选择区 | +| sku-stepper-bottom | 数量选择区下方区域 | +| sku-operate | 底部按钮操作区域 | ### goods 对象结构 @@ -587,30 +567,30 @@ sku: [ 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| -------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| --nut-sku-item-border | _1px solid var(--nut-primary-color)_ | -| --nut-sku-item-disable-line | _line-through_ | -| --nut-sku-opetate-bg-default | _linear-gradient(90deg, var(--nut-primary-color), var(--nut-primary-color-end) 100%)_ | -| --nut-sku-item-active-bg | _var(--nut-primary-color)_ | -| --nut-sku-opetate-bg-buy | _linear-gradient(135deg,rgba(255, 186, 13, 1) 0%,rgba(255, 195, 13, 1) 69%,rgba(255, 207, 13, 1) 100%)_ | -| --nut-sku-spec-height | _30px_ | -| --nut-sku-spec-line-height | _var(--nut-sku-spec-height)_ | -| --nut-sku-spec-font-size | _11px_ | -| --nut-sku-spec-background | _rgba(242, 242, 242, 1)_ | -| --nut-sku-spec-color | _var(--nut-black)_ | -| --nut-sku-spec-margin-right | _12px_ | -| --nut-sku-spec-padding | _0 18px_ | -| --nut-sku-spec-title-font-weight | _bold_ | -| --nut-sku-spec-title-font-size | _13px_ | -| --nut-sku-spec-title-color | _var(--nut-black)_ | -| --nut-sku-spec-title-margin-bottom | _18px_ | -| --nut-sku-operate-btn-height | _54px_ | -| --nut-sku-operate-btn-border-top | _0_ | -| --nut-sku-operate-btn-item-height | _40px_ | -| --nut-sku-operate-btn-item-line-height | _var(--nut-sku-operate-btn-item-height)_ | -| --nut-sku-operate-btn-item-font-size | _15px_ | -| --nut-sku-operate-btn-item-font-weight | _normal_ | -| --nut-sku-product-img-width | _100px_ | -| --nut-sku-product-img-height | _var(--nut-sku-product-img-width)_ | -| --nut-sku-product-img-border-radius | _0_ | +| 名称 | 默认值 | +| --- | --- | +| --nut-sku-item-border | _1px solid var(--nut-primary-color)_ | +| --nut-sku-item-disable-line | _line-through_ | +| --nut-sku-opetate-bg-default | _linear-gradient(90deg, var(--nut-primary-color), var(--nut-primary-color-end) 100%)_ | +| --nut-sku-item-active-bg | _var(--nut-primary-color)_ | +| --nut-sku-opetate-bg-buy | _linear-gradient(135deg,rgba(255, 186, 13, 1) 0%,rgba(255, 195, 13, 1) 69%,rgba(255, 207, 13, 1) 100%)_ | +| --nut-sku-spec-height | _30px_ | +| --nut-sku-spec-line-height | _var(--nut-sku-spec-height)_ | +| --nut-sku-spec-font-size | _11px_ | +| --nut-sku-spec-background | _rgba(242, 242, 242, 1)_ | +| --nut-sku-spec-color | _var(--nut-black)_ | +| --nut-sku-spec-margin-right | _12px_ | +| --nut-sku-spec-padding | _0 18px_ | +| --nut-sku-spec-title-font-weight | _bold_ | +| --nut-sku-spec-title-font-size | _13px_ | +| --nut-sku-spec-title-color | _var(--nut-black)_ | +| --nut-sku-spec-title-margin-bottom | _18px_ | +| --nut-sku-operate-btn-height | _54px_ | +| --nut-sku-operate-btn-border-top | _0_ | +| --nut-sku-operate-btn-item-height | _40px_ | +| --nut-sku-operate-btn-item-line-height | _var(--nut-sku-operate-btn-item-height)_ | +| --nut-sku-operate-btn-item-font-size | _15px_ | +| --nut-sku-operate-btn-item-font-weight | _normal_ | +| --nut-sku-product-img-width | _100px_ | +| --nut-sku-product-img-height | _var(--nut-sku-product-img-width)_ | +| --nut-sku-product-img-border-radius | _0_ | diff --git a/src/packages/__VUE/timeselect/demo.vue b/src/packages/__VUE/timeselect/demo.vue index c8d02ee798..062fef3e80 100644 --- a/src/packages/__VUE/timeselect/demo.vue +++ b/src/packages/__VUE/timeselect/demo.vue @@ -7,10 +7,10 @@ >

{{ translate('title') }}

@@ -28,10 +28,10 @@ >

{{ translate('changeTitle') }}

@@ -49,10 +49,10 @@ > - diff --git a/src/packages/__VUE/timeselect/doc.en-US.md b/src/packages/__VUE/timeselect/doc.en-US.md index b68a659db9..03f4c2351c 100644 --- a/src/packages/__VUE/timeselect/doc.en-US.md +++ b/src/packages/__VUE/timeselect/doc.en-US.md @@ -6,7 +6,7 @@ For delivery time selection ### Install -```javascript +```js import { createApp } from 'vue'; import { TimeSelect, TimePannel, TimeDetail } from '@nutui/nutui'; @@ -20,16 +20,16 @@ app.use(TimeDetail); :::demo -```html +```vue - ``` @@ -115,16 +101,16 @@ app.use(TimeDetail); :::demo -```html +```vue - ``` @@ -213,16 +185,16 @@ app.use(TimeDetail); :::demo -```html +```vue - - ``` @@ -336,53 +294,53 @@ app.use(TimeDetail); ### TimeSelect Props -| Attribute | Description | Type | Default | -| ---------------- | ----------------------------------------------------------------------------------- | ---------------- | ------------- | -| visible | Whether to display elastic layer | boolean | `false` | -| height | Height of bomb layer | string | `20%` | -| title | Bomb layer title | string | `Pickup Time` | -| current-key | Unique identification | string \| number | `0` | -| current-time | The currently selected time, the array element contains:key: string; list: string[] | Array | `[]` | -| lock-scroll | Whether the background is locked | boolean | `true` | -| teleport-disable | Whether the node is allowed to be mounted | boolean | `false` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| visible | Whether to display elastic layer | boolean | `false` | +| height | Height of bomb layer | string | `20%` | +| title | Bomb layer title | string | `Pickup Time` | +| current-key | Unique identification | string \| number | `0` | +| current-time | The currently selected time, the array element contains:key: string; list: string[] | Array | `[]` | +| lock-scroll | Whether the background is locked | boolean | `true` | +| teleport-disable | Whether the node is allowed to be mounted | boolean | `false` | ### Slots -| Name | Description | -| ------ | ------------------------ | -| title | Change Title | -| pannel | List for left | +| Name | Description | +| --- | --- | +| title | Change Title | +| pannel | List for left | | detail | Detail Content for right | ### TimePannel Props -| Attribute | Description | Type | Default | -| ---------- | ---------------------------------------------------------------------------------- | ---------------- | ------- | -| name | Name of display | string | `` | -| pannel-key | Unique ID, which identifies the currently selected day together with `current-key` | string \| number | `0` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| name | Name of display | string | `` | +| pannel-key | Unique ID, which identifies the currently selected day together with `current-key` | string \| number | `0` | ### TimeDetail Props -| Attribute | Description | Type | Default | -| --------- | ---------------------------------------------------------- | ----- | ------- | -| times | Selectable time, the same as array elements `current-time` | Array | `[]` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| times | Selectable time, the same as array elements `current-time` | Array | `[]` | ### TimeSelect Events -| Event | Description | Arguments | -| ------ | --------------------------- | --------------------------------- | +| Event | Description | Arguments | +| --- | --- | --- | | select | Callback after closing mask | `key: string \| number, list: []` | ### TimePannel Event -| Event | Description | Arguments | -| ------ | --------------------------------- | ----------------------------- | +| Event | Description | Arguments | +| --- | --- | --- | | change | Click the callback of the content | `pannelKey: string | number` | ### TimeDetail Event -| Event | Description | Arguments | -| ------ | ---------------------- | -------------- | +| Event | Description | Arguments | +| --- | --- | --- | | select | Callback of click time | `time: string` | ## Theming @@ -391,29 +349,29 @@ app.use(TimeDetail); The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/component/configprovider). -| Name | Default Value | -| ----------------------------------------------- | -------------------------- | -| --nut-timeselect-title-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-title-color | _var(--nut-title-color)_ | -| --nut-timeselect-title-width | _100%_ | -| --nut-timeselect-title-height | _50px_ | -| --nut-timeselect-title-line-height | _50px_ | -| --nut-timeselect-pannel-bg-color | _#f6f7f9_ | -| --nut-timeselect-timepannel-text-color | _var(--nut-title-color2)_ | -| --nut-timeselect-timepannel-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-timepannel-cur-bg-color | _var(--nut-white)_ | -| --nut-timeselect-timepannel-cur-text-color | _#333333_ | -| --nut-timeselect-timepannel-width | _140px_ | -| --nut-timeselect-timepannel-height | _40px_ | -| --nut-timeselect-timepannel-padding | _15px_ | -| --nut-timeselect-timedetail-padding | _0 5px 50px 13px_ | -| --nut-timeselect-timedetail-item-width | _100px_ | -| --nut-timeselect-timedetail-item-height | _50px_ | -| --nut-timeselect-timedetail-item-line-height | _50px_ | -| --nut-timeselect-timedetail-item-bg-color | _#f6f7f9_ | -| --nut-timeselect-timedetail-item-border-radius | _5px_ | -| --nut-timeselect-timedetail-item-text-color | _#333333_ | -| --nut-timeselect-timedetail-item-text-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-timedetail-item-cur-bg-color | _var(--nut-primary-color)_ | -| --nut-timeselect-timedetail-item-cur-border | _var(--nut-primary-color)_ | +| Name | Default Value | +| --- | --- | +| --nut-timeselect-title-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-title-color | _var(--nut-title-color)_ | +| --nut-timeselect-title-width | _100%_ | +| --nut-timeselect-title-height | _50px_ | +| --nut-timeselect-title-line-height | _50px_ | +| --nut-timeselect-pannel-bg-color | _#f6f7f9_ | +| --nut-timeselect-timepannel-text-color | _var(--nut-title-color2)_ | +| --nut-timeselect-timepannel-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-timepannel-cur-bg-color | _var(--nut-white)_ | +| --nut-timeselect-timepannel-cur-text-color | _#333333_ | +| --nut-timeselect-timepannel-width | _140px_ | +| --nut-timeselect-timepannel-height | _40px_ | +| --nut-timeselect-timepannel-padding | _15px_ | +| --nut-timeselect-timedetail-padding | _0 5px 50px 13px_ | +| --nut-timeselect-timedetail-item-width | _100px_ | +| --nut-timeselect-timedetail-item-height | _50px_ | +| --nut-timeselect-timedetail-item-line-height | _50px_ | +| --nut-timeselect-timedetail-item-bg-color | _#f6f7f9_ | +| --nut-timeselect-timedetail-item-border-radius | _5px_ | +| --nut-timeselect-timedetail-item-text-color | _#333333_ | +| --nut-timeselect-timedetail-item-text-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-timedetail-item-cur-bg-color | _var(--nut-primary-color)_ | +| --nut-timeselect-timedetail-item-cur-border | _var(--nut-primary-color)_ | | --nut-timeselect-timedetail-item-cur-text-color | _var(--nut-primary-color)_ | diff --git a/src/packages/__VUE/timeselect/doc.md b/src/packages/__VUE/timeselect/doc.md index 2d1797609d..8637afa58a 100644 --- a/src/packages/__VUE/timeselect/doc.md +++ b/src/packages/__VUE/timeselect/doc.md @@ -6,7 +6,7 @@ ### 安装 -```javascript +```js import { createApp } from 'vue'; import { TimeSelect, TimePannel, TimeDetail } from '@nutui/nutui'; @@ -20,16 +20,16 @@ app.use(TimeDetail); :::demo -```html +```vue - ``` @@ -115,16 +101,16 @@ app.use(TimeDetail); :::demo -```html +```vue - ``` @@ -213,16 +185,16 @@ app.use(TimeDetail); :::demo -```html +```vue - - ``` @@ -336,53 +294,53 @@ app.use(TimeDetail); ### TimeSelect Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------------- | -------------------------------------------------------- | ---------------- | ---------- | -| visible | 是否显示弹层 | boolean | `false` | -| height | 弹层的高度 | string | `20%` | -| title | 弹层标题 | string | `取件时间` | -| current-key | 唯一标识 | string \| number | `0` | -| current-time | 当前选择的时间,数组元素包含:key: string; list: string[] | Array | `[]` | -| lock-scroll | 背景是否锁定 | boolean | `true` | -| teleport-disable | 是否允许挂载节点 | boolean | `false` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| visible | 是否显示弹层 | boolean | `false` | +| height | 弹层的高度 | string | `20%` | +| title | 弹层标题 | string | `取件时间` | +| current-key | 唯一标识 | string \| number | `0` | +| current-time | 当前选择的时间,数组元素包含:key: string; list: string[] | Array | `[]` | +| lock-scroll | 背景是否锁定 | boolean | `true` | +| teleport-disable | 是否允许挂载节点 | boolean | `false` | ### Slots -| 名称 | 说明 | -| ------ | ------------ | -| title | 更改标题 | -| pannel | 左侧列表 | +| 名称 | 说明 | +| --- | --- | +| title | 更改标题 | +| pannel | 左侧列表 | | detail | 右侧详细内容 | ### TimePannel Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------- | --------------------------------------------- | ---------------- | ------ | -| name | 显示的名称 | string | `` | -| pannel-key | 唯一标识,和 current-key 一起标识当前选择的天 | string \| number | `0` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| name | 显示的名称 | string | `` | +| pannel-key | 唯一标识,和 current-key 一起标识当前选择的天 | string \| number | `0` | ### TimeDetail Props -| 参数 | 说明 | 类型 | 默认值 | -| ----- | --------------------------------------- | ----- | ------ | -| times | 可选择的时间,数组元素同 `current-time` | Array | `[]` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| times | 可选择的时间,数组元素同 `current-time` | Array | `[]` | ### TimeSelect Event -| 事件名 | 说明 | 回调参数 | -| ------ | ------------------ | --------------------------------- | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | | select | 关闭遮罩之后的回调 | `key: string \| number, list: []` | ### TimePannel Event -| 事件名 | 说明 | 回调参数 | -| ------ | -------------- | ----------------------------- | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | | change | 点击内容的回调 | `pannelKey: string \| number` | ### TimeDetail Event -| 事件名 | 说明 | 回调参数 | -| ------ | -------------- | -------------- | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | | select | 点击时间的回调 | `time: string` | ## 主题定制 @@ -391,29 +349,29 @@ app.use(TimeDetail); 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| ----------------------------------------------- | -------------------------- | -| --nut-timeselect-title-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-title-color | _var(--nut-title-color)_ | -| --nut-timeselect-title-width | _100%_ | -| --nut-timeselect-title-height | _50px_ | -| --nut-timeselect-title-line-height | _50px_ | -| --nut-timeselect-pannel-bg-color | _#f6f7f9_ | -| --nut-timeselect-timepannel-text-color | _var(--nut-title-color2)_ | -| --nut-timeselect-timepannel-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-timepannel-cur-bg-color | _var(--nut-white)_ | -| --nut-timeselect-timepannel-cur-text-color | _#333333_ | -| --nut-timeselect-timepannel-width | _140px_ | -| --nut-timeselect-timepannel-height | _40px_ | -| --nut-timeselect-timepannel-padding | _15px_ | -| --nut-timeselect-timedetail-padding | _0 5px 50px 13px_ | -| --nut-timeselect-timedetail-item-width | _100px_ | -| --nut-timeselect-timedetail-item-height | _50px_ | -| --nut-timeselect-timedetail-item-line-height | _50px_ | -| --nut-timeselect-timedetail-item-bg-color | _#f6f7f9_ | -| --nut-timeselect-timedetail-item-border-radius | _5px_ | -| --nut-timeselect-timedetail-item-text-color | _#333333_ | -| --nut-timeselect-timedetail-item-text-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-timedetail-item-cur-bg-color | _var(--nut-primary-color)_ | -| --nut-timeselect-timedetail-item-cur-border | _var(--nut-primary-color)_ | +| 名称 | 默认值 | +| --- | --- | +| --nut-timeselect-title-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-title-color | _var(--nut-title-color)_ | +| --nut-timeselect-title-width | _100%_ | +| --nut-timeselect-title-height | _50px_ | +| --nut-timeselect-title-line-height | _50px_ | +| --nut-timeselect-pannel-bg-color | _#f6f7f9_ | +| --nut-timeselect-timepannel-text-color | _var(--nut-title-color2)_ | +| --nut-timeselect-timepannel-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-timepannel-cur-bg-color | _var(--nut-white)_ | +| --nut-timeselect-timepannel-cur-text-color | _#333333_ | +| --nut-timeselect-timepannel-width | _140px_ | +| --nut-timeselect-timepannel-height | _40px_ | +| --nut-timeselect-timepannel-padding | _15px_ | +| --nut-timeselect-timedetail-padding | _0 5px 50px 13px_ | +| --nut-timeselect-timedetail-item-width | _100px_ | +| --nut-timeselect-timedetail-item-height | _50px_ | +| --nut-timeselect-timedetail-item-line-height | _50px_ | +| --nut-timeselect-timedetail-item-bg-color | _#f6f7f9_ | +| --nut-timeselect-timedetail-item-border-radius | _5px_ | +| --nut-timeselect-timedetail-item-text-color | _#333333_ | +| --nut-timeselect-timedetail-item-text-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-timedetail-item-cur-bg-color | _var(--nut-primary-color)_ | +| --nut-timeselect-timedetail-item-cur-border | _var(--nut-primary-color)_ | | --nut-timeselect-timedetail-item-cur-text-color | _var(--nut-primary-color)_ | diff --git a/src/packages/__VUE/timeselect/doc.taro.md b/src/packages/__VUE/timeselect/doc.taro.md index d1454f6cf3..38c636b9ee 100644 --- a/src/packages/__VUE/timeselect/doc.taro.md +++ b/src/packages/__VUE/timeselect/doc.taro.md @@ -6,7 +6,7 @@ ### 安装 -```javascript +```js import { createApp } from 'vue'; import { TimeSelect, TimePannel, TimeDetail } from '@nutui/nutui-taro'; @@ -20,16 +20,16 @@ app.use(TimeDetail); :::demo -```html +```vue - ``` @@ -113,16 +100,16 @@ app.use(TimeDetail); :::demo -```html +```vue - ``` @@ -209,16 +183,16 @@ app.use(TimeDetail); :::demo -```html +```vue - - ``` @@ -330,52 +291,52 @@ app.use(TimeDetail); ### TimeSelect Props -| 参数 | 说明 | 类型 | 默认值 | -| ------------ | -------------------------------------------------------- | ---------------- | ---------- | -| visible | 是否显示弹层 | boolean | `false` | -| height | 弹层的高度 | string | `20%` | -| title | 弹层标题 | string | `取件时间` | -| current-key | 唯一标识 | string \| number | `0` | -| current-time | 当前选择的时间,数组元素包含:key: string; list: string[] | Array | `[]` | -| lock-scroll | 背景是否锁定 | boolean | `true` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| visible | 是否显示弹层 | boolean | `false` | +| height | 弹层的高度 | string | `20%` | +| title | 弹层标题 | string | `取件时间` | +| current-key | 唯一标识 | string \| number | `0` | +| current-time | 当前选择的时间,数组元素包含:key: string; list: string[] | Array | `[]` | +| lock-scroll | 背景是否锁定 | boolean | `true` | ### Slots -| 名称 | 说明 | -| ------ | ------------ | -| title | 更改标题 | -| pannel | 左侧列表 | +| 名称 | 说明 | +| --- | --- | +| title | 更改标题 | +| pannel | 左侧列表 | | detail | 右侧详细内容 | ### TimePannel Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------- | --------------------------------------------- | ---------------- | ------ | -| name | 显示的名称 | string | `` | -| pannel-key | 唯一标识,和 current-key 一起标识当前选择的天 | string \| number | `0` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| name | 显示的名称 | string | `` | +| pannel-key | 唯一标识,和 current-key 一起标识当前选择的天 | string \| number | `0` | ### TimeDetail Props -| 参数 | 说明 | 类型 | 默认值 | -| ----- | --------------------------------------- | ----- | ------ | -| times | 可选择的时间,数组元素同 `current-time` | Array | `[]` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| times | 可选择的时间,数组元素同 `current-time` | Array | `[]` | ### TimeSelect Event -| 事件名 | 说明 | 回调参数 | -| ------ | ------------------ | --------------------------------- | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | | select | 关闭遮罩之后的回调 | `key: string \| number, list: []` | ### TimePannel Event -| 事件名 | 说明 | 回调参数 | -| ------ | -------------- | ------------------------------ | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | | change | 点击内容的回调 | `pannelKey: string \| number` | ### TimeDetail Event -| 事件名 | 说明 | 回调参数 | -| ------ | -------------- | -------------- | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | | select | 点击时间的回调 | `time: string` | ## 主题定制 @@ -384,29 +345,29 @@ app.use(TimeDetail); 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| ----------------------------------------------- | -------------------------- | -| --nut-timeselect-title-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-title-color | _var(--nut-title-color)_ | -| --nut-timeselect-title-width | _100%_ | -| --nut-timeselect-title-height | _50px_ | -| --nut-timeselect-title-line-height | _50px_ | -| --nut-timeselect-pannel-bg-color | _#f6f7f9_ | -| --nut-timeselect-timepannel-text-color | _var(--nut-title-color2)_ | -| --nut-timeselect-timepannel-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-timepannel-cur-bg-color | _var(--nut-white)_ | -| --nut-timeselect-timepannel-cur-text-color | _#333333_ | -| --nut-timeselect-timepannel-width | _140px_ | -| --nut-timeselect-timepannel-height | _40px_ | -| --nut-timeselect-timepannel-padding | _15px_ | -| --nut-timeselect-timedetail-padding | _0 5px 50px 13px_ | -| --nut-timeselect-timedetail-item-width | _100px_ | -| --nut-timeselect-timedetail-item-height | _50px_ | -| --nut-timeselect-timedetail-item-line-height | _50px_ | -| --nut-timeselect-timedetail-item-bg-color | _#f6f7f9_ | -| --nut-timeselect-timedetail-item-border-radius | _5px_ | -| --nut-timeselect-timedetail-item-text-color | _#333333_ | -| --nut-timeselect-timedetail-item-text-font-size | _var(--nut-font-size-2)_ | -| --nut-timeselect-timedetail-item-cur-bg-color | _var(--nut-primary-color)_ | -| --nut-timeselect-timedetail-item-cur-border | _var(--nut-primary-color)_ | +| 名称 | 默认值 | +| --- | --- | +| --nut-timeselect-title-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-title-color | _var(--nut-title-color)_ | +| --nut-timeselect-title-width | _100%_ | +| --nut-timeselect-title-height | _50px_ | +| --nut-timeselect-title-line-height | _50px_ | +| --nut-timeselect-pannel-bg-color | _#f6f7f9_ | +| --nut-timeselect-timepannel-text-color | _var(--nut-title-color2)_ | +| --nut-timeselect-timepannel-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-timepannel-cur-bg-color | _var(--nut-white)_ | +| --nut-timeselect-timepannel-cur-text-color | _#333333_ | +| --nut-timeselect-timepannel-width | _140px_ | +| --nut-timeselect-timepannel-height | _40px_ | +| --nut-timeselect-timepannel-padding | _15px_ | +| --nut-timeselect-timedetail-padding | _0 5px 50px 13px_ | +| --nut-timeselect-timedetail-item-width | _100px_ | +| --nut-timeselect-timedetail-item-height | _50px_ | +| --nut-timeselect-timedetail-item-line-height | _50px_ | +| --nut-timeselect-timedetail-item-bg-color | _#f6f7f9_ | +| --nut-timeselect-timedetail-item-border-radius | _5px_ | +| --nut-timeselect-timedetail-item-text-color | _#333333_ | +| --nut-timeselect-timedetail-item-text-font-size | _var(--nut-font-size-2)_ | +| --nut-timeselect-timedetail-item-cur-bg-color | _var(--nut-primary-color)_ | +| --nut-timeselect-timedetail-item-cur-border | _var(--nut-primary-color)_ | | --nut-timeselect-timedetail-item-cur-text-color | _var(--nut-primary-color)_ |