nhanh-pure-function 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/User.js +5 -8
- package/package.json +1 -1
package/lib/User.js
CHANGED
|
@@ -394,19 +394,16 @@ export class _LoadingController {
|
|
|
394
394
|
* @param options.uiLibrary 项目使用的 ui库 , 用于排除 ui库 创建的元素 , 避免点击 ui库 创建的元素时意外的执行 callback
|
|
395
395
|
* @param options.isClickAllowed 是否允许该点击 ( 如果不确定可以返回 undefined )
|
|
396
396
|
*/
|
|
397
|
-
export function _CloseOnOutsideClick(
|
|
398
|
-
querySelector,
|
|
399
|
-
callback,
|
|
400
|
-
options = {
|
|
401
|
-
uiLibrary: ["naiveUI", "ElementPlus", "Element"],
|
|
402
|
-
}
|
|
403
|
-
) {
|
|
397
|
+
export function _CloseOnOutsideClick(querySelector, callback, options) {
|
|
404
398
|
function end() {
|
|
405
399
|
callback();
|
|
406
400
|
document.removeEventListener("mousedown", mousedown);
|
|
407
401
|
}
|
|
408
402
|
function mousedown(event) {
|
|
409
|
-
const {
|
|
403
|
+
const {
|
|
404
|
+
isClickAllowed,
|
|
405
|
+
uiLibrary = ["naiveUI", "ElementPlus", "Element"],
|
|
406
|
+
} = options || {};
|
|
410
407
|
|
|
411
408
|
if (isClickAllowed) {
|
|
412
409
|
const bool = isClickAllowed(event);
|