mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 21:49:09 +08:00
48 lines
996 B
JavaScript
48 lines
996 B
JavaScript
import React from 'react';
|
|
|
|
export default {
|
|
$schema: 'https://houtai.baidu.com/v2/schemas/page.json#',
|
|
title: 'Editor',
|
|
body: [
|
|
{
|
|
type: 'form',
|
|
api: '/api/mock2/saveForm?waitSeconds=2',
|
|
title: '',
|
|
controls: [
|
|
{
|
|
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}`
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|