amis-editor 4.1.0-beta.21 → 4.1.0-beta.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,8 @@ export declare class SwitchControlPlugin extends BasePlugin {
13
13
  type: string;
14
14
  option: string;
15
15
  name: string;
16
+ falseValue: boolean;
17
+ trueValue: boolean;
16
18
  };
17
19
  previewSchema: any;
18
20
  panelTitle: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amis-editor",
3
- "version": "4.1.0-beta.21",
3
+ "version": "4.1.0-beta.22",
4
4
  "description": "amis 可视化编辑器",
5
5
  "main": "dist/index.min.js",
6
6
  "types": "dist/index.d.ts",
@@ -677,6 +677,8 @@ const tpls: {
677
677
  '将当前已选中的选项的某个字段的值,自动填充到表单中某个表单项中,支持数据映射'
678
678
  },
679
679
 
680
+ autoFillApi: {},
681
+
680
682
  apiString: {
681
683
  name: 'api',
682
684
  type: 'input-text',
@@ -73,6 +73,7 @@ export class ItemPlugin extends BasePlugin {
73
73
  ].indexOf(context.schema.type);
74
74
  /** 不支持配置校验属性的组件 */
75
75
  const ignoreValidator = !!~['input-group'].indexOf(context.schema.type);
76
+ const autoFillApi = context.schema.autoFillApi;
76
77
  const renderer: any = context.info.renderer;
77
78
  return [
78
79
  getSchemaTpl('tabs', [
@@ -105,7 +106,8 @@ export class ItemPlugin extends BasePlugin {
105
106
  getSchemaTpl('description'),
106
107
  getSchemaTpl('placeholder'),
107
108
  getSchemaTpl('remark'),
108
- renderer.renderLabel !== false ? getSchemaTpl('labelRemark') : null
109
+ renderer.renderLabel !== false ? getSchemaTpl('labelRemark') : null,
110
+ autoFillApi ? getSchemaTpl('autoFillApi') : null
109
111
  ]
110
112
  },
111
113
 
@@ -30,7 +30,9 @@ export class SwitchControlPlugin extends BasePlugin {
30
30
  scaffold = {
31
31
  type: 'switch',
32
32
  option: '开关',
33
- name: 'switch'
33
+ name: 'switch',
34
+ falseValue: false,
35
+ trueValue: true
34
36
  };
35
37
  previewSchema: any = {
36
38
  type: 'form',
@@ -24,7 +24,7 @@ export class WizardPlugin extends BasePlugin {
24
24
  isBaseComponent = true;
25
25
  description =
26
26
  '表单向导,可以将复杂的多个表单项拆分成多个步骤,一步一步指引用户完成填写。';
27
- docLink = '/amis/zh-CN/components/form/wizard';
27
+ docLink = '/amis/zh-CN/components/wizard';
28
28
  tags = ['功能'];
29
29
  icon = 'fa fa-list-ol';
30
30
 
@@ -14,7 +14,7 @@ export class WrapperPlugin extends BasePlugin {
14
14
  name = '包裹';
15
15
  isBaseComponent = true;
16
16
  description = '类似于容器,唯一的区别在于会默认会有一层内边距。';
17
- docLink = '/amis/zh-CN/components/form/wrapper';
17
+ docLink = '/amis/zh-CN/components/wrapper';
18
18
  tags = ['容器'];
19
19
  icon = 'fa fa-square-o';
20
20
  scaffold = {