Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 文案修改 #1998

Merged
merged 24 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ab6f3ef
fix: popover
yangxiaolu1993 Dec 29, 2022
26b9127
Merge branch 'v4' of https://github.com/yangxiaolu1993/nutui into v4
yangxiaolu1993 Dec 29, 2022
3c88d05
Merge branch 'jdf2e:v4' into v4
yangxiaolu1993 Dec 29, 2022
5df22d8
fix: 代码回退
yangxiaolu1993 Dec 29, 2022
44bcc64
Merge branch 'v4' of https://github.com/yangxiaolu1993/nutui into v4
yangxiaolu1993 Dec 29, 2022
88194df
Merge branch 'jdf2e:v4' into v4
yangxiaolu1993 Dec 29, 2022
ece1dbf
Merge branch 'v4' of https://github.com/yangxiaolu1993/nutui into v4
yangxiaolu1993 Dec 29, 2022
d053da6
Merge branch 'jdf2e:v4' into v4
yangxiaolu1993 Dec 30, 2022
e6d8cbe
feat: 文档修改
yangxiaolu1993 Dec 30, 2022
526afd0
Merge branch 'jdf2e:v4' into v4
yangxiaolu1993 Dec 30, 2022
80e2187
feat: 修改Imagepreview
yangxiaolu1993 Dec 30, 2022
a71f1e4
feat: 合并
yangxiaolu1993 Jan 3, 2023
06c6f26
feat: imagepreview文案修改
yangxiaolu1993 Jan 3, 2023
ccb622f
feat: noticebar文案修改
yangxiaolu1993 Jan 3, 2023
23a09a3
Merge branch 'jdf2e:v4' into v4
yangxiaolu1993 Jan 3, 2023
bf84540
fix: noticebar小程序不能运行问题修改
yangxiaolu1993 Jan 3, 2023
e377031
fix: noticebar小程序不能运行修改
yangxiaolu1993 Jan 3, 2023
0d84f10
feat: 组件文档修改picker
yangxiaolu1993 Jan 3, 2023
76c4a15
Merge branch 'jdf2e:v4' into v4
yangxiaolu1993 Jan 3, 2023
5632e0e
docs: 文案修改
yangxiaolu1993 Jan 3, 2023
bb67f2d
docs: countdown
yangxiaolu1993 Jan 3, 2023
8687a50
Merge branch 'jdf2e:v4' into v4
yangxiaolu1993 Jan 3, 2023
0d4dce4
feat: image
yangxiaolu1993 Jan 3, 2023
ab50128
Merge branch 'jdf2e:v4' into v4
yangxiaolu1993 Jan 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions src/packages/__VUE/address/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,20 +527,20 @@ If you want to select a province, you need to set the region ID in the order of

| Attribute | Description | Type | Default |
|----- | ----- | ----- | ----- |
| v-model:visible | Whether to open address | String | ''|
| 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` |
| v-model:visible | Whether to open address | string | `''`|
| 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
Expand All @@ -563,15 +563,15 @@ If you want to select a province, you need to set the region ID in the order of
## 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 | {}|
| 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 | {} |
| data | Selected Data | `{}` |


## Slot
Expand All @@ -589,17 +589,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/config-provider).

| Name | Default Value | Description |
| --------------------------------------- | -------------------------- | ---- |
| --nut-address-region-tab-line| _linear-gradient(90deg, var(--nut-primary-color) 0%, var(--nut-active-color) 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%, var(--nut-active-color) 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_ |
100 changes: 49 additions & 51 deletions src/packages/__VUE/address/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

### 介绍



### 安装

``` javascript
Expand Down Expand Up @@ -84,24 +82,24 @@ app.use(Address);

### 选择省市区

如果想选中某个省市区,需要在 model-value 中按照 provincecitycountrytown 的顺序配置想要展示的地区 id 值,并且保证有能查询到对应的省市区数据即可。
如果想选中某个省市区,需要在 `model-value` 中按照 `province`、`city`、`country`、`town` 的顺序配置想要展示的地区 id 值,并且保证有能查询到对应的省市区数据即可。

:::demo
```html
<template>
<nut-cell title="选择地址" :desc="text" is-link @click="showAddress"></nut-cell>
<nut-address
v-model="value"
v-model:visible="showPopup"
:province="province"
:city="city"
:country="country"
:town="town"
@change="onChange"
@close="close"
custom-address-title="请选择所在地区"
:columns-placeholder="placeholder"
></nut-address>
<nut-cell title="选择地址" :desc="text" is-link @click="showAddress"></nut-cell>
<nut-address
v-model="value"
v-model:visible="showPopup"
:province="province"
:city="city"
:country="country"
:town="town"
@change="onChange"
@close="close"
custom-address-title="请选择所在地区"
:columns-placeholder="placeholder"
></nut-address>
</template>
<script>
import { ref,reactive,toRefs } from 'vue';
Expand Down Expand Up @@ -545,20 +543,20 @@ app.use(Address);

| 字段 | 说明 | 类型 | 默认值 |
|----- | ----- | ----- | ----- |
| v-model:visible | 是否打开地址选择 | String | '' |
| 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 | 是否打开地址选择 | string | `''` |
| 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 市的名字
Expand All @@ -570,9 +568,9 @@ app.use(Address);
### Events
| 字段 | 说明 | 回调参数 |
|----- | ----- | ----- |
| change | 自定义选择地址时,选择地区时触发 | 参考 onChange |
| selected | 选择已有地址列表时触发 | 参考 selected |
| close | 地址选择弹框关闭时触发 | 参考 close |
| change | 自定义选择地址时,选择地区时触发 | 参考 `onChange` |
| selected | 选择已有地址列表时触发 | 参考 `selected` |
| close | 地址选择弹框关闭时触发 | 参考 `close` |
| close-mask |点击遮罩层或点击右上角叉号关闭时触发 | {closeWay:'mask'/'cross'} |
| switch-module | 点击‘选择其他地址’或自定义地址选择左上角返回按钮触发 | {type:'exist'/'custom'/'custom2'} |

Expand All @@ -587,15 +585,15 @@ app.use(Address);
### selected 回调参数
| 参数 | 说明 | 可能值 |
|----- | ----- | ----- |
| 第一个参数(prevExistAdd) | 选择前选中的地址 | {} |
| 第二个参数(nowExistAdd) | 当前选中的地址 | {} |
| 第三个参数(arr) | 选择完之后的已有地址列表(selectedAddress 值发生改变) | {} |
| 第一个参数(prevExistAdd) | 选择前选中的地址 | `{}` |
| 第二个参数(nowExistAdd) | 当前选中的地址 | `{}` |
| 第三个参数(arr) | 选择完之后的已有地址列表(selectedAddress 值发生改变) | `{}` |

### close 回调参数
| 参数 | 说明 | 可能值 |
|----- | ----- | ----- |
| type | 地址选择类型 exist/custom/custom2 | exist/custom/custom2 |
| data | 选择地址的值,custom 时,addressStr 为选择的地址组合 | {} |
| data | 选择地址的值,custom 时,addressStr 为选择的地址组合 | `{}` |

### Slots
| 字段 | 说明 |
Expand All @@ -613,17 +611,17 @@ app.use(Address);

组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/config-provider)。

| 名称 | 默认值 | 描述 |
| --------------------------------------- | -------------------------- | ---- |
| --nut-address-region-tab-line| _linear-gradient(90deg, var(--nut-primary-color) 0%, var(--nut-active-color) 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%, var(--nut-active-color) 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_ |
Loading