Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ChenYFan_OHHH
uni-app
提交
e2b65a3a
U
uni-app
项目概览
ChenYFan_OHHH
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e2b65a3a
编写于
8月 03, 2022
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
60d89a77
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
558 addition
and
188 deletion
+558
-188
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+196
-64
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+362
-124
未找到文件。
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
e2b65a3a
...
...
@@ -7924,6 +7924,42 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
}
});
const
ICON_PATH_ORIGIN
=
"
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef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9H0ThGJbgZT/iR7yj+VqMS06Qr4+OFm2JdCxIa8lugzkJs5K6MfxAaYPUcBpYG5khZJEkUUSb7DPCnKRfPBXj6M8FwuegoLpCgXcQszVjhbJFUJUee2hBhLoYTIcYtB57KY+opSMdVqwatSlZVj05aV//CwJLMX2DluaUcwhXm4ali2XOoLjxUrPV26zFtF4f5p0Gp310+z13BUWNvbehEXona6iAtX/zVZmtfN4WixfsNky4S6gCCVVq3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII=
"
;
function
getMapInfo
()
{
if
(
__uniConfig
.
qqMapKey
)
{
return
{
type
:
"
qq
"
,
key
:
__uniConfig
.
qqMapKey
};
}
if
(
__uniConfig
.
googleMapKey
)
{
return
{
type
:
"
google
"
,
key
:
__uniConfig
.
googleMapKey
};
}
if
(
__uniConfig
.
aMapKey
)
{
return
{
type
:
"
AMap
"
,
key
:
__uniConfig
.
aMapKey
,
securityJsCode
:
__uniConfig
.
aMapSecurityJsCode
,
serviceHost
:
__uniConfig
.
aMapServiceHost
};
}
return
{
type
:
""
,
key
:
""
};
}
let
IS_AMAP
=
false
;
let
hasGetIsAMap
=
false
;
const
getIsAMap
=
()
=>
{
if
(
hasGetIsAMap
)
{
return
IS_AMAP
;
}
else
{
hasGetIsAMap
=
true
;
return
IS_AMAP
=
getMapInfo
().
type
===
"
AMap
"
;
}
};
const
props$7
=
{
id
:
{
type
:
[
Number
,
String
],
...
...
@@ -8013,10 +8049,17 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
const
onMapReady
=
vue
.
inject
(
"
onMapReady
"
);
const
updateMarkerLabelStyle
=
useMarkerLabelStyle
(
id
);
let
marker
;
function
removeMarkerCallout
(
callout
)
{
if
(
getIsAMap
())
{
callout
.
removeAMapText
();
}
else
{
callout
.
setMap
(
null
);
}
}
onMapReady
((
map
,
maps
,
trigger
)
=>
{
function
updateMarker
(
option
)
{
const
title
=
option
.
title
;
const
position
=
new
maps
.
LatLng
(
option
.
latitude
,
option
.
longitude
);
const
position
=
getIsAMap
()
?
new
maps
.
LngLat
(
option
.
longitude
,
option
.
latitude
)
:
new
maps
.
LatLng
(
option
.
latitude
,
option
.
longitude
);
const
img
=
new
Image
();
img
.
onload
=
()
=>
{
const
anchor
=
option
.
anchor
||
{};
...
...
@@ -8036,6 +8079,13 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
top
=
h
-
(
h
-
y
*
h
);
if
(
"
MarkerImage
"
in
maps
)
{
icon
=
new
maps
.
MarkerImage
(
img
.
src
,
null
,
null
,
new
maps
.
Point
(
x
*
w
,
y
*
h
),
new
maps
.
Size
(
w
,
h
));
}
else
if
(
"
Icon
"
in
maps
)
{
icon
=
new
maps
.
Icon
({
image
:
img
.
src
,
size
:
new
maps
.
Size
(
w
,
h
),
imageSize
:
new
maps
.
Size
(
w
,
h
),
imageOffset
:
new
maps
.
Pixel
(
x
*
w
,
y
*
h
)
});
}
else
{
icon
=
{
url
:
img
.
src
,
...
...
@@ -8077,13 +8127,33 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
});
marker
.
label
=
label
;
}
else
if
(
"
setLabel
"
in
marker
)
{
const
className
=
updateMarkerLabelStyle
(
labelStyle
);
marker
.
setLabel
({
text
:
labelOpt
.
content
,
color
:
labelStyle
.
color
,
fontSize
:
labelStyle
.
fontSize
,
className
});
if
(
getIsAMap
())
{
const
content
=
`<div style="
margin-left:
${
labelStyle
.
marginLeft
}
;
margin-top:
${
labelStyle
.
marginTop
}
;
padding:
${
labelStyle
.
padding
}
;
background-color:
${
labelStyle
.
backgroundColor
}
;
border-radius:
${
labelStyle
.
borderRadius
}
;
line-height:
${
labelStyle
.
lineHeight
}
;
color:
${
labelStyle
.
color
}
;
font-size:
${
labelStyle
.
fontSize
}
;
">
${
labelOpt
.
content
}
<div>`
;
marker
.
setLabel
({
content
,
direction
:
"
bottom-right
"
});
}
else
{
const
className
=
updateMarkerLabelStyle
(
labelStyle
);
marker
.
setLabel
({
text
:
labelOpt
.
content
,
color
:
labelStyle
.
color
,
fontSize
:
labelStyle
.
fontSize
,
className
});
}
}
}
const
calloutOpt
=
option
.
callout
||
{};
...
...
@@ -8095,6 +8165,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
position
,
map
,
top
,
offsetY
:
-
option
.
height
/
2
,
content
:
calloutOpt
.
content
,
color
:
calloutOpt
.
color
,
fontSize
:
calloutOpt
.
fontSize
,
...
...
@@ -8107,26 +8178,38 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
position
,
map
,
top
,
offsetY
:
-
option
.
height
/
2
,
content
:
title
,
boxShadow
};
if
(
callout
)
{
callout
.
setOption
(
calloutStyle
);
}
else
{
callout
=
marker
.
callout
=
new
maps
.
Callout
(
calloutStyle
);
callout
.
div
.
onclick
=
function
(
$event
)
{
if
(
id
!==
""
)
{
trigger
(
"
callouttap
"
,
$event
,
{
markerId
:
Number
(
id
)
});
}
$event
.
stopPropagation
();
$event
.
preventDefault
();
};
if
(
getIsAMap
())
{
const
callback
=
(
id2
)
=>
{
if
(
id2
!==
""
)
{
trigger
(
"
callouttap
"
,
{},
{
markerId
:
Number
(
id2
)
});
}
};
callout
=
marker
.
callout
=
new
maps
.
Callout
(
calloutStyle
,
callback
);
}
else
{
callout
=
marker
.
callout
=
new
maps
.
Callout
(
calloutStyle
);
callout
.
div
.
onclick
=
function
(
$event
)
{
if
(
id
!==
""
)
{
trigger
(
"
callouttap
"
,
$event
,
{
markerId
:
Number
(
id
)
});
}
$event
.
stopPropagation
();
$event
.
preventDefault
();
};
}
}
}
else
{
if
(
callout
)
{
callout
.
setMap
(
null
);
removeMarkerCallout
(
callout
);
delete
marker
.
callout
;
}
}
...
...
@@ -8144,17 +8227,25 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
autoRotation
:
false
});
updateMarker
(
props3
);
maps
.
event
.
addListener
(
marker
,
"
click
"
,
()
=>
{
const
MapsEvent
=
maps
.
event
||
maps
.
Event
;
MapsEvent
.
addListener
(
marker
,
"
click
"
,
()
=>
{
const
callout
=
marker
.
callout
;
if
(
callout
)
{
const
div
=
callout
.
div
;
const
parent
=
div
.
parentNode
;
if
(
!
callout
.
alwaysVisible
)
{
if
(
callout
&&
!
callout
.
alwaysVisible
)
{
if
(
getIsAMap
())
{
callout
.
visible
=
!
callout
.
visible
;
if
(
callout
.
visible
)
{
marker
.
callout
.
createAMapText
();
}
else
{
marker
.
callout
.
removeAMapText
();
}
}
else
{
callout
.
set
(
"
visible
"
,
!
callout
.
visible
);
}
if
(
callout
.
visible
)
{
parent
.
removeChild
(
div
);
parent
.
appendChild
(
div
);
if
(
callout
.
visible
)
{
const
div
=
callout
.
div
;
const
parent
=
div
.
parentNode
;
parent
.
removeChild
(
div
);
parent
.
appendChild
(
div
);
}
}
}
if
(
id
)
{
...
...
@@ -8189,7 +8280,8 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
const
distance
=
maps
.
geometry
.
spherical
.
computeDistanceBetween
(
a
,
b
)
/
1
e3
;
const
time
=
(
typeof
duration
===
"
number
"
?
duration
:
1
e3
)
/
(
1
e3
*
60
*
60
);
const
speed
=
distance
/
time
;
const
movingEvent
=
maps
.
event
.
addListener
(
marker
,
"
moving
"
,
(
e2
)
=>
{
const
MapsEvent
=
maps
.
event
||
maps
.
Event
;
const
movingEvent
=
MapsEvent
.
addListener
(
marker
,
"
moving
"
,
(
e2
)
=>
{
const
latLng
=
e2
.
latLng
;
const
label
=
marker
.
label
;
if
(
label
)
{
...
...
@@ -8200,7 +8292,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
callout
.
setPosition
(
latLng
);
}
});
const
event
=
maps
.
e
vent
.
addListener
(
marker
,
"
moveend
"
,
()
=>
{
const
event
=
MapsE
vent
.
addListener
(
marker
,
"
moveend
"
,
()
=>
{
event
.
remove
();
movingEvent
.
remove
();
marker
.
lastPosition
=
a
;
...
...
@@ -8232,7 +8324,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
marker
.
moveTo
(
b
,
speed
);
}
else
{
marker
.
setPosition
(
b
);
maps
.
e
vent
.
trigger
(
marker
,
"
moveend
"
,
{});
MapsE
vent
.
trigger
(
marker
,
"
moveend
"
,
{});
}
});
}
...
...
@@ -8345,7 +8437,8 @@ var MapPolyline = /* @__PURE__ */ defineSystemComponent({
function
addPolyline
(
option
)
{
const
path
=
[];
option
.
points
.
forEach
((
point
)
=>
{
path
.
push
(
new
maps
.
LatLng
(
point
.
latitude
,
point
.
longitude
));
const
pointPosition
=
getIsAMap
()
?
[
point
.
longitude
,
point
.
latitude
]
:
new
maps
.
LatLng
(
point
.
latitude
,
point
.
longitude
);
path
.
push
(
pointPosition
);
});
const
strokeWeight
=
Number
(
option
.
width
)
||
1
;
const
{
...
...
@@ -8446,7 +8539,7 @@ var MapCircle = /* @__PURE__ */ defineSystemComponent({
addCircle
(
option
);
}
function
addCircle
(
option
)
{
const
center
=
new
maps
.
LatLng
(
option
.
latitude
,
option
.
longitude
);
const
center
=
getIsAMap
()
?
[
option
.
longitude
,
option
.
latitude
]
:
new
maps
.
LatLng
(
option
.
latitude
,
option
.
longitude
);
const
circleOptions
=
{
map
,
center
,
...
...
@@ -8455,28 +8548,37 @@ var MapCircle = /* @__PURE__ */ defineSystemComponent({
strokeWeight
:
Number
(
option
.
strokeWidth
)
||
1
,
strokeDashStyle
:
"
solid
"
};
const
{
r
:
fr
,
g
:
fg
,
b
:
fb
,
a
:
fa
}
=
hexToRgba
(
option
.
fillColor
);
const
{
r
:
sr
,
g
:
sg
,
b
:
sb
,
a
:
sa
}
=
hexToRgba
(
option
.
color
);
if
(
"
Color
"
in
maps
)
{
circleOptions
.
fillColor
=
new
maps
.
Color
(
fr
,
fg
,
fb
,
fa
);
circleOptions
.
strokeColor
=
new
maps
.
Color
(
sr
,
sg
,
sb
,
sa
);
if
(
getIsAMap
())
{
circleOptions
.
strokeColor
=
option
.
color
;
circleOptions
.
fillColor
=
option
.
fillColor
||
"
#000
"
;
circleOptions
.
fillOpacity
=
1
;
}
else
{
circleOptions
.
fillColor
=
`rgb(
${
fr
}
,
${
fg
}
,
${
fb
}
)`
;
circleOptions
.
fillOpacity
=
fa
;
circleOptions
.
strokeColor
=
`rgb(
${
sr
}
,
${
sg
}
,
${
sb
}
)`
;
circleOptions
.
strokeOpacity
=
sa
;
const
{
r
:
fr
,
g
:
fg
,
b
:
fb
,
a
:
fa
}
=
hexToRgba
(
option
.
fillColor
);
const
{
r
:
sr
,
g
:
sg
,
b
:
sb
,
a
:
sa
}
=
hexToRgba
(
option
.
color
);
if
(
"
Color
"
in
maps
)
{
circleOptions
.
fillColor
=
new
maps
.
Color
(
fr
,
fg
,
fb
,
fa
);
circleOptions
.
strokeColor
=
new
maps
.
Color
(
sr
,
sg
,
sb
,
sa
);
}
else
{
circleOptions
.
fillColor
=
`rgb(
${
fr
}
,
${
fg
}
,
${
fb
}
)`
;
circleOptions
.
fillOpacity
=
fa
;
circleOptions
.
strokeColor
=
`rgb(
${
sr
}
,
${
sg
}
,
${
sb
}
)`
;
circleOptions
.
strokeOpacity
=
sa
;
}
}
circle
=
new
maps
.
Circle
(
circleOptions
);
if
(
getIsAMap
())
{
map
.
add
(
circle
);
}
}
addCircle
(
props2
);
vue
.
watch
(
props2
,
updateCircle
);
...
...
@@ -8502,6 +8604,10 @@ const props$4 = {
clickable
:
{
type
:
[
Boolean
,
String
],
default
:
""
},
rootRef
:
{
type
:
Object
,
default
:
null
}
};
var
MapControl
=
/* @__PURE__ */
defineSystemComponent
({
...
...
@@ -8529,6 +8635,8 @@ var MapControl = /* @__PURE__ */ defineSystemComponent({
style
.
position
=
"
absolute
"
;
style
.
width
=
"
0
"
;
style
.
height
=
"
0
"
;
style
.
top
=
"
0
"
;
style
.
left
=
"
0
"
;
img
.
onload
=
()
=>
{
if
(
option
.
position
.
width
)
{
img
.
width
=
option
.
position
.
width
;
...
...
@@ -8550,7 +8658,11 @@ var MapControl = /* @__PURE__ */ defineSystemComponent({
});
}
};
map
.
controls
[
maps
.
ControlPosition
.
TOP_LEFT
].
push
(
control
);
if
(
getIsAMap
())
{
props2
.
rootRef
.
value
&&
props2
.
rootRef
.
value
.
appendChild
(
control
);
}
else
{
map
.
controls
[
maps
.
ControlPosition
.
TOP_LEFT
].
push
(
control
);
}
}
addControl
(
props2
);
vue
.
watch
(
props2
,
updateControl
);
...
...
@@ -8629,7 +8741,7 @@ var MapPolygon = /* @__PURE__ */ defineSystemComponent({
latitude
,
longitude
}
=
item
;
return
new
maps
.
LatLng
(
latitude
,
longitude
);
return
getIsAMap
()
?
[
longitude
,
latitude
]
:
new
maps
.
LatLng
(
latitude
,
longitude
);
});
const
{
r
:
fcR
,
...
...
@@ -8753,6 +8865,15 @@ function getPoints(points) {
}
return
newPoints
;
}
function
getAMapPosition
(
maps
,
latitude
,
longitude
)
{
return
new
maps
.
LngLat
(
longitude
,
latitude
);
}
function
getGoogleOrQQMapPosition
(
maps
,
latitude
,
longitude
)
{
return
new
maps
.
LatLng
(
latitude
,
longitude
);
}
function
getMapPosition
(
maps
,
latitude
,
longitude
)
{
return
getIsAMap
()
?
getAMapPosition
(
maps
,
latitude
,
longitude
)
:
getGoogleOrQQMapPosition
(
maps
,
latitude
,
longitude
);
}
function
getLat
(
latLng
)
{
if
(
"
getLat
"
in
latLng
)
{
return
latLng
.
getLat
();
...
...
@@ -8802,15 +8923,24 @@ function useMap(props2, rootRef, emit2) {
deep
:
true
});
function
updateBounds
()
{
const
bounds
=
new
maps
.
LatLngBounds
();
state
.
includePoints
.
forEach
(({
latitude
,
longitude
})
=>
{
const
latLng
=
new
maps
.
LatLng
(
latitude
,
longitude
);
bounds
.
extend
(
latLng
);
});
map
.
fitBounds
(
bounds
);
if
(
getIsAMap
())
{
const
points
=
[];
state
.
includePoints
.
forEach
((
point
)
=>
{
points
.
push
([
point
.
longitude
,
point
.
latitude
]);
});
const
bounds
=
new
maps
.
Bounds
(...
points
);
map
.
setBounds
(
bounds
);
}
else
{
const
bounds
=
new
maps
.
LatLngBounds
();
state
.
includePoints
.
forEach
(({
latitude
,
longitude
})
=>
{
const
latLng
=
new
maps
.
LatLng
(
latitude
,
longitude
);
bounds
.
extend
(
latLng
);
});
map
.
fitBounds
(
bounds
);
}
}
try
{
const
id
=
useContextInfo
();
...
...
@@ -8932,7 +9062,9 @@ var index$c = /* @__PURE__ */ defineBuiltInComponent({
"
style
"
:
"
width: 100%; height: 100%; position: relative; overflow: hidden
"
},
null
,
512
),
props2
.
markers
.
map
((
item
)
=>
vue
.
createVNode
(
MapMarker
,
vue
.
mergeProps
({
"
key
"
:
item
.
id
},
item
),
null
,
16
)),
props2
.
polyline
.
map
((
item
)
=>
vue
.
createVNode
(
MapPolyline
,
item
,
null
,
16
)),
props2
.
circles
.
map
((
item
)
=>
vue
.
createVNode
(
MapCircle
,
item
,
null
,
16
)),
props2
.
controls
.
map
((
item
)
=>
vue
.
createVNode
(
MapControl
,
item
,
null
,
16
)),
props2
.
showLocation
&&
vue
.
createVNode
(
MapLocation
,
null
,
null
),
props2
.
polygons
.
map
((
item
)
=>
vue
.
createVNode
(
MapPolygon
,
item
,
null
,
16
)),
vue
.
createVNode
(
"
div
"
,
{
},
item
),
null
,
16
)),
props2
.
polyline
.
map
((
item
)
=>
vue
.
createVNode
(
MapPolyline
,
item
,
null
,
16
)),
props2
.
circles
.
map
((
item
)
=>
vue
.
createVNode
(
MapCircle
,
item
,
null
,
16
)),
props2
.
controls
.
map
((
item
)
=>
vue
.
createVNode
(
MapControl
,
vue
.
mergeProps
(
item
,
{
"
rootRef
"
:
rootRef
}),
null
,
16
,
[
"
rootRef
"
])),
props2
.
showLocation
&&
vue
.
createVNode
(
MapLocation
,
null
,
null
),
props2
.
polygons
.
map
((
item
)
=>
vue
.
createVNode
(
MapPolygon
,
item
,
null
,
16
)),
vue
.
createVNode
(
"
div
"
,
{
"
style
"
:
"
position: absolute;top: 0;width: 100%;height: 100%;overflow: hidden;pointer-events: none;
"
},
[
slots
.
default
&&
slots
.
default
()])],
8
,
[
"
id
"
]);
};
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
e2b65a3a
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录