@luck-design-biz/luckda 1.0.0-alpha → 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.
- package/es/components/Builder/index.js +15 -3
- package/es/components/ComplexItem/index.js +65 -49
- package/es/components/LdAutoForm/index.js +4 -3
- package/es/components/LdFormList/index.js +3 -6
- package/es/components/LdGridForm/index.js +2 -1
- package/es/helper/form.js +1 -0
- package/es/helper/ldBuilder.js +8 -3
- package/es/locales/zh-CN.js +38 -4
- package/es/lowcode/constants/event-topics.js +0 -2
- package/es/lowcode/engine/launcher.js +3 -1
- package/es/lowcode/engine/meta/box.props.json +3 -3
- package/es/lowcode/engine/meta/button.props.default.json +1 -1
- package/es/lowcode/engine/meta/button.props.json +2 -2
- package/es/lowcode/engine/meta/dialog.props.json +2 -2
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +7 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +2 -0
- package/es/lowcode/engine/meta/fielddate.props.json +4 -2
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +3 -2
- package/es/lowcode/engine/meta/fielduser.props.default.json +1 -1
- package/es/lowcode/engine/meta/fielduser.props.json +1 -1
- package/es/lowcode/engine/meta/form.props.default.json +0 -1
- package/es/lowcode/engine/meta/form.props.json +4 -5
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/es/lowcode/engine/meta/iframe.props.json +1 -1
- package/es/lowcode/engine/meta/image.props.default.json +1 -1
- package/es/lowcode/engine/meta/image.props.json +1 -1
- package/es/lowcode/engine/meta/imex.props.default.json +2 -1
- package/es/lowcode/engine/meta/imex.props.json +26 -5
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +38 -20
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/es/lowcode/engine/meta/jsx.props.json +1 -1
- package/es/lowcode/engine/meta/layout.props.default.json +1 -1
- package/es/lowcode/engine/meta/layout.props.json +5 -5
- package/es/lowcode/engine/meta/link.props.default.json +1 -1
- package/es/lowcode/engine/meta/link.props.json +1 -1
- package/es/lowcode/engine/meta/page.props.json +6 -0
- package/es/lowcode/engine/meta/pagelayout.props.default.json +1 -1
- package/es/lowcode/engine/meta/pagelayout.props.json +1 -1
- package/es/lowcode/engine/meta/section.props.json +2 -1
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +1 -1
- package/es/lowcode/engine/meta/table.props.json +2 -2
- package/es/lowcode/engine/meta/text.props.default.json +4 -2
- package/es/lowcode/engine/meta/text.props.json +8 -6
- package/es/lowcode/engine/provider/ContextProvider/index.js +63 -46
- package/es/lowcode/engine/provider/ContextProvider/router.js +43 -0
- package/es/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -15
- package/es/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
- package/es/lowcode/engine/provider/ContextProvider/utils.js +157 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +1 -2
- package/es/lowcode/engine/tools/helper.js +7 -2
- package/es/lowcode/engine/tools/initDS.js +263 -0
- package/es/lowcode/engine/tools/useCombinedRefs.js +3 -2
- package/es/lowcode/painter/DesignOperator.js +10 -1
- package/es/lowcode/painter/Panel.js +2 -2
- package/es/lowcode/painter/components/AdvancePanel.js +3 -3
- package/es/lowcode/painter/components/Collapse.js +5 -2
- package/es/lowcode/painter/components/TipIcon.js +16 -0
- package/es/lowcode/painter/components/VarEditor.js +456 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +2 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +3 -1
- package/es/lowcode/painter/components/code-editor/VisionEditor.js +81 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +17 -3
- package/es/lowcode/painter/components/field-setting/index.js +1 -1
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
- package/es/lowcode/painter/index.js +1 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +20 -6
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
- package/es/lowcode/painter/panel-section/ComplexPop.js +242 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +8 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +29 -3
- package/es/lowcode/painter/panel-section/I18nInput.js +4 -2
- package/es/lowcode/painter/panel-section/Icon.js +9 -4
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +7 -7
- package/es/lowcode/painter/panel-section/IconSelector.js +1 -1
- package/es/lowcode/painter/panel-section/ImpExp.js +1 -27
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +1 -2
- package/es/lowcode/painter/panel-section/LayoutRatio.js +1 -0
- package/es/lowcode/painter/panel-section/PageVars.js +300 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +4 -3
- package/es/lowcode/painter/panel-section/TabItems.js +6 -42
- package/es/lowcode/painter/panel-section/TextContent.js +79 -0
- package/es/lowcode/painter/services/complexPop.js +21 -0
- package/es/lowcode/painter/style/design.less +1 -1
- package/es/lowcode/painter/style/page-vars.less +25 -0
- package/es/lowcode/preview/index.js +1 -0
- package/es/lowcode/view/Canvas.js +24 -22
- package/es/lowcode/view/Loading.js +5 -7
- package/es/lowcode/view/Page.js +37 -15
- package/es/lowcode/view/index.js +1 -0
- package/es/lowcode/view/lc-components/Box/index.js +18 -3
- package/es/lowcode/view/lc-components/Box/meta.json +3 -3
- package/es/lowcode/view/lc-components/Button/index.js +7 -7
- package/es/lowcode/view/lc-components/Button/meta.json +2 -2
- package/es/lowcode/view/lc-components/Dialog/index.js +6 -7
- package/es/lowcode/view/lc-components/Dialog/meta.json +2 -2
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +7 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +4 -2
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +3 -2
- package/es/lowcode/view/lc-components/FieldUser/meta.json +1 -1
- package/es/lowcode/view/lc-components/Form/index.js +14 -6
- package/es/lowcode/view/lc-components/Form/meta.json +4 -5
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/es/lowcode/view/lc-components/ImEx/index.js +174 -103
- package/es/lowcode/view/lc-components/ImEx/meta.json +26 -5
- package/es/lowcode/view/lc-components/Image/meta.json +1 -1
- package/es/lowcode/view/lc-components/JSX/meta.json +1 -1
- package/es/lowcode/view/lc-components/Layout/index.js +22 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +5 -5
- package/es/lowcode/view/lc-components/Link/meta.json +1 -1
- package/es/lowcode/view/lc-components/Page/meta.json +6 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
- package/es/lowcode/view/lc-components/PageLayout/meta.json +1 -1
- package/es/lowcode/view/lc-components/Section/index.js +2 -6
- package/es/lowcode/view/lc-components/Section/meta.json +2 -1
- package/es/lowcode/view/lc-components/Split/index.js +19 -4
- package/es/lowcode/view/lc-components/Split/meta.json +1 -1
- package/es/lowcode/view/lc-components/Table/index.js +29 -3
- package/es/lowcode/view/lc-components/Table/meta.json +2 -2
- package/es/lowcode/view/lc-components/Tabs/index.js +19 -16
- package/es/lowcode/view/lc-components/Text/index.js +9 -2
- package/es/lowcode/view/lc-components/Text/meta.json +6 -6
- package/es/lowcode/view/lc-components/Wrapper.js +17 -2
- package/es/lowcode/view/style/loading.less +14 -0
- package/es/services.js +19 -0
- package/es/upload/Form/gridForm.js +17 -7
- package/es/upload/FormItem/index.js +6 -6
- package/es/utils/form.js +4 -4
- package/es/utils/grid.js +2 -1
- package/lib/components/Builder/index.js +13 -1
- package/lib/components/ComplexItem/index.js +62 -47
- package/lib/components/LdAutoForm/index.js +3 -2
- package/lib/components/LdFormList/index.js +5 -8
- package/lib/components/LdGridForm/index.js +2 -1
- package/lib/helper/form.js +1 -0
- package/lib/helper/ldBuilder.js +8 -3
- package/lib/locales/zh-CN.js +38 -4
- package/lib/lowcode/constants/event-topics.js +1 -3
- package/lib/lowcode/engine/launcher.js +3 -1
- package/lib/lowcode/engine/meta/box.props.json +3 -3
- package/lib/lowcode/engine/meta/button.props.default.json +1 -1
- package/lib/lowcode/engine/meta/button.props.json +2 -2
- package/lib/lowcode/engine/meta/dialog.props.json +2 -2
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +7 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +2 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +4 -2
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +3 -2
- package/lib/lowcode/engine/meta/fielduser.props.default.json +1 -1
- package/lib/lowcode/engine/meta/fielduser.props.json +1 -1
- package/lib/lowcode/engine/meta/form.props.default.json +0 -1
- package/lib/lowcode/engine/meta/form.props.json +4 -5
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/lib/lowcode/engine/meta/iframe.props.json +1 -1
- package/lib/lowcode/engine/meta/image.props.default.json +1 -1
- package/lib/lowcode/engine/meta/image.props.json +1 -1
- package/lib/lowcode/engine/meta/imex.props.default.json +2 -1
- package/lib/lowcode/engine/meta/imex.props.json +26 -5
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +38 -20
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/lib/lowcode/engine/meta/jsx.props.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.json +5 -5
- package/lib/lowcode/engine/meta/link.props.default.json +1 -1
- package/lib/lowcode/engine/meta/link.props.json +1 -1
- package/lib/lowcode/engine/meta/page.props.json +6 -0
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/pagelayout.props.json +1 -1
- package/lib/lowcode/engine/meta/section.props.json +2 -1
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +1 -1
- package/lib/lowcode/engine/meta/table.props.json +2 -2
- package/lib/lowcode/engine/meta/text.props.default.json +4 -2
- package/lib/lowcode/engine/meta/text.props.json +8 -6
- package/lib/lowcode/engine/provider/ContextProvider/index.js +61 -44
- package/lib/lowcode/engine/provider/ContextProvider/router.js +57 -0
- package/lib/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -16
- package/lib/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
- package/lib/lowcode/engine/provider/ContextProvider/utils.js +170 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +2 -3
- package/lib/lowcode/engine/tools/helper.js +7 -2
- package/lib/lowcode/engine/tools/initDS.js +270 -0
- package/lib/lowcode/engine/tools/useCombinedRefs.js +2 -1
- package/lib/lowcode/painter/DesignOperator.js +9 -0
- package/lib/lowcode/painter/Panel.js +2 -2
- package/lib/lowcode/painter/components/AdvancePanel.js +3 -3
- package/lib/lowcode/painter/components/Collapse.js +5 -2
- package/lib/lowcode/painter/components/TipIcon.js +23 -0
- package/lib/lowcode/painter/components/VarEditor.js +463 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +2 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +3 -1
- package/lib/lowcode/painter/components/code-editor/VisionEditor.js +88 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +17 -3
- package/lib/lowcode/painter/components/field-setting/index.js +1 -1
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
- package/lib/lowcode/painter/index.js +1 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +19 -5
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
- package/lib/lowcode/painter/panel-section/ComplexPop.js +250 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +8 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +29 -3
- package/lib/lowcode/painter/panel-section/I18nInput.js +4 -2
- package/lib/lowcode/painter/panel-section/Icon.js +8 -3
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +6 -6
- package/lib/lowcode/painter/panel-section/IconSelector.js +1 -1
- package/lib/lowcode/painter/panel-section/ImpExp.js +0 -26
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +0 -1
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +1 -0
- package/lib/lowcode/painter/panel-section/PageVars.js +308 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +4 -3
- package/lib/lowcode/painter/panel-section/TabItems.js +6 -42
- package/lib/lowcode/painter/panel-section/TextContent.js +87 -0
- package/lib/lowcode/painter/services/complexPop.js +28 -0
- package/lib/lowcode/painter/style/design.less +1 -1
- package/lib/lowcode/painter/style/page-vars.less +25 -0
- package/lib/lowcode/preview/index.js +1 -0
- package/lib/lowcode/view/Canvas.js +24 -22
- package/lib/lowcode/view/Loading.js +5 -7
- package/lib/lowcode/view/Page.js +35 -13
- package/lib/lowcode/view/index.js +1 -0
- package/lib/lowcode/view/lc-components/Box/index.js +17 -2
- package/lib/lowcode/view/lc-components/Box/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Button/index.js +5 -5
- package/lib/lowcode/view/lc-components/Button/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Dialog/index.js +6 -7
- package/lib/lowcode/view/lc-components/Dialog/meta.json +2 -2
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +7 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +4 -2
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +3 -2
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Form/index.js +14 -6
- package/lib/lowcode/view/lc-components/Form/meta.json +4 -5
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/lib/lowcode/view/lc-components/ImEx/index.js +172 -101
- package/lib/lowcode/view/lc-components/ImEx/meta.json +26 -5
- package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
- package/lib/lowcode/view/lc-components/JSX/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Layout/index.js +21 -4
- package/lib/lowcode/view/lc-components/Layout/meta.json +5 -5
- package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Page/meta.json +6 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Section/index.js +2 -6
- package/lib/lowcode/view/lc-components/Section/meta.json +2 -1
- package/lib/lowcode/view/lc-components/Split/index.js +18 -3
- package/lib/lowcode/view/lc-components/Split/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Table/index.js +30 -4
- package/lib/lowcode/view/lc-components/Table/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Tabs/index.js +17 -14
- package/lib/lowcode/view/lc-components/Text/index.js +8 -1
- package/lib/lowcode/view/lc-components/Text/meta.json +6 -6
- package/lib/lowcode/view/lc-components/Wrapper.js +16 -1
- package/lib/lowcode/view/style/loading.less +14 -0
- package/lib/services.js +20 -0
- package/lib/upload/Form/gridForm.js +17 -7
- package/lib/upload/FormItem/index.js +6 -6
- package/lib/utils/form.js +3 -3
- package/lib/utils/grid.js +2 -1
- package/package.json +3 -3
|
@@ -11,9 +11,10 @@ var _ahooks = require("ahooks");
|
|
|
11
11
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
12
|
var _lodash = require("lodash");
|
|
13
13
|
var _base = require("@luck-design-biz/base");
|
|
14
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
15
|
+
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
14
16
|
var _helper = require("../../../engine/tools/helper");
|
|
15
17
|
var _splitPropsDefault = _interopRequireDefault(require("../../../engine/meta/split.props.default.json"));
|
|
16
|
-
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
17
18
|
var _MAPPING_ = {
|
|
18
19
|
left: 'min',
|
|
19
20
|
up: 'min',
|
|
@@ -30,8 +31,16 @@ var LCSplit = function LCSplit(_ref) {
|
|
|
30
31
|
var id = _ref.id,
|
|
31
32
|
children = _ref.children,
|
|
32
33
|
css = _ref.css,
|
|
33
|
-
display = _ref.display
|
|
34
|
+
display = _ref.display,
|
|
35
|
+
advance = _ref.advance;
|
|
34
36
|
var ref = (0, _react.useRef)();
|
|
37
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
38
|
+
(0, _react.useEffect)(function () {
|
|
39
|
+
ctx.doAction(advance.events.onMount);
|
|
40
|
+
return function () {
|
|
41
|
+
return ctx.doAction(advance.events.onUnmount);
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
35
44
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
36
45
|
return ref.current;
|
|
37
46
|
});
|
|
@@ -46,6 +55,11 @@ var LCSplit = function LCSplit(_ref) {
|
|
|
46
55
|
}, [display.ratio]),
|
|
47
56
|
ratioArr = _useCreation.ratioArr,
|
|
48
57
|
total = _useCreation.total;
|
|
58
|
+
var handleChange = (0, _ahooks.useMemoizedFn)(function (value) {
|
|
59
|
+
ctx.doAction(advance.events.onChange, {
|
|
60
|
+
value: value
|
|
61
|
+
});
|
|
62
|
+
});
|
|
49
63
|
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
50
64
|
id: id,
|
|
51
65
|
displayName: "Split",
|
|
@@ -54,7 +68,8 @@ var LCSplit = function LCSplit(_ref) {
|
|
|
54
68
|
ref: ref,
|
|
55
69
|
$css: css
|
|
56
70
|
}, /*#__PURE__*/_react.default.createElement(_base.MemorySplit, {
|
|
57
|
-
split: display.split
|
|
71
|
+
split: display.split,
|
|
72
|
+
onChange: handleChange
|
|
58
73
|
}, ratioArr.map(function (r, i) {
|
|
59
74
|
return /*#__PURE__*/_react.default.createElement(_base.MemorySplit.Pane, {
|
|
60
75
|
fastTo: !display.fastTo || i === display.fastTo.length ? 'max' : _MAPPING_[display.fastTo[i]],
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
12
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
12
13
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -22,11 +23,13 @@ var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
|
22
23
|
var _index = require("../../../../index");
|
|
23
24
|
var _TopFilter = _interopRequireDefault(require("./components/TopFilter"));
|
|
24
25
|
var _TopImex = require("./components/TopImex");
|
|
26
|
+
var _RuntimeComp = _interopRequireDefault(require("../JSX/RuntimeComp"));
|
|
25
27
|
var _helper = require("../../../engine/tools/helper");
|
|
26
28
|
var _useCombinedRefs = _interopRequireDefault(require("../../../engine/tools/useCombinedRefs"));
|
|
27
29
|
var _tablePropsDefault = _interopRequireDefault(require("../../../engine/meta/table.props.default.json"));
|
|
28
30
|
var _constants = require("../../../constants");
|
|
29
31
|
var _apiUrl2 = require("../../../constants/api-url");
|
|
32
|
+
var _excluded = ["render"];
|
|
30
33
|
var moduleCode = (0, _helper.getLDMetaAttr)('moduleCode');
|
|
31
34
|
var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
32
35
|
var id = _ref.id,
|
|
@@ -79,6 +82,18 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
79
82
|
*/
|
|
80
83
|
getInstance: function getInstance() {
|
|
81
84
|
return instanceRef.current;
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* 刷新表格
|
|
88
|
+
* @method
|
|
89
|
+
*/
|
|
90
|
+
refresh: function refresh() {
|
|
91
|
+
var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
92
|
+
return instanceRef.current.onLdQuery(init ? {
|
|
93
|
+
removeAll: {
|
|
94
|
+
operate: 'removeAll'
|
|
95
|
+
}
|
|
96
|
+
} : null);
|
|
82
97
|
}
|
|
83
98
|
};
|
|
84
99
|
});
|
|
@@ -376,8 +391,19 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
376
391
|
if (!(0, _lodash.isNil)(columnsRewrite) || !(0, _lodash.isNil)(fields)) {
|
|
377
392
|
temp.columnsRewrite = function (cols) {
|
|
378
393
|
var colsMap = (0, _lodash.keyBy)(cols, 'field');
|
|
379
|
-
var _cols = (0, _lodash.isNil)(fields) ? cols : fields.map(function (
|
|
380
|
-
|
|
394
|
+
var _cols = (0, _lodash.isNil)(fields) ? cols : fields.map(function (_ref4) {
|
|
395
|
+
var render = _ref4.render,
|
|
396
|
+
_field = (0, _objectWithoutProperties2.default)(_ref4, _excluded);
|
|
397
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, colsMap[_field.field]), {}, {
|
|
398
|
+
render: render ? function (v, d, i, p) {
|
|
399
|
+
return /*#__PURE__*/_react.default.createElement(_RuntimeComp.default, {
|
|
400
|
+
value: v,
|
|
401
|
+
data: d,
|
|
402
|
+
rowIndex: i,
|
|
403
|
+
params: p
|
|
404
|
+
}, render.replace(/(function\s*\w*\s*)\([^)]*\)(\s*{)/, '$1()$2'));
|
|
405
|
+
} : null
|
|
406
|
+
}, _field);
|
|
381
407
|
});
|
|
382
408
|
return (0, _lodash.isNil)(columnsRewrite) ? _cols : (0, _helper.executeCode)(ctx, columnsRewrite, ['columns'], _cols);
|
|
383
409
|
};
|
|
@@ -520,7 +546,7 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
520
546
|
});
|
|
521
547
|
});
|
|
522
548
|
var _afterQuery = (0, _ahooks.useMemoizedFn)(function (res) {
|
|
523
|
-
if (res.code === 1 && !res.list.includes(instanceRef.current.expectRowKey)) {
|
|
549
|
+
if (res.code === 1 && instanceRef.current && !res.list.includes(instanceRef.current.expectRowKey)) {
|
|
524
550
|
instanceRef.current.expectRowKey = res.list[0];
|
|
525
551
|
ctx.doAction(advance.events.onExpectRowChanged, {
|
|
526
552
|
data: res.detail[res.list[0]]
|
|
@@ -384,13 +384,13 @@
|
|
|
384
384
|
"key": "onMount",
|
|
385
385
|
"name": "组件首次渲染时",
|
|
386
386
|
"desc": "在组件首次渲染时,执行方法",
|
|
387
|
-
"func": "function onMount(params) {\n\t\n}"
|
|
387
|
+
"func": "function onMount(params, datasetCode) {\n\t\n}"
|
|
388
388
|
},
|
|
389
389
|
{
|
|
390
390
|
"key": "onUnmount",
|
|
391
391
|
"name": "组件卸载时",
|
|
392
392
|
"desc": "在组件卸载时,执行方法。",
|
|
393
|
-
"func": "function onUnmount() {\n\t\n}"
|
|
393
|
+
"func": "function onUnmount(datasetCode) {\n\t\n}"
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
396
|
"key": "onRowClick",
|
|
@@ -11,6 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _reactDom = require("react-dom");
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _ahooks = require("ahooks");
|
|
14
|
+
var _lodash = require("lodash");
|
|
14
15
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
16
|
var _antd = require("luck-design/antd");
|
|
16
17
|
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
@@ -39,25 +40,27 @@ var LCTabs = function LCTabs(_ref) {
|
|
|
39
40
|
var ref = (0, _react.useRef)();
|
|
40
41
|
var apiRef = (0, _react.useRef)();
|
|
41
42
|
var ctx = (0, _ContextProvider.useContext)();
|
|
43
|
+
var _items = (0, _ahooks.useCreation)(function () {
|
|
44
|
+
return items.filter(function (_ref2) {
|
|
45
|
+
var serial = _ref2.serial;
|
|
46
|
+
return (0, _lodash.isNil)(serial) || ctx.want(serial);
|
|
47
|
+
});
|
|
48
|
+
}, [items]);
|
|
42
49
|
var _useState = (0, _react.useState)(function () {
|
|
43
|
-
return (
|
|
44
|
-
var active =
|
|
50
|
+
return (_items.find(function (_ref3) {
|
|
51
|
+
var active = _ref3.active;
|
|
45
52
|
return active;
|
|
46
|
-
}) ||
|
|
53
|
+
}) || _items[0]).id;
|
|
47
54
|
}),
|
|
48
55
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
49
56
|
activeKey = _useState2[0],
|
|
50
57
|
setActiveKey = _useState2[1];
|
|
51
|
-
(0,
|
|
52
|
-
ctx.doAction(advance.events.onMount
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ctx.doAction(advance.events.onUnmount, {
|
|
58
|
-
instance: ref.current
|
|
59
|
-
});
|
|
60
|
-
});
|
|
58
|
+
(0, _react.useEffect)(function () {
|
|
59
|
+
ctx.doAction(advance.events.onMount);
|
|
60
|
+
return function () {
|
|
61
|
+
ctx.doAction(advance.events.onUnmount);
|
|
62
|
+
};
|
|
63
|
+
}, []);
|
|
61
64
|
var handleTabClick = (0, _ahooks.useMemoizedFn)(function (tabKey, e) {
|
|
62
65
|
setActiveKey(tabKey);
|
|
63
66
|
ctx.doAction(advance.events.onTabClick, {
|
|
@@ -89,7 +92,7 @@ var LCTabs = function LCTabs(_ref) {
|
|
|
89
92
|
tabBarExtraContent: tabBarExtraContent ? /*#__PURE__*/_react.default.createElement(_RuntimeComp.default, null, tabBarExtraContent) : null,
|
|
90
93
|
$css: css,
|
|
91
94
|
onTabClick: handleTabClick
|
|
92
|
-
},
|
|
95
|
+
}, _items.map(function (item) {
|
|
93
96
|
return /*#__PURE__*/_react.default.createElement(_antd.Tabs.TabPane, {
|
|
94
97
|
tab: item.name,
|
|
95
98
|
key: item.id,
|
|
@@ -11,6 +11,7 @@ var _ahooks = require("ahooks");
|
|
|
11
11
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
12
|
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
13
13
|
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
14
|
+
var _RuntimeComp = _interopRequireDefault(require("../JSX/RuntimeComp"));
|
|
14
15
|
var _helper = require("../../../engine/tools/helper");
|
|
15
16
|
var _textPropsDefault = _interopRequireDefault(require("../../../engine/meta/text.props.default.json"));
|
|
16
17
|
var StyledText = _styledComponents.default.div.withConfig({
|
|
@@ -44,6 +45,12 @@ var LCText = function LCText(_ref) {
|
|
|
44
45
|
e: e
|
|
45
46
|
});
|
|
46
47
|
});
|
|
48
|
+
var _content = (0, _ahooks.useCreation)(function () {
|
|
49
|
+
if (content.code) {
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_RuntimeComp.default, null, content.code);
|
|
51
|
+
}
|
|
52
|
+
return content.text;
|
|
53
|
+
}, [content]);
|
|
47
54
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
48
55
|
return ref.current;
|
|
49
56
|
});
|
|
@@ -56,7 +63,7 @@ var LCText = function LCText(_ref) {
|
|
|
56
63
|
$css: css,
|
|
57
64
|
$max: maxLine,
|
|
58
65
|
onClick: handleClick
|
|
59
|
-
},
|
|
66
|
+
}, _content));
|
|
60
67
|
};
|
|
61
68
|
LCText.defaultProps = (0, _helper.omitBadProps)(_textPropsDefault.default);
|
|
62
69
|
var _default = exports.default = LCText;
|
|
@@ -15,22 +15,22 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"key": "content",
|
|
18
|
-
"name": "
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"default": "文本",
|
|
18
|
+
"name": "#内容",
|
|
19
|
+
"type": "_TextContent",
|
|
20
|
+
"default": {"text": "文本内容"},
|
|
22
21
|
"wrapped": "textarea",
|
|
22
|
+
"wrapper": "hidden",
|
|
23
23
|
"repositioning": true
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"key": "maxLine",
|
|
27
27
|
"name": "最大行数",
|
|
28
|
-
"desc": "
|
|
28
|
+
"desc": "超出时自动省略号展示,0表示不限制行数",
|
|
29
29
|
"type": "number",
|
|
30
30
|
"default": 0
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
|
-
"css":
|
|
33
|
+
"css": "",
|
|
34
34
|
"advance": {
|
|
35
35
|
"events": [
|
|
36
36
|
{
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _ahooks = require("ahooks");
|
|
12
13
|
var _lodash = require("lodash");
|
|
@@ -41,7 +42,21 @@ var LCWrapper = function LCWrapper(_ref) {
|
|
|
41
42
|
};
|
|
42
43
|
ctx._register(id, new Proxy({
|
|
43
44
|
id: id,
|
|
44
|
-
meta: (0, _lodash.omit)(meta, ['props', 'css', 'advance'])
|
|
45
|
+
meta: (0, _lodash.omit)(meta, ['props', 'css', 'advance']),
|
|
46
|
+
set: function set(prop, value, toDom) {
|
|
47
|
+
if (toDom === true) {
|
|
48
|
+
if (['id', _constants.LC_COMPONENT_UNIT_KEY].includes(prop)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
var dom = getTargetDom();
|
|
52
|
+
dom.setAttribute(prop, value);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
(0, _ContextProvider.modifyNode)(id, (0, _defineProperty2.default)({}, prop, value));
|
|
56
|
+
},
|
|
57
|
+
get: function get(prop) {
|
|
58
|
+
return _selfData.current.props[prop];
|
|
59
|
+
}
|
|
45
60
|
}, {
|
|
46
61
|
get: function get(target, property, receiver) {
|
|
47
62
|
if (property === 'api') {
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
.masker {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
z-index: 1000;
|
|
8
|
+
background-color: transparent;
|
|
9
|
+
backdrop-filter: blur(6px);
|
|
10
|
+
cursor: none;
|
|
11
|
+
}
|
|
12
|
+
*:has(> .masker) {
|
|
13
|
+
position: relative;
|
|
14
|
+
}
|
|
1
15
|
.lc-painter-loading {
|
|
2
16
|
position: absolute;
|
|
3
17
|
height: 64px;
|
package/lib/services.js
CHANGED
|
@@ -4,6 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
exports.noAuthTransformCode = noAuthTransformCode;
|
|
7
8
|
exports.readModlue = readModlue;
|
|
8
9
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
9
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -27,4 +28,23 @@ function _readModlue() {
|
|
|
27
28
|
}, _callee);
|
|
28
29
|
}));
|
|
29
30
|
return _readModlue.apply(this, arguments);
|
|
31
|
+
}
|
|
32
|
+
function noAuthTransformCode(_x2) {
|
|
33
|
+
return _noAuthTransformCode.apply(this, arguments);
|
|
34
|
+
}
|
|
35
|
+
function _noAuthTransformCode() {
|
|
36
|
+
_noAuthTransformCode = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(params) {
|
|
37
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
38
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
39
|
+
case 0:
|
|
40
|
+
return _context2.abrupt("return", (0, _utils.request)("".concat(_ApiConfig.default.BASE_HOST, "/page/option/noAuthTransformCode"), {
|
|
41
|
+
params: params
|
|
42
|
+
}));
|
|
43
|
+
case 1:
|
|
44
|
+
case "end":
|
|
45
|
+
return _context2.stop();
|
|
46
|
+
}
|
|
47
|
+
}, _callee2);
|
|
48
|
+
}));
|
|
49
|
+
return _noAuthTransformCode.apply(this, arguments);
|
|
30
50
|
}
|
|
@@ -87,7 +87,7 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
87
87
|
var _getDvaApp$_store$get = (_getDvaApp = (0, _umi.getDvaApp)()) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp._store.getState().user,
|
|
88
88
|
currentUser = _getDvaApp$_store$get.currentUser;
|
|
89
89
|
var supportUploadTypes = (0, _ahooks.useCreation)(function () {
|
|
90
|
-
return (0, _utils.getSupportUploadTypes)(forbiddenTypes);
|
|
90
|
+
return (0, _utils.getSupportUploadTypes)(forbiddenTypes, supportTypes);
|
|
91
91
|
}, [forbiddenTypes, supportTypes]);
|
|
92
92
|
|
|
93
93
|
// 下载
|
|
@@ -279,6 +279,9 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
279
279
|
|
|
280
280
|
// 预览
|
|
281
281
|
var resetActionsColumn = (0, _ahooks.useMemoizedFn)(function (data, index, _actions, params) {
|
|
282
|
+
if (resetActions) {
|
|
283
|
+
return resetActions(data, index, actionList, params);
|
|
284
|
+
}
|
|
282
285
|
var actions = _actions.filter(function (item) {
|
|
283
286
|
return item.wanted !== 'update' && item.wanted !== 'add';
|
|
284
287
|
});
|
|
@@ -319,9 +322,6 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
319
322
|
});
|
|
320
323
|
}
|
|
321
324
|
});
|
|
322
|
-
if (resetActions) {
|
|
323
|
-
return resetActions(data, index, actions, params);
|
|
324
|
-
}
|
|
325
325
|
return actions;
|
|
326
326
|
});
|
|
327
327
|
var handleBatchOperationsClick = (0, _ahooks.useMemoizedFn)(function (key, selectedRows, cb) {
|
|
@@ -390,9 +390,19 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
390
390
|
beforeUpload: _beforeUpload
|
|
391
391
|
});
|
|
392
392
|
},
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
393
|
+
customRequest: function customRequest(_ref2) {
|
|
394
|
+
var file = _ref2.file,
|
|
395
|
+
onProgress = _ref2.onProgress,
|
|
396
|
+
onSuccess = _ref2.onSuccess;
|
|
397
|
+
return new Promise(function (resolve) {
|
|
398
|
+
setTimeout(function () {
|
|
399
|
+
onProgress({
|
|
400
|
+
percent: 100
|
|
401
|
+
});
|
|
402
|
+
onSuccess(file);
|
|
403
|
+
resolve();
|
|
404
|
+
}, 1000);
|
|
405
|
+
});
|
|
396
406
|
}
|
|
397
407
|
})
|
|
398
408
|
}), /*#__PURE__*/_react.default.createElement(_luckDesign.BasicFormItem, {
|
|
@@ -11,20 +11,19 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _luckDesign = require("luck-design");
|
|
13
13
|
var _utils = require("@luck-design-biz/base/utils");
|
|
14
|
-
var _apiUrl = require("../../lowcode/constants/api-url");
|
|
15
14
|
var _excluded = ["uploadUrl", "moduleCode", "bucket", "tag", "note", "config", "supportTypes", "forbiddenTypes", "children", "dataFormat", "listType"];
|
|
16
15
|
/**
|
|
17
16
|
* 表单类型富文本上传
|
|
18
17
|
* 是否实体字段: 是
|
|
19
18
|
* 是否接受tag: 是
|
|
20
19
|
* 是否虚拟主键: 否
|
|
21
|
-
* 接受参数:
|
|
20
|
+
* 接受参数:
|
|
22
21
|
* name: 附件名称逗号拼接
|
|
23
22
|
* name_virtual: [{...// 附件所有参数}]
|
|
24
23
|
* ### name=name_virtual ###
|
|
25
|
-
* 传参:
|
|
24
|
+
* 传参:
|
|
26
25
|
* name: [{objectName, marker},...]
|
|
27
|
-
* 其他需求:
|
|
26
|
+
* 其他需求:
|
|
28
27
|
* 支持beforeUpload禁止附加类型
|
|
29
28
|
* =>beforeUpload禁止类型全覆盖
|
|
30
29
|
* =>forbiddenTypes和配置管理中禁止类型合并
|
|
@@ -42,13 +41,14 @@ function buildComponent(props) {
|
|
|
42
41
|
_props$config = props.config,
|
|
43
42
|
config = _props$config === void 0 ? {} : _props$config,
|
|
44
43
|
supportTypes = props.supportTypes,
|
|
45
|
-
forbiddenTypes = props.forbiddenTypes,
|
|
44
|
+
_props$forbiddenTypes = props.forbiddenTypes,
|
|
45
|
+
forbiddenTypes = _props$forbiddenTypes === void 0 ? [] : _props$forbiddenTypes,
|
|
46
46
|
children = props.children,
|
|
47
47
|
dataFormat = props.dataFormat,
|
|
48
48
|
listType = props.listType,
|
|
49
49
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
50
50
|
var getUrl = function getUrl(behaviorKey) {
|
|
51
|
-
return "".concat(
|
|
51
|
+
return "".concat(window.appConfig.OSS_HOST_V3, "?moduleCode=").concat(moduleCode, "&behaviorKey=").concat(behaviorKey, "&bucket=").concat(bucket, "&tag=").concat(tag, "¬e=").concat(note);
|
|
52
52
|
};
|
|
53
53
|
var supportUploadTypes = (0, _utils.getSupportUploadTypes)(forbiddenTypes, supportTypes);
|
|
54
54
|
return /*#__PURE__*/_react.default.createElement(_luckDesign.BasicFormItem, (0, _extends2.default)({
|
package/lib/utils/form.js
CHANGED
|
@@ -39,7 +39,7 @@ function getFormItem() {
|
|
|
39
39
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
40
|
var customProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
41
41
|
if (!property) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
42
|
-
if (property === 'sint' || property === 'number') props.opt_decimal = 0;
|
|
42
|
+
if (property === 'sint' || property === 'number' || property === 'long') props.opt_decimal = 0;
|
|
43
43
|
var comType = comName || _form.defaultComName[property];
|
|
44
44
|
var _translator = (0, _form.translator)(props),
|
|
45
45
|
name = _translator.name,
|
|
@@ -73,7 +73,7 @@ function getFormItem() {
|
|
|
73
73
|
var formItemDataFormat = exports.formItemDataFormat = function formItemDataFormat() {
|
|
74
74
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
75
75
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
76
|
-
var omitValues =
|
|
76
|
+
var omitValues = (0, _lodash.cloneDeep)(values);
|
|
77
77
|
var data = (0, _lodash.transform)(propsList, function (result, n) {
|
|
78
78
|
var _ref2 = n || {},
|
|
79
79
|
comName = _ref2.comName,
|
|
@@ -133,7 +133,7 @@ var formItemDataFormat = exports.formItemDataFormat = function formItemDataForma
|
|
|
133
133
|
default:
|
|
134
134
|
if (!(0, _lodash.isNil)(values["".concat(name, "_virtual")] || values[name])) result[name] = values["".concat(name, "_virtual")] || values[name];
|
|
135
135
|
}
|
|
136
|
-
omitValues = (0, _lodash.omit)(
|
|
136
|
+
omitValues = (0, _lodash.omit)(omitValues, [name, "".concat(name, "_virtual")]);
|
|
137
137
|
}, {});
|
|
138
138
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, omitValues), data);
|
|
139
139
|
};
|
package/lib/utils/grid.js
CHANGED
|
@@ -46,13 +46,14 @@ function getColumnRender(name, type) {
|
|
|
46
46
|
break;
|
|
47
47
|
case 'year':
|
|
48
48
|
render = function render(text) {
|
|
49
|
-
return text;
|
|
49
|
+
return _moment.default.isMoment(text) ? text.format('YYYY') : text;
|
|
50
50
|
};
|
|
51
51
|
break;
|
|
52
52
|
case 'user':
|
|
53
53
|
case 'select':
|
|
54
54
|
case 'group':
|
|
55
55
|
case 'complex':
|
|
56
|
+
case 'dict':
|
|
56
57
|
render = function render(text, record) {
|
|
57
58
|
if (record["".concat(name, "_virtual")]) return record["".concat(name, "_virtual")];
|
|
58
59
|
if ((0, _lodash.isArray)(text)) return text.map(function (i) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luck-design-biz/luckda",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "前端配置管理中心业务组件库",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "cross-env NODE_OPTIONS=--max-old-space-size=10240 USER_RUNTIME=SITE RUNTIME=dev umi dev",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@babel/plugin-transform-strict-mode": "^7.18.6",
|
|
82
82
|
"@babel/polyfill": "^7.12.1",
|
|
83
83
|
"@babel/traverse": "^7.24.1",
|
|
84
|
-
"@luck-design-biz/base": "0.0.
|
|
84
|
+
"@luck-design-biz/base": "0.0.49",
|
|
85
85
|
"@luck-design-biz/bpm": "0.0.5",
|
|
86
86
|
"@luck-helper/ui-design": "0.0.6",
|
|
87
87
|
"@types/classnames": "^2.3.1",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"js-cookie": "^2.2.1",
|
|
127
127
|
"jsdom-global": "^3.0.2",
|
|
128
128
|
"lint-staged": "^11.2.6",
|
|
129
|
-
"luck-design": "0.1.
|
|
129
|
+
"luck-design": "0.1.80",
|
|
130
130
|
"monaco-editor-webpack-plugin": "6.*.*",
|
|
131
131
|
"node-fetch": "^2.6.7",
|
|
132
132
|
"nprogress": "^0.2.0",
|