Skip to content

Commit

Permalink
Merge pull request Tencent#793 from uxsi/dialog
Browse files Browse the repository at this point in the history
v2.0.1
  • Loading branch information
BearJ authored Jul 15, 2019
2 parents c787e64 + 778b7da commit a6859c1
Show file tree
Hide file tree
Showing 17 changed files with 8,448 additions and 58 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/
node_modules
npm-debug.log
dist
.DS_Store
*.swp
53 changes: 53 additions & 0 deletions .picklogrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
const origin = 'https://github.com/Tencent/weui';
const comparePath = `${origin}/compare/`;
const commitPath = `${origin}/commit/`;

module.exports = {
filters: [
{
name: 'Features',
regExp: /^(?:feat|add)/i,
},
{
name: 'Bugfixes',
regExp: /^fix/i,
},
{
name: 'Style',
regExp: /^style/i,
},
{
name: 'Performance',
regExp: /^perf/i,
}
],
parse(commits){
// RegExp.prototype.toJSON = RegExp.prototype.toString; // JSON.stringify会调用正则表达式的toJSON
// return JSON.stringify(commits, null, 2); // output commits

let output = '';

commits.forEach((log) => {
let date = new Date(log.timestamp * 1000);
date = `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).substr(-2)}-${('0' + date.getDate()).substr(-2)}`;

let currentTag = log.tag || log.commits[0].h;
let prevTag = log.previousTag || log.commits[log.commits.length - 1].h;
output += `### [${currentTag}](${comparePath}${prevTag || ''}...${currentTag}) (${date})\n\n`;

log.results.forEach((result) => {
output += `#### ${result.filter.name}\n`;

result.commits.forEach((commit) => {
output += `* ${commit.s}([${commit.h}](${commitPath}${commit.h}))\n`;
});

output += '\n';
});

output += '\n\n';
});

return output;
}
};
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### [v2.0.1](https://github.com/Tencent/weui/compare/v2.0.0...v2.0.1) (2019-07-15)

#### Features
* feat: 增加组件 半屏弹窗half-screen-dialog([a5e994b](https://github.com/Tencent/weui/commit/a5e994b))

#### Style
* style: 更新Picker UI



#### v2.0.0 (2019-04-30)

- 【增强】 颜色规范、字体大小规范、间距规范对齐微信7.0新视觉风格
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"description": "wechat mobile ui",
"main": "dist/style/weui.css",
"version": "2.0.0",
"version": "2.0.1",
"authors": [
"wechat ui team"
],
Expand All @@ -19,4 +19,4 @@
],
"homepage": "https://github.com/weui/weui",
"ignore": []
}
}
108 changes: 105 additions & 3 deletions dist/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ <h1 class="page__title">
</div>
<div class="weui-cell__ft"></div>
</a>
<a class="weui-cell weui-cell_access js_item" data-id="half-screen-dialog" href="javascript:;">
<div class="weui-cell__bd">
<p>Half-screen Dialog</p>
</div>
<div class="weui-cell__ft"></div>
</a>
<a class="weui-cell weui-cell_access js_item" data-id="msg" href="javascript:;">
<div class="weui-cell__bd">
<p>Msg</p>
Expand Down Expand Up @@ -281,6 +287,7 @@ <h1 class="page__title">
});
});
</script>

</script>
<script type="text/html" id="tpl_button">
<div class="page">
Expand Down Expand Up @@ -828,6 +835,98 @@ <h1 class="page__title">Dialog</h1>
});
});
</script>
</script>
<script type="text/html" id="tpl_half-screen-dialog">
<div class="page">
<div class="page__hd">
<h1 class="page__title">Half-screen Dialog</h1>
<p class="page__desc">半屏组件</p>
</div>
<div class="page__bd page__bd_spacing">
<a href="javascript:;" class="weui-btn weui-btn_default" id="showIOSDialog1">样式一</a>
<a href="javascript:;" class="weui-btn weui-btn_default" id="showIOSDialog2">样式二</a>
</div>
<div class="page__ft">
<a href="javascript:home()"><img src="./images/icon_footer_link.png" /></a>
</div>

<div id="dialogs">
<!--BEGIN dialog1-->
<div class="js_dialog" id="iosDialog1" style="display: none;">
<div class="weui-mask"></div>
<div class="weui-half-screen-dialog">
<div class="weui-half-screen-dialog__hd">
<div class="weui-half-screen-dialog__hd__side">
<button class="weui-icon-btn weui-icon-btn_close">关闭</button>
</div>
<div class="weui-half-screen-dialog__hd__main">
<strong class="weui-half-screen-dialog__title">标题</strong>
</div>
</div>
<div class="weui-half-screen-dialog__bd">
<br>
<br>
可放自定义内容
<br>
<br>
<br>
<br>
</div>
</div>
</div>
<!--END dialog1-->
<!--BEGIN dialog2-->
<div class="js_dialog" id="iosDialog2" style="display: none;">
<div class="weui-mask"></div>
<div class="weui-half-screen-dialog">
<div class="weui-half-screen-dialog__hd">
<div class="weui-half-screen-dialog__hd__side">
<button style="display:none;" class="weui-icon-btn weui-icon-btn_goback">返回</button>
<button class="weui-icon-btn weui-icon-btn_close">关闭</button>
</div>
<div class="weui-half-screen-dialog__hd__main">
<strong class="weui-half-screen-dialog__title">标题</strong>
<span class="weui-half-screen-dialog__subtitle">标题</span>
</div>
<div class="weui-half-screen-dialog__hd__side">
<button class="weui-icon-btn weui-icon-btn_more">更多</button>
</div>
</div>
<div class="weui-half-screen-dialog__bd">
<p class="weui-half-screen-dialog__desc">
辅助描述内容,可根据实际需要安排
</p>
<p class="weui-half-screen-dialog__tips">
辅助提示内容,可根据实际需要安排
</p>
</div>
<div class="weui-half-screen-dialog__ft">
<a href="javascript:;" class="weui-btn weui-btn_default">辅助操作</a>
<a href="javascript:;" class="weui-btn weui-btn_primary">主操作</a>
</div>
</div>
</div>
<!--END dialog2-->
</div>
</div>
<script type="text/javascript">
$(function(){
var $iosDialog1 = $('#iosDialog1'),
$iosDialog2 = $('#iosDialog2');

$('#dialogs').on('click', '.weui-mask', function(){
$(this).parents('.js_dialog').fadeOut(200);
});

$('#showIOSDialog1').on('click', function(){
$iosDialog1.fadeIn(200);
});
$('#showIOSDialog2').on('click', function(){
$iosDialog2.fadeIn(200);
});
});
</script>

</script>
<script type="text/html" id="tpl_progress">
<div class="page">
Expand Down Expand Up @@ -1481,7 +1580,8 @@ <h1 class="page__title">Picker</h1>
},
onConfirm: function (result) {
console.log(result);
}
},
title: '单列选择器'
});
});
$('#showDatePicker').on('click', function () {
Expand All @@ -1493,10 +1593,12 @@ <h1 class="page__title">Picker</h1>
},
onConfirm: function (result) {
console.log(result);
}
},
title: '多列选择器'
});
});
</script>

</script>
<script type="text/html" id="tpl_footer">
<div class="page">
Expand Down Expand Up @@ -2026,7 +2128,7 @@ <h1 class="page__title">Slider</h1>
</script>
<script src="./zepto.min.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>
<script src="https://res.wx.qq.com/open/libs/weuijs/1.2.1/weui.min.js"></script>
<script src="./example.js"></script>
</body>
</html>
Loading

0 comments on commit a6859c1

Please sign in to comment.