Skip to content

Commit

Permalink
Merge pull request #66 from pearlwang1106/master
Browse files Browse the repository at this point in the history
畅言组件目录调整
  • Loading branch information
PEI WANG authored Nov 15, 2016
2 parents ab2feb7 + 42f44ce commit 1100f07
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 6 deletions.
4 changes: 0 additions & 4 deletions mip-ad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ mip-ad 用来支持站长添加网页内自定义广告,主要包括连接、
</mip-ad>
```





## 支持广告

- [通用广告](mip-ad-comm.md)
Expand Down
16 changes: 16 additions & 0 deletions mip-ad/setting/example.preset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<style mip-custom>
body {
padding: 0 22px;
background-color: #fff;
}
h3 {
padding: 0;
}
p {
text-align: left;
line-height: 26px;
}
mip-img {
margin: 10px auto;
}
</style
30 changes: 30 additions & 0 deletions mip-changyan/mip-changyan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* 畅言插件
* @author smileU
* @version 1.0.0
*/
define(function(require) {
var $ = require('zepto');

var customElement = require('customElement').create();

customElement.prototype.createdCallback = function () {

var _element = this.element;

var appid = _element.getAttribute('appid'),
conf = _element.getAttribute("conf");

var $_element = $(_element);
var html = [
'<script type="text/javascript">',
'var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "//changyan.sohu.com/upload/changyan.js?appid=' + appid + '&conf=' + conf + '";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();',
'</script>'
];

$_element.append(html.join(''));
}

return customElement;

});
8 changes: 6 additions & 2 deletions mip-down-hideshow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ mip-down-hideshow 用来支持文章详情页的显示隐藏切换
```

# 属性

组件涉及的属性字段: 显示隐藏切换位置(hsId)。

+ 显示隐藏切换位置(hsId)
- 是否必填: 是
### hsId

说明:显示隐藏切换位置
必填:是

0 comments on commit 1100f07

Please sign in to comment.