提交 43db919d 编写于 作者: DCloud-yyl's avatar DCloud-yyl

Merge branch 'dev' into alpha

......@@ -2,7 +2,7 @@
<page-head :title="title"></page-head>
<view style="padding: 4px;">
<text class="hello-text">
真机运行标准基座仅包含系统定位,即system。\n
定位功能默认调用操作系统定位API实现。\n
部分手机因gms兼容不好可能导致无法定位。\n
gcj国标、逆地理信息等功能需三方sdk定位。如果需要类似能力可以下载腾讯定位插件,打包自定义基座。参考示例:</text>
<u-link :href="'https://ext.dcloud.net.cn/plugin?id=14569'" :text="'https://ext.dcloud.net.cn/plugin?id=14569'" :inWhiteList="true"></u-link>
......
......@@ -5,7 +5,7 @@
<list-view v-show="list_show" id="listview" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower">
<list-item v-for="index in item_count" class="item" @click="itemClick(index)">
<text >item-------<text>{{index}}</text></text>
<input :placeholder="index" :value= "index ==1 ? `第一个` :index "/>
<input style="border-width: 1px; border-style: solid;" :placeholder="index" :value= "index ==1 ? `第一个` :index "/>
</list-item>
</list-view>
</template>
......
......@@ -19,7 +19,7 @@
scrollData: [] as Array<string>,
refresherTriggered: false,
refresherrefresh: false,
showScrollbar: true
showScrollbar: false
};
},
onLoad() {
......
<template>
<view style="flex: 1;">
<scroll-view class="scroll-view"
:refresher-enabled="true" :refresher-triggered="refresherTriggered" refresher-default-style="none"
@refresherpulling="onRefresherpulling"
@refresherrefresh="onRefresherrefresh"
:refresher-threshold="refresherThreshold"
>
<view v-for="i in 20" class="content-item">
<text class="text">item-{{i}}</text>
</view>
<refresh-box slot="refresher" :state="state" :pullingDistance="pullingDistance"></refresh-box>
</scroll-view>
</view>
<scroll-view class="scroll-view"
:refresher-enabled="true" :refresher-triggered="refresherTriggered" refresher-default-style="none"
@refresherpulling="onRefresherpulling"
@refresherrefresh="onRefresherrefresh"
:refresher-threshold="refresherThreshold"
>
<view v-for="i in 20" class="content-item">
<text class="text">item-{{i}}</text>
</view>
<refresh-box slot="refresher" :state="state" :pullingDistance="pullingDistance"></refresh-box>
</scroll-view>
</template>
<script>
......@@ -23,14 +21,14 @@
refresherTriggered:false,
refresherThreshold:40,
pullingDistance:0,
resetting: false
resetting: false
}
},
computed:{
state():number{
if (this.resetting) {
return 3;
}
if (this.resetting) {
return 3;
}
if(this.refresherTriggered){
return 2
}
......@@ -45,9 +43,9 @@
onRefresherpulling(e:RefresherEvent){
// console.log('onRefresherpulling',e.detail.dy)
this.pullingDistance = e.detail.dy
if (this.pullingDistance.toDouble() == 0.0) {
this.resetting = false;
}
if (this.pullingDistance.toDouble() == 0.0) {
this.resetting = false;
}
},
onRefresherrefresh(){
this.refresherTriggered = true
......@@ -66,23 +64,23 @@
</script>
<style>
.scroll-view {
flex: 1;
padding: 5px 15px;
background-color: #f5f5f5;
}
.scroll-view {
flex: 1;
padding: 5px 15px;
background-color: #f5f5f5;
}
.content-item {
padding: 15px;
margin: 5px 0;
background-color: #fff;
border-radius: 5px;
}
.content-item {
padding: 15px;
margin: 5px 0;
background-color: #fff;
border-radius: 5px;
}
.text {
font-size: 14px;
color: #666;
line-height: 20px;
}
.text {
font-size: 14px;
color: #666;
line-height: 20px;
}
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册