project init & fix ui
This commit is contained in:
44
pages/chart/index.js
Normal file
44
pages/chart/index.js
Normal file
@@ -0,0 +1,44 @@
|
||||
Page({
|
||||
data: {
|
||||
// 指定选择区间起始值
|
||||
start: '2000-01-01 00:00:00',
|
||||
end: '2030-09-09 12:12:12',
|
||||
showDateVisible:false,
|
||||
showDate:'2022-01',
|
||||
},
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
if (wx.canIUse('hideHomeButton')) {
|
||||
wx.hideHomeButton()
|
||||
}
|
||||
},
|
||||
showPicker(e) {
|
||||
console.log('12312312')
|
||||
console.log(e.currentTarget.dataset)
|
||||
const { mode } = e.currentTarget.dataset;
|
||||
this.setData({
|
||||
mode,
|
||||
[`${mode}Visible`]: true,
|
||||
});
|
||||
},
|
||||
hidePicker() {
|
||||
const { mode } = this.data;
|
||||
this.setData({
|
||||
[`${mode}Visible`]: false,
|
||||
});
|
||||
},
|
||||
onConfirm(e) {
|
||||
const { value } = e.detail;
|
||||
const { mode } = this.data;
|
||||
console.log('confim', value);
|
||||
this.setData({
|
||||
[mode]: value
|
||||
// [`${mode}Text`]: value,
|
||||
});
|
||||
|
||||
this.hidePicker();
|
||||
}
|
||||
|
||||
});
|
||||
5
pages/chart/index.json
Normal file
5
pages/chart/index.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
},
|
||||
"navigationBarTitleText": "统计"
|
||||
}
|
||||
38
pages/chart/index.wxml
Normal file
38
pages/chart/index.wxml
Normal file
@@ -0,0 +1,38 @@
|
||||
<view class="padding_box">
|
||||
<t-divider content="{{showDate}}" data-mode="showDate" bind:tap="showPicker"/>
|
||||
</view>
|
||||
<t-tabs defaultValue="{{0}}" t-class="custom-tabs" theme="card">
|
||||
<t-tab-panel label="总览" value="0" class="tab_content">
|
||||
<view class="space_box">
|
||||
<text>总资产\n {{1203.00}}</text>
|
||||
<text>总资产\n {{1203.00}}</text>
|
||||
<text>总资产\n {{1203.00}}</text>
|
||||
<text>总资产\n {{1203.00}}</text>
|
||||
<text>总资产\n {{1203.00}}</text>
|
||||
</view>
|
||||
</t-tab-panel>
|
||||
<t-tab-panel label="分类" value="1" class="tab_content">
|
||||
Jodijawoidjwoaidjwaoij
|
||||
</t-tab-panel>
|
||||
<t-tab-panel label="趋势" value="2" class="tab_content">
|
||||
|
||||
</t-tab-panel>
|
||||
<t-tab-panel label="排行" value="3" class="tab_content">
|
||||
|
||||
</t-tab-panel>
|
||||
</t-tabs>
|
||||
<view class="placeholder"/>
|
||||
<foot-tab value="label_2"/>
|
||||
<!-- 年月 -->
|
||||
<t-date-time-picker
|
||||
title="选择日期"
|
||||
visible="{{showDateVisible}}"
|
||||
mode="month"
|
||||
value="{{showDate}}"
|
||||
format="YYYY-MM"
|
||||
bindchange="onConfirm"
|
||||
bindpick="onColumnChange"
|
||||
bindcancel="hidePicker"
|
||||
start="{{start}}"
|
||||
end="{{end}}"
|
||||
/>
|
||||
4
pages/chart/index.wxss
Normal file
4
pages/chart/index.wxss
Normal file
@@ -0,0 +1,4 @@
|
||||
.tab_content {
|
||||
height: 100%;
|
||||
background: #3C4043 !important;
|
||||
}
|
||||
Reference in New Issue
Block a user