bugfix
This commit is contained in:
@ -1,4 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1 +0,0 @@
|
||||
/* components/infinite-scroll/index.wxss */
|
@ -1,44 +0,0 @@
|
||||
// components/infinite-scroll/index.ts
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
//@ts-ignore
|
||||
this._observer = wx.createIntersectionObserver(this);
|
||||
//@ts-ignore
|
||||
this._observer
|
||||
// .createIntersectionObserver()
|
||||
.relativeToViewport({ bottom: 100 })
|
||||
.observe(".load-more", (res: any) => {
|
||||
console.log(res);
|
||||
res.intersectionRatio; // 相交区域占目标节点的布局区域的比例
|
||||
res.intersectionRect; // 相交区域
|
||||
res.intersectionRect.left; // 相交区域的左边界坐标
|
||||
res.intersectionRect.top; // 相交区域的上边界坐标
|
||||
res.intersectionRect.width; // 相交区域的宽度
|
||||
res.intersectionRect.height; // 相交区域的高度
|
||||
});
|
||||
// //@ts-ignore
|
||||
// this._observer = wx.createIntersectionObserver(this);
|
||||
|
||||
// //@ts-ignore
|
||||
// this._observer.relativeTo(".scroll-view").observe(".load-more", (res) => {
|
||||
// console.log("到底了");
|
||||
// this.triggerEvent("loadmore", {}, {});
|
||||
// });
|
||||
},
|
||||
},
|
||||
});
|
@ -1,5 +0,0 @@
|
||||
<!--components/infinite-scroll/index.wxml-->
|
||||
<view>
|
||||
<slot></slot>
|
||||
<view class="load-more">load more</view>
|
||||
</view>
|
6
miniprogram/components/load-more/index.json
Normal file
6
miniprogram/components/load-more/index.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-loading": "tdesign-miniprogram/loading/loading"
|
||||
}
|
||||
}
|
15
miniprogram/components/load-more/index.scss
Normal file
15
miniprogram/components/load-more/index.scss
Normal file
@ -0,0 +1,15 @@
|
||||
/* components/load-more/index.wxss */
|
||||
.load-more {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 12rpx 0;
|
||||
.status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text {
|
||||
margin-left: 12rpx;
|
||||
font-size: small;
|
||||
}
|
||||
}
|
||||
}
|
21
miniprogram/components/load-more/index.ts
Normal file
21
miniprogram/components/load-more/index.ts
Normal file
@ -0,0 +1,21 @@
|
||||
// components/load-more/index.ts
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
status: {
|
||||
type: Number, // 0 loading,1 success, 3 error, 4:completed
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {},
|
||||
});
|
12
miniprogram/components/load-more/index.wxml
Normal file
12
miniprogram/components/load-more/index.wxml
Normal file
@ -0,0 +1,12 @@
|
||||
<!--components/load-more/index.wxml-->
|
||||
<view class="load-more">
|
||||
<t-loading wx:if="{{status==0}}" theme="circular" size="40rpx" text="加载中..." class="wrapper" />
|
||||
<view wx:elif="{{status==1}}" class="status success">
|
||||
</view>
|
||||
<view wx:elif="{{status==2}}" class="status error">
|
||||
<t-icon name="unhappy" color="#d54941" size="16" /><text>加载失败</text>
|
||||
</view>
|
||||
<view wx:elif="{{status==3}}" class="status completed">
|
||||
<t-icon name="thumb-up-2" color="#2ba471" size="16" /><text>没有更多</text>
|
||||
</view>
|
||||
</view>
|
@ -17,7 +17,7 @@
|
||||
.value {
|
||||
color: #0052d9;
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
// font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
margin-top: 6rpx;
|
||||
|
@ -2,8 +2,9 @@
|
||||
<wxs module="number" src="../../utils/number.wxs" />
|
||||
<view class="statistcs-card">
|
||||
<view wx:for="{{statisticsData}}" wx:key="key" wx:for-item="value" class="statistcs-item">
|
||||
<view class="value" wx:if="{{value.type=='money'}}">{{number.formatAmount(value.value)}}万元</view>
|
||||
<view class="value" wx:else="">{{value.value}}</view>
|
||||
<!-- <view class="value" wx:if="{{value.type=='money'}}">{{number.formatAmount(value.value)}}万元</view> -->
|
||||
|
||||
<view class="value">{{value.value}}</view>
|
||||
<view class="title">{{value.label}}</view>
|
||||
</view>
|
||||
</view>
|
Reference in New Issue
Block a user