@lambo-design/shared 1.0.0-beta.383 → 1.0.0-beta.384
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {on} from '@lambo-design/shared/utils/dom'
|
|
2
|
-
import {buildMenuUri} from '@lambo-design/shared/utils/platform'
|
|
2
|
+
import {addOttCode, buildMenuUri} from '@lambo-design/shared/utils/platform'
|
|
3
3
|
import config from '@lambo-design/shared/config/config'
|
|
4
4
|
|
|
5
5
|
export default {
|
|
@@ -29,15 +29,15 @@ export default {
|
|
|
29
29
|
canMove = false
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
const handleMousemove = e => {
|
|
32
|
+
const handleMousemove = async e => {
|
|
33
33
|
let xOffset = e.pageX - pageX + transformX
|
|
34
34
|
let yOffset = e.pageY - pageY + transformY
|
|
35
35
|
if (canMove) {
|
|
36
36
|
bodyDom.style.transform = `translate(${xOffset}px, ${yOffset}px)`
|
|
37
37
|
//bodyDom.style.position = `absolute`
|
|
38
38
|
//bodyDom.style.zIndex = `99999`
|
|
39
|
-
if (
|
|
40
|
-
|| Math.abs(yOffset) > parseInt(config.draggableMenuConfig.yOffset)
|
|
39
|
+
if (Math.abs(xOffset) > parseInt(config.draggableMenuConfig.xOffset)
|
|
40
|
+
|| Math.abs(yOffset) > parseInt(config.draggableMenuConfig.yOffset)) {
|
|
41
41
|
hasMove = true;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -57,12 +57,13 @@ export default {
|
|
|
57
57
|
let bodyDom = document.querySelector(binding.value.body)
|
|
58
58
|
bodyDom.style.transform = ''
|
|
59
59
|
}
|
|
60
|
+
item = await addOttCode(item)
|
|
60
61
|
window.open(buildMenuUri(item))
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
const handleMouseup = e => {
|
|
66
|
+
const handleMouseup = async e => {
|
|
66
67
|
if (binding.value.item && hasMove) {
|
|
67
68
|
let item = binding.value.item;
|
|
68
69
|
if (item.uri) {
|
|
@@ -72,6 +73,7 @@ export default {
|
|
|
72
73
|
let bodyDom = document.querySelector(binding.value.body)
|
|
73
74
|
bodyDom.style.transform = ''
|
|
74
75
|
}
|
|
76
|
+
item = await addOttCode(item)
|
|
75
77
|
window.open(buildMenuUri(item))
|
|
76
78
|
}
|
|
77
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/shared",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.384",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"nanoid": "^3.3.7",
|
|
27
27
|
"node-rsa": "^1.1.1",
|
|
28
28
|
"qs": "^6.11.0",
|
|
29
|
-
"@lambo-design/xlsx
|
|
30
|
-
"@lambo-design/xlsx": "^1.0.0-beta.
|
|
29
|
+
"@lambo-design/xlsx": "^1.0.0-beta.2",
|
|
30
|
+
"@lambo-design/xlsx-style": "^1.0.0-beta.9"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"vue": "^2.6.12"
|
package/utils/platform.js
CHANGED
|
@@ -1335,7 +1335,7 @@ export const getOttCode = async () => {
|
|
|
1335
1335
|
}
|
|
1336
1336
|
export const addOttCode = async (item) => {
|
|
1337
1337
|
if (item && item.uri && isYqqh(item)) {
|
|
1338
|
-
let ott = getOttCode();
|
|
1338
|
+
let ott = await getOttCode();
|
|
1339
1339
|
if (ott) {
|
|
1340
1340
|
item.ott = ott;
|
|
1341
1341
|
}
|