project init

This commit is contained in:
2023-01-28 14:37:45 +08:00
parent fa1176f658
commit 3a134326e7
83 changed files with 1482 additions and 140 deletions

View File

@@ -0,0 +1,6 @@
Page({
data: {},
onLoad: function (options) {
}
});

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {
}
}

View File

View File

View File

@@ -19,7 +19,8 @@ function initPieChart(canvas, width, height, dpr) {
radius: ['0%', '70%'],
data: [{
value: 55,
name: '数码产品'
name: '数码产品',
id: 1
}, {
value: 20,
name: '零食'
@@ -35,8 +36,10 @@ function initPieChart(canvas, width, height, dpr) {
}]
}]
};
chart.setOption(option);
chart.on('click', 'series.pie', function(param) {
console.log(param.data)
});
return chart;
}

View File

@@ -11,19 +11,21 @@
</view>
<view class="padding_box">
<t-divider dashed content="账单明细"/>
<view wx:if="{{accountList != null && accountList.length > 0}}">
<t-cell wx:for="{{accountList}}" wx:key="index"
title="{{item.title}}"
description="{{item.dateTime}} • {{item.from}}"
align="top"
image="https://tdesign.gtimg.com/mobile/%E5%9B%BE%E7%89%87.png"
note="{{item.money}}"
class="t-cell-{{item.type}}"
/>
</view>
<view wx:else class="empty-view" >
<t-empty icon="chart-bubble" description="今日还未记账" />
</view>
</view>
<view wx:if="{{accountList != null && accountList.length > 0}}">
<t-cell-group theme="card">
<t-cell wx:for="{{accountList}}" wx:key="index"
title="{{item.title}}"
description="{{item.dateTime}} • {{item.from}}"
align="top"
image="/image/bill/4.png"
note="{{item.money}}"
class="t-cell-{{item.type}}"
/>
</t-cell-group>
</view>
<view wx:else class="empty-view" >
<t-empty icon="chart-bubble" description="今日还未记账" />
</view>
</t-tab-panel>
<t-tab-panel label="支出分类" value="1">
@@ -31,15 +33,14 @@
<ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ecPie }}"></ec-canvas>
<view class="padding_box">
<t-progress label="数码产品55%" theme="plump" percentage="{{55}}" status="{{55 > 80 ? 'error' : 'success' }}" />
<t-divider/>
<view class="tabs_crevice"/>
<t-progress label="零食20%" theme="plump" percentage="{{20}}" status="{{81 > 80 ? 'error' : 'success' }}" />
<t-divider/>
<view class="tabs_crevice"/>
<t-progress label="娱乐10%" theme="plump" percentage="{{10}}" status="{{10 > 80 ? 'error' : 'success' }}" />
<t-divider/>
<view class="tabs_crevice"/>
<t-progress label="房贷20%" theme="plump" percentage="{{20}}" status="{{20 > 80 ? 'error' : 'success' }}" />
<t-divider/>
<view class="tabs_crevice"/>
<t-progress label="房租38%" theme="plump" percentage="{{38}}" status="{{38 > 80 ? 'error' : 'success' }}" />
<t-divider/>
</view>
</view>
</t-tab-panel>
@@ -49,20 +50,22 @@
</view>
</t-tab-panel>
<t-tab-panel label="排行" value="3">
<t-divider/>
<t-tabs defaultValue="{{0}}" t-class="custom-tabs" theme="card">
<t-tab-panel label="支出" value="0">
<t-divider/>
<view class="test">
<view class="tabs_crevice"/>
<view class="padding_box big_progress">
<t-progress label="数码产品45%" theme="plump" percentage="{{45}}" status="error" />
<view class="tabs_crevice"/>
<t-progress label="房租25%" theme="plump" percentage="{{25}}" status="error" />
<view class="tabs_crevice"/>
<t-progress label="干饭10%" theme="plump" percentage="{{15}}" status="error" />
</view>
</t-tab-panel>
<t-tab-panel label="收入" value="1">
<t-divider/>
<view class="test">
<view class="tabs_crevice"/>
<view class="padding_box big_progress">
<t-progress label="工资收入80%" theme="plump" percentage="{{80}}" status="success" />
<view class="tabs_crevice"/>
<t-progress label="捡钱20%" theme="plump" percentage="{{20}}" status="success" />
</view>
</t-tab-panel>

View File

@@ -11,15 +11,14 @@ ec-canvas {
width: 100%;
height: 100%;
}
.test .t-progress--plump {
.tabs_crevice {
height: 30rpx;
}
.big_progress .t-progress--plump {
height: 100rpx !important;
border-bottom: 2rpx solid orange;
border-radius: 0 !important;
/*--td-font-size-s: 28rpx;*/
}
.test .t-progress__inner {
.big_progress .t-progress__inner {
--td-radius-round: 0;
}
.test .t-progress__bar {
--td-progress-track-bg-color: --td-bg-color;
}