mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 08:37:23 +00:00
chore(@vant/use): export types
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
export { useRect } from './useRect';
|
||||
export { useToggle } from './useToggle';
|
||||
export { useClickAway } from './useClickAway';
|
||||
export { useWindowSize } from './useWindowSize';
|
||||
export { useScrollParent } from './useScrollParent';
|
||||
export { useEventListener } from './useEventListener';
|
||||
export { usePageVisibility } from './usePageVisibility';
|
||||
export { useParent, useChildren } from './useRelation';
|
||||
export * from './useRect';
|
||||
export * from './useToggle';
|
||||
export * from './useClickAway';
|
||||
export * from './useWindowSize';
|
||||
export * from './useScrollParent';
|
||||
export * from './useEventListener';
|
||||
export * from './usePageVisibility';
|
||||
export * from './useRelation';
|
||||
export * from './utils';
|
||||
|
@@ -28,7 +28,7 @@ const MINUTE = 60 * SECOND;
|
||||
const HOUR = 60 * MINUTE;
|
||||
const DAY = 24 * HOUR;
|
||||
|
||||
export function parseTime(time: number): CurrentTime {
|
||||
function parseTime(time: number): CurrentTime {
|
||||
const days = Math.floor(time / DAY);
|
||||
const hours = Math.floor((time % DAY) / HOUR);
|
||||
const minutes = Math.floor((time % HOUR) / MINUTE);
|
||||
|
@@ -11,7 +11,7 @@ function isElement(node: Element) {
|
||||
|
||||
// http://w3help.org/zh-cn/causes/SD9013
|
||||
// http://stackoverflow.com/questions/17016740/onscroll-function-is-not-working-for-chrome
|
||||
export function getScrollParent(el: Element, root: ScrollElement = window) {
|
||||
function getScrollParent(el: Element, root: ScrollElement = window) {
|
||||
let node = el;
|
||||
|
||||
while (node && node !== root && isElement(node)) {
|
||||
|
Reference in New Issue
Block a user