| | |
| | | let amis = amisRequire('amis/embed'); |
| | | // 通过替换下面这个配置来生成不同页面 |
| | | let amisJSON = { |
| | | "type": "form", |
| | | "title": "测试页面2", |
| | | "regions": [ |
| | | "body", |
| | | "toolbar", |
| | | "header" |
| | | ], |
| | | "type": "page", |
| | | "id": "u:8c028a595aa6", |
| | | "body": [ |
| | | { |
| | | "type": "select", |
| | | "type": "form", |
| | | "id": "u:24af29be25d2", |
| | | "title": "表单", |
| | | "body": [ |
| | | { |
| | | "label": "所属运营商:", |
| | | "type": "select", |
| | | "name": "operator", |
| | | "id": "u:970f68a2c4ee", |
| | | "mode": "horizontal", |
| | |
| | | }, |
| | | "labelField": "customerName", |
| | | "valueField": "id", |
| | | "required": true, |
| | | "showInvalidMatch": false, |
| | | "searchable": true, |
| | | "clearable": true, |
| | |
| | | "name": "red", |
| | | "id": "u:b0544634a698", |
| | | "mode": "inline" |
| | | } |
| | | ], |
| | | "id": "u:44bc9a4182ef", |
| | | "toolbar": [ |
| | | }, |
| | | { |
| | | "type": "button", |
| | | "label": "按钮", |
| | | "onEvent": { |
| | | "click": { |
| | | "actions": [ |
| | | { |
| | | "componentId": "u:24af29be25d2", |
| | | "actionType": "submit" |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | "id": "u:e54b81466b5e" |
| | | "id": "u:b96a47957f17" |
| | | } |
| | | ], |
| | | "api": { |
| | | "url": "/ball/save", |
| | | "method": "post", |
| | | "messages": { |
| | | }, |
| | | "dataType": "form" |
| | | } |
| | | } |
| | | ] |
| | | }; |