amis-editor 4.2.0-beta.3 → 5.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. package/dist/6dbcbb49b6fd405190a9.png +0 -0
  2. package/dist/component/Editor.d.ts +16 -0
  3. package/dist/component/RegionWrapper.d.ts +10 -0
  4. package/dist/component/ScaffoldModal.d.ts +1 -1
  5. package/dist/component/VRenderer.d.ts +10 -0
  6. package/dist/component/control/APIControl.d.ts +1158 -0
  7. package/dist/component/control/ActionAPIControl.d.ts +1158 -0
  8. package/dist/component/control/BadgeControl.d.ts +133 -0
  9. package/dist/component/control/BaseControl.d.ts +248 -0
  10. package/dist/component/control/DataBindingControl.d.ts +14 -0
  11. package/dist/component/control/DataPickerControl.d.ts +13 -0
  12. package/dist/component/control/DateShortCutControl.d.ts +83 -0
  13. package/dist/component/control/FormulaControl.d.ts +51 -0
  14. package/dist/component/{Control → control}/OptionControl.d.ts +23 -34
  15. package/dist/component/{Control → control}/PopoverEdit.d.ts +0 -0
  16. package/dist/component/control/StatusControl.d.ts +39 -0
  17. package/dist/component/control/SwitchMoreControl.d.ts +224 -0
  18. package/dist/component/control/ValidationControl.d.ts +65 -0
  19. package/dist/component/control/ValidationItem.d.ts +46 -0
  20. package/dist/component/control/style-control/Background.d.ts +17 -0
  21. package/dist/component/control/style-control/Border.d.ts +18 -0
  22. package/dist/component/control/style-control/BoxModel.d.ts +17 -0
  23. package/dist/component/control/style-control/BoxShadow.d.ts +18 -0
  24. package/dist/component/control/style-control/Display.d.ts +14 -0
  25. package/dist/component/control/style-control/Font.d.ts +16 -0
  26. package/dist/component/control/style-control/font-family.d.ts +11 -0
  27. package/dist/component/control/style-control/transformation.d.ts +29 -0
  28. package/dist/component/control/style-control/types.d.ts +8 -0
  29. package/dist/component/schemaTpl.d.ts +8 -0
  30. package/dist/component/validator.d.ts +62 -0
  31. package/dist/dnd/index.d.ts +1 -1
  32. package/dist/event-action/action-config-panel.d.ts +8 -0
  33. package/dist/event-action/actions.d.ts +3 -0
  34. package/dist/event-action/comp-action-select.d.ts +11 -0
  35. package/dist/event-action/config.d.ts +13 -0
  36. package/dist/event-action/index.d.ts +459 -0
  37. package/dist/event-action/schema.d.ts +32 -0
  38. package/dist/exports.min.js +1 -1
  39. package/dist/index.d.ts +23 -5
  40. package/dist/index.min.js +1 -1
  41. package/dist/manager.d.ts +46 -1
  42. package/dist/plugin/Alert.d.ts +4 -2
  43. package/dist/plugin/Button.d.ts +5 -1
  44. package/dist/plugin/ButtonGroup.d.ts +13 -34
  45. package/dist/plugin/ButtonToolbar.d.ts +4 -10
  46. package/dist/plugin/CRUD.d.ts +2 -0
  47. package/dist/plugin/Chart.d.ts +2 -0
  48. package/dist/plugin/Collapse.d.ts +1 -0
  49. package/dist/plugin/CollapseGroup.d.ts +28 -4
  50. package/dist/plugin/Container.d.ts +2 -1
  51. package/dist/plugin/Dialog.d.ts +12 -2
  52. package/dist/plugin/Drawer.d.ts +12 -2
  53. package/dist/plugin/DropDownButton.d.ts +11 -11
  54. package/dist/plugin/Form/ButtonGroupSelect.d.ts +7 -2
  55. package/dist/plugin/Form/ButtonToolbar.d.ts +8 -7
  56. package/dist/plugin/Form/ChainedSelect.d.ts +3 -0
  57. package/dist/plugin/Form/Checkbox.d.ts +7 -2
  58. package/dist/plugin/Form/Checkboxes.d.ts +8 -2
  59. package/dist/plugin/Form/CodeEditor.d.ts +7 -22
  60. package/dist/plugin/Form/Combo.d.ts +3 -0
  61. package/dist/plugin/Form/Control.d.ts +6 -2
  62. package/dist/plugin/Form/DiffEditor.d.ts +7 -1
  63. package/dist/plugin/Form/Form.d.ts +6 -0
  64. package/dist/plugin/Form/Formula.d.ts +1 -25
  65. package/dist/plugin/Form/InputDate.d.ts +8 -2
  66. package/dist/plugin/Form/InputDateRange.d.ts +8 -2
  67. package/dist/plugin/Form/InputDateTime.d.ts +4 -4
  68. package/dist/plugin/Form/InputDateTimeRange.d.ts +4 -4
  69. package/dist/plugin/Form/InputEmail.d.ts +1 -0
  70. package/dist/plugin/Form/InputExcel.d.ts +6 -41
  71. package/dist/plugin/Form/InputFile.d.ts +7 -3
  72. package/dist/plugin/Form/InputKV.d.ts +6 -0
  73. package/dist/plugin/Form/InputMonth.d.ts +1 -0
  74. package/dist/plugin/Form/InputMonthRange.d.ts +4 -4
  75. package/dist/plugin/Form/InputPassword.d.ts +1 -0
  76. package/dist/plugin/Form/InputQuarter.d.ts +1 -0
  77. package/dist/plugin/Form/InputQuarterRange.d.ts +4 -4
  78. package/dist/plugin/Form/InputRange.d.ts +3 -0
  79. package/dist/plugin/Form/InputRating.d.ts +9 -3
  80. package/dist/plugin/Form/InputText.d.ts +24 -2
  81. package/dist/plugin/Form/InputTime.d.ts +3 -3
  82. package/dist/plugin/Form/InputTimeRange.d.ts +20 -0
  83. package/dist/plugin/Form/InputTree.d.ts +6 -2
  84. package/dist/plugin/Form/InputURL.d.ts +1 -0
  85. package/dist/plugin/Form/InputYear.d.ts +1 -0
  86. package/dist/plugin/Form/InputYearRange.d.ts +20 -0
  87. package/dist/plugin/Form/ListSelect.d.ts +6 -2
  88. package/dist/plugin/Form/LocationPicker.d.ts +1 -31
  89. package/dist/plugin/Form/NestedSelect.d.ts +5 -2
  90. package/dist/plugin/Form/Radios.d.ts +7 -2
  91. package/dist/plugin/Form/Select.d.ts +7 -2
  92. package/dist/plugin/Form/Switch.d.ts +7 -2
  93. package/dist/plugin/Form/TabsTransfer.d.ts +5 -2
  94. package/dist/plugin/Form/Textarea.d.ts +7 -1
  95. package/dist/plugin/Form/Transfer.d.ts +5 -2
  96. package/dist/plugin/Form/TreeSelect.d.ts +6 -2
  97. package/dist/plugin/IFrame.d.ts +2 -2
  98. package/dist/plugin/Nav.d.ts +1 -116
  99. package/dist/plugin/Others/Action.d.ts +5 -1
  100. package/dist/plugin/Page.d.ts +5 -2
  101. package/dist/plugin/Progress.d.ts +5 -1
  102. package/dist/plugin/Table.d.ts +2 -0
  103. package/dist/plugin/Tabs.d.ts +33 -2
  104. package/dist/plugin/TooltipWrapper.d.ts +10 -0
  105. package/dist/plugin/Tpl.d.ts +2 -1
  106. package/dist/plugin/Wizard.d.ts +4 -1
  107. package/dist/plugin.d.ts +37 -1
  108. package/dist/store/editor.d.ts +55 -28
  109. package/dist/store/node.d.ts +16 -0
  110. package/dist/style.css +1 -1
  111. package/dist/util.d.ts +36 -3
  112. package/package.json +14 -8
  113. package/src/component/schemaTpl.tsx +1198 -474
  114. package/src/plugin/.DS_Store +0 -0
  115. package/src/plugin/Alert.tsx +69 -48
  116. package/src/plugin/AnchorNav.tsx +1 -0
  117. package/src/plugin/Audio.tsx +9 -15
  118. package/src/plugin/Avatar.tsx +2 -1
  119. package/src/plugin/Breadcrumb.tsx +2 -1
  120. package/src/plugin/Button.tsx +257 -188
  121. package/src/plugin/ButtonGroup.tsx +99 -38
  122. package/src/plugin/ButtonToolbar.tsx +7 -13
  123. package/src/plugin/CRUD.tsx +77 -135
  124. package/src/plugin/Card.tsx +1 -0
  125. package/src/plugin/Cards.tsx +8 -14
  126. package/src/plugin/Carousel.tsx +1 -1
  127. package/src/plugin/Chart.tsx +26 -14
  128. package/src/plugin/Collapse.tsx +78 -78
  129. package/src/plugin/CollapseGroup.tsx +165 -83
  130. package/src/plugin/Container.tsx +59 -6
  131. package/src/plugin/Custom.tsx +2 -8
  132. package/src/plugin/CustomRegion.tsx +4 -3
  133. package/src/plugin/Dialog.tsx +55 -24
  134. package/src/plugin/Drawer.tsx +65 -35
  135. package/src/plugin/DropDownButton.tsx +95 -79
  136. package/src/plugin/Flex.tsx +123 -65
  137. package/src/plugin/Form/ButtonGroupSelect.tsx +114 -26
  138. package/src/plugin/Form/ButtonToolbar.tsx +62 -55
  139. package/src/plugin/Form/ChainedSelect.tsx +45 -0
  140. package/src/plugin/Form/Checkbox.tsx +122 -33
  141. package/src/plugin/Form/Checkboxes.tsx +154 -87
  142. package/src/plugin/Form/CodeEditor.tsx +163 -34
  143. package/src/plugin/Form/Combo.tsx +104 -65
  144. package/src/plugin/Form/Control.tsx +16 -70
  145. package/src/plugin/Form/DiffEditor.tsx +158 -54
  146. package/src/plugin/Form/FieldSet.tsx +6 -11
  147. package/src/plugin/Form/Form.tsx +277 -70
  148. package/src/plugin/Form/Formula.tsx +8 -14
  149. package/src/plugin/Form/InputArray.tsx +7 -16
  150. package/src/plugin/Form/InputCity.tsx +1 -1
  151. package/src/plugin/Form/InputDate.tsx +344 -121
  152. package/src/plugin/Form/InputDateRange.tsx +303 -161
  153. package/src/plugin/Form/InputDateTime.tsx +6 -150
  154. package/src/plugin/Form/InputDateTimeRange.tsx +7 -187
  155. package/src/plugin/Form/InputEmail.tsx +1 -0
  156. package/src/plugin/Form/InputExcel.tsx +70 -27
  157. package/src/plugin/Form/InputFile.tsx +326 -152
  158. package/src/plugin/Form/InputImage.tsx +1 -1
  159. package/src/plugin/Form/InputKV.tsx +61 -0
  160. package/src/plugin/Form/InputMonth.tsx +3 -1
  161. package/src/plugin/Form/InputMonthRange.tsx +6 -160
  162. package/src/plugin/Form/InputNumber.tsx +1 -1
  163. package/src/plugin/Form/InputPassword.tsx +2 -0
  164. package/src/plugin/Form/InputQuarter.tsx +3 -1
  165. package/src/plugin/Form/InputQuarterRange.tsx +6 -160
  166. package/src/plugin/Form/InputRange.tsx +74 -4
  167. package/src/plugin/Form/InputRating.tsx +347 -35
  168. package/src/plugin/Form/InputRichText.tsx +2 -3
  169. package/src/plugin/Form/InputTable.tsx +33 -49
  170. package/src/plugin/Form/InputTag.tsx +1 -1
  171. package/src/plugin/Form/InputText.tsx +310 -132
  172. package/src/plugin/Form/InputTime.tsx +4 -53
  173. package/src/plugin/Form/InputTimeRange.tsx +41 -0
  174. package/src/plugin/Form/InputTree.tsx +196 -46
  175. package/src/plugin/Form/InputURL.tsx +2 -0
  176. package/src/plugin/Form/InputYear.tsx +2 -0
  177. package/src/plugin/Form/InputYearRange.tsx +41 -0
  178. package/src/plugin/Form/Item.tsx +17 -18
  179. package/src/plugin/Form/ListSelect.tsx +75 -20
  180. package/src/plugin/Form/LocationPicker.tsx +2 -7
  181. package/src/plugin/Form/MatrixCheckboxes.tsx +1 -1
  182. package/src/plugin/Form/NestedSelect.tsx +110 -43
  183. package/src/plugin/Form/Picker.tsx +2 -5
  184. package/src/plugin/Form/Radios.tsx +122 -52
  185. package/src/plugin/Form/Select.tsx +239 -168
  186. package/src/plugin/Form/Static.tsx +1 -1
  187. package/src/plugin/Form/Switch.tsx +170 -58
  188. package/src/plugin/Form/TabsTransfer.tsx +175 -79
  189. package/src/plugin/Form/Textarea.tsx +146 -36
  190. package/src/plugin/Form/Transfer.tsx +295 -233
  191. package/src/plugin/Form/TreeSelect.tsx +287 -146
  192. package/src/plugin/Grid.tsx +340 -312
  193. package/src/plugin/HBox.tsx +1 -0
  194. package/src/plugin/IFrame.tsx +21 -12
  195. package/src/plugin/Image.tsx +7 -12
  196. package/src/plugin/Images.tsx +7 -12
  197. package/src/plugin/Link.tsx +6 -12
  198. package/src/plugin/List.tsx +6 -10
  199. package/src/plugin/ListItem.tsx +1 -0
  200. package/src/plugin/Nav.tsx +7 -9
  201. package/src/plugin/Others/Action.tsx +16 -10
  202. package/src/plugin/Others/BasicToolbar.tsx +4 -1
  203. package/src/plugin/Others/TableCell.tsx +19 -39
  204. package/src/plugin/Page.tsx +315 -229
  205. package/src/plugin/Panel.tsx +6 -7
  206. package/src/plugin/Plain.tsx +3 -6
  207. package/src/plugin/Progress.tsx +234 -94
  208. package/src/plugin/Service.tsx +10 -6
  209. package/src/plugin/Table.tsx +49 -20
  210. package/src/plugin/TableView.tsx +212 -106
  211. package/src/plugin/Tabs.tsx +306 -146
  212. package/src/plugin/TooltipWrapper.tsx +231 -135
  213. package/src/plugin/Tpl.tsx +68 -52
  214. package/src/plugin/Video.tsx +9 -20
  215. package/src/plugin/Wizard.tsx +537 -336
  216. package/src/plugin/Wrapper.tsx +82 -61
  217. package/src/plugin.ts +66 -4
  218. package/static/empty.png +0 -0
  219. package/dist/component/Control/APIControl.d.ts +0 -504
  220. package/dist/component/Control/ValidationControl.d.ts +0 -30
  221. package/dist/component/remarkTpl.d.ts +0 -150
@@ -448,6 +448,7 @@ export class HBoxPlugin extends BasePlugin {
448
448
  return (
449
449
  <VRenderer
450
450
  key={node.$$id}
451
+ type={info.type}
451
452
  plugin={info.plugin}
452
453
  renderer={info.renderer}
453
454
  $schema="" // /schemas/GridColumn.json
@@ -1,6 +1,12 @@
1
1
  import {registerEditorPlugin} from '../manager';
2
- import {BasePlugin} from '../plugin';
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
- panelBody = [
27
- getSchemaTpl('tabs', [
28
- {
29
- title: '常规',
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
- title: '外观',
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
- title: '显隐',
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})`);
@@ -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
- mode: 'inline',
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
- mode: 'inline',
121
- className: 'w-full'
122
- },
115
+ label: '是否显示图片尺寸'
116
+ }),
117
+
123
118
  {
124
119
  name: 'thumbMode',
125
120
  type: 'button-group-select',
@@ -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
- mode: 'inline',
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
- mode: 'inline',
154
- className: 'w-full'
155
- },
148
+ label: '是否显示图片尺寸'
149
+ }),
150
+
156
151
  {
157
152
  name: 'thumbMode',
158
153
  type: 'button-group-select',
@@ -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
- type: 'switch',
48
- label: '是否新窗口打开',
49
- mode: 'inline',
50
- className: 'w-full'
51
- },
47
+ label: '是否新窗口打开'
48
+ }),
52
49
 
53
- {
50
+ getSchemaTpl('switch', {
54
51
  name: 'disabled',
55
- type: 'switch',
56
- label: '是否禁用',
57
- mode: 'inline',
58
- className: 'w-full'
59
- },
52
+ label: '是否禁用'
53
+ }),
60
54
 
61
55
  {
62
56
  name: 'htmlTarget',
@@ -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
  }),
@@ -157,6 +157,7 @@ export class ListItemPlugin extends BasePlugin {
157
157
  const id = field.$$id;
158
158
  return (
159
159
  <VRenderer
160
+ type={info.type}
160
161
  plugin={info.plugin}
161
162
  renderer={info.renderer}
162
163
  multifactor
@@ -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
- return [
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
- key: 'action',
378
- icon: 'fa fa-gavel',
379
- title: '动作',
380
- render: this.manager.makeSchemaFormRender({
381
- body: body
382
- }),
383
- order: 100
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
- type: 'switch',
88
- pipeIn: (value: any) => !!value,
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
- type: 'switch',
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
- type: 'switch',
193
- pipeIn: (value: any) => !!value,
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
- type: 'switch',
312
- pipeIn: (value: any) => !!value,
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', {