@vtx/components 4.0.0-beta.93 → 4.0.0-beta.94

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.
Files changed (76) hide show
  1. package/README.md +19 -19
  2. package/es/utils/components/LabelIconTip/index.js +7 -7
  3. package/es/utils/conversionMomentValue/index.js +25 -25
  4. package/es/utils/filterSpecialCharacters.js +6 -6
  5. package/es/utils/genCopyable/index.js +6 -6
  6. package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  7. package/es/utils/hooks/useDebounceFn/index.js +4 -4
  8. package/es/utils/hooks/useDebounceValue/index.js +6 -6
  9. package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
  10. package/es/utils/hooks/useLatest/index.js +2 -2
  11. package/es/utils/hooks/useRefCallback/index.js +5 -5
  12. package/es/utils/isBrowser/index.js +7 -7
  13. package/es/utils/isUrl/index.js +4 -4
  14. package/es/utils/merge/index.js +4 -4
  15. package/es/utils/nanoid/index.js +4 -4
  16. package/es/utils/omitBoolean/index.js +4 -4
  17. package/es/utils/parseValueToMoment/index.js +4 -4
  18. package/es/utils/proFieldParsingText/index.js +10 -10
  19. package/es/utils/transformKeySubmitValue/index.js +57 -57
  20. package/es/utils/useEditableArray/index.js +46 -46
  21. package/es/utils/useEditableMap/index.js +22 -22
  22. package/es/utils/useMediaQuery/index.js +5 -5
  23. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
  24. package/es/vtx-datagrid/index.js +13 -7
  25. package/es/vtx-datagrid/style/index.less +242 -242
  26. package/es/vtx-date-picker/style/index.less +39 -39
  27. package/es/vtx-export/index.js +8 -8
  28. package/es/vtx-icon/index.js1 +90 -90
  29. package/es/vtx-modal/index.js +5 -4
  30. package/es/vtx-page-layout/Basic.js +2 -2
  31. package/es/vtx-page-layout/TabLayout.js +6 -6
  32. package/es/vtx-page-layout/TableLayout.js +10 -10
  33. package/es/vtx-page-layout/TreeLayout.js +6 -6
  34. package/es/vtx-page-layout/container.js +2 -2
  35. package/es/vtx-provider/index.js +30 -30
  36. package/es/vtx-provider/intl.js +9 -9
  37. package/es/vtx-provider/useStyle/index.js +17 -17
  38. package/es/vtx-wang-editor/style/index.less +12 -12
  39. package/lib/utils/components/LabelIconTip/index.js +7 -7
  40. package/lib/utils/conversionMomentValue/index.js +25 -25
  41. package/lib/utils/filterSpecialCharacters.js +6 -6
  42. package/lib/utils/genCopyable/index.js +6 -6
  43. package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  44. package/lib/utils/hooks/useDebounceFn/index.js +4 -4
  45. package/lib/utils/hooks/useDebounceValue/index.js +6 -6
  46. package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
  47. package/lib/utils/hooks/useLatest/index.js +2 -2
  48. package/lib/utils/hooks/useRefCallback/index.js +5 -5
  49. package/lib/utils/isBrowser/index.js +7 -7
  50. package/lib/utils/isUrl/index.js +4 -4
  51. package/lib/utils/merge/index.js +4 -4
  52. package/lib/utils/nanoid/index.js +4 -4
  53. package/lib/utils/omitBoolean/index.js +4 -4
  54. package/lib/utils/parseValueToMoment/index.js +4 -4
  55. package/lib/utils/proFieldParsingText/index.js +10 -10
  56. package/lib/utils/transformKeySubmitValue/index.js +57 -57
  57. package/lib/utils/useEditableArray/index.js +46 -46
  58. package/lib/utils/useEditableMap/index.js +22 -22
  59. package/lib/utils/useMediaQuery/index.js +5 -5
  60. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
  61. package/lib/vtx-datagrid/index.js +13 -10
  62. package/lib/vtx-datagrid/style/index.less +242 -242
  63. package/lib/vtx-date-picker/style/index.less +39 -39
  64. package/lib/vtx-export/index.js +8 -8
  65. package/lib/vtx-icon/index.js1 +90 -90
  66. package/lib/vtx-modal/index.js +5 -4
  67. package/lib/vtx-page-layout/Basic.js +2 -2
  68. package/lib/vtx-page-layout/TabLayout.js +6 -6
  69. package/lib/vtx-page-layout/TableLayout.js +10 -10
  70. package/lib/vtx-page-layout/TreeLayout.js +6 -6
  71. package/lib/vtx-page-layout/container.js +2 -2
  72. package/lib/vtx-provider/index.js +30 -30
  73. package/lib/vtx-provider/intl.js +9 -9
  74. package/lib/vtx-provider/useStyle/index.js +17 -17
  75. package/lib/vtx-wang-editor/style/index.less +12 -12
  76. package/package.json +239 -239
@@ -1,39 +1,39 @@
1
- @prefix-cls: vtx-qdate;
2
-
3
- .@{prefix-cls} {
4
- &-wrap {
5
- position: relative;
6
-
7
- .ant-calendar-picker-input {
8
- color: transparent;
9
- }
10
- }
11
-
12
- &-input-wrap {
13
- position: absolute;
14
- top: 50%;
15
- left: 12px;
16
- margin-top: -16px;
17
- }
18
-
19
- &-extra-footer {
20
- text-align: center;
21
- }
22
-
23
- &-text-year:hover,
24
- &-text-date:hover,
25
- &-text-month:hover,
26
- &-text-time:hover {
27
- text-decoration: underline;
28
- cursor: pointer;
29
- }
30
-
31
- &-text-time::before {
32
- content: ' ';
33
- }
34
-
35
- &-text-month:not(:first-child)::before,
36
- &-text-date:not(:first-child)::before {
37
- content: '-';
38
- }
39
- }
1
+ @prefix-cls: vtx-qdate;
2
+
3
+ .@{prefix-cls} {
4
+ &-wrap {
5
+ position: relative;
6
+
7
+ .ant-calendar-picker-input {
8
+ color: transparent;
9
+ }
10
+ }
11
+
12
+ &-input-wrap {
13
+ position: absolute;
14
+ top: 50%;
15
+ left: 12px;
16
+ margin-top: -16px;
17
+ }
18
+
19
+ &-extra-footer {
20
+ text-align: center;
21
+ }
22
+
23
+ &-text-year:hover,
24
+ &-text-date:hover,
25
+ &-text-month:hover,
26
+ &-text-time:hover {
27
+ text-decoration: underline;
28
+ cursor: pointer;
29
+ }
30
+
31
+ &-text-time::before {
32
+ content: ' ';
33
+ }
34
+
35
+ &-text-month:not(:first-child)::before,
36
+ &-text-date:not(:first-child)::before {
37
+ content: '-';
38
+ }
39
+ }
@@ -78,10 +78,10 @@ var VtxExport = exports.VtxExport = function VtxExport(props) {
78
78
  }
79
79
 
80
80
  // eslint-disable-next-line valid-jsdoc
81
- /**
82
- * 发送http请求
83
- * @param {Object} postData api参数
84
- * @return reponse
81
+ /**
82
+ * 发送http请求
83
+ * @param {Object} postData api参数
84
+ * @return reponse
85
85
  */
86
86
  function requestToResponse(postData) {
87
87
  var params = {
@@ -142,10 +142,10 @@ var VtxExport = exports.VtxExport = function VtxExport(props) {
142
142
  downloadByATag(window.URL.createObjectURL(blob), filename);
143
143
  }
144
144
  }
145
- /**
146
- * 通过a标签模拟下载
147
- * @param {String} href
148
- * @param {String} filename
145
+ /**
146
+ * 通过a标签模拟下载
147
+ * @param {String} href
148
+ * @param {String} filename
149
149
  */
150
150
  function downloadByATag(href, filename) {
151
151
  var a = document.createElement('a');
@@ -1,90 +1,90 @@
1
- import { lazy, memo, Suspense, useMemo } from 'react';
2
- import AlignRightOutlined from './svg/alignRightOutlined.js';
3
- import ColumnHeightOutlined from './svg/columnHeightOutlined.js';
4
- import DownOutlined from './svg/downOutlined.js';
5
- import Fullscreen from './svg/fullscreen.js';
6
- import RedoOutlined from './svg/redoOutlined.js';
7
- import RightOutlined from './svg/rightOutlined.js';
8
- import SettingOutlined from './svg/settingOutlined.js';
9
-
10
-
11
- const iconComponents = {
12
- alignRightOutlined: AlignRightOutlined,
13
- columnHeightOutlined: ColumnHeightOutlined,
14
- downOutlined: DownOutlined,
15
- fullscreen: Fullscreen,
16
- redoOutlined: RedoOutlined,
17
- rightOutlined: RightOutlined,
18
- settingOutlined: SettingOutlined,
19
- // 低频图标如果确实需要,可以再考虑 lazy
20
- };
21
-
22
- // const iconComponents = {
23
- // // 核心:添加你需要的所有图标, 动态导入有的组件会失败
24
- // alignRightOutlined: lazy(() => import('./svg/alignRightOutlined.js')),
25
- // columnHeightOutlined: lazy(() => import('./svg/columnHeightOutlined.js')),
26
- // downOutlined: lazy(() => import('./svg/downOutlined.js')),
27
- // fullscreen: lazy(() => import('./svg/fullscreen.js')),
28
- // redoOutlined: lazy(() => import('./svg/redoOutlined.js')),
29
- // rightOutlined: lazy(() => import('./svg/rightOutlined.js')),
30
- // settingOutlined: lazy(() => import('./svg/settingOutlined.js')),
31
- // // 新增其他图标...
32
- // };
33
-
34
-
35
- const VtxIcon = memo(({
36
- type,
37
- size = 16,
38
- className = '',
39
- style = {},
40
- color,
41
- fileType = 'webp',
42
- ...props
43
- }) => {
44
- const width = props.width || size;
45
- const height = props.height || size;
46
- if (!type) {
47
- return null;
48
- }
49
- // const SvgComponent = useMemo(() => {
50
- // // 动态导入并缓存结果
51
- // return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
52
- // }, [type]);
53
-
54
- const SvgComponent = useMemo(() => {
55
- // 兜底:找不到对应图标时,返回一个空组件(避免报错)
56
- return iconComponents[type] || lazy(() => Promise.resolve({ default: () => <svg width={width} height={height} /> }));
57
- }, [type, width, height]);
58
-
59
- // 默认返回空元素
60
- if (fileType == 'svg') {
61
- try {
62
- // const SvgComponent = lazy(() => import(`./svg/${type}.js`));
63
- return (
64
- <Suspense fallback={<div style={{ width, height, ...style }} />}>
65
- <SvgComponent
66
- className={className}
67
- style={{ width, height, ...style }}
68
- fill={color}
69
- {...props}
70
- />
71
- </Suspense>
72
- );
73
- } catch (error) {
74
- // 如果动态导入失败,返回空的 SVG 元素
75
- return (
76
- <svg width={width} height={height} style={style} className={className} {...props} />
77
- );
78
- }
79
- } else {
80
- return (
81
- // <img
82
- // src={require(`./assets/${type}.${fileType}`)}
83
- // style={{ width, height, ...style }}
84
- // />
85
- <></>
86
- );
87
- }
88
- });
89
- export { VtxIcon }
90
- export default VtxIcon;
1
+ import { lazy, memo, Suspense, useMemo } from 'react';
2
+ import AlignRightOutlined from './svg/alignRightOutlined.js';
3
+ import ColumnHeightOutlined from './svg/columnHeightOutlined.js';
4
+ import DownOutlined from './svg/downOutlined.js';
5
+ import Fullscreen from './svg/fullscreen.js';
6
+ import RedoOutlined from './svg/redoOutlined.js';
7
+ import RightOutlined from './svg/rightOutlined.js';
8
+ import SettingOutlined from './svg/settingOutlined.js';
9
+
10
+
11
+ const iconComponents = {
12
+ alignRightOutlined: AlignRightOutlined,
13
+ columnHeightOutlined: ColumnHeightOutlined,
14
+ downOutlined: DownOutlined,
15
+ fullscreen: Fullscreen,
16
+ redoOutlined: RedoOutlined,
17
+ rightOutlined: RightOutlined,
18
+ settingOutlined: SettingOutlined,
19
+ // 低频图标如果确实需要,可以再考虑 lazy
20
+ };
21
+
22
+ // const iconComponents = {
23
+ // // 核心:添加你需要的所有图标, 动态导入有的组件会失败
24
+ // alignRightOutlined: lazy(() => import('./svg/alignRightOutlined.js')),
25
+ // columnHeightOutlined: lazy(() => import('./svg/columnHeightOutlined.js')),
26
+ // downOutlined: lazy(() => import('./svg/downOutlined.js')),
27
+ // fullscreen: lazy(() => import('./svg/fullscreen.js')),
28
+ // redoOutlined: lazy(() => import('./svg/redoOutlined.js')),
29
+ // rightOutlined: lazy(() => import('./svg/rightOutlined.js')),
30
+ // settingOutlined: lazy(() => import('./svg/settingOutlined.js')),
31
+ // // 新增其他图标...
32
+ // };
33
+
34
+
35
+ const VtxIcon = memo(({
36
+ type,
37
+ size = 16,
38
+ className = '',
39
+ style = {},
40
+ color,
41
+ fileType = 'webp',
42
+ ...props
43
+ }) => {
44
+ const width = props.width || size;
45
+ const height = props.height || size;
46
+ if (!type) {
47
+ return null;
48
+ }
49
+ // const SvgComponent = useMemo(() => {
50
+ // // 动态导入并缓存结果
51
+ // return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
52
+ // }, [type]);
53
+
54
+ const SvgComponent = useMemo(() => {
55
+ // 兜底:找不到对应图标时,返回一个空组件(避免报错)
56
+ return iconComponents[type] || lazy(() => Promise.resolve({ default: () => <svg width={width} height={height} /> }));
57
+ }, [type, width, height]);
58
+
59
+ // 默认返回空元素
60
+ if (fileType == 'svg') {
61
+ try {
62
+ // const SvgComponent = lazy(() => import(`./svg/${type}.js`));
63
+ return (
64
+ <Suspense fallback={<div style={{ width, height, ...style }} />}>
65
+ <SvgComponent
66
+ className={className}
67
+ style={{ width, height, ...style }}
68
+ fill={color}
69
+ {...props}
70
+ />
71
+ </Suspense>
72
+ );
73
+ } catch (error) {
74
+ // 如果动态导入失败,返回空的 SVG 元素
75
+ return (
76
+ <svg width={width} height={height} style={style} className={className} {...props} />
77
+ );
78
+ }
79
+ } else {
80
+ return (
81
+ // <img
82
+ // src={require(`./assets/${type}.${fileType}`)}
83
+ // style={{ width, height, ...style }}
84
+ // />
85
+ <></>
86
+ );
87
+ }
88
+ });
89
+ export { VtxIcon }
90
+ export default VtxIcon;
@@ -15,6 +15,7 @@ var _classnames2 = _interopRequireDefault(require("classnames"));
15
15
  var _Title = _interopRequireDefault(require("./Title"));
16
16
  var _index = require("./style/index");
17
17
  var _antd = require("antd");
18
+ var _lodashEs = require("lodash-es");
18
19
  var _jsxRuntime = require("react/jsx-runtime");
19
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -141,8 +142,8 @@ function VtxModal(props) {
141
142
  }
142
143
  };
143
144
 
144
- /*
145
- *重写title,加入对话框全屏功能
145
+ /*
146
+ *重写title,加入对话框全屏功能
146
147
  */
147
148
  title = function renderTitle() {
148
149
  if (typeof title == 'string' && title.indexOf('>') > -1) {
@@ -193,11 +194,11 @@ function VtxModal(props) {
193
194
  // 废弃属性映射
194
195
  var legacyProps = {
195
196
  // 旧: bodyStyle → 新: styles.body
196
- styles: {
197
+ styles: (0, _lodashEs.merge)({
197
198
  body: _objectSpread(_objectSpread({}, props.bodyStyle), {}, {
198
199
  maxHeight: !isFull ? "".concat(window.innerHeight * 0.7, "px") : undefined
199
200
  })
200
- },
201
+ }, props.styles),
201
202
  // 旧: destroyOnClose → 新: destroyOnHidden
202
203
  destroyOnHidden: (_props$destroyOnClose = props.destroyOnClose) !== null && _props$destroyOnClose !== void 0 ? _props$destroyOnClose : true
203
204
  };
@@ -10,8 +10,8 @@ var _style = require("./style");
10
10
  var _vtxProvider = require("../vtx-provider");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- /**
14
- * 基础布局
13
+ /**
14
+ * 基础布局
15
15
  */
16
16
 
17
17
  function Basic(props) {
@@ -12,9 +12,9 @@ var _style = require("./style");
12
12
  var _vtxProvider = require("../vtx-provider");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- /**
16
- * 页面
17
- * @param {*} props
15
+ /**
16
+ * 页面
17
+ * @param {*} props
18
18
  */var Page = function Page(props) {
19
19
  var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
20
20
  getPrefixCls = _useContext.getPrefixCls;
@@ -34,9 +34,9 @@ Page.propTypes = {
34
34
  children: _propTypes.default.node
35
35
  };
36
36
 
37
- /**
38
- * 内容
39
- * @param {*} props
37
+ /**
38
+ * 内容
39
+ * @param {*} props
40
40
  */
41
41
  var Content = function Content(props) {
42
42
  var className = props.className,
@@ -33,9 +33,9 @@ var pagePaddingTop = 20;
33
33
  var searchMarginBottom = 20;
34
34
 
35
35
  // eslint-disable-next-line valid-jsdoc
36
- /**
37
- * 页面
38
- * @param {*} props
36
+ /**
37
+ * 页面
38
+ * @param {*} props
39
39
  */
40
40
  var Page = function Page(props) {
41
41
  var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
@@ -83,17 +83,17 @@ Page.propTypes = {
83
83
  onSearchCollapse: _propTypes.default.func
84
84
  };
85
85
 
86
- /**
87
- * 搜索
86
+ /**
87
+ * 搜索
88
88
  */
89
89
  var Search = (0, _container.default)({
90
90
  componentClass: 'vtx-page-table-search'
91
91
  })(_Basic.default);
92
92
 
93
93
  // eslint-disable-next-line valid-jsdoc
94
- /**
95
- * 内容
96
- * @param {*} props
94
+ /**
95
+ * 内容
96
+ * @param {*} props
97
97
  */
98
98
  var Content = function Content(props) {
99
99
  var className = props.className,
@@ -128,8 +128,8 @@ Content.propTypes = {
128
128
  };
129
129
 
130
130
  // eslint-disable-next-line valid-jsdoc
131
- /**
132
- * 表格布局
131
+ /**
132
+ * 表格布局
133
133
  */
134
134
  var Table = function Table(props) {
135
135
  var className = props.className,
@@ -11,9 +11,9 @@ var _style = require("./style");
11
11
  var _vtxProvider = require("../vtx-provider");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- /**
15
- * 页面
16
- * @param {*} props
14
+ /**
15
+ * 页面
16
+ * @param {*} props
17
17
  */var Page = function Page(props) {
18
18
  var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
19
19
  getPrefixCls = _useContext.getPrefixCls;
@@ -33,9 +33,9 @@ Page.propTypes = {
33
33
  children: _propTypes.default.node
34
34
  };
35
35
 
36
- /**
37
- * 内容
38
- * @param {*} props
36
+ /**
37
+ * 内容
38
+ * @param {*} props
39
39
  */
40
40
  var Content = function Content(props) {
41
41
  var className = props.className,
@@ -24,8 +24,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
24
24
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
25
  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; }
26
26
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
27
- 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); } /**
28
- * 高阶组件
27
+ 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); } /**
28
+ * 高阶组件
29
29
  */
30
30
  function getDisplayName(WrappedComponend) {
31
31
  return WrappedComponend.displayName || WrappedComponend.name || 'Component';
@@ -82,11 +82,11 @@ var omitUndefined = function omitUndefined(obj) {
82
82
  return newObj;
83
83
  };
84
84
 
85
- /**
86
- * 用于判断当前是否需要开启哈希(Hash)模式。
87
- * 首先也会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
88
- * 如果是,则返回 false。否则,直接返回 true 表示需要打开。
89
- * @returns
85
+ /**
86
+ * 用于判断当前是否需要开启哈希(Hash)模式。
87
+ * 首先也会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
88
+ * 如果是,则返回 false。否则,直接返回 true 表示需要打开。
89
+ * @returns
90
90
  */
91
91
  var isNeedOpenHash = exports.isNeedOpenHash = function isNeedOpenHash() {
92
92
  var _process$env$NODE_ENV, _process$env$NODE_ENV2;
@@ -121,10 +121,10 @@ var VtxConfigContext = exports.VtxConfigContext = /*#__PURE__*/_react.default.cr
121
121
  });
122
122
  var ConfigConsumer = exports.ConfigConsumer = VtxConfigContext.Consumer;
123
123
 
124
- /**
125
- * 组件解除挂载后清空一下 cache
126
- * @date 2022-11-28
127
- * @returns null
124
+ /**
125
+ * 组件解除挂载后清空一下 cache
126
+ * @date 2022-11-28
127
+ * @returns null
128
128
  */
129
129
  var CacheClean = function CacheClean() {
130
130
  var _useSWRConfig = (0, _swr.useSWRConfig)(),
@@ -137,10 +137,10 @@ var CacheClean = function CacheClean() {
137
137
  return null;
138
138
  };
139
139
 
140
- /**
141
- * 用于配置 Pro 的组件,分装之后会简单一些
142
- * @param props
143
- * @returns
140
+ /**
141
+ * 用于配置 Pro 的组件,分装之后会简单一些
142
+ * @param props
143
+ * @returns
144
144
  */
145
145
  var ConfigProviderContainer = function ConfigProviderContainer(props) {
146
146
  var _antdTheme$useToken;
@@ -159,17 +159,17 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
159
159
  var tokenContext = (_antdTheme$useToken = _antd.theme.useToken) === null || _antdTheme$useToken === void 0 ? void 0 : _antdTheme$useToken.call(_antd.theme);
160
160
  var proProvide = (0, _react.useContext)(VtxConfigContext);
161
161
 
162
- /**
163
- * pro 的 类
164
- * @type {string}
165
- * @example .ant-pro
162
+ /**
163
+ * pro 的 类
164
+ * @type {string}
165
+ * @example .ant-pro
166
166
  */
167
167
 
168
168
  var vtxComponentsCls = prefixCls ? ".".concat(prefixCls) : ".vtx";
169
169
  var antCls = '.' + getPrefixCls();
170
170
  var salt = "".concat(vtxComponentsCls);
171
- /**
172
- * 合并一下token,不然导致嵌套 token 失效
171
+ /**
172
+ * 合并一下token,不然导致嵌套 token 失效
173
173
  */
174
174
  var proLayoutTokenMerge = (0, _react.useMemo)(function () {
175
175
  return (0, _layoutToken.getLayoutDesignToken)(propsToken || {}, tokenContext.token);
@@ -266,10 +266,10 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
266
266
  });
267
267
  };
268
268
 
269
- /**
270
- * 用于配置 一些全局性的东西
271
- * @param props
272
- * @returns
269
+ /**
270
+ * 用于配置 一些全局性的东西
271
+ * @param props
272
+ * @returns
273
273
  */
274
274
  var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(props) {
275
275
  var _theme$components, _theme$components2;
@@ -334,13 +334,13 @@ var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(p
334
334
  }));
335
335
  };
336
336
 
337
- /**
338
- * It returns the intl object from the context if it exists, otherwise it returns the intl object for
339
- * 获取国际化的方法
340
- * @param locale
341
- * @param localeMap
342
- * the current locale
343
- * @returns The return value of the function is the intl object.
337
+ /**
338
+ * It returns the intl object from the context if it exists, otherwise it returns the intl object for
339
+ * 获取国际化的方法
340
+ * @param locale
341
+ * @param localeMap
342
+ * the current locale
343
+ * @returns The return value of the function is the intl object.
344
344
  */
345
345
  function useIntl() {
346
346
  var _useContext3 = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext),
@@ -39,11 +39,11 @@ var _zh_CN = _interopRequireDefault(require("./locale/zh_CN"));
39
39
  var _zh_HK = _interopRequireDefault(require("./locale/zh_HK"));
40
40
  var _zh_TW = _interopRequireDefault(require("./locale/zh_TW"));
41
41
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42
- /**
43
- * 创建一个国际化的操作函数
44
- *
45
- * @param locale
46
- * @param localeMap
42
+ /**
43
+ * 创建一个国际化的操作函数
44
+ *
45
+ * @param locale
46
+ * @param localeMap
47
47
  */
48
48
  var createIntl = exports.createIntl = function createIntl(locale, localeMap) {
49
49
  return {
@@ -131,10 +131,10 @@ var intlMap = exports.intlMap = {
131
131
  };
132
132
  var intlMapKeys = exports.intlMapKeys = Object.keys(intlMap);
133
133
 
134
- /**
135
- * 根据 antd 的 key 来找到的 locale 插件的 key
136
- *
137
- * @param localeKey
134
+ /**
135
+ * 根据 antd 的 key 来找到的 locale 插件的 key
136
+ *
137
+ * @param localeKey
138
138
  */
139
139
  var findIntlKeyByAntdLocaleKey = exports.findIntlKeyByAntdLocaleKey = function findIntlKeyByAntdLocaleKey(localeKey) {
140
140
  var localeName = (localeKey || 'zh-CN').toLocaleLowerCase();
@@ -16,23 +16,23 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  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; }
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
18
18
  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); }
19
- /**
20
- * 把一个颜色设置一下透明度
21
- * @example (#fff, 0.5) => rgba(255, 255, 255, 0.5)
22
- * @param baseColor {string}
23
- * @param alpha {0-1}
24
- * @returns rgba {string}
19
+ /**
20
+ * 把一个颜色设置一下透明度
21
+ * @example (#fff, 0.5) => rgba(255, 255, 255, 0.5)
22
+ * @param baseColor {string}
23
+ * @param alpha {0-1}
24
+ * @returns rgba {string}
25
25
  */
26
26
  var setAlpha = exports.setAlpha = function setAlpha(baseColor, alpha) {
27
27
  return new _tinycolor.TinyColor(baseColor).setAlpha(alpha).toRgbString();
28
28
  };
29
29
 
30
- /**
31
- * 把一个颜色修改一些明度
32
- * @example (#000, 50) => #808080
33
- * @param baseColor {string}
34
- * @param brightness {0-100}
35
- * @returns hexColor {string}
30
+ /**
31
+ * 把一个颜色修改一些明度
32
+ * @example (#000, 50) => #808080
33
+ * @param baseColor {string}
34
+ * @param brightness {0-100}
35
+ * @returns hexColor {string}
36
36
  */
37
37
  var lighten = exports.lighten = function lighten(baseColor, brightness) {
38
38
  var instance = new _tinycolor.TinyColor(baseColor);
@@ -67,11 +67,11 @@ var operationUnit = exports.operationUnit = function operationUnit(token) {
67
67
  };
68
68
  };
69
69
 
70
- /**
71
- * 封装了一下 antd 的 useStyle
72
- * @param componentName {string} 组件的名字
73
- * @param styleFn {GenerateStyle} 生成样式的函数
74
- * @returns UseStyleResult
70
+ /**
71
+ * 封装了一下 antd 的 useStyle
72
+ * @param componentName {string} 组件的名字
73
+ * @param styleFn {GenerateStyle} 生成样式的函数
74
+ * @returns UseStyleResult
75
75
  */
76
76
  function useStyle(componentName, styleFn) {
77
77
  var _token$vtxComponentsC;
@@ -1,12 +1,12 @@
1
-
2
-
3
- .vtx-wang-editor {
4
- border: @border-width-base @border-style-base @border-color-base;
5
- &.w-e-full-screen-container {
6
- z-index: 999999;
7
- }
8
- &-content {
9
- height: 350px;
10
- border-top: @border-width-base @border-style-base @border-color-base;
11
- }
12
- }
1
+
2
+
3
+ .vtx-wang-editor {
4
+ border: @border-width-base @border-style-base @border-color-base;
5
+ &.w-e-full-screen-container {
6
+ z-index: 999999;
7
+ }
8
+ &-content {
9
+ height: 350px;
10
+ border-top: @border-width-base @border-style-base @border-color-base;
11
+ }
12
+ }