- 添加 Vant WeApp 组件库的多个组件和工具文件 - 新增的组件包括 calendar、circle、collapse、dialog 等- 添加了常用的工具函数和样式文件 - 在 app.js 中集成了 Vant WeApp 组件库
34 lines
677 B
XML
34 lines
677 B
XML
/* eslint-disable */
|
|
var style = require('../wxs/style.wxs');
|
|
var addUnit = require('../wxs/add-unit.wxs');
|
|
|
|
function iconStyle(data) {
|
|
var styles = {
|
|
'font-size': addUnit(data.iconSize),
|
|
};
|
|
|
|
if (
|
|
data.checkedColor &&
|
|
!(data.disabled || data.parentDisabled) &&
|
|
data.value === data.name
|
|
) {
|
|
styles['border-color'] = data.checkedColor;
|
|
styles['background-color'] = data.checkedColor;
|
|
}
|
|
|
|
return style(styles);
|
|
}
|
|
|
|
function iconCustomStyle(data) {
|
|
return style({
|
|
'line-height': addUnit(data.iconSize),
|
|
'font-size': '.8em',
|
|
display: 'block',
|
|
});
|
|
}
|
|
|
|
module.exports = {
|
|
iconStyle: iconStyle,
|
|
iconCustomStyle: iconCustomStyle,
|
|
};
|