@fe6/water-pro
Version:
An enterprise-class UI design language and Vue-based implementation
15 lines (13 loc) • 658 B
JavaScript
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
/** @format */
import { // throttle,
useThrottle } from './use-throttle';
/**
* @description: Applicable in components
*/
export function useDebounce(handle, wait) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return useThrottle(handle, wait, _extends(options, {
debounce: true
}));
}