@luck-design-biz/luckda 0.0.25-13 → 0.0.25-15
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/LdFormList/index.js +7 -5
- package/es/locales/zh-CN.js +0 -1
- package/es/lowcode/engine/meta/components-list.json +2 -2
- package/es/lowcode/engine/meta/form.props.default.json +2 -2
- package/es/lowcode/engine/meta/form.props.json +2 -2
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +58 -4
- package/es/lowcode/engine/meta/table.props.default.json +2 -1
- package/es/lowcode/engine/meta/table.props.json +2 -1
- package/es/lowcode/engine/provider/ContextProvider/index.js +59 -16
- package/es/lowcode/painter/DesignToolbar.js +3 -4
- package/es/lowcode/painter/components/PreviewIframe.js +55 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +1 -1
- package/es/lowcode/painter/panel-section/ImpExp.js +64 -55
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +38 -22
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +18 -1
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +1 -1
- package/es/lowcode/view/lc-components/Form/index.js +69 -65
- package/es/lowcode/view/lc-components/Form/meta.json +2 -2
- package/es/lowcode/view/lc-components/PageLayout/index.js +4 -2
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +4 -1
- package/es/lowcode/view/lc-components/Table/index.js +158 -159
- package/es/lowcode/view/lc-components/Table/meta.json +56 -16
- package/lib/components/LdFormList/index.js +7 -5
- package/lib/locales/zh-CN.js +0 -1
- package/lib/lowcode/engine/meta/components-list.json +2 -2
- package/lib/lowcode/engine/meta/form.props.default.json +2 -2
- package/lib/lowcode/engine/meta/form.props.json +2 -2
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +58 -4
- package/lib/lowcode/engine/meta/table.props.default.json +2 -1
- package/lib/lowcode/engine/meta/table.props.json +2 -1
- package/lib/lowcode/engine/provider/ContextProvider/index.js +59 -16
- package/lib/lowcode/painter/DesignToolbar.js +3 -4
- package/lib/lowcode/painter/components/PreviewIframe.js +63 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +1 -1
- package/lib/lowcode/painter/panel-section/ImpExp.js +63 -54
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +37 -21
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +18 -1
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +1 -1
- package/lib/lowcode/view/lc-components/Form/index.js +69 -65
- package/lib/lowcode/view/lc-components/Form/meta.json +2 -2
- package/lib/lowcode/view/lc-components/PageLayout/index.js +4 -2
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +4 -1
- package/lib/lowcode/view/lc-components/Table/index.js +156 -157
- package/lib/lowcode/view/lc-components/Table/meta.json +56 -16
- package/package.json +5 -6
|
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
4
4
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
6
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
|
-
import React, { useRef, useImperativeHandle, forwardRef, useEffect } from 'react';
|
|
7
|
+
import React, { useRef, useImperativeHandle, forwardRef, useEffect, useCallback } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import { useMemoizedFn, useCreation, useSetState, useUpdateEffect, useRequest } from 'ahooks';
|
|
10
10
|
import { isNil, isString, keyBy } from 'lodash';
|
|
@@ -14,11 +14,12 @@ import { useContext, useRemoteSource } from "../../../engine/provider/ContextPro
|
|
|
14
14
|
import Wrapper from "../Wrapper";
|
|
15
15
|
import { LdGrid, LDActions } from "../../../../index";
|
|
16
16
|
import TopFilter from "./components/TopFilter";
|
|
17
|
-
import {
|
|
17
|
+
import { TopUpload, TopExport } from "./components/TopImex";
|
|
18
|
+
import { omitBadProps, executeCode, getLDMetaAttr } from "../../../engine/tools/helper";
|
|
18
19
|
import defaultMeta from "../../../engine/meta/table.props.default.json";
|
|
19
20
|
import { LC_COMPONENT_UNIT_KEY, LC_COMPONENT_UNIT } from "../../../constants";
|
|
20
21
|
import { exportExcel, getFindexcelstate } from "../../../constants/api-url";
|
|
21
|
-
|
|
22
|
+
var moduleCode = getLDMetaAttr('moduleCode');
|
|
22
23
|
var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
23
24
|
var id = _ref.id,
|
|
24
25
|
className = _ref.className,
|
|
@@ -61,8 +62,6 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
61
62
|
_ref$autoRowClick = _ref.autoRowClick,
|
|
62
63
|
autoRowClick = _ref$autoRowClick === void 0 ? true : _ref$autoRowClick;
|
|
63
64
|
var ctx = useContext();
|
|
64
|
-
var _useRemoteSource = useRemoteSource(),
|
|
65
|
-
module = _useRemoteSource.module;
|
|
66
65
|
var apiRef = useRef();
|
|
67
66
|
var wrapperRef = useRef();
|
|
68
67
|
var instanceRef = useRef();
|
|
@@ -72,9 +71,9 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
72
71
|
setClickedRow = _useSetState2[1];
|
|
73
72
|
useImperativeHandle(apiRef, function () {
|
|
74
73
|
return {
|
|
75
|
-
/**
|
|
76
|
-
* 获取表格实例
|
|
77
|
-
* @method
|
|
74
|
+
/**
|
|
75
|
+
* 获取表格实例
|
|
76
|
+
* @method
|
|
78
77
|
*/
|
|
79
78
|
getInstance: function getInstance() {
|
|
80
79
|
return instanceRef.current;
|
|
@@ -236,7 +235,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
236
235
|
behaviorKey = impexp.export;
|
|
237
236
|
strategy = 'behavior';
|
|
238
237
|
_exportExcelParams = {
|
|
239
|
-
moduleCode:
|
|
238
|
+
moduleCode: moduleCode,
|
|
240
239
|
behaviorKey: behaviorKey,
|
|
241
240
|
reportType: 'export'
|
|
242
241
|
};
|
|
@@ -249,7 +248,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
249
248
|
fecthExcelState({
|
|
250
249
|
strategy: strategy,
|
|
251
250
|
batchNo: exportExcelResponse.data,
|
|
252
|
-
moduleCode:
|
|
251
|
+
moduleCode: moduleCode,
|
|
253
252
|
behaviorKey: behaviorKey
|
|
254
253
|
}, procress, resolve, reject);
|
|
255
254
|
} else {
|
|
@@ -284,7 +283,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
284
283
|
reqBody: null
|
|
285
284
|
};
|
|
286
285
|
_exportExcelParams2 = _objectSpread({
|
|
287
|
-
moduleCode:
|
|
286
|
+
moduleCode: moduleCode,
|
|
288
287
|
reportType: 'export'
|
|
289
288
|
}, defaultExcelParams);
|
|
290
289
|
_exportExcelPrefix2 = "/".concat(_strategy);
|
|
@@ -296,7 +295,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
296
295
|
fecthExcelState({
|
|
297
296
|
strategy: _strategy,
|
|
298
297
|
batchNo: _exportExcelResponse.data,
|
|
299
|
-
moduleCode:
|
|
298
|
+
moduleCode: moduleCode
|
|
300
299
|
}, procress, resolve, reject);
|
|
301
300
|
} else {
|
|
302
301
|
reject();
|
|
@@ -378,7 +377,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
378
377
|
}
|
|
379
378
|
return temp;
|
|
380
379
|
}, [fields, formatDataSource, getDataPath, columnsRewrite, columnsReset, modelParams, draggable]);
|
|
381
|
-
var renderFunctionArea =
|
|
380
|
+
var renderFunctionArea = useCallback(function () {
|
|
382
381
|
var _topActionGroup$todoL;
|
|
383
382
|
var resultComp = [];
|
|
384
383
|
if (!!(topActionGroup !== null && topActionGroup !== void 0 && (_topActionGroup$todoL = topActionGroup.todoList) !== null && _topActionGroup$todoL !== void 0 && _topActionGroup$todoL.length)) {
|
|
@@ -396,24 +395,24 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
396
395
|
apiUrl = _getProps2.apiUrl;
|
|
397
396
|
resultComp.push( /*#__PURE__*/React.createElement(TopUpload, {
|
|
398
397
|
apiUrl: apiUrl,
|
|
399
|
-
moduleCode:
|
|
398
|
+
moduleCode: moduleCode,
|
|
400
399
|
options: impexp,
|
|
401
400
|
tableRef: instanceRef.current || ref.current
|
|
402
401
|
}));
|
|
403
402
|
}
|
|
404
|
-
if (impexp.export) {
|
|
403
|
+
if (isString(impexp.export) || impexp.export) {
|
|
405
404
|
var _ref8;
|
|
406
405
|
var _getProps3 = (_ref8 = instanceRef.current || ref.current) === null || _ref8 === void 0 ? void 0 : _ref8.getProps(),
|
|
407
406
|
_apiUrl = _getProps3.apiUrl;
|
|
408
407
|
resultComp.push( /*#__PURE__*/React.createElement(TopExport, {
|
|
409
408
|
apiUrl: _apiUrl,
|
|
410
|
-
moduleCode:
|
|
409
|
+
moduleCode: moduleCode,
|
|
411
410
|
options: impexp,
|
|
412
411
|
tableRef: instanceRef.current || ref.current
|
|
413
412
|
}));
|
|
414
413
|
}
|
|
415
414
|
return resultComp;
|
|
416
|
-
});
|
|
415
|
+
}, [topActionGroup, impexp]);
|
|
417
416
|
var renderFilterArea = useMemoizedFn(function () {
|
|
418
417
|
return topFilter ? /*#__PURE__*/React.createElement(TopFilter, {
|
|
419
418
|
filter: topFilter,
|
|
@@ -479,7 +478,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
479
478
|
category: 'page-action',
|
|
480
479
|
code: "function onRowDragged(toId, fromId, params){return {data: { toId, fromId }};}",
|
|
481
480
|
code1: JSON.stringify({
|
|
482
|
-
moduleCode:
|
|
481
|
+
moduleCode: moduleCode,
|
|
483
482
|
datasetCode: dataset.code,
|
|
484
483
|
data: {
|
|
485
484
|
toId: toId,
|
|
@@ -565,135 +564,135 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
565
564
|
})));
|
|
566
565
|
});
|
|
567
566
|
LCTable.propTypes = {
|
|
568
|
-
/**
|
|
569
|
-
* @name 唯一标识
|
|
570
|
-
* @type string
|
|
571
|
-
* @disabled true
|
|
567
|
+
/**
|
|
568
|
+
* @name 唯一标识
|
|
569
|
+
* @type string
|
|
570
|
+
* @disabled true
|
|
572
571
|
*/
|
|
573
572
|
id: PropTypes.string.isRequired,
|
|
574
|
-
/**
|
|
575
|
-
* @name 数据集
|
|
576
|
-
* @type _DataSetSelector
|
|
573
|
+
/**
|
|
574
|
+
* @name 数据集
|
|
575
|
+
* @type _DataSetSelector
|
|
577
576
|
*/
|
|
578
577
|
dataset: PropTypes.shape({
|
|
579
578
|
code: PropTypes.string.isRequired,
|
|
580
579
|
uid: PropTypes.string.isRequired
|
|
581
580
|
}),
|
|
582
|
-
/**
|
|
583
|
-
* @name 自动加载
|
|
584
|
-
* @desc 首次数据是否自动加载,若存在必须带搜索条件再加载的情况,需要关闭
|
|
585
|
-
* @type switch
|
|
586
|
-
* @default true
|
|
581
|
+
/**
|
|
582
|
+
* @name 自动加载
|
|
583
|
+
* @desc 首次数据是否自动加载,若存在必须带搜索条件再加载的情况,需要关闭
|
|
584
|
+
* @type switch
|
|
585
|
+
* @default true
|
|
587
586
|
*/
|
|
588
587
|
autoLoad: PropTypes.bool,
|
|
589
|
-
/**
|
|
590
|
-
* @name 只读
|
|
591
|
-
* @type switch
|
|
592
|
-
* @default false
|
|
588
|
+
/**
|
|
589
|
+
* @name 只读
|
|
590
|
+
* @type switch
|
|
591
|
+
* @default false
|
|
593
592
|
*/
|
|
594
593
|
readOnly: PropTypes.bool,
|
|
595
|
-
/**
|
|
596
|
-
* @name 关闭预设
|
|
597
|
-
* @type switch
|
|
598
|
-
* @default false
|
|
594
|
+
/**
|
|
595
|
+
* @name 关闭预设
|
|
596
|
+
* @type switch
|
|
597
|
+
* @default false
|
|
599
598
|
*/
|
|
600
599
|
suppressPreset: PropTypes.bool,
|
|
601
|
-
/**
|
|
602
|
-
* @name 宽度
|
|
603
|
-
* @type _WidthHeight
|
|
604
|
-
* @default 100%
|
|
605
|
-
* @group styleSetting
|
|
600
|
+
/**
|
|
601
|
+
* @name 宽度
|
|
602
|
+
* @type _WidthHeight
|
|
603
|
+
* @default 100%
|
|
604
|
+
* @group styleSetting
|
|
606
605
|
*/
|
|
607
606
|
width: PropTypes.string,
|
|
608
|
-
/**
|
|
609
|
-
* @name 高度
|
|
610
|
-
* @type _WidthHeight
|
|
611
|
-
* @default 100%
|
|
612
|
-
* @group styleSetting
|
|
607
|
+
/**
|
|
608
|
+
* @name 高度
|
|
609
|
+
* @type _WidthHeight
|
|
610
|
+
* @default 100%
|
|
611
|
+
* @group styleSetting
|
|
613
612
|
*/
|
|
614
613
|
height: PropTypes.string,
|
|
615
|
-
/**
|
|
616
|
-
* @name 边框线
|
|
617
|
-
* @type switch
|
|
618
|
-
* @default false
|
|
619
|
-
* @group styleSetting
|
|
614
|
+
/**
|
|
615
|
+
* @name 边框线
|
|
616
|
+
* @type switch
|
|
617
|
+
* @default false
|
|
618
|
+
* @group styleSetting
|
|
620
619
|
*/
|
|
621
620
|
border: PropTypes.bool,
|
|
622
|
-
/**
|
|
623
|
-
* @name 斑马纹
|
|
624
|
-
* @type switch
|
|
625
|
-
* @default false
|
|
626
|
-
* @group styleSetting
|
|
621
|
+
/**
|
|
622
|
+
* @name 斑马纹
|
|
623
|
+
* @type switch
|
|
624
|
+
* @default false
|
|
625
|
+
* @group styleSetting
|
|
627
626
|
*/
|
|
628
627
|
zebra: PropTypes.oneOfType[(PropTypes.bool, PropTypes.string)],
|
|
629
|
-
/**
|
|
630
|
-
* @name 开启分页
|
|
631
|
-
* @type switch
|
|
632
|
-
* @default true
|
|
633
|
-
* @group paginationSetting
|
|
628
|
+
/**
|
|
629
|
+
* @name 开启分页
|
|
630
|
+
* @type switch
|
|
631
|
+
* @default true
|
|
632
|
+
* @group paginationSetting
|
|
634
633
|
*/
|
|
635
634
|
pagination: PropTypes.bool,
|
|
636
|
-
/**
|
|
637
|
-
* @name 每页条数
|
|
638
|
-
* @type number
|
|
639
|
-
* @default 30
|
|
640
|
-
* @group paginationSetting
|
|
635
|
+
/**
|
|
636
|
+
* @name 每页条数
|
|
637
|
+
* @type number
|
|
638
|
+
* @default 30
|
|
639
|
+
* @group paginationSetting
|
|
641
640
|
*/
|
|
642
641
|
pageSize: PropTypes.number,
|
|
643
|
-
/**
|
|
644
|
-
* @name 分页器
|
|
645
|
-
* @type switch
|
|
646
|
-
* @default true
|
|
647
|
-
* @group paginationSetting
|
|
642
|
+
/**
|
|
643
|
+
* @name 分页器
|
|
644
|
+
* @type switch
|
|
645
|
+
* @default true
|
|
646
|
+
* @group paginationSetting
|
|
648
647
|
*/
|
|
649
648
|
showSizeChanger: PropTypes.bool,
|
|
650
|
-
/**
|
|
651
|
-
* @name 快速跳转
|
|
652
|
-
* @type switch
|
|
653
|
-
* @default true
|
|
654
|
-
* @group paginationSetting
|
|
649
|
+
/**
|
|
650
|
+
* @name 快速跳转
|
|
651
|
+
* @type switch
|
|
652
|
+
* @default true
|
|
653
|
+
* @group paginationSetting
|
|
655
654
|
*/
|
|
656
655
|
showQuickJumper: PropTypes.bool,
|
|
657
|
-
/**
|
|
658
|
-
* @name 单页无分页器
|
|
659
|
-
* @type switch
|
|
660
|
-
* @default false
|
|
661
|
-
* @group paginationSetting
|
|
656
|
+
/**
|
|
657
|
+
* @name 单页无分页器
|
|
658
|
+
* @type switch
|
|
659
|
+
* @default false
|
|
660
|
+
* @group paginationSetting
|
|
662
661
|
*/
|
|
663
662
|
hideOnSinglePage: PropTypes.bool,
|
|
664
|
-
/**
|
|
665
|
-
* @name 简单模式
|
|
666
|
-
* @type switch
|
|
667
|
-
* @default false
|
|
668
|
-
* @group paginationSetting
|
|
663
|
+
/**
|
|
664
|
+
* @name 简单模式
|
|
665
|
+
* @type switch
|
|
666
|
+
* @default false
|
|
667
|
+
* @group paginationSetting
|
|
669
668
|
*/
|
|
670
669
|
paginationSimple: PropTypes.bool,
|
|
671
|
-
/**
|
|
672
|
-
* @name 隐藏操作列
|
|
673
|
-
* @type switch
|
|
674
|
-
* @default false
|
|
675
|
-
* @groupNext actionsColumn
|
|
670
|
+
/**
|
|
671
|
+
* @name 隐藏操作列
|
|
672
|
+
* @type switch
|
|
673
|
+
* @default false
|
|
674
|
+
* @groupNext actionsColumn
|
|
676
675
|
*/
|
|
677
676
|
suppressActions: PropTypes.bool,
|
|
678
|
-
/**
|
|
679
|
-
* @name 隐藏操作列
|
|
680
|
-
* @type number
|
|
681
|
-
* @default 160
|
|
682
|
-
* @groupNext actionsColumn
|
|
677
|
+
/**
|
|
678
|
+
* @name 隐藏操作列
|
|
679
|
+
* @type number
|
|
680
|
+
* @default 160
|
|
681
|
+
* @groupNext actionsColumn
|
|
683
682
|
*/
|
|
684
683
|
actionsColumnWidth: PropTypes.number,
|
|
685
|
-
/**
|
|
686
|
-
* @name 最大显示数
|
|
687
|
-
* @type number
|
|
688
|
-
* @default 2
|
|
689
|
-
* @groupNext actionsColumn
|
|
684
|
+
/**
|
|
685
|
+
* @name 最大显示数
|
|
686
|
+
* @type number
|
|
687
|
+
* @default 2
|
|
688
|
+
* @groupNext actionsColumn
|
|
690
689
|
*/
|
|
691
690
|
maxActionsCount: PropTypes.number,
|
|
692
|
-
/**
|
|
693
|
-
* @name 操作项
|
|
694
|
-
* @type _TableActions
|
|
695
|
-
* @groupNext actionsColumn
|
|
696
|
-
* @default {"display": "text", "max": 2, "moreText": "更多行为", "todoList": []}
|
|
691
|
+
/**
|
|
692
|
+
* @name 操作项
|
|
693
|
+
* @type _TableActions
|
|
694
|
+
* @groupNext actionsColumn
|
|
695
|
+
* @default {"display": "text", "max": 2, "moreText": "更多行为", "todoList": []}
|
|
697
696
|
*/
|
|
698
697
|
actions: PropTypes.shape({
|
|
699
698
|
display: PropTypes.oneOf(['text', 'button']),
|
|
@@ -701,10 +700,10 @@ LCTable.propTypes = {
|
|
|
701
700
|
moreText: PropTypes.string,
|
|
702
701
|
todoList: PropTypes.array
|
|
703
702
|
}),
|
|
704
|
-
/**
|
|
705
|
-
* @name 顶部操作
|
|
706
|
-
* @type _ActionGroup
|
|
707
|
-
* @default {"display": "button", "max": 2, "moreText": "操作", "todoList": []}
|
|
703
|
+
/**
|
|
704
|
+
* @name 顶部操作
|
|
705
|
+
* @type _ActionGroup
|
|
706
|
+
* @default {"display": "button", "max": 2, "moreText": "操作", "todoList": []}
|
|
708
707
|
*/
|
|
709
708
|
topActionGroup: PropTypes.shape({
|
|
710
709
|
display: PropTypes.oneOf(['text', 'button']),
|
|
@@ -712,86 +711,86 @@ LCTable.propTypes = {
|
|
|
712
711
|
moreText: PropTypes.string,
|
|
713
712
|
todoList: PropTypes.array
|
|
714
713
|
}),
|
|
715
|
-
/**
|
|
716
|
-
* @name 顶部过滤器
|
|
717
|
-
* @type _TableTopFilter
|
|
714
|
+
/**
|
|
715
|
+
* @name 顶部过滤器
|
|
716
|
+
* @type _TableTopFilter
|
|
718
717
|
*/
|
|
719
718
|
topFilter: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.shape({
|
|
720
719
|
options: PropTypes.array.isRequired,
|
|
721
720
|
field: PropTypes.string.isRequired
|
|
722
721
|
})]),
|
|
723
|
-
/**
|
|
724
|
-
* @name 开启行选择器
|
|
725
|
-
* @type boolean
|
|
726
|
-
* @default false
|
|
722
|
+
/**
|
|
723
|
+
* @name 开启行选择器
|
|
724
|
+
* @type boolean
|
|
725
|
+
* @default false
|
|
727
726
|
*/
|
|
728
727
|
rowSelection: PropTypes.bool,
|
|
729
|
-
/**
|
|
730
|
-
* @name 停用分页多选
|
|
731
|
-
* @type boolean
|
|
732
|
-
* @default false
|
|
728
|
+
/**
|
|
729
|
+
* @name 停用分页多选
|
|
730
|
+
* @type boolean
|
|
731
|
+
* @default false
|
|
733
732
|
*/
|
|
734
733
|
suppressRowSelectionPagination: PropTypes.bool,
|
|
735
|
-
/**
|
|
736
|
-
* @name 选择器模式
|
|
737
|
-
* @type segmented
|
|
738
|
-
* @options [{label: '复选', value: 'multiple'}, {label: '单选', value: 'single'}]
|
|
739
|
-
* @default 'multiple'
|
|
734
|
+
/**
|
|
735
|
+
* @name 选择器模式
|
|
736
|
+
* @type segmented
|
|
737
|
+
* @options [{label: '复选', value: 'multiple'}, {label: '单选', value: 'single'}]
|
|
738
|
+
* @default 'multiple'
|
|
740
739
|
*/
|
|
741
740
|
rowSelectionMode: PropTypes.oneOf(['single', 'multiple']),
|
|
742
|
-
/**
|
|
743
|
-
* @name 默认选中
|
|
744
|
-
* @type _JSEditor
|
|
745
|
-
* @default "function getDefaultRowSelected(data, node, ctx) { \n return false; \n}"
|
|
741
|
+
/**
|
|
742
|
+
* @name 默认选中
|
|
743
|
+
* @type _JSEditor
|
|
744
|
+
* @default "function getDefaultRowSelected(data, node, ctx) { \n return false; \n}"
|
|
746
745
|
*/
|
|
747
746
|
defaultRowSelectedCode: PropTypes.string,
|
|
748
|
-
/**
|
|
749
|
-
* @name 行是否可选
|
|
750
|
-
* @type _JSEditor
|
|
751
|
-
* @default "function getRowSelectable(data, node, ctx) { \n return true; \n}"
|
|
747
|
+
/**
|
|
748
|
+
* @name 行是否可选
|
|
749
|
+
* @type _JSEditor
|
|
750
|
+
* @default "function getRowSelectable(data, node, ctx) { \n return true; \n}"
|
|
752
751
|
*/
|
|
753
752
|
rowSelectableCode: PropTypes.string,
|
|
754
|
-
/**
|
|
755
|
-
* @name 导入导出
|
|
756
|
-
* @type _ImpExp
|
|
757
|
-
* @default { "export": true }
|
|
753
|
+
/**
|
|
754
|
+
* @name 导入导出
|
|
755
|
+
* @type _ImpExp
|
|
756
|
+
* @default { "export": true }
|
|
758
757
|
*/
|
|
759
758
|
impexp: PropTypes.shape({
|
|
760
759
|
import: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
761
760
|
importType: PropTypes.bool,
|
|
762
761
|
export: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])
|
|
763
762
|
}),
|
|
764
|
-
/**
|
|
765
|
-
* @name 批量操作
|
|
766
|
-
* @type _BatchActions
|
|
767
|
-
* @default { "todoList": [] }
|
|
763
|
+
/**
|
|
764
|
+
* @name 批量操作
|
|
765
|
+
* @type _BatchActions
|
|
766
|
+
* @default { "todoList": [] }
|
|
768
767
|
*/
|
|
769
768
|
bantchActions: PropTypes.shape({
|
|
770
769
|
todoList: PropTypes.array
|
|
771
770
|
}),
|
|
772
|
-
/**
|
|
773
|
-
* @name 格式化数据
|
|
774
|
-
* @type _JSEditor
|
|
771
|
+
/**
|
|
772
|
+
* @name 格式化数据
|
|
773
|
+
* @type _JSEditor
|
|
775
774
|
*/
|
|
776
775
|
formatDataSource: PropTypes.string,
|
|
777
|
-
/**
|
|
778
|
-
* @name 构建树层级
|
|
779
|
-
* @type _JSEditor
|
|
776
|
+
/**
|
|
777
|
+
* @name 构建树层级
|
|
778
|
+
* @type _JSEditor
|
|
780
779
|
*/
|
|
781
780
|
getDataPath: PropTypes.string,
|
|
782
|
-
/**
|
|
783
|
-
* @name 重写表格列
|
|
784
|
-
* @type _JSEditor
|
|
781
|
+
/**
|
|
782
|
+
* @name 重写表格列
|
|
783
|
+
* @type _JSEditor
|
|
785
784
|
*/
|
|
786
785
|
columnsRewrite: PropTypes.string,
|
|
787
|
-
/**
|
|
788
|
-
* @name 重置表格列
|
|
789
|
-
* @type _JSEditor
|
|
786
|
+
/**
|
|
787
|
+
* @name 重置表格列
|
|
788
|
+
* @type _JSEditor
|
|
790
789
|
*/
|
|
791
790
|
columnsReset: PropTypes.string,
|
|
792
|
-
/**
|
|
793
|
-
* @name model参数
|
|
794
|
-
* @type _JSEditor
|
|
791
|
+
/**
|
|
792
|
+
* @name model参数
|
|
793
|
+
* @type _JSEditor
|
|
795
794
|
*/
|
|
796
795
|
modelParams: PropTypes.string
|
|
797
796
|
};
|
|
@@ -60,7 +60,12 @@
|
|
|
60
60
|
"key": "topActionGroup",
|
|
61
61
|
"name": "顶部按钮组",
|
|
62
62
|
"type": "_ActionsEditor",
|
|
63
|
-
"default": {
|
|
63
|
+
"default": {
|
|
64
|
+
"display": "button",
|
|
65
|
+
"max": 2,
|
|
66
|
+
"moreText": "操作",
|
|
67
|
+
"todoList": []
|
|
68
|
+
},
|
|
64
69
|
"defaultCode": "function todo() { \n \n}",
|
|
65
70
|
"wrapper": "collapse"
|
|
66
71
|
},
|
|
@@ -91,7 +96,12 @@
|
|
|
91
96
|
"key": "actionsColumnWidth",
|
|
92
97
|
"name": "列宽",
|
|
93
98
|
"type": "_WidthHeight",
|
|
94
|
-
"options": [
|
|
99
|
+
"options": [
|
|
100
|
+
{
|
|
101
|
+
"label": "px",
|
|
102
|
+
"value": "px"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
95
105
|
"convertInt": true,
|
|
96
106
|
"default": 160
|
|
97
107
|
},
|
|
@@ -99,10 +109,17 @@
|
|
|
99
109
|
"key": "actions",
|
|
100
110
|
"name": "表格操作项",
|
|
101
111
|
"type": "_ActionsEditor",
|
|
102
|
-
"default": {
|
|
112
|
+
"default": {
|
|
113
|
+
"display": "text",
|
|
114
|
+
"max": 2,
|
|
115
|
+
"moreText": "更多操作",
|
|
116
|
+
"todoList": []
|
|
117
|
+
},
|
|
103
118
|
"defaultCode": "function onActionClick(data, rowIndex, params) {\n\n}",
|
|
104
119
|
"wrapper": "collapse",
|
|
105
|
-
"wrapperProps": {
|
|
120
|
+
"wrapperProps": {
|
|
121
|
+
"suppressIcon": true
|
|
122
|
+
}
|
|
106
123
|
}
|
|
107
124
|
]
|
|
108
125
|
}
|
|
@@ -148,13 +165,17 @@
|
|
|
148
165
|
"key": "bantchActions",
|
|
149
166
|
"name": "批量操作",
|
|
150
167
|
"type": "_ActionsEditor",
|
|
151
|
-
"default": {
|
|
168
|
+
"default": {
|
|
169
|
+
"todoList": []
|
|
170
|
+
},
|
|
152
171
|
"defaultCode": "function onBatchOperationsClick(key, selectedRows) {\n\n}",
|
|
153
172
|
"suppressDisplay": true,
|
|
154
173
|
"suppressMax": true,
|
|
155
174
|
"suppressMore": true,
|
|
156
175
|
"wrapper": "collapse",
|
|
157
|
-
"wrapperProps": {
|
|
176
|
+
"wrapperProps": {
|
|
177
|
+
"suppressIcon": true
|
|
178
|
+
}
|
|
158
179
|
},
|
|
159
180
|
{
|
|
160
181
|
"key": "defaultRowSelectedCode",
|
|
@@ -163,7 +184,9 @@
|
|
|
163
184
|
"defaultCode": "function getRowDefaultSelected(data, node) { \n return false; \n}",
|
|
164
185
|
"mustConfirm": true,
|
|
165
186
|
"wrapper": "collapse",
|
|
166
|
-
"wrapperProps": {
|
|
187
|
+
"wrapperProps": {
|
|
188
|
+
"suppressIcon": true
|
|
189
|
+
}
|
|
167
190
|
},
|
|
168
191
|
{
|
|
169
192
|
"key": "rowSelectableCode",
|
|
@@ -172,7 +195,9 @@
|
|
|
172
195
|
"defaultCode": "function getRowSelectable(data, node) { \n return true; \n}",
|
|
173
196
|
"mustConfirm": true,
|
|
174
197
|
"wrapper": "collapse",
|
|
175
|
-
"wrapperProps": {
|
|
198
|
+
"wrapperProps": {
|
|
199
|
+
"suppressIcon": true
|
|
200
|
+
}
|
|
176
201
|
}
|
|
177
202
|
]
|
|
178
203
|
}
|
|
@@ -186,8 +211,13 @@
|
|
|
186
211
|
"key": "impexp",
|
|
187
212
|
"name": "#导入导出",
|
|
188
213
|
"type": "_ImpExp",
|
|
189
|
-
"default": {
|
|
190
|
-
|
|
214
|
+
"default": {
|
|
215
|
+
"export": true,
|
|
216
|
+
"import": true
|
|
217
|
+
},
|
|
218
|
+
"wrapperProps": {
|
|
219
|
+
"suppressIcon": true
|
|
220
|
+
}
|
|
191
221
|
}
|
|
192
222
|
]
|
|
193
223
|
},
|
|
@@ -294,7 +324,9 @@
|
|
|
294
324
|
"defaultCode": "function formatDataSource(list, detail) { \n return []; \n}",
|
|
295
325
|
"mustConfirm": true,
|
|
296
326
|
"wrapper": "collapse",
|
|
297
|
-
"wrapperProps": {
|
|
327
|
+
"wrapperProps": {
|
|
328
|
+
"suppressIcon": true
|
|
329
|
+
}
|
|
298
330
|
},
|
|
299
331
|
{
|
|
300
332
|
"key": "getDataPath",
|
|
@@ -303,7 +335,9 @@
|
|
|
303
335
|
"defaultCode": "function getDataPath(data) { \n return []; \n}",
|
|
304
336
|
"mustConfirm": true,
|
|
305
337
|
"wrapper": "collapse",
|
|
306
|
-
"wrapperProps": {
|
|
338
|
+
"wrapperProps": {
|
|
339
|
+
"suppressIcon": true
|
|
340
|
+
}
|
|
307
341
|
},
|
|
308
342
|
{
|
|
309
343
|
"key": "columnsRewrite",
|
|
@@ -313,7 +347,9 @@
|
|
|
313
347
|
"defaultCode": "function columnsRewrite(columns) { \n return columns; \n}",
|
|
314
348
|
"mustConfirm": true,
|
|
315
349
|
"wrapper": "collapse",
|
|
316
|
-
"wrapperProps": {
|
|
350
|
+
"wrapperProps": {
|
|
351
|
+
"suppressIcon": true
|
|
352
|
+
}
|
|
317
353
|
},
|
|
318
354
|
{
|
|
319
355
|
"key": "columnsReset",
|
|
@@ -323,7 +359,9 @@
|
|
|
323
359
|
"defaultCode": "function columnsReset(columns) { \n return columns; \n}",
|
|
324
360
|
"mustConfirm": true,
|
|
325
361
|
"wrapper": "collapse",
|
|
326
|
-
"wrapperProps": {
|
|
362
|
+
"wrapperProps": {
|
|
363
|
+
"suppressIcon": true
|
|
364
|
+
}
|
|
327
365
|
},
|
|
328
366
|
{
|
|
329
367
|
"key": "modelParams",
|
|
@@ -332,7 +370,9 @@
|
|
|
332
370
|
"defaultCode": "function getModelParams() { \n return {}; \n}",
|
|
333
371
|
"mustConfirm": true,
|
|
334
372
|
"wrapper": "collapse",
|
|
335
|
-
"wrapperProps": {
|
|
373
|
+
"wrapperProps": {
|
|
374
|
+
"suppressIcon": true
|
|
375
|
+
}
|
|
336
376
|
}
|
|
337
377
|
]
|
|
338
378
|
}
|
|
@@ -402,4 +442,4 @@
|
|
|
402
442
|
}
|
|
403
443
|
]
|
|
404
444
|
}
|
|
405
|
-
}
|
|
445
|
+
}
|