Browse Source

fix(timeselect): add lock-scroll props(#1343)

suzigang 3 years ago
parent
commit
e69ebba5e0

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

@@ -207,6 +207,7 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
 | title                 | Bomb layer title                                                    | String  | `Pickup Time`
 | title                 | Bomb layer title                                                    | String  | `Pickup Time`
 | current-key                 | Unique identification                                                    | String、Number  | `0`
 | current-key                 | Unique identification                                                    | String、Number  | `0`
 | current-time                 | The currently selected time, the array element contains:key: string; list: string[]      | Array  | `[]`
 | current-time                 | The currently selected time, the array element contains:key: string; list: string[]      | Array  | `[]`
+| lock-scroll            | Whether the background is locked                         | Boolean        | `false`       |
 
 
 ### TimePannel Prop
 ### TimePannel Prop
 
 

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

@@ -207,6 +207,7 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
 | title                 | 弹层标题                                                    | String  | `取件时间`
 | title                 | 弹层标题                                                    | String  | `取件时间`
 | current-key                 | 唯一标识                                                    | String、Number  | `0`
 | current-key                 | 唯一标识                                                    | String、Number  | `0`
 | current-time                 | 当前选择的时间,数组元素包含:key: string; list: string[]      | Array  | `[]`
 | current-time                 | 当前选择的时间,数组元素包含:key: string; list: string[]      | Array  | `[]`
+| lock-scroll            | 背景是否锁定                                                | Boolean        | `false`       |
 
 
 ### TimePannel Prop
 ### TimePannel Prop
 
 

+ 5 - 0
src/packages/__VUE/timeselect/index.taro.vue

@@ -5,6 +5,7 @@
     round
     round
     :visible="visible"
     :visible="visible"
     :style="popStyle"
     :style="popStyle"
+    :lock-scroll="lockScroll"
     @click-overlay="close"
     @click-overlay="close"
     @click-close-icon="close"
     @click-close-icon="close"
   >
   >
@@ -56,6 +57,10 @@ export default create({
     muti: {
     muti: {
       type: [Boolean],
       type: [Boolean],
       default: false
       default: false
+    },
+    lockScroll: {
+      type: [Boolean],
+      default: false
     }
     }
   },
   },
   emits: ['update:visible', 'select'],
   emits: ['update:visible', 'select'],

+ 5 - 0
src/packages/__VUE/timeselect/index.vue

@@ -6,6 +6,7 @@
     :isWrapTeleport="isWrapTeleport"
     :isWrapTeleport="isWrapTeleport"
     :visible="visible"
     :visible="visible"
     :style="popStyle"
     :style="popStyle"
+    :lock-scroll="lockScroll"
     @click-overlay="close"
     @click-overlay="close"
     @click-close-icon="close"
     @click-close-icon="close"
   >
   >
@@ -54,6 +55,10 @@ export default create({
         return [];
         return [];
       }
       }
     },
     },
+    lockScroll: {
+      type: [Boolean],
+      default: false
+    },
     isWrapTeleport: {
     isWrapTeleport: {
       type: Boolean,
       type: Boolean,
       default: false
       default: false