浏览代码

Merge pull request #31 from mrlovables/fix-BottomSheet

Optimize BottomSheet components sliding animation effect
dufu1991 1 年之前
父节点
当前提交
28e7add90d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/stdf/components/bottomSheet/BottomSheet.svelte

+ 2 - 2
packages/stdf/components/bottomSheet/BottomSheet.svelte

@@ -1,7 +1,7 @@
 <script>
 	import { onMount, createEventDispatcher, getContext } from 'svelte';
 	import { fly } from 'svelte/transition';
-	import { throttle } from '../utils';
+	import { throttleWithRAF } from '../utils';
 	import zh_CN from '../../lang/zh_CN';
 
 	import Mask from '../mask/Mask.svelte';
@@ -355,7 +355,7 @@
 		>
 			<div
 				on:pointerdown={touchstartFun}
-				on:pointermove={throttle(touchmoveFun)}
+				on:pointermove={throttleWithRAF(touchmoveFun)}
 				on:pointerup={touchendFun}
 				bind:this={scrollTopDom}
 				class="py-1 touch-none cursor-move select-none"