cloud-b2b 1.1.57 → 1.1.59
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/package.json +44 -22
- package/src/Area/Area.js +94 -0
- package/src/Card/Card.js +16 -0
- package/src/CodeInput/CodeInput.js +76 -0
- package/src/Control/Control.js +338 -0
- package/src/Control/event.js +45 -0
- package/src/Enhance/Dialogs.js +24 -0
- package/src/Enhance/Loading.js +83 -0
- package/{es → src}/Enhance/index.js +8 -6
- package/src/Header/Header.js +149 -0
- package/src/Header/Vertical.js +74 -0
- package/src/ImageView/ImageView.js +62 -0
- package/src/Indent/Indent.js +12 -0
- package/src/InpurCascader/InputCascader.js +83 -0
- package/src/InputEditor/InputEditor.js +93 -0
- package/src/InputSearch/InputSearch.js +186 -0
- package/src/InputSelect/InputSelect.js +103 -0
- package/src/InputTreeSelect/InputTreeSelect.js +87 -0
- package/src/InputWriting/InputWriting.js +65 -0
- package/src/Layout/Layout.js +121 -0
- package/src/LayoutLink/LayoutLink.js +59 -0
- package/src/Link/Link.js +57 -0
- package/src/Loading/Loading.js +15 -0
- package/src/Loading2/Loading2.js +15 -0
- package/src/ModalWithDrag/ModalWithDrag.js +17 -0
- package/{es → src}/ModalWithDrag/drag.js +128 -116
- package/src/NumberInput/NumberInput.js +137 -0
- package/src/Search/Search.js +368 -0
- package/src/Search2/Search.js +436 -0
- package/{lib/Search → src/Search2}/Search.less +65 -63
- package/{lib/Search → src/Search2}/package.json +6 -6
- package/src/Sidebar/Sidebar.js +111 -0
- package/src/Sidebar2/Sidebar.js +143 -0
- package/src/SuperForm/SuperForm.js +519 -0
- package/src/SuperForm2/SuperForm.js +588 -0
- package/src/SuperIcon/SuperIcon.js +14 -0
- package/src/SuperPagination/SuperPagination.js +65 -0
- package/src/SuperTab/SuperTab.js +84 -0
- package/src/SuperTab2/SuperTab2.js +94 -0
- package/src/SuperTable/DragSortRow.js +62 -0
- package/src/SuperTable/FilterDropDown.js +111 -0
- package/src/SuperTable/SuperTable.js +590 -0
- package/src/SuperTable/fixed.js +34 -0
- package/src/SuperTable2/SuperTable2.js +624 -0
- package/src/SuperTable2/SuperTableCell.js +175 -0
- package/src/SuperTable3/FilterDropDown.js +111 -0
- package/src/SuperTable3/SuperTable.js +498 -0
- package/src/SuperTable3/fixed.js +34 -0
- package/src/SuperToolbar/SuperToolbar.js +128 -0
- package/src/SuperUpload/SuperUpload.js +137 -0
- package/src/Title/Title.js +18 -0
- package/src/Viewer/ImageViews.js +220 -0
- package/src/Viewer/Viewer.js +97 -0
- package/src/WingBlank/WingBlank.js +14 -0
- package/src/helper.js +185 -0
- package/{es → src}/history.js +6 -6
- package/src/index.js +39 -0
- package/src/variables.js +5 -0
- package/test/index.html +10 -0
- package/test/test.js +16 -0
- package/test/test.less +12 -0
- package/test/webpack.config.js +71 -0
- package/tools/babel.config.js +14 -0
- package/tools/build.js +70 -0
- package/tools/publish.js +9 -0
- package/tools/util.js +53 -0
- package/es/Area/Area.js +0 -138
- package/es/Card/Card.js +0 -19
- package/es/CodeInput/CodeInput.js +0 -120
- package/es/Control/Control.js +0 -444
- package/es/Control/event.js +0 -43
- package/es/Enhance/Dialogs.js +0 -49
- package/es/Enhance/Loading.js +0 -128
- package/es/Header/Header.js +0 -159
- package/es/Header/Vertical.js +0 -103
- package/es/ImageView/ImageView.js +0 -97
- package/es/Indent/Indent.js +0 -19
- package/es/InpurCascader/InputCascader.js +0 -114
- package/es/InputEditor/InputEditor.js +0 -171
- package/es/InputSearch/InputSearch.js +0 -263
- package/es/InputSelect/InputSelect.js +0 -157
- package/es/InputTreeSelect/InputTreeSelect.js +0 -118
- package/es/InputWriting/InputWriting.js +0 -82
- package/es/Layout/Layout.js +0 -198
- package/es/LayoutLink/LayoutLink.js +0 -73
- package/es/Link/Link.js +0 -82
- package/es/Loading/Loading.js +0 -13
- package/es/Loading2/Loading2.js +0 -9
- package/es/ModalWithDrag/ModalWithDrag.js +0 -29
- package/es/NumberInput/NumberInput.js +0 -197
- package/es/Search/Search.js +0 -494
- package/es/Sidebar/Sidebar.js +0 -141
- package/es/Sidebar2/Sidebar.js +0 -162
- package/es/SuperForm/SuperForm.js +0 -593
- package/es/SuperForm2/SuperForm.js +0 -682
- package/es/SuperIcon/SuperIcon.js +0 -27
- package/es/SuperPagination/SuperPagination.js +0 -106
- package/es/SuperTab/SuperTab.js +0 -104
- package/es/SuperTab2/SuperTab2.js +0 -142
- package/es/SuperTable/DragSortRow.js +0 -94
- package/es/SuperTable/FilterDropDown.js +0 -161
- package/es/SuperTable/SuperTable.js +0 -805
- package/es/SuperTable/fixed.js +0 -34
- package/es/SuperTable2/SuperTable2.js +0 -923
- package/es/SuperTable2/SuperTableCell.js +0 -215
- package/es/SuperTable3/FilterDropDown.js +0 -161
- package/es/SuperTable3/SuperTable.js +0 -662
- package/es/SuperTable3/fixed.js +0 -34
- package/es/SuperToolbar/SuperToolbar.js +0 -192
- package/es/SuperUpload/SuperUpload.js +0 -356
- package/es/Title/Title.js +0 -33
- package/es/Viewer/ImageViews.js +0 -255
- package/es/Viewer/Viewer.js +0 -119
- package/es/WingBlank/WingBlank.js +0 -16
- package/es/helper.js +0 -241
- package/es/index.js +0 -37
- package/es/variables.js +0 -6
- package/lib/Area/Area.js +0 -146
- package/lib/Area/package.json +0 -6
- package/lib/Card/Card.js +0 -27
- package/lib/Card/package.json +0 -6
- package/lib/CodeInput/CodeInput.js +0 -128
- package/lib/CodeInput/package.json +0 -6
- package/lib/Control/Control.js +0 -450
- package/lib/Control/event.js +0 -51
- package/lib/Control/package.json +0 -6
- package/lib/Enhance/Dialogs.js +0 -57
- package/lib/Enhance/Loading.js +0 -135
- package/lib/Enhance/index.js +0 -25
- package/lib/Enhance/package.json +0 -6
- package/lib/Header/Header.js +0 -166
- package/lib/Header/Header.less +0 -95
- package/lib/Header/Vertical.js +0 -111
- package/lib/Header/Vertical.less +0 -60
- package/lib/Header/package.json +0 -6
- package/lib/ImageView/ImageView.js +0 -105
- package/lib/ImageView/ImageView.less +0 -14
- package/lib/ImageView/package.json +0 -6
- package/lib/Indent/Indent.js +0 -27
- package/lib/Indent/package.json +0 -6
- package/lib/InpurCascader/InputCascader.js +0 -121
- package/lib/InpurCascader/package.json +0 -6
- package/lib/InputEditor/InputEditor.js +0 -179
- package/lib/InputEditor/inputEditor.less +0 -8
- package/lib/InputEditor/package.json +0 -6
- package/lib/InputSearch/InputSearch.js +0 -271
- package/lib/InputSearch/package.json +0 -6
- package/lib/InputSelect/InputSelect.js +0 -165
- package/lib/InputSelect/package.json +0 -6
- package/lib/InputTreeSelect/InputTreeSelect.js +0 -125
- package/lib/InputTreeSelect/package.json +0 -6
- package/lib/InputWriting/InputWriting.js +0 -90
- package/lib/InputWriting/package.json +0 -6
- package/lib/Layout/Layout.js +0 -206
- package/lib/Layout/Layout.less +0 -28
- package/lib/Layout/package.json +0 -6
- package/lib/LayoutLink/LayoutLink.js +0 -85
- package/lib/LayoutLink/LayoutLink.less +0 -53
- package/lib/LayoutLink/package.json +0 -6
- package/lib/Link/Link.js +0 -90
- package/lib/Link/package.json +0 -6
- package/lib/Loading/Loading.js +0 -21
- package/lib/Loading/Loading.less +0 -13
- package/lib/Loading/package.json +0 -6
- package/lib/Loading2/Loading2.js +0 -17
- package/lib/Loading2/Loading2.less +0 -19
- package/lib/Loading2/package.json +0 -6
- package/lib/ModalWithDrag/ModalWithDrag.js +0 -37
- package/lib/ModalWithDrag/ModalWithDrag.less +0 -6
- package/lib/ModalWithDrag/drag.js +0 -124
- package/lib/ModalWithDrag/package.json +0 -6
- package/lib/NumberInput/NumberInput.js +0 -205
- package/lib/NumberInput/package.json +0 -6
- package/lib/Search/Search.js +0 -506
- package/lib/Sidebar/Sidebar.js +0 -149
- package/lib/Sidebar/Sidebar.less +0 -78
- package/lib/Sidebar/package.json +0 -6
- package/lib/Sidebar2/Sidebar.js +0 -170
- package/lib/Sidebar2/Sidebar.less +0 -153
- package/lib/Sidebar2/package.json +0 -6
- package/lib/SuperForm/SuperForm.js +0 -604
- package/lib/SuperForm/SuperForm.less +0 -52
- package/lib/SuperForm/package.json +0 -6
- package/lib/SuperForm2/SuperForm.js +0 -693
- package/lib/SuperForm2/SuperForm.less +0 -52
- package/lib/SuperForm2/package.json +0 -6
- package/lib/SuperIcon/SuperIcon.js +0 -35
- package/lib/SuperIcon/package.json +0 -6
- package/lib/SuperPagination/SuperPagination.js +0 -114
- package/lib/SuperPagination/package.json +0 -6
- package/lib/SuperTab/SuperTab.js +0 -112
- package/lib/SuperTab/SuperTab.less +0 -43
- package/lib/SuperTab/package.json +0 -6
- package/lib/SuperTab2/SuperTab2.js +0 -150
- package/lib/SuperTab2/SuperTab2.less +0 -18
- package/lib/SuperTab2/package.json +0 -6
- package/lib/SuperTable/DragSortRow.js +0 -102
- package/lib/SuperTable/DragSortRow.less +0 -17
- package/lib/SuperTable/FilterDropDown.js +0 -169
- package/lib/SuperTable/FilterDropDown.less +0 -30
- package/lib/SuperTable/SuperTable.js +0 -813
- package/lib/SuperTable/SuperTable.less +0 -132
- package/lib/SuperTable/fixed.js +0 -42
- package/lib/SuperTable/package.json +0 -6
- package/lib/SuperTable2/SuperTable2.js +0 -935
- package/lib/SuperTable2/SuperTable2.less +0 -118
- package/lib/SuperTable2/SuperTableCell.js +0 -220
- package/lib/SuperTable2/package.json +0 -6
- package/lib/SuperTable3/FilterDropDown.js +0 -169
- package/lib/SuperTable3/FilterDropDown.less +0 -29
- package/lib/SuperTable3/SuperTable.js +0 -670
- package/lib/SuperTable3/SuperTable.less +0 -99
- package/lib/SuperTable3/fixed.js +0 -42
- package/lib/SuperTable3/package.json +0 -6
- package/lib/SuperToolbar/SuperToolbar.js +0 -200
- package/lib/SuperToolbar/SuperToolbar.less +0 -17
- package/lib/SuperToolbar/package.json +0 -6
- package/lib/SuperUpload/SuperUpload.js +0 -367
- package/lib/SuperUpload/SuperUpload.less +0 -28
- package/lib/SuperUpload/package.json +0 -6
- package/lib/Title/Title.js +0 -41
- package/lib/Title/Title.less +0 -35
- package/lib/Title/package.json +0 -6
- package/lib/Viewer/ImageViews.js +0 -263
- package/lib/Viewer/Viewer.js +0 -127
- package/lib/Viewer/Viewer.less +0 -67
- package/lib/Viewer/imgView.less +0 -59
- package/lib/Viewer/package.json +0 -7
- package/lib/WingBlank/WingBlank.js +0 -24
- package/lib/WingBlank/WingBlank.less +0 -12
- package/lib/WingBlank/package.json +0 -6
- package/lib/adjust.less +0 -89
- package/lib/helper.js +0 -247
- package/lib/history.js +0 -12
- package/lib/index.js +0 -271
- package/lib/index.less +0 -31
- package/lib/style.less +0 -30
- package/lib/variables.js +0 -14
- package/lib/variables.less +0 -73
- /package/{es → src}/Area/package.json +0 -0
- /package/{es → src}/Card/package.json +0 -0
- /package/{es → src}/CodeInput/package.json +0 -0
- /package/{es → src}/Control/package.json +0 -0
- /package/{es → src}/Enhance/package.json +0 -0
- /package/{es → src}/Header/Header.less +0 -0
- /package/{es → src}/Header/Vertical.less +0 -0
- /package/{es → src}/Header/package.json +0 -0
- /package/{es → src}/ImageView/ImageView.less +0 -0
- /package/{es → src}/ImageView/package.json +0 -0
- /package/{es → src}/Indent/package.json +0 -0
- /package/{es → src}/InpurCascader/package.json +0 -0
- /package/{es → src}/InputEditor/inputEditor.less +0 -0
- /package/{es → src}/InputEditor/package.json +0 -0
- /package/{es → src}/InputSearch/package.json +0 -0
- /package/{es → src}/InputSelect/package.json +0 -0
- /package/{es → src}/InputTreeSelect/package.json +0 -0
- /package/{es → src}/InputWriting/package.json +0 -0
- /package/{es → src}/Layout/Layout.less +0 -0
- /package/{es → src}/Layout/package.json +0 -0
- /package/{es → src}/LayoutLink/LayoutLink.less +0 -0
- /package/{es → src}/LayoutLink/package.json +0 -0
- /package/{es → src}/Link/package.json +0 -0
- /package/{es → src}/Loading/Loading.less +0 -0
- /package/{es → src}/Loading/package.json +0 -0
- /package/{es → src}/Loading2/Loading2.less +0 -0
- /package/{es → src}/Loading2/package.json +0 -0
- /package/{es → src}/ModalWithDrag/ModalWithDrag.less +0 -0
- /package/{es → src}/ModalWithDrag/package.json +0 -0
- /package/{es → src}/NumberInput/package.json +0 -0
- /package/{es → src}/Search/Search.less +0 -0
- /package/{es → src}/Search/package.json +0 -0
- /package/{es → src}/Sidebar/Sidebar.less +0 -0
- /package/{es → src}/Sidebar/package.json +0 -0
- /package/{es → src}/Sidebar2/Sidebar.less +0 -0
- /package/{es → src}/Sidebar2/package.json +0 -0
- /package/{es → src}/SuperForm/SuperForm.less +0 -0
- /package/{es → src}/SuperForm/package.json +0 -0
- /package/{es → src}/SuperForm2/SuperForm.less +0 -0
- /package/{es → src}/SuperForm2/package.json +0 -0
- /package/{es → src}/SuperIcon/package.json +0 -0
- /package/{es → src}/SuperPagination/package.json +0 -0
- /package/{es → src}/SuperTab/SuperTab.less +0 -0
- /package/{es → src}/SuperTab/package.json +0 -0
- /package/{es → src}/SuperTab2/SuperTab2.less +0 -0
- /package/{es → src}/SuperTab2/package.json +0 -0
- /package/{es → src}/SuperTable/DragSortRow.less +0 -0
- /package/{es → src}/SuperTable/FilterDropDown.less +0 -0
- /package/{es → src}/SuperTable/SuperTable.less +0 -0
- /package/{es → src}/SuperTable/package.json +0 -0
- /package/{es → src}/SuperTable2/SuperTable2.less +0 -0
- /package/{es → src}/SuperTable2/package.json +0 -0
- /package/{es → src}/SuperTable3/FilterDropDown.less +0 -0
- /package/{es → src}/SuperTable3/SuperTable.less +0 -0
- /package/{es → src}/SuperTable3/package.json +0 -0
- /package/{es → src}/SuperToolbar/SuperToolbar.less +0 -0
- /package/{es → src}/SuperToolbar/package.json +0 -0
- /package/{es → src}/SuperUpload/SuperUpload.less +0 -0
- /package/{es → src}/SuperUpload/package.json +0 -0
- /package/{es → src}/Title/Title.less +0 -0
- /package/{es → src}/Title/package.json +0 -0
- /package/{es → src}/Viewer/Viewer.less +0 -0
- /package/{es → src}/Viewer/imgView.less +0 -0
- /package/{es → src}/Viewer/package.json +0 -0
- /package/{es → src}/WingBlank/WingBlank.less +0 -0
- /package/{es → src}/WingBlank/package.json +0 -0
- /package/{es → src}/adjust.less +0 -0
- /package/{es → src}/style.less +0 -0
- /package/{es → src}/variables.less +0 -0
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
-
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
5
|
-
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
6
|
-
var _filterInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
7
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
8
|
-
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
9
|
-
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
10
|
-
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
11
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
12
|
-
var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
|
13
|
-
var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
|
|
14
|
-
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
15
|
-
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
16
|
-
var _Array$isArray = require("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
17
|
-
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
18
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
19
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
exports["default"] = void 0;
|
|
23
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
|
|
24
|
-
var _upload = _interopRequireDefault(require("antd/lib/upload"));
|
|
25
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
|
26
|
-
var _button = _interopRequireDefault(require("antd/lib/button"));
|
|
27
|
-
var _icon = _interopRequireDefault(require("antd/lib/icon"));
|
|
28
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
29
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
30
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
31
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
32
|
-
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
33
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
34
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
35
|
-
var _helper = _interopRequireDefault(require("../helper"));
|
|
36
|
-
var _Title = _interopRequireDefault(require("../Title"));
|
|
37
|
-
var _variables = _interopRequireDefault(require("../variables"));
|
|
38
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t6 in e) "default" !== _t6 && {}.hasOwnProperty.call(e, _t6) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t6)) && (i.get || i.set) ? o(f, _t6, i) : f[_t6] = e[_t6]); return f; })(e, t); }
|
|
39
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (_Array$isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
40
|
-
function _unsupportedIterableToArray(r, a) { if (r) { var _context7; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context7 = {}.toString.call(r)).call(_context7, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
41
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
42
|
-
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
43
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
44
|
-
var FORMATS = ['image/jpeg', 'image/gif', 'image/bmp', 'image/jpg', 'image/png', 'image/tiff', 'image/gif', 'image/pcx', 'image/tga', 'image/exif', 'image/fpx', 'image/svg', 'image/psd', 'image/cdr', 'image/pcd', 'image/dxf', 'image/ufo', 'image/eps', 'image/ai', 'image/raw', 'image/WMF', 'video/mp4'];
|
|
45
|
-
var FORMATS1 = ['.jpeg', '.gif', '.bmp', '.jpg', '.png', '.tiff', '.pcx', '.tga', '.exif', '.fpx', '.svg', '.psd', '.cdr', '.pcd', '.dxf', '.ufo', '.eps', '.ai', '.raw', '.WMF'];
|
|
46
|
-
|
|
47
|
-
//组件属性定义
|
|
48
|
-
var propTypes = {
|
|
49
|
-
fileList: _propTypes["default"].array,
|
|
50
|
-
//文件列表
|
|
51
|
-
fileDeleteList: _propTypes["default"].array,
|
|
52
|
-
//需要在页面关闭时删除的服务端文件
|
|
53
|
-
title: _propTypes["default"].string,
|
|
54
|
-
//附件组的标题
|
|
55
|
-
required: _propTypes["default"].bool,
|
|
56
|
-
//是否必须上传,默认false
|
|
57
|
-
listType: _propTypes["default"].oneOf['text', 'picture', 'picture-card'],
|
|
58
|
-
//上传列表的内建样式,支持三种,默认picture-card
|
|
59
|
-
readonly: _propTypes["default"].bool,
|
|
60
|
-
//所在页面是否只读,默认false
|
|
61
|
-
multiple: _propTypes["default"].bool,
|
|
62
|
-
//可否多选文件上传,默认true
|
|
63
|
-
limitNumber: _propTypes["default"].number,
|
|
64
|
-
//附件限制个数,默认10
|
|
65
|
-
limitText: _propTypes["default"].any,
|
|
66
|
-
//附件个数达到时的文本,或者设置为false则不显示,为true时显示默认文本,默认值true
|
|
67
|
-
limitSize: _propTypes["default"].number,
|
|
68
|
-
//单个附件限制大小,单位M,默认5
|
|
69
|
-
buttonTitle: _propTypes["default"].string,
|
|
70
|
-
//上传按钮的标题,默认‘上传’
|
|
71
|
-
onFileChange: _propTypes["default"].func //文件变更的回掉函数,func({fileList, fileDeleteList})
|
|
72
|
-
};
|
|
73
|
-
var convertFileList = function convertFileList(fileList) {
|
|
74
|
-
return (0, _map["default"])(fileList).call(fileList, function (item) {
|
|
75
|
-
return {
|
|
76
|
-
fileFormat: item.fileFormat || 'id',
|
|
77
|
-
fileName: item.name,
|
|
78
|
-
fileUrl: item.response ? item.response.result : ''
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
var getUploadProps = function getUploadProps(props, onPreview, fileList, setFileList) {
|
|
83
|
-
var _props$readonly = props.readonly,
|
|
84
|
-
readonly = _props$readonly === void 0 ? false : _props$readonly,
|
|
85
|
-
_props$multiple = props.multiple,
|
|
86
|
-
multiple = _props$multiple === void 0 ? true : _props$multiple,
|
|
87
|
-
_props$limitSize = props.limitSize,
|
|
88
|
-
limitSize = _props$limitSize === void 0 ? 5 : _props$limitSize,
|
|
89
|
-
_props$listType = props.listType,
|
|
90
|
-
listType = _props$listType === void 0 ? 'picture-card' : _props$listType,
|
|
91
|
-
_props$fileDeleteList = props.fileDeleteList,
|
|
92
|
-
fileDeleteList = _props$fileDeleteList === void 0 ? [] : _props$fileDeleteList,
|
|
93
|
-
onFileChange = props.onFileChange;
|
|
94
|
-
var onChange = function onChange(_ref) {
|
|
95
|
-
var file = _ref.file,
|
|
96
|
-
fileList = _ref.fileList;
|
|
97
|
-
var limitNumber = props.limitNumber;
|
|
98
|
-
if (fileList.length > limitNumber) return _helper["default"].showError("\u6587\u4EF6\u6700\u591A\u53EF\u4E0A\u4F20".concat(limitNumber, "\u4E2A"));
|
|
99
|
-
if (!file) return; //过滤掉不符合条件的响应
|
|
100
|
-
var newList = [];
|
|
101
|
-
if (file.response && file.response.returnCode !== 0) {
|
|
102
|
-
//检查是否上传到文件服务器成功
|
|
103
|
-
_helper["default"].showError("\u4E0A\u4F20\u5931\u8D25\uFF0C".concat(file.response.returnMsg || ''));
|
|
104
|
-
newList = (0, _filter["default"])(fileList).call(fileList, function (item) {
|
|
105
|
-
return item.uid !== file.uid;
|
|
106
|
-
});
|
|
107
|
-
} else {
|
|
108
|
-
var _context;
|
|
109
|
-
newList = (0, _map["default"])(_context = (0, _filter["default"])(fileList).call(fileList, function (item) {
|
|
110
|
-
return item.status;
|
|
111
|
-
})).call(_context, function (item) {
|
|
112
|
-
return (0, _indexOf["default"])(FORMATS).call(FORMATS, item.type) === -1 ? _objectSpread(_objectSpread({}, item), {}, {
|
|
113
|
-
thumbUrl: '/default.png'
|
|
114
|
-
}) : item;
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
file.response && onFileChange && onFileChange({
|
|
118
|
-
fileList: convertFileList(newList),
|
|
119
|
-
fileDeleteList: fileDeleteList
|
|
120
|
-
});
|
|
121
|
-
newList.fileName = newList.name;
|
|
122
|
-
setFileList(newList);
|
|
123
|
-
};
|
|
124
|
-
var onRemove = /*#__PURE__*/function () {
|
|
125
|
-
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(fileRemove) {
|
|
126
|
-
return _regenerator["default"].wrap(function (_context2) {
|
|
127
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
128
|
-
case 0:
|
|
129
|
-
props.onRemove && props.onRemove(fileRemove, fileList, fileDeleteList);
|
|
130
|
-
case 1:
|
|
131
|
-
case "end":
|
|
132
|
-
return _context2.stop();
|
|
133
|
-
}
|
|
134
|
-
}, _callee);
|
|
135
|
-
}));
|
|
136
|
-
return function onRemove(_x) {
|
|
137
|
-
return _ref2.apply(this, arguments);
|
|
138
|
-
};
|
|
139
|
-
}();
|
|
140
|
-
return {
|
|
141
|
-
action: props.action || '/api/proxy/zuul/archiver-service/file/upload/document',
|
|
142
|
-
fileList: fileList,
|
|
143
|
-
listType: listType,
|
|
144
|
-
multiple: multiple,
|
|
145
|
-
onChange: onChange,
|
|
146
|
-
onRemove: onRemove,
|
|
147
|
-
onPreview: listType === 'text' ? undefined : onPreview,
|
|
148
|
-
beforeUpload: function beforeUpload(currentFile) {
|
|
149
|
-
var isLt = currentFile.size / 1024 / 1024 < limitSize; // 附件大小限制,单位M
|
|
150
|
-
if (!isLt) {
|
|
151
|
-
_helper["default"].showError("\u9644\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(limitSize, "M"));
|
|
152
|
-
}
|
|
153
|
-
return isLt;
|
|
154
|
-
},
|
|
155
|
-
showUploadList: {
|
|
156
|
-
showPreviewIcon: listType !== 'text',
|
|
157
|
-
showRemoveIcon: !readonly,
|
|
158
|
-
showDownloadIcon: true
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
function UploadButton(_ref3) {
|
|
163
|
-
var _ref3$buttonLabel = _ref3.buttonLabel,
|
|
164
|
-
buttonLabel = _ref3$buttonLabel === void 0 ? '上传' : _ref3$buttonLabel,
|
|
165
|
-
_ref3$title = _ref3.title,
|
|
166
|
-
title = _ref3$title === void 0 ? '附件' : _ref3$title,
|
|
167
|
-
_ref3$required = _ref3.required,
|
|
168
|
-
required = _ref3$required === void 0 ? false : _ref3$required,
|
|
169
|
-
_ref3$fileList = _ref3.fileList,
|
|
170
|
-
fileList = _ref3$fileList === void 0 ? [] : _ref3$fileList,
|
|
171
|
-
_ref3$limitText = _ref3.limitText,
|
|
172
|
-
limitText = _ref3$limitText === void 0 ? true : _ref3$limitText,
|
|
173
|
-
_ref3$limitNumber = _ref3.limitNumber,
|
|
174
|
-
limitNumber = _ref3$limitNumber === void 0 ? 10 : _ref3$limitNumber,
|
|
175
|
-
_ref3$listType = _ref3.listType,
|
|
176
|
-
listType = _ref3$listType === void 0 ? 'picture-card' : _ref3$listType,
|
|
177
|
-
_ref3$needText = _ref3.needText,
|
|
178
|
-
needText = _ref3$needText === void 0 ? false : _ref3$needText,
|
|
179
|
-
_ref3$remark = _ref3.remark,
|
|
180
|
-
remark = _ref3$remark === void 0 ? '大小>=5M' : _ref3$remark;
|
|
181
|
-
var canUpload = fileList.length < limitNumber;
|
|
182
|
-
return canUpload ? listType === 'picture-card' ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
183
|
-
type: "plus"
|
|
184
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
185
|
-
className: "ant-upload-text"
|
|
186
|
-
}, "Upload")) : /*#__PURE__*/_react["default"].createElement(_Title["default"], {
|
|
187
|
-
title: title,
|
|
188
|
-
required: required
|
|
189
|
-
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
190
|
-
size: "small",
|
|
191
|
-
style: {
|
|
192
|
-
marginLeft: '-10px'
|
|
193
|
-
}
|
|
194
|
-
}, buttonLabel)) : listType === 'picture-card' ? null : /*#__PURE__*/_react["default"].createElement(_Title["default"], {
|
|
195
|
-
title: title,
|
|
196
|
-
required: required
|
|
197
|
-
}, !limitText ? null : /*#__PURE__*/_react["default"].createElement("span", null, limitText === true ? "\u9644\u4EF6\u4E2A\u6570\u82E5\u5927\u4E8E".concat(limitNumber, "\u4E2A\u8BF7\u538B\u7F29\u540E\u4E0A\u4F20") : limitText));
|
|
198
|
-
}
|
|
199
|
-
function SuperUpload(props) {
|
|
200
|
-
var _useState = (0, _react.useState)(true),
|
|
201
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
202
|
-
loading = _useState2[0],
|
|
203
|
-
setLoading = _useState2[1];
|
|
204
|
-
var _useState3 = (0, _react.useState)([]),
|
|
205
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
206
|
-
fileList = _useState4[0],
|
|
207
|
-
setFileList = _useState4[1];
|
|
208
|
-
var initFileList = [];
|
|
209
|
-
(0, _react.useEffect)(function () {
|
|
210
|
-
function fetchImgData() {
|
|
211
|
-
return _fetchImgData.apply(this, arguments);
|
|
212
|
-
}
|
|
213
|
-
function _fetchImgData() {
|
|
214
|
-
_fetchImgData = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
215
|
-
var _iterator, _step, item, _iterator2, _step2, _item, _t, _t2, _t3, _t4, _t5;
|
|
216
|
-
return _regenerator["default"].wrap(function (_context3) {
|
|
217
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
218
|
-
case 0:
|
|
219
|
-
if (!(props.fileList.length > 0 || fileList.length > 0)) {
|
|
220
|
-
_context3.next = 24;
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
223
|
-
_iterator = _createForOfIteratorHelper(props.fileList);
|
|
224
|
-
_context3.prev = 1;
|
|
225
|
-
_iterator.s();
|
|
226
|
-
case 2:
|
|
227
|
-
if ((_step = _iterator.n()).done) {
|
|
228
|
-
_context3.next = 11;
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
item = _step.value;
|
|
232
|
-
if (!(item.fileUrl == '')) {
|
|
233
|
-
_context3.next = 6;
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
if (!props.getFileList) {
|
|
237
|
-
_context3.next = 4;
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
_context3.next = 3;
|
|
241
|
-
return props.getFileList(fileList);
|
|
242
|
-
case 3:
|
|
243
|
-
_t = _context3.sent;
|
|
244
|
-
_context3.next = 5;
|
|
245
|
-
break;
|
|
246
|
-
case 4:
|
|
247
|
-
_t = [];
|
|
248
|
-
case 5:
|
|
249
|
-
initFileList = _t;
|
|
250
|
-
_context3.next = 10;
|
|
251
|
-
break;
|
|
252
|
-
case 6:
|
|
253
|
-
if (!props.getFileList) {
|
|
254
|
-
_context3.next = 8;
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
_context3.next = 7;
|
|
258
|
-
return props.getFileList(props.fileList);
|
|
259
|
-
case 7:
|
|
260
|
-
_t2 = _context3.sent;
|
|
261
|
-
_context3.next = 9;
|
|
262
|
-
break;
|
|
263
|
-
case 8:
|
|
264
|
-
_t2 = [];
|
|
265
|
-
case 9:
|
|
266
|
-
initFileList = _t2;
|
|
267
|
-
case 10:
|
|
268
|
-
_context3.next = 2;
|
|
269
|
-
break;
|
|
270
|
-
case 11:
|
|
271
|
-
_context3.next = 13;
|
|
272
|
-
break;
|
|
273
|
-
case 12:
|
|
274
|
-
_context3.prev = 12;
|
|
275
|
-
_t3 = _context3["catch"](1);
|
|
276
|
-
_iterator.e(_t3);
|
|
277
|
-
case 13:
|
|
278
|
-
_context3.prev = 13;
|
|
279
|
-
_iterator.f();
|
|
280
|
-
return _context3.finish(13);
|
|
281
|
-
case 14:
|
|
282
|
-
_iterator2 = _createForOfIteratorHelper(fileList);
|
|
283
|
-
_context3.prev = 15;
|
|
284
|
-
_iterator2.s();
|
|
285
|
-
case 16:
|
|
286
|
-
if ((_step2 = _iterator2.n()).done) {
|
|
287
|
-
_context3.next = 21;
|
|
288
|
-
break;
|
|
289
|
-
}
|
|
290
|
-
_item = _step2.value;
|
|
291
|
-
if (!props.getFileList) {
|
|
292
|
-
_context3.next = 18;
|
|
293
|
-
break;
|
|
294
|
-
}
|
|
295
|
-
_context3.next = 17;
|
|
296
|
-
return props.getFileList(fileList);
|
|
297
|
-
case 17:
|
|
298
|
-
_t4 = _context3.sent;
|
|
299
|
-
_context3.next = 19;
|
|
300
|
-
break;
|
|
301
|
-
case 18:
|
|
302
|
-
_t4 = [];
|
|
303
|
-
case 19:
|
|
304
|
-
initFileList = _t4;
|
|
305
|
-
case 20:
|
|
306
|
-
_context3.next = 16;
|
|
307
|
-
break;
|
|
308
|
-
case 21:
|
|
309
|
-
_context3.next = 23;
|
|
310
|
-
break;
|
|
311
|
-
case 22:
|
|
312
|
-
_context3.prev = 22;
|
|
313
|
-
_t5 = _context3["catch"](15);
|
|
314
|
-
_iterator2.e(_t5);
|
|
315
|
-
case 23:
|
|
316
|
-
_context3.prev = 23;
|
|
317
|
-
_iterator2.f();
|
|
318
|
-
return _context3.finish(23);
|
|
319
|
-
case 24:
|
|
320
|
-
//const initFileList = props.getFileList ? await props.getFileList(props.fileList) : [];
|
|
321
|
-
setFileList(initFileList ? initFileList : []);
|
|
322
|
-
setLoading(false);
|
|
323
|
-
case 25:
|
|
324
|
-
case "end":
|
|
325
|
-
return _context3.stop();
|
|
326
|
-
}
|
|
327
|
-
}, _callee2, null, [[1, 12, 13, 14], [15, 22, 23, 24]]);
|
|
328
|
-
}));
|
|
329
|
-
return _fetchImgData.apply(this, arguments);
|
|
330
|
-
}
|
|
331
|
-
fetchImgData();
|
|
332
|
-
}, [props.fileList]);
|
|
333
|
-
var onPreview = /*#__PURE__*/function () {
|
|
334
|
-
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(file) {
|
|
335
|
-
return _regenerator["default"].wrap(function (_context4) {
|
|
336
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
337
|
-
case 0:
|
|
338
|
-
props.onPreview && props.onPreview(file, fileList);
|
|
339
|
-
case 1:
|
|
340
|
-
case "end":
|
|
341
|
-
return _context4.stop();
|
|
342
|
-
}
|
|
343
|
-
}, _callee3);
|
|
344
|
-
}));
|
|
345
|
-
return function onPreview(_x2) {
|
|
346
|
-
return _ref4.apply(this, arguments);
|
|
347
|
-
};
|
|
348
|
-
}();
|
|
349
|
-
var uploadProps = getUploadProps(props, onPreview, fileList, setFileList);
|
|
350
|
-
var _props$listType2 = props.listType,
|
|
351
|
-
listType = _props$listType2 === void 0 ? 'picture-card' : _props$listType2,
|
|
352
|
-
_props$limitNumber = props.limitNumber,
|
|
353
|
-
limitNumber = _props$limitNumber === void 0 ? 10 : _props$limitNumber,
|
|
354
|
-
readonly = props.readonly,
|
|
355
|
-
title = props.title;
|
|
356
|
-
var className = listType === 'picture-card' && (fileList === null || fileList === void 0 ? void 0 : fileList.length) < limitNumber ? (0, _variables["default"])('SuperUpload') : (0, _variables["default"])('SuperUpload2');
|
|
357
|
-
var canUpload = (fileList === null || fileList === void 0 ? void 0 : fileList.length) >= limitNumber;
|
|
358
|
-
return loading ? /*#__PURE__*/_react["default"].createElement("div", null, "loading...") : /*#__PURE__*/_react["default"].createElement("div", {
|
|
359
|
-
className: className
|
|
360
|
-
}, (listType === 'picture-card' || readonly) && title ? /*#__PURE__*/_react["default"].createElement(_Title["default"], {
|
|
361
|
-
title: props.title || '附件',
|
|
362
|
-
required: props.required
|
|
363
|
-
}) : null, /*#__PURE__*/_react["default"].createElement(_upload["default"], uploadProps, readonly || canUpload ? null : /*#__PURE__*/_react["default"].createElement(UploadButton, _objectSpread(_objectSpread({}, props), {}, {
|
|
364
|
-
fileList: fileList
|
|
365
|
-
}))), props.needText ? /*#__PURE__*/_react["default"].createElement("span", null, props.remark) : null);
|
|
366
|
-
}
|
|
367
|
-
var _default = exports["default"] = SuperUpload;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperUpload{
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
|
|
6
|
-
:global(.ant-upload-list-item) {
|
|
7
|
-
display: inline-block;
|
|
8
|
-
margin: 10px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:global(.ant-upload-select-picture-card) {
|
|
12
|
-
margin: 10px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.@{cloudlink-prefix}-SuperUpload2 {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
|
|
19
|
-
:global(.ant-upload-list-item) {
|
|
20
|
-
display: inline-block;
|
|
21
|
-
margin: 10px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:global(.ant-upload-select-picture-card) {
|
|
25
|
-
margin: 10px;
|
|
26
|
-
display: none !important;
|
|
27
|
-
}
|
|
28
|
-
}
|
package/lib/Title/Title.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
11
|
-
var _icon = _interopRequireDefault(require("antd/lib/icon"));
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
|
13
|
-
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
var _variables = _interopRequireDefault(require("../variables"));
|
|
15
|
-
var _excluded = ["title", "children", "className", "required", "fold", "isFold", "noBorder", "onFold"];
|
|
16
|
-
function Title(_ref) {
|
|
17
|
-
var title = _ref.title,
|
|
18
|
-
children = _ref.children,
|
|
19
|
-
className = _ref.className,
|
|
20
|
-
_ref$required = _ref.required,
|
|
21
|
-
required = _ref$required === void 0 ? false : _ref$required,
|
|
22
|
-
_ref$fold = _ref.fold,
|
|
23
|
-
fold = _ref$fold === void 0 ? false : _ref$fold,
|
|
24
|
-
_ref$isFold = _ref.isFold,
|
|
25
|
-
isFold = _ref$isFold === void 0 ? false : _ref$isFold,
|
|
26
|
-
_ref$noBorder = _ref.noBorder,
|
|
27
|
-
noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder,
|
|
28
|
-
onFold = _ref.onFold,
|
|
29
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
30
|
-
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
31
|
-
className: (0, _variables["default"])('title')
|
|
32
|
-
}, props), /*#__PURE__*/_react["default"].createElement("span", {
|
|
33
|
-
"data-border": !noBorder,
|
|
34
|
-
"data-fold": fold,
|
|
35
|
-
"data-required": required,
|
|
36
|
-
onClick: fold && onFold ? (0, _bind["default"])(onFold).call(onFold, null, !isFold) : undefined
|
|
37
|
-
}, title, fold ? /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
38
|
-
type: isFold ? 'down' : 'up'
|
|
39
|
-
}) : null), isFold ? null : children);
|
|
40
|
-
}
|
|
41
|
-
var _default = exports["default"] = Title;
|
package/lib/Title/Title.less
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
@import '../variables';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-title {
|
|
4
|
-
> *:first-child {
|
|
5
|
-
display: inline-block;
|
|
6
|
-
color: @brand-primary;
|
|
7
|
-
line-height: 1.2;
|
|
8
|
-
|
|
9
|
-
&[data-border='true'] {
|
|
10
|
-
padding: 0 5px;
|
|
11
|
-
border-left: @brand-primary solid 3px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&[data-fold='true'] {
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
margin: 8px 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&[data-required='true'] {
|
|
20
|
-
&::after {
|
|
21
|
-
display: inline-block;
|
|
22
|
-
margin-left: 4px;
|
|
23
|
-
color: #f5222d;
|
|
24
|
-
font-size: 12px;
|
|
25
|
-
font-family: SimSun, sans-serif;
|
|
26
|
-
line-height: 1;
|
|
27
|
-
content: '*';
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
> [role = 'toolbar'] {
|
|
33
|
-
display: inline-block;
|
|
34
|
-
}
|
|
35
|
-
}
|