Skip to content

Commit

Permalink
Merge branch "master" of https://github.com/h5ds/h5ds
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/pages/home/home-index/HomeIndex.js
  • Loading branch information
mtsee committed Nov 16, 2019
2 parents fb69262 + f8af592 commit 19002c8
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 43 deletions.
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ QQ群:549856478
### 1. 引入必须的资源包。

```html
<link rel="stylesheet" href="https://at.alicdn.com/t/font_157397_ze6q8vjbeme.css">
<link href="https://cdn.bootcss.com/Swiper/4.5.0/css/swiper.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.css" rel="stylesheet">
<!-- 编辑器所需第三方资源库 -->
<script src="https://cdn.h5ds.com/lib/plugins/swiper.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/jquery.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/h5ds.vendor.min.js"></script>
<!-- 外部引入antd -->
<script src="https://cdn.bootcss.com/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.js"></script>
<link rel="stylesheet" href="https://at.alicdn.com/t/font_157397_ujac0trx9i.css">
<link href="https://cdn.h5ds.com/lib/plugins/swiper.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.css" rel="stylesheet">
<!-- 编辑器所需第三方资源库 -->
<script src="https://cdn.h5ds.com/lib/plugins/swiper.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/jquery.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/h5ds.vendor.min.js"></script>
<!-- 外部引入antd -->
<script src="https://cdn.bootcss.com/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.js"></script>
```

### 2. 安装使用H5DS
Expand Down Expand Up @@ -129,19 +129,18 @@ export default Editor;
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>H5DS</title>
<link rel="stylesheet" href="https://cdn.h5ds.com/umd/editor/style.css" />
<link rel="stylesheet" href="https://at.alicdn.com/t/font_157397_ze6q8vjbeme.css"/>
<link href="https://cdn.bootcss.com/Swiper/4.5.0/css/swiper.min.css" rel="stylesheet"/>
<link href="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="https://at.alicdn.com/t/font_157397_ujac0trx9i.css">
<link href="https://cdn.h5ds.com/lib/plugins/swiper.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.css" rel="stylesheet">
<!-- 编辑器所需第三方资源库 -->
<script src="https://cdn.h5ds.com/lib/plugins/swiper.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/jquery.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/h5ds.vendor.min.js"></script>
<!-- 外部引入antd --->
<!-- 外部引入antd -->
<script src="https://cdn.bootcss.com/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.js"></script>
<!-- es6语法支持 -->
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
<script src="https://cdn.bootcss.com/lib/babel/6.26.0/babel.min.js"></script>
<!-- H5DS资源 -->
<script src="https://cdn.h5ds.com/umd/editor/index.js"></script>
</head>
Expand Down
26 changes: 4 additions & 22 deletions browser/h5ds.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>H5DS</title>
<link rel="stylesheet" href="https://cdn.h5ds.com/umd/editor/style.css" />
<link
rel="stylesheet"
href="https://at.alicdn.com/t/font_157397_ze6q8vjbeme.css"
/>
<link
rel="stylesheet"
href="https://at.alicdn.com/t/font_1160472_ybl2xl0ao8.css"
/>
<link
href="https://cdn.bootcss.com/Swiper/4.5.0/css/swiper.min.css"
rel="stylesheet"
/>
<link
href="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="https://at.alicdn.com/t/font_157397_ujac0trx9i.css">
<link href="https://cdn.h5ds.com/lib/plugins/swiper.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.css" rel="stylesheet">
<!-- 编辑器所需第三方资源库 -->
<script src="https://cdn.h5ds.com/lib/plugins/swiper.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/jquery.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/h5ds.vendor.min.js"></script>
<!-- 外部引入antd --->
<!-- 外部引入antd -->
<script src="https://cdn.bootcss.com/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.js"></script>
<!-- es6语法支持 -->
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
<!-- H5DS资源 -->
<script src="https://cdn.h5ds.com/umd/editor/index.js"></script>
</head>
<body></body>
<script type="text/babel">
Expand Down
7 changes: 5 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="shortcut icon" href="/assets/images/favicon.ico">
<link rel="stylesheet" href="https://at.alicdn.com/t/font_157397_ze6q8vjbeme.css"/>
<link rel="stylesheet" href="https://at.alicdn.com/t/font_1160472_ybl2xl0ao8.css"/>
<link rel="stylesheet" href="https://at.alicdn.com/t/font_157397_ujac0trx9i.css">
<link href="https://cdn.h5ds.com/lib/plugins/swiper.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.css" rel="stylesheet">
<!-- 编辑器所需第三方资源库 -->
<script src="https://cdn.h5ds.com/lib/plugins/swiper.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/jquery.min.js"></script>
<script src="https://cdn.h5ds.com/lib/plugins/h5ds.vendor.min.js"></script>
<!-- 外部引入antd -->
<script src="https://cdn.bootcss.com/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdn.bootcss.com/antd/3.23.0-beta.0/antd.min.js"></script>
</head>
Expand Down
10 changes: 9 additions & 1 deletion src/plugins/demo/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, { Component } from 'react';
const icon = <i className="h5ds-ico h5ds-ico-xingzhuang" />;

/**
* props: h5ds, scope, layer
* props: h5ds, scope, layer mobx
*/
class Editor extends Component {
constructor(props) {
Expand All @@ -16,10 +16,18 @@ class Editor extends Component {
window.pubSubInstance.publish('demo.show.modal');
};

changeData = () => {
this.props.layer.data = +new Date();
this.props.h5ds.updateCanvas();
}

render() {
return (
<div className="editor-mantou-demo">
<button onClick={this.showModal}>点击弹窗</button>
<br/>
<br/>
<button onClick={this.changeData}>修改data</button>
</div>
);
}
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/demo/Layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import { mountPlugin } from 'h5ds-mount-plugin';
* props: layer, renderIn, plugins{pluginsKey}, isRenderThis
*/
class LayerComp extends React.Component {

render() {
const { data } = this.props.layer;
return <div className="layerinner-mantou-demo">{data}123123123</div>;
return <div className="layerinner-mantou-demo">{data}</div>;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/demo/LayerJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export class LayerJSON {
style = { width: 200, height: 200, top: 0, left: 0 }; // div.layer 的样式
estyle = {}; // div.element 的样式
events = [];
data = "test hello!";
data = "hello!"; // {}
}
3 changes: 3 additions & 0 deletions src/plugins/demo/layer.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.layerinner-mantou-demo{
background: red;
font-size: 20px;
color: #fff;
font-weight: bolder;
}

0 comments on commit 19002c8

Please sign in to comment.