black a5a558eff3 新增Vant WeApp 组件库
- 添加 Vant WeApp 组件库的多个组件和工具文件
- 新增的组件包括 calendar、circle、collapse、dialog 等- 添加了常用的工具函数和样式文件
- 在 app.js 中集成了 Vant WeApp 组件库
2025-07-18 18:46:14 +08:00

37 lines
848 B
XML

/* 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,
};