@lingxiteam/theme-utils 0.1.7 → 0.1.8
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 +48 -3
- package/dist/config/Cascader.js +1 -1
- package/dist/config/Input.js +1 -1
- package/dist/config/InputNumber.js +1 -1
- package/dist/config/MultipleSelect.js +1 -1
- package/dist/config/Select.js +1 -1
- package/dist/config/Text.js +1 -1
- package/dist/config/TextArea.js +1 -1
- package/dist/config/TreeSelect.js +1 -1
- package/dist/css.js +8 -4
- package/dist/h5config/Accordion.js +1 -1
- package/dist/h5config/DAddressPicker.js +1 -1
- package/dist/h5config/DMultiplePicker.js +1 -1
- package/dist/h5config/DformDate.js +1 -1
- package/dist/h5config/DformInputNumber.js +1 -1
- package/dist/h5config/DformPicker.js +1 -1
- package/dist/h5config/DformSelect.js +1 -1
- package/dist/h5config/Divider.js +1 -1
- package/dist/h5config/Grid.js +1 -1
- package/dist/h5config/SearchView.js +1 -1
- package/dist/h5config/StaticTabs.js +2 -2
- package/dist/h5config/Table.d.ts +1 -1
- package/dist/h5config/Table.js +2 -2
- package/dist/lx-mobile.js +10 -14
- package/dist/lx.js +3 -4
- package/dist/utils.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# theme-utils
|
|
1
|
+
# @lingxiteam/theme-utils
|
|
2
2
|
|
|
3
3
|
antd@4 theme class utils, css utils
|
|
4
4
|
|
|
5
5
|
```js
|
|
6
|
-
pnpm i theme-utils
|
|
6
|
+
pnpm i @lingxiteam/theme-utils
|
|
7
7
|
|
|
8
|
-
import {} from 'theme-utils';
|
|
8
|
+
import {} from '@lingxiteam/theme-utils';
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
新建场景描述:
|
|
@@ -81,3 +81,48 @@ insertRules('12312', css);
|
|
|
81
81
|
```js
|
|
82
82
|
insertLink('12312', 'http://xxx.css', true);
|
|
83
83
|
```
|
|
84
|
+
|
|
85
|
+
## 关于配置
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
{
|
|
89
|
+
type: '类型',
|
|
90
|
+
variable: {
|
|
91
|
+
// 允许配置项
|
|
92
|
+
fontSize: {
|
|
93
|
+
// 对应编辑器的类型,px color select marginInput 四种
|
|
94
|
+
type: 'px',
|
|
95
|
+
label: '尺寸',
|
|
96
|
+
groupsName: '文字' ,
|
|
97
|
+
desc: '说明文字',
|
|
98
|
+
// 继承其他组件属性时要标记不可编辑
|
|
99
|
+
canEdit: false,
|
|
100
|
+
// 编辑从什么地方支撑这个属性
|
|
101
|
+
extendsKey: 'Form',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
groupsName: '分组名称',
|
|
105
|
+
icon: '图标名称要和组件库对应上',
|
|
106
|
+
title: '标题',
|
|
107
|
+
defaultValue: [
|
|
108
|
+
{
|
|
109
|
+
// 上面定义的配置项的默认值
|
|
110
|
+
fontSize: '14px',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
// 根据上面的配置项和下面的模版解析得到最终挂在的 css
|
|
114
|
+
tpl: '.hh { font-size: fontSize}',
|
|
115
|
+
// 预览用数据,编辑器中推拽出来的 dsl ,可直接复制,View 下的 components,维护时如预览页面有变更,可直接替换这个数据,无需详细比对
|
|
116
|
+
components: [],
|
|
117
|
+
};
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 关于继承
|
|
121
|
+
|
|
122
|
+
因为继承在预览和自定义样式时需要先加载父级的样式,所以需要在工具中写明哪些组件需要先获取。
|
|
123
|
+
|
|
124
|
+
如: theme-utils/src/lx-mobile.ts#L63 和 theme-utils/src/lx.ts#L62
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
const extend: any = { }
|
|
128
|
+
```
|
package/dist/config/Cascader.js
CHANGED
|
@@ -79,7 +79,7 @@ export var Cascader = {
|
|
|
79
79
|
title: '级联选择',
|
|
80
80
|
defaultValue: [{
|
|
81
81
|
iconFontSize: '12px',
|
|
82
|
-
iconTop: '
|
|
82
|
+
iconTop: '16px',
|
|
83
83
|
iconColor: 'rgba(28,36,46,.25)'
|
|
84
84
|
}],
|
|
85
85
|
tpl: ".ued-cascader-wrap .pcfactory-select-arrow{\n color: iconColor;\n width: iconFontSize;\n height: iconFontSize;\n top: iconTop;\n .anticon>svg{\n width: iconFontSize;\n height: iconFontSize;\n }\n }\n .ued-cascader-wrap .pcfactory-select-clear{\n color: iconColor;\n width: iconFontSize;\n height: iconFontSize;\n top: iconTop;\n .anticon>svg{\n width: iconFontSize;\n height: iconFontSize;\n }\n }",
|
package/dist/config/Input.js
CHANGED
package/dist/config/Select.js
CHANGED
|
@@ -79,7 +79,7 @@ export var Select = {
|
|
|
79
79
|
title: '下拉单选',
|
|
80
80
|
defaultValue: [{
|
|
81
81
|
iconFontSize: '12px',
|
|
82
|
-
iconTop: '
|
|
82
|
+
iconTop: '16px',
|
|
83
83
|
iconColor: 'rgba(28,36,46,.25)'
|
|
84
84
|
}],
|
|
85
85
|
tpl: ".ued-select-wrap .pcfactory-select-arrow{\n color: iconColor;\n width: iconFontSize;\n height: iconFontSize;\n top: iconTop;\n .anticon>svg{\n width: iconFontSize;\n height: iconFontSize;\n }\n }\n .ued-select-wrap .pcfactory-select-clear{\n color: iconColor;\n width: iconFontSize;\n height: iconFontSize;\n top: iconTop;\n .anticon>svg{\n width: iconFontSize;\n height: iconFontSize;\n }\n }",
|
package/dist/config/Text.js
CHANGED
package/dist/config/TextArea.js
CHANGED
|
@@ -80,7 +80,7 @@ export var TreeSelect = {
|
|
|
80
80
|
defaultValue: [{
|
|
81
81
|
iconFontSize: '12px',
|
|
82
82
|
iconColor: 'rgba(28,36,46,.25)',
|
|
83
|
-
iconTop: '
|
|
83
|
+
iconTop: '16px'
|
|
84
84
|
}],
|
|
85
85
|
tpl: ".ued-treeSelect-wrap .pcfactory-select-arrow{\n color: iconColor;\n width: iconFontSize;\n height: iconFontSize;\n top: iconTop;\n .anticon>svg{\n width: iconFontSize;\n height: iconFontSize;\n }\n }\n .ued-treeSelect-wrap .pcfactory-select-clear{\n color: iconColor;\n width: iconFontSize;\n height: iconFontSize;\n top: iconTop;\n .anticon>svg{\n width: iconFontSize;\n height: iconFontSize;\n }\n }",
|
|
86
86
|
components: [{
|
package/dist/css.js
CHANGED
|
@@ -12,6 +12,8 @@ import { compile, stringify, serialize } from 'stylis';
|
|
|
12
12
|
export function stringifyCss(tpl, values) {
|
|
13
13
|
if (!tpl) return '';
|
|
14
14
|
var result = tpl;
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line guard-for-in
|
|
15
17
|
for (var key in values) {
|
|
16
18
|
var value = values[key];
|
|
17
19
|
var regex = new RegExp("".concat(key, "\\b"), 'g');
|
|
@@ -26,6 +28,7 @@ export function parseCss(tpl, a) {
|
|
|
26
28
|
var aRegex = /\.(\w+)\s*{\s*(.*?)\s*}/g;
|
|
27
29
|
var aMatches = _toConsumableArray(a.matchAll(aRegex));
|
|
28
30
|
var result = {};
|
|
31
|
+
// eslint-disable-next-line
|
|
29
32
|
var _loop = function _loop() {
|
|
30
33
|
var tplMatch = tplMatches[i];
|
|
31
34
|
var tplSelector = tplMatch[1];
|
|
@@ -39,6 +42,7 @@ export function parseCss(tpl, a) {
|
|
|
39
42
|
var aStyles = aMatch[2].split(';').map(function (style) {
|
|
40
43
|
return style.trim();
|
|
41
44
|
}).filter(Boolean);
|
|
45
|
+
// eslint-disable-next-line
|
|
42
46
|
var _loop2 = function _loop2() {
|
|
43
47
|
var tplStyle = tplStyles[j];
|
|
44
48
|
var _tplStyle$split$map = tplStyle.split(':').map(function (item) {
|
|
@@ -97,10 +101,10 @@ export function insertRules(id, rules) {
|
|
|
97
101
|
var selector = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document.head;
|
|
98
102
|
var style = document.getElementById(id);
|
|
99
103
|
if (!style) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
(selector !== null && selector !== void 0 ? selector : document.head).appendChild(
|
|
103
|
-
|
|
104
|
+
style = document.createElement('style');
|
|
105
|
+
style.id = id;
|
|
106
|
+
(selector !== null && selector !== void 0 ? selector : document.head).appendChild(style);
|
|
107
|
+
style.innerHTML = rules;
|
|
104
108
|
} else {
|
|
105
109
|
style.innerHTML = rules;
|
|
106
110
|
}
|
|
@@ -107,7 +107,7 @@ export var Accordion = {
|
|
|
107
107
|
borderColor: '#DDD',
|
|
108
108
|
borderRadius: '4px'
|
|
109
109
|
}],
|
|
110
|
-
tpl: "\n .lcdp-accordion .lcdp-accordion-header{\n color: textColor;\n font-weight: fontWeight;\n font-size: fontSize;\n line-height: lineHeight;\n background: backgroundColor;\n }\n .lcdp-accordion-header-default-icon{\n height: tagSize;\n background: titleColor;\n margin-right: tagMargin;\n }\n .adm-list-item-content{\n border-color: lineColor;\n }\n\n .lcdp-accordion .adm-collapse-arrow svg{\n color: arrowColor;\n width: arrowSize;\n height: arrowSize;\n }\n .lcdp-accordion .adm-list-item-content-main{\n background: bodyBgColor;\n }\n .lcdp-accordion{\n .adm-collapse{\n border-radius: borderRadius;\n border-color: borderColor !important;\n }\n }",
|
|
110
|
+
tpl: "\n .lcdp-accordion .lcdp-accordion-header{\n color: textColor;\n font-weight: fontWeight;\n font-size: fontSize;\n line-height: lineHeight;\n background: backgroundColor;\n }\n .lcdp-accordion .lcdp-accordion-header-default-icon{\n height: tagSize;\n background: titleColor;\n margin-right: tagMargin;\n }\n .adm-list-item-content{\n border-color: lineColor;\n }\n\n .lcdp-accordion .adm-collapse-arrow svg{\n color: arrowColor;\n width: arrowSize;\n height: arrowSize;\n }\n .lcdp-accordion .adm-list-item-content-main{\n background: bodyBgColor;\n }\n .lcdp-accordion{\n .adm-collapse{\n border-radius: borderRadius;\n border-color: borderColor !important;\n }\n }",
|
|
111
111
|
components: [{
|
|
112
112
|
id: 'Accordion_960849',
|
|
113
113
|
label: '折叠面板',
|
package/dist/h5config/Divider.js
CHANGED
package/dist/h5config/Grid.js
CHANGED
|
@@ -77,7 +77,7 @@ export var Grid = {
|
|
|
77
77
|
fontSize: '12px',
|
|
78
78
|
fontWeight: '400'
|
|
79
79
|
}],
|
|
80
|
-
tpl: "\n .use-app-grid{\n background-color: backgroundColor;\n }\n .am-grid {\n border-radius: borderRadius;\n --adm-font-size-4: fontSize;\n --adm-color-text: textColor\n }\n .am-grid.am-grid-line:not(.am-grid-carousel){\n border:1PX solid borderColor;\n border-bottom:none;\n }\n .am-grid.am-grid-line .am-grid-flex:last-child{\n border-color: borderColor;\n border-bottom-right-radius: borderRadius;\n border-bottom-left-radius: borderRadius;\n }\n .am-grid.am-grid-line .am-grid-flex:first-child{\n border-top-left-radius: borderRadius;\n }\n .am-grid.am-grid-line .am-grid-flex .am-grid-flex-item:first-child{\n border: none;\n }\n .am-grid.am-grid-line .am-grid-flex{\n border-color: lineColor;\n }\n .am-grid.am-grid-square .am-grid-item .am-grid-item-inner-content .am-grid-icon{\n width: iconSize;\n }\n .am-grid .am-grid-flex .am-grid-flex-item .am-grid-item-content .am-grid-item-inner-content .am-grid-text{\n line-height: lineHeight;\n font-weight: fontWeight;\n }",
|
|
80
|
+
tpl: "\n .use-app-grid{\n background-color: backgroundColor;\n border-radius: borderRadius;\n }\n .am-grid {\n background-color: backgroundColor;\n border-radius: borderRadius;\n --adm-font-size-4: fontSize;\n --adm-color-text: textColor\n }\n .am-grid.am-grid-line:not(.am-grid-carousel){\n border:1PX solid borderColor;\n border-bottom:none;\n }\n .am-grid.am-grid-line .am-grid-flex:last-child{\n border-color: borderColor;\n border-bottom-right-radius: borderRadius;\n border-bottom-left-radius: borderRadius;\n }\n .am-grid.am-grid-line .am-grid-flex:first-child{\n border-top-left-radius: borderRadius;\n }\n .am-grid.am-grid-line .am-grid-flex .am-grid-flex-item:first-child{\n border: none;\n }\n .am-grid.am-grid-line .am-grid-flex{\n border-color: lineColor;\n }\n .am-grid.am-grid-square .am-grid-item .am-grid-item-inner-content .am-grid-icon{\n width: iconSize;\n }\n .am-grid .am-grid-flex .am-grid-flex-item .am-grid-item-content .am-grid-item-inner-content .am-grid-text{\n line-height: lineHeight;\n font-weight: fontWeight;\n }",
|
|
81
81
|
components: [{
|
|
82
82
|
id: 'Grid_842271',
|
|
83
83
|
label: '宫格',
|
|
@@ -97,7 +97,7 @@ export var SearchView = {
|
|
|
97
97
|
sBorderColor: 'rgba(0,0,0,0)',
|
|
98
98
|
sBorderRadius: '18px'
|
|
99
99
|
}],
|
|
100
|
-
tpl: "\n .alita-search-view-wrap{\n --adm-color-background: backgroundColor;\n padding: paddingValue;\n border: 1PX solid borderColor;\n border-radius: borderRadius;\n }\n .alita-search-bar-input{\n background-color: sBackgroundColor;\ncolor: textColor;\nfont-size: fontSize;\nfont-weight: fontWeight;\npadding: sPaddingValue;\nborder-radius: sBorderRadius;\nborder: 1PX solid sBorderColor;\n }\n .alita-search-bar-search{\n width: iconSize;\n height: iconSize;\n }",
|
|
100
|
+
tpl: "\n .alita-search-view-wrap{\n --adm-color-background: backgroundColor;\n padding: paddingValue;\n border: 1PX solid borderColor;\n border-radius: borderRadius;\n }\n .alita-search-view-wrap .alita-search-bar-input{\n background-color: sBackgroundColor;\ncolor: textColor;\nfont-size: fontSize;\nfont-weight: fontWeight;\npadding: sPaddingValue;\nborder-radius: sBorderRadius;\nborder: 1PX solid sBorderColor;\n }\n .alita-search-view-wrap .alita-search-bar-search{\n width: iconSize;\n height: iconSize;\n }",
|
|
101
101
|
components: [{
|
|
102
102
|
id: 'SearchView_197467',
|
|
103
103
|
label: '搜索',
|
|
@@ -117,13 +117,13 @@ export var StaticTabs = {
|
|
|
117
117
|
fontWeight: '400',
|
|
118
118
|
fontSize: '15px',
|
|
119
119
|
lineHeight: '100%',
|
|
120
|
-
selectBorderRadius: '
|
|
120
|
+
selectBorderRadius: '12px',
|
|
121
121
|
// paddingValue:'8px 0 8px 0',
|
|
122
122
|
bodyBgColor: 'rgba(0,0,0,0)',
|
|
123
123
|
borderColor: 'rgba(0,0,0,0)',
|
|
124
124
|
lineColor: '#108ee9'
|
|
125
125
|
}],
|
|
126
|
-
tpl: "\n
|
|
126
|
+
tpl: "\n .am-tabs-default-bar-top .am-tabs-default-bar-tab{\nfont-weight: fontWeight;\nborder-top-left-radius: selectBorderRadius;\n border-top-right-radius: selectBorderRadius;\n color: textColor;\nfont-size: fontSize;\nborder: 1px solid borderColor;\nbackground-color: backgroundColor;\n }\n .am-tabs-default-bar-content .am-tabs-default-bar-tab-active::before, .am-tabs-default-bar-content .am-tabs-default-bar-tab-active::after{\n background: selectBgColor;\n }\n .am-tabs-default-bar-content .am-tabs-default-bar-tab-active::before{\n left: 0;\n }\n .am-tabs-bottom, .am-tabs-top{\n border-radius: selectBorderRadius;\n }\n .am-tabs-default-bar-content .am-tabs-default-bar-tab-active {\n background-color: selectBgColor;\n color: selectTextColor;\nfont-weight: selectFontWeight;\n }\n .am-tabs-pane-wrap{\n background-color: bodyBgColor;\n }\n .am-tabs-default-bar-animated .am-tabs-default-bar-underline{\n border-color: lineColor;\n }",
|
|
127
127
|
components: [{
|
|
128
128
|
id: 'StaticTabs_828878',
|
|
129
129
|
label: '静态标签页',
|
package/dist/h5config/Table.d.ts
CHANGED
package/dist/h5config/Table.js
CHANGED
package/dist/lx-mobile.js
CHANGED
|
@@ -7,7 +7,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
7
7
|
import { stringifyCss, parseCss } from "./css";
|
|
8
8
|
import { objToListByGroupsName } from "./utils";
|
|
9
9
|
import { Button } from "./h5config/Button";
|
|
10
|
-
import {
|
|
10
|
+
import { DynamicTable } from "./h5config/Table";
|
|
11
11
|
import { FilterItems } from "./h5config/FilterItems";
|
|
12
12
|
import { NoticeBarPlus } from "./h5config/NoticeBarPlus";
|
|
13
13
|
import { StaticTabs } from "./h5config/StaticTabs";
|
|
@@ -39,7 +39,7 @@ export var MOBILE_ASSETS_CSS_TPL = {
|
|
|
39
39
|
// TODO: 分割线 style 写死,最后修改方案
|
|
40
40
|
// Divider,
|
|
41
41
|
Card: Card,
|
|
42
|
-
|
|
42
|
+
DynamicTable: DynamicTable,
|
|
43
43
|
FilterItems: FilterItems,
|
|
44
44
|
NoticeBarPlus: NoticeBarPlus,
|
|
45
45
|
StaticTabs: StaticTabs,
|
|
@@ -98,18 +98,14 @@ export function px2rem(obj) {
|
|
|
98
98
|
var remValues = values.map(function (val) {
|
|
99
99
|
if (val.includes('px')) {
|
|
100
100
|
var parsedValue = parseFloat(val);
|
|
101
|
-
return parsedValue / 50
|
|
101
|
+
return "".concat(parsedValue / 50, "rem");
|
|
102
102
|
}
|
|
103
103
|
return val;
|
|
104
104
|
});
|
|
105
105
|
value = remValues.join(' ');
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (value.includes('px')) {
|
|
110
|
-
var parsedValue = parseFloat(value);
|
|
111
|
-
value = parsedValue / 50 + 'rem';
|
|
112
|
-
}
|
|
106
|
+
} else if (value.includes('px')) {
|
|
107
|
+
var parsedValue = parseFloat(value);
|
|
108
|
+
value = "".concat(parsedValue / 50, "rem");
|
|
113
109
|
}
|
|
114
110
|
remObj[key] = value;
|
|
115
111
|
}
|
|
@@ -128,6 +124,7 @@ export function parseValueRem(values) {
|
|
|
128
124
|
if ((_values$key = values[key]) !== null && _values$key !== void 0 && _values$key.includes('rem')) {
|
|
129
125
|
values[key] = rem2px(values[key]);
|
|
130
126
|
}
|
|
127
|
+
return key;
|
|
131
128
|
});
|
|
132
129
|
return values;
|
|
133
130
|
}
|
|
@@ -136,12 +133,11 @@ export function parseValueRem(values) {
|
|
|
136
133
|
export function stringifyMobileCssByTypePreview(type, values) {
|
|
137
134
|
if (extend[type]) {
|
|
138
135
|
var cfg = getMobileItemByType(extend[type]);
|
|
139
|
-
var item = getMobileItemByType(type);
|
|
140
|
-
return stringifyCss(cfg.tpl, px2rem(_objectSpread(_objectSpread({}, cfg.defaultValue[0]), values))) + stringifyCss(item.tpl, px2rem(values));
|
|
141
|
-
} else {
|
|
142
136
|
var _item = getMobileItemByType(type);
|
|
143
|
-
return stringifyCss(_item.tpl, px2rem(values));
|
|
137
|
+
return stringifyCss(cfg.tpl, px2rem(_objectSpread(_objectSpread({}, cfg.defaultValue[0]), values))) + stringifyCss(_item.tpl, px2rem(values));
|
|
144
138
|
}
|
|
139
|
+
var item = getMobileItemByType(type);
|
|
140
|
+
return stringifyCss(item.tpl, px2rem(values));
|
|
145
141
|
}
|
|
146
142
|
export function stringifyMobileCssByType(type, values) {
|
|
147
143
|
var item = getMobileItemByType(type);
|
package/dist/lx.js
CHANGED
|
@@ -99,12 +99,11 @@ export function stringifyCssByType(type, values) {
|
|
|
99
99
|
export function stringifyCssByTypePreview(type, values) {
|
|
100
100
|
if (extend[type]) {
|
|
101
101
|
var cfg = getItemByType(extend[type]);
|
|
102
|
-
var item = getItemByType(type);
|
|
103
|
-
return stringifyCss(cfg.tpl, _objectSpread(_objectSpread({}, cfg.defaultValue[0]), values)) + stringifyCss(item.tpl, values);
|
|
104
|
-
} else {
|
|
105
102
|
var _item = getItemByType(type);
|
|
106
|
-
return stringifyCss(_item.tpl, values);
|
|
103
|
+
return stringifyCss(cfg.tpl, _objectSpread(_objectSpread({}, cfg.defaultValue[0]), values)) + stringifyCss(_item.tpl, values);
|
|
107
104
|
}
|
|
105
|
+
var item = getItemByType(type);
|
|
106
|
+
return stringifyCss(item.tpl, values);
|
|
108
107
|
}
|
|
109
108
|
export function parseCssByType(type, css) {
|
|
110
109
|
var item = getItemByType(type);
|
package/dist/utils.js
CHANGED
|
@@ -13,6 +13,7 @@ export function objToListByGroupsName(obj) {
|
|
|
13
13
|
var groups = {};
|
|
14
14
|
|
|
15
15
|
// 遍历对象,根据groupsName属性进行分组
|
|
16
|
+
// eslint-disable-next-line guard-for-in
|
|
16
17
|
for (var key in obj) {
|
|
17
18
|
var item = obj[key];
|
|
18
19
|
var groupName = item.groupsName;
|
|
@@ -42,6 +43,7 @@ export function __objToListByGroupsName(obj) {
|
|
|
42
43
|
var groups = {};
|
|
43
44
|
|
|
44
45
|
// 遍历对象,根据groupsName属性进行分组
|
|
46
|
+
// eslint-disable-next-line guard-for-in
|
|
45
47
|
for (var key in obj) {
|
|
46
48
|
var item = obj[key];
|
|
47
49
|
var groupName = item.groupsName;
|