ns-base-module 1.1.62 → 1.1.63
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/LICENSE +21 -21
- package/README.md +20 -20
- package/dist/Button/AntdIconButton.js +2 -2
- package/dist/Button/ConfigButton.js +12 -12
- package/dist/ChooseModal/index.js +6 -6
- package/dist/Entry/components/ChooseModalTable.js +6 -6
- package/dist/Entry/components/ImageText.js +5 -5
- package/dist/Entry/components/InputNumber.js +10 -10
- package/dist/Entry/components/ListSelect.js +6 -6
- package/dist/Entry/components/ObjectSelect.js +5 -5
- package/dist/Entry/components/Select.js +5 -5
- package/dist/Entry/components/TagsDatePicker.js +6 -6
- package/dist/Entry/components/TreeSelect.js +5 -5
- package/dist/Entry/components/index.scss +97 -97
- package/dist/Entry/components/utils.js +5 -5
- package/dist/Entry/data.d.ts +133 -133
- package/dist/Entry/index.js +6 -6
- package/dist/FilterPopover/FilterClearIcon.js +6 -6
- package/dist/FilterPopover/index.js +6 -6
- package/dist/Icon/index.js +5 -5
- package/dist/IconTools/utils.js +5 -5
- package/dist/SubtotalsModal/index.js +7 -7
- package/dist/TableHeaderConfigPopover/index.js +35 -10
- package/dist/TableHeaderConfigPopover/updateColumns.js +5 -5
- package/dist/TableHeaderConfigPopover/utils.js +5 -5
- package/dist/WidgetConfig/index.js +8 -8
- package/dist/umd/ns-base-module.min.js +1 -1
- package/dist/utils/cache.js +10 -10
- package/dist/utils/language.js +1 -0
- package/dist/utils/services/global.js +49 -49
- package/dist/utils/utils.js +50 -50
- package/package.json +100 -100
- package/style/basics.scss +671 -671
- package/style/components/ClassFilter.scss +74 -74
- package/style/components/FilterPopover.scss +40 -40
- package/style/components/SubtotalsModal.scss +388 -388
- package/style/components/TableHeaderConfigPopover.scss +105 -105
- package/style/components/index.scss +4 -4
- package/style/default.scss +1219 -1219
- package/style/index.scss +1 -1
- package/style/mixins/index.scss +28 -28
- package/style/mixins/libs/tint.scss +23 -23
- package/style/variables.scss +684 -684
- package/types/Action.d.ts +43 -43
- package/types/types.d.ts +1 -1
- package/dist/Button/AntdIconButton.d.ts +0 -11
- package/dist/Button/AntdIconButton.d.ts.map +0 -1
- package/dist/Button/ConfigButton.d.ts +0 -18
- package/dist/Button/ConfigButton.d.ts.map +0 -1
- package/dist/Button/index.d.ts +0 -8
- package/dist/Button/index.d.ts.map +0 -1
- package/dist/ChooseModal/index.d.ts +0 -21
- package/dist/ChooseModal/index.d.ts.map +0 -1
- package/dist/ClassFilter/index.d.ts +0 -11
- package/dist/ClassFilter/index.d.ts.map +0 -1
- package/dist/ClassFilter/indexVertical.d.ts +0 -11
- package/dist/ClassFilter/indexVertical.d.ts.map +0 -1
- package/dist/ClassFilter/util.d.ts +0 -17
- package/dist/ClassFilter/util.d.ts.map +0 -1
- package/dist/CopyCol/index.d.ts +0 -4
- package/dist/CopyCol/index.d.ts.map +0 -1
- package/dist/Entry/EntryCriteria.d.ts +0 -17
- package/dist/Entry/EntryCriteria.d.ts.map +0 -1
- package/dist/Entry/EntryItem.d.ts +0 -34
- package/dist/Entry/EntryItem.d.ts.map +0 -1
- package/dist/Entry/components/Checkbox.d.ts +0 -12
- package/dist/Entry/components/Checkbox.d.ts.map +0 -1
- package/dist/Entry/components/ChooseModalTable.d.ts +0 -15
- package/dist/Entry/components/ChooseModalTable.d.ts.map +0 -1
- package/dist/Entry/components/Condition.d.ts +0 -9
- package/dist/Entry/components/Condition.d.ts.map +0 -1
- package/dist/Entry/components/DatePicker.d.ts +0 -12
- package/dist/Entry/components/DatePicker.d.ts.map +0 -1
- package/dist/Entry/components/Etable2Modal.d.ts +0 -4
- package/dist/Entry/components/Etable2Modal.d.ts.map +0 -1
- package/dist/Entry/components/Express.d.ts +0 -8
- package/dist/Entry/components/Express.d.ts.map +0 -1
- package/dist/Entry/components/GroupInput.d.ts +0 -13
- package/dist/Entry/components/GroupInput.d.ts.map +0 -1
- package/dist/Entry/components/ImageText.d.ts +0 -13
- package/dist/Entry/components/ImageText.d.ts.map +0 -1
- package/dist/Entry/components/Input.d.ts +0 -27
- package/dist/Entry/components/Input.d.ts.map +0 -1
- package/dist/Entry/components/InputNumber.d.ts +0 -18
- package/dist/Entry/components/InputNumber.d.ts.map +0 -1
- package/dist/Entry/components/InputNumberRange.d.ts +0 -10
- package/dist/Entry/components/InputNumberRange.d.ts.map +0 -1
- package/dist/Entry/components/ListSelect.d.ts +0 -15
- package/dist/Entry/components/ListSelect.d.ts.map +0 -1
- package/dist/Entry/components/ObjectSelect.d.ts +0 -14
- package/dist/Entry/components/ObjectSelect.d.ts.map +0 -1
- package/dist/Entry/components/Progress.d.ts +0 -11
- package/dist/Entry/components/Progress.d.ts.map +0 -1
- package/dist/Entry/components/Radio.d.ts +0 -15
- package/dist/Entry/components/Radio.d.ts.map +0 -1
- package/dist/Entry/components/Select.d.ts +0 -29
- package/dist/Entry/components/Select.d.ts.map +0 -1
- package/dist/Entry/components/Switch.d.ts +0 -6
- package/dist/Entry/components/Switch.d.ts.map +0 -1
- package/dist/Entry/components/TagsDatePicker.d.ts +0 -7
- package/dist/Entry/components/TagsDatePicker.d.ts.map +0 -1
- package/dist/Entry/components/TimePicker.d.ts +0 -6
- package/dist/Entry/components/TimePicker.d.ts.map +0 -1
- package/dist/Entry/components/TreeSelect.d.ts +0 -5
- package/dist/Entry/components/TreeSelect.d.ts.map +0 -1
- package/dist/Entry/components/utils.d.ts +0 -1
- package/dist/Entry/components/utils.d.ts.map +0 -1
- package/dist/Entry/index.d.ts +0 -54
- package/dist/Entry/index.d.ts.map +0 -1
- package/dist/FilterPopover/Filter.d.ts +0 -30
- package/dist/FilterPopover/Filter.d.ts.map +0 -1
- package/dist/FilterPopover/FilterClearIcon.d.ts +0 -8
- package/dist/FilterPopover/FilterClearIcon.d.ts.map +0 -1
- package/dist/FilterPopover/index.d.ts +0 -21
- package/dist/FilterPopover/index.d.ts.map +0 -1
- package/dist/FilterPopover/vTableFilter.d.ts +0 -25
- package/dist/FilterPopover/vTableFilter.d.ts.map +0 -1
- package/dist/Icon/IconCreate.d.ts +0 -11
- package/dist/Icon/IconCreate.d.ts.map +0 -1
- package/dist/Icon/index.d.ts +0 -6
- package/dist/Icon/index.d.ts.map +0 -1
- package/dist/IconTools/index.d.ts +0 -13
- package/dist/IconTools/index.d.ts.map +0 -1
- package/dist/IconTools/utils.d.ts +0 -15
- package/dist/IconTools/utils.d.ts.map +0 -1
- package/dist/SubtotalsModal/Increment.d.ts +0 -18
- package/dist/SubtotalsModal/Increment.d.ts.map +0 -1
- package/dist/SubtotalsModal/addSubtotals.d.ts +0 -22
- package/dist/SubtotalsModal/addSubtotals.d.ts.map +0 -1
- package/dist/SubtotalsModal/dndQuota.d.ts +0 -27
- package/dist/SubtotalsModal/dndQuota.d.ts.map +0 -1
- package/dist/SubtotalsModal/index.d.ts +0 -22
- package/dist/SubtotalsModal/index.d.ts.map +0 -1
- package/dist/SubtotalsModal/subtotalTemplate.d.ts +0 -22
- package/dist/SubtotalsModal/subtotalTemplate.d.ts.map +0 -1
- package/dist/SubtotalsModal/util.d.ts +0 -3
- package/dist/SubtotalsModal/util.d.ts.map +0 -1
- package/dist/SubtotalsModal/viewSubtotals.d.ts +0 -12
- package/dist/SubtotalsModal/viewSubtotals.d.ts.map +0 -1
- package/dist/TableHeaderConfigPopover/Dustbin.d.ts +0 -5
- package/dist/TableHeaderConfigPopover/Dustbin.d.ts.map +0 -1
- package/dist/TableHeaderConfigPopover/index.d.ts +0 -22
- package/dist/TableHeaderConfigPopover/index.d.ts.map +0 -1
- package/dist/TableHeaderConfigPopover/updateColumns.d.ts +0 -10
- package/dist/TableHeaderConfigPopover/updateColumns.d.ts.map +0 -1
- package/dist/TableHeaderConfigPopover/utils.d.ts +0 -16
- package/dist/TableHeaderConfigPopover/utils.d.ts.map +0 -1
- package/dist/WidgetConfig/index.d.ts +0 -40
- package/dist/WidgetConfig/index.d.ts.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/test/index.d.ts +0 -4
- package/dist/test/index.d.ts.map +0 -1
- package/dist/utils/cache.d.ts +0 -17
- package/dist/utils/cache.d.ts.map +0 -1
- package/dist/utils/enum.d.ts +0 -22
- package/dist/utils/enum.d.ts.map +0 -1
- package/dist/utils/errorMsg.d.ts +0 -3
- package/dist/utils/errorMsg.d.ts.map +0 -1
- package/dist/utils/language.d.ts +0 -283
- package/dist/utils/language.d.ts.map +0 -1
- package/dist/utils/request.d.ts +0 -1
- package/dist/utils/request.d.ts.map +0 -1
- package/dist/utils/services/global.d.ts +0 -130
- package/dist/utils/services/global.d.ts.map +0 -1
- package/dist/utils/utils.d.ts +0 -111
- package/dist/utils/utils.d.ts.map +0 -1
package/dist/utils/cache.js
CHANGED
|
@@ -4,17 +4,17 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
/*
|
|
8
|
-
* @description:
|
|
9
|
-
* @author chenchangfu
|
|
10
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
11
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
7
|
+
/*
|
|
8
|
+
* @description:
|
|
9
|
+
* @author chenchangfu
|
|
10
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
11
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
12
12
|
*/
|
|
13
|
-
/*
|
|
14
|
-
* @description:
|
|
15
|
-
* @author chenchangfu
|
|
16
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
17
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
13
|
+
/*
|
|
14
|
+
* @description:
|
|
15
|
+
* @author chenchangfu
|
|
16
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
17
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
18
18
|
*/
|
|
19
19
|
export var ListCache = /*#__PURE__*/function () {
|
|
20
20
|
function ListCache() {
|
package/dist/utils/language.js
CHANGED
|
@@ -7,20 +7,20 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
7
7
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
8
8
|
// import request from "../request"; // // 编译卡顿
|
|
9
9
|
import request from "axios";
|
|
10
|
-
/**
|
|
11
|
-
* 执行动态配置按钮事件
|
|
12
|
-
* @param edit Y/N Y: 编辑 N: 详情
|
|
13
|
-
* @param menuCode 菜单code
|
|
14
|
-
* @param id 详情id
|
|
10
|
+
/**
|
|
11
|
+
* 执行动态配置按钮事件
|
|
12
|
+
* @param edit Y/N Y: 编辑 N: 详情
|
|
13
|
+
* @param menuCode 菜单code
|
|
14
|
+
* @param id 详情id
|
|
15
15
|
*/
|
|
16
16
|
export function queryButton(_x) {
|
|
17
17
|
return _queryButton.apply(this, arguments);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* 返回时请求取消锁定
|
|
22
|
-
* @param param0
|
|
23
|
-
* @returns
|
|
20
|
+
/**
|
|
21
|
+
* 返回时请求取消锁定
|
|
22
|
+
* @param param0
|
|
23
|
+
* @returns
|
|
24
24
|
*/
|
|
25
25
|
function _queryButton() {
|
|
26
26
|
_queryButton = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
@@ -45,9 +45,9 @@ export function queryLeaveForm(_x2) {
|
|
|
45
45
|
return _queryLeaveForm.apply(this, arguments);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* 请求获取反馈中心的地址
|
|
50
|
-
* @returns 反馈中心地址
|
|
48
|
+
/**
|
|
49
|
+
* 请求获取反馈中心的地址
|
|
50
|
+
* @returns 反馈中心地址
|
|
51
51
|
*/
|
|
52
52
|
function _queryLeaveForm() {
|
|
53
53
|
_queryLeaveForm = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
|
|
@@ -69,9 +69,9 @@ export function queryFeedback() {
|
|
|
69
69
|
return _queryFeedback.apply(this, arguments);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/**
|
|
73
|
-
* 获取字典枚举
|
|
74
|
-
* @param dictCode 字典编码
|
|
72
|
+
/**
|
|
73
|
+
* 获取字典枚举
|
|
74
|
+
* @param dictCode 字典编码
|
|
75
75
|
*/
|
|
76
76
|
function _queryFeedback() {
|
|
77
77
|
_queryFeedback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
@@ -91,10 +91,10 @@ export function queryDictEnum(_x3) {
|
|
|
91
91
|
return _queryDictEnum.apply(this, arguments);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
/**
|
|
95
|
-
* 获取动态列表的配置
|
|
96
|
-
* @param menuCode 菜单code
|
|
97
|
-
* @param formTemplateCode 表单编码
|
|
94
|
+
/**
|
|
95
|
+
* 获取动态列表的配置
|
|
96
|
+
* @param menuCode 菜单code
|
|
97
|
+
* @param formTemplateCode 表单编码
|
|
98
98
|
*/
|
|
99
99
|
function _queryDictEnum() {
|
|
100
100
|
_queryDictEnum = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(dictCode) {
|
|
@@ -116,10 +116,10 @@ export function queryConfig(_x4) {
|
|
|
116
116
|
return _queryConfig.apply(this, arguments);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
* 获取动态列表的配置
|
|
121
|
-
* @param menuCode 菜单code
|
|
122
|
-
* @param formTemplateCode 表单编码
|
|
119
|
+
/**
|
|
120
|
+
* 获取动态列表的配置
|
|
121
|
+
* @param menuCode 菜单code
|
|
122
|
+
* @param formTemplateCode 表单编码
|
|
123
123
|
*/
|
|
124
124
|
function _queryConfig() {
|
|
125
125
|
_queryConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref3) {
|
|
@@ -144,9 +144,9 @@ export function queryAppConfig(_x5) {
|
|
|
144
144
|
return _queryAppConfig.apply(this, arguments);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
/**
|
|
148
|
-
* 获取动态列表的数据
|
|
149
|
-
* @param params 请求参数
|
|
147
|
+
/**
|
|
148
|
+
* 获取动态列表的数据
|
|
149
|
+
* @param params 请求参数
|
|
150
150
|
*/
|
|
151
151
|
function _queryAppConfig() {
|
|
152
152
|
_queryAppConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_ref4) {
|
|
@@ -171,9 +171,9 @@ export function queryMobileData(_x6) {
|
|
|
171
171
|
return _queryMobileData.apply(this, arguments);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
/**
|
|
175
|
-
* 获取百度用户统计token
|
|
176
|
-
* @returns
|
|
174
|
+
/**
|
|
175
|
+
* 获取百度用户统计token
|
|
176
|
+
* @returns
|
|
177
177
|
*/
|
|
178
178
|
function _queryMobileData() {
|
|
179
179
|
_queryMobileData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
|
|
@@ -196,14 +196,14 @@ export function queryBaiduToken() {
|
|
|
196
196
|
return _queryBaiduToken.apply(this, arguments);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
/**
|
|
200
|
-
* 获取动态菜单的详情/表单数据
|
|
201
|
-
* @param menuCode 菜单code
|
|
202
|
-
* @param formTemplateCode 模板编码
|
|
203
|
-
* @param event 事件编码
|
|
204
|
-
* @param code 按钮编码
|
|
205
|
-
* @param method 请求类型
|
|
206
|
-
* @param data body参数
|
|
199
|
+
/**
|
|
200
|
+
* 获取动态菜单的详情/表单数据
|
|
201
|
+
* @param menuCode 菜单code
|
|
202
|
+
* @param formTemplateCode 模板编码
|
|
203
|
+
* @param event 事件编码
|
|
204
|
+
* @param code 按钮编码
|
|
205
|
+
* @param method 请求类型
|
|
206
|
+
* @param data body参数
|
|
207
207
|
*/
|
|
208
208
|
function _queryBaiduToken() {
|
|
209
209
|
_queryBaiduToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
@@ -223,9 +223,9 @@ export function queryDetailsData(_x7) {
|
|
|
223
223
|
return _queryDetailsData.apply(this, arguments);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
/**
|
|
227
|
-
* 获取百度用户统计token
|
|
228
|
-
* @returns
|
|
226
|
+
/**
|
|
227
|
+
* 获取百度用户统计token
|
|
228
|
+
* @returns
|
|
229
229
|
*/
|
|
230
230
|
function _queryDetailsData() {
|
|
231
231
|
_queryDetailsData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_ref5) {
|
|
@@ -250,9 +250,9 @@ export function queryUpload(_x8) {
|
|
|
250
250
|
return _queryUpload.apply(this, arguments);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
/**
|
|
254
|
-
*
|
|
255
|
-
* @param params {name: 功能名称, path: 路由地址, favorite_status: true/false(收藏标识)}
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
* @param params {name: 功能名称, path: 路由地址, favorite_status: true/false(收藏标识)}
|
|
256
256
|
*/
|
|
257
257
|
function _queryUpload() {
|
|
258
258
|
_queryUpload = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(data) {
|
|
@@ -337,17 +337,17 @@ function _commonRequest() {
|
|
|
337
337
|
}));
|
|
338
338
|
return _commonRequest.apply(this, arguments);
|
|
339
339
|
}
|
|
340
|
-
/**
|
|
341
|
-
* 获取动态列表的数据
|
|
342
|
-
* @param params 请求参数
|
|
340
|
+
/**
|
|
341
|
+
* 获取动态列表的数据
|
|
342
|
+
* @param params 请求参数
|
|
343
343
|
*/
|
|
344
344
|
export function queryData(_x12) {
|
|
345
345
|
return _queryData.apply(this, arguments);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
/**
|
|
349
|
-
* 保存模板
|
|
350
|
-
* @param params 请求参数
|
|
348
|
+
/**
|
|
349
|
+
* 保存模板
|
|
350
|
+
* @param params 请求参数
|
|
351
351
|
*/
|
|
352
352
|
function _queryData() {
|
|
353
353
|
_queryData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
|
package/dist/utils/utils.js
CHANGED
|
@@ -44,9 +44,9 @@ export var isAntDesignProOrDev = function isAntDesignProOrDev() {
|
|
|
44
44
|
|
|
45
45
|
// export const getPageQuery = () => parse(window.location.href.split("?")[1]);
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* @description: 替换字符串中${} 占位
|
|
49
|
-
* @return {*}
|
|
47
|
+
/**
|
|
48
|
+
* @description: 替换字符串中${} 占位
|
|
49
|
+
* @return {*}
|
|
50
50
|
*/
|
|
51
51
|
|
|
52
52
|
var replaceCode = function replaceCode(path, data) {
|
|
@@ -67,11 +67,11 @@ export var pathAddIds = function pathAddIds(url, dataSource, hasPageTurning) {
|
|
|
67
67
|
var _path = url.includes("?") ? "".concat(url, "&__ids=").concat(__ids) : "".concat(url, "?__ids=").concat(__ids);
|
|
68
68
|
return _path;
|
|
69
69
|
};
|
|
70
|
-
/**
|
|
71
|
-
* 处理动态路径的动态参数
|
|
72
|
-
* @param detail 按钮详情
|
|
73
|
-
* @param record 数据
|
|
74
|
-
* @returns
|
|
70
|
+
/**
|
|
71
|
+
* 处理动态路径的动态参数
|
|
72
|
+
* @param detail 按钮详情
|
|
73
|
+
* @param record 数据
|
|
74
|
+
* @returns
|
|
75
75
|
*/
|
|
76
76
|
export var dynamicPath = function dynamicPath(detail, record, dataSource) {
|
|
77
77
|
var _detail$config, _detail$config2, _detail$config3;
|
|
@@ -229,11 +229,11 @@ export var matchCondition = function matchCondition(condition, value, cdtValue)
|
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
/**
|
|
233
|
-
* 取对象多级key下的值
|
|
234
|
-
* @param keysStr 对象的多级key,用.分割,a.a1 = obj[a][a1]
|
|
235
|
-
* @param obj 取值的对象
|
|
236
|
-
* @returns
|
|
232
|
+
/**
|
|
233
|
+
* 取对象多级key下的值
|
|
234
|
+
* @param keysStr 对象的多级key,用.分割,a.a1 = obj[a][a1]
|
|
235
|
+
* @param obj 取值的对象
|
|
236
|
+
* @returns
|
|
237
237
|
*/
|
|
238
238
|
export var getMuilObjectValue = function getMuilObjectValue(keysStr, obj) {
|
|
239
239
|
var keys = keysStr.split(".");
|
|
@@ -319,18 +319,18 @@ export function flattenArrayObjects(arr) {
|
|
|
319
319
|
}
|
|
320
320
|
return result;
|
|
321
321
|
}
|
|
322
|
-
/**
|
|
323
|
-
* 255颜色值转16进制颜色值
|
|
324
|
-
* @param n 255颜色值
|
|
325
|
-
* @returns hex 16进制颜色值
|
|
322
|
+
/**
|
|
323
|
+
* 255颜色值转16进制颜色值
|
|
324
|
+
* @param n 255颜色值
|
|
325
|
+
* @returns hex 16进制颜色值
|
|
326
326
|
*/
|
|
327
327
|
export var toHex = function toHex(n) {
|
|
328
328
|
return "".concat(n > 15 ? "" : 0).concat(n.toString(16));
|
|
329
329
|
};
|
|
330
330
|
|
|
331
|
-
/**
|
|
332
|
-
* 颜色对象转化为16进制颜色字符串
|
|
333
|
-
* @param colorObj 颜色对象
|
|
331
|
+
/**
|
|
332
|
+
* 颜色对象转化为16进制颜色字符串
|
|
333
|
+
* @param colorObj 颜色对象
|
|
334
334
|
*/
|
|
335
335
|
export var toHexString = function toHexString(colorObj) {
|
|
336
336
|
var r = colorObj.r,
|
|
@@ -341,9 +341,9 @@ export var toHexString = function toHexString(colorObj) {
|
|
|
341
341
|
return "#".concat(toHex(r)).concat(toHex(g)).concat(toHex(b)).concat(a === 1 ? "" : toHex(Math.floor(a * 255)));
|
|
342
342
|
};
|
|
343
343
|
|
|
344
|
-
/**
|
|
345
|
-
* 颜色对象转化为rgb颜色字符串
|
|
346
|
-
* @param colorObj 颜色对象
|
|
344
|
+
/**
|
|
345
|
+
* 颜色对象转化为rgb颜色字符串
|
|
346
|
+
* @param colorObj 颜色对象
|
|
347
347
|
*/
|
|
348
348
|
export var toRgbString = function toRgbString(colorObj) {
|
|
349
349
|
var r = colorObj.r,
|
|
@@ -352,9 +352,9 @@ export var toRgbString = function toRgbString(colorObj) {
|
|
|
352
352
|
return "rgb(".concat(r, ",").concat(g, ",").concat(b, ")");
|
|
353
353
|
};
|
|
354
354
|
|
|
355
|
-
/**
|
|
356
|
-
* 颜色对象转化为rgba颜色字符串
|
|
357
|
-
* @param colorObj 颜色对象
|
|
355
|
+
/**
|
|
356
|
+
* 颜色对象转化为rgba颜色字符串
|
|
357
|
+
* @param colorObj 颜色对象
|
|
358
358
|
*/
|
|
359
359
|
export var toRgbaString = function toRgbaString(colorObj) {
|
|
360
360
|
var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10000;
|
|
@@ -366,10 +366,10 @@ export var toRgbaString = function toRgbaString(colorObj) {
|
|
|
366
366
|
return "rgba(".concat(r, ",").concat(g, ",").concat(b, ",").concat(Math.floor(a * n) / n, ")");
|
|
367
367
|
};
|
|
368
368
|
|
|
369
|
-
/**
|
|
370
|
-
* 16进制颜色字符串解析为颜色对象
|
|
371
|
-
* @param color 颜色字符串
|
|
372
|
-
* @returns IColorObj
|
|
369
|
+
/**
|
|
370
|
+
* 16进制颜色字符串解析为颜色对象
|
|
371
|
+
* @param color 颜色字符串
|
|
372
|
+
* @returns IColorObj
|
|
373
373
|
*/
|
|
374
374
|
export var parseHexColor = function parseHexColor(color, op) {
|
|
375
375
|
var hex = color.slice(1);
|
|
@@ -390,10 +390,10 @@ export var parseHexColor = function parseHexColor(color, op) {
|
|
|
390
390
|
};
|
|
391
391
|
};
|
|
392
392
|
|
|
393
|
-
/**
|
|
394
|
-
* rgba颜色字符串解析为颜色对象
|
|
395
|
-
* @param color 颜色字符串
|
|
396
|
-
* @returns IColorObj
|
|
393
|
+
/**
|
|
394
|
+
* rgba颜色字符串解析为颜色对象
|
|
395
|
+
* @param color 颜色字符串
|
|
396
|
+
* @returns IColorObj
|
|
397
397
|
*/
|
|
398
398
|
export var parseRgbaColor = function parseRgbaColor(color, op) {
|
|
399
399
|
var arr = color.match(/(\d(\.\d+)?)+/g) || [];
|
|
@@ -408,10 +408,10 @@ export var parseRgbaColor = function parseRgbaColor(color, op) {
|
|
|
408
408
|
};
|
|
409
409
|
};
|
|
410
410
|
|
|
411
|
-
/**
|
|
412
|
-
* 颜色字符串解析为颜色对象
|
|
413
|
-
* @param color 颜色字符串
|
|
414
|
-
* @returns IColorObj
|
|
411
|
+
/**
|
|
412
|
+
* 颜色字符串解析为颜色对象
|
|
413
|
+
* @param color 颜色字符串
|
|
414
|
+
* @returns IColorObj
|
|
415
415
|
*/
|
|
416
416
|
export var parseColorString = function parseColorString(color, op) {
|
|
417
417
|
if (color.startsWith("#")) {
|
|
@@ -424,10 +424,10 @@ export var parseColorString = function parseColorString(color, op) {
|
|
|
424
424
|
throw new Error("color string error: ".concat(color));
|
|
425
425
|
};
|
|
426
426
|
|
|
427
|
-
/**
|
|
428
|
-
* 颜色字符串解析为各种颜色表达方式
|
|
429
|
-
* @param color 颜色字符串
|
|
430
|
-
* @returns IColorObj
|
|
427
|
+
/**
|
|
428
|
+
* 颜色字符串解析为各种颜色表达方式
|
|
429
|
+
* @param color 颜色字符串
|
|
430
|
+
* @returns IColorObj
|
|
431
431
|
*/
|
|
432
432
|
export var getColorInfo = function getColorInfo(color, op) {
|
|
433
433
|
var colorObj = parseColorString(color, op);
|
|
@@ -442,20 +442,20 @@ export var getColorInfo = function getColorInfo(color, op) {
|
|
|
442
442
|
};
|
|
443
443
|
};
|
|
444
444
|
|
|
445
|
-
/**
|
|
446
|
-
* 16进制颜色字符串转化为rgba颜色字符串
|
|
447
|
-
* @param hex 16进制颜色字符串
|
|
448
|
-
* @returns rgba颜色字符串
|
|
445
|
+
/**
|
|
446
|
+
* 16进制颜色字符串转化为rgba颜色字符串
|
|
447
|
+
* @param hex 16进制颜色字符串
|
|
448
|
+
* @returns rgba颜色字符串
|
|
449
449
|
*/
|
|
450
450
|
export var hexToRgba = function hexToRgba(hex, op) {
|
|
451
451
|
var colorObj = parseColorString(hex, op);
|
|
452
452
|
return toRgbaString(colorObj);
|
|
453
453
|
};
|
|
454
454
|
|
|
455
|
-
/**
|
|
456
|
-
* rgba颜色字符串转化为16进制颜色字符串
|
|
457
|
-
* @param rgba rgba颜色字符串
|
|
458
|
-
* @returns 16进制颜色字符串
|
|
455
|
+
/**
|
|
456
|
+
* rgba颜色字符串转化为16进制颜色字符串
|
|
457
|
+
* @param rgba rgba颜色字符串
|
|
458
|
+
* @returns 16进制颜色字符串
|
|
459
459
|
*/
|
|
460
460
|
export var rgbaToHex = function rgbaToHex(rgba) {
|
|
461
461
|
var colorObj = parseColorString(rgba);
|
package/package.json
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ns-base-module",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"private": false,
|
|
5
|
-
"description": "ns通用组件库",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"module": "./src/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"/dist",
|
|
11
|
-
"/types",
|
|
12
|
-
"/style"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "father build",
|
|
16
|
-
"build:watch": "father dev",
|
|
17
|
-
"dev": "dumi dev",
|
|
18
|
-
"docs:build": "dumi build",
|
|
19
|
-
"doctor": "father doctor",
|
|
20
|
-
"lint": "npm run lint:es && npm run lint:css",
|
|
21
|
-
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
22
|
-
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
23
|
-
"publish": "npm publish --no-notify",
|
|
24
|
-
"start": "npm run dev",
|
|
25
|
-
"version": "node ./updateVersion.js"
|
|
26
|
-
},
|
|
27
|
-
"commitlint": {
|
|
28
|
-
"extends": [
|
|
29
|
-
"@commitlint/config-conventional"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"lint-staged": {
|
|
33
|
-
"*.{md,json}": [
|
|
34
|
-
"prettier --write --no-error-on-unmatched-pattern"
|
|
35
|
-
],
|
|
36
|
-
"*.{css,less}": [
|
|
37
|
-
"stylelint --fix",
|
|
38
|
-
"prettier --write"
|
|
39
|
-
],
|
|
40
|
-
"*.{js,jsx}": [
|
|
41
|
-
"eslint --fix",
|
|
42
|
-
"prettier --write"
|
|
43
|
-
],
|
|
44
|
-
"*.{ts,tsx}": [
|
|
45
|
-
"eslint --fix",
|
|
46
|
-
"prettier --parser=typescript --write"
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@ant-design/icons": "",
|
|
51
|
-
"@ant-design/pro-components": "^2.4.14",
|
|
52
|
-
"@ant-design/pro-layout": "^6.9.0",
|
|
53
|
-
"aexpr": "^1.0.2",
|
|
54
|
-
"antd": "5.22.3",
|
|
55
|
-
"axios": "^1.6.4",
|
|
56
|
-
"classnames": "",
|
|
57
|
-
"events": "^3.3.0",
|
|
58
|
-
"js-cookie": "^2.2.1",
|
|
59
|
-
"lodash": "^4.17.21",
|
|
60
|
-
"react-dnd": "^16.0.1",
|
|
61
|
-
"react-dnd-html5-backend": "^16.0.1",
|
|
62
|
-
"react-sortablejs": "6.1.1",
|
|
63
|
-
"sortablejs": "1.14.0",
|
|
64
|
-
"umi-request": "^1.0.8"
|
|
65
|
-
},
|
|
66
|
-
"devDependencies": {
|
|
67
|
-
"@commitlint/cli": "^17.1.2",
|
|
68
|
-
"@commitlint/config-conventional": "^17.1.0",
|
|
69
|
-
"@types/events": "^3.0.3",
|
|
70
|
-
"@types/lodash": "^4.14.191",
|
|
71
|
-
"@types/react": "^18.0.0",
|
|
72
|
-
"@types/react-dom": "^18.0.0",
|
|
73
|
-
"@umijs/lint": "^4.0.0",
|
|
74
|
-
"dumi": "^2.0.2",
|
|
75
|
-
"eslint": "^8.23.0",
|
|
76
|
-
"father": "^4.2.3",
|
|
77
|
-
"husky": "^8.0.1",
|
|
78
|
-
"js-cookie": "^3.0.5",
|
|
79
|
-
"lint-staged": "^13.0.3",
|
|
80
|
-
"prettier": "^2.7.1",
|
|
81
|
-
"prettier-plugin-organize-imports": "^3.0.0",
|
|
82
|
-
"prettier-plugin-packagejson": "^2.2.18",
|
|
83
|
-
"react": "^18.0.0",
|
|
84
|
-
"react-dom": "^18.0.0",
|
|
85
|
-
"react-infinite-scroll-component": "^6.1.0",
|
|
86
|
-
"stylelint": "^14.9.1"
|
|
87
|
-
},
|
|
88
|
-
"peerDependencies": {
|
|
89
|
-
"@ant-design/icons": "",
|
|
90
|
-
"classnames": "",
|
|
91
|
-
"react": ">=16.9.0",
|
|
92
|
-
"react-dom": ">=16.9.0"
|
|
93
|
-
},
|
|
94
|
-
"publishConfig": {
|
|
95
|
-
"access": "public"
|
|
96
|
-
},
|
|
97
|
-
"authors": [
|
|
98
|
-
"735249091@qq.com"
|
|
99
|
-
]
|
|
100
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ns-base-module",
|
|
3
|
+
"version": "1.1.63",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "ns通用组件库",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"module": "./src/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"/dist",
|
|
11
|
+
"/types",
|
|
12
|
+
"/style"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "father build",
|
|
16
|
+
"build:watch": "father dev",
|
|
17
|
+
"dev": "dumi dev",
|
|
18
|
+
"docs:build": "dumi build",
|
|
19
|
+
"doctor": "father doctor",
|
|
20
|
+
"lint": "npm run lint:es && npm run lint:css",
|
|
21
|
+
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
22
|
+
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
23
|
+
"publish": "npm publish --no-notify",
|
|
24
|
+
"start": "npm run dev",
|
|
25
|
+
"version": "node ./updateVersion.js"
|
|
26
|
+
},
|
|
27
|
+
"commitlint": {
|
|
28
|
+
"extends": [
|
|
29
|
+
"@commitlint/config-conventional"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"lint-staged": {
|
|
33
|
+
"*.{md,json}": [
|
|
34
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
35
|
+
],
|
|
36
|
+
"*.{css,less}": [
|
|
37
|
+
"stylelint --fix",
|
|
38
|
+
"prettier --write"
|
|
39
|
+
],
|
|
40
|
+
"*.{js,jsx}": [
|
|
41
|
+
"eslint --fix",
|
|
42
|
+
"prettier --write"
|
|
43
|
+
],
|
|
44
|
+
"*.{ts,tsx}": [
|
|
45
|
+
"eslint --fix",
|
|
46
|
+
"prettier --parser=typescript --write"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@ant-design/icons": "",
|
|
51
|
+
"@ant-design/pro-components": "^2.4.14",
|
|
52
|
+
"@ant-design/pro-layout": "^6.9.0",
|
|
53
|
+
"aexpr": "^1.0.2",
|
|
54
|
+
"antd": "5.22.3",
|
|
55
|
+
"axios": "^1.6.4",
|
|
56
|
+
"classnames": "",
|
|
57
|
+
"events": "^3.3.0",
|
|
58
|
+
"js-cookie": "^2.2.1",
|
|
59
|
+
"lodash": "^4.17.21",
|
|
60
|
+
"react-dnd": "^16.0.1",
|
|
61
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
62
|
+
"react-sortablejs": "6.1.1",
|
|
63
|
+
"sortablejs": "1.14.0",
|
|
64
|
+
"umi-request": "^1.0.8"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@commitlint/cli": "^17.1.2",
|
|
68
|
+
"@commitlint/config-conventional": "^17.1.0",
|
|
69
|
+
"@types/events": "^3.0.3",
|
|
70
|
+
"@types/lodash": "^4.14.191",
|
|
71
|
+
"@types/react": "^18.0.0",
|
|
72
|
+
"@types/react-dom": "^18.0.0",
|
|
73
|
+
"@umijs/lint": "^4.0.0",
|
|
74
|
+
"dumi": "^2.0.2",
|
|
75
|
+
"eslint": "^8.23.0",
|
|
76
|
+
"father": "^4.2.3",
|
|
77
|
+
"husky": "^8.0.1",
|
|
78
|
+
"js-cookie": "^3.0.5",
|
|
79
|
+
"lint-staged": "^13.0.3",
|
|
80
|
+
"prettier": "^2.7.1",
|
|
81
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
|
82
|
+
"prettier-plugin-packagejson": "^2.2.18",
|
|
83
|
+
"react": "^18.0.0",
|
|
84
|
+
"react-dom": "^18.0.0",
|
|
85
|
+
"react-infinite-scroll-component": "^6.1.0",
|
|
86
|
+
"stylelint": "^14.9.1"
|
|
87
|
+
},
|
|
88
|
+
"peerDependencies": {
|
|
89
|
+
"@ant-design/icons": "",
|
|
90
|
+
"classnames": "",
|
|
91
|
+
"react": ">=16.9.0",
|
|
92
|
+
"react-dom": ">=16.9.0"
|
|
93
|
+
},
|
|
94
|
+
"publishConfig": {
|
|
95
|
+
"access": "public"
|
|
96
|
+
},
|
|
97
|
+
"authors": [
|
|
98
|
+
"735249091@qq.com"
|
|
99
|
+
]
|
|
100
|
+
}
|