Skip to content

Commit

Permalink
feat: weui 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
uxsi committed Sep 17, 2021
1 parent 824bc0e commit 33d101c
Show file tree
Hide file tree
Showing 477 changed files with 5,139 additions and 2,417 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
### v2.5.0 (2021-09-17)

#### Features
* feat: WeUI组件库适配无障碍
* feat: WeUI组件库适配大字号
* feat: 新增无障碍、热区工具类(见`/style/base/a11y.less`)
* feat: 按钮组件UI升级:高度、圆角属性
* feat: 新增底部悬浮按钮
* feat: 统一各平台组件样式(涉及dialog、actionsheet)
* feat: 小程序构建新增适老化脚本
* feat: 构建支持Node.js 12+的环境

#### Bugfixes
* fix: msg组件extra-area新增水平间距
* fix: 修复navigation-bar的loading对齐问题
* fix: 修复toast文字场景默认宽度问题



### v2.4.4 (2021-03-23)

#### Features
Expand Down
2 changes: 2 additions & 0 deletions dist-rpx-mode/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"example/index",

"example/button/button",
"example/button/button_default",
"example/button/button_bottom_fixed",
"example/input/input",
"example/form/form",
"example/form/form_page",
Expand Down
4 changes: 2 additions & 2 deletions dist-rpx-mode/app.wxss

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions dist-rpx-mode/example/actionsheet/actionsheet.wxml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page__hd">
<view aria-hidden="{{showIOSDialog || showAndroidDialog ? true : false}}" class="page__hd">
<view class="page__title">ActionSheet</view>
<view class="page__desc">弹出式菜单</view>
</view>
<view class="page__bd">
<view aria-hidden="{{showIOSDialog || showAndroidDialog ? true : false}}" class="page__bd">
<view class="weui-btn-area">
<a class="weui-btn weui-btn_default" bindtap="openIOS">iOS ActionSheet</a>
<a class="weui-btn weui-btn_default" bindtap="openAndroid">Android ActionSheet</a>
<view aria-role="button" class="weui-btn weui-btn_default" bindtap="openIOS">ActionSheet</view>
</view>
</view>
<view wx:if="{{showIOSDialog}}" class="fadeIn" bindtap="close">
<view class="weui-mask"></view>
<view wx:if="{{showIOSDialog}}" aria-role="dialog" aria-modal="true" aria-labelledby="js_dialog_title" class="fadeIn" bindtap="close">
<view class="weui-mask" aria-role="button" aria-label="关闭" bindtap="close"></view>
<view class="weui-actionsheet weui-actionsheet_toggle">
<view class="weui-actionsheet__title">
<view class="weui-actionsheet__title-text">这是一个标题,可以为一行或者两行。</view>
<view class="weui-actionsheet__title-text" id="js_dialog_title">这是一个标题,可以为一行或者两行。</view>
</view>
<view class="weui-actionsheet__menu">
<view class="weui-actionsheet__cell">示例菜单</view>
<view class="weui-actionsheet__cell">示例菜单</view>
<view class="weui-actionsheet__cell weui-actionsheet__cell_warn">负向菜单</view>
<view aria-role="button" class="weui-actionsheet__cell">示例菜单</view>
<view aria-role="button" class="weui-actionsheet__cell">示例菜单</view>
<view aria-role="button" class="weui-actionsheet__cell weui-actionsheet__cell_warn">负向菜单</view>
</view>
<view class="weui-actionsheet__action">
<view class="weui-actionsheet__cell">取消</view>
<view aria-role="button" class="weui-actionsheet__cell">取消</view>
</view>
</view>
</view>
<view wx:if="{{showAndroidDialog}}" class="weui-skin_android fadeIn" bindtap="close">
<view class="weui-mask"></view>
<view wx:if="{{showAndroidDialog}}" aria-role="dialog" aria-modal="true" class="weui-skin_android fadeIn" bindtap="close">
<view class="weui-mask" aria-role="button" aria-label="关闭" bindtap="close"></view>
<view class="weui-actionsheet">
<view class="weui-actionsheet__menu">
<view class="weui-actionsheet__cell">示例菜单</view>
<view class="weui-actionsheet__cell">示例菜单</view>
<view class="weui-actionsheet__cell">示例菜单</view>
<view class="weui-actionsheet__cell" aria-role="button">示例菜单</view>
<view class="weui-actionsheet__cell" aria-role="button">示例菜单</view>
<view class="weui-actionsheet__cell" aria-role="button">示例菜单</view>
</view>
</view>
</view>
Expand Down
2 changes: 1 addition & 1 deletion dist-rpx-mode/example/actionsheet/actionsheet.wxss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* WeUI v2.4.4 (https://github.com/weui/weui-wxss)
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
Expand Down
1 change: 1 addition & 0 deletions dist-rpx-mode/example/article/article.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page__hd">
<view class="page__title">Article</view>
Expand Down
2 changes: 1 addition & 1 deletion dist-rpx-mode/example/article/article.wxss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* WeUI v2.4.4 (https://github.com/weui/weui-wxss)
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
Expand Down
60 changes: 31 additions & 29 deletions dist-rpx-mode/example/badge/badge.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page__hd">
<view class="page__title">Badge</view>
Expand All @@ -6,46 +7,47 @@
<view class="page__bd">
<view class="weui-cells__title">新消息提示跟摘要信息后,统一在列表右侧</view>
<view class="weui-cells">
<view class="weui-cell weui-cell_active weui-cell_access">
<view class="weui-cell__bd">单行列表</view>
<view class="weui-cell__ft" style="font-size: 0;">
<text class="demo_badge_tips">详细信息</text>
<text class="weui-badge weui-badge_dot"></text>
<view aria-labelledby="js_cell_l1_bd js_cell_l1_tips" aria-describedby="js_cell_l1_note" class="weui-cell weui-cell_active weui-cell_access" aria-role="link">
<view aria-hidden="true" class="weui-cell__bd" id="js_cell_l1_bd">单行列表</view>
<view aria-hidden="true" class="weui-cell__ft" id="js_cell_l1_bd" style="font-size: 0;">
<text class="demo_badge_tips" id="js_cell_l1_tips">详细信息</text>
<text id="js_cell_l1_note" aria-label=",有更新" class="weui-badge weui-badge_dot"></text>
</view>
</view>
</view>
<view class="weui-cells__title">未读数红点跟在主题信息后,统一在列表左侧</view>
<view class="weui-cells demo_badge_cells">
<view class="weui-cell weui-cell_active">
<view class="weui-cell__hd">
<image src="../images/pic_160.png"></image>
<text class="weui-badge">8</text>
<view aria-labelledby="b1_txt1" aria-describedby="b1_n1" class="weui-cell weui-cell_active" aria-role="option">
<view class="weui-cell__hd" aria-hidden="true">
<image src="../images/pic_160.png" alt></image>
<text id="b1_n1" class="weui-badge" aria-label=",8个新通知">8</text>
</view>
<view class="weui-cell__bd">
<view>联系人名称</view>
<view class="weui-cell__bd" aria-hidden="true" id="b1_txt1">
<text>联系人名称</text>
<view class="demo_badge_desc">摘要信息</view>
</view>
</view>
<view class="weui-cell weui-cell_active weui-cell_access">
<view class="weui-cell__bd">
<text class="demo_badge_title">单行列表</text>
<text class="weui-badge">8</text>
</view>
<view class="weui-cell__ft"></view>
<view aria-labelledby="b2_n1" aria-describedby="b2_txt2" class="weui-cell weui-cell_active weui-cell_access" aria-role="link">
<text class="weui-cell__bd" aria-hidden="true">
<text class="demo_badge_title" id="b2_n1">单行列表</text>
<text class="weui-badge" id="b2_txt2" aria-label=",8个新通知">8</text>
</text>
<text class="weui-cell__ft" aria-hidden="true"></text>
</view>
<view class="weui-cell weui-cell_active weui-cell_access">
<view class="weui-cell__bd">
<text class="demo_badge_title">单行列表</text>
<text class="weui-badge">8</text>
</view>
<view class="weui-cell__ft">详细信息</view>
<view aria-labelledby="b3_n1 b3_n2" aria-describedby="b3_txt1 b3_txt1_note" class="weui-cell weui-cell_active weui-cell_access" aria-role="link">
<text class="weui-cell__bd" aria-hidden="true">
<text class="demo_badge_title" id="b3_n1">单行列表</text>
<text class="weui-badge" id="b3_txt1" aria-label>8</text>
<text id="b3_txt1_note" class="weui-hidden_abs">个新通知,</text>
</text>
<text class="weui-cell__ft" aria-hidden="true" id="b3_n2">详细信息</text>
</view>
<view class="weui-cell weui-cell_active weui-cell_access">
<view class="weui-cell__bd">
<text class="demo_badge_title">单行列表</text>
<text class="weui-badge">New</text>
</view>
<view class="weui-cell__ft"></view>
<view aria-labelledby="js_a11y_nt js_a11y_comma js_a11y_nb" class="weui-cell weui-cell_active weui-cell_access" aria-role="link">
<text class="weui-cell__bd" aria-hidden="true">
<text id="js_a11y_nt" class="demo_badge_title">单行列表</text>
<text id="js_a11y_nb" class="weui-badge">New</text>
</text>
<text class="weui-cell__ft" aria-hidden="true"></text>
</view>
</view>
</view>
Expand Down
4 changes: 2 additions & 2 deletions dist-rpx-mode/example/badge/badge.wxss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* WeUI v2.4.4 (https://github.com/weui/weui-wxss)
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
image{height:100rpx}.demo_badge_cells .weui-cell__hd{position:relative;margin-right:20rpx}.demo_badge_cells .weui-cell__hd image{width:100rpx;display:block}.demo_badge_cells .weui-cell__hd .weui-badge{position:absolute;top:-.4em;right:-.4em}.demo_badge_cells .weui-cell__bd .demo_badge_title{vertical-align:middle}.demo_badge_cells .weui-cell__bd .demo_badge_title+.weui-badge{margin-left:10rpx}.demo_badge_cells .weui-cell__bd .demo_badge_desc{font-size:26rpx;color:#888}
image{height:100rpx}.weui-cells .demo_badge_tips{font-size:34rpx;vertical-align:middle}.weui-cells .demo_badge_tips+.weui-badge{margin-left:10rpx;margin-right:10rpx}.demo_badge_cells .weui-cell__hd{position:relative;margin-right:20rpx}.demo_badge_cells .weui-cell__hd image{width:100rpx;display:block}.demo_badge_cells .weui-cell__hd .weui-badge{position:absolute;top:-.4em;right:-.4em}.demo_badge_cells .weui-cell__bd .demo_badge_title{vertical-align:middle}.demo_badge_cells .weui-cell__bd .demo_badge_title+.weui-badge{margin-left:10rpx}.demo_badge_cells .weui-cell__bd .demo_badge_desc{font-size:26rpx;color:#888}
12 changes: 11 additions & 1 deletion dist-rpx-mode/example/button/button.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Page({
mixins: [require('../../mixin/themeChanged')],
});
openDefault: function () {
wx.navigateTo({
url: 'button_default'
})
},
openBottomfixed: function () {
wx.navigateTo({
url: 'button_bottom_fixed'
})
},
});
44 changes: 13 additions & 31 deletions dist-rpx-mode/example/button/button.wxml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page__hd">
<view class="page__title">Button</view>
<view class="page__desc">按钮</view>
</view>
<view class="page__bd">
<view class="button-sp-area">
<a class="weui-btn weui-btn_primary">页面主操作</a>
<a class="weui-btn weui-btn_primary weui-btn_loading"><text class="weui-primary-loading weui-primary-loading_transparent"><i class="weui-primary-loading__dot"></i></text>页面主操作</a>
<a class="weui-btn weui-btn_disabled weui-btn_primary">页面主操作</a>
<a class="weui-btn weui-btn_default">页面次要操作</a>
<a class="weui-btn weui-btn_default weui-btn_loading"><text class="weui-primary-loading"><i class="weui-primary-loading__dot"></i></text>页面次操作</a>
<a class="weui-btn weui-btn_disabled weui-btn_default">页面次要操作</a>
<a class="weui-btn weui-btn_warn">警告类操作</a>
<a class="weui-btn weui-btn_warn weui-btn_loading"><text class="weui-primary-loading"><i class="weui-primary-loading__dot"></i></text>警告类操作</a>
<a class="weui-btn weui-btn_disabled weui-btn_warn">警告类操作</a>
</view>
<view class="button-sp-area cell">
<a class="weui-btn_cell weui-btn_cell-default">普通行按钮</a>
<a class="weui-btn_cell weui-btn_cell-primary">强调行按钮</a>
<a class="weui-btn_cell weui-btn_cell-primary">
<image class="weui-btn_cell__icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAMAAABgZ9sFAAAAVFBMVEXx8fHMzMzr6+vn5+fv7+/t7e3d3d2+vr7W1tbHx8eysrKdnZ3p6enk5OTR0dG7u7u3t7ejo6PY2Njh4eHf39/T09PExMSvr6+goKCqqqqnp6e4uLgcLY/OAAAAnklEQVRIx+3RSRLDIAxE0QYhAbGZPNu5/z0zrXHiqiz5W72FqhqtVuuXAl3iOV7iPV/iSsAqZa9BS7YOmMXnNNX4TWGxRMn3R6SxRNgy0bzXOW8EBO8SAClsPdB3psqlvG+Lw7ONXg/pTld52BjgSSkA3PV2OOemjIDcZQWgVvONw60q7sIpR38EnHPSMDQ4MjDjLPozhAkGrVbr/z0ANjAF4AcbXmYAAAAASUVORK5CYII="></image>
强调行按钮
</a>
<a class="weui-btn_cell weui-btn_cell-warn">警告行按钮</a>
</view>
<view class="button-sp-area">
<a class="weui-btn weui-btn_mini weui-btn_primary">按钮</a>
<a class="weui-btn weui-btn_mini weui-btn_default">按钮</a>
<a class="weui-btn weui-btn_mini weui-btn_warn">按钮</a>
</view>
</view>
<view class="page__hd">
<view class="page__title">Button</view>
<view class="page__desc">按钮</view>
</view>
<view class="page__bd">
<view class="weui-btn-area">
<view aria-role="button" class="weui-btn weui-btn_default" bindtap="openDefault">普通按钮</view>
<view aria-role="button" class="weui-btn weui-btn_default" bindtap="openBottomfixed">底部悬浮按钮</view>
</view>
</view>
</view>


4 changes: 2 additions & 2 deletions dist-rpx-mode/example/button/button.wxss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* WeUI v2.4.4 (https://github.com/weui/weui-wxss)
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
.button-sp-area{padding-top:30rpx;text-align:center}.weui-btn_mini{margin-right:8rpx}
.page{background:var(--weui-BG-2)}.button-sp-area{padding-top:30rpx;text-align:center}.weui-btn_mini{margin-right:8rpx}
3 changes: 3 additions & 0 deletions dist-rpx-mode/example/button/button_bottom_fixed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Page({
mixins: [require('../../mixin/themeChanged')],
});
11 changes: 11 additions & 0 deletions dist-rpx-mode/example/button/button_bottom_fixed.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="weui-bottom-fixed-opr-page">
<view class="weui-bottom-fixed-opr-page__content">
<view class="weui-bottom-fixed-opr-demo">Dolor tempora dolore aperiam fuga necessitatibus? Odio atque tempora deleniti voluptates voluptatem. Dolorem earum voluptas blanditiis labore quisquam? Quibusdam nesciunt consequatur aliquam ea corrupti animi, itaque consequatur neque? At porroSit nemo aliquid quas error doloremque Reiciendis ratione repellendus quae sit commodi amet architecto? Aut officiis aliquam fugit nulla at necessitatibus Optio totam quibusdam laboriosam aperiam libero! Officiis reiciendis Elit quaerat sed vero perferendis architecto consequatur. Consequuntur ad illum dolore ut accusamus. Cum possimus odit sequi quaerat beatae, eveniet. Rerum dolore ipsam quia consectetur iste Veniam mollitia dolores tempore? Dolor tempora dolore aperiam fuga necessitatibus? Odio atque tempora deleniti voluptates voluptatem. Dolorem earum voluptas blanditiis labore quisquam? Quibusdam nesciunt consequatur aliquam ea corrupti animi, itaque consequatur neque? At porroSit nemo aliquid quas error doloremque Reiciendis ratione repellendus quae sit commodi amet architecto? Aut officiis aliquam fugit nulla at necessitatibus Optio totam quibusdam laboriosam aperiam libero! Officiis reiciendis Elit quaerat sed vero perferendis architecto consequatur. Consequuntur ad illum dolore ut accusamus. Cum possimus odit sequi quaerat beatae, eveniet. Rerum dolore ipsam quia consectetur iste Veniam mollitia dolores tempore? </view>
</view>
<view class="weui-bottom-fixed-opr">
<navigator class="weui-btn weui-btn_primary" aria-role="button" url="javascript:;">完成</navigator>
</view>
</view>
</view>
6 changes: 6 additions & 0 deletions dist-rpx-mode/example/button/button_bottom_fixed.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*!
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
.page{height:100%;background:var(--weui-BG-2)}.weui-bottom-fixed-opr-demo{padding:64rpx 64rpx 0}
3 changes: 3 additions & 0 deletions dist-rpx-mode/example/button/button_default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Page({
mixins: [require('../../mixin/themeChanged')],
});
34 changes: 34 additions & 0 deletions dist-rpx-mode/example/button/button_default.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page__hd">
<view class="page__title">Button</view>
<view class="page__desc">按钮</view>
</view>
<view class="page__bd">
<view class="button-sp-area">
<navigator class="weui-btn weui-btn_primary" aria-role="button" url="javascript:">主要操作</navigator>
<navigator title="等待中" class="weui-btn weui-btn_primary weui-btn_loading" aria-role="button" url="javascript:"><text class="weui-primary-loading weui-primary-loading_transparent"><text class="weui-primary-loading__dot"></text></text>主要操作</navigator>
<navigator aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_primary" aria-role="button" url="javascript:">主要操作</navigator>
<navigator class="weui-btn weui-btn_default" aria-role="button" url="javascript:">次要操作</navigator>
<navigator title="等待中" class="weui-btn weui-btn_default weui-btn_loading" aria-role="button" url="javascript:"><text class="weui-primary-loading"><text class="weui-primary-loading__dot"></text></text>次要操作</navigator>
<navigator aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_default" aria-role="button" url="javascript:">次要操作</navigator>
<navigator class="weui-btn weui-btn_warn" aria-role="button" url="javascript:">警示操作</navigator>
<navigator title="等待中" class="weui-btn weui-btn_warn weui-btn_loading" aria-role="button" url="javascript:"><text class="weui-primary-loading"><text class="weui-primary-loading__dot"></text></text>警示操作</navigator>
<navigator aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_warn" aria-role="button" url="javascript:">警示操作</navigator>
</view>
<view class="button-sp-area cell">
<navigator class="weui-btn_cell weui-btn_cell-default" aria-role="button" url="javascript:">普通行按钮</navigator>
<navigator class="weui-btn_cell weui-btn_cell-primary" aria-role="button" url="javascript:">强调行按钮</navigator>
<navigator class="weui-btn_cell weui-btn_cell-primary" aria-role="button" url="javascript:">
<image alt="icon" class="weui-btn_cell__icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAMAAABgZ9sFAAAAVFBMVEXx8fHMzMzr6+vn5+fv7+/t7e3d3d2+vr7W1tbHx8eysrKdnZ3p6enk5OTR0dG7u7u3t7ejo6PY2Njh4eHf39/T09PExMSvr6+goKCqqqqnp6e4uLgcLY/OAAAAnklEQVRIx+3RSRLDIAxE0QYhAbGZPNu5/z0zrXHiqiz5W72FqhqtVuuXAl3iOV7iPV/iSsAqZa9BS7YOmMXnNNX4TWGxRMn3R6SxRNgy0bzXOW8EBO8SAClsPdB3psqlvG+Lw7ONXg/pTld52BjgSSkA3PV2OOemjIDcZQWgVvONw60q7sIpR38EnHPSMDQ4MjDjLPozhAkGrVbr/z0ANjAF4AcbXmYAAAAASUVORK5CYII="></image>
强调行按钮
</navigator>
<navigator class="weui-btn_cell weui-btn_cell-warn" aria-role="button" url="javascript:">警示行按钮</navigator>
</view>
<view class="button-sp-area">
<navigator class="weui-btn weui-btn_mini weui-btn_primary weui-wa-hotarea" aria-role="button" url="javascript:">按钮</navigator>
<navigator class="weui-btn weui-btn_mini weui-btn_default weui-wa-hotarea" aria-role="button" url="javascript:">按钮</navigator>
<navigator class="weui-btn weui-btn_mini weui-btn_warn weui-wa-hotarea" aria-role="button" url="javascript:">按钮</navigator>
</view>
</view>
</view>
6 changes: 6 additions & 0 deletions dist-rpx-mode/example/button/button_default.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*!
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
.button-sp-area{padding-top:30rpx;text-align:center}.weui-btn_mini{margin-right:8rpx}
Loading

0 comments on commit 33d101c

Please sign in to comment.