@luck-design-biz/luckda 0.0.24-2 → 0.0.25
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.js +130 -0
- package/es/components/LDActions/index.less +48 -0
- package/es/components/LdFormList/index.js +1 -1
- package/es/components/LdGrid/index.js +9 -3
- package/es/components/LdTree/index.js +32 -5
- package/es/components/LdTree/index.less +6 -1
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +151 -0
- package/es/lowcode/constants/api-url.js +71 -12
- package/es/lowcode/constants/index.js +3 -1
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +1 -3
- package/es/lowcode/engine/meta/box.props.json +1 -3
- package/es/lowcode/engine/meta/button.props.default.json +1 -1
- package/es/lowcode/engine/meta/button.props.json +1 -1
- package/es/lowcode/engine/meta/cardlist.props.default.json +0 -1
- package/es/lowcode/engine/meta/cardlist.props.json +1 -2
- package/es/lowcode/engine/meta/dialog.props.default.json +0 -1
- package/es/lowcode/engine/meta/dialog.props.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.default.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.default.json +0 -1
- package/es/lowcode/engine/meta/form.props.json +1 -2
- 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 +1 -1
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +132 -26
- 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 +1 -1
- 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/local/local.zh-cn.js +97 -0
- package/es/lowcode/engine/meta/section.props.default.json +1 -1
- package/es/lowcode/engine/meta/section.props.json +1 -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.default.json +18 -2
- package/es/lowcode/engine/meta/table.props.json +207 -32
- package/es/lowcode/engine/meta/tabs.props.default.json +0 -1
- package/es/lowcode/engine/meta/tabs.props.json +0 -1
- package/es/lowcode/engine/meta/text.props.default.json +1 -1
- package/es/lowcode/engine/meta/text.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.default.json +9 -4
- package/es/lowcode/engine/meta/tree.props.json +101 -55
- package/es/lowcode/engine/provider/{ContextProvider.js → ContextProvider/index.js} +71 -41
- package/es/lowcode/engine/tools/helper.js +29 -1
- package/es/lowcode/engine/tools/usePromiseState.js +7 -6
- package/es/lowcode/painter/Panel.js +50 -133
- package/es/lowcode/painter/Ribbon.js +1 -1
- package/es/lowcode/painter/components/ActionBindModal.js +180 -0
- package/es/lowcode/painter/components/AdvancePanel.js +68 -0
- package/es/lowcode/painter/components/AttrsPanel.js +134 -0
- package/es/lowcode/painter/components/Collapse.js +12 -7
- package/es/lowcode/painter/components/FieldSelector.js +44 -0
- package/es/lowcode/painter/components/ListEditor.js +4 -2
- package/es/lowcode/painter/components/PopConfirm.js +10 -3
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +10 -3
- package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +36 -8
- package/es/lowcode/painter/panel-section/ImpExp.js +91 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +48 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +1 -1
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/style/action-bind-modal.less +99 -0
- package/es/lowcode/painter/style/design.less +1 -1
- package/es/lowcode/painter/style/impexp.less +7 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel.less +6 -37
- package/es/lowcode/painter/style/pop-confirm.less +9 -2
- package/es/lowcode/view/lc-components/Box/index.js +20 -4
- package/es/lowcode/view/lc-components/Box/index.less +0 -1
- package/es/lowcode/view/lc-components/Box/meta.json +1 -3
- package/es/lowcode/view/lc-components/Button/meta.json +1 -1
- package/es/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/es/lowcode/view/lc-components/Drawer/index.js +16 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/meta.json +1 -2
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
- 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/FunctionDesign.js +6 -9
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -1
- package/es/lowcode/view/lc-components/Link/meta.json +1 -1
- package/es/lowcode/view/lc-components/Section/meta.json +1 -1
- package/es/lowcode/view/lc-components/Split/meta.json +1 -1
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +35 -2
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +96 -0
- package/es/lowcode/view/lc-components/Table/index.js +255 -35
- package/es/lowcode/view/lc-components/Table/meta.json +179 -32
- package/es/lowcode/view/lc-components/Tabs/meta.json +0 -1
- package/es/lowcode/view/lc-components/Text/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +48 -3
- package/es/lowcode/view/lc-components/Tree/index.js +77 -6
- package/es/lowcode/view/lc-components/Tree/index.less +2 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +97 -55
- package/es/lowcode/view/lc-components/Wrapper.js +2 -2
- package/lib/components/LDActions/index.js +138 -0
- package/lib/components/LDActions/index.less +48 -0
- package/lib/components/LdFormList/index.js +1 -1
- package/lib/components/LdGrid/index.js +8 -2
- package/lib/components/LdTree/index.js +31 -4
- package/lib/components/LdTree/index.less +6 -1
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +157 -0
- package/lib/lowcode/constants/api-url.js +71 -12
- package/lib/lowcode/constants/index.js +4 -2
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/meta/box.props.default.json +1 -3
- package/lib/lowcode/engine/meta/box.props.json +1 -3
- package/lib/lowcode/engine/meta/button.props.default.json +1 -1
- package/lib/lowcode/engine/meta/button.props.json +1 -1
- package/lib/lowcode/engine/meta/cardlist.props.default.json +0 -1
- package/lib/lowcode/engine/meta/cardlist.props.json +1 -2
- package/lib/lowcode/engine/meta/dialog.props.default.json +0 -1
- package/lib/lowcode/engine/meta/dialog.props.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.default.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.default.json +0 -1
- package/lib/lowcode/engine/meta/form.props.json +1 -2
- 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 +1 -1
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +132 -26
- 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 +1 -1
- 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/local/local.zh-cn.js +103 -0
- package/lib/lowcode/engine/meta/section.props.default.json +1 -1
- package/lib/lowcode/engine/meta/section.props.json +1 -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.default.json +18 -2
- package/lib/lowcode/engine/meta/table.props.json +207 -32
- package/lib/lowcode/engine/meta/tabs.props.default.json +0 -1
- package/lib/lowcode/engine/meta/tabs.props.json +0 -1
- package/lib/lowcode/engine/meta/text.props.default.json +1 -1
- package/lib/lowcode/engine/meta/text.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.default.json +9 -4
- package/lib/lowcode/engine/meta/tree.props.json +101 -55
- package/lib/lowcode/engine/provider/{ContextProvider.js → ContextProvider/index.js} +70 -40
- package/lib/lowcode/engine/tools/helper.js +31 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +6 -5
- package/lib/lowcode/painter/Panel.js +48 -131
- package/lib/lowcode/painter/Ribbon.js +1 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +188 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +76 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +142 -0
- package/lib/lowcode/painter/components/Collapse.js +12 -7
- package/lib/lowcode/painter/components/FieldSelector.js +52 -0
- package/lib/lowcode/painter/components/ListEditor.js +4 -2
- package/lib/lowcode/painter/components/PopConfirm.js +10 -3
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +10 -3
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +35 -7
- package/lib/lowcode/painter/panel-section/ImpExp.js +98 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +56 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +1 -1
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +99 -0
- package/lib/lowcode/painter/style/design.less +1 -1
- package/lib/lowcode/painter/style/impexp.less +7 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel.less +6 -37
- package/lib/lowcode/painter/style/pop-confirm.less +9 -2
- package/lib/lowcode/view/lc-components/Box/index.js +17 -2
- package/lib/lowcode/view/lc-components/Box/index.less +0 -1
- package/lib/lowcode/view/lc-components/Box/meta.json +1 -3
- package/lib/lowcode/view/lc-components/Button/meta.json +1 -1
- package/lib/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Drawer/index.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
- 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/FunctionDesign.js +6 -9
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Section/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Split/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +37 -3
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +104 -0
- package/lib/lowcode/view/lc-components/Table/index.js +255 -35
- package/lib/lowcode/view/lc-components/Table/meta.json +179 -32
- package/lib/lowcode/view/lc-components/Tabs/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Text/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +49 -3
- package/lib/lowcode/view/lc-components/Tree/index.js +77 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +2 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +97 -55
- package/lib/lowcode/view/lc-components/Wrapper.js +2 -2
- package/package.json +10 -5
- package/es/lowcode/painter/panel-section/TableActions.js +0 -19
- package/lib/lowcode/painter/panel-section/TableActions.js +0 -26
package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import React, { useRef, useReducer } from 'react';
|
|
3
3
|
import { useMemoizedFn } from 'ahooks';
|
|
4
|
-
import { Tooltip, Icon, Segmented, InputNumber } from 'luck-design/antd';
|
|
4
|
+
import { Tooltip, Icon, Segmented, InputNumber, Input } from 'luck-design/antd';
|
|
5
5
|
import { cloneDeep } from 'lodash';
|
|
6
6
|
import ActionEditor from "./ActionEditor";
|
|
7
|
-
import PanelItem from "
|
|
7
|
+
import PanelItem from "../../components/PanelItem";
|
|
8
8
|
import { SortBox, SortItem } from "../../components/SortBox";
|
|
9
9
|
import { ListEditor, ListEditorItem } from "../../components/ListEditor";
|
|
10
10
|
import PopConfirm from "../../components/PopConfirm";
|
|
@@ -27,7 +27,10 @@ var _DISPLAY_OPTIONS_ = [{
|
|
|
27
27
|
}];
|
|
28
28
|
var ActionsEditor = function ActionsEditor(_ref) {
|
|
29
29
|
var defaultValue = _ref.defaultValue,
|
|
30
|
-
onChange = _ref.onChange
|
|
30
|
+
onChange = _ref.onChange,
|
|
31
|
+
suppressDisplay = _ref.suppressDisplay,
|
|
32
|
+
suppressMax = _ref.suppressMax,
|
|
33
|
+
suppressMore = _ref.suppressMore;
|
|
31
34
|
var valueRef = useRef(cloneDeep(defaultValue));
|
|
32
35
|
var _useReducer = useReducer(listReducer, defaultValue.todoList || []),
|
|
33
36
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
@@ -47,7 +50,17 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
47
50
|
},
|
|
48
51
|
callback: function callback(newActions) {
|
|
49
52
|
valueRef.current.todoList = newActions;
|
|
50
|
-
onChange(valueRef.current);
|
|
53
|
+
onChange(cloneDeep(valueRef.current));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
var handleDelete = useMemoizedFn(function (action) {
|
|
58
|
+
dispatch({
|
|
59
|
+
type: 'delete',
|
|
60
|
+
payload: action.id,
|
|
61
|
+
callback: function callback(newActions) {
|
|
62
|
+
valueRef.current.todoList = newActions;
|
|
63
|
+
onChange(cloneDeep(valueRef.current));
|
|
51
64
|
}
|
|
52
65
|
});
|
|
53
66
|
});
|
|
@@ -57,7 +70,7 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
57
70
|
payload: sortItems,
|
|
58
71
|
callback: function callback(newActions) {
|
|
59
72
|
valueRef.current.todoList = newActions;
|
|
60
|
-
onChange(valueRef.current);
|
|
73
|
+
onChange(cloneDeep(valueRef.current));
|
|
61
74
|
}
|
|
62
75
|
});
|
|
63
76
|
});
|
|
@@ -76,7 +89,7 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
76
89
|
} else {
|
|
77
90
|
valueRef.current[field] = value;
|
|
78
91
|
}
|
|
79
|
-
onChange(valueRef.current);
|
|
92
|
+
onChange(cloneDeep(valueRef.current));
|
|
80
93
|
});
|
|
81
94
|
var renderItemRight = useMemoizedFn(function (action) {
|
|
82
95
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -108,6 +121,9 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
108
121
|
style: {
|
|
109
122
|
marginRight: '8px',
|
|
110
123
|
cursor: 'pointer'
|
|
124
|
+
},
|
|
125
|
+
onClick: function onClick() {
|
|
126
|
+
return handleDelete(action);
|
|
111
127
|
}
|
|
112
128
|
})));
|
|
113
129
|
});
|
|
@@ -118,7 +134,7 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
118
134
|
width: '100%',
|
|
119
135
|
padding: '0 16px'
|
|
120
136
|
}
|
|
121
|
-
}, /*#__PURE__*/React.createElement(PanelItem, {
|
|
137
|
+
}, !suppressDisplay && /*#__PURE__*/React.createElement(PanelItem, {
|
|
122
138
|
suppressPadding: true,
|
|
123
139
|
label: formatMessage({
|
|
124
140
|
id: "".concat(_I18N_PREFIX_, ".display"),
|
|
@@ -131,7 +147,7 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
131
147
|
onChange: function onChange(value) {
|
|
132
148
|
return handleValueChange('display', value);
|
|
133
149
|
}
|
|
134
|
-
})), /*#__PURE__*/React.createElement(PanelItem, {
|
|
150
|
+
})), !suppressMax && /*#__PURE__*/React.createElement(PanelItem, {
|
|
135
151
|
suppressPadding: true,
|
|
136
152
|
label: formatMessage({
|
|
137
153
|
id: "".concat(_I18N_PREFIX_, ".max"),
|
|
@@ -143,6 +159,18 @@ var ActionsEditor = function ActionsEditor(_ref) {
|
|
|
143
159
|
onChange: function onChange(value) {
|
|
144
160
|
return handleValueChange('max', value);
|
|
145
161
|
}
|
|
162
|
+
})), !suppressMore && /*#__PURE__*/React.createElement(PanelItem, {
|
|
163
|
+
suppressPadding: true,
|
|
164
|
+
label: formatMessage({
|
|
165
|
+
id: "".concat(_I18N_PREFIX_, ".moreText"),
|
|
166
|
+
label: '更多显示文字'
|
|
167
|
+
})
|
|
168
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
169
|
+
size: "small",
|
|
170
|
+
defaultValue: defaultValue.moreText,
|
|
171
|
+
onChange: function onChange(e) {
|
|
172
|
+
return handleValueChange('moreText', e.target.value);
|
|
173
|
+
}
|
|
146
174
|
})), /*#__PURE__*/React.createElement(SortBox, {
|
|
147
175
|
datas: todoList.map(function (_ref2) {
|
|
148
176
|
var id = _ref2.id;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useMemoizedFn, useSetState, useUpdateEffect } from 'ahooks';
|
|
4
|
+
import { Checkbox, Row, Col, Input } from 'luck-design/antd';
|
|
5
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
6
|
+
import { isString } from 'lodash';
|
|
7
|
+
import styles from "../style/impexp.less";
|
|
8
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.impexp';
|
|
9
|
+
var ImpExp = function ImpExp(_ref) {
|
|
10
|
+
var defaultValue = _ref.defaultValue,
|
|
11
|
+
onChange = _ref.onChange;
|
|
12
|
+
var _useSetState = useSetState(defaultValue || {}),
|
|
13
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
14
|
+
state = _useSetState2[0],
|
|
15
|
+
setState = _useSetState2[1];
|
|
16
|
+
useUpdateEffect(function () {
|
|
17
|
+
onChange(state);
|
|
18
|
+
}, [state]);
|
|
19
|
+
var handleCheckboxChange = useMemoizedFn(function (e) {
|
|
20
|
+
if (e.target.value === 'import') {
|
|
21
|
+
setState({
|
|
22
|
+
import: e.target.checked
|
|
23
|
+
});
|
|
24
|
+
} else if (e.target.value === 'export') {
|
|
25
|
+
setState({
|
|
26
|
+
export: e.target.checked
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var handleInputChange = useMemoizedFn(function (field, e) {
|
|
31
|
+
var value = e.target.value.trim();
|
|
32
|
+
var _val = value === '' ? true : value;
|
|
33
|
+
console.log(_val);
|
|
34
|
+
if (field === 'import') {
|
|
35
|
+
setState({
|
|
36
|
+
import: _val
|
|
37
|
+
});
|
|
38
|
+
} else if (field === 'export') {
|
|
39
|
+
setState({
|
|
40
|
+
export: _val
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
45
|
+
gutter: [0, 8],
|
|
46
|
+
className: styles['lc-painter-panel-section-impexp']
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
48
|
+
span: 6
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
50
|
+
value: "import",
|
|
51
|
+
checked: !!state.import,
|
|
52
|
+
onChange: handleCheckboxChange
|
|
53
|
+
}, formatMessage({
|
|
54
|
+
id: 'luckda.lowcode.painter.import',
|
|
55
|
+
label: '导入'
|
|
56
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
57
|
+
span: 18
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
59
|
+
size: "small",
|
|
60
|
+
value: isString(state.import) ? state.import : '',
|
|
61
|
+
onChange: function onChange(e) {
|
|
62
|
+
return handleInputChange('import', e);
|
|
63
|
+
},
|
|
64
|
+
placeholder: formatMessage({
|
|
65
|
+
id: "".concat(_I18N_PREFIX_, ".impUrl.placeholder"),
|
|
66
|
+
label: '请输入模版ID或自定义接口'
|
|
67
|
+
})
|
|
68
|
+
})), /*#__PURE__*/React.createElement(Col, {
|
|
69
|
+
span: 6
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
71
|
+
value: "export",
|
|
72
|
+
checked: state.export,
|
|
73
|
+
onChange: handleCheckboxChange
|
|
74
|
+
}, formatMessage({
|
|
75
|
+
id: 'luckda.lowcode.painter.export',
|
|
76
|
+
label: '导出'
|
|
77
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
78
|
+
span: 18
|
|
79
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
80
|
+
size: "small",
|
|
81
|
+
value: isString(state.export) ? state.export : '',
|
|
82
|
+
onChange: function onChange(e) {
|
|
83
|
+
return handleInputChange('export', e);
|
|
84
|
+
},
|
|
85
|
+
placeholder: formatMessage({
|
|
86
|
+
id: "".concat(_I18N_PREFIX_, ".expUrl.placeholder"),
|
|
87
|
+
label: '请输入自定义接口'
|
|
88
|
+
})
|
|
89
|
+
})));
|
|
90
|
+
};
|
|
91
|
+
export default ImpExp;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { useMemoizedFn } from 'ahooks';
|
|
3
|
+
import { Button } from 'luck-design/antd';
|
|
4
|
+
import { debounce } from 'lodash';
|
|
5
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
6
|
+
import PopConfirm from "../components/PopConfirm";
|
|
7
|
+
import FullScreenEditor from "../components/code-editor/FullScreenEditor";
|
|
8
|
+
import JSEditor from "../components/code-editor/JSEditor";
|
|
9
|
+
var _JSEditor = function _JSEditor(_ref) {
|
|
10
|
+
var defaultValue = _ref.defaultValue,
|
|
11
|
+
defaultCode = _ref.defaultCode,
|
|
12
|
+
onChange = _ref.onChange,
|
|
13
|
+
mustConfirm = _ref.mustConfirm;
|
|
14
|
+
var editorRef = useRef();
|
|
15
|
+
var handleCodeChange = useRef(debounce(function (code) {
|
|
16
|
+
if (!mustConfirm) onChange(code);
|
|
17
|
+
}, 400));
|
|
18
|
+
var handleConfirm = useMemoizedFn(function () {
|
|
19
|
+
onChange(editorRef.current.editor.getValue());
|
|
20
|
+
});
|
|
21
|
+
var handleEditorLoad = useMemoizedFn(function () {
|
|
22
|
+
editorRef.current.editor.setValue(defaultValue || defaultCode);
|
|
23
|
+
});
|
|
24
|
+
return /*#__PURE__*/React.createElement(PopConfirm, {
|
|
25
|
+
placement: "left",
|
|
26
|
+
title: /*#__PURE__*/React.createElement(FullScreenEditor, {
|
|
27
|
+
ref: editorRef,
|
|
28
|
+
EditorComponent: JSEditor,
|
|
29
|
+
width: "600px",
|
|
30
|
+
height: "400px",
|
|
31
|
+
onChange: handleCodeChange.current,
|
|
32
|
+
onLoad: handleEditorLoad
|
|
33
|
+
}),
|
|
34
|
+
showBtn: mustConfirm,
|
|
35
|
+
onConfirm: handleConfirm
|
|
36
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
style: {
|
|
38
|
+
padding: '0 16px'
|
|
39
|
+
}
|
|
40
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
41
|
+
block: true,
|
|
42
|
+
size: "small"
|
|
43
|
+
}, formatMessage({
|
|
44
|
+
id: 'luckda.lowcode.painter.panel-section.style-panel.sourceedit',
|
|
45
|
+
label: '源码编辑'
|
|
46
|
+
}))));
|
|
47
|
+
};
|
|
48
|
+
export default _JSEditor;
|
|
@@ -38,7 +38,7 @@ var MainPanel = function MainPanel() {
|
|
|
38
38
|
payload: code
|
|
39
39
|
});
|
|
40
40
|
}, []);
|
|
41
|
-
var
|
|
41
|
+
var handleEditorLoad = useCallback(function () {
|
|
42
42
|
editorRef.current.editor.setValue(currentCoce.current);
|
|
43
43
|
}, []);
|
|
44
44
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -58,7 +58,7 @@ var MainPanel = function MainPanel() {
|
|
|
58
58
|
width: "280px",
|
|
59
59
|
height: "300px",
|
|
60
60
|
onChange: handleCodeChange,
|
|
61
|
-
onLoad:
|
|
61
|
+
onLoad: handleEditorLoad
|
|
62
62
|
})
|
|
63
63
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
64
64
|
type: "primary",
|
|
@@ -44,7 +44,7 @@ export function StyleProvider(_ref) {
|
|
|
44
44
|
throw new Error();
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
var _useReducer = useReducer(styleReducer, parseCSS(value)),
|
|
47
|
+
var _useReducer = useReducer(styleReducer, parseCSS(":root{".concat(value, "}"))),
|
|
48
48
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
49
49
|
style = _useReducer2[0],
|
|
50
50
|
dispatch = _useReducer2[1];
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import React, { useReducer, useState } from 'react';
|
|
4
|
+
import { useSetState, useMemoizedFn } from 'ahooks';
|
|
5
|
+
import { Tooltip, Radio, Input, Icon } from 'luck-design/antd';
|
|
6
|
+
import { isString, isArray, isNil } from 'lodash';
|
|
7
|
+
import { formatMessage, suid } from '@luck-design-biz/base/utils';
|
|
8
|
+
import { SortBox, SortItem } from "../components/SortBox";
|
|
9
|
+
import { ListEditor, ListEditorItem } from "../components/ListEditor";
|
|
10
|
+
import PopConfirm from "../components/PopConfirm";
|
|
11
|
+
import { PopForm, PopFormItem, PopFormItemLeft, PopFormItemRight } from "../components/PopForm";
|
|
12
|
+
import FieldSelector from "../components/FieldSelector";
|
|
13
|
+
import { listReducer } from "../../engine/tools/helper";
|
|
14
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.tableTopFilter';
|
|
15
|
+
var _RADIO_STYLE_ = {
|
|
16
|
+
display: 'block',
|
|
17
|
+
margin: '0 0 4px 0',
|
|
18
|
+
lineHeight: 0.4
|
|
19
|
+
};
|
|
20
|
+
var TableTopFilter = function TableTopFilter(_ref) {
|
|
21
|
+
var defaultValue = _ref.defaultValue,
|
|
22
|
+
_onChange = _ref.onChange;
|
|
23
|
+
var _useState = useState(function () {
|
|
24
|
+
if (isNil(defaultValue)) return 'nil';
|
|
25
|
+
if (isString(defaultValue)) return 'customApi';
|
|
26
|
+
if (isArray(defaultValue)) return 'custom';
|
|
27
|
+
return 'dict';
|
|
28
|
+
}),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
type = _useState2[0],
|
|
31
|
+
setType = _useState2[1];
|
|
32
|
+
var _useSetState = useSetState(type === 'dict' ? defaultValue : null),
|
|
33
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
34
|
+
dict = _useSetState2[0],
|
|
35
|
+
setDict = _useSetState2[1];
|
|
36
|
+
var _useReducer = useReducer(listReducer, type === 'custom' ? defaultValue : []),
|
|
37
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
38
|
+
options = _useReducer2[0],
|
|
39
|
+
dispatch = _useReducer2[1];
|
|
40
|
+
var _useState3 = useState(type === 'customApi' ? defaultValue : void 0),
|
|
41
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
42
|
+
apiUrl = _useState4[0],
|
|
43
|
+
setApiUrl = _useState4[1];
|
|
44
|
+
var handleAdd = useMemoizedFn(function () {
|
|
45
|
+
var id = suid();
|
|
46
|
+
dispatch({
|
|
47
|
+
type: 'add',
|
|
48
|
+
payload: {
|
|
49
|
+
id: id,
|
|
50
|
+
value: id,
|
|
51
|
+
field: id,
|
|
52
|
+
label: "\u8FC7\u6EE4\u9879".concat(options.length + 1)
|
|
53
|
+
},
|
|
54
|
+
callback: function callback(newOptions) {
|
|
55
|
+
return _onChange(newOptions);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
var handleDelete = useMemoizedFn(function (opt) {
|
|
60
|
+
dispatch({
|
|
61
|
+
type: 'delete',
|
|
62
|
+
payload: opt.id,
|
|
63
|
+
callback: function callback(newOptions) {
|
|
64
|
+
return _onChange(newOptions);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
var handleChange = useMemoizedFn(function (opt) {
|
|
69
|
+
dispatch({
|
|
70
|
+
type: 'edit',
|
|
71
|
+
payload: {
|
|
72
|
+
id: opt.id,
|
|
73
|
+
data: opt
|
|
74
|
+
},
|
|
75
|
+
callback: function callback(newOptions) {
|
|
76
|
+
return _onChange(newOptions);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
var handleSortChange = useMemoizedFn(function (sortItems) {
|
|
81
|
+
dispatch({
|
|
82
|
+
type: 'sort',
|
|
83
|
+
payload: sortItems,
|
|
84
|
+
callback: function callback(newOptions) {
|
|
85
|
+
return _onChange(newOptions);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
var handleTypeChange = useMemoizedFn(function (e) {
|
|
90
|
+
setType(e.target.value);
|
|
91
|
+
_onChange({
|
|
92
|
+
nil: null,
|
|
93
|
+
dict: dict,
|
|
94
|
+
custom: options,
|
|
95
|
+
customApi: apiUrl
|
|
96
|
+
}[e.target.value]);
|
|
97
|
+
});
|
|
98
|
+
var renderItemRight = useMemoizedFn(function (opt) {
|
|
99
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
100
|
+
title: formatMessage({
|
|
101
|
+
id: 'luckda.lowcode.painter.edit',
|
|
102
|
+
label: '编辑'
|
|
103
|
+
})
|
|
104
|
+
}, /*#__PURE__*/React.createElement(PopConfirm, {
|
|
105
|
+
placement: "left",
|
|
106
|
+
title: /*#__PURE__*/React.createElement(PopForm, null, /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
107
|
+
id: "".concat(_I18N_PREFIX_, ".label"),
|
|
108
|
+
label: '名称'
|
|
109
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Input, {
|
|
110
|
+
size: "small",
|
|
111
|
+
defaultValue: opt.label,
|
|
112
|
+
onChange: function onChange(e) {
|
|
113
|
+
return handleChange(_objectSpread(_objectSpread({}, opt), {}, {
|
|
114
|
+
label: e.target.value
|
|
115
|
+
}));
|
|
116
|
+
},
|
|
117
|
+
placeholder: formatMessage({
|
|
118
|
+
id: "".concat(_I18N_PREFIX_, ".label.placeholder"),
|
|
119
|
+
label: '请输入过滤项名称'
|
|
120
|
+
})
|
|
121
|
+
}))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
122
|
+
id: "".concat(_I18N_PREFIX_, ".value"),
|
|
123
|
+
label: '值'
|
|
124
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Input, {
|
|
125
|
+
size: "small",
|
|
126
|
+
defaultValue: opt.value,
|
|
127
|
+
onChange: function onChange(e) {
|
|
128
|
+
return handleChange(_objectSpread(_objectSpread({}, opt), {}, {
|
|
129
|
+
value: e.target.value
|
|
130
|
+
}));
|
|
131
|
+
},
|
|
132
|
+
placeholder: formatMessage({
|
|
133
|
+
id: "".concat(_I18N_PREFIX_, ".value.placeholder"),
|
|
134
|
+
label: '请输入过滤项值'
|
|
135
|
+
})
|
|
136
|
+
}))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
|
|
137
|
+
id: "".concat(_I18N_PREFIX_, ".field"),
|
|
138
|
+
label: '字段'
|
|
139
|
+
})), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(FieldSelector, {
|
|
140
|
+
defaultValue: opt.field,
|
|
141
|
+
style: {
|
|
142
|
+
width: '50%'
|
|
143
|
+
},
|
|
144
|
+
placeholder: formatMessage({
|
|
145
|
+
id: "".concat(_I18N_PREFIX_, ".field.placeholder"),
|
|
146
|
+
label: '请选择过滤字段'
|
|
147
|
+
}),
|
|
148
|
+
onChange: function onChange(e) {
|
|
149
|
+
return handleChange(_objectSpread(_objectSpread({}, opt), {}, {
|
|
150
|
+
field: e.target.value
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
}))))
|
|
154
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
155
|
+
type: "edit",
|
|
156
|
+
style: {
|
|
157
|
+
marginRight: '8px',
|
|
158
|
+
cursor: 'pointer'
|
|
159
|
+
}
|
|
160
|
+
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
161
|
+
title: formatMessage({
|
|
162
|
+
id: 'luckda.lowcode.painter.delete',
|
|
163
|
+
label: '删除'
|
|
164
|
+
})
|
|
165
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
166
|
+
type: "delete",
|
|
167
|
+
style: {
|
|
168
|
+
marginRight: '8px',
|
|
169
|
+
cursor: 'pointer'
|
|
170
|
+
},
|
|
171
|
+
onClick: function onClick() {
|
|
172
|
+
return handleDelete(action);
|
|
173
|
+
}
|
|
174
|
+
})));
|
|
175
|
+
});
|
|
176
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
177
|
+
style: {
|
|
178
|
+
width: '100%',
|
|
179
|
+
padding: '0 16px'
|
|
180
|
+
}
|
|
181
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
182
|
+
value: type,
|
|
183
|
+
style: {
|
|
184
|
+
width: '100%'
|
|
185
|
+
},
|
|
186
|
+
onChange: handleTypeChange
|
|
187
|
+
}, /*#__PURE__*/React.createElement(Radio, {
|
|
188
|
+
style: _RADIO_STYLE_,
|
|
189
|
+
value: "nil"
|
|
190
|
+
}, formatMessage({
|
|
191
|
+
id: "".concat(_I18N_PREFIX_, ".nil"),
|
|
192
|
+
label: '关闭过滤器'
|
|
193
|
+
})), /*#__PURE__*/React.createElement(Radio, {
|
|
194
|
+
style: _RADIO_STYLE_,
|
|
195
|
+
value: "dict"
|
|
196
|
+
}, formatMessage({
|
|
197
|
+
id: "".concat(_I18N_PREFIX_, ".dict"),
|
|
198
|
+
label: '数据字典'
|
|
199
|
+
}), type === 'dict' && /*#__PURE__*/React.createElement(Input.Group, {
|
|
200
|
+
compact: true,
|
|
201
|
+
style: {
|
|
202
|
+
marginTop: 4
|
|
203
|
+
}
|
|
204
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
205
|
+
size: "small",
|
|
206
|
+
value: dict === null || dict === void 0 ? void 0 : dict.key,
|
|
207
|
+
style: {
|
|
208
|
+
width: '50%'
|
|
209
|
+
},
|
|
210
|
+
placeholder: formatMessage({
|
|
211
|
+
id: "".concat(_I18N_PREFIX_, ".dict.placeholder"),
|
|
212
|
+
label: '请输入字典key'
|
|
213
|
+
}),
|
|
214
|
+
onChange: function onChange(e) {
|
|
215
|
+
var key = e.target.value;
|
|
216
|
+
setDict({
|
|
217
|
+
key: key
|
|
218
|
+
});
|
|
219
|
+
if (dict !== null && dict !== void 0 && dict.field) _onChange(_objectSpread(_objectSpread({}, dict), {}, {
|
|
220
|
+
key: key
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
223
|
+
}), /*#__PURE__*/React.createElement(FieldSelector, {
|
|
224
|
+
style: {
|
|
225
|
+
width: '50%'
|
|
226
|
+
},
|
|
227
|
+
defaultValue: dict === null || dict === void 0 ? void 0 : dict.field,
|
|
228
|
+
placeholder: formatMessage({
|
|
229
|
+
id: "".concat(_I18N_PREFIX_, ".field.placeholder"),
|
|
230
|
+
label: '请选择过滤字段'
|
|
231
|
+
}),
|
|
232
|
+
onChange: function onChange(field) {
|
|
233
|
+
setDict({
|
|
234
|
+
field: field
|
|
235
|
+
});
|
|
236
|
+
if (dict !== null && dict !== void 0 && dict.key) _onChange(_objectSpread(_objectSpread({}, dict), {}, {
|
|
237
|
+
field: field
|
|
238
|
+
}));
|
|
239
|
+
}
|
|
240
|
+
}))), /*#__PURE__*/React.createElement(Radio, {
|
|
241
|
+
style: _RADIO_STYLE_,
|
|
242
|
+
value: "custom"
|
|
243
|
+
}, formatMessage({
|
|
244
|
+
id: "".concat(_I18N_PREFIX_, ".custom"),
|
|
245
|
+
label: '自定义项'
|
|
246
|
+
}), type === 'custom' && /*#__PURE__*/React.createElement(SortBox, {
|
|
247
|
+
datas: options.map(function (_ref2) {
|
|
248
|
+
var id = _ref2.id;
|
|
249
|
+
return id;
|
|
250
|
+
}),
|
|
251
|
+
onChange: handleSortChange
|
|
252
|
+
}, /*#__PURE__*/React.createElement(ListEditor, {
|
|
253
|
+
style: {
|
|
254
|
+
marginTop: 8
|
|
255
|
+
},
|
|
256
|
+
addText: formatMessage({
|
|
257
|
+
id: "".concat(_I18N_PREFIX_, ".add"),
|
|
258
|
+
label: '添加过滤项'
|
|
259
|
+
}),
|
|
260
|
+
handleAdd: handleAdd
|
|
261
|
+
}, options.map(function (opt) {
|
|
262
|
+
return /*#__PURE__*/React.createElement(SortItem, {
|
|
263
|
+
key: opt.id,
|
|
264
|
+
id: opt.id
|
|
265
|
+
}, /*#__PURE__*/React.createElement(ListEditorItem, {
|
|
266
|
+
left: /*#__PURE__*/React.createElement("span", null, opt.label),
|
|
267
|
+
right: renderItemRight(opt),
|
|
268
|
+
item: opt,
|
|
269
|
+
dispatch: dispatch
|
|
270
|
+
}));
|
|
271
|
+
})))), /*#__PURE__*/React.createElement(Radio, {
|
|
272
|
+
style: _RADIO_STYLE_,
|
|
273
|
+
value: "customApi"
|
|
274
|
+
}, formatMessage({
|
|
275
|
+
id: "".concat(_I18N_PREFIX_, ".customApi"),
|
|
276
|
+
label: '自定义接口'
|
|
277
|
+
}), type === 'customApi' && /*#__PURE__*/React.createElement(Input, {
|
|
278
|
+
size: "small",
|
|
279
|
+
value: apiUrl,
|
|
280
|
+
placeholder: formatMessage({
|
|
281
|
+
id: "".concat(_I18N_PREFIX_, ".dict.placeholder"),
|
|
282
|
+
label: '请输入接口地址'
|
|
283
|
+
}),
|
|
284
|
+
style: {
|
|
285
|
+
display: 'block',
|
|
286
|
+
marginTop: 8
|
|
287
|
+
},
|
|
288
|
+
suffix: /*#__PURE__*/React.createElement(Tooltip, {
|
|
289
|
+
title: formatMessage({
|
|
290
|
+
id: "".concat(_I18N_PREFIX_, ".customApi.tip"),
|
|
291
|
+
label: '接口返回数据格式必须是: {mainInfo:{options:[{value: string,label: stirng}], field: string}}'
|
|
292
|
+
})
|
|
293
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
294
|
+
type: "info-circle",
|
|
295
|
+
style: {
|
|
296
|
+
color: 'rgba(0,0,0,.45)'
|
|
297
|
+
}
|
|
298
|
+
})),
|
|
299
|
+
onChange: function onChange(e) {
|
|
300
|
+
var val = e.target.value;
|
|
301
|
+
setApiUrl(val);
|
|
302
|
+
_onChange(val);
|
|
303
|
+
}
|
|
304
|
+
}))));
|
|
305
|
+
};
|
|
306
|
+
export default TableTopFilter;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
.lc-painter-panel-action-bind-modal {
|
|
2
|
+
&-body {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 460px;
|
|
5
|
+
display: flex;
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
|
|
8
|
+
&-left {
|
|
9
|
+
width: 320px;
|
|
10
|
+
|
|
11
|
+
.selector-box {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 420px;
|
|
14
|
+
border: 1px solid #e8e8e8;
|
|
15
|
+
border-radius: 6px;
|
|
16
|
+
display: flex;
|
|
17
|
+
|
|
18
|
+
.selector-box-ul {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
padding: 0;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
flex-grow: 0;
|
|
24
|
+
|
|
25
|
+
li {
|
|
26
|
+
height: 28px;
|
|
27
|
+
line-height: 28px;
|
|
28
|
+
padding: 0 30px 0 12px;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
position: relative;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
|
|
35
|
+
.check-icon {
|
|
36
|
+
position: absolute;
|
|
37
|
+
right: 12px;
|
|
38
|
+
top: 8px;
|
|
39
|
+
height: 12px;
|
|
40
|
+
color: #006cff;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
li.active {
|
|
44
|
+
background: rgba(31, 56, 88, 0.06);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.selector-box-ul.action-category {
|
|
48
|
+
width: 120px;
|
|
49
|
+
border-right: 1px solid #e8e8e8;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.selecter-items-box {
|
|
53
|
+
width: 200px;
|
|
54
|
+
height: 100%;
|
|
55
|
+
|
|
56
|
+
.selecter-items {
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: calc(100% - 48px);
|
|
59
|
+
overflow-y: auto;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-right {
|
|
66
|
+
margin-left: 12px;
|
|
67
|
+
flex: 1;
|
|
68
|
+
|
|
69
|
+
.code-box {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 420px;
|
|
72
|
+
border: 1px solid #e8e8e8;
|
|
73
|
+
border-radius: 6px;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
p {
|
|
79
|
+
height: 32px;
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
font-weight: 700;
|
|
82
|
+
margin-bottom: 8px;
|
|
83
|
+
color: rgba(0, 0, 0, 0.8);
|
|
84
|
+
display: flex;
|
|
85
|
+
-webkit-box-align: center;
|
|
86
|
+
align-items: center;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:global {
|
|
91
|
+
.ant-modal-header,
|
|
92
|
+
.ant-modal-footer {
|
|
93
|
+
border: none;
|
|
94
|
+
}
|
|
95
|
+
.ant-input-sm {
|
|
96
|
+
font-size: 12px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|