@yqg/permission 1.0.11-alpha.1 → 1.0.11-alpha.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/dist/{apply-modal-DzBZAre7.js → apply-modal-CdEg70GU.js} +3 -3
- package/dist/{checkbox-item-CaD-ZykA.js → checkbox-item-Duly3rHV.js} +3 -3
- package/dist/{index-BqOcXwYK.js → index-Cv0dL3i_.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +2 -2
- package/dist/{yqg-permission-Dm5rWeBr.js → yqg-permission-BbjS_00F.js} +225 -223
- package/package.json +1 -1
- package/src/App.vue +3 -1
- package/src/components/yqg-permission.vue +2 -2
- package/src/hooks/useDragable.ts +6 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
10
|
<div class="crane-wraper">
|
|
11
|
-
<template v-if="type === comType.
|
|
11
|
+
<template v-if="type === comType.FLOATBUTTON">
|
|
12
12
|
<FloatButton
|
|
13
13
|
ref="dragElement"
|
|
14
14
|
type="primary"
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
} as const;
|
|
112
112
|
|
|
113
113
|
const comType = {
|
|
114
|
-
|
|
114
|
+
FLOATBUTTON: 'floatButton',
|
|
115
115
|
DEFAULT: 'default',
|
|
116
116
|
CUSTOM: 'custom',
|
|
117
117
|
};
|
package/src/hooks/useDragable.ts
CHANGED
|
@@ -38,6 +38,12 @@ export default function useDraggable(props: { top: any }, showModal: () => void)
|
|
|
38
38
|
const onMouseMove = (e: MouseEvent, el: HTMLElement) => {
|
|
39
39
|
if (!isDragging.value) return;
|
|
40
40
|
|
|
41
|
+
// 移动的时候yqg-permission-tooltip隐藏
|
|
42
|
+
const tooltip = document.querySelector('.yqg-permission-tooltip') as HTMLElement;
|
|
43
|
+
if (tooltip) {
|
|
44
|
+
tooltip.style.display = 'none';
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
const { clientX, clientY } = e;
|
|
42
48
|
const { x, y } = constrainToScreen(clientX - startX.value + initialX.value, clientY - currentTop.value + initialY.value, el);
|
|
43
49
|
|