@vtx/components 4.0.0-beta.7 → 4.0.0-beta.70
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/es/index.js +3 -0
- package/es/utils/filterSpecialCharacters.js +47 -46
- package/es/utils/index.js +1 -2
- package/es/vtx-color-picker/index.js +138 -33
- package/es/vtx-color-picker/style/index.js +36 -12
- package/es/vtx-combogrid/Combogrid.js +16 -10
- package/es/vtx-combogrid/index.js +7 -4
- package/es/vtx-combogrid/style/index.js +4 -4
- package/es/vtx-datagrid/Store/Provide.js +109 -132
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +11 -5
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/es/vtx-datagrid/ToolBar/index.js +2 -2
- package/es/vtx-datagrid/columnState.js +64 -0
- package/es/vtx-datagrid/index.js +114 -35
- package/es/vtx-datagrid/mergeComponents.js +15 -0
- package/es/vtx-datagrid/renderColumnButtons.js +30 -11
- package/es/vtx-datagrid/style/index.js +102 -20
- package/es/vtx-date-picker/QdatePicker.js +1 -1
- package/es/vtx-descriptions/Descriptions.js +29 -0
- package/es/vtx-descriptions/index.js +3 -0
- package/es/vtx-descriptions/style/index.js +19 -0
- package/es/vtx-ellipsis-text/index.js +7 -2
- package/es/vtx-ellipsis-text/style/index.js +3 -1
- package/es/vtx-export/index.js +25 -25
- package/es/vtx-export-async/History.js +7 -3
- package/es/vtx-export-async/index.js +42 -14
- package/es/vtx-form-layout/Card.js +10 -10
- package/es/vtx-form-layout/Divider.js +1 -1
- package/es/vtx-form-layout/FormItem.js +18 -17
- package/es/vtx-form-layout/Pane.js +23 -12
- package/es/vtx-icon/index.js +54 -45
- package/es/vtx-icon/index.js1 +90 -0
- package/es/vtx-image/Preview.js +11 -6
- package/es/vtx-image/style/index.js +0 -1
- package/es/vtx-import/index.js +155 -43
- package/es/vtx-import/result.js +6 -2
- package/es/vtx-import/style/index.js +16 -1
- package/es/vtx-import2/Content.js +2 -1
- package/es/vtx-import2/index.js +31 -20
- package/es/vtx-import2/style/index.js +60 -9
- package/es/vtx-input/TextArea/index.js +11 -6
- package/es/vtx-modal/index.js +9 -4
- package/es/vtx-modal/style/index.js +5 -3
- package/es/vtx-page-layout/Content.js +1 -1
- package/es/vtx-page-layout/TabLayout.js +1 -7
- package/es/vtx-page-layout/TableLayout.js +14 -4
- package/es/vtx-page-layout/TableWrap.js +3 -2
- package/es/vtx-page-layout/TreeLayout.js +2 -8
- package/es/vtx-page-layout/container.js +6 -5
- package/es/vtx-page-layout/style/index.js +4 -2
- package/es/vtx-provider/index.js +20 -10
- package/es/vtx-provider/locale/en_US.js +65 -5
- package/es/vtx-provider/locale/zh_CN.js +75 -5
- package/es/vtx-provider/useStyle/index.js +8 -4
- package/es/vtx-scrollable-row/index.js +38 -28
- package/es/vtx-search/index.js +18 -13
- package/es/vtx-search/style/index.js +2 -1
- package/es/vtx-select/index.js +132 -46
- package/es/vtx-select/style/index.js +11 -56
- package/es/vtx-signature/index.js +5 -4
- package/es/vtx-signature/style/index.js +1 -1
- package/es/vtx-split-pane/Resizer.js +0 -1
- package/es/vtx-split-pane/SplitPane.js +34 -25
- package/es/vtx-split-pane/style/index.js +8 -112
- package/es/vtx-time-picker/index.js +27 -1
- package/es/vtx-transfer/Transfer.js +29 -0
- package/es/vtx-transfer/index.js +3 -0
- package/es/vtx-transfer/style/index.js +19 -0
- package/es/vtx-transfer-select/TransferSelect.js +143 -0
- package/es/vtx-transfer-select/index.js +3 -0
- package/es/vtx-transfer-select/style/index.js +19 -0
- package/es/vtx-tree/index.js +104 -40
- package/es/vtx-tree-select/index.js +75 -105
- package/es/vtx-tree-select/style/index.js +9 -3
- package/es/vtx-upload/FilePreview.js +2 -1
- package/es/vtx-wang-editor/index.js +291 -113
- package/es/vtx-wang-editor/wangEditorUtil.js +59 -9
- package/lib/index.js +36 -0
- package/lib/utils/filterSpecialCharacters.js +48 -46
- package/lib/utils/index.js +0 -7
- package/lib/vtx-color-picker/index.js +139 -34
- package/lib/vtx-color-picker/style/index.js +36 -12
- package/lib/vtx-combogrid/Combogrid.js +16 -10
- package/lib/vtx-combogrid/index.js +7 -4
- package/lib/vtx-combogrid/style/index.js +4 -4
- package/lib/vtx-datagrid/Store/Provide.js +116 -138
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +11 -6
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/lib/vtx-datagrid/ToolBar/index.js +2 -2
- package/lib/vtx-datagrid/columnState.js +73 -0
- package/lib/vtx-datagrid/index.js +115 -35
- package/lib/vtx-datagrid/mergeComponents.js +21 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
- package/lib/vtx-datagrid/style/index.js +102 -20
- package/lib/vtx-date-picker/QdatePicker.js +1 -1
- package/lib/vtx-descriptions/Descriptions.js +38 -0
- package/lib/vtx-descriptions/index.js +15 -0
- package/lib/vtx-descriptions/style/index.js +25 -0
- package/lib/vtx-ellipsis-text/index.js +7 -2
- package/lib/vtx-ellipsis-text/style/index.js +3 -1
- package/lib/vtx-export/index.js +26 -26
- package/lib/vtx-export-async/History.js +7 -3
- package/lib/vtx-export-async/index.js +40 -12
- package/lib/vtx-form-layout/Card.js +9 -9
- package/lib/vtx-form-layout/Divider.js +1 -1
- package/lib/vtx-form-layout/FormItem.js +18 -17
- package/lib/vtx-form-layout/Pane.js +22 -11
- package/lib/vtx-icon/index.js +54 -52
- package/lib/vtx-icon/index.js1 +90 -0
- package/lib/vtx-image/Preview.js +11 -6
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-import/index.js +154 -42
- package/lib/vtx-import/result.js +6 -2
- package/lib/vtx-import/style/index.js +16 -1
- package/lib/vtx-import2/Content.js +2 -1
- package/lib/vtx-import2/index.js +30 -19
- package/lib/vtx-import2/style/index.js +60 -9
- package/lib/vtx-input/TextArea/index.js +11 -6
- package/lib/vtx-modal/index.js +9 -4
- package/lib/vtx-modal/style/index.js +5 -3
- package/lib/vtx-page-layout/Content.js +1 -1
- package/lib/vtx-page-layout/TabLayout.js +3 -9
- package/lib/vtx-page-layout/TableLayout.js +14 -4
- package/lib/vtx-page-layout/TableWrap.js +3 -2
- package/lib/vtx-page-layout/TreeLayout.js +4 -10
- package/lib/vtx-page-layout/container.js +6 -5
- package/lib/vtx-page-layout/style/index.js +4 -2
- package/lib/vtx-provider/index.js +19 -10
- package/lib/vtx-provider/locale/en_US.js +65 -5
- package/lib/vtx-provider/locale/zh_CN.js +75 -5
- package/lib/vtx-provider/useStyle/index.js +8 -4
- package/lib/vtx-scrollable-row/index.js +38 -28
- package/lib/vtx-search/index.js +18 -13
- package/lib/vtx-search/style/index.js +2 -1
- package/lib/vtx-select/index.js +134 -48
- package/lib/vtx-select/style/index.js +11 -56
- package/lib/vtx-signature/index.js +4 -3
- package/lib/vtx-signature/style/index.js +1 -1
- package/lib/vtx-split-pane/Resizer.js +0 -1
- package/lib/vtx-split-pane/SplitPane.js +32 -23
- package/lib/vtx-split-pane/style/index.js +8 -112
- package/lib/vtx-time-picker/index.js +27 -1
- package/lib/vtx-transfer/Transfer.js +38 -0
- package/lib/vtx-transfer/index.js +15 -0
- package/lib/vtx-transfer/style/index.js +25 -0
- package/lib/vtx-transfer-select/TransferSelect.js +151 -0
- package/lib/vtx-transfer-select/index.js +15 -0
- package/lib/vtx-transfer-select/style/index.js +25 -0
- package/lib/vtx-tree/index.js +102 -38
- package/lib/vtx-tree-select/index.js +75 -105
- package/lib/vtx-tree-select/style/index.js +9 -3
- package/lib/vtx-upload/FilePreview.js +2 -1
- package/lib/vtx-wang-editor/index.js +289 -113
- package/lib/vtx-wang-editor/wangEditorUtil.js +59 -10
- package/package.json +44 -28
- package/es/utils/hooks/useFetchData/index.js +0 -82
- package/lib/utils/hooks/useFetchData/index.js +0 -89
package/es/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from "./vtx-time-picker";
|
|
|
22
22
|
export * from "./vtx-upload";
|
|
23
23
|
export * from "./vtx-tree-select";
|
|
24
24
|
export * from "./vtx-signature";
|
|
25
|
+
export * from "./vtx-transfer-select";
|
|
25
26
|
|
|
26
27
|
// data display
|
|
27
28
|
export * from "./vtx-datagrid";
|
|
@@ -30,8 +31,10 @@ export * from "./vtx-image";
|
|
|
30
31
|
export * from "./vtx-rps-frame";
|
|
31
32
|
export * from "./vtx-statistics-column";
|
|
32
33
|
export * from "./vtx-tree";
|
|
34
|
+
export * from "./vtx-transfer";
|
|
33
35
|
export * from "./vtx-split-pane";
|
|
34
36
|
export * from "./vtx-icon";
|
|
37
|
+
export * from "./vtx-descriptions";
|
|
35
38
|
|
|
36
39
|
// feedback
|
|
37
40
|
export * from "./vtx-modal";
|
|
@@ -9,6 +9,52 @@ function isNotEmpty(value) {
|
|
|
9
9
|
return Array.isArray(value) && value.length > 0;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
// 特殊符号,- _ 排除
|
|
13
|
+
export var SpecialCharacters = [
|
|
14
|
+
// 小括号
|
|
15
|
+
'(', ')', '(', ')',
|
|
16
|
+
// 中括号
|
|
17
|
+
'\\[', '\\]', '[', ']',
|
|
18
|
+
// 大括号
|
|
19
|
+
'{', '}', '{', '}',
|
|
20
|
+
// 方头括号
|
|
21
|
+
'【', '】',
|
|
22
|
+
// 尖括号
|
|
23
|
+
'<', '>',
|
|
24
|
+
// 书名号
|
|
25
|
+
'《', '》',
|
|
26
|
+
// 斜杠
|
|
27
|
+
'/',
|
|
28
|
+
// 反斜杠
|
|
29
|
+
'\\\\',
|
|
30
|
+
// 逗号
|
|
31
|
+
',', ',',
|
|
32
|
+
// 句号
|
|
33
|
+
'.', '。',
|
|
34
|
+
// 冒号
|
|
35
|
+
':', ':',
|
|
36
|
+
// 分号
|
|
37
|
+
';', ';',
|
|
38
|
+
// 顿号
|
|
39
|
+
'、',
|
|
40
|
+
// 破折号
|
|
41
|
+
'——',
|
|
42
|
+
// 感叹号
|
|
43
|
+
'!', '!',
|
|
44
|
+
// 问号
|
|
45
|
+
'?', '?',
|
|
46
|
+
// 加减等于
|
|
47
|
+
'+', '=',
|
|
48
|
+
// 单引号
|
|
49
|
+
"'", '‘', '’',
|
|
50
|
+
// 双引号
|
|
51
|
+
'"', '“', '”',
|
|
52
|
+
// 金钱
|
|
53
|
+
'$', '¥',
|
|
54
|
+
// 百分号
|
|
55
|
+
'%', '%',
|
|
56
|
+
// 其它
|
|
57
|
+
'@', '#', '`', '~', '*', '^', '……', '|', '&'];
|
|
12
58
|
/**
|
|
13
59
|
* 过滤特殊字符
|
|
14
60
|
* @param {String} value 值
|
|
@@ -22,52 +68,7 @@ export default function filterSpecialCharacters(value) {
|
|
|
22
68
|
include = _ref$include === void 0 ? [] : _ref$include,
|
|
23
69
|
_ref$exclude = _ref.exclude,
|
|
24
70
|
exclude = _ref$exclude === void 0 ? [] : _ref$exclude;
|
|
25
|
-
|
|
26
|
-
var specialCharacter = [
|
|
27
|
-
// 小括号
|
|
28
|
-
'(', ')', '(', ')',
|
|
29
|
-
// 中括号
|
|
30
|
-
'\\[', '\\]', '[', ']',
|
|
31
|
-
// 大括号
|
|
32
|
-
'{', '}', '{', '}',
|
|
33
|
-
// 方头括号
|
|
34
|
-
'【', '】',
|
|
35
|
-
// 尖括号
|
|
36
|
-
'<', '>',
|
|
37
|
-
// 书名号
|
|
38
|
-
'《', '》',
|
|
39
|
-
// 斜杠
|
|
40
|
-
'/',
|
|
41
|
-
// 反斜杠
|
|
42
|
-
'\\\\',
|
|
43
|
-
// 逗号
|
|
44
|
-
',', ',',
|
|
45
|
-
// 句号
|
|
46
|
-
'.', '。',
|
|
47
|
-
// 冒号
|
|
48
|
-
':', ':',
|
|
49
|
-
// 分号
|
|
50
|
-
';', ';',
|
|
51
|
-
// 顿号
|
|
52
|
-
'、',
|
|
53
|
-
// 破折号
|
|
54
|
-
'——',
|
|
55
|
-
// 感叹号
|
|
56
|
-
'!', '!',
|
|
57
|
-
// 问号
|
|
58
|
-
'?', '?',
|
|
59
|
-
// 加减等于
|
|
60
|
-
'+', '=',
|
|
61
|
-
// 单引号
|
|
62
|
-
"'", '‘', '’',
|
|
63
|
-
// 双引号
|
|
64
|
-
'"', '“', '”',
|
|
65
|
-
// 金钱
|
|
66
|
-
'$', '¥',
|
|
67
|
-
// 百分号
|
|
68
|
-
'%', '%',
|
|
69
|
-
// 其它
|
|
70
|
-
'@', '#', '`', '~', '*', '^', '……', '|', '&'];
|
|
71
|
+
var specialCharacter = JSON.parse(JSON.stringify(SpecialCharacters));
|
|
71
72
|
|
|
72
73
|
// 新增
|
|
73
74
|
if (isNotEmpty(include)) {
|
package/es/utils/index.js
CHANGED
|
@@ -15,7 +15,6 @@ import { useDebounceValue } from "./hooks/useDebounceValue";
|
|
|
15
15
|
import { useDeepCompareEffect, useDeepCompareEffectDebounce } from "./hooks/useDeepCompareEffect";
|
|
16
16
|
import useDeepCompareMemo from "./hooks/useDeepCompareMemo";
|
|
17
17
|
import { useDocumentTitle } from "./hooks/useDocumentTitle";
|
|
18
|
-
import { useFetchData } from "./hooks/useFetchData";
|
|
19
18
|
import { useLatest } from "./hooks/useLatest";
|
|
20
19
|
import { usePrevious } from "./hooks/usePrevious";
|
|
21
20
|
import { useReactiveRef } from "./hooks/useReactiveRef";
|
|
@@ -56,7 +55,7 @@ export { conversionMomentValue, conversionMomentValue as conversionSubmitValue,
|
|
|
56
55
|
// function
|
|
57
56
|
transformKeySubmitValue, useBreakpoint, useDebounceFn, useDebounceValue, useDeepCompareEffect, useDeepCompareEffectDebounce, useDeepCompareMemo, useDocumentTitle,
|
|
58
57
|
// hooks
|
|
59
|
-
useEditableArray, useEditableMap,
|
|
58
|
+
useEditableArray, useEditableMap, useLatest, useMountMergeState, usePrevious, useReactiveRef, useRefCallback, useRefFunction, useStyle, genColumnKey, getPlaceholder };
|
|
60
59
|
|
|
61
60
|
// 注意:以下类型导出在JavaScript中不可用,已移除
|
|
62
61
|
// export type {
|
|
@@ -1,70 +1,175 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["value", "onChange", "className", "style", "disabled"];
|
|
2
|
+
var _excluded = ["value", "onChange", "className", "style", "disabled", "format", "input", "panelStyle"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
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; }
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
7
|
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); }
|
|
8
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
|
-
import {
|
|
10
|
+
import React, { forwardRef, useContext, useMemo, useState, useCallback } from 'react';
|
|
11
|
+
import { Input, Space, ColorPicker, Row, Col } from 'antd';
|
|
17
12
|
import classnames from 'classnames';
|
|
18
|
-
import
|
|
19
|
-
import { useStyle } from "./style
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
14
|
+
import { useStyle } from "./style";
|
|
20
15
|
import { getPlaceholder } from "../utils";
|
|
16
|
+
import { useIntl, VtxProvider } from "../vtx-provider";
|
|
21
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
19
|
var VtxColorPicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
|
+
var intl = useIntl();
|
|
24
21
|
var value = props.value,
|
|
25
|
-
|
|
22
|
+
_onChange = props.onChange,
|
|
26
23
|
className = props.className,
|
|
27
24
|
style = props.style,
|
|
28
25
|
disabled = props.disabled,
|
|
26
|
+
_props$format = props.format,
|
|
27
|
+
format = _props$format === void 0 ? 'hex' : _props$format,
|
|
28
|
+
_props$input = props.input,
|
|
29
|
+
input = _props$input === void 0 ? true : _props$input,
|
|
30
|
+
panelStyle = props.panelStyle,
|
|
29
31
|
rest = _objectWithoutProperties(props, _excluded);
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
var
|
|
32
|
+
var getVtxPresets = function getVtxPresets() {
|
|
33
|
+
return [{
|
|
34
|
+
label: intl.getMessage('colorPicker.basic', '基础颜色'),
|
|
35
|
+
key: 'basic',
|
|
36
|
+
colors: ['#0EBF37', '#1890FF', '#FAAD14', '#FF4D4F', '#898989', '#13C2C2', '#FA8C16', '#722ED1', '#EB2F96', '#2F54EB']
|
|
37
|
+
}, {
|
|
38
|
+
label: intl.getMessage('colorPicker.chart', '图表颜色'),
|
|
39
|
+
key: 'chart',
|
|
40
|
+
colors: ['#249AF8', '#1FC678', '#FFB737', '#4ABEFF', '#FD6865', '#A09CF7', '#1BCEBF', '#F58E44', '#27AD8E', '#F18F86', '#7996FF', '#5AD8A6', '#E9C140', '#79C2E6', '#FF9E9E', '#D396DE', '#3CBDCB', '#F29F64', '#85ACD7', '#FDA3C7']
|
|
41
|
+
}];
|
|
42
|
+
};
|
|
43
|
+
var getNormalPresets = function getNormalPresets() {
|
|
44
|
+
return [{
|
|
45
|
+
label: '',
|
|
46
|
+
key: '1',
|
|
47
|
+
colors: ['#F5222D', '#FA8C16', '#FAAD14', '#52C41A', '#389E0D', '#CF1322', '#1677FF', '#5B83FB', '#9254DE', '#5D7092']
|
|
48
|
+
}];
|
|
49
|
+
};
|
|
50
|
+
var getHorizontalPresets = function getHorizontalPresets(token) {
|
|
51
|
+
return [{
|
|
52
|
+
label: intl.getMessage('colorPicker.primary', '主要'),
|
|
53
|
+
key: '主要',
|
|
54
|
+
colors: ['#E6F4FF', '#BAE0FF', '#91CAFF', '#69B1FF', '#4096FF', '#1677FF', '#0958D9', '#003EB3', '#002C8C', '#001D66']
|
|
55
|
+
}, {
|
|
56
|
+
label: intl.getMessage('colorPicker.danger', '红色'),
|
|
57
|
+
key: '红色',
|
|
58
|
+
colors: ['#FFF1F0', '#FFCCC7', '#FFA39E', '#FF7875', '#FF4D4F', '#F5222D', '#CF1322', '#A8071A', '#820014', '#5C0011']
|
|
59
|
+
}, {
|
|
60
|
+
label: intl.getMessage('colorPicker.success', '绿色'),
|
|
61
|
+
key: '绿色',
|
|
62
|
+
colors: ['#F6FFED', '#D9F7BE', '#B7EB8F', '#95DE64', '#73D13D', '#52C41A', '#389E0D', '#237804', '#135200', '#092B00']
|
|
63
|
+
}, {
|
|
64
|
+
label: intl.getMessage('colorPicker.info', '青色'),
|
|
65
|
+
key: '青色',
|
|
66
|
+
colors: ['#E6FFFB', '#B5F5EC', '#87E8DE', '#5CDBD3', '#36CFC9', '#13C2C2', '#08979C', '#006D75', '#00474F', '#002329']
|
|
67
|
+
}];
|
|
68
|
+
};
|
|
69
|
+
var _useContext = useContext(VtxProvider),
|
|
42
70
|
getPrefixCls = _useContext.getPrefixCls;
|
|
43
|
-
var prefixCls = getPrefixCls('
|
|
71
|
+
var prefixCls = getPrefixCls('color-picker', props.prefixCls);
|
|
44
72
|
var _useStyle = useStyle(prefixCls),
|
|
45
73
|
wrapSSR = _useStyle.wrapSSR,
|
|
46
74
|
hashId = _useStyle.hashId;
|
|
75
|
+
var getChangeFun = useCallback(function () {
|
|
76
|
+
switch (format) {
|
|
77
|
+
case 'hsb':
|
|
78
|
+
return 'toHsbString';
|
|
79
|
+
case 'rgb':
|
|
80
|
+
return 'toRgbString';
|
|
81
|
+
default:
|
|
82
|
+
return 'toHexString';
|
|
83
|
+
}
|
|
84
|
+
}, [format]);
|
|
85
|
+
var horizontalPanelRender = function horizontalPanelRender(_, _ref) {
|
|
86
|
+
var _ref$components = _ref.components,
|
|
87
|
+
Picker = _ref$components.Picker,
|
|
88
|
+
Presets = _ref$components.Presets;
|
|
89
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
90
|
+
className: classnames("".concat(prefixCls, "-horizontal")),
|
|
91
|
+
children: [/*#__PURE__*/_jsx(Presets, {}), /*#__PURE__*/_jsx("div", {
|
|
92
|
+
children: /*#__PURE__*/_jsx(Picker, {})
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
var verticalPanelRender = function verticalPanelRender(_, _ref2) {
|
|
97
|
+
var _ref2$components = _ref2.components,
|
|
98
|
+
Picker = _ref2$components.Picker,
|
|
99
|
+
Presets = _ref2$components.Presets;
|
|
100
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
101
|
+
className: classnames("".concat(prefixCls, "-vertical")),
|
|
102
|
+
children: [/*#__PURE__*/_jsx(Picker, {}), /*#__PURE__*/_jsx(Presets, {})]
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
var panelStyleProps = _objectSpread(_objectSpread(_objectSpread({}, panelStyle === 'vtx' ? {
|
|
106
|
+
presets: getVtxPresets(),
|
|
107
|
+
styles: {
|
|
108
|
+
popupOverlayInner: {
|
|
109
|
+
width: 460
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
panelRender: horizontalPanelRender
|
|
113
|
+
} : {}), panelStyle === 'normal' ? {
|
|
114
|
+
presets: getNormalPresets(),
|
|
115
|
+
styles: {
|
|
116
|
+
popupOverlayInner: {
|
|
117
|
+
width: 258
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
panelRender: verticalPanelRender
|
|
121
|
+
} : {}), panelStyle === 'horizontal' ? {
|
|
122
|
+
presets: getHorizontalPresets(),
|
|
123
|
+
styles: {
|
|
124
|
+
popupOverlayInner: {
|
|
125
|
+
width: 504
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
panelRender: horizontalPanelRender
|
|
129
|
+
} : {});
|
|
47
130
|
return wrapSSR( /*#__PURE__*/_jsxs(Space.Compact, {
|
|
48
131
|
style: {
|
|
49
132
|
width: '100%'
|
|
50
133
|
},
|
|
51
|
-
children: [/*#__PURE__*/_jsx(Input, {
|
|
134
|
+
children: [input && /*#__PURE__*/_jsx(Input, {
|
|
52
135
|
ref: ref,
|
|
53
|
-
value:
|
|
136
|
+
value: value,
|
|
54
137
|
placeholder: getPlaceholder(props.placeholder),
|
|
55
138
|
readOnly: true,
|
|
56
139
|
disabled: disabled,
|
|
57
|
-
className: classnames(prefixCls,
|
|
140
|
+
className: classnames("".concat(prefixCls, "-input"), hashId),
|
|
58
141
|
style: style
|
|
59
|
-
}),
|
|
142
|
+
}), /*#__PURE__*/_jsx(ColorPicker, _objectSpread(_objectSpread({
|
|
60
143
|
animation: "slide-up",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
onChange:
|
|
64
|
-
|
|
65
|
-
|
|
144
|
+
allowClear: true,
|
|
145
|
+
className: classnames(prefixCls, className, hashId),
|
|
146
|
+
onChange: function onChange(e, css) {
|
|
147
|
+
var _e$colors;
|
|
148
|
+
var res = undefined;
|
|
149
|
+
if (((_e$colors = e.colors) === null || _e$colors === void 0 ? void 0 : _e$colors.length) > 1) {
|
|
150
|
+
res = e === null || e === void 0 ? void 0 : e.toCssString();
|
|
151
|
+
} else {
|
|
152
|
+
var _e$getChangeFun;
|
|
153
|
+
res = e === null || e === void 0 || (_e$getChangeFun = e[getChangeFun(format)]) === null || _e$getChangeFun === void 0 ? void 0 : _e$getChangeFun.call(e);
|
|
154
|
+
}
|
|
155
|
+
if (e.cleared) {
|
|
156
|
+
res = undefined;
|
|
157
|
+
}
|
|
158
|
+
_onChange === null || _onChange === void 0 || _onChange(res, css);
|
|
159
|
+
},
|
|
160
|
+
value: value,
|
|
161
|
+
disabled: disabled
|
|
162
|
+
}, panelStyleProps), rest))]
|
|
66
163
|
}));
|
|
67
164
|
});
|
|
68
165
|
VtxColorPicker.displayName = 'VtxColorPicker';
|
|
166
|
+
VtxColorPicker.propTypes = {
|
|
167
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
168
|
+
onChange: PropTypes.func,
|
|
169
|
+
className: PropTypes.string,
|
|
170
|
+
style: PropTypes.object,
|
|
171
|
+
disabled: PropTypes.bool,
|
|
172
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
173
|
+
};
|
|
69
174
|
export { VtxColorPicker };
|
|
70
175
|
export default VtxColorPicker;
|
|
@@ -4,21 +4,45 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
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(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
|
-
import 'rc-color-picker/assets/index.css';
|
|
8
7
|
import { useStyle as useAntdStyle } from "../../vtx-provider";
|
|
9
8
|
var genVtxColorPickerStyle = function genVtxColorPickerStyle(token) {
|
|
10
9
|
var componentCls = token.componentCls;
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
return {
|
|
11
|
+
'.ant-color-picker-inner': _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty({}, "&-vertical, &-horizontal", {
|
|
12
|
+
'.ant-color-picker-presets': {
|
|
13
|
+
paddingTop: 4,
|
|
14
|
+
'.ant-color-picker-presets-items': {
|
|
15
|
+
'.ant-color-picker-presets-color': {
|
|
16
|
+
width: 18,
|
|
17
|
+
height: 18,
|
|
18
|
+
'&::before': {
|
|
19
|
+
width: "calc(18px + var(--ant-line-width) * 4)",
|
|
20
|
+
height: "calc(18px + var(--ant-line-width) * 4)"
|
|
21
|
+
},
|
|
22
|
+
'&::affter': {
|
|
23
|
+
width: "calc(18px / 13 * 5)",
|
|
24
|
+
height: "calc(18px / 13 * 8)"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}), "&-vertical", {
|
|
30
|
+
'.ant-collapse-header': {
|
|
31
|
+
display: 'none'
|
|
32
|
+
}
|
|
33
|
+
}), "&-horizontal", {
|
|
34
|
+
display: 'flex',
|
|
35
|
+
gap: 12,
|
|
36
|
+
'.ant-color-picker-presets': {
|
|
37
|
+
flex: 1
|
|
38
|
+
},
|
|
39
|
+
'>div': {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
flexDirection: 'column',
|
|
42
|
+
width: 234
|
|
43
|
+
}
|
|
44
|
+
}))
|
|
45
|
+
};
|
|
22
46
|
};
|
|
23
47
|
export function useStyle(prefixCls) {
|
|
24
48
|
return useAntdStyle('VtxColorPicker', function (token) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["setPopoverVisible", "multiple", "onChange", "getTableData", "columns", "searchForms", "selectedRowKeys", "setSelectedRowKeys", "spread", "defaultPageSize", "customEnumText"];
|
|
2
|
+
var _excluded = ["setPopoverVisible", "multiple", "onChange", "getTableData", "columns", "searchForms", "selectedRowKeys", "setSelectedRowKeys", "spread", "defaultPageSize", "customEnumText", "headFootHeight", "popoverWidth"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
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; }
|
|
@@ -27,10 +27,6 @@ function VtxCombogrid(props, ref) {
|
|
|
27
27
|
var intl = useIntl();
|
|
28
28
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
29
29
|
getPrefixCls = _useContext.getPrefixCls;
|
|
30
|
-
var prefixCls = getPrefixCls('', 'vtx-combogrid');
|
|
31
|
-
var _useStyle = useStyle(prefixCls),
|
|
32
|
-
wrapSSR = _useStyle.wrapSSR,
|
|
33
|
-
hashId = _useStyle.hashId;
|
|
34
30
|
var _useState = useState(!!props.defaultExpandSearch),
|
|
35
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36
32
|
more = _useState2[0],
|
|
@@ -47,11 +43,21 @@ function VtxCombogrid(props, ref) {
|
|
|
47
43
|
searchForms = _props$searchForms === void 0 ? [] : _props$searchForms,
|
|
48
44
|
selectedRowKeys = props.selectedRowKeys,
|
|
49
45
|
setSelectedRowKeys = props.setSelectedRowKeys,
|
|
50
|
-
spread = props.spread,
|
|
46
|
+
_props$spread = props.spread,
|
|
47
|
+
spread = _props$spread === void 0 ? false : _props$spread,
|
|
51
48
|
defaultPageSize = props.defaultPageSize,
|
|
52
49
|
_props$customEnumText = props.customEnumText,
|
|
53
50
|
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
|
|
51
|
+
_props$headFootHeight = props.headFootHeight,
|
|
52
|
+
headFootHeight = _props$headFootHeight === void 0 ? 95 : _props$headFootHeight,
|
|
53
|
+
popoverWidth = props.popoverWidth,
|
|
54
54
|
rest = _objectWithoutProperties(props, _excluded);
|
|
55
|
+
var prefixCls = getPrefixCls('', 'vtx-combogrid');
|
|
56
|
+
var _useStyle = useStyle(prefixCls, {
|
|
57
|
+
popoverWidth: popoverWidth
|
|
58
|
+
}),
|
|
59
|
+
wrapSSR = _useStyle.wrapSSR,
|
|
60
|
+
hashId = _useStyle.hashId;
|
|
55
61
|
var TextEnum = _objectSpread({
|
|
56
62
|
indexTitle: intl.getMessage('indexTitle', '序号'),
|
|
57
63
|
actionMoreText: intl.getMessage('actionMoreText', '更多'),
|
|
@@ -86,7 +92,7 @@ function VtxCombogrid(props, ref) {
|
|
|
86
92
|
columns: columns,
|
|
87
93
|
startIndex: (current - 1) * pageSize + 1,
|
|
88
94
|
size: 'small',
|
|
89
|
-
headFootHeight:
|
|
95
|
+
headFootHeight: headFootHeight,
|
|
90
96
|
indexTitle: TextEnum.indexTitle,
|
|
91
97
|
onRowSelectionClear: clearSelectedRow,
|
|
92
98
|
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
@@ -125,16 +131,16 @@ function VtxCombogrid(props, ref) {
|
|
|
125
131
|
});
|
|
126
132
|
}
|
|
127
133
|
|
|
128
|
-
//
|
|
134
|
+
// 重置会清空 selectedRowKeys,因此也需清空文本中的 value 值
|
|
129
135
|
var query = function query() {
|
|
130
136
|
submit();
|
|
131
|
-
if (multiple && selectedRowKeys.length) {
|
|
137
|
+
if (!spread && multiple && selectedRowKeys.length) {
|
|
132
138
|
clearSelectedRow();
|
|
133
139
|
}
|
|
134
140
|
};
|
|
135
141
|
var clear = function clear() {
|
|
136
142
|
reset();
|
|
137
|
-
if (multiple && selectedRowKeys.length) {
|
|
143
|
+
if (!spread && multiple && selectedRowKeys.length) {
|
|
138
144
|
clearSelectedRow();
|
|
139
145
|
}
|
|
140
146
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["className", "style", "placeholder", "prefixCls", "value", "allowClear", "selectedRowKeys", "popoverProps", "inputProps", "content", "disabled"];
|
|
2
|
+
var _excluded = ["className", "style", "placeholder", "prefixCls", "value", "allowClear", "selectedRowKeys", "popoverProps", "inputProps", "content", "disabled", "spread"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
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; }
|
|
@@ -48,6 +48,8 @@ var VtxCombogrid = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
48
48
|
content = _props$content === void 0 ? null : _props$content,
|
|
49
49
|
_props$disabled = props.disabled,
|
|
50
50
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
51
|
+
_props$spread = props.spread,
|
|
52
|
+
spread = _props$spread === void 0 ? false : _props$spread,
|
|
51
53
|
rest = _objectWithoutProperties(props, _excluded);
|
|
52
54
|
useEffect(function () {
|
|
53
55
|
setSelectedRowKeys(defaultSelectedRowKeys);
|
|
@@ -71,11 +73,12 @@ var VtxCombogrid = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
71
73
|
defaultSelectedRowKeys: defaultSelectedRowKeys,
|
|
72
74
|
setSelectedRowKeys: setSelectedRowKeys,
|
|
73
75
|
setPopoverVisible: setVisible,
|
|
76
|
+
spread: spread,
|
|
74
77
|
ref: comboRef
|
|
75
78
|
})),
|
|
76
79
|
trigger: "click",
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
open: disabled ? false : visible,
|
|
81
|
+
onOpenChange: function onOpenChange(visible) {
|
|
79
82
|
return setVisible(visible);
|
|
80
83
|
},
|
|
81
84
|
classNames: {
|
|
@@ -109,7 +112,7 @@ export { VtxCombogrid };
|
|
|
109
112
|
VtxCombogrid.propTypes = {
|
|
110
113
|
prefixCls: PropTypes.string,
|
|
111
114
|
placeholder: PropTypes.string,
|
|
112
|
-
value: PropTypes.string,
|
|
115
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
113
116
|
allowClear: PropTypes.bool,
|
|
114
117
|
disabled: PropTypes.bool,
|
|
115
118
|
className: PropTypes.string,
|
|
@@ -5,10 +5,10 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
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
7
|
import { useStyle as useAntdStyle } from "../../vtx-provider";
|
|
8
|
-
var genVtxStyle = function genVtxStyle(token) {
|
|
8
|
+
var genVtxStyle = function genVtxStyle(token, options) {
|
|
9
9
|
var componentCls = token.componentCls;
|
|
10
10
|
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&-popover", {
|
|
11
|
-
width: 550,
|
|
11
|
+
width: options.popoverWidth || 550,
|
|
12
12
|
'.ant-form-item': {
|
|
13
13
|
marginBottom: 12
|
|
14
14
|
}
|
|
@@ -32,11 +32,11 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
32
32
|
}
|
|
33
33
|
}));
|
|
34
34
|
};
|
|
35
|
-
export function useStyle(prefixCls) {
|
|
35
|
+
export function useStyle(prefixCls, options) {
|
|
36
36
|
return useAntdStyle(prefixCls, function (token) {
|
|
37
37
|
var vtxToken = _objectSpread(_objectSpread({}, token), {}, {
|
|
38
38
|
componentCls: ".".concat(prefixCls)
|
|
39
39
|
});
|
|
40
|
-
return [genVtxStyle(vtxToken)];
|
|
40
|
+
return [genVtxStyle(vtxToken, options)];
|
|
41
41
|
});
|
|
42
42
|
}
|