完成简易版的充值和充值记录查询页面,简单的我的页面

This commit is contained in:
2024-02-21 16:24:39 +08:00
parent 719ee912a4
commit 66bc2262e4
517 changed files with 1092 additions and 12025 deletions

View File

@@ -1 +0,0 @@
export {};

View File

@@ -1,55 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
var color_1 = require("../common/color");
var utils_1 = require("../common/utils");
(0, component_1.VantComponent)({
props: {
inactive: Boolean,
percentage: {
type: Number,
observer: 'setLeft',
},
pivotText: String,
pivotColor: String,
trackColor: String,
showPivot: {
type: Boolean,
value: true,
},
color: {
type: String,
value: color_1.BLUE,
},
textColor: {
type: String,
value: '#fff',
},
strokeWidth: {
type: null,
value: 4,
},
},
data: {
right: 0,
},
mounted: function () {
this.setLeft();
},
methods: {
setLeft: function () {
var _this = this;
Promise.all([
(0, utils_1.getRect)(this, '.van-progress'),
(0, utils_1.getRect)(this, '.van-progress__pivot'),
]).then(function (_a) {
var portion = _a[0], pivot = _a[1];
if (portion && pivot) {
_this.setData({
right: (pivot.width * (_this.data.percentage - 100)) / 100,
});
}
});
},
},
});

View File

@@ -1,3 +0,0 @@
{
"component": true
}

View File

@@ -1,20 +0,0 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<view
class="van-progress custom-class"
style="{{ computed.rootStyle({ strokeWidth, trackColor }) }}"
>
<view
class="van-progress__portion"
style="{{ computed.portionStyle({ percentage, inactive, color }) }}"
>
<view
wx:if="{{ showPivot && computed.pivotText(pivotText, percentage) }}"
style="{{ computed.pivotStyle({ textColor, pivotColor, inactive, color, right }) }}"
class="van-progress__pivot"
>
{{ computed.pivotText(pivotText, percentage) }}
</view>
</view>
</view>

View File

@@ -1,36 +0,0 @@
/* eslint-disable */
var utils = require('../wxs/utils.wxs');
var style = require('../wxs/style.wxs');
function pivotText(pivotText, percentage) {
return pivotText || percentage + '%';
}
function rootStyle(data) {
return style({
'height': data.strokeWidth ? utils.addUnit(data.strokeWidth) : '',
'background': data.trackColor,
});
}
function portionStyle(data) {
return style({
background: data.inactive ? '#cacaca' : data.color,
width: data.percentage ? data.percentage + '%' : '',
});
}
function pivotStyle(data) {
return style({
color: data.textColor,
right: data.right + 'px',
background: data.pivotColor ? data.pivotColor : data.inactive ? '#cacaca' : data.color,
});
}
module.exports = {
pivotText: pivotText,
rootStyle: rootStyle,
portionStyle: portionStyle,
pivotStyle: pivotStyle,
};

View File

@@ -1 +0,0 @@
@import '../common/index.wxss';.van-progress{background:var(--progress-background-color,#ebedf0);border-radius:var(--progress-height,4px);height:var(--progress-height,4px);position:relative}.van-progress__portion{background:var(--progress-color,#1989fa);border-radius:inherit;height:100%;left:0;position:absolute}.van-progress__pivot{background-color:var(--progress-pivot-background-color,#1989fa);border-radius:1em;box-sizing:border-box;color:var(--progress-pivot-text-color,#fff);font-size:var(--progress-pivot-font-size,10px);line-height:var(--progress-pivot-line-height,1.6);min-width:3.6em;padding:var(--progress-pivot-padding,0 5px);position:absolute;text-align:center;top:50%;transform:translateY(-50%);word-break:keep-all}