Skip to content

Commit

Permalink
Merge branch 'v4' of https://github.com/jdf2e/nutui into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Drjingfubo committed Jan 11, 2023
2 parents 32c1163 + 42b37f8 commit eefeff2
Show file tree
Hide file tree
Showing 33 changed files with 130 additions and 157 deletions.
2 changes: 1 addition & 1 deletion src/packages/__VUE/address/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
:is-show-custom-address="false"
@selected="selected"
>
<template #unselectedIcon>
<template #unselected-icon>
<Heart1 style="margin-right: 8px"></Heart1>
</template>
<template #icon>
Expand Down
8 changes: 4 additions & 4 deletions src/packages/__VUE/address/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ If you want to select a province, you need to set the region ID in the order of
:is-show-custom-address="false"
@selected="selected3"
>
<template #unselectedIcon>
<template #unselected-icon>
<Heart1 style="margin-right:8px"></Heart1>
</template>
<template #icon>
Expand Down Expand Up @@ -589,9 +589,9 @@ If you want to select a province, you need to set the region ID in the order of
|----- | ----- |
| bottom | Bottom slot |
| icon | Selected icon slot |
| unselectedIcon | Unselected icon slot |
| closeIcon | Close icon slot |
| backIcon | Change icon slot |
| unselected-icon | Unselected icon slot |
| close-icon | Close icon slot |
| back-icon | Change icon slot |

## Theming

Expand Down
8 changes: 4 additions & 4 deletions src/packages/__VUE/address/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ app.use(Address);
:is-show-custom-address="false"
@selected="selected3"
>
<template #unselectedIcon>
<template #unselected-icon>
<Heart1 style="margin-right:8px"></Heart1>
</template>
<template #icon>
Expand Down Expand Up @@ -615,9 +615,9 @@ app.use(Address);
|----- | ----- |
| bottom | 可自定义底部 |
| icon | 自定义选中项的图标 |
| unselectedIcon | 未选中地址时的图标 |
| closeIcon | 关闭弹层的图标 |
| backIcon | 自定义地址与已有地址切换时返回的图标 |
| unselected-icon | 未选中地址时的图标 |
| close-icon | 关闭弹层的图标 |
| back-icon | 自定义地址与已有地址切换时返回的图标 |


## 主题定制
Expand Down
8 changes: 4 additions & 4 deletions src/packages/__VUE/address/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ app.use(Address);
:is-show-custom-address="false"
@selected="selected3"
>
<template #unselectedIcon>
<template #unselected-icon>
<Heart1 style="margin-right:8px"></Heart1>
</template>
<template #icon>
Expand Down Expand Up @@ -616,9 +616,9 @@ app.use(Address);
|----- | ----- |
| bottom | 可自定义底部 |
| icon | 自定义选中项的图标 |
| unselectedIcon | 未选中地址时的图标 |
| closeIcon | 关闭弹层的图标 |
| backIcon | 自定义地址与已有地址切换时返回的图标 |
| unselected-icon | 未选中地址时的图标 |
| close-icon | 关闭弹层的图标 |
| back-icon | 自定义地址与已有地址切换时返回的图标 |

## 主题定制

Expand Down
6 changes: 3 additions & 3 deletions src/packages/__VUE/address/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<view class="nut-address">
<view class="nut-address__header">
<view class="nut-address__header-back" @click="switchModule">
<slot name="backIcon">
<slot name="back-icon">
<Left v-show="type == 'exist' && privateType == 'custom'"></Left>
</slot>
</view>
Expand All @@ -24,7 +24,7 @@
</view>

<view class="nut-address__header-close" @click="handClose('cross')">
<slot name="closeIcon">
<slot name="close-icon">
<Close color="#cccccc" size="18px"></Close>
</slot>
</view>
Expand Down Expand Up @@ -85,7 +85,7 @@
:key="index"
@click="selectedExist(item)"
>
<slot name="unselectedIcon" v-if="!item.selectedAddress">
<slot name="unselected-icon" v-if="!item.selectedAddress">
<Location2 class="nut-address-select-icon" width="13px"></Location2>
</slot>

Expand Down
6 changes: 3 additions & 3 deletions src/packages/__VUE/address/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<view class="nut-address">
<view class="nut-address__header">
<view class="nut-address__header-back" @click="switchModule">
<slot name="backIcon">
<slot name="back-icon">
<Left v-show="type == 'exist' && privateType == 'custom'"></Left>
</slot>
</view>
Expand All @@ -26,7 +26,7 @@
</view>

<view class="nut-address__header-close" @click="handClose('cross')">
<slot name="closeIcon">
<slot name="close-icon">
<Close color="#cccccc" size="18px"></Close>
</slot>
</view>
Expand Down Expand Up @@ -86,7 +86,7 @@
:key="index"
@click="selectedExist(item)"
>
<slot name="unselectedIcon" v-if="!item.selectedAddress">
<slot name="unselected-icon" v-if="!item.selectedAddress">
<Location2 class="nut-address-select-icon" width="13px"></Location2>
</slot>

Expand Down
28 changes: 14 additions & 14 deletions src/packages/__VUE/addresslist/components/GeneralShell.taro.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<template>
<div class="nut-address-list-general" v-if="!swipeEdition">
<component :is="renderCompontent()" @touchstart="holddownstart" @touchend="holddownend" @touchmove="holddownmove">
<template v-slot:contentTop>
<slot name="contentInfo"></slot>
<template #content-top>
<slot name="content-info"></slot>
</template>
<template v-slot:contentIcon>
<slot name="contentIcons"></slot>
<template #content-icon>
<slot name="content-icons"></slot>
</template>
<template v-slot:contentAddr>
<slot name="contentAddrs"></slot>
<template #content-addr>
<slot name="content-addrs"></slot>
</template>
</component>
<div class="nut-address-list-general__mask" v-if="longPress && showMaskRef" @click="maskClick">
<slot name="longpressAll">
<slot name="longpress-all">
<div class="nut-address-list-general__mask-copy" @click="copyCLick"> 复制地址 </div>
<div class="nut-address-list-general__mask-set" @click="setDefault"> 设置默认 </div>
<div class="nut-address-list-general__mask-del" @click="delLongClick"> 删除地址 </div>
Expand All @@ -23,19 +23,19 @@
<nut-swipe v-else>
<div class="nut-address-list-swipe">
<component :is="renderCompontent()" @touchmove="swipemove" @touchstart="swipestart">
<template v-slot:contentTop>
<slot name="contentInfo"></slot>
<template #content-top>
<slot name="content-info"></slot>
</template>
<template v-slot:contentIcon>
<slot name="contentIcons"></slot>
<template #content-icon>
<slot name="content-icons"></slot>
</template>
<template v-slot:contentAddr>
<slot name="contentAddrs"></slot>
<template #content-addr>
<slot name="content-addrs"></slot>
</template>
</component>
</div>
<template #right>
<slot name="swiperightbtn">
<slot name="swipe-right-btn">
<nut-button shape="square" style="height: 100%" type="danger" @click="swipeDelClick">删除</nut-button>
</slot>
</template>
Expand Down
28 changes: 14 additions & 14 deletions src/packages/__VUE/addresslist/components/GeneralShell.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<template>
<div class="nut-address-list-general" v-if="!swipeEdition">
<component :is="renderCompontent()" @touchstart="holddownstart" @touchend="holddownend" @touchmove="holddownmove">
<template v-slot:contentTop>
<slot name="contentInfo"></slot>
<template #content-top>
<slot name="content-info"></slot>
</template>
<template v-slot:contentIcon>
<slot name="contentIcons"></slot>
<template #content-icon>
<slot name="content-icons"></slot>
</template>
<template v-slot:contentAddr>
<slot name="contentAddrs"></slot>
<template #content-addr>
<slot name="content-addrs"></slot>
</template>
</component>
<div class="nut-address-list-general__mask" v-if="longPress && showMaskRef" @click="maskClick">
<slot name="longpressAll">
<slot name="longpress-all">
<div class="nut-address-list-general__mask-copy" @click="copyCLick"> 复制地址 </div>
<div class="nut-address-list-general__mask-set" @click="setDefault"> 设置默认 </div>
<div class="nut-address-list-general__mask-del" @click="delLongClick"> 删除地址 </div>
Expand All @@ -23,19 +23,19 @@
<nut-swipe v-else>
<div class="nut-address-list-swipe">
<component :is="renderCompontent()" @touchmove="swipemove" @touchstart="swipestart">
<template v-slot:contentTop>
<slot name="contentInfo"></slot>
<template #content-top>
<slot name="content-info"></slot>
</template>
<template v-slot:contentIcon>
<slot name="contentIcons"></slot>
<template #content-icon>
<slot name="content-icons"></slot>
</template>
<template v-slot:contentAddr>
<slot name="contentAddrs"></slot>
<template #content-addr>
<slot name="content-addrs"></slot>
</template>
</component>
</div>
<template #right>
<slot name="swiperightbtn">
<slot name="swipe-right-btn">
<nut-button shape="square" style="height: 100%" type="danger" @click="swipeDelClick">删除</nut-button>
</slot>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="nut-address-list-item" @click="contentsClick">
<div class="nut-address-list-item__info">
<div class="nut-address-list-item__info-contact">
<slot name="contentTop">
<slot name="content-top">
<div class="nut-address-list-item__info-contact-name">{{ item.addressName }}</div>
<div class="nut-address-list-item__info-contact-tel">{{ item.phone }}</div>
<div class="nut-address-list-item__info-contact-default" v-if="item.defaultAddress">{{
Expand All @@ -11,14 +11,14 @@
</slot>
</div>
<div class="nut-address-list-item__info-handle">
<slot name="contentIcon">
<slot name="content-icon">
<Del name="del" class="nut-address-list-item__info-handle-del" @click="delClick"></Del>
<Edit name="edit" class="nut-address-list-item__info-handle-edit" @click="editClick"></Edit>
</slot>
</div>
</div>
<div class="nut-address-list-item__addr">
<slot name="contentAddr">
<slot name="content-addr">
{{ item.fullAddress }}
</slot>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/packages/__VUE/addresslist/components/ItemContents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="nut-address-list-item" @click="contentsClick">
<div class="nut-address-list-item__info">
<div class="nut-address-list-item__info-contact">
<slot name="contentTop">
<slot name="content-top">
<div class="nut-address-list-item__info-contact-name">{{ item.addressName }}</div>
<div class="nut-address-list-item__info-contact-tel">{{ item.phone }}</div>
<div class="nut-address-list-item__info-contact-default" v-if="item.defaultAddress">{{
Expand All @@ -11,14 +11,14 @@
</slot>
</div>
<div class="nut-address-list-item__info-handle">
<slot name="contentIcon">
<slot name="content-icon">
<Del name="del" class="nut-address-list-item__info-handle-del" @click="delClick"></Del>
<Edit name="edit" class="nut-address-list-item__info-handle-edit" @click="editClick"></Edit>
</slot>
</div>
</div>
<div class="nut-address-list-item__addr">
<slot name="contentAddr">
<slot name="content-addr">
{{ item.fullAddress }}
</slot>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/packages/__VUE/addresslist/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ The `AddressList` component is divided into several areas by default, and these

| Name | Description | Illustrate |
| ------------- | ----------------------------------------------- | ----------- |
| iteminfos | Address list item name/contact/default one line | public |
| item-infos | Address list item name/contact/default one line | public |
| itemicon | address list item icon | public |
| itemaddr | Address list item detailed address | public |
| swiperight | Address list item right swipe area | Use with swipe |
| longpressbtns | Address list item long press to mask content | Use with long press |
| swipe-right | Address list item right swipe area | Use with swipe |
| longpress-btns | Address list item long press to mask content | Use with long press |

### Each item in the data array is smoothed with the parameters of the dataOptions object

Expand Down
6 changes: 3 additions & 3 deletions src/packages/__VUE/addresslist/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ export default {

| 名称 | 说明 | 说明 |
| ------------- | -------------------------------- | -------------- |
| iteminfos | 地址列表项姓名/联系方式/默认一行 | 公共 |
| item-infos | 地址列表项姓名/联系方式/默认一行 | 公共 |
| itemicon | 地址列表项图标 | 公共 |
| itemaddr | 地址列表项详细地址 | 公共 |
| swiperight | 地址列表项右滑区域 | 滑动功能下使用 |
| longpressbtns | 地址列表项长按遮罩内容 | 长按功能下使用 |
| swipe-right | 地址列表项右滑区域 | 滑动功能下使用 |
| longpress-btns | 地址列表项长按遮罩内容 | 长按功能下使用 |

### data 数组中每一项 与 dataOptions 对象的参数磨平

Expand Down
6 changes: 3 additions & 3 deletions src/packages/__VUE/addresslist/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ export default {

| 名称 | 说明 | 说明 |
| ------------- | -------------------------------- | -------------- |
| iteminfos | 地址列表项姓名/联系方式/默认一行 | 公共 |
| item-infos | 地址列表项姓名/联系方式/默认一行 | 公共 |
| itemicon | 地址列表项图标 | 公共 |
| itemaddr | 地址列表项详细地址 | 公共 |
| swiperight | 地址列表项右滑区域 | 滑动功能下使用 |
| longpressbtns | 地址列表项长按遮罩内容 | 长按功能下使用 |
| swipe-right | 地址列表项右滑区域 | 滑动功能下使用 |
| longpress-btns | 地址列表项长按遮罩内容 | 长按功能下使用 |

### data 数组中每一项 与 dataOptions 对象的参数磨平

Expand Down
20 changes: 10 additions & 10 deletions src/packages/__VUE/addresslist/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
@longSet="clickLongSet"
@longDel="clickLongDel"
>
<template v-slot:contentInfo>
<slot name="iteminfos"></slot>
<template #content-info>
<slot name="item-infos"></slot>
</template>
<template v-slot:contentIcons>
<slot name="itemicon"></slot>
<template #content-icons>
<slot name="item-icon"></slot>
</template>
<template v-slot:contentAddrs>
<slot name="itemaddr"></slot>
<template #content-addrs>
<slot name="item-addr"></slot>
</template>
<template v-slot:longpressAll v-if="longPress">
<slot name="longpressbtns"></slot>
<template #longpress-all v-if="longPress">
<slot name="longpress-btns"></slot>
</template>
<template v-slot:swiperightbtn v-if="swipeEdition">
<slot name="swiperight"></slot>
<template #swipe-right-btn v-if="swipeEdition">
<slot name="swipe-right"></slot>
</template>
</general-shell>
<div class="nut-address-list__bottom" v-if="showBottomButton" @click="addAddress">
Expand Down
16 changes: 8 additions & 8 deletions src/packages/__VUE/addresslist/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
@longSet="clickLongSet"
@longDel="clickLongDel"
>
<template v-slot:contentInfo>
<slot name="iteminfos"></slot>
<template #content-info>
<slot name="item-infos"></slot>
</template>
<template v-slot:contentIcons>
<template #content-icons>
<slot name="itemicon"></slot>
</template>
<template v-slot:contentAddrs>
<template #content-addrs>
<slot name="itemaddr"></slot>
</template>
<template v-slot:longpressAll v-if="longPress">
<slot name="longpressbtns"></slot>
<template #longpress-all v-if="longPress">
<slot name="longpress-btns"></slot>
</template>
<template v-slot:swiperightbtn v-if="swipeEdition">
<slot name="swiperight"></slot>
<template #swipe-right-btn v-if="swipeEdition">
<slot name="swipe-right"></slot>
</template>
</general-shell>
<div class="nut-address-list__bottom" v-if="showBottomButton" @click="addAddress">
Expand Down
Loading

0 comments on commit eefeff2

Please sign in to comment.