Browse Source

fix(address): add lock-scroll props

suzigang 3 years ago
parent
commit
80a6122bab

+ 1 - 0
src/packages/__VUE/address/doc.en-US.md

@@ -546,6 +546,7 @@ If you want to select a province, you need to set the region ID in the order of
 | 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

+ 1 - 0
src/packages/__VUE/address/doc.md

@@ -548,6 +548,7 @@ app.use(Elevator);
 | exist-address-title| 已有地址文案 ,type=‘exist’ 时生效| String | '配送至'
 | custom-and-exist-title| 自定义地址与已有地址切换按钮文案 ,type=‘exist’ 时生效| String | '选择其他地址'
 | columns-placeholder | 列提示文字 | String|Array | '请选择'
+| lock-scroll  | 背景是否锁定      | Boolean        | `true`       
 
 
   * provinceName 省的名字

+ 3 - 0
src/packages/__VUE/address/index.taro.vue

@@ -1,6 +1,7 @@
 <template>
   <nut-popup
     position="bottom"
+    :lock-scroll="lockScroll"
     @close="close"
     @click-overlay="clickOverlay"
     @open="closeWay = 'self'"
@@ -127,6 +128,7 @@
 </template>
 <script lang="ts">
 import { reactive, ref, toRefs, watch, computed, onMounted } from 'vue';
+import { popupProps } from '../popup/index.taro.vue';
 import { createComponent } from '@/packages/utils/create';
 import Taro from '@tarojs/taro';
 
@@ -154,6 +156,7 @@ interface AddressList {
 export default create({
   inheritAttrs: false,
   props: {
+    ...popupProps,
     modelValue: {
       type: Array,
       default: () => []

+ 1 - 0
src/packages/__VUE/address/index.vue

@@ -1,6 +1,7 @@
 <template>
   <nut-popup
     position="bottom"
+    :lock-scroll="lockScroll"
     @close="close"
     @click-overlay="clickOverlay"
     @open="closeWay = 'self'"