Skip to content

Commit 9725444

Browse files
committed
small change
1 parent b22763e commit 9725444

File tree

8 files changed

+2762
-90
lines changed

8 files changed

+2762
-90
lines changed

_amis/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
- amis
44
- https://baidu.github.io/amis/docs/sdk#%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86
55

6-
待测试
6+
和mobx有冲突??

_amis/table/index.ejs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<link rel="icon" href="/favicon.png" type="image/x-icon" />
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
<link href="https://cdn.bootcss.com/normalize/7.0.0/normalize.min.css" rel="stylesheet">
10+
<link href="https://cdn.bootcss.com/tailwindcss/0.7.3/utilities.min.css" rel="stylesheet">
11+
<link href="https://cdn.bootcss.com/antd/3.23.6/antd.min.css" rel="stylesheet">
12+
13+
</head>
14+
<body>
15+
16+
<div id="root" class="p-5"></div>
17+
</body>
18+
</html>

_amis/table/index.tsx

Lines changed: 27 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,27 @@
1-
// import * as React from 'react';
2-
// import {
3-
// render as renderAmis
4-
// } from 'amis';
5-
//
6-
// class App extends React.Component<any, any> {
7-
// render() {
8-
// return (
9-
// <div>
10-
// <p>通过 amis 渲染页面</p>
11-
// {renderAmis({
12-
// // schema
13-
// // 这里是 amis 的 Json 配置。
14-
// type: 'page',
15-
// title: '简单页面',
16-
// body: '内容'
17-
// }, {
18-
// // props
19-
// }, {
20-
// // env
21-
// // 这些是 amis 需要的一些接口实现
22-
// // 可以参考本项目里面的 Demo 部分代码。
23-
//
24-
// updateLocation: (location: string/*目标地址*/, replace: boolean/*是replace,还是push?*/) => {
25-
// // 用来更新地址栏
26-
// },
27-
//
28-
// jumpTo: (location: string/*目标地址*/) => {
29-
// // 页面跳转, actionType: link、url 都会进来。
30-
// },
31-
//
32-
// fetcher: ({
33-
// url,
34-
// method,
35-
// data,
36-
// config
37-
// }: {
38-
// url: string/*目标地址*/,
39-
// method: 'get' | 'post' | 'put' | 'delete'/*发送方式*/,
40-
// data: object | void/*数据*/,
41-
// config: object/*其他配置*/
42-
// }) => {
43-
// // 用来发送 Ajax 请求,建议使用 axios
44-
// },
45-
// notify: (type: 'error' | 'success'/**/, msg: string/*提示内容*/) => {
46-
// // 用来提示用户
47-
// },
48-
// alert: (content: string/*提示信息*/) => {
49-
// // 另外一种提示,可以直接用系统框
50-
// },
51-
// confirm: (content: string/*提示信息*/) => {
52-
// // 确认框。
53-
// }
54-
// })
55-
// }
56-
// </div>
57-
// );
58-
// }
59-
// }
60-
//
61-
// ReactDOM.render(<App/>, mountNode)
1+
import React from 'react';
2+
import {
3+
render as renderAmis
4+
} from 'amis';
5+
6+
import ReactDOM from 'react-dom'
7+
8+
const json = {
9+
"$schema": "https://houtai.baidu.com/v2/schemas/page.json#",
10+
"type": "page",
11+
"title": "这是标题部分",
12+
"subTitle": "这是子标题",
13+
"remark": "这是小提示信息",
14+
"aside": "这是侧边栏部分",
15+
"body": "这是内容区",
16+
"toolbar": "这是工具栏部分"
17+
}
18+
19+
class App extends React.Component<any, any> {
20+
render() {
21+
return (<div>
22+
{renderAmis(json, {}, {})}
23+
</div>);
24+
}
25+
}
26+
27+
ReactDOM.render(<App/>, document.getElementById("root"))

_charts/echarts-for-react/index/components/Simple.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,9 @@ export default class Simple extends PureComponent {
6666
// " option={this.getOption()} \n" +
6767
// " style={{height: '350px', width: '100%'}} \n" +
6868
// " className='react_for_echarts' />";
69-
return (
70-
<div className='examples'>
71-
<div className='parent'>
72-
{/*<label> render a Simple echart With <strong>option and height</strong>: </label>*/}
73-
<ReactEcharts
74-
option={this.getOption()}
75-
style={{height: '350px', width: '100%'}}
76-
className='react_for_echarts' />
77-
{/*<label> code below: </label>*/}
78-
{/*<pre>*/}
79-
{/*<code>{code}</code>*/}
80-
{/*</pre>*/}
81-
</div>
82-
</div>
83-
);
69+
return (<ReactEcharts
70+
option={this.getOption()}
71+
style={{height: '350px', width: '100%'}}
72+
className='react_for_echarts' />);
8473
}
8574
}

0 commit comments

Comments
 (0)