@luck-design-biz/luckda 0.0.25-4 → 0.0.25-7
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/LDActions/index.less +1 -1
- package/es/components/LdAutoForm/index.js +24 -8
- package/es/components/LdFormList/index.js +25 -18
- package/es/components/LdGrid/index.js +3 -2
- package/es/components/LdGridForm/index.js +16 -6
- package/es/components/LdTree/index.js +3 -2
- package/es/helper/form.js +6 -3
- package/es/locales/zh-CN.js +1 -0
- package/es/lowcode/constants/api-url.js +13 -11
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +5 -2
- package/es/lowcode/engine/meta/dialog.props.default.json +10 -5
- package/es/lowcode/engine/meta/dialog.props.json +72 -42
- package/es/lowcode/engine/meta/form.props.json +3 -3
- package/es/lowcode/engine/meta/table.props.json +4 -4
- package/es/lowcode/engine/meta/tree.props.default.json +1 -0
- package/es/lowcode/engine/meta/tree.props.json +7 -0
- package/es/lowcode/engine/provider/ContextProvider/index.js +8 -40
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +16 -20
- package/es/lowcode/engine/tools/helper.js +2 -3
- package/es/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/es/lowcode/engine/tools/usePageDataStore.js +174 -0
- package/es/lowcode/engine/tools/usePromiseState.js +12 -23
- package/es/lowcode/engine/tools/useTodo.js +20 -10
- package/es/lowcode/painter/DesignOperator.js +11 -22
- package/es/lowcode/painter/DesignToolbar.js +8 -44
- package/es/lowcode/painter/Outline.js +2 -4
- package/es/lowcode/painter/Panel.js +26 -25
- package/es/lowcode/painter/components/ActionBindModal.js +5 -11
- package/es/lowcode/painter/components/AttrsPanel.js +26 -19
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
- package/es/lowcode/painter/components/field-setting/SettingUI.js +7 -7
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +11 -11
- package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/es/lowcode/painter/panel-section/DataSetSelector.js +4 -1
- package/es/lowcode/painter/panel-section/FieldsSetting.js +5 -1
- package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
- package/es/lowcode/painter/style/design.less +1 -1
- package/es/lowcode/painter/style/panel-item.less +1 -1
- package/es/lowcode/view/Canvas.js +6 -7
- package/es/lowcode/view/Page.js +2 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -10
- package/es/lowcode/view/lc-components/Dialog/index.js +89 -19
- package/es/lowcode/view/lc-components/Dialog/meta.json +65 -42
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +23 -33
- package/es/lowcode/view/lc-components/Form/index.js +20 -6
- package/es/lowcode/view/lc-components/Form/meta.json +3 -3
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +12 -19
- package/es/lowcode/view/lc-components/PageContent/index.js +8 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +2 -5
- package/es/lowcode/view/lc-components/PageHeader/index.js +5 -6
- package/es/lowcode/view/lc-components/PageModal/index.js +12 -15
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +3 -9
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +11 -18
- package/es/lowcode/view/lc-components/Table/index.js +67 -25
- package/es/lowcode/view/lc-components/Table/meta.json +4 -4
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +9 -17
- package/es/lowcode/view/lc-components/Tree/index.js +8 -1
- package/es/lowcode/view/lc-components/Tree/meta.json +7 -0
- package/es/lowcode/view/lc-components/Wrapper.js +9 -11
- package/es/services.js +0 -24
- package/es/upload/FilesWall/file.png +0 -0
- package/es/upload/FilesWall/index.js +422 -0
- package/es/upload/FilesWall/index.less +74 -0
- package/es/upload/Form/index.js +2 -1
- package/es/upload/FormItem/index.js +2 -1
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/lib/components/LDActions/index.less +1 -1
- package/lib/components/LdAutoForm/index.js +23 -7
- package/lib/components/LdFormList/index.js +25 -18
- package/lib/components/LdGrid/index.js +3 -2
- package/lib/components/LdGridForm/index.js +14 -4
- package/lib/components/LdTree/index.js +3 -2
- package/lib/helper/form.js +6 -3
- package/lib/locales/zh-CN.js +1 -0
- package/lib/lowcode/constants/api-url.js +14 -10
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +7 -4
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +6 -3
- package/lib/lowcode/engine/meta/dialog.props.default.json +10 -5
- package/lib/lowcode/engine/meta/dialog.props.json +72 -42
- package/lib/lowcode/engine/meta/form.props.json +3 -3
- package/lib/lowcode/engine/meta/table.props.json +4 -4
- package/lib/lowcode/engine/meta/tree.props.default.json +1 -0
- package/lib/lowcode/engine/meta/tree.props.json +7 -0
- package/lib/lowcode/engine/provider/ContextProvider/index.js +25 -41
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +16 -20
- package/lib/lowcode/engine/tools/helper.js +2 -3
- package/lib/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/lib/lowcode/engine/tools/usePageDataStore.js +181 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +11 -21
- package/lib/lowcode/engine/tools/useTodo.js +19 -9
- package/lib/lowcode/painter/DesignOperator.js +10 -21
- package/lib/lowcode/painter/DesignToolbar.js +7 -43
- package/lib/lowcode/painter/Outline.js +1 -3
- package/lib/lowcode/painter/Panel.js +25 -24
- package/lib/lowcode/painter/components/ActionBindModal.js +5 -11
- package/lib/lowcode/painter/components/AttrsPanel.js +26 -19
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +7 -7
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +10 -10
- package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +4 -1
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +5 -1
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
- package/lib/lowcode/painter/style/design.less +1 -1
- package/lib/lowcode/painter/style/panel-item.less +1 -1
- package/lib/lowcode/view/Canvas.js +5 -6
- package/lib/lowcode/view/Page.js +2 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -9
- package/lib/lowcode/view/lc-components/Dialog/index.js +89 -19
- package/lib/lowcode/view/lc-components/Dialog/meta.json +65 -42
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +20 -31
- package/lib/lowcode/view/lc-components/Form/index.js +20 -6
- package/lib/lowcode/view/lc-components/Form/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +11 -18
- package/lib/lowcode/view/lc-components/PageContent/index.js +7 -8
- package/lib/lowcode/view/lc-components/PageFooter/index.js +2 -5
- package/lib/lowcode/view/lc-components/PageHeader/index.js +4 -5
- package/lib/lowcode/view/lc-components/PageModal/index.js +11 -14
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +2 -8
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +10 -17
- package/lib/lowcode/view/lc-components/Table/index.js +66 -24
- package/lib/lowcode/view/lc-components/Table/meta.json +4 -4
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +8 -16
- package/lib/lowcode/view/lc-components/Tree/index.js +8 -1
- package/lib/lowcode/view/lc-components/Tree/meta.json +7 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +8 -10
- package/lib/services.js +0 -25
- package/lib/upload/FilesWall/file.png +0 -0
- package/lib/upload/FilesWall/index.js +429 -0
- package/lib/upload/FilesWall/index.less +74 -0
- package/lib/upload/Form/index.js +2 -1
- package/lib/upload/FormItem/index.js +2 -1
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/package.json +4 -3
|
@@ -2,9 +2,10 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "filedsRewrite", "mainFormLdId", "mainDataSetKey", "onValueChange", "onQuery", "onAdd", "onUpdate", "moduleCode", "defaultDataSourceFormat", "ticketData", "relationKey"];
|
|
5
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "filedsRewrite", "mainFormLdId", "mainDataSetKey", "onValueChange", "onQuery", "onAdd", "onUpdate", "moduleCode", "defaultDataSourceFormat", "ticketData", "relationKey", "fields"];
|
|
6
6
|
import React, { createRef, useContext } from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { reduce, keyBy, isEmpty, pick } from 'lodash';
|
|
8
|
+
import { BasicDivider } from 'luck-design';
|
|
8
9
|
import { AutoForm } from '@luck-design-biz/base/FormList';
|
|
9
10
|
import ldBuilder from "../../helper/ldBuilder";
|
|
10
11
|
import { getFormItem, formItemDataFormat, dataFormat, behaviorCall } from "../../utils";
|
|
@@ -41,20 +42,33 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
41
42
|
ticketData = _ref$ticketData === void 0 ? {} : _ref$ticketData,
|
|
42
43
|
_ref$relationKey = _ref.relationKey,
|
|
43
44
|
relationKey = _ref$relationKey === void 0 ? window.appConfig.constraintKeys.PRIMARY : _ref$relationKey,
|
|
45
|
+
fields = _ref.fields,
|
|
44
46
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
45
47
|
var _ref2 = useContext(LuckDaContext) || {},
|
|
46
48
|
setFieldProps = _ref2.setFieldProps;
|
|
47
|
-
var defaultValues = /*#__PURE__*/createRef();
|
|
49
|
+
var defaultValues = /*#__PURE__*/createRef({});
|
|
48
50
|
var isMain = ldId === mainFormLdId;
|
|
49
51
|
var basicItems = function () {
|
|
52
|
+
var fieldsObj = keyBy(fields, 'field');
|
|
53
|
+
var columnsObj = keyBy(columns, 'field');
|
|
54
|
+
var keys = isEmpty(fields) ? Object.keys(columnsObj) : Object.keys(fieldsObj);
|
|
50
55
|
var _defaultValues = {};
|
|
51
|
-
var _nodes =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
var _nodes = reduce(keys, function (result, key) {
|
|
57
|
+
var setting = fieldsObj[key];
|
|
58
|
+
var col = columnsObj[key];
|
|
59
|
+
if ((setting === null || setting === void 0 ? void 0 : setting._type) === 'divider') {
|
|
60
|
+
result.push( /*#__PURE__*/React.createElement(BasicDivider, {
|
|
61
|
+
title: setting === null || setting === void 0 ? void 0 : setting.fieldAliasName
|
|
62
|
+
}));
|
|
63
|
+
} else if (col.isShowInForm) {
|
|
64
|
+
var customFiled = filedsRewrite.find(function (_field) {
|
|
65
|
+
return _field.name === col.aliaName;
|
|
55
66
|
}) || {};
|
|
56
67
|
_defaultValues = _objectSpread(_objectSpread({}, _defaultValues), {}, _defineProperty(_defineProperty({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
|
|
57
|
-
|
|
68
|
+
var newCol = _objectSpread(_objectSpread({}, col), {}, {
|
|
69
|
+
fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
|
|
70
|
+
}, pick(setting, ['col', 'row', 'note', 'tip', 'placeholder']));
|
|
71
|
+
result.push(getFormItem(newCol, _objectSpread(_objectSpread({
|
|
58
72
|
formId: ldId,
|
|
59
73
|
moduleCode: moduleCode
|
|
60
74
|
}, customFiled), {}, {
|
|
@@ -63,6 +77,8 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
63
77
|
}
|
|
64
78
|
})));
|
|
65
79
|
}
|
|
80
|
+
;
|
|
81
|
+
return result;
|
|
66
82
|
}, []);
|
|
67
83
|
defaultValues.current = _defaultValues;
|
|
68
84
|
setFieldProps && setFieldProps(_defineProperty({}, ldId, _nodes.map(function (i) {
|
|
@@ -26,7 +26,7 @@ import { LuckDaContext } from "../Builder";
|
|
|
26
26
|
import { LuckDaPopContext } from "../LdPop";
|
|
27
27
|
import createModel from "./model";
|
|
28
28
|
import { onBatchSubmitAction } from "../../helper/action";
|
|
29
|
-
import
|
|
29
|
+
import useTodo from "../../lowcode/engine/tools/useTodo";
|
|
30
30
|
|
|
31
31
|
// 组件
|
|
32
32
|
var LdFormList = function LdFormList(_ref) {
|
|
@@ -69,6 +69,10 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
69
69
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
70
70
|
bizData = _useState6[0],
|
|
71
71
|
setBizData = _useState6[1];
|
|
72
|
+
var _useTodo = useTodo(),
|
|
73
|
+
_useTodo2 = _slicedToArray(_useTodo, 2),
|
|
74
|
+
_ = _useTodo2[0],
|
|
75
|
+
callBehavior = _useTodo2[1];
|
|
72
76
|
var luckTheme = useCreation(function () {
|
|
73
77
|
return document.body.getAttribute('luck-theme');
|
|
74
78
|
}, []);
|
|
@@ -124,7 +128,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
124
128
|
}, bpmButtonProps)));
|
|
125
129
|
};
|
|
126
130
|
useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
127
|
-
var _props$formData$mainF, _params, response, _yield$
|
|
131
|
+
var _props$formData$mainF, _params, response, _yield$callBehavior, code, data, _props$formData$mainF2, _props$formData$mainF3, bpmInfoObj, tempObj;
|
|
128
132
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
129
133
|
while (1) switch (_context.prev = _context.next) {
|
|
130
134
|
case 0:
|
|
@@ -134,13 +138,14 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
134
138
|
}
|
|
135
139
|
_params = {
|
|
136
140
|
indocno: (_props$formData$mainF = props.formData[mainFormLdId]) === null || _props$formData$mainF === void 0 ? void 0 : _props$formData$mainF[PRIMARY],
|
|
141
|
+
mainDataSetKey: mainDataSetKey
|
|
142
|
+
}; // 请求是否有工作流服务
|
|
143
|
+
_context.next = 4;
|
|
144
|
+
return callBehavior({
|
|
137
145
|
moduleCode: rest.moduleCode,
|
|
138
146
|
datasetCode: mainDataSetKey,
|
|
139
|
-
mainDataSetKey: mainDataSetKey,
|
|
140
147
|
behaviorKey: 'readBpmDeploy'
|
|
141
|
-
};
|
|
142
|
-
_context.next = 4;
|
|
143
|
-
return readBehaviorCall(_params);
|
|
148
|
+
}, _params);
|
|
144
149
|
case 4:
|
|
145
150
|
response = _context.sent;
|
|
146
151
|
if (!(response.code === 1 && response.data)) {
|
|
@@ -148,13 +153,15 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
148
153
|
break;
|
|
149
154
|
}
|
|
150
155
|
_context.next = 8;
|
|
151
|
-
return
|
|
156
|
+
return callBehavior({
|
|
157
|
+
moduleCode: rest.moduleCode,
|
|
158
|
+
datasetCode: mainDataSetKey,
|
|
152
159
|
behaviorKey: 'readBpm'
|
|
153
|
-
})
|
|
160
|
+
}, _params);
|
|
154
161
|
case 8:
|
|
155
|
-
_yield$
|
|
156
|
-
code = _yield$
|
|
157
|
-
data = _yield$
|
|
162
|
+
_yield$callBehavior = _context.sent;
|
|
163
|
+
code = _yield$callBehavior.code;
|
|
164
|
+
data = _yield$callBehavior.data;
|
|
158
165
|
if (code == 1 && data) {
|
|
159
166
|
bpmInfoObj = data.bpmInfo;
|
|
160
167
|
tempObj = _objectSpread(_objectSpread({}, props.formData[mainFormLdId]), {}, {
|
|
@@ -261,7 +268,9 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
261
268
|
var _o$props;
|
|
262
269
|
return o.order || ((_o$props = o.props) === null || _o$props === void 0 ? void 0 : _o$props.order);
|
|
263
270
|
}).map(function (formProps) {
|
|
264
|
-
|
|
271
|
+
var _formProps$type = formProps.type,
|
|
272
|
+
type = _formProps$type === void 0 ? 'auto' : _formProps$type;
|
|
273
|
+
if (includes(['auto', 'writer', 'grid'], type)) {
|
|
265
274
|
var _ref8 = formProps || {},
|
|
266
275
|
ldId = _ref8.id,
|
|
267
276
|
_ref8$header = _ref8.header,
|
|
@@ -276,17 +285,15 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
276
285
|
} : _ref8$renderTopLeft,
|
|
277
286
|
serial = _ref8.serial,
|
|
278
287
|
_props = _objectWithoutProperties(_ref8, _excluded3);
|
|
279
|
-
var _props$type = _props.type,
|
|
280
|
-
type = _props$type === void 0 ? 'auto' : _props$type;
|
|
281
288
|
var renderForm = type === 'auto' ? buildLdAutoForm : buildLdGridForm;
|
|
282
289
|
var _readOnly = selfReadOnly || serial && !includes(resources, serial);
|
|
283
290
|
if (header === 'collapse' || header === 'collapseFollow') return /*#__PURE__*/React.createElement(Collapse, {
|
|
284
291
|
title: title || ldId,
|
|
285
|
-
extra: type === 'auto' && renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic'),
|
|
292
|
+
extra: type === 'auto' && formProps.dataSetKey && renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic'),
|
|
286
293
|
id: ldId,
|
|
287
294
|
key: ldId,
|
|
288
295
|
mode: header === 'collapse' && ldId !== mainFormLdId && 'tab'
|
|
289
|
-
}, renderForm(_objectSpread(_objectSpread({}, _props), {}, {
|
|
296
|
+
}, formProps.dataSetKey && renderForm(_objectSpread(_objectSpread({}, _props), {}, {
|
|
290
297
|
ldId: ldId,
|
|
291
298
|
mainFormLdId: mainFormLdId,
|
|
292
299
|
mainDataSetKey: mainDataSetKey,
|
|
@@ -302,11 +309,11 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
302
309
|
}, header === 'divider' && /*#__PURE__*/React.createElement(BasicDivider, {
|
|
303
310
|
title: title || ldId,
|
|
304
311
|
id: ldId
|
|
305
|
-
}), type === 'auto' && /*#__PURE__*/React.createElement("div", {
|
|
312
|
+
}), type === 'auto' && formProps.dataSetKey && /*#__PURE__*/React.createElement("div", {
|
|
306
313
|
style: {
|
|
307
314
|
textAlign: 'right'
|
|
308
315
|
}
|
|
309
|
-
}, renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic')), renderForm(_objectSpread(_objectSpread({}, _props), {}, {
|
|
316
|
+
}, renderExtra(ldId, extraConfig, luckTheme === 'base' ? 'text' : 'graphic')), formProps.dataSetKey && renderForm(_objectSpread(_objectSpread({}, _props), {}, {
|
|
310
317
|
ldId: ldId,
|
|
311
318
|
mainFormLdId: mainFormLdId,
|
|
312
319
|
mainDataSetKey: mainDataSetKey,
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "wrapperRef", "list", "detail", "params", "filters", "loading", "unclosableSet", "onQuery", "doQuery", "pagination", "pageno", "pagesize", "totalCount", "columnsRewrite", "columnsReset", "batchOperations", "formatDataSource", "resultSet", "actionsColumn", "readFilter", "isFlow", "isTreeGrid", "writable"],
|
|
5
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "wrapperRef", "list", "detail", "params", "filters", "_loading", "loading", "unclosableSet", "onQuery", "doQuery", "pagination", "pageno", "pagesize", "totalCount", "columnsRewrite", "columnsReset", "batchOperations", "formatDataSource", "resultSet", "actionsColumn", "readFilter", "isFlow", "isTreeGrid", "writable"],
|
|
6
6
|
_excluded2 = ["ldId", "moduleCode", "suppressInit", "overModel", "afterQuery", "isTreeGrid"];
|
|
7
7
|
import React, { forwardRef, useImperativeHandle, useRef, useEffect } from 'react';
|
|
8
8
|
import { getDvaApp } from 'umi';
|
|
@@ -26,6 +26,7 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
26
26
|
detail = _ref.detail,
|
|
27
27
|
params = _ref.params,
|
|
28
28
|
filters = _ref.filters,
|
|
29
|
+
_loading = _ref._loading,
|
|
29
30
|
loading = _ref.loading,
|
|
30
31
|
unclosableSet = _ref.unclosableSet,
|
|
31
32
|
onQuery = _ref.onQuery,
|
|
@@ -142,7 +143,7 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
142
143
|
,
|
|
143
144
|
actionsColumn: _actionsColumn,
|
|
144
145
|
batchOperations: _batchOperations,
|
|
145
|
-
loading: loading,
|
|
146
|
+
loading: _loading || loading,
|
|
146
147
|
pagination: isFlow ? false : _objectSpread({
|
|
147
148
|
total: total,
|
|
148
149
|
current: current,
|
|
@@ -2,9 +2,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "columnsRewrite", "columnsReset", "onQuery", "onAdd", "onUpdate", "onDelete", "mainFormLdId", "mainDataSetKey", "onValueChange", "type", "afterOperate", "moduleCode", "defaultDataSourceFormat", "ticketData", "className", "formRef", "formMode"];
|
|
6
|
-
import React, { createRef, useContext
|
|
7
|
-
import {
|
|
5
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "ldId", "dataSetKey", "columnsRewrite", "columnsReset", "onQuery", "onAdd", "onUpdate", "onDelete", "mainFormLdId", "mainDataSetKey", "onValueChange", "type", "afterOperate", "moduleCode", "defaultDataSourceFormat", "ticketData", "className", "formRef", "formMode", "fields"];
|
|
6
|
+
import React, { createRef, useContext } from 'react';
|
|
7
|
+
import { reduce, keyBy, isEmpty, pick } from 'lodash';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import ldBuilder from "../../helper/ldBuilder";
|
|
10
10
|
import { GridForm } from '@luck-design-biz/base/FormList';
|
|
@@ -51,10 +51,11 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
51
51
|
className = _ref.className,
|
|
52
52
|
formRef = _ref.formRef,
|
|
53
53
|
formMode = _ref.formMode,
|
|
54
|
+
fields = _ref.fields,
|
|
54
55
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
56
|
var _ref2 = useContext(LuckDaContext) || {},
|
|
56
57
|
setFieldProps = _ref2.setFieldProps;
|
|
57
|
-
var defaultValues = /*#__PURE__*/createRef();
|
|
58
|
+
var defaultValues = /*#__PURE__*/createRef({});
|
|
58
59
|
var isMain = ldId === mainFormLdId;
|
|
59
60
|
var gridColumns = columns.map(function (col) {
|
|
60
61
|
if ((col.comName || defaultComName[col.property]) === 'radio') return _objectSpread(_objectSpread({}, col), {}, {
|
|
@@ -63,8 +64,13 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
63
64
|
return col;
|
|
64
65
|
});
|
|
65
66
|
var _columns = function () {
|
|
67
|
+
var fieldsObj = keyBy(fields, 'field');
|
|
68
|
+
var columnsObj = keyBy(gridColumns, 'field');
|
|
69
|
+
var keys = isEmpty(fields) ? Object.keys(columnsObj) : Object.keys(fieldsObj);
|
|
66
70
|
var _defaultValues = {};
|
|
67
|
-
var _nodes =
|
|
71
|
+
var _nodes = reduce(keys, function (result, key) {
|
|
72
|
+
var setting = fieldsObj[key];
|
|
73
|
+
var col = columnsObj[key];
|
|
68
74
|
if (col.isShowInForm) {
|
|
69
75
|
var _customColumn;
|
|
70
76
|
var customColumn = columnsRewrite.find(function (column) {
|
|
@@ -75,7 +81,10 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
75
81
|
mode: 'grid'
|
|
76
82
|
});
|
|
77
83
|
_defaultValues = _objectSpread(_objectSpread({}, _defaultValues), {}, _defineProperty(_defineProperty({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
|
|
78
|
-
|
|
84
|
+
var newCol = _objectSpread(_objectSpread({}, col), {}, {
|
|
85
|
+
fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
|
|
86
|
+
});
|
|
87
|
+
result.push(getFormColumn(type, newCol, _objectSpread(_objectSpread(_objectSpread({}, pick(setting, ['width', 'align', 'headerAlign', 'pinned', 'tip'])), customColumn), {}, {
|
|
79
88
|
formItemRewrite: _objectSpread(_objectSpread({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
|
|
80
89
|
moduleCode: moduleCode,
|
|
81
90
|
formRef: formRef,
|
|
@@ -83,6 +92,7 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
83
92
|
})
|
|
84
93
|
})));
|
|
85
94
|
}
|
|
95
|
+
return result;
|
|
86
96
|
}, []);
|
|
87
97
|
defaultValues.current = _defaultValues;
|
|
88
98
|
setFieldProps && setFieldProps(_defineProperty({}, ldId, _nodes.map(function (col) {
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
-
var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat", "boxRef", "doubleClickExpand", "onNodeDoubleClick", "width", "height", "treeNodeCheckable", "treeNodeDisableCheckbox", "treeNodeDisable", "treeNodeIcon", "asyncLoad", "parentKey", "onMount", "onUnmount", "onDataSetChange", "onTreeNodeRender"],
|
|
6
|
+
var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat", "boxRef", "doubleClickExpand", "onNodeDoubleClick", "width", "height", "treeNodeCheckable", "treeNodeDisableCheckbox", "treeNodeDisable", "treeNodeIcon", "asyncLoad", "parentKey", "onMount", "onUnmount", "onDataSetChange", "onTreeNodeRender", "onlyRoot"],
|
|
7
7
|
_excluded2 = ["onClick"];
|
|
8
8
|
import React, { useState, useRef, useImperativeHandle, forwardRef, useLayoutEffect } from 'react';
|
|
9
9
|
import { isFunction, isNumber, transform, includes, remove, cloneDeep, isNil } from 'lodash';
|
|
@@ -61,6 +61,7 @@ var LdTree = function LdTree(_ref) {
|
|
|
61
61
|
onUnmount = _ref.onUnmount,
|
|
62
62
|
onDataSetChange = _ref.onDataSetChange,
|
|
63
63
|
onTreeNodeRender = _ref.onTreeNodeRender,
|
|
64
|
+
onlyRoot = _ref.onlyRoot,
|
|
64
65
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
65
66
|
if (!includes(isTree, dataSetKey)) return formatMessage({
|
|
66
67
|
id: 'luckda.ldTree.notTrees',
|
|
@@ -221,7 +222,7 @@ var LdTree = function LdTree(_ref) {
|
|
|
221
222
|
onDrop && onDrop(info, dragInfo);
|
|
222
223
|
});
|
|
223
224
|
var onAdd = useCreation(function () {
|
|
224
|
-
return !(readOnly || !rootAdd || rootAdd.resource && !includes(resources, rootAdd.resource)) ? function () {
|
|
225
|
+
return !(readOnly || !rootAdd || rootAdd.resource && !includes(resources, rootAdd.resource) || onlyRoot && (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0) ? function () {
|
|
225
226
|
return handleMenuClick(rootAdd);
|
|
226
227
|
} : null;
|
|
227
228
|
}, [readOnly, rootAdd, resources]);
|
package/es/helper/form.js
CHANGED
|
@@ -64,11 +64,14 @@ export function translator() {
|
|
|
64
64
|
required: !!allConfig.isNotNull,
|
|
65
65
|
disabled: !!allConfig.isReadOnly
|
|
66
66
|
},
|
|
67
|
-
layout: 'block'
|
|
67
|
+
layout: 'block',
|
|
68
|
+
col: allConfig.col || 1,
|
|
69
|
+
row: allConfig.row || 1
|
|
68
70
|
};
|
|
69
71
|
if (!isNil(allConfig['dataFormat'])) _props.dataFormat = allConfig['dataFormat'];
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
if (allConfig.placeholder) _props.config.placeholder = allConfig.placeholder;
|
|
73
|
+
if (allConfig.note) _props.extra = allConfig.note;
|
|
74
|
+
if (allConfig.tip) _props.tip = allConfig.tip;
|
|
72
75
|
/* *********************************** extra ******************************* */
|
|
73
76
|
if (allConfig['opt_length']) _props.config.length = allConfig['opt_length'];
|
|
74
77
|
if (!isNil(allConfig['opt_number_min'])) _props.config.min = allConfig['opt_number_min'];
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -23,6 +23,7 @@ export default {
|
|
|
23
23
|
"luckda.lowcode.painter.panel-section.width-height": "请输入数值",
|
|
24
24
|
"luckda.lowcode.painter.tree.rootAdd": "根节点新增",
|
|
25
25
|
"luckda.lowcode.painter.edit": "编辑",
|
|
26
|
+
"luckda.lowcode.painter.bind": "绑定动作",
|
|
26
27
|
"luckda.lowcode.painter.panel-section.tableTopFilter.label": "名称",
|
|
27
28
|
"luckda.lowcode.painter.panel-section.tableTopFilter.label.placeholder": "请输入过滤项名称",
|
|
28
29
|
"luckda.lowcode.painter.panel-section.tableTopFilter.value": "值",
|
|
@@ -393,13 +393,6 @@ function _fetchAllBehavior() {
|
|
|
393
393
|
export function fetchAllSerials(_x19) {
|
|
394
394
|
return _fetchAllSerials.apply(this, arguments);
|
|
395
395
|
}
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
* 执行行为
|
|
399
|
-
* @param {*} params
|
|
400
|
-
* @param {*} data
|
|
401
|
-
* @returns
|
|
402
|
-
*/
|
|
403
396
|
function _fetchAllSerials() {
|
|
404
397
|
_fetchAllSerials = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
|
|
405
398
|
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
@@ -416,6 +409,17 @@ function _fetchAllSerials() {
|
|
|
416
409
|
}));
|
|
417
410
|
return _fetchAllSerials.apply(this, arguments);
|
|
418
411
|
}
|
|
412
|
+
export function getBehaviorUrl() {
|
|
413
|
+
var mdCode = window[DATA_MODEL_CODE_KEY];
|
|
414
|
+
return "".concat(api.API_HOST, "/").concat(mdCode, "/to/behavior/call");
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* 执行行为
|
|
419
|
+
* @param {*} params
|
|
420
|
+
* @param {*} data
|
|
421
|
+
* @returns
|
|
422
|
+
*/
|
|
419
423
|
export function fetchCallBehavior(_x20, _x21) {
|
|
420
424
|
return _fetchCallBehavior.apply(this, arguments);
|
|
421
425
|
}
|
|
@@ -427,12 +431,10 @@ export function fetchCallBehavior(_x20, _x21) {
|
|
|
427
431
|
*/
|
|
428
432
|
function _fetchCallBehavior() {
|
|
429
433
|
_fetchCallBehavior = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params, data) {
|
|
430
|
-
var mdCode;
|
|
431
434
|
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
432
435
|
while (1) switch (_context17.prev = _context17.next) {
|
|
433
436
|
case 0:
|
|
434
|
-
|
|
435
|
-
return _context17.abrupt("return", request("".concat(api.API_HOST, "/").concat(mdCode, "/to/behavior/call"), {
|
|
437
|
+
return _context17.abrupt("return", request(getBehaviorUrl(), {
|
|
436
438
|
method: 'POST',
|
|
437
439
|
data: data,
|
|
438
440
|
params: params,
|
|
@@ -440,7 +442,7 @@ function _fetchCallBehavior() {
|
|
|
440
442
|
'Content-Type': 'application/json;charset=UTF-8'
|
|
441
443
|
}
|
|
442
444
|
}));
|
|
443
|
-
case
|
|
445
|
+
case 1:
|
|
444
446
|
case "end":
|
|
445
447
|
return _context17.stop();
|
|
446
448
|
}
|
|
@@ -6,15 +6,18 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
6
6
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
7
7
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
8
|
var _excluded = ["options", "onChange"];
|
|
9
|
+
import React from 'react';
|
|
9
10
|
import { Select } from 'luck-design/antd';
|
|
10
11
|
import Strategy from "./Strategy";
|
|
11
12
|
var _TYPE_ = 'select';
|
|
12
13
|
var SelectComp = function SelectComp(_ref) {
|
|
13
14
|
var options = _ref.options,
|
|
14
|
-
|
|
15
|
+
_onChange = _ref.onChange,
|
|
15
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
17
|
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
17
|
-
onChange: onChange
|
|
18
|
+
onChange: function onChange(val) {
|
|
19
|
+
return _onChange(val);
|
|
20
|
+
},
|
|
18
21
|
getPopupContainer: function getPopupContainer() {
|
|
19
22
|
return document.getElementById('lc-design-workspace');
|
|
20
23
|
}
|
|
@@ -3,17 +3,20 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
+
import React from 'react';
|
|
6
7
|
import { Switch } from 'luck-design/antd';
|
|
7
8
|
import Strategy from "./Strategy";
|
|
8
9
|
var _TYPE_ = 'switch';
|
|
9
10
|
var SwitchComp = function SwitchComp(_ref) {
|
|
10
11
|
var defaultValue = _ref.defaultValue,
|
|
11
|
-
|
|
12
|
+
_onChange = _ref.onChange,
|
|
12
13
|
size = _ref.size;
|
|
13
14
|
return /*#__PURE__*/React.createElement(Switch, {
|
|
14
15
|
defaultChecked: defaultValue,
|
|
15
16
|
size: size,
|
|
16
|
-
onChange: onChange
|
|
17
|
+
onChange: function onChange(val) {
|
|
18
|
+
return _onChange(val);
|
|
19
|
+
}
|
|
17
20
|
});
|
|
18
21
|
};
|
|
19
22
|
var SelectStrategy = /*#__PURE__*/function (_Strategy) {
|
|
@@ -8,13 +8,18 @@
|
|
|
8
8
|
"order": 1,
|
|
9
9
|
"title": "对话框",
|
|
10
10
|
"width": "700px",
|
|
11
|
-
"height": "
|
|
12
|
-
"fullScreen": false,
|
|
13
|
-
"fullable": true,
|
|
11
|
+
"height": "50vh",
|
|
14
12
|
"defaultOpen": false,
|
|
15
|
-
"mask":
|
|
16
|
-
"
|
|
13
|
+
"mask": true,
|
|
14
|
+
"okText": "确定",
|
|
15
|
+
"cancelText": "取消",
|
|
17
16
|
"footer": true,
|
|
17
|
+
"btnGroup": {
|
|
18
|
+
"display": "button",
|
|
19
|
+
"max": 2,
|
|
20
|
+
"moreText": "操作",
|
|
21
|
+
"todoList": []
|
|
22
|
+
},
|
|
18
23
|
"advance": {
|
|
19
24
|
"events": {}
|
|
20
25
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"props": [
|
|
10
10
|
{
|
|
11
11
|
"key": "id",
|
|
12
|
-
"
|
|
12
|
+
"name": "唯一标识",
|
|
13
13
|
"type": "string",
|
|
14
14
|
"disabled": true
|
|
15
15
|
},
|
|
@@ -22,65 +22,95 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"key": "width",
|
|
25
|
-
"name": "
|
|
26
|
-
"
|
|
27
|
-
"
|
|
25
|
+
"name": "对话框宽度",
|
|
26
|
+
"type": "_WidthHeight",
|
|
27
|
+
"options": [
|
|
28
|
+
{
|
|
29
|
+
"label": "px",
|
|
30
|
+
"value": "px"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"label": "%",
|
|
34
|
+
"value": "%"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"label": "vw",
|
|
38
|
+
"value": "vw"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"label": "A",
|
|
42
|
+
"value": "auto"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
28
45
|
"default": "700px"
|
|
29
46
|
},
|
|
30
47
|
{
|
|
31
48
|
"key": "height",
|
|
32
|
-
"name": "
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"default": true
|
|
49
|
+
"name": "内容区高度",
|
|
50
|
+
"type": "_WidthHeight",
|
|
51
|
+
"options": [
|
|
52
|
+
{
|
|
53
|
+
"label": "px",
|
|
54
|
+
"value": "px"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"label": "vh",
|
|
58
|
+
"value": "vh"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"label": "A",
|
|
62
|
+
"value": "auto"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"default": "50vh"
|
|
50
66
|
},
|
|
51
67
|
{
|
|
52
68
|
"key": "defaultOpen",
|
|
53
69
|
"name": "默认显示",
|
|
54
70
|
"desc": "默认是否显示",
|
|
55
|
-
"type": "
|
|
71
|
+
"type": "switch",
|
|
56
72
|
"default": false
|
|
57
73
|
},
|
|
58
74
|
{
|
|
59
75
|
"key": "mask",
|
|
60
76
|
"name": "显示遮罩",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"default": false
|
|
77
|
+
"type": "switch",
|
|
78
|
+
"default": true
|
|
64
79
|
},
|
|
65
80
|
{
|
|
66
|
-
"key": "
|
|
67
|
-
"name": "
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
81
|
+
"key": "okText",
|
|
82
|
+
"name": "确认文字",
|
|
83
|
+
"type": "_I18nInput",
|
|
84
|
+
"default": "确定"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"key": "cancelText",
|
|
88
|
+
"name": "取消文字",
|
|
89
|
+
"type": "_I18nInput",
|
|
90
|
+
"default": "取消"
|
|
71
91
|
},
|
|
72
92
|
{
|
|
73
93
|
"key": "footer",
|
|
74
|
-
"name": "
|
|
94
|
+
"name": "显示footer",
|
|
75
95
|
"desc": "是否显示底部按钮区域",
|
|
76
|
-
"type": "
|
|
96
|
+
"type": "switch",
|
|
77
97
|
"default": true
|
|
78
98
|
},
|
|
79
99
|
{
|
|
80
100
|
"key": "btnGroup",
|
|
81
101
|
"name": "按钮组",
|
|
82
102
|
"desc": "底部按钮区域的按钮组(参考按钮配置)",
|
|
83
|
-
"type": "
|
|
103
|
+
"type": "_ActionsEditor",
|
|
104
|
+
"default": {
|
|
105
|
+
"display": "button",
|
|
106
|
+
"max": 2,
|
|
107
|
+
"moreText": "操作",
|
|
108
|
+
"todoList": []
|
|
109
|
+
},
|
|
110
|
+
"wrapper": "collapse",
|
|
111
|
+
"wrapperProps": {
|
|
112
|
+
"suppressIcon": true
|
|
113
|
+
}
|
|
84
114
|
}
|
|
85
115
|
],
|
|
86
116
|
"advance": {
|
|
@@ -89,31 +119,31 @@
|
|
|
89
119
|
"key": "onMount",
|
|
90
120
|
"name": "组件首次渲染时",
|
|
91
121
|
"desc": "在组件首次渲染时,执行方法",
|
|
92
|
-
"func": "(
|
|
122
|
+
"func": "()=>{\n\t\n}"
|
|
93
123
|
},
|
|
94
124
|
{
|
|
95
125
|
"key": "onUnmount",
|
|
96
126
|
"name": "组件卸载时",
|
|
97
127
|
"desc": "在组件卸载时,执行方法。",
|
|
98
|
-
"func": "(
|
|
128
|
+
"func": "()=>{\n\t\n}"
|
|
99
129
|
},
|
|
100
130
|
{
|
|
101
131
|
"key": "onOpen",
|
|
102
132
|
"name": "对话框打开时",
|
|
103
133
|
"desc": "在对话框打开时,执行方法",
|
|
104
|
-
"func": "(
|
|
134
|
+
"func": "()=>{\n\t\n}"
|
|
105
135
|
},
|
|
106
136
|
{
|
|
107
137
|
"key": "onClose",
|
|
108
138
|
"name": "对话框关闭时",
|
|
109
139
|
"desc": "在对话框打开时,执行方法,promise反馈false无法截断关闭",
|
|
110
|
-
"func": "(
|
|
140
|
+
"func": "()=>{\n\t\n}"
|
|
111
141
|
},
|
|
112
142
|
{
|
|
113
|
-
"key": "
|
|
114
|
-
"name": "
|
|
115
|
-
"desc": "
|
|
116
|
-
"func": "(
|
|
143
|
+
"key": "onOk",
|
|
144
|
+
"name": "确定按钮点击",
|
|
145
|
+
"desc": "点击确定按钮时,执行方法",
|
|
146
|
+
"func": "()=>{\n\t\n}"
|
|
117
147
|
}
|
|
118
148
|
]
|
|
119
149
|
}
|