mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
65ac422ed6
* 补充容错 * fix: form 中 name 关联顶层数据初始化失效 * 更新 examples * 文档调整 * 删除多余的文档, 调整 schema * schema 调整 * schema 调整 * control 类型容器 control 改成 body * 修复一个选项加载的bug * form 注册直接用 type
47 lines
931 B
JavaScript
47 lines
931 B
JavaScript
import React from 'react';
|
|
|
|
export default {
|
|
title: 'Editor',
|
|
body: [
|
|
{
|
|
type: 'form',
|
|
api: '/api/mock2/saveForm?waitSeconds=2',
|
|
title: '',
|
|
body: [
|
|
{
|
|
name: 'javascript',
|
|
type: 'editor',
|
|
label: 'Javascript',
|
|
language: 'javascript',
|
|
value: 'console.log(1, 2, 3);'
|
|
},
|
|
|
|
{
|
|
name: 'html',
|
|
type: 'editor',
|
|
language: 'html',
|
|
label: 'Html',
|
|
value:
|
|
'<html><head><title>Hello</title></head><body><p>world</p></body></html>'
|
|
},
|
|
|
|
{
|
|
name: 'css',
|
|
type: 'editor',
|
|
language: 'css',
|
|
label: 'CSS',
|
|
value: 'body {color: red;}'
|
|
},
|
|
|
|
{
|
|
name: 'json',
|
|
type: 'editor',
|
|
language: 'json',
|
|
label: 'JSON',
|
|
value: `{"a": 1, "b": 2}`
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|