1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| /* 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,
| };
|
|