Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Velpro187
uni-app
提交
27790c75
U
uni-app
项目概览
Velpro187
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
27790c75
编写于
11月 05, 2020
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(h5): 优化地图选点组件
上级
9813d0e9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
28 deletion
+32
-28
src/platforms/h5/components/system-routes/choose-location/index.vue
...rms/h5/components/system-routes/choose-location/index.vue
+32
-28
未找到文件。
src/platforms/h5/components/system-routes/choose-location/index.vue
浏览文件 @
27790c75
...
...
@@ -9,17 +9,17 @@
@
regionchange=
"_regionchange"
>
<div
class=
"map-location"
/>
<div
class=
"map-move"
@
click=
"_moveToLocation"
<div
class=
"map-move"
@
click=
"_moveToLocation"
>
<i>

</i>
</div>
</v-uni-map>
<div
class=
"nav"
>
<div
class=
"nav-btn back"
@
click=
"_back"
<div
class=
"nav-btn back"
@
click=
"_back"
>
<i
class=
"uni-btn-icon"
>

</i>
</div>
...
...
@@ -51,14 +51,14 @@
取消
</div>
</div>
<v-uni-scroll-view
scroll-y
class=
"list"
@
scrolltolower=
"_scrolltolower"
<v-uni-scroll-view
scroll-y
class=
"list"
@
scrolltolower=
"_scrolltolower"
>
<div
v-if=
"loading"
class=
"list-loading"
<div
v-if=
"loading"
class=
"list-loading"
>
<i
class=
"uni-loading"
/>
</div>
...
...
@@ -67,7 +67,11 @@
:key=
"index"
class=
"list-item"
:class=
"
{ selected: selectedIndex === index }"
@click="selectedIndex = index"
@click="
selectedIndex = index;
latitude = item.latitude;
longitude = item.longitude;
"
>
<div
class=
"list-item-title"
>
{{
item
.
name
}}
...
...
@@ -117,12 +121,6 @@ export default {
this
.
_getList
()
}
},
1000
)
this
.
$watch
(()
=>
this
.
latitude
+
this
.
longitude
,
()
=>
{
if
(
!
this
.
searching
)
{
this
.
_reset
()
this
.
_getList
()
}
})
this
.
$watch
(
'
searching
'
,
val
=>
{
this
.
_reset
()
if
(
!
val
)
{
...
...
@@ -147,21 +145,19 @@ export default {
_moveToLocation
()
{
uni
.
getLocation
({
type
:
'
gcj02
'
,
success
:
({
latitude
,
longitude
})
=>
{
this
.
latitude
=
latitude
this
.
longitude
=
longitude
},
success
:
this
.
_move
.
bind
(
this
),
fail
:
()
=>
{
this
.
latitude
=
39.90960456049752
this
.
longitude
=
116.3972282409668
this
.
_move
({
latitude
:
39.90960456049752
,
longitude
:
116.3972282409668
})
}
})
},
_regionchange
({
detail
:
{
centerLocation
}
})
{
if
(
centerLocation
)
{
// TODO 图钉 icon 动画
this
.
latitude
=
centerLocation
.
latitude
this
.
longitude
=
centerLocation
.
longitude
this
.
_move
(
centerLocation
)
}
},
_pushData
(
array
)
{
...
...
@@ -203,6 +199,14 @@ export default {
this
.
pageIndex
=
1
this
.
list
=
[]
},
_move
({
latitude
,
longitude
})
{
this
.
latitude
=
latitude
this
.
longitude
=
longitude
if
(
!
this
.
searching
)
{
this
.
_reset
()
this
.
_getList
()
}
},
_input
()
{
this
.
_search
()
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录