amis-editor 4.2.0-beta.2 → 5.1.9-beta.0
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/dist/6dbcbb49b6fd405190a9.png +0 -0
- package/dist/component/Editor.d.ts +16 -0
- package/dist/component/RegionWrapper.d.ts +10 -0
- package/dist/component/VRenderer.d.ts +10 -0
- package/dist/component/base/BackTop.d.ts +1 -1
- package/dist/component/control/APIControl.d.ts +1158 -0
- package/dist/component/control/ActionAPIControl.d.ts +1158 -0
- package/dist/component/control/BadgeControl.d.ts +133 -0
- package/dist/component/control/BaseControl.d.ts +248 -0
- package/dist/component/control/DataBindingControl.d.ts +14 -0
- package/dist/component/control/DataPickerControl.d.ts +13 -0
- package/dist/component/control/DateShortCutControl.d.ts +83 -0
- package/dist/component/control/FormulaControl.d.ts +51 -0
- package/dist/component/{Control → control}/OptionControl.d.ts +23 -34
- package/dist/component/{Control → control}/PopoverEdit.d.ts +0 -0
- package/dist/component/control/StatusControl.d.ts +44 -0
- package/dist/component/control/SwitchMoreControl.d.ts +224 -0
- package/dist/component/control/ValidationControl.d.ts +65 -0
- package/dist/component/control/ValidationItem.d.ts +46 -0
- package/dist/component/control/style-control/Background.d.ts +17 -0
- package/dist/component/control/style-control/Border.d.ts +18 -0
- package/dist/component/control/style-control/BoxModel.d.ts +17 -0
- package/dist/component/control/style-control/BoxShadow.d.ts +18 -0
- package/dist/component/control/style-control/Display.d.ts +14 -0
- package/dist/component/control/style-control/Font.d.ts +16 -0
- package/dist/component/control/style-control/font-family.d.ts +11 -0
- package/dist/component/control/style-control/transformation.d.ts +29 -0
- package/dist/component/control/style-control/types.d.ts +8 -0
- package/dist/component/schemaTpl.d.ts +8 -0
- package/dist/component/validator.d.ts +62 -0
- package/dist/dnd/index.d.ts +1 -1
- package/dist/event-action/action-config-panel.d.ts +8 -0
- package/dist/event-action/actions.d.ts +3 -0
- package/dist/event-action/comp-action-select.d.ts +11 -0
- package/dist/event-action/config.d.ts +13 -0
- package/dist/event-action/index.d.ts +459 -0
- package/dist/event-action/schema.d.ts +32 -0
- package/dist/exports.min.js +1 -1
- package/dist/index.d.ts +23 -5
- package/dist/index.min.js +1 -1
- package/dist/manager.d.ts +46 -1
- package/dist/plugin/Alert.d.ts +4 -2
- package/dist/plugin/Button.d.ts +5 -1
- package/dist/plugin/ButtonGroup.d.ts +13 -34
- package/dist/plugin/ButtonToolbar.d.ts +4 -10
- package/dist/plugin/CRUD.d.ts +2 -0
- package/dist/plugin/Chart.d.ts +2 -0
- package/dist/plugin/Collapse.d.ts +1 -0
- package/dist/plugin/CollapseGroup.d.ts +28 -4
- package/dist/plugin/Container.d.ts +2 -1
- package/dist/plugin/Dialog.d.ts +12 -2
- package/dist/plugin/Drawer.d.ts +12 -2
- package/dist/plugin/DropDownButton.d.ts +11 -11
- package/dist/plugin/Form/ButtonGroupSelect.d.ts +7 -2
- package/dist/plugin/Form/ButtonToolbar.d.ts +8 -7
- package/dist/plugin/Form/ChainedSelect.d.ts +3 -0
- package/dist/plugin/Form/Checkbox.d.ts +7 -2
- package/dist/plugin/Form/Checkboxes.d.ts +8 -2
- package/dist/plugin/Form/CodeEditor.d.ts +7 -22
- package/dist/plugin/Form/Combo.d.ts +3 -0
- package/dist/plugin/Form/Control.d.ts +6 -2
- package/dist/plugin/Form/DiffEditor.d.ts +7 -1
- package/dist/plugin/Form/Form.d.ts +6 -0
- package/dist/plugin/Form/Formula.d.ts +1 -25
- package/dist/plugin/Form/InputDate.d.ts +8 -2
- package/dist/plugin/Form/InputDateRange.d.ts +8 -2
- package/dist/plugin/Form/InputDateTime.d.ts +4 -4
- package/dist/plugin/Form/InputDateTimeRange.d.ts +4 -4
- package/dist/plugin/Form/InputEmail.d.ts +1 -0
- package/dist/plugin/Form/InputExcel.d.ts +6 -41
- package/dist/plugin/Form/InputFile.d.ts +7 -3
- package/dist/plugin/Form/InputKV.d.ts +6 -0
- package/dist/plugin/Form/InputMonth.d.ts +1 -0
- package/dist/plugin/Form/InputMonthRange.d.ts +4 -4
- package/dist/plugin/Form/InputPassword.d.ts +1 -0
- package/dist/plugin/Form/InputQuarter.d.ts +1 -0
- package/dist/plugin/Form/InputQuarterRange.d.ts +4 -4
- package/dist/plugin/Form/InputRange.d.ts +3 -0
- package/dist/plugin/Form/InputRating.d.ts +9 -3
- package/dist/plugin/Form/InputText.d.ts +24 -2
- package/dist/plugin/Form/InputTime.d.ts +3 -3
- package/dist/plugin/Form/InputTimeRange.d.ts +20 -0
- package/dist/plugin/Form/InputTree.d.ts +6 -2
- package/dist/plugin/Form/InputURL.d.ts +1 -0
- package/dist/plugin/Form/InputYear.d.ts +1 -0
- package/dist/plugin/Form/InputYearRange.d.ts +20 -0
- package/dist/plugin/Form/ListSelect.d.ts +6 -2
- package/dist/plugin/Form/LocationPicker.d.ts +1 -31
- package/dist/plugin/Form/NestedSelect.d.ts +5 -2
- package/dist/plugin/Form/Radios.d.ts +7 -2
- package/dist/plugin/Form/Select.d.ts +7 -2
- package/dist/plugin/Form/Switch.d.ts +7 -2
- package/dist/plugin/Form/TabsTransfer.d.ts +5 -2
- package/dist/plugin/Form/Textarea.d.ts +7 -1
- package/dist/plugin/Form/Transfer.d.ts +5 -2
- package/dist/plugin/Form/TreeSelect.d.ts +6 -2
- package/dist/plugin/IFrame.d.ts +2 -2
- package/dist/plugin/Nav.d.ts +1 -116
- package/dist/plugin/Others/Action.d.ts +5 -1
- package/dist/plugin/Page.d.ts +5 -2
- package/dist/plugin/Progress.d.ts +5 -1
- package/dist/plugin/Table.d.ts +2 -0
- package/dist/plugin/Tabs.d.ts +33 -2
- package/dist/plugin/TooltipWrapper.d.ts +10 -0
- package/dist/plugin/Tpl.d.ts +2 -1
- package/dist/plugin/Wizard.d.ts +4 -1
- package/dist/plugin.d.ts +37 -1
- package/dist/store/editor.d.ts +55 -28
- package/dist/store/node.d.ts +16 -0
- package/dist/style.css +1 -1
- package/dist/util.d.ts +36 -3
- package/package.json +14 -8
- package/src/component/schemaTpl.tsx +1209 -474
- package/src/plugin/Alert.tsx +69 -48
- package/src/plugin/AnchorNav.tsx +1 -0
- package/src/plugin/Audio.tsx +9 -15
- package/src/plugin/Avatar.tsx +2 -1
- package/src/plugin/Breadcrumb.tsx +2 -1
- package/src/plugin/Button.tsx +257 -188
- package/src/plugin/ButtonGroup.tsx +99 -38
- package/src/plugin/ButtonToolbar.tsx +7 -13
- package/src/plugin/CRUD.tsx +78 -136
- package/src/plugin/Card.tsx +1 -0
- package/src/plugin/Cards.tsx +8 -14
- package/src/plugin/Carousel.tsx +1 -1
- package/src/plugin/Chart.tsx +26 -14
- package/src/plugin/Collapse.tsx +78 -78
- package/src/plugin/CollapseGroup.tsx +165 -83
- package/src/plugin/Container.tsx +59 -6
- package/src/plugin/Custom.tsx +2 -8
- package/src/plugin/CustomRegion.tsx +4 -3
- package/src/plugin/Dialog.tsx +55 -24
- package/src/plugin/Drawer.tsx +65 -35
- package/src/plugin/DropDownButton.tsx +95 -79
- package/src/plugin/Flex.tsx +123 -65
- package/src/plugin/Form/ButtonGroupSelect.tsx +114 -26
- package/src/plugin/Form/ButtonToolbar.tsx +62 -55
- package/src/plugin/Form/ChainedSelect.tsx +45 -0
- package/src/plugin/Form/Checkbox.tsx +122 -33
- package/src/plugin/Form/Checkboxes.tsx +154 -87
- package/src/plugin/Form/CodeEditor.tsx +163 -34
- package/src/plugin/Form/Combo.tsx +104 -65
- package/src/plugin/Form/Control.tsx +16 -70
- package/src/plugin/Form/DiffEditor.tsx +158 -54
- package/src/plugin/Form/FieldSet.tsx +6 -11
- package/src/plugin/Form/Form.tsx +277 -70
- package/src/plugin/Form/Formula.tsx +8 -14
- package/src/plugin/Form/InputArray.tsx +7 -16
- package/src/plugin/Form/InputCity.tsx +1 -1
- package/src/plugin/Form/InputDate.tsx +344 -121
- package/src/plugin/Form/InputDateRange.tsx +303 -161
- package/src/plugin/Form/InputDateTime.tsx +6 -150
- package/src/plugin/Form/InputDateTimeRange.tsx +7 -187
- package/src/plugin/Form/InputEmail.tsx +1 -0
- package/src/plugin/Form/InputExcel.tsx +70 -27
- package/src/plugin/Form/InputFile.tsx +326 -152
- package/src/plugin/Form/InputImage.tsx +1 -1
- package/src/plugin/Form/InputKV.tsx +61 -0
- package/src/plugin/Form/InputMonth.tsx +3 -1
- package/src/plugin/Form/InputMonthRange.tsx +6 -160
- package/src/plugin/Form/InputNumber.tsx +1 -1
- package/src/plugin/Form/InputPassword.tsx +2 -0
- package/src/plugin/Form/InputQuarter.tsx +3 -1
- package/src/plugin/Form/InputQuarterRange.tsx +6 -160
- package/src/plugin/Form/InputRange.tsx +74 -4
- package/src/plugin/Form/InputRating.tsx +347 -35
- package/src/plugin/Form/InputRichText.tsx +2 -3
- package/src/plugin/Form/InputTable.tsx +33 -49
- package/src/plugin/Form/InputTag.tsx +1 -1
- package/src/plugin/Form/InputText.tsx +310 -132
- package/src/plugin/Form/InputTime.tsx +4 -53
- package/src/plugin/Form/InputTimeRange.tsx +41 -0
- package/src/plugin/Form/InputTree.tsx +196 -46
- package/src/plugin/Form/InputURL.tsx +2 -0
- package/src/plugin/Form/InputYear.tsx +2 -0
- package/src/plugin/Form/InputYearRange.tsx +41 -0
- package/src/plugin/Form/Item.tsx +17 -18
- package/src/plugin/Form/ListSelect.tsx +75 -20
- package/src/plugin/Form/LocationPicker.tsx +2 -7
- package/src/plugin/Form/MatrixCheckboxes.tsx +1 -1
- package/src/plugin/Form/NestedSelect.tsx +110 -43
- package/src/plugin/Form/Picker.tsx +2 -5
- package/src/plugin/Form/Radios.tsx +122 -52
- package/src/plugin/Form/Select.tsx +239 -168
- package/src/plugin/Form/Static.tsx +1 -1
- package/src/plugin/Form/Switch.tsx +170 -58
- package/src/plugin/Form/TabsTransfer.tsx +175 -79
- package/src/plugin/Form/Textarea.tsx +146 -36
- package/src/plugin/Form/Transfer.tsx +295 -233
- package/src/plugin/Form/TreeSelect.tsx +287 -146
- package/src/plugin/Grid.tsx +340 -312
- package/src/plugin/HBox.tsx +1 -0
- package/src/plugin/IFrame.tsx +21 -12
- package/src/plugin/Image.tsx +7 -12
- package/src/plugin/Images.tsx +7 -12
- package/src/plugin/Link.tsx +6 -12
- package/src/plugin/List.tsx +6 -10
- package/src/plugin/ListItem.tsx +1 -0
- package/src/plugin/Nav.tsx +7 -9
- package/src/plugin/Others/Action.tsx +16 -10
- package/src/plugin/Others/BasicToolbar.tsx +4 -1
- package/src/plugin/Others/TableCell.tsx +19 -39
- package/src/plugin/Page.tsx +315 -229
- package/src/plugin/Panel.tsx +6 -7
- package/src/plugin/Plain.tsx +3 -6
- package/src/plugin/Progress.tsx +234 -94
- package/src/plugin/Service.tsx +10 -6
- package/src/plugin/Table.tsx +49 -20
- package/src/plugin/TableView.tsx +212 -106
- package/src/plugin/Tabs.tsx +306 -146
- package/src/plugin/TooltipWrapper.tsx +231 -135
- package/src/plugin/Tpl.tsx +68 -52
- package/src/plugin/Video.tsx +9 -20
- package/src/plugin/Wizard.tsx +537 -336
- package/src/plugin/Wrapper.tsx +82 -61
- package/src/plugin.ts +66 -4
- package/static/empty.png +0 -0
- package/dist/component/Control/APIControl.d.ts +0 -504
- package/dist/component/Control/ValidationControl.d.ts +0 -30
- package/dist/component/remarkTpl.d.ts +0 -150
package/src/plugin/HBox.tsx
CHANGED
package/src/plugin/IFrame.tsx
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import {registerEditorPlugin} from '../manager';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
BasePlugin,
|
|
4
|
+
RegionConfig,
|
|
5
|
+
RendererInfo,
|
|
6
|
+
BaseEventContext
|
|
7
|
+
} from '../plugin';
|
|
3
8
|
import {defaultValue, getSchemaTpl, valuePipeOut} from '../component/schemaTpl';
|
|
9
|
+
import {formItemControl} from '../component/control/BaseControl';
|
|
4
10
|
|
|
5
11
|
export class IFramePlugin extends BasePlugin {
|
|
6
12
|
// 关联渲染器名字
|
|
@@ -23,10 +29,10 @@ export class IFramePlugin extends BasePlugin {
|
|
|
23
29
|
};
|
|
24
30
|
|
|
25
31
|
panelTitle = 'iFrame';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
|
|
32
|
+
panelBodyCreator = (context: BaseEventContext) => {
|
|
33
|
+
return formItemControl({
|
|
34
|
+
common: {
|
|
35
|
+
replace: true,
|
|
30
36
|
body: [
|
|
31
37
|
{
|
|
32
38
|
name: 'src',
|
|
@@ -36,8 +42,12 @@ export class IFramePlugin extends BasePlugin {
|
|
|
36
42
|
}
|
|
37
43
|
]
|
|
38
44
|
},
|
|
39
|
-
{
|
|
40
|
-
|
|
45
|
+
status: {
|
|
46
|
+
replace: true,
|
|
47
|
+
body: [getSchemaTpl('visible')]
|
|
48
|
+
},
|
|
49
|
+
style: {
|
|
50
|
+
replace: true,
|
|
41
51
|
body: [
|
|
42
52
|
{
|
|
43
53
|
name: 'width',
|
|
@@ -55,12 +65,11 @@ export class IFramePlugin extends BasePlugin {
|
|
|
55
65
|
getSchemaTpl('className')
|
|
56
66
|
]
|
|
57
67
|
},
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
body: [getSchemaTpl('ref'), getSchemaTpl('visible')]
|
|
68
|
+
validation: {
|
|
69
|
+
hidden: true
|
|
61
70
|
}
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
});
|
|
72
|
+
};
|
|
64
73
|
|
|
65
74
|
renderRenderer(props: any) {
|
|
66
75
|
return this.renderPlaceholder(`IFrame 页面(${props.src})`);
|
package/src/plugin/Image.tsx
CHANGED
|
@@ -98,13 +98,10 @@ export class ImagePlugin extends BasePlugin {
|
|
|
98
98
|
{
|
|
99
99
|
title: '外观',
|
|
100
100
|
body: [
|
|
101
|
-
{
|
|
102
|
-
type: 'switch',
|
|
101
|
+
getSchemaTpl('switch', {
|
|
103
102
|
name: 'enlargeAble',
|
|
104
|
-
label: '开启图片放大功能'
|
|
105
|
-
|
|
106
|
-
className: 'w-full'
|
|
107
|
-
},
|
|
103
|
+
label: '开启图片放大功能'
|
|
104
|
+
}),
|
|
108
105
|
|
|
109
106
|
getSchemaTpl('imageUrl', {
|
|
110
107
|
name: 'originalSrc',
|
|
@@ -113,13 +110,11 @@ export class ImagePlugin extends BasePlugin {
|
|
|
113
110
|
description: '如果不配置将默认使用缩略图地址。'
|
|
114
111
|
}),
|
|
115
112
|
|
|
116
|
-
{
|
|
117
|
-
type: 'switch',
|
|
113
|
+
getSchemaTpl('switch', {
|
|
118
114
|
name: 'showDimensions',
|
|
119
|
-
label: '是否显示图片尺寸'
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
115
|
+
label: '是否显示图片尺寸'
|
|
116
|
+
}),
|
|
117
|
+
|
|
123
118
|
{
|
|
124
119
|
name: 'thumbMode',
|
|
125
120
|
type: 'button-group-select',
|
package/src/plugin/Images.tsx
CHANGED
|
@@ -130,13 +130,10 @@ export class ImagesPlugin extends BasePlugin {
|
|
|
130
130
|
{
|
|
131
131
|
title: '外观',
|
|
132
132
|
body: [
|
|
133
|
-
{
|
|
134
|
-
type: 'switch',
|
|
133
|
+
getSchemaTpl('switch', {
|
|
135
134
|
name: 'enlargeAble',
|
|
136
|
-
label: '开启图片放大功能'
|
|
137
|
-
|
|
138
|
-
className: 'w-full'
|
|
139
|
-
},
|
|
135
|
+
label: '开启图片放大功能'
|
|
136
|
+
}),
|
|
140
137
|
|
|
141
138
|
{
|
|
142
139
|
name: 'originalSrc',
|
|
@@ -146,13 +143,11 @@ export class ImagesPlugin extends BasePlugin {
|
|
|
146
143
|
description: '如果不配置将默认使用缩略图地址。'
|
|
147
144
|
},
|
|
148
145
|
|
|
149
|
-
{
|
|
150
|
-
type: 'switch',
|
|
146
|
+
getSchemaTpl('switch', {
|
|
151
147
|
name: 'showDimensions',
|
|
152
|
-
label: '是否显示图片尺寸'
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
},
|
|
148
|
+
label: '是否显示图片尺寸'
|
|
149
|
+
}),
|
|
150
|
+
|
|
156
151
|
{
|
|
157
152
|
name: 'thumbMode',
|
|
158
153
|
type: 'button-group-select',
|
package/src/plugin/Link.tsx
CHANGED
|
@@ -42,21 +42,15 @@ export class LinkPlugin extends BasePlugin {
|
|
|
42
42
|
description: '不填写时,自动使用目标地址值'
|
|
43
43
|
},
|
|
44
44
|
|
|
45
|
-
{
|
|
45
|
+
getSchemaTpl('switch', {
|
|
46
46
|
name: 'blank',
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
mode: 'inline',
|
|
50
|
-
className: 'w-full'
|
|
51
|
-
},
|
|
47
|
+
label: '是否新窗口打开'
|
|
48
|
+
}),
|
|
52
49
|
|
|
53
|
-
{
|
|
50
|
+
getSchemaTpl('switch', {
|
|
54
51
|
name: 'disabled',
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
mode: 'inline',
|
|
58
|
-
className: 'w-full'
|
|
59
|
-
},
|
|
52
|
+
label: '是否禁用'
|
|
53
|
+
}),
|
|
60
54
|
|
|
61
55
|
{
|
|
62
56
|
name: 'htmlTarget',
|
package/src/plugin/List.tsx
CHANGED
|
@@ -101,22 +101,18 @@ export class ListPlugin extends BasePlugin {
|
|
|
101
101
|
{
|
|
102
102
|
title: '外观',
|
|
103
103
|
body: [
|
|
104
|
-
{
|
|
104
|
+
getSchemaTpl('switch', {
|
|
105
105
|
name: 'showHeader',
|
|
106
|
-
type: 'switch',
|
|
107
|
-
mode: 'inline',
|
|
108
|
-
className: 'block',
|
|
109
106
|
label: '是否显示头部',
|
|
110
107
|
pipeIn: defaultValue(true)
|
|
111
|
-
},
|
|
112
|
-
|
|
108
|
+
}),
|
|
109
|
+
|
|
110
|
+
getSchemaTpl('switch', {
|
|
113
111
|
name: 'showFooter',
|
|
114
|
-
type: 'switch',
|
|
115
|
-
mode: 'inline',
|
|
116
|
-
className: 'block',
|
|
117
112
|
label: '是否显示底部',
|
|
118
113
|
pipeIn: defaultValue(true)
|
|
119
|
-
},
|
|
114
|
+
}),
|
|
115
|
+
|
|
120
116
|
getSchemaTpl('className', {
|
|
121
117
|
label: 'CSS 类名'
|
|
122
118
|
}),
|
package/src/plugin/ListItem.tsx
CHANGED
package/src/plugin/Nav.tsx
CHANGED
|
@@ -68,7 +68,8 @@ export class NavPlugin extends BasePlugin {
|
|
|
68
68
|
{
|
|
69
69
|
type: 'icon-picker',
|
|
70
70
|
name: 'icon',
|
|
71
|
-
label: '图标'
|
|
71
|
+
label: '图标',
|
|
72
|
+
className: 'fix-icon-picker-overflow'
|
|
72
73
|
},
|
|
73
74
|
|
|
74
75
|
{
|
|
@@ -118,8 +119,7 @@ export class NavPlugin extends BasePlugin {
|
|
|
118
119
|
]
|
|
119
120
|
},
|
|
120
121
|
|
|
121
|
-
{
|
|
122
|
-
type: 'switch',
|
|
122
|
+
getSchemaTpl('switch', {
|
|
123
123
|
label: '包含子菜单',
|
|
124
124
|
name: 'children',
|
|
125
125
|
mode: 'inline',
|
|
@@ -129,7 +129,7 @@ export class NavPlugin extends BasePlugin {
|
|
|
129
129
|
messages: {
|
|
130
130
|
validateFailed: '子菜单中存在配置错误,请仔细检查'
|
|
131
131
|
}
|
|
132
|
-
},
|
|
132
|
+
}),
|
|
133
133
|
|
|
134
134
|
{
|
|
135
135
|
name: 'children',
|
|
@@ -163,13 +163,11 @@ export class NavPlugin extends BasePlugin {
|
|
|
163
163
|
{
|
|
164
164
|
title: '外观',
|
|
165
165
|
body: [
|
|
166
|
-
{
|
|
166
|
+
getSchemaTpl('switch', {
|
|
167
167
|
name: 'stacked',
|
|
168
|
-
type: 'switch',
|
|
169
|
-
mode: 'inline',
|
|
170
|
-
className: 'block',
|
|
171
168
|
label: '是否竖着摆放'
|
|
172
|
-
},
|
|
169
|
+
}),
|
|
170
|
+
|
|
173
171
|
getSchemaTpl('className')
|
|
174
172
|
]
|
|
175
173
|
},
|
|
@@ -17,7 +17,7 @@ export class ActionPlugin extends BasePlugin {
|
|
|
17
17
|
const isInDialog = /(?:\/|^)dialog\/.+$/.test(context.path);
|
|
18
18
|
const isInDropdown = /(?:\/|^)dropdown-button\/.+$/.test(context.path);
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
let schema = [
|
|
21
21
|
{
|
|
22
22
|
label: '按钮行为',
|
|
23
23
|
type: 'select',
|
|
@@ -343,6 +343,12 @@ export class ActionPlugin extends BasePlugin {
|
|
|
343
343
|
label: '键盘快捷键'
|
|
344
344
|
}
|
|
345
345
|
];
|
|
346
|
+
|
|
347
|
+
return [{
|
|
348
|
+
type: 'container',
|
|
349
|
+
className: 'p-3',
|
|
350
|
+
body: schema
|
|
351
|
+
}];
|
|
346
352
|
};
|
|
347
353
|
|
|
348
354
|
buildEditorPanel(
|
|
@@ -373,15 +379,15 @@ export class ActionPlugin extends BasePlugin {
|
|
|
373
379
|
};
|
|
374
380
|
}
|
|
375
381
|
|
|
376
|
-
panels.push({
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
});
|
|
382
|
+
// panels.push({
|
|
383
|
+
// key: 'action',
|
|
384
|
+
// icon: 'fa fa-gavel',
|
|
385
|
+
// title: '动作',
|
|
386
|
+
// render: this.manager.makeSchemaFormRender({
|
|
387
|
+
// body: body
|
|
388
|
+
// }),
|
|
389
|
+
// order: 100
|
|
390
|
+
// });
|
|
385
391
|
} else {
|
|
386
392
|
super.buildEditorPanel(context, panels);
|
|
387
393
|
}
|
|
@@ -530,6 +530,8 @@ export class BasicToolbarPlugin extends BasePlugin {
|
|
|
530
530
|
return;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
+
const store = this.manager.store;
|
|
534
|
+
|
|
533
535
|
let menus: Array<ContextMenuItem> = [];
|
|
534
536
|
const contextMenuContext: ContextMenuEventContext = {
|
|
535
537
|
...context,
|
|
@@ -558,7 +560,8 @@ export class BasicToolbarPlugin extends BasePlugin {
|
|
|
558
560
|
onClick: (menu as MenuItem).onSelect
|
|
559
561
|
}))
|
|
560
562
|
}
|
|
561
|
-
]
|
|
563
|
+
],
|
|
564
|
+
panelById: store.activeId
|
|
562
565
|
})
|
|
563
566
|
});
|
|
564
567
|
}
|
|
@@ -61,14 +61,11 @@ export class TableCellPlugin extends BasePlugin {
|
|
|
61
61
|
description: '当没有值时用这个来替代展示'
|
|
62
62
|
},
|
|
63
63
|
|
|
64
|
-
{
|
|
64
|
+
getSchemaTpl('switch', {
|
|
65
65
|
name: 'sortable',
|
|
66
|
-
type: 'switch',
|
|
67
66
|
label: '是否可排序',
|
|
68
|
-
mode: 'inline',
|
|
69
|
-
className: 'w-full',
|
|
70
67
|
description: '开启后可以根据当前列排序(后端排序)。'
|
|
71
|
-
}
|
|
68
|
+
})
|
|
72
69
|
]
|
|
73
70
|
},
|
|
74
71
|
{
|
|
@@ -81,14 +78,12 @@ export class TableCellPlugin extends BasePlugin {
|
|
|
81
78
|
description:
|
|
82
79
|
'当多列的分组名称设置一致时,表格会在显示表头的上层显示超级表头,<a href="https://baidu.github.io/amis/crud/header-group" target="_blank">示例</a>'
|
|
83
80
|
},
|
|
84
|
-
|
|
81
|
+
|
|
82
|
+
getSchemaTpl('switch', {
|
|
85
83
|
name: 'quickEdit',
|
|
86
84
|
label: '启用快速编辑',
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
mode: 'inline',
|
|
90
|
-
className: 'w-full'
|
|
91
|
-
},
|
|
85
|
+
pipeIn: (value: any) => !!value
|
|
86
|
+
}),
|
|
92
87
|
|
|
93
88
|
{
|
|
94
89
|
visibleOn: 'data.quickEdit',
|
|
@@ -111,17 +106,14 @@ export class TableCellPlugin extends BasePlugin {
|
|
|
111
106
|
]
|
|
112
107
|
},
|
|
113
108
|
|
|
114
|
-
{
|
|
115
|
-
visibleOn: 'data.quickEdit',
|
|
109
|
+
getSchemaTpl('switch', {
|
|
116
110
|
name: 'quickEdit.saveImmediately',
|
|
117
111
|
label: '是否立即保存',
|
|
118
|
-
|
|
119
|
-
mode: 'inline',
|
|
120
|
-
className: 'w-full',
|
|
112
|
+
visibleOn: 'data.quickEdit',
|
|
121
113
|
description: '开启后修改即提交,而不是标记修改批量提交。',
|
|
122
114
|
descriptionClassName: 'help-block m-b-none',
|
|
123
115
|
pipeIn: (value: any) => !!value
|
|
124
|
-
},
|
|
116
|
+
}),
|
|
125
117
|
|
|
126
118
|
getSchemaTpl('api', {
|
|
127
119
|
label: '立即保存接口',
|
|
@@ -186,14 +178,11 @@ export class TableCellPlugin extends BasePlugin {
|
|
|
186
178
|
}
|
|
187
179
|
},
|
|
188
180
|
|
|
189
|
-
{
|
|
181
|
+
getSchemaTpl('switch', {
|
|
190
182
|
name: 'popOver',
|
|
191
183
|
label: '启用查看更多展示',
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
mode: 'inline',
|
|
195
|
-
className: 'w-full'
|
|
196
|
-
},
|
|
184
|
+
pipeIn: (value: any) => !!value
|
|
185
|
+
}),
|
|
197
186
|
|
|
198
187
|
{
|
|
199
188
|
name: 'popOver.mode',
|
|
@@ -305,14 +294,11 @@ export class TableCellPlugin extends BasePlugin {
|
|
|
305
294
|
}
|
|
306
295
|
},
|
|
307
296
|
|
|
308
|
-
{
|
|
297
|
+
getSchemaTpl('switch', {
|
|
309
298
|
name: 'copyable',
|
|
310
299
|
label: '启用内容复制功能',
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
mode: 'inline',
|
|
314
|
-
className: 'w-full'
|
|
315
|
-
},
|
|
300
|
+
pipeIn: (value: any) => !!value
|
|
301
|
+
}),
|
|
316
302
|
|
|
317
303
|
{
|
|
318
304
|
visibleOn: 'data.copyable',
|
|
@@ -352,14 +338,11 @@ export class TableCellPlugin extends BasePlugin {
|
|
|
352
338
|
]
|
|
353
339
|
},
|
|
354
340
|
|
|
355
|
-
{
|
|
341
|
+
getSchemaTpl('switch', {
|
|
356
342
|
name: 'toggled',
|
|
357
|
-
type: 'switch',
|
|
358
343
|
label: '默认展示',
|
|
359
|
-
mode: 'inline',
|
|
360
|
-
className: 'w-full',
|
|
361
344
|
pipeIn: defaultValue(true)
|
|
362
|
-
},
|
|
345
|
+
}),
|
|
363
346
|
|
|
364
347
|
{
|
|
365
348
|
name: 'breakpoint',
|
|
@@ -400,18 +383,15 @@ export class TableCellPlugin extends BasePlugin {
|
|
|
400
383
|
: value
|
|
401
384
|
},
|
|
402
385
|
|
|
403
|
-
{
|
|
404
|
-
type: 'switch',
|
|
386
|
+
getSchemaTpl('switch', {
|
|
405
387
|
name: 'className',
|
|
406
388
|
label: '内容强制换行',
|
|
407
|
-
mode: 'inline',
|
|
408
|
-
className: 'w-full',
|
|
409
389
|
pipeIn: (value: any) =>
|
|
410
390
|
typeof value === 'string' && /\word\-break\b/.test(value),
|
|
411
391
|
pipeOut: (value: any, originValue: any) =>
|
|
412
392
|
(value ? 'word-break ' : '') +
|
|
413
393
|
(originValue || '').replace(/\bword\-break\b/g, '').trim()
|
|
414
|
-
},
|
|
394
|
+
}),
|
|
415
395
|
|
|
416
396
|
getSchemaTpl('className'),
|
|
417
397
|
getSchemaTpl('className', {
|