@lingxiteam/theme-utils 0.5.5 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +142 -142
- package/dist/config/Card.d.ts +37 -0
- package/dist/config/Card.js +55 -0
- package/dist/config/Collapse.d.ts +37 -0
- package/dist/config/Collapse.js +58 -0
- package/dist/config/Container.d.ts +32 -0
- package/dist/config/Container.js +52 -3
- package/dist/h5config/Accordion.d.ts +35 -0
- package/dist/h5config/Accordion.js +60 -1
- package/dist/h5config/Card.d.ts +34 -0
- package/dist/h5config/Card.js +58 -1
- package/dist/utils.js +8 -8
- package/package.json +38 -38
package/README.md
CHANGED
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
# @lingxiteam/theme-utils
|
|
2
|
-
|
|
3
|
-
antd@4 theme class utils, css utils
|
|
4
|
-
|
|
5
|
-
```js
|
|
6
|
-
pnpm i @lingxiteam/theme-utils
|
|
7
|
-
|
|
8
|
-
import {} from '@lingxiteam/theme-utils';
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
新建场景描述:
|
|
12
|
-
|
|
13
|
-
1、通过编辑页面 form 得到,theme 的对象 如 { backgroundColor:'red',fontSize:'12px'} 2、根据模版 '.cc{ background-color: backgroundColor; font-size: fontSize;}' 解析 css 3、得到最终 css '.cc{ background-color:red; font-size:12px;bor:123}' 4、将最终 css 提交到服务端
|
|
14
|
-
|
|
15
|
-
编辑场景描述:
|
|
16
|
-
|
|
17
|
-
1、从服务端取得 css 2、根据模版将 css 中的对象取出 { backgroundColor:'red',fontSize:'12px'} 3、将对象赋值到编辑页面 form 4、重复新建场景
|
|
18
|
-
|
|
19
|
-
预览场景描述:
|
|
20
|
-
|
|
21
|
-
1、每次编辑都会实时的生成 css 2、通过 normalizeCSS(css,'#previewId') 将 css 作用到指定 id dom 下 ' #previewId { .cc{ background-color:red; font-size:12px; }}' 3、通过 insertRules('12312', css, document.getElementById('previewId')); 将 style 挂载到预览 dom 上 4、挂载的样式仅会对预览生效
|
|
22
|
-
|
|
23
|
-
使用场景描述:
|
|
24
|
-
|
|
25
|
-
1、通过 insertLink('12312', 'http://xxx.css',true); 在页面上加载所有的生成的 css,将会对所有的场景生效。
|
|
26
|
-
|
|
27
|
-
## stringifyCss
|
|
28
|
-
|
|
29
|
-
根据指定模版,将对象的值解析道模版中,生成最终的 css 字符串
|
|
30
|
-
|
|
31
|
-
```js
|
|
32
|
-
const tpl = '.cc{ background-color: backgroundColor; font-size: fontSize;}';
|
|
33
|
-
const a = { backgroundColor: 'red', fontSize: '12px' };
|
|
34
|
-
const c = stringifyCss(tpl, a);
|
|
35
|
-
console.log(c); // .cc{ background-color:red; font-size:12px;}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## parseCss
|
|
39
|
-
|
|
40
|
-
根据指定模版,将值从 css 字符串中解析成对象
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
const tpl = '.cc{ background-color: backgroundColor; font-size: fontSize;}';
|
|
44
|
-
const a = '.cc{ background-color:red; font-size:12px;}';
|
|
45
|
-
const c = parseCss(tpl, a);
|
|
46
|
-
console.log(c); // { backgroundColor:'red',fontSize:'12px'}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## normalizeCSS
|
|
50
|
-
|
|
51
|
-
编译 css 且支持给 css 提供指定的选择器,如
|
|
52
|
-
|
|
53
|
-
```js
|
|
54
|
-
const a = '.a{ .b{ font-size:12px; } }';
|
|
55
|
-
|
|
56
|
-
const css = normalizeCSS(a);
|
|
57
|
-
|
|
58
|
-
console.log(css);
|
|
59
|
-
|
|
60
|
-
// output: '.a .b{font-size:12px;}'
|
|
61
|
-
|
|
62
|
-
const css1 = normalizeCSS(a, '.cc');
|
|
63
|
-
console.log(css1);
|
|
64
|
-
// output: '.cc .a .b{font-size:12px;}'
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## insertRules
|
|
68
|
-
|
|
69
|
-
将 css 挂载到页面上 `insertRules(id: string, rules: string,selector = document.head,);` 指定 id,会覆盖生产的 style 标签
|
|
70
|
-
|
|
71
|
-
```js
|
|
72
|
-
insertRules('12312', css);
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## insertLink
|
|
76
|
-
|
|
77
|
-
挂载指定的 css link `insertLink(id: string, href: string, insertBefore = false)`
|
|
78
|
-
|
|
79
|
-
可选择指定挂在在 body.firstElementChild 还是 head 中
|
|
80
|
-
|
|
81
|
-
```js
|
|
82
|
-
insertLink('12312', 'http://xxx.css', true);
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## 关于配置
|
|
86
|
-
|
|
87
|
-
```ts
|
|
88
|
-
{
|
|
89
|
-
type: '类型',
|
|
90
|
-
// 所有的 css 有一个父级类名,理论上每一个都需要这个配置,是为了兼容第一版本的数据,因为组件太多,要全部重写一遍需要工作量,所以只修改了异常的组件
|
|
91
|
-
hasPrefixClass: true,
|
|
92
|
-
// 隐藏自定义类名按钮,当前只有pc端容器
|
|
93
|
-
hiddenCustomCss: true,
|
|
94
|
-
variable: {
|
|
95
|
-
// 允许配置项
|
|
96
|
-
fontSize: {
|
|
97
|
-
// 对应编辑器的类型,px color select marginInput 四种
|
|
98
|
-
type: 'px',
|
|
99
|
-
label: '尺寸',
|
|
100
|
-
groupsName: '文字' ,
|
|
101
|
-
desc: '说明文字',
|
|
102
|
-
// 继承其他组件属性时要标记不可编辑
|
|
103
|
-
canEdit: false,
|
|
104
|
-
// 编辑从什么地方支撑这个属性
|
|
105
|
-
extendsKey: 'Form',
|
|
106
|
-
// 表示这个字段跟随全局主题变量
|
|
107
|
-
followTheme: '@font-size-base',
|
|
108
|
-
// 是否隐藏,用于取全局变量,但是不允许用户修改的情况,如表单边框激活颜色
|
|
109
|
-
hidden: false,
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
groupsName: '分组名称',
|
|
113
|
-
icon: '图标名称要和组件库对应上',
|
|
114
|
-
title: '标题',
|
|
115
|
-
defaultValue: [
|
|
116
|
-
{
|
|
117
|
-
// 上面定义的配置项的默认值
|
|
118
|
-
fontSize: '14px',
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
// 是否跟随主题的开关,存在表示当前为跟随
|
|
122
|
-
followThemes: {
|
|
123
|
-
'@font-size-base': ['fontSize'],
|
|
124
|
-
},
|
|
125
|
-
// 根据上面的配置项和下面的模版解析得到最终挂在的 css
|
|
126
|
-
tpl: '.hh { font-size: fontSize}',
|
|
127
|
-
// 如果它被别人继承,并且自己需要自定义样式,如父级自定义样式为 .aa.list{ .item { } } 子级的自定义样式为 .aa.item { }
|
|
128
|
-
itemCustomTpl: '',
|
|
129
|
-
// 预览用数据,编辑器中推拽出来的 dsl ,可直接复制,View 下的 components,维护时如预览页面有变更,可直接替换这个数据,无需详细比对
|
|
130
|
-
components: [],
|
|
131
|
-
};
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### 关于继承
|
|
135
|
-
|
|
136
|
-
因为继承在预览和自定义样式时需要先加载父级的样式,所以需要在工具中写明哪些组件需要先获取。
|
|
137
|
-
|
|
138
|
-
如: theme-utils/src/lx-mobile.ts#L63 和 theme-utils/src/lx.ts#L62
|
|
139
|
-
|
|
140
|
-
```ts
|
|
141
|
-
const extend: any = {};
|
|
142
|
-
```
|
|
1
|
+
# @lingxiteam/theme-utils
|
|
2
|
+
|
|
3
|
+
antd@4 theme class utils, css utils
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
pnpm i @lingxiteam/theme-utils
|
|
7
|
+
|
|
8
|
+
import {} from '@lingxiteam/theme-utils';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
新建场景描述:
|
|
12
|
+
|
|
13
|
+
1、通过编辑页面 form 得到,theme 的对象 如 { backgroundColor:'red',fontSize:'12px'} 2、根据模版 '.cc{ background-color: backgroundColor; font-size: fontSize;}' 解析 css 3、得到最终 css '.cc{ background-color:red; font-size:12px;bor:123}' 4、将最终 css 提交到服务端
|
|
14
|
+
|
|
15
|
+
编辑场景描述:
|
|
16
|
+
|
|
17
|
+
1、从服务端取得 css 2、根据模版将 css 中的对象取出 { backgroundColor:'red',fontSize:'12px'} 3、将对象赋值到编辑页面 form 4、重复新建场景
|
|
18
|
+
|
|
19
|
+
预览场景描述:
|
|
20
|
+
|
|
21
|
+
1、每次编辑都会实时的生成 css 2、通过 normalizeCSS(css,'#previewId') 将 css 作用到指定 id dom 下 ' #previewId { .cc{ background-color:red; font-size:12px; }}' 3、通过 insertRules('12312', css, document.getElementById('previewId')); 将 style 挂载到预览 dom 上 4、挂载的样式仅会对预览生效
|
|
22
|
+
|
|
23
|
+
使用场景描述:
|
|
24
|
+
|
|
25
|
+
1、通过 insertLink('12312', 'http://xxx.css',true); 在页面上加载所有的生成的 css,将会对所有的场景生效。
|
|
26
|
+
|
|
27
|
+
## stringifyCss
|
|
28
|
+
|
|
29
|
+
根据指定模版,将对象的值解析道模版中,生成最终的 css 字符串
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
const tpl = '.cc{ background-color: backgroundColor; font-size: fontSize;}';
|
|
33
|
+
const a = { backgroundColor: 'red', fontSize: '12px' };
|
|
34
|
+
const c = stringifyCss(tpl, a);
|
|
35
|
+
console.log(c); // .cc{ background-color:red; font-size:12px;}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## parseCss
|
|
39
|
+
|
|
40
|
+
根据指定模版,将值从 css 字符串中解析成对象
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
const tpl = '.cc{ background-color: backgroundColor; font-size: fontSize;}';
|
|
44
|
+
const a = '.cc{ background-color:red; font-size:12px;}';
|
|
45
|
+
const c = parseCss(tpl, a);
|
|
46
|
+
console.log(c); // { backgroundColor:'red',fontSize:'12px'}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## normalizeCSS
|
|
50
|
+
|
|
51
|
+
编译 css 且支持给 css 提供指定的选择器,如
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
const a = '.a{ .b{ font-size:12px; } }';
|
|
55
|
+
|
|
56
|
+
const css = normalizeCSS(a);
|
|
57
|
+
|
|
58
|
+
console.log(css);
|
|
59
|
+
|
|
60
|
+
// output: '.a .b{font-size:12px;}'
|
|
61
|
+
|
|
62
|
+
const css1 = normalizeCSS(a, '.cc');
|
|
63
|
+
console.log(css1);
|
|
64
|
+
// output: '.cc .a .b{font-size:12px;}'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## insertRules
|
|
68
|
+
|
|
69
|
+
将 css 挂载到页面上 `insertRules(id: string, rules: string,selector = document.head,);` 指定 id,会覆盖生产的 style 标签
|
|
70
|
+
|
|
71
|
+
```js
|
|
72
|
+
insertRules('12312', css);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## insertLink
|
|
76
|
+
|
|
77
|
+
挂载指定的 css link `insertLink(id: string, href: string, insertBefore = false)`
|
|
78
|
+
|
|
79
|
+
可选择指定挂在在 body.firstElementChild 还是 head 中
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
insertLink('12312', 'http://xxx.css', true);
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 关于配置
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
{
|
|
89
|
+
type: '类型',
|
|
90
|
+
// 所有的 css 有一个父级类名,理论上每一个都需要这个配置,是为了兼容第一版本的数据,因为组件太多,要全部重写一遍需要工作量,所以只修改了异常的组件
|
|
91
|
+
hasPrefixClass: true,
|
|
92
|
+
// 隐藏自定义类名按钮,当前只有pc端容器
|
|
93
|
+
hiddenCustomCss: true,
|
|
94
|
+
variable: {
|
|
95
|
+
// 允许配置项
|
|
96
|
+
fontSize: {
|
|
97
|
+
// 对应编辑器的类型,px color select marginInput 四种
|
|
98
|
+
type: 'px',
|
|
99
|
+
label: '尺寸',
|
|
100
|
+
groupsName: '文字' ,
|
|
101
|
+
desc: '说明文字',
|
|
102
|
+
// 继承其他组件属性时要标记不可编辑
|
|
103
|
+
canEdit: false,
|
|
104
|
+
// 编辑从什么地方支撑这个属性
|
|
105
|
+
extendsKey: 'Form',
|
|
106
|
+
// 表示这个字段跟随全局主题变量
|
|
107
|
+
followTheme: '@font-size-base',
|
|
108
|
+
// 是否隐藏,用于取全局变量,但是不允许用户修改的情况,如表单边框激活颜色
|
|
109
|
+
hidden: false,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
groupsName: '分组名称',
|
|
113
|
+
icon: '图标名称要和组件库对应上',
|
|
114
|
+
title: '标题',
|
|
115
|
+
defaultValue: [
|
|
116
|
+
{
|
|
117
|
+
// 上面定义的配置项的默认值
|
|
118
|
+
fontSize: '14px',
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
// 是否跟随主题的开关,存在表示当前为跟随
|
|
122
|
+
followThemes: {
|
|
123
|
+
'@font-size-base': ['fontSize'],
|
|
124
|
+
},
|
|
125
|
+
// 根据上面的配置项和下面的模版解析得到最终挂在的 css
|
|
126
|
+
tpl: '.hh { font-size: fontSize}',
|
|
127
|
+
// 如果它被别人继承,并且自己需要自定义样式,如父级自定义样式为 .aa.list{ .item { } } 子级的自定义样式为 .aa.item { }
|
|
128
|
+
itemCustomTpl: '',
|
|
129
|
+
// 预览用数据,编辑器中推拽出来的 dsl ,可直接复制,View 下的 components,维护时如预览页面有变更,可直接替换这个数据,无需详细比对
|
|
130
|
+
components: [],
|
|
131
|
+
};
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 关于继承
|
|
135
|
+
|
|
136
|
+
因为继承在预览和自定义样式时需要先加载父级的样式,所以需要在工具中写明哪些组件需要先获取。
|
|
137
|
+
|
|
138
|
+
如: theme-utils/src/lx-mobile.ts#L63 和 theme-utils/src/lx.ts#L62
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
const extend: any = {};
|
|
142
|
+
```
|
package/dist/config/Card.d.ts
CHANGED
|
@@ -47,6 +47,42 @@ export declare const Card: {
|
|
|
47
47
|
value: string;
|
|
48
48
|
}[];
|
|
49
49
|
};
|
|
50
|
+
subTextColor: {
|
|
51
|
+
type: string;
|
|
52
|
+
label: string;
|
|
53
|
+
groupsName: string;
|
|
54
|
+
canEdit: boolean;
|
|
55
|
+
extendsKey: string;
|
|
56
|
+
desc: string;
|
|
57
|
+
};
|
|
58
|
+
subFontSize: {
|
|
59
|
+
type: string;
|
|
60
|
+
label: string;
|
|
61
|
+
groupsName: string;
|
|
62
|
+
canEdit: boolean;
|
|
63
|
+
extendsKey: string;
|
|
64
|
+
desc: string;
|
|
65
|
+
};
|
|
66
|
+
subLineHeight: {
|
|
67
|
+
type: string;
|
|
68
|
+
label: string;
|
|
69
|
+
groupsName: string;
|
|
70
|
+
canEdit: boolean;
|
|
71
|
+
extendsKey: string;
|
|
72
|
+
desc: string;
|
|
73
|
+
};
|
|
74
|
+
subFontWeight: {
|
|
75
|
+
type: string;
|
|
76
|
+
label: string;
|
|
77
|
+
groupsName: string;
|
|
78
|
+
canEdit: boolean;
|
|
79
|
+
extendsKey: string;
|
|
80
|
+
desc: string;
|
|
81
|
+
options: {
|
|
82
|
+
title: string;
|
|
83
|
+
value: string;
|
|
84
|
+
}[];
|
|
85
|
+
};
|
|
50
86
|
borderRadius: {
|
|
51
87
|
type: string;
|
|
52
88
|
label: string;
|
|
@@ -113,6 +149,7 @@ export declare const Card: {
|
|
|
113
149
|
cardIconType: string;
|
|
114
150
|
extendNum: number;
|
|
115
151
|
title: string;
|
|
152
|
+
subTitle: string;
|
|
116
153
|
bordered: boolean;
|
|
117
154
|
size: string;
|
|
118
155
|
hasHeader: boolean;
|
package/dist/config/Card.js
CHANGED
|
@@ -65,6 +65,60 @@ export var Card = {
|
|
|
65
65
|
value: '700'
|
|
66
66
|
}]
|
|
67
67
|
},
|
|
68
|
+
subTextColor: {
|
|
69
|
+
type: 'color',
|
|
70
|
+
label: '副标题颜色',
|
|
71
|
+
groupsName: '副标题',
|
|
72
|
+
canEdit: false,
|
|
73
|
+
extendsKey: 'Container',
|
|
74
|
+
desc: '继承自容器,此处不可编辑'
|
|
75
|
+
},
|
|
76
|
+
subFontSize: {
|
|
77
|
+
type: 'px',
|
|
78
|
+
label: '副标题尺寸',
|
|
79
|
+
groupsName: '副标题',
|
|
80
|
+
canEdit: false,
|
|
81
|
+
extendsKey: 'Container',
|
|
82
|
+
desc: '继承自容器,此处不可编辑'
|
|
83
|
+
},
|
|
84
|
+
subLineHeight: {
|
|
85
|
+
type: 'px',
|
|
86
|
+
label: '副标题行高',
|
|
87
|
+
groupsName: '副标题',
|
|
88
|
+
canEdit: false,
|
|
89
|
+
extendsKey: 'Container',
|
|
90
|
+
desc: '继承自容器,此处不可编辑'
|
|
91
|
+
},
|
|
92
|
+
subFontWeight: {
|
|
93
|
+
type: 'select',
|
|
94
|
+
label: '副标题字重',
|
|
95
|
+
groupsName: '副标题',
|
|
96
|
+
canEdit: false,
|
|
97
|
+
extendsKey: 'Container',
|
|
98
|
+
desc: '继承自容器,此处不可编辑',
|
|
99
|
+
options: [{
|
|
100
|
+
title: '100',
|
|
101
|
+
value: '100'
|
|
102
|
+
}, {
|
|
103
|
+
title: '200',
|
|
104
|
+
value: '200'
|
|
105
|
+
}, {
|
|
106
|
+
title: '300',
|
|
107
|
+
value: '300'
|
|
108
|
+
}, {
|
|
109
|
+
title: '400',
|
|
110
|
+
value: '400'
|
|
111
|
+
}, {
|
|
112
|
+
title: '500',
|
|
113
|
+
value: '500'
|
|
114
|
+
}, {
|
|
115
|
+
title: '600',
|
|
116
|
+
value: '600'
|
|
117
|
+
}, {
|
|
118
|
+
title: '700',
|
|
119
|
+
value: '700'
|
|
120
|
+
}]
|
|
121
|
+
},
|
|
68
122
|
borderRadius: {
|
|
69
123
|
type: 'px',
|
|
70
124
|
label: '圆角',
|
|
@@ -131,6 +185,7 @@ export var Card = {
|
|
|
131
185
|
cardIconType: 'auto',
|
|
132
186
|
extendNum: 3,
|
|
133
187
|
title: '标题',
|
|
188
|
+
subTitle: '副标题',
|
|
134
189
|
bordered: true,
|
|
135
190
|
size: 'default',
|
|
136
191
|
hasHeader: true,
|
|
@@ -47,6 +47,42 @@ export declare const Collapse: {
|
|
|
47
47
|
value: string;
|
|
48
48
|
}[];
|
|
49
49
|
};
|
|
50
|
+
subTextColor: {
|
|
51
|
+
type: string;
|
|
52
|
+
label: string;
|
|
53
|
+
groupsName: string;
|
|
54
|
+
canEdit: boolean;
|
|
55
|
+
extendsKey: string;
|
|
56
|
+
desc: string;
|
|
57
|
+
};
|
|
58
|
+
subFontSize: {
|
|
59
|
+
type: string;
|
|
60
|
+
label: string;
|
|
61
|
+
groupsName: string;
|
|
62
|
+
canEdit: boolean;
|
|
63
|
+
extendsKey: string;
|
|
64
|
+
desc: string;
|
|
65
|
+
};
|
|
66
|
+
subLineHeight: {
|
|
67
|
+
type: string;
|
|
68
|
+
label: string;
|
|
69
|
+
groupsName: string;
|
|
70
|
+
canEdit: boolean;
|
|
71
|
+
extendsKey: string;
|
|
72
|
+
desc: string;
|
|
73
|
+
};
|
|
74
|
+
subFontWeight: {
|
|
75
|
+
type: string;
|
|
76
|
+
label: string;
|
|
77
|
+
groupsName: string;
|
|
78
|
+
canEdit: boolean;
|
|
79
|
+
extendsKey: string;
|
|
80
|
+
desc: string;
|
|
81
|
+
options: {
|
|
82
|
+
title: string;
|
|
83
|
+
value: string;
|
|
84
|
+
}[];
|
|
85
|
+
};
|
|
50
86
|
borderRadius: {
|
|
51
87
|
type: string;
|
|
52
88
|
label: string;
|
|
@@ -162,6 +198,7 @@ export declare const Collapse: {
|
|
|
162
198
|
name: string;
|
|
163
199
|
basicStatus: number;
|
|
164
200
|
header: string;
|
|
201
|
+
subTitle: string;
|
|
165
202
|
key: string;
|
|
166
203
|
};
|
|
167
204
|
style: {
|
package/dist/config/Collapse.js
CHANGED
|
@@ -65,6 +65,60 @@ export var Collapse = {
|
|
|
65
65
|
value: '700'
|
|
66
66
|
}]
|
|
67
67
|
},
|
|
68
|
+
subTextColor: {
|
|
69
|
+
type: 'color',
|
|
70
|
+
label: '副标题颜色',
|
|
71
|
+
groupsName: '副标题',
|
|
72
|
+
canEdit: false,
|
|
73
|
+
extendsKey: 'Container',
|
|
74
|
+
desc: '继承自容器,此处不可编辑'
|
|
75
|
+
},
|
|
76
|
+
subFontSize: {
|
|
77
|
+
type: 'px',
|
|
78
|
+
label: '副标题尺寸',
|
|
79
|
+
groupsName: '副标题',
|
|
80
|
+
canEdit: false,
|
|
81
|
+
extendsKey: 'Container',
|
|
82
|
+
desc: '继承自容器,此处不可编辑'
|
|
83
|
+
},
|
|
84
|
+
subLineHeight: {
|
|
85
|
+
type: 'px',
|
|
86
|
+
label: '副标题行高',
|
|
87
|
+
groupsName: '副标题',
|
|
88
|
+
canEdit: false,
|
|
89
|
+
extendsKey: 'Container',
|
|
90
|
+
desc: '继承自容器,此处不可编辑'
|
|
91
|
+
},
|
|
92
|
+
subFontWeight: {
|
|
93
|
+
type: 'select',
|
|
94
|
+
label: '副标题字重',
|
|
95
|
+
groupsName: '副标题',
|
|
96
|
+
canEdit: false,
|
|
97
|
+
extendsKey: 'Container',
|
|
98
|
+
desc: '继承自容器,此处不可编辑',
|
|
99
|
+
options: [{
|
|
100
|
+
title: '100',
|
|
101
|
+
value: '100'
|
|
102
|
+
}, {
|
|
103
|
+
title: '200',
|
|
104
|
+
value: '200'
|
|
105
|
+
}, {
|
|
106
|
+
title: '300',
|
|
107
|
+
value: '300'
|
|
108
|
+
}, {
|
|
109
|
+
title: '400',
|
|
110
|
+
value: '400'
|
|
111
|
+
}, {
|
|
112
|
+
title: '500',
|
|
113
|
+
value: '500'
|
|
114
|
+
}, {
|
|
115
|
+
title: '600',
|
|
116
|
+
value: '600'
|
|
117
|
+
}, {
|
|
118
|
+
title: '700',
|
|
119
|
+
value: '700'
|
|
120
|
+
}]
|
|
121
|
+
},
|
|
68
122
|
borderRadius: {
|
|
69
123
|
type: 'px',
|
|
70
124
|
label: '圆角',
|
|
@@ -180,6 +234,7 @@ export var Collapse = {
|
|
|
180
234
|
name: '折叠子面板',
|
|
181
235
|
basicStatus: 1,
|
|
182
236
|
header: '标题1',
|
|
237
|
+
subTitle: '副标题1',
|
|
183
238
|
key: '1'
|
|
184
239
|
},
|
|
185
240
|
style: {
|
|
@@ -209,6 +264,7 @@ export var Collapse = {
|
|
|
209
264
|
name: '折叠子面板',
|
|
210
265
|
basicStatus: 1,
|
|
211
266
|
header: '标题',
|
|
267
|
+
subTitle: '副标题',
|
|
212
268
|
key: '3'
|
|
213
269
|
},
|
|
214
270
|
style: {
|
|
@@ -238,6 +294,7 @@ export var Collapse = {
|
|
|
238
294
|
name: '折叠子面板',
|
|
239
295
|
basicStatus: 1,
|
|
240
296
|
header: '标题2',
|
|
297
|
+
subTitle: '副标题2',
|
|
241
298
|
key: '2'
|
|
242
299
|
},
|
|
243
300
|
style: {
|
|
@@ -306,6 +363,7 @@ export var Collapse = {
|
|
|
306
363
|
name: '折叠子面板',
|
|
307
364
|
basicStatus: 1,
|
|
308
365
|
header: '标题1',
|
|
366
|
+
subTitle: '副标题1',
|
|
309
367
|
key: '1'
|
|
310
368
|
},
|
|
311
369
|
style: {
|
|
@@ -32,6 +32,34 @@ export declare const Container: {
|
|
|
32
32
|
value: string;
|
|
33
33
|
}[];
|
|
34
34
|
};
|
|
35
|
+
subTextColor: {
|
|
36
|
+
type: string;
|
|
37
|
+
label: string;
|
|
38
|
+
groupsName: string;
|
|
39
|
+
desc: string;
|
|
40
|
+
};
|
|
41
|
+
subFontSize: {
|
|
42
|
+
type: string;
|
|
43
|
+
label: string;
|
|
44
|
+
groupsName: string;
|
|
45
|
+
desc: string;
|
|
46
|
+
};
|
|
47
|
+
subLineHeight: {
|
|
48
|
+
type: string;
|
|
49
|
+
label: string;
|
|
50
|
+
groupsName: string;
|
|
51
|
+
desc: string;
|
|
52
|
+
};
|
|
53
|
+
subFontWeight: {
|
|
54
|
+
type: string;
|
|
55
|
+
label: string;
|
|
56
|
+
groupsName: string;
|
|
57
|
+
options: {
|
|
58
|
+
title: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}[];
|
|
61
|
+
desc: string;
|
|
62
|
+
};
|
|
35
63
|
};
|
|
36
64
|
groupsName: string;
|
|
37
65
|
icon: string;
|
|
@@ -42,6 +70,10 @@ export declare const Container: {
|
|
|
42
70
|
lineHeight: string;
|
|
43
71
|
fontSize: string;
|
|
44
72
|
fontWeight: string;
|
|
73
|
+
subTextColor: string;
|
|
74
|
+
subLineHeight: string;
|
|
75
|
+
subFontSize: string;
|
|
76
|
+
subFontWeight: string;
|
|
45
77
|
}[];
|
|
46
78
|
followThemes: {
|
|
47
79
|
'@heading-color': string[];
|
package/dist/config/Container.js
CHANGED
|
@@ -49,6 +49,52 @@ export var Container = {
|
|
|
49
49
|
title: '700',
|
|
50
50
|
value: '700'
|
|
51
51
|
}]
|
|
52
|
+
},
|
|
53
|
+
subTextColor: {
|
|
54
|
+
type: 'color',
|
|
55
|
+
label: '副标题颜色',
|
|
56
|
+
groupsName: '副标题',
|
|
57
|
+
desc: '对卡片、折叠面板副标题生效'
|
|
58
|
+
},
|
|
59
|
+
subFontSize: {
|
|
60
|
+
type: 'px',
|
|
61
|
+
label: '副标题尺寸',
|
|
62
|
+
groupsName: '副标题',
|
|
63
|
+
desc: '对卡片、折叠面板副标题生效'
|
|
64
|
+
},
|
|
65
|
+
subLineHeight: {
|
|
66
|
+
type: 'px',
|
|
67
|
+
label: '副标题行高',
|
|
68
|
+
groupsName: '副标题',
|
|
69
|
+
desc: '对卡片、折叠面板副标题生效'
|
|
70
|
+
},
|
|
71
|
+
subFontWeight: {
|
|
72
|
+
type: 'select',
|
|
73
|
+
label: '副标题字重',
|
|
74
|
+
groupsName: '副标题',
|
|
75
|
+
options: [{
|
|
76
|
+
title: '100',
|
|
77
|
+
value: '100'
|
|
78
|
+
}, {
|
|
79
|
+
title: '200',
|
|
80
|
+
value: '200'
|
|
81
|
+
}, {
|
|
82
|
+
title: '300',
|
|
83
|
+
value: '300'
|
|
84
|
+
}, {
|
|
85
|
+
title: '400',
|
|
86
|
+
value: '400'
|
|
87
|
+
}, {
|
|
88
|
+
title: '500',
|
|
89
|
+
value: '500'
|
|
90
|
+
}, {
|
|
91
|
+
title: '600',
|
|
92
|
+
value: '600'
|
|
93
|
+
}, {
|
|
94
|
+
title: '700',
|
|
95
|
+
value: '700'
|
|
96
|
+
}],
|
|
97
|
+
desc: '对卡片、折叠面板副标题生效'
|
|
52
98
|
}
|
|
53
99
|
// borderColor: {
|
|
54
100
|
// type: 'color',
|
|
@@ -73,17 +119,20 @@ export var Container = {
|
|
|
73
119
|
textColor: '#0085D0',
|
|
74
120
|
lineHeight: '24px',
|
|
75
121
|
fontSize: '16px',
|
|
76
|
-
fontWeight: '500'
|
|
122
|
+
fontWeight: '500',
|
|
77
123
|
// borderColor: '#E8E8E8',
|
|
78
124
|
// borderRadius: '8px',
|
|
125
|
+
subTextColor: '#9092A3',
|
|
126
|
+
subLineHeight: '22px',
|
|
127
|
+
subFontSize: '14px',
|
|
128
|
+
subFontWeight: '400'
|
|
79
129
|
}],
|
|
80
|
-
|
|
81
130
|
followThemes: {
|
|
82
131
|
'@heading-color': ['textColor'],
|
|
83
132
|
'@font-size-base': []
|
|
84
133
|
},
|
|
85
134
|
// TODO:布局容器、普通容器
|
|
86
|
-
tpl: "\n .ued-card .ued-card-title {\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n }\n .ued-card .pcfactory-card-head > .pcfactory-card-head-wrapper > .pcfactory-card-head-title{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n }\n .ued-collapse-wrap .pcfactory-collapse.pcfactory-collapse-icon-position-right > .pcfactory-collapse-item > .pcfactory-collapse-header .ued-collapse-panel-header {\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n }\n .ued-table-filters .table-head-default{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n padding: 12px 0 0 0;\n }\n .ued-table-filters .table-head-middle{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n padding: 12px 0 0 0;\n }\n .ued-table-wrap .table-head-default{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n padding: 12px 0 0 0;\n }\n .ued-table-wrap .table-head-middle .title{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n padding: 0 0 0 18px ;\n }\n .ued-table-wrap .table-head .title{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n }",
|
|
135
|
+
tpl: "\n .ued-card .ued-card-title {\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n }\n .ued-card-sub-title {\n color: subTextColor;\n line-height: subLineHeight;\n font-size: subFontSize;\n font-weight: subFontWeight;\n }\n .ued-card .pcfactory-card-head > .pcfactory-card-head-wrapper > .pcfactory-card-head-title{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n }\n .ued-collapse-wrap .pcfactory-collapse.pcfactory-collapse-icon-position-right > .pcfactory-collapse-item > .pcfactory-collapse-header .ued-collapse-panel-header {\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n }\n .ued-collapse-panel-header-sub {\n color: subTextColor;\n line-height: subLineHeight;\n font-size: subFontSize;\n font-weight: subFontWeight;\n }\n .ued-table-filters .table-head-default{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n padding: 12px 0 0 0;\n }\n .ued-table-filters .table-head-middle{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n padding: 12px 0 0 0;\n }\n .ued-table-wrap .table-head-default{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n padding: 12px 0 0 0;\n }\n .ued-table-wrap .table-head-middle .title{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n padding: 0 0 0 18px ;\n }\n .ued-table-wrap .table-head .title{\n color: textColor;\n line-height: lineHeight;\n font-size: fontSize;\n font-weight: fontWeight;\n }",
|
|
87
136
|
components: [{
|
|
88
137
|
id: 'Card_872926',
|
|
89
138
|
label: '卡片',
|
|
@@ -36,6 +36,34 @@ export declare const Accordion: {
|
|
|
36
36
|
value: string;
|
|
37
37
|
}[];
|
|
38
38
|
};
|
|
39
|
+
subTextColor: {
|
|
40
|
+
type: string;
|
|
41
|
+
label: string;
|
|
42
|
+
groupsName: string;
|
|
43
|
+
};
|
|
44
|
+
subFontSize: {
|
|
45
|
+
type: string;
|
|
46
|
+
label: string;
|
|
47
|
+
groupsName: string;
|
|
48
|
+
};
|
|
49
|
+
subLineHeight: {
|
|
50
|
+
type: string;
|
|
51
|
+
label: string;
|
|
52
|
+
groupsName: string;
|
|
53
|
+
options: {
|
|
54
|
+
label: string;
|
|
55
|
+
value: string;
|
|
56
|
+
}[];
|
|
57
|
+
};
|
|
58
|
+
subFontWeight: {
|
|
59
|
+
type: string;
|
|
60
|
+
label: string;
|
|
61
|
+
groupsName: string;
|
|
62
|
+
options: {
|
|
63
|
+
title: string;
|
|
64
|
+
value: string;
|
|
65
|
+
}[];
|
|
66
|
+
};
|
|
39
67
|
borderRadius: {
|
|
40
68
|
type: string;
|
|
41
69
|
label: string;
|
|
@@ -93,6 +121,10 @@ export declare const Accordion: {
|
|
|
93
121
|
bodyBgColor: string;
|
|
94
122
|
borderColor: string;
|
|
95
123
|
borderRadius: string;
|
|
124
|
+
subTextColor: string;
|
|
125
|
+
subLineHeight: string;
|
|
126
|
+
subFontSize: string;
|
|
127
|
+
subFontWeight: string;
|
|
96
128
|
}[];
|
|
97
129
|
followThemes: {
|
|
98
130
|
'@brand-primary': string[];
|
|
@@ -147,6 +179,7 @@ export declare const Accordion: {
|
|
|
147
179
|
name: string;
|
|
148
180
|
visible: boolean;
|
|
149
181
|
header: string;
|
|
182
|
+
subTitle: string;
|
|
150
183
|
key: string;
|
|
151
184
|
};
|
|
152
185
|
style: {};
|
|
@@ -285,6 +318,7 @@ export declare const Accordion: {
|
|
|
285
318
|
name: string;
|
|
286
319
|
visible: boolean;
|
|
287
320
|
header: string;
|
|
321
|
+
subTitle: string;
|
|
288
322
|
key: string;
|
|
289
323
|
};
|
|
290
324
|
style: {};
|
|
@@ -388,6 +422,7 @@ export declare const Accordion: {
|
|
|
388
422
|
name: string;
|
|
389
423
|
visible: boolean;
|
|
390
424
|
header: string;
|
|
425
|
+
subTitle: string;
|
|
391
426
|
key: string;
|
|
392
427
|
};
|
|
393
428
|
style: {};
|
|
@@ -54,6 +54,55 @@ export var Accordion = {
|
|
|
54
54
|
value: '700'
|
|
55
55
|
}]
|
|
56
56
|
},
|
|
57
|
+
subTextColor: {
|
|
58
|
+
type: 'color',
|
|
59
|
+
label: '副标题颜色',
|
|
60
|
+
groupsName: '副标题'
|
|
61
|
+
},
|
|
62
|
+
subFontSize: {
|
|
63
|
+
type: 'px',
|
|
64
|
+
label: '副标题尺寸',
|
|
65
|
+
groupsName: '副标题'
|
|
66
|
+
},
|
|
67
|
+
subLineHeight: {
|
|
68
|
+
type: 'px',
|
|
69
|
+
label: '副标题行高',
|
|
70
|
+
groupsName: '副标题',
|
|
71
|
+
options: [{
|
|
72
|
+
label: 'px',
|
|
73
|
+
value: 'px'
|
|
74
|
+
}, {
|
|
75
|
+
label: '%',
|
|
76
|
+
value: '%'
|
|
77
|
+
}]
|
|
78
|
+
},
|
|
79
|
+
subFontWeight: {
|
|
80
|
+
type: 'select',
|
|
81
|
+
label: '副标题字重',
|
|
82
|
+
groupsName: '副标题',
|
|
83
|
+
options: [{
|
|
84
|
+
title: '100',
|
|
85
|
+
value: '100'
|
|
86
|
+
}, {
|
|
87
|
+
title: '200',
|
|
88
|
+
value: '200'
|
|
89
|
+
}, {
|
|
90
|
+
title: '300',
|
|
91
|
+
value: '300'
|
|
92
|
+
}, {
|
|
93
|
+
title: '400',
|
|
94
|
+
value: '400'
|
|
95
|
+
}, {
|
|
96
|
+
title: '500',
|
|
97
|
+
value: '500'
|
|
98
|
+
}, {
|
|
99
|
+
title: '600',
|
|
100
|
+
value: '600'
|
|
101
|
+
}, {
|
|
102
|
+
title: '700',
|
|
103
|
+
value: '700'
|
|
104
|
+
}]
|
|
105
|
+
},
|
|
57
106
|
borderRadius: {
|
|
58
107
|
type: 'px',
|
|
59
108
|
label: '圆角',
|
|
@@ -116,7 +165,11 @@ export var Accordion = {
|
|
|
116
165
|
arrowSize: '19px',
|
|
117
166
|
bodyBgColor: '#fff',
|
|
118
167
|
borderColor: '#fff',
|
|
119
|
-
borderRadius: '4px'
|
|
168
|
+
borderRadius: '4px',
|
|
169
|
+
subTextColor: '#9092A3',
|
|
170
|
+
subLineHeight: '22px',
|
|
171
|
+
subFontSize: '14px',
|
|
172
|
+
subFontWeight: '400'
|
|
120
173
|
}],
|
|
121
174
|
followThemes: {
|
|
122
175
|
'@brand-primary': ['titleColor'],
|
|
@@ -162,6 +215,7 @@ export var Accordion = {
|
|
|
162
215
|
name: '折叠子面板',
|
|
163
216
|
visible: true,
|
|
164
217
|
header: '显示边框',
|
|
218
|
+
subTitle: '副标题',
|
|
165
219
|
key: '1'
|
|
166
220
|
},
|
|
167
221
|
style: {},
|
|
@@ -222,6 +276,7 @@ export var Accordion = {
|
|
|
222
276
|
name: '折叠子面板',
|
|
223
277
|
visible: true,
|
|
224
278
|
header: '标题2',
|
|
279
|
+
subTitle: '副标题2',
|
|
225
280
|
key: '2'
|
|
226
281
|
},
|
|
227
282
|
style: {},
|
|
@@ -344,6 +399,7 @@ export var Accordion = {
|
|
|
344
399
|
name: '折叠子面板',
|
|
345
400
|
visible: true,
|
|
346
401
|
header: '标题1',
|
|
402
|
+
subTitle: '副标题1',
|
|
347
403
|
key: '1'
|
|
348
404
|
},
|
|
349
405
|
style: {},
|
|
@@ -408,6 +464,7 @@ export var Accordion = {
|
|
|
408
464
|
name: '折叠子面板',
|
|
409
465
|
visible: true,
|
|
410
466
|
header: '标题2',
|
|
467
|
+
subTitle: '副标题2',
|
|
411
468
|
key: '2'
|
|
412
469
|
},
|
|
413
470
|
style: {},
|
|
@@ -501,6 +558,7 @@ export var Accordion = {
|
|
|
501
558
|
name: '折叠子面板',
|
|
502
559
|
visible: true,
|
|
503
560
|
header: '标题1',
|
|
561
|
+
subTitle: '副标题1',
|
|
504
562
|
key: '1'
|
|
505
563
|
},
|
|
506
564
|
style: {},
|
|
@@ -527,6 +585,7 @@ export var Accordion = {
|
|
|
527
585
|
name: '折叠子面板',
|
|
528
586
|
visible: true,
|
|
529
587
|
header: '标题2',
|
|
588
|
+
subTitle: '副标题2',
|
|
530
589
|
key: '2'
|
|
531
590
|
},
|
|
532
591
|
style: {},
|
package/dist/h5config/Card.d.ts
CHANGED
|
@@ -46,6 +46,34 @@ export declare const Card: {
|
|
|
46
46
|
value: string;
|
|
47
47
|
}[];
|
|
48
48
|
};
|
|
49
|
+
subTextColor: {
|
|
50
|
+
type: string;
|
|
51
|
+
label: string;
|
|
52
|
+
groupsName: string;
|
|
53
|
+
};
|
|
54
|
+
subFontSize: {
|
|
55
|
+
type: string;
|
|
56
|
+
label: string;
|
|
57
|
+
groupsName: string;
|
|
58
|
+
};
|
|
59
|
+
subLineHeight: {
|
|
60
|
+
type: string;
|
|
61
|
+
label: string;
|
|
62
|
+
groupsName: string;
|
|
63
|
+
options: {
|
|
64
|
+
label: string;
|
|
65
|
+
value: string;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
subFontWeight: {
|
|
69
|
+
type: string;
|
|
70
|
+
label: string;
|
|
71
|
+
groupsName: string;
|
|
72
|
+
options: {
|
|
73
|
+
title: string;
|
|
74
|
+
value: string;
|
|
75
|
+
}[];
|
|
76
|
+
};
|
|
49
77
|
borderRadius: {
|
|
50
78
|
type: string;
|
|
51
79
|
label: string;
|
|
@@ -116,6 +144,10 @@ export declare const Card: {
|
|
|
116
144
|
footBgColor: string;
|
|
117
145
|
borderColor: string;
|
|
118
146
|
borderRadius: string;
|
|
147
|
+
subTextColor: string;
|
|
148
|
+
subLineHeight: string;
|
|
149
|
+
subFontSize: string;
|
|
150
|
+
subFontWeight: string;
|
|
119
151
|
}[];
|
|
120
152
|
followThemes: {
|
|
121
153
|
'@brand-primary': string[];
|
|
@@ -146,6 +178,7 @@ export declare const Card: {
|
|
|
146
178
|
status: string;
|
|
147
179
|
cardType: string;
|
|
148
180
|
title: string;
|
|
181
|
+
subTitle: string;
|
|
149
182
|
headerType: string;
|
|
150
183
|
postFixFontSize: number;
|
|
151
184
|
iconPosition: string;
|
|
@@ -217,6 +250,7 @@ export declare const Card: {
|
|
|
217
250
|
status: string;
|
|
218
251
|
cardType: string;
|
|
219
252
|
title: string;
|
|
253
|
+
subTitle: string;
|
|
220
254
|
headerType: string;
|
|
221
255
|
postFixFontSize: number;
|
|
222
256
|
iconPosition: string;
|
package/dist/h5config/Card.js
CHANGED
|
@@ -70,6 +70,55 @@ export var Card = {
|
|
|
70
70
|
value: '700'
|
|
71
71
|
}]
|
|
72
72
|
},
|
|
73
|
+
subTextColor: {
|
|
74
|
+
type: 'color',
|
|
75
|
+
label: '副标题颜色',
|
|
76
|
+
groupsName: '副标题'
|
|
77
|
+
},
|
|
78
|
+
subFontSize: {
|
|
79
|
+
type: 'px',
|
|
80
|
+
label: '副标题尺寸',
|
|
81
|
+
groupsName: '副标题'
|
|
82
|
+
},
|
|
83
|
+
subLineHeight: {
|
|
84
|
+
type: 'px',
|
|
85
|
+
label: '副标题行高',
|
|
86
|
+
groupsName: '副标题',
|
|
87
|
+
options: [{
|
|
88
|
+
label: 'px',
|
|
89
|
+
value: 'px'
|
|
90
|
+
}, {
|
|
91
|
+
label: '%',
|
|
92
|
+
value: '%'
|
|
93
|
+
}]
|
|
94
|
+
},
|
|
95
|
+
subFontWeight: {
|
|
96
|
+
type: 'select',
|
|
97
|
+
label: '副标题字重',
|
|
98
|
+
groupsName: '副标题',
|
|
99
|
+
options: [{
|
|
100
|
+
title: '100',
|
|
101
|
+
value: '100'
|
|
102
|
+
}, {
|
|
103
|
+
title: '200',
|
|
104
|
+
value: '200'
|
|
105
|
+
}, {
|
|
106
|
+
title: '300',
|
|
107
|
+
value: '300'
|
|
108
|
+
}, {
|
|
109
|
+
title: '400',
|
|
110
|
+
value: '400'
|
|
111
|
+
}, {
|
|
112
|
+
title: '500',
|
|
113
|
+
value: '500'
|
|
114
|
+
}, {
|
|
115
|
+
title: '600',
|
|
116
|
+
value: '600'
|
|
117
|
+
}, {
|
|
118
|
+
title: '700',
|
|
119
|
+
value: '700'
|
|
120
|
+
}]
|
|
121
|
+
},
|
|
73
122
|
borderRadius: {
|
|
74
123
|
type: 'px',
|
|
75
124
|
label: '圆角',
|
|
@@ -139,7 +188,11 @@ export var Card = {
|
|
|
139
188
|
bodyLineColor: '#f0f0f0',
|
|
140
189
|
footBgColor: '#fff',
|
|
141
190
|
borderColor: 'rgba(0,0,0,0)',
|
|
142
|
-
borderRadius: '4px'
|
|
191
|
+
borderRadius: '4px',
|
|
192
|
+
subTextColor: '#9092A3',
|
|
193
|
+
subLineHeight: '22px',
|
|
194
|
+
subFontSize: '14px',
|
|
195
|
+
subFontWeight: '400'
|
|
143
196
|
}],
|
|
144
197
|
followThemes: {
|
|
145
198
|
'@brand-primary': ['titleColor'],
|
|
@@ -171,6 +224,7 @@ export var Card = {
|
|
|
171
224
|
status: '1',
|
|
172
225
|
cardType: '1',
|
|
173
226
|
title: '卡片标题',
|
|
227
|
+
subTitle: '副标题',
|
|
174
228
|
headerType: 'none',
|
|
175
229
|
postFixFontSize: 16,
|
|
176
230
|
iconPosition: 'after',
|
|
@@ -265,6 +319,7 @@ export var Card = {
|
|
|
265
319
|
status: '1',
|
|
266
320
|
cardType: '1',
|
|
267
321
|
title: '卡片标题',
|
|
322
|
+
subTitle: '副标题',
|
|
268
323
|
headerType: 'vStyle',
|
|
269
324
|
postFixFontSize: 16,
|
|
270
325
|
iconPosition: 'after',
|
|
@@ -359,6 +414,7 @@ export var Card = {
|
|
|
359
414
|
status: '1',
|
|
360
415
|
cardType: '1',
|
|
361
416
|
title: '卡片标题',
|
|
417
|
+
subTitle: '副标题',
|
|
362
418
|
headerType: 'hStyle',
|
|
363
419
|
postFixFontSize: 16,
|
|
364
420
|
iconPosition: 'after',
|
|
@@ -453,6 +509,7 @@ export var Card = {
|
|
|
453
509
|
status: '1',
|
|
454
510
|
cardType: '1',
|
|
455
511
|
title: '卡片标题',
|
|
512
|
+
subTitle: '副标题',
|
|
456
513
|
headerType: 'icon',
|
|
457
514
|
postFixFontSize: 16,
|
|
458
515
|
iconPosition: 'after',
|
package/dist/utils.js
CHANGED
|
@@ -4,10 +4,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
/**
|
|
8
|
-
* 根据 groupsName 将对象分成数组
|
|
9
|
-
* @param obj
|
|
10
|
-
* @returns
|
|
7
|
+
/**
|
|
8
|
+
* 根据 groupsName 将对象分成数组
|
|
9
|
+
* @param obj
|
|
10
|
+
* @returns
|
|
11
11
|
*/
|
|
12
12
|
export function objToListByGroupsName(obj) {
|
|
13
13
|
var groups = {};
|
|
@@ -34,10 +34,10 @@ export function objToListByGroupsName(obj) {
|
|
|
34
34
|
return result;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* (内部方法) 根据 groupsName 将对象分成数组
|
|
39
|
-
* @param obj
|
|
40
|
-
* @returns
|
|
37
|
+
/**
|
|
38
|
+
* (内部方法) 根据 groupsName 将对象分成数组
|
|
39
|
+
* @param obj
|
|
40
|
+
* @returns
|
|
41
41
|
*/
|
|
42
42
|
export function __objToListByGroupsName(obj) {
|
|
43
43
|
var groups = {};
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lingxiteam/theme-utils",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "",
|
|
5
|
-
"keywords": [],
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"author": "",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "father build",
|
|
15
|
-
"dev": "father dev",
|
|
16
|
-
"format": "prettier --write .",
|
|
17
|
-
"g": "esno scripts/generateConfig",
|
|
18
|
-
"gp": "esno scripts/generatePage",
|
|
19
|
-
"test": "esno a.ts"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"stylis": "^4.3.0"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@types/stylis": "^4.2.0",
|
|
26
|
-
"esno": "^0.17.0",
|
|
27
|
-
"father": "^4.3.0",
|
|
28
|
-
"prettier": "^2.6.2",
|
|
29
|
-
"prettier-plugin-organize-imports": "^2.3.4",
|
|
30
|
-
"prettier-plugin-packagejson": "^2.2.18"
|
|
31
|
-
},
|
|
32
|
-
"peerDependencies": {
|
|
33
|
-
"antd": "4.18.8"
|
|
34
|
-
},
|
|
35
|
-
"publishConfig": {
|
|
36
|
-
"access": "public"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@lingxiteam/theme-utils",
|
|
3
|
+
"version": "0.5.7",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "father build",
|
|
15
|
+
"dev": "father dev",
|
|
16
|
+
"format": "prettier --write .",
|
|
17
|
+
"g": "esno scripts/generateConfig",
|
|
18
|
+
"gp": "esno scripts/generatePage",
|
|
19
|
+
"test": "esno a.ts"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"stylis": "^4.3.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/stylis": "^4.2.0",
|
|
26
|
+
"esno": "^0.17.0",
|
|
27
|
+
"father": "^4.3.0",
|
|
28
|
+
"prettier": "^2.6.2",
|
|
29
|
+
"prettier-plugin-organize-imports": "^2.3.4",
|
|
30
|
+
"prettier-plugin-packagejson": "^2.2.18"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"antd": "4.18.8"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
}
|
|
38
|
+
}
|