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
34
35
36
37
| /**
| * 根据台账文件数量,决定每个文件的展示宽高
| * @param {Number} num
| */
| function styleByCount(num) {
| var width, height;
| switch (num) {
| case 1:
| width = '40vw';
| height = '40vw';
| break;
| case 2:
| width = '40vw';
| height = '17vw';
| break;
| case 3:
| case 4:
| width = '17vw';
| height = '17vw';
| break;
| case 5:
| case 6:
| width = '17vw';
| height = '12vw';
| break;
| default:
| width = 0;
| height = 0;
| break;
| }
|
| return { width, height };
| }
|
| module.exports = {
| styleByCount: styleByCount,
| };
|
|