cloud-b2b 1.0.0 → 1.0.1

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 (172) hide show
  1. package/es/Card/Card.js +20 -0
  2. package/es/Card/package.json +6 -0
  3. package/es/Control/Control.js +402 -0
  4. package/es/Control/event.js +57 -0
  5. package/es/Control/package.json +6 -0
  6. package/es/Enhance/Dialogs.js +67 -0
  7. package/es/Enhance/Loading.js +151 -0
  8. package/es/Enhance/index.js +8 -0
  9. package/es/Enhance/package.json +6 -0
  10. package/es/Header/Header.js +194 -0
  11. package/es/Header/Header.less +94 -0
  12. package/es/Header/Vertical.js +129 -0
  13. package/es/Header/Vertical.less +60 -0
  14. package/es/Header/package.json +6 -0
  15. package/es/HomeHeader/Header.js +75 -0
  16. package/es/HomeHeader/Header.less +73 -0
  17. package/es/HomeHeader/package.json +6 -0
  18. package/es/ImageView/ImageView.js +117 -0
  19. package/es/ImageView/ImageView.less +14 -0
  20. package/es/ImageView/package.json +6 -0
  21. package/es/InpurCascader/InputCascader.js +135 -0
  22. package/es/InpurCascader/package.json +6 -0
  23. package/es/InputEditor/InputEditor.js +118 -0
  24. package/es/InputEditor/inputEditor.less +8 -0
  25. package/es/InputEditor/package.json +6 -0
  26. package/es/InputSearch/InputSearch.js +306 -0
  27. package/es/InputSearch/package.json +6 -0
  28. package/es/InputSelect/InputSelect.js +185 -0
  29. package/es/InputSelect/package.json +6 -0
  30. package/es/InputWriting/InputWriting.js +107 -0
  31. package/es/InputWriting/package.json +6 -0
  32. package/es/Layout/Layout.js +232 -0
  33. package/es/Layout/Layout.less +28 -0
  34. package/es/Layout/package.json +6 -0
  35. package/es/LayoutLink/LayoutLink.js +82 -0
  36. package/es/LayoutLink/LayoutLink.less +53 -0
  37. package/es/LayoutLink/package.json +6 -0
  38. package/es/Link/Link.js +108 -0
  39. package/es/Link/package.json +6 -0
  40. package/es/Loading/Loading.js +15 -0
  41. package/es/Loading/Loading.less +13 -0
  42. package/es/Loading/package.json +6 -0
  43. package/es/Loading2/Loading2.js +11 -0
  44. package/es/Loading2/Loading2.less +19 -0
  45. package/es/Loading2/package.json +6 -0
  46. package/es/ModalWithDrag/ModalWithDrag.js +34 -0
  47. package/es/ModalWithDrag/ModalWithDrag.less +6 -0
  48. package/es/ModalWithDrag/drag.js +133 -0
  49. package/es/ModalWithDrag/package.json +6 -0
  50. package/es/NumberInput/NumberInput.js +237 -0
  51. package/es/NumberInput/package.json +6 -0
  52. package/es/Search/Search.js +581 -0
  53. package/es/Search/Search.less +63 -0
  54. package/es/Search/package.json +6 -0
  55. package/es/Sidebar/Sidebar.js +165 -0
  56. package/es/Sidebar/Sidebar.less +77 -0
  57. package/es/Sidebar/package.json +6 -0
  58. package/es/Sidebar2/Sidebar.js +192 -0
  59. package/es/Sidebar2/Sidebar.less +153 -0
  60. package/es/Sidebar2/package.json +6 -0
  61. package/es/SuperForm/SuperForm.js +641 -0
  62. package/es/SuperForm/SuperForm.less +52 -0
  63. package/es/SuperForm/package.json +6 -0
  64. package/es/SuperIcon/SuperIcon.js +30 -0
  65. package/es/SuperIcon/package.json +6 -0
  66. package/es/SuperPagination/SuperPagination.js +126 -0
  67. package/es/SuperPagination/package.json +6 -0
  68. package/es/SuperToolbar/SuperToolbar.js +223 -0
  69. package/es/SuperToolbar/SuperToolbar.less +17 -0
  70. package/es/SuperToolbar/package.json +6 -0
  71. package/es/SuperUpload/SuperUpload.js +282 -0
  72. package/es/SuperUpload/SuperUpload.less +27 -0
  73. package/es/SuperUpload/package.json +6 -0
  74. package/es/Viewer/ImageViews.js +311 -0
  75. package/es/Viewer/Viewer.js +149 -0
  76. package/es/Viewer/Viewer.less +67 -0
  77. package/es/Viewer/imgView.less +59 -0
  78. package/es/Viewer/package.json +7 -0
  79. package/es/WingBlank/WingBlank.js +20 -0
  80. package/es/WingBlank/WingBlank.less +12 -0
  81. package/es/WingBlank/package.json +6 -0
  82. package/es/helper.js +118 -0
  83. package/es/history.js +5 -0
  84. package/es/index.js +24 -1
  85. package/es/variables.less +73 -73
  86. package/lib/Card/Card.js +38 -0
  87. package/lib/Card/package.json +6 -0
  88. package/lib/Control/Control.js +449 -0
  89. package/lib/Control/event.js +68 -0
  90. package/lib/Control/package.json +6 -0
  91. package/lib/Enhance/Dialogs.js +87 -0
  92. package/lib/Enhance/Loading.js +175 -0
  93. package/lib/Enhance/index.js +35 -0
  94. package/lib/Enhance/package.json +6 -0
  95. package/lib/Header/Header.js +215 -0
  96. package/lib/Header/Header.less +94 -0
  97. package/lib/Header/Vertical.js +150 -0
  98. package/lib/Header/Vertical.less +60 -0
  99. package/lib/Header/package.json +6 -0
  100. package/lib/HomeHeader/Header.js +95 -0
  101. package/lib/HomeHeader/Header.less +73 -0
  102. package/lib/HomeHeader/package.json +6 -0
  103. package/lib/ImageView/ImageView.js +134 -0
  104. package/lib/ImageView/ImageView.less +14 -0
  105. package/lib/ImageView/package.json +6 -0
  106. package/lib/InpurCascader/InputCascader.js +156 -0
  107. package/lib/InpurCascader/package.json +6 -0
  108. package/lib/InputEditor/InputEditor.js +136 -0
  109. package/lib/InputEditor/inputEditor.less +8 -0
  110. package/lib/InputEditor/package.json +6 -0
  111. package/lib/InputSearch/InputSearch.js +322 -0
  112. package/lib/InputSearch/package.json +6 -0
  113. package/lib/InputSelect/InputSelect.js +208 -0
  114. package/lib/InputSelect/package.json +6 -0
  115. package/lib/InputWriting/InputWriting.js +123 -0
  116. package/lib/InputWriting/package.json +6 -0
  117. package/lib/Layout/Layout.js +258 -0
  118. package/lib/Layout/Layout.less +28 -0
  119. package/lib/Layout/package.json +6 -0
  120. package/lib/LayoutLink/LayoutLink.js +114 -0
  121. package/lib/LayoutLink/LayoutLink.less +53 -0
  122. package/lib/LayoutLink/package.json +6 -0
  123. package/lib/Link/Link.js +130 -0
  124. package/lib/Link/package.json +6 -0
  125. package/lib/Loading/Loading.js +30 -0
  126. package/lib/Loading/Loading.less +13 -0
  127. package/lib/Loading/package.json +6 -0
  128. package/lib/Loading2/Loading2.js +26 -0
  129. package/lib/Loading2/Loading2.less +19 -0
  130. package/lib/Loading2/package.json +6 -0
  131. package/lib/ModalWithDrag/ModalWithDrag.js +53 -0
  132. package/lib/ModalWithDrag/ModalWithDrag.less +6 -0
  133. package/lib/ModalWithDrag/drag.js +147 -0
  134. package/lib/ModalWithDrag/package.json +6 -0
  135. package/lib/NumberInput/NumberInput.js +259 -0
  136. package/lib/NumberInput/package.json +6 -0
  137. package/lib/Search/Search.js +603 -0
  138. package/lib/Search/Search.less +63 -0
  139. package/lib/Search/package.json +6 -0
  140. package/lib/Sidebar/Sidebar.js +186 -0
  141. package/lib/Sidebar/Sidebar.less +77 -0
  142. package/lib/Sidebar/package.json +6 -0
  143. package/lib/Sidebar2/Sidebar.js +213 -0
  144. package/lib/Sidebar2/Sidebar.less +153 -0
  145. package/lib/Sidebar2/package.json +6 -0
  146. package/lib/SuperForm/SuperForm.js +657 -0
  147. package/lib/SuperForm/SuperForm.less +52 -0
  148. package/lib/SuperForm/package.json +6 -0
  149. package/lib/SuperIcon/SuperIcon.js +47 -0
  150. package/lib/SuperIcon/package.json +6 -0
  151. package/lib/SuperPagination/SuperPagination.js +145 -0
  152. package/lib/SuperPagination/package.json +6 -0
  153. package/lib/SuperToolbar/SuperToolbar.js +248 -0
  154. package/lib/SuperToolbar/SuperToolbar.less +17 -0
  155. package/lib/SuperToolbar/package.json +6 -0
  156. package/lib/SuperUpload/SuperUpload.js +324 -0
  157. package/lib/SuperUpload/SuperUpload.less +27 -0
  158. package/lib/SuperUpload/package.json +6 -0
  159. package/lib/Viewer/ImageViews.js +323 -0
  160. package/lib/Viewer/Viewer.js +167 -0
  161. package/lib/Viewer/Viewer.less +67 -0
  162. package/lib/Viewer/imgView.less +59 -0
  163. package/lib/Viewer/package.json +7 -0
  164. package/lib/WingBlank/WingBlank.js +37 -0
  165. package/lib/WingBlank/WingBlank.less +12 -0
  166. package/lib/WingBlank/package.json +6 -0
  167. package/lib/helper.js +147 -0
  168. package/lib/history.js +18 -0
  169. package/lib/index.js +208 -1
  170. package/lib/index.less +20 -1
  171. package/lib/variables.less +73 -73
  172. package/package.json +3 -2
@@ -0,0 +1,149 @@
1
+ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
+ import _Icon from "antd/es/icon";
3
+ import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
+ import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
7
+ import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
8
+ import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
9
+ import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
+ import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
11
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
12
+ import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
13
+
14
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
+
16
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
17
+
18
+ import React from 'react';
19
+ import PropTypes from 'prop-types';
20
+ import ImageViews from "./ImageViews";
21
+ import variables from '../variables';
22
+
23
+ var Viewers = /*#__PURE__*/function (_React$Component) {
24
+ _inherits(Viewers, _React$Component);
25
+
26
+ var _super = _createSuper(Viewers);
27
+
28
+ function Viewers(props) {
29
+ var _this;
30
+
31
+ _classCallCheck(this, Viewers);
32
+
33
+ _this = _super.call(this, props);
34
+
35
+ _defineProperty(_assertThisInitialized(_this), "componentWillUnmount", function () {
36
+ _this.timeout = null;
37
+ });
38
+
39
+ _defineProperty(_assertThisInitialized(_this), "closeViewers", function () {
40
+ var _this$props = _this.props,
41
+ onCancel = _this$props.onCancel,
42
+ onClose = _this$props.onClose;
43
+ _this.containerRef.style['opacity'] = 0;
44
+ _this.timeout = _setTimeout(function () {
45
+ onCancel && onCancel(onClose);
46
+ }, 1000);
47
+ });
48
+
49
+ _defineProperty(_assertThisInitialized(_this), "_onLeft", function () {
50
+ var imageIndex = _this.state.imageIndex;
51
+ var images = _this.props.images;
52
+ var index = imageIndex - 1;
53
+
54
+ if (index < 0) {
55
+ index = images.length - 1;
56
+ }
57
+
58
+ _this.setState({
59
+ imageIndex: index
60
+ });
61
+ });
62
+
63
+ _defineProperty(_assertThisInitialized(_this), "_onRight", function () {
64
+ var imageIndex = _this.state.imageIndex;
65
+ var images = _this.props.images;
66
+ var index = imageIndex + 1;
67
+
68
+ if (index > images.length - 1) {
69
+ index = 0;
70
+ }
71
+
72
+ _this.setState({
73
+ imageIndex: index
74
+ });
75
+ });
76
+
77
+ _defineProperty(_assertThisInitialized(_this), "_onSelect", function (index) {
78
+ _this.setState({
79
+ imageIndex: index
80
+ });
81
+ });
82
+
83
+ _this.state = {
84
+ imageIndex: props.imageIndex
85
+ };
86
+ return _this;
87
+ } //修复Warning报错
88
+
89
+
90
+ _createClass(Viewers, [{
91
+ key: "render",
92
+ value: function render() {
93
+ var _this2 = this;
94
+
95
+ var _this$props2 = this.props,
96
+ visible = _this$props2.visible,
97
+ images = _this$props2.images,
98
+ titles = _this$props2.titles;
99
+ var imageIndex = this.state.imageIndex;
100
+ return /*#__PURE__*/React.createElement("div", null, visible ? /*#__PURE__*/React.createElement("div", {
101
+ className: variables('Viewers'),
102
+ ref: function ref(container) {
103
+ _this2.containerRef = container;
104
+ }
105
+ }, /*#__PURE__*/React.createElement("div", {
106
+ className: variables('Viewers').mask
107
+ }), /*#__PURE__*/React.createElement("div", {
108
+ className: variables('Viewers').title
109
+ }, _mapInstanceProperty(titles).call(titles, function (item, index) {
110
+ var _context;
111
+
112
+ return /*#__PURE__*/React.createElement("div", {
113
+ key: index,
114
+ onClick: _bindInstanceProperty(_context = _this2._onSelect).call(_context, _this2, index),
115
+ className: index === imageIndex ? s.selectTitle : ''
116
+ }, item);
117
+ })), /*#__PURE__*/React.createElement(ImageViews, {
118
+ image: images[imageIndex],
119
+ onLeft: this._onLeft,
120
+ onRight: this._onRight
121
+ }), /*#__PURE__*/React.createElement("div", {
122
+ className: variables('Viewers').close,
123
+ onClick: function onClick() {
124
+ return _this2.closeViewers();
125
+ }
126
+ }, /*#__PURE__*/React.createElement(_Icon, {
127
+ type: "close"
128
+ }))) : null);
129
+ }
130
+ }]);
131
+
132
+ return Viewers;
133
+ }(React.Component);
134
+
135
+ _defineProperty(Viewers, "propTypes", {
136
+ /** viewer是否可见 */
137
+ visible: PropTypes.bool.isRequired,
138
+
139
+ /** 点击关闭按钮的回调 */
140
+ onCancel: PropTypes.func.isRequired,
141
+
142
+ /** 需要进行浏览的图片地址集合 */
143
+ images: PropTypes.array.isRequired,
144
+
145
+ /** 需要进行浏览的图片名称集合 */
146
+ titles: PropTypes.array.isRequired
147
+ });
148
+
149
+ export default Viewers;
@@ -0,0 +1,67 @@
1
+ @import '../variables.less';
2
+
3
+ html, body {
4
+ width: 100vw;
5
+ overflow: hidden;
6
+ }
7
+
8
+ .@{cloudlink-prefix}-Viewers {
9
+ font-size: 13px;
10
+ opacity: 1;
11
+ transition: opacity 1s;
12
+ position: fixed;
13
+ left: 0;
14
+ right: 0;
15
+ bottom: 0;
16
+ top: 0;
17
+ height: 100%;
18
+ width: 100%;
19
+ overflow: hidden;
20
+ z-index: 1001;
21
+ .mask {
22
+ position: absolute;
23
+ left: 0;
24
+ right: 0;
25
+ bottom: 0;
26
+ top: 0;
27
+ height: 100%;
28
+ width: 100%;
29
+ background: rgba(55, 55, 55, 0.9);
30
+ overflow: hidden;
31
+ }
32
+ .close{
33
+ position: fixed;
34
+ right: 0;
35
+ top: 0;
36
+ height: 60px;
37
+ width: 60px;
38
+ border-radius: 0 0 0 60px;
39
+ background: rgba(0,0,0,0.6);
40
+ z-index: 1050;
41
+ i{
42
+ position: absolute;
43
+ left: 30px;
44
+ top: 15px;
45
+ color: white;
46
+ font-size: 16px;
47
+ }
48
+ }
49
+ .title{
50
+ position: absolute;
51
+ top: 15px;
52
+ left: 15px;
53
+ z-index: 2000;
54
+
55
+ > div {
56
+ color: white;
57
+ font-weight: bold;
58
+ font-size: 24px;
59
+ cursor: pointer;
60
+ }
61
+
62
+ .selectTitle {
63
+ color: #4db5ff;
64
+ }
65
+ }
66
+ }
67
+
@@ -0,0 +1,59 @@
1
+ @import '../variables.less';
2
+
3
+ .@{cloudlink-prefix}-ImageViews {
4
+ position: absolute;
5
+ left: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ top: 0;
9
+ overflow: hidden;
10
+ z-index: 1050;
11
+ img{
12
+ position: absolute;
13
+ left: 50%;
14
+ top: 50%;
15
+ transform: translate(-50%,-50%);
16
+ transform-origin: center center;
17
+ cursor: pointer;
18
+ }
19
+ .footer{
20
+ position: fixed;
21
+ left: 0;
22
+ right: 0;
23
+ bottom: 50px;
24
+ height: 52px;
25
+ z-index: 1100;
26
+ .toolBar{
27
+ display: flex;
28
+ height: 58px;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ justify-content: space-around;
32
+ >span{
33
+ font-size: 18px;
34
+ opacity:0.8;
35
+ line-height: 15px;
36
+ color: #ccc;
37
+ }
38
+ >ul{
39
+ overflow: hidden;
40
+ display: flex;
41
+ flex-direction: row;
42
+ >li{
43
+ height: 36px;
44
+ width: 36px;
45
+ border-radius: 50%;
46
+ background: rgba(0, 0, 0, 1);
47
+ margin-left: 5px;
48
+ text-align: center;
49
+ line-height: 36px;
50
+ cursor: pointer;
51
+ i{
52
+ color: white;
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "Viewer",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./Viewer"
6
+ }
7
+
@@ -0,0 +1,20 @@
1
+ import _extends from "@babel/runtime-corejs3/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
3
+ var _excluded = ["className", "children"];
4
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
5
+ import React from 'react';
6
+ import variables from '../variables';
7
+
8
+ function WingBlank(_ref) {
9
+ var _context;
10
+
11
+ var className = _ref.className,
12
+ children = _ref.children,
13
+ props = _objectWithoutProperties(_ref, _excluded);
14
+
15
+ return /*#__PURE__*/React.createElement("div", _extends({
16
+ className: _concatInstanceProperty(_context = "".concat(className, " ")).call(_context, variables('DragTable'))
17
+ }, props), /*#__PURE__*/React.createElement("div", null, children));
18
+ }
19
+
20
+ export default WingBlank;
@@ -0,0 +1,12 @@
1
+ @import '../variables';
2
+
3
+ .@{cloudlink-prefix}-WingBlank {
4
+ padding-left: @padding;
5
+ padding-right: @padding;
6
+
7
+ > * {
8
+ max-width: @max-width;
9
+ margin-left: auto;
10
+ margin-right: auto;
11
+ }
12
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "WingBlank",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./WingBlank.js"
6
+ }
package/es/helper.js ADDED
@@ -0,0 +1,118 @@
1
+ import _typeof from "@babel/runtime-corejs3/helpers/typeof";
2
+ import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
3
+ import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
4
+ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
5
+ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
6
+ import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
7
+ import message from 'antd/lib/message';
8
+ /**
9
+ * 功能:从obj中取出不包含keys指定的属性,并组成一个新的子对象
10
+ */
11
+
12
+ var getObjectExclude = function getObjectExclude(obj, keys) {
13
+ var _context;
14
+
15
+ var inKeys = function inKeys(key) {
16
+ return _someInstanceProperty(keys).call(keys, function (k) {
17
+ return k === key;
18
+ });
19
+ };
20
+
21
+ return _reduceInstanceProperty(_context = _Object$keys(obj)).call(_context, function (newObj, key) {
22
+ !inKeys(key) && (newObj[key] = obj[key]);
23
+ return newObj;
24
+ }, {});
25
+ }; // 获取当前登录的用户名
26
+
27
+
28
+ var getUsername = function getUsername() {
29
+ var username = 'username=';
30
+ var cookie = document.cookie;
31
+ var begin = _indexOfInstanceProperty(cookie).call(cookie, username) + username.length;
32
+
33
+ var end = _indexOfInstanceProperty(cookie).call(cookie, ';', begin);
34
+
35
+ return unescape(cookie.substring(begin, end < 0 ? cookie.length : end));
36
+ };
37
+ /**
38
+ * 确保path为数组
39
+ */
40
+
41
+
42
+ var makeArray = function makeArray(path) {
43
+ if (_Array$isArray(path)) {
44
+ return path;
45
+ } else if (!path) {
46
+ return [];
47
+ } else {
48
+ return [path];
49
+ }
50
+ };
51
+ /**
52
+ * 功能:获取对象关键路径的值,不存在则返回undefined
53
+ * obj:对象
54
+ * path:字符串或字符串数组,指定关键路径
55
+ */
56
+
57
+
58
+ var getPathValue = function getPathValue(obj, path) {
59
+ if (!path) {
60
+ return undefined;
61
+ } else {
62
+ var _context2;
63
+
64
+ return _reduceInstanceProperty(_context2 = makeArray(path)).call(_context2, function (value, key) {
65
+ return _typeof(value) !== 'object' ? undefined : value[key];
66
+ }, obj);
67
+ }
68
+ };
69
+ /**
70
+ * 功能:判断一个值是否为空(null,undefined和''属于空)
71
+ */
72
+
73
+
74
+ var isEmpty = function isEmpty(value) {
75
+ var type = _typeof(value);
76
+
77
+ if (type === 'number' || type === 'boolean') {
78
+ return false;
79
+ } else {
80
+ return !value;
81
+ }
82
+ };
83
+ /**
84
+ * 功能:判断一个值是否为空(null,undefined,''和[]属于空)
85
+ */
86
+
87
+
88
+ var isEmpty2 = function isEmpty2(value) {
89
+ var type = _typeof(value);
90
+
91
+ if (type === 'number' || type === 'boolean') {
92
+ return false;
93
+ } else if (_Array$isArray(value)) {
94
+ return !value.length;
95
+ } else {
96
+ return !value;
97
+ }
98
+ };
99
+
100
+ var showError = function showError(msg) {
101
+ message.error(msg);
102
+ };
103
+
104
+ var showSuccessMsg = function showSuccessMsg(msg) {
105
+ message.success(msg);
106
+ };
107
+
108
+ var helper = {
109
+ getObjectExclude: getObjectExclude,
110
+ getUsername: getUsername,
111
+ getPathValue: getPathValue,
112
+ isEmpty: isEmpty,
113
+ isEmpty2: isEmpty2,
114
+ showError: showError,
115
+ showSuccessMsg: showSuccessMsg
116
+ };
117
+ export { getObjectExclude, getUsername, getPathValue, isEmpty, isEmpty2, showError, showSuccessMsg };
118
+ export default helper;
package/es/history.js ADDED
@@ -0,0 +1,5 @@
1
+ // import createBrowserHistory from 'history/createBrowserHistory';
2
+ import { createBrowserHistory } from 'history'; // Navigation manager, e.g. history.push('/home')
3
+ // https://github.com/mjackson/history
4
+
5
+ export default process.env.BROWSER && createBrowserHistory();
package/es/index.js CHANGED
@@ -1 +1,24 @@
1
- export { default as Title } from './Title';
1
+ export { default as Title } from './Title';
2
+ export { default as Card } from './Card';
3
+ export { default as Control } from './Control';
4
+ export { default as Enhance } from './Enhance';
5
+ export { default as Header } from './Header';
6
+ export { default as ImageView } from './ImageView';
7
+ export { default as InpurCascader } from './InpurCascader';
8
+ export { default as InputSearch } from './InputSearch';
9
+ export { default as InputSelect } from './InputSelect';
10
+ export { default as InputWriting } from './InputWriting';
11
+ export { default as Layout } from './Layout';
12
+ export { default as LayoutLink } from './LayoutLink';
13
+ export { default as Link } from './Link';
14
+ export { default as Loading } from './Loading';
15
+ export { default as ModalWithDrag } from './ModalWithDrag';
16
+ export { default as NumberInput } from './NumberInput';
17
+ export { default as Search } from './Search';
18
+ export { default as Sidebar } from './Sidebar';
19
+ export { default as SuperForm } from './SuperForm';
20
+ export { default as SuperIcon } from './SuperIcon';
21
+ export { default as SuperToolbar } from './SuperToolbar';
22
+ export { default as SuperUpload } from './SuperUpload';
23
+ export { default as Viewer } from './Viewer';
24
+ export { default as WingBlank } from './WingBlank';
package/es/variables.less CHANGED
@@ -1,73 +1,73 @@
1
- @cloudlink-prefix: cloudlink;
2
- @default-font-size: 14px;
3
- @font-size-base: ceil((@default-font-size * 0.85));
4
- @default-line-color:#d7d7d7;
5
- @padding-horizontal: 10px;
6
- @padding-vertical: 10px;
7
- @padding-horizontal-sm: 5px;
8
- @padding-vertical-sm: 5px;
9
- @background-color: white;
10
- @box-shadow-color: rgba(0, 0, 0, 0.15);
11
- @brand-primary: #2196f3;
12
- @font-family-base: '微软雅黑', '宋体', sans-serif;
13
- @one-pixel: 0.0625vw;
14
- @one-pixel-v: 0.1111vh;
15
-
16
- // antd变量
17
- @text-color: rgba(0, 0, 0, 0.80);
18
- @primary-color: @brand-primary;
19
- @primary-1: tint(@primary-color, 85%);
20
- @primary-5: tint(@primary-color, 20%);
21
- @border-radius-base: 4px;
22
- @border-radius-sm: 2px;
23
- @border-radius-lg: 8px;
24
- @table-header-bg: #f0f0f0;
25
- @table-row-hover-bg: @primary-1;
26
- @input-height-base: 28px;
27
- @input-height-lg: 32px;
28
- @input-height-sm: 22px;
29
- @btn-height-base: @input-height-base;
30
- @btn-height-lg: @input-height-lg;
31
- @btn-height-sm: @input-height-sm;
32
- @pagination-item-size: @input-height-base;
33
-
34
- // layout外观
35
- @layout-font-size: @default-font-size;
36
- @layout-font-family: @font-family-base;
37
-
38
- // 页眉外观(header)
39
- @header-height: 40px;
40
- @header-font-size: @default-font-size + 2;
41
- @header-color: #fff;
42
- @header-color-bg: #0175DA;
43
- @header-hover-bg: fade(darken(@header-color-bg, 15%), 50%);
44
- @header-active-bg: @header-hover-bg;
45
-
46
- // 侧边栏外观(sidebar)
47
- @sidebar-width: 160px;
48
- @sidebar-min-width: 43px;
49
- @sidebar-color: black;
50
- @sidebar-border-color: #d7d7d7;
51
- @sidebar-color-bg: #f7f4f9;
52
- @sidebar-hover-bg: #e4e4e4;
53
- @sidebar-active-bg: @sidebar-hover-bg;
54
-
55
- // Form
56
- @form-group-margin-bottom: 0;
57
- @legend-color: black;
58
-
59
- //门户相关页面变量
60
- @max-width: 1180px;
61
- @padding: 15px;
62
-
63
- //媒体查询定义
64
- @screen-small: 768px;
65
- @screen-low-middle: 1024px;
66
- @screen-middle: 1180px;
67
-
68
- @screen-sm-max: @screen-small;
69
- @screen-lm-min: @screen-small + 1;
70
- @screen-lm-max: @screen-low-middle;
71
- @screen-md-min: @screen-low-middle + 1;
72
- @screen-md-max: @screen-middle + 50;
73
- @screen-lg-min: @screen-middle + 1 + 50;
1
+ @cloudlink-prefix: cloudlink;
2
+ @default-font-size: 14px;
3
+ @font-size-base: ceil((@default-font-size * 0.85));
4
+ @default-line-color:#d7d7d7;
5
+ @padding-horizontal: 10px;
6
+ @padding-vertical: 10px;
7
+ @padding-horizontal-sm: 5px;
8
+ @padding-vertical-sm: 5px;
9
+ @background-color: white;
10
+ @box-shadow-color: rgba(0, 0, 0, 0.15);
11
+ @brand-primary: #fdae63;
12
+ @font-family-base: '微软雅黑', '宋体', sans-serif;
13
+ @one-pixel: 0.0625vw;
14
+ @one-pixel-v: 0.1111vh;
15
+
16
+ // antd变量
17
+ @text-color: rgba(0, 0, 0, 0.80);
18
+ @primary-color: #FE7F0B;
19
+ @primary-1: tint(@primary-color, 85%);
20
+ @primary-5: tint(@primary-color, 20%);
21
+ @border-radius-base: 4px;
22
+ @border-radius-sm: 2px;
23
+ @border-radius-lg: 8px;
24
+ @table-header-bg: #f0f0f0;
25
+ @table-row-hover-bg: @primary-1;
26
+ @input-height-base: 28px;
27
+ @input-height-lg: 32px;
28
+ @input-height-sm: 22px;
29
+ @btn-height-base: @input-height-base;
30
+ @btn-height-lg: @input-height-lg;
31
+ @btn-height-sm: @input-height-sm;
32
+ @pagination-item-size: @input-height-base;
33
+
34
+ // layout外观
35
+ @layout-font-size: @default-font-size;
36
+ @layout-font-family: @font-family-base;
37
+
38
+ // 页眉外观(header)
39
+ @header-height: 40px;
40
+ @header-font-size: @default-font-size + 2;
41
+ @header-color: #fff;
42
+ @header-color-bg: #0175DA;
43
+ @header-hover-bg: fade(darken(@header-color-bg, 15%), 50%);
44
+ @header-active-bg: @header-hover-bg;
45
+
46
+ // 侧边栏外观(sidebar)
47
+ @sidebar-width: 160px;
48
+ @sidebar-min-width: 43px;
49
+ @sidebar-color: black;
50
+ @sidebar-border-color: #d7d7d7;
51
+ @sidebar-color-bg: #f7f4f9;
52
+ @sidebar-hover-bg: #e4e4e4;
53
+ @sidebar-active-bg: @sidebar-hover-bg;
54
+
55
+ // Form
56
+ @form-group-margin-bottom: 0;
57
+ @legend-color: black;
58
+
59
+ //门户相关页面变量
60
+ @max-width: 1180px;
61
+ @padding: 15px;
62
+
63
+ //媒体查询定义
64
+ @screen-small: 768px;
65
+ @screen-low-middle: 1024px;
66
+ @screen-middle: 1180px;
67
+
68
+ @screen-sm-max: @screen-small;
69
+ @screen-lm-min: @screen-small + 1;
70
+ @screen-lm-max: @screen-low-middle;
71
+ @screen-md-min: @screen-low-middle + 1;
72
+ @screen-md-max: @screen-middle + 50;
73
+ @screen-lg-min: @screen-middle + 1 + 50;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
+
7
+ _Object$defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+
11
+ exports["default"] = void 0;
12
+
13
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
14
+
15
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
16
+
17
+ var _react = _interopRequireDefault(require("react"));
18
+
19
+ var _classnames = _interopRequireDefault(require("classnames"));
20
+
21
+ var _excluded = ["children", "className", "noPadding"];
22
+
23
+ var Card = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
24
+ var children = _ref.children,
25
+ className = _ref.className,
26
+ noPadding = _ref.noPadding,
27
+ other = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
28
+ var padding = !noPadding ? true : null;
29
+ return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
30
+ className: (0, _classnames["default"])('pld-card', className),
31
+ "data-padding": padding
32
+ }, other, {
33
+ ref: ref
34
+ }), children);
35
+ });
36
+
37
+ var _default = Card;
38
+ exports["default"] = _default;
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "Card",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./Card.js"
6
+ }