cloud-b2b 1.0.0 → 1.0.3

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 (208) hide show
  1. package/es/Area/Area.js +166 -0
  2. package/es/Area/package.json +6 -0
  3. package/es/Card/Card.js +20 -0
  4. package/es/Card/package.json +6 -0
  5. package/es/Control/Control.js +428 -0
  6. package/es/Control/event.js +57 -0
  7. package/es/Control/package.json +6 -0
  8. package/es/Enhance/Dialogs.js +67 -0
  9. package/es/Enhance/Loading.js +151 -0
  10. package/es/Enhance/index.js +8 -0
  11. package/es/Enhance/package.json +6 -0
  12. package/es/Header/Header.js +194 -0
  13. package/es/Header/Header.less +95 -0
  14. package/es/Header/Vertical.js +129 -0
  15. package/es/Header/Vertical.less +60 -0
  16. package/es/Header/package.json +6 -0
  17. package/es/HomeHeader/Header.js +75 -0
  18. package/es/HomeHeader/Header.less +73 -0
  19. package/es/HomeHeader/package.json +6 -0
  20. package/es/ImageView/ImageView.js +117 -0
  21. package/es/ImageView/ImageView.less +14 -0
  22. package/es/ImageView/package.json +6 -0
  23. package/es/InpurCascader/InputCascader.js +135 -0
  24. package/es/InpurCascader/package.json +6 -0
  25. package/es/InputEditor/InputEditor.js +118 -0
  26. package/es/InputEditor/inputEditor.less +8 -0
  27. package/es/InputEditor/package.json +6 -0
  28. package/es/InputSearch/InputSearch.js +306 -0
  29. package/es/InputSearch/package.json +6 -0
  30. package/es/InputSelect/InputSelect.js +185 -0
  31. package/es/InputSelect/package.json +6 -0
  32. package/es/InputWriting/InputWriting.js +107 -0
  33. package/es/InputWriting/package.json +6 -0
  34. package/es/Layout/Layout.js +232 -0
  35. package/es/Layout/Layout.less +28 -0
  36. package/es/Layout/package.json +6 -0
  37. package/es/LayoutLink/LayoutLink.js +82 -0
  38. package/es/LayoutLink/LayoutLink.less +53 -0
  39. package/es/LayoutLink/package.json +6 -0
  40. package/es/Link/Link.js +108 -0
  41. package/es/Link/package.json +6 -0
  42. package/es/Loading/Loading.js +15 -0
  43. package/es/Loading/Loading.less +13 -0
  44. package/es/Loading/package.json +6 -0
  45. package/es/Loading2/Loading2.js +11 -0
  46. package/es/Loading2/Loading2.less +19 -0
  47. package/es/Loading2/package.json +6 -0
  48. package/es/ModalWithDrag/ModalWithDrag.js +34 -0
  49. package/es/ModalWithDrag/ModalWithDrag.less +6 -0
  50. package/es/ModalWithDrag/drag.js +133 -0
  51. package/es/ModalWithDrag/package.json +6 -0
  52. package/es/NumberInput/NumberInput.js +237 -0
  53. package/es/NumberInput/package.json +6 -0
  54. package/es/Search/Search.js +581 -0
  55. package/es/Search/Search.less +63 -0
  56. package/es/Search/package.json +6 -0
  57. package/es/Sidebar/Sidebar.js +165 -0
  58. package/es/Sidebar/Sidebar.less +78 -0
  59. package/es/Sidebar/package.json +6 -0
  60. package/es/Sidebar2/Sidebar.js +192 -0
  61. package/es/Sidebar2/Sidebar.less +153 -0
  62. package/es/Sidebar2/package.json +6 -0
  63. package/es/SuperForm/SuperForm.js +688 -0
  64. package/es/SuperForm/SuperForm.less +52 -0
  65. package/es/SuperForm/package.json +6 -0
  66. package/es/SuperIcon/SuperIcon.js +30 -0
  67. package/es/SuperIcon/package.json +6 -0
  68. package/es/SuperPagination/SuperPagination.js +126 -0
  69. package/es/SuperPagination/package.json +6 -0
  70. package/es/SuperTable/DragSortRow.js +125 -0
  71. package/es/SuperTable/DragSortRow.less +17 -0
  72. package/es/SuperTable/FilterDropDown.js +188 -0
  73. package/es/SuperTable/FilterDropDown.less +30 -0
  74. package/es/SuperTable/SuperTable.js +933 -0
  75. package/es/SuperTable/SuperTable.less +135 -0
  76. package/es/SuperTable/fixed.js +42 -0
  77. package/es/SuperTable/package.json +6 -0
  78. package/es/SuperTable2/SuperTable2.js +700 -0
  79. package/es/SuperTable2/SuperTable2.less +100 -0
  80. package/es/SuperTable2/SuperTableCell.js +215 -0
  81. package/es/SuperTable2/package.json +6 -0
  82. package/es/SuperToolbar/SuperToolbar.js +223 -0
  83. package/es/SuperToolbar/SuperToolbar.less +17 -0
  84. package/es/SuperToolbar/package.json +6 -0
  85. package/es/SuperUpload/SuperUpload.js +282 -0
  86. package/es/SuperUpload/SuperUpload.less +27 -0
  87. package/es/SuperUpload/package.json +6 -0
  88. package/es/Title/Title.less +35 -35
  89. package/es/Title/package.json +6 -6
  90. package/es/Viewer/ImageViews.js +311 -0
  91. package/es/Viewer/Viewer.js +149 -0
  92. package/es/Viewer/Viewer.less +67 -0
  93. package/es/Viewer/imgView.less +59 -0
  94. package/es/Viewer/package.json +7 -0
  95. package/es/WingBlank/WingBlank.js +20 -0
  96. package/es/WingBlank/WingBlank.less +12 -0
  97. package/es/WingBlank/package.json +6 -0
  98. package/es/adjust.less +89 -0
  99. package/es/helper.js +118 -0
  100. package/es/history.js +5 -0
  101. package/es/index.js +27 -1
  102. package/es/style.less +20 -1
  103. package/es/variables.less +73 -73
  104. package/lib/Area/Area.js +194 -0
  105. package/lib/Area/package.json +6 -0
  106. package/lib/Card/Card.js +38 -0
  107. package/lib/Card/package.json +6 -0
  108. package/lib/Control/Control.js +477 -0
  109. package/lib/Control/event.js +68 -0
  110. package/lib/Control/package.json +6 -0
  111. package/lib/Enhance/Dialogs.js +87 -0
  112. package/lib/Enhance/Loading.js +175 -0
  113. package/lib/Enhance/index.js +35 -0
  114. package/lib/Enhance/package.json +6 -0
  115. package/lib/Header/Header.js +215 -0
  116. package/lib/Header/Header.less +95 -0
  117. package/lib/Header/Vertical.js +150 -0
  118. package/lib/Header/Vertical.less +60 -0
  119. package/lib/Header/package.json +6 -0
  120. package/lib/HomeHeader/Header.js +95 -0
  121. package/lib/HomeHeader/Header.less +73 -0
  122. package/lib/HomeHeader/package.json +6 -0
  123. package/lib/ImageView/ImageView.js +134 -0
  124. package/lib/ImageView/ImageView.less +14 -0
  125. package/lib/ImageView/package.json +6 -0
  126. package/lib/InpurCascader/InputCascader.js +156 -0
  127. package/lib/InpurCascader/package.json +6 -0
  128. package/lib/InputEditor/InputEditor.js +136 -0
  129. package/lib/InputEditor/inputEditor.less +8 -0
  130. package/lib/InputEditor/package.json +6 -0
  131. package/lib/InputSearch/InputSearch.js +322 -0
  132. package/lib/InputSearch/package.json +6 -0
  133. package/lib/InputSelect/InputSelect.js +208 -0
  134. package/lib/InputSelect/package.json +6 -0
  135. package/lib/InputWriting/InputWriting.js +123 -0
  136. package/lib/InputWriting/package.json +6 -0
  137. package/lib/Layout/Layout.js +258 -0
  138. package/lib/Layout/Layout.less +28 -0
  139. package/lib/Layout/package.json +6 -0
  140. package/lib/LayoutLink/LayoutLink.js +114 -0
  141. package/lib/LayoutLink/LayoutLink.less +53 -0
  142. package/lib/LayoutLink/package.json +6 -0
  143. package/lib/Link/Link.js +130 -0
  144. package/lib/Link/package.json +6 -0
  145. package/lib/Loading/Loading.js +30 -0
  146. package/lib/Loading/Loading.less +13 -0
  147. package/lib/Loading/package.json +6 -0
  148. package/lib/Loading2/Loading2.js +26 -0
  149. package/lib/Loading2/Loading2.less +19 -0
  150. package/lib/Loading2/package.json +6 -0
  151. package/lib/ModalWithDrag/ModalWithDrag.js +53 -0
  152. package/lib/ModalWithDrag/ModalWithDrag.less +6 -0
  153. package/lib/ModalWithDrag/drag.js +147 -0
  154. package/lib/ModalWithDrag/package.json +6 -0
  155. package/lib/NumberInput/NumberInput.js +259 -0
  156. package/lib/NumberInput/package.json +6 -0
  157. package/lib/Search/Search.js +603 -0
  158. package/lib/Search/Search.less +63 -0
  159. package/lib/Search/package.json +6 -0
  160. package/lib/Sidebar/Sidebar.js +186 -0
  161. package/lib/Sidebar/Sidebar.less +78 -0
  162. package/lib/Sidebar/package.json +6 -0
  163. package/lib/Sidebar2/Sidebar.js +213 -0
  164. package/lib/Sidebar2/Sidebar.less +153 -0
  165. package/lib/Sidebar2/package.json +6 -0
  166. package/lib/SuperForm/SuperForm.js +702 -0
  167. package/lib/SuperForm/SuperForm.less +52 -0
  168. package/lib/SuperForm/package.json +6 -0
  169. package/lib/SuperIcon/SuperIcon.js +47 -0
  170. package/lib/SuperIcon/package.json +6 -0
  171. package/lib/SuperPagination/SuperPagination.js +145 -0
  172. package/lib/SuperPagination/package.json +6 -0
  173. package/lib/SuperTable/DragSortRow.js +142 -0
  174. package/lib/SuperTable/DragSortRow.less +17 -0
  175. package/lib/SuperTable/FilterDropDown.js +205 -0
  176. package/lib/SuperTable/FilterDropDown.less +30 -0
  177. package/lib/SuperTable/SuperTable.js +937 -0
  178. package/lib/SuperTable/SuperTable.less +135 -0
  179. package/lib/SuperTable/fixed.js +55 -0
  180. package/lib/SuperTable/package.json +6 -0
  181. package/lib/SuperTable2/SuperTable2.js +725 -0
  182. package/lib/SuperTable2/SuperTable2.less +100 -0
  183. package/lib/SuperTable2/SuperTableCell.js +231 -0
  184. package/lib/SuperTable2/package.json +6 -0
  185. package/lib/SuperToolbar/SuperToolbar.js +248 -0
  186. package/lib/SuperToolbar/SuperToolbar.less +17 -0
  187. package/lib/SuperToolbar/package.json +6 -0
  188. package/lib/SuperUpload/SuperUpload.js +324 -0
  189. package/lib/SuperUpload/SuperUpload.less +27 -0
  190. package/lib/SuperUpload/package.json +6 -0
  191. package/lib/Title/Title.less +35 -35
  192. package/lib/Title/package.json +6 -6
  193. package/lib/Viewer/ImageViews.js +323 -0
  194. package/lib/Viewer/Viewer.js +167 -0
  195. package/lib/Viewer/Viewer.less +67 -0
  196. package/lib/Viewer/imgView.less +59 -0
  197. package/lib/Viewer/package.json +7 -0
  198. package/lib/WingBlank/WingBlank.js +37 -0
  199. package/lib/WingBlank/WingBlank.less +12 -0
  200. package/lib/WingBlank/package.json +6 -0
  201. package/lib/adjust.less +89 -0
  202. package/lib/helper.js +147 -0
  203. package/lib/history.js +18 -0
  204. package/lib/index.js +235 -1
  205. package/lib/index.less +25 -1
  206. package/lib/style.less +20 -1
  207. package/lib/variables.less +73 -73
  208. package/package.json +3 -2
package/es/adjust.less ADDED
@@ -0,0 +1,89 @@
1
+
2
+ .ant-table-small {
3
+ .ant-table-thead {
4
+ background-color: @table-header-bg;
5
+
6
+ > tr > th {
7
+ padding: 12px 8px 11px !important;
8
+ }
9
+ }
10
+
11
+ .ant-table-tbody > tr > td {
12
+ padding: 8px 8px 7px !important;
13
+ }
14
+
15
+ .ant-table-tbody > tr.ant-table-row-selected td {
16
+ background-color: @primary-1 !important;
17
+ }
18
+
19
+ .ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td {
20
+ background-color: @table-header-bg !important;
21
+ }
22
+
23
+ .ant-table-selection-column {
24
+ min-width: 62px;
25
+ }
26
+
27
+ table {
28
+ border-collapse: separate;
29
+ border-spacing: 0;
30
+ }
31
+ }
32
+
33
+ .ant-modal {
34
+ top: 50px;
35
+ padding-bottom: 0;
36
+ }
37
+
38
+ .ant-form-item {
39
+ margin-bottom: 6px;
40
+ }
41
+
42
+ .ant-select-sm .ant-select-selection--single {
43
+ height: @input-height-sm !important;
44
+ overflow: hidden;
45
+ }
46
+
47
+ .ant-form-vertical .ant-form-item {
48
+ padding-bottom: 0;
49
+ }
50
+
51
+ .ant-form-item-control {
52
+ line-height: @input-height-sm;
53
+
54
+ > .ant-form-explain-holder[aria-hidden='true'] {
55
+ display: none;
56
+ }
57
+ }
58
+
59
+ .ant-form-vertical .ant-form-item-label {
60
+ padding: 0;
61
+ line-height: 1.2;
62
+ }
63
+
64
+ .ant-input-lg {
65
+ font-size: 12px;
66
+ }
67
+
68
+ .ant-btn-lg {
69
+ height: @input-height-lg;
70
+ }
71
+
72
+ .ant-menu-inline .ant-menu-item {
73
+ margin-top: 0;
74
+ margin-bottom: 0 !important;
75
+ }
76
+
77
+ .ant-modal-header {
78
+ padding: 13px 16px;
79
+ }
80
+
81
+ .ant-modal-body {
82
+ padding: 16px;
83
+ }
84
+
85
+ .ant-btn-primary:focus {
86
+ background-color: white;
87
+ color: @primary-color;
88
+ text-shadow: none;
89
+ }
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,27 @@
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';
25
+ export { default as Area } from './Area';
26
+ export { default as SuperTable2 } from './SuperTable2';
27
+ export { default as SuperTable } from './SuperTable';
package/es/style.less CHANGED
@@ -1 +1,20 @@
1
- @import "./Title/Title.less";
1
+ @import "./adjust.less";
2
+ @import "./Title/Title.less";
3
+ @import "./Search/Search.less";
4
+ @import "./SuperForm/SuperForm.less";
5
+ @import "./SuperTable/SuperTable.less";
6
+ @import "./SuperTable2/SuperTable2.less";
7
+ @import "./Header/Header.less";
8
+ @import "./HomeHeader/Header.less";
9
+ @import "./InputEditor/InputEditor.less";
10
+ @import "./Layout/Layout.less";
11
+ @import "./LayoutLink/LayoutLink.less";
12
+ @import "./Loading/Loading.less";
13
+ @import "./Loading2/Loading2.less";
14
+ @import "./ModalWithDrag/ModalWithDrag.less";
15
+ @import "./Search/Search.less";
16
+ @import "./Sidebar/Sidebar.less";
17
+ @import "./Sidebar2/Sidebar.less";
18
+ @import "./SuperToolbar/SuperToolbar.less";
19
+ @import "./SuperUpload/SuperUpload.less";
20
+ @import "./Viewer/Viewer.less";
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,194 @@
1
+ "use strict";
2
+
3
+ var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
4
+
5
+ var _Object$keys2 = require("@babel/runtime-corejs3/core-js-stable/object/keys");
6
+
7
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
8
+
9
+ var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
10
+
11
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
12
+
13
+ var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
14
+
15
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
16
+
17
+ var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
18
+
19
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
20
+
21
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
22
+
23
+ _Object$defineProperty(exports, "__esModule", {
24
+ value: true
25
+ });
26
+
27
+ exports["default"] = void 0;
28
+
29
+ var _row = _interopRequireDefault(require("antd/lib/row"));
30
+
31
+ var _col = _interopRequireDefault(require("antd/lib/col"));
32
+
33
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
34
+
35
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
36
+
37
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
38
+
39
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
40
+
41
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
42
+
43
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
44
+
45
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
46
+
47
+ var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
48
+
49
+ var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
50
+
51
+ var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
52
+
53
+ var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
54
+
55
+ var _react = _interopRequireDefault(require("react"));
56
+
57
+ var _propTypes = _interopRequireDefault(require("prop-types"));
58
+
59
+ var _helper = _interopRequireDefault(require("../helper"));
60
+
61
+ var _Control = _interopRequireDefault(require("../Control"));
62
+
63
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
64
+
65
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys(Object(source), !0)).call(_context4, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
66
+
67
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
68
+
69
+ 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; } }
70
+
71
+ var PROPS = {
72
+ value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number, _propTypes["default"].object]),
73
+ onChange: _propTypes["default"].func,
74
+ onBlur: _propTypes["default"].func,
75
+ onParentChange: _propTypes["default"].func,
76
+ child: _propTypes["default"].Array
77
+ };
78
+ var PROPS_KEYS = (0, _keys["default"])(PROPS);
79
+
80
+ var Area = /*#__PURE__*/function (_React$Component) {
81
+ (0, _inherits2["default"])(Area, _React$Component);
82
+
83
+ var _super = _createSuper(Area);
84
+
85
+ function Area(props) {
86
+ var _this;
87
+
88
+ (0, _classCallCheck2["default"])(this, Area);
89
+ _this = _super.call(this, props);
90
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (key, keyValue) {
91
+ var _this$props = _this.props,
92
+ onParentChange = _this$props.onParentChange,
93
+ child = _this$props.child,
94
+ value = _this$props.value;
95
+ var newValue = {};
96
+ newValue[key] = keyValue;
97
+ var CheckValue, checkIndex;
98
+ (0, _map["default"])(child).call(child, function (item, index) {
99
+ if (item.key === key) {
100
+ checkIndex = index;
101
+ }
102
+
103
+ CheckValue = index > checkIndex ? '' : value[item.key];
104
+ newValue[item.key] = item.key === key ? keyValue : CheckValue;
105
+ });
106
+
107
+ _this.setState({
108
+ value: _objectSpread(_objectSpread({}, _this.state.value), newValue)
109
+ }, function () {
110
+ return onParentChange && onParentChange(_this.state.value);
111
+ });
112
+ });
113
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onSearch", function (key, control, parentKey, KeyValue) {
114
+ var _this$props2 = _this.props,
115
+ onAreaSearch = _this$props2.onAreaSearch,
116
+ child = _this$props2.child,
117
+ value = _this$props2.value;
118
+ var flag = true;
119
+ (0, _map["default"])(child).call(child, function (item, index) {
120
+ if (item.key === key && index !== 0) {
121
+ var upKey = child[index - 1].key;
122
+
123
+ if (index !== 0 && (_helper["default"].isEmpty2(value[upKey]) || (0, _keys["default"])(value[upKey]).length === 0)) {
124
+ flag = false;
125
+ }
126
+
127
+ ;
128
+ }
129
+ });
130
+ return flag ? onAreaSearch && onAreaSearch(key, KeyValue, parentKey) : _helper["default"].showError('请输入上级选择器');
131
+ });
132
+ _this.state = {
133
+ value: props.value || {},
134
+ options: props.options || {}
135
+ };
136
+ return _this;
137
+ }
138
+
139
+ (0, _createClass2["default"])(Area, [{
140
+ key: "componentWillReceiveProps",
141
+ value: function componentWillReceiveProps(props) {
142
+ if (props.value !== this.props.value) {
143
+ this.setState({
144
+ value: props.value
145
+ });
146
+ }
147
+ }
148
+ }, {
149
+ key: "render",
150
+ value: function render() {
151
+ var _this2 = this;
152
+
153
+ var _this$props3 = this.props,
154
+ child = _this$props3.child,
155
+ parentKey = _this$props3.parentKey,
156
+ _this$props3$options = _this$props3.options,
157
+ options = _this$props3$options === void 0 ? {} : _this$props3$options,
158
+ _this$props3$readonly = _this$props3.readonly,
159
+ readonly = _this$props3$readonly === void 0 ? false : _this$props3$readonly,
160
+ value = _this$props3.value;
161
+ return /*#__PURE__*/_react["default"].createElement(_row["default"], null, (0, _map["default"])(child).call(child, function (item, index) {
162
+ var _context, _context2, _context3;
163
+
164
+ var childOptions = [];
165
+
166
+ if ((0, _includes["default"])(_context = (0, _keys["default"])(options)).call(_context, item.key)) {
167
+ if (index === 0) {
168
+ childOptions = options[item.key];
169
+ } else {
170
+ var upKey = child[index - 1].key;
171
+ childOptions = _helper["default"].isEmpty2(value[upKey]) || (0, _keys["default"])(value[upKey]).length === 0 ? [] : options[item.key];
172
+ }
173
+ }
174
+
175
+ var props = _objectSpread(_objectSpread({}, item), {}, {
176
+ onSearch: (0, _bind["default"])(_context2 = _this2.onSearch).call(_context2, _this2, item.key, item, parentKey),
177
+ onChange: (0, _bind["default"])(_context3 = _this2.onChange).call(_context3, _this2, item.key),
178
+ options: childOptions,
179
+ value: _this2.props.value[item.key].title ? _this2.props.value[item.key].title : _this2.props.value[item.key],
180
+ type: readonly ? 'readonly' : item.type
181
+ });
182
+
183
+ return /*#__PURE__*/_react["default"].createElement(_col["default"], {
184
+ span: 24 / child.length,
185
+ key: item.key
186
+ }, /*#__PURE__*/_react["default"].createElement(_Control["default"], props));
187
+ }));
188
+ }
189
+ }]);
190
+ return Area;
191
+ }(_react["default"].Component);
192
+
193
+ var _default = Area;
194
+ exports["default"] = _default;
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "Area",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./Area.js"
6
+ }
@@ -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
+ }