@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yqg/permission",
3
- "version": "1.0.11-alpha.1",
3
+ "version": "1.0.11-alpha.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
package/src/App.vue CHANGED
@@ -53,7 +53,9 @@ const changeLocale = () => {
53
53
  :permissions="[]"
54
54
  :color="color"
55
55
  workNumber="02124"
56
- type="icon"
56
+ type="floatButton"
57
+ right="100px"
58
+ top="200px"
57
59
  >
58
60
  </yqg-permission>
59
61
  </data>
@@ -8,7 +8,7 @@
8
8
  }"
9
9
  >
10
10
  <div class="crane-wraper">
11
- <template v-if="type === comType.ICON">
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
- ICON: 'icon',
114
+ FLOATBUTTON: 'floatButton',
115
115
  DEFAULT: 'default',
116
116
  CUSTOM: 'custom',
117
117
  };
@@ -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