Skip to content

Commit

Permalink
feat: weui-wxss v2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
uxsi committed Nov 29, 2021
1 parent c5558d5 commit be693ec
Show file tree
Hide file tree
Showing 696 changed files with 5,423 additions and 4,566 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
### v2.5.2 (2021-11-29)

#### Features
* feat: 升级article组件UI
* feat: 底部悬浮按钮、半屏弹窗按钮支持垂直布局
* feat: 新增transition模态显示动画

#### Bugfixes
* fix: 表单组件验证码同意协议复选框优化无障碍体验
* fix: navigation组件返回按钮热区不足44px
* fix: 调整gallery组件底部安全间距、删除按钮增加点击态
* fix: 修复小程序slideview按钮宽度问题
* fix: actionsheet组件适配刘海屏
* fix: a11y热区去掉冗余背景声明
* fix: 修复图标按钮整合
* fix: 表单同意协议居中布局
* fix: 提高weui icon组件的选择器权重,用来规避和weui-icon混搭使用的权重问题



### v2.5.1 (2021-10-11)

#### Features
* feat: 新增关怀模式色板
* feat: 半屏弹窗组件UI升级
* feat: 升级按钮loading UI
* feat: msg组件标题字重调整
* feat: article新增无障碍整合焦点例子


### v2.5.0 (2021-09-17)

#### Features
Expand Down
53 changes: 31 additions & 22 deletions dist-rpx-mode/app.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
require('./libs/Mixins.js');

const themeListeners = [];
const listeners = [];

App({
globalData: {
theme: 'light', // dark
},
themeChanged(theme) {
this.globalData.theme = theme;
themeListeners.forEach((listener) => {
listener(theme);
});
},
watchThemeChange(listener) {
if (themeListeners.indexOf(listener) < 0) {
themeListeners.push(listener);
}
},
unWatchThemeChange(listener) {
const index = themeListeners.indexOf(listener);
if (index > -1) {
themeListeners.splice(index, 1);
}
},
});
globalData: {
theme: 'light', // dark
mode: '', // 模式(care:关怀模式)
},
changeGlobalData(data) {
this.globalData = Object.assign({}, this.globalData, data);
listeners.forEach((listener) => {
listener(this.globalData);
});
},
watchGlobalDataChanged(listener) {
if (listeners.indexOf(listener) < 0) {
listeners.push(listener);
}
},
unWatchGlobalDataChanged(listener) {
const index = listeners.indexOf(listener);
if (index > -1) {
listeners.splice(index, 1);
}
},
onThemeChange(resp) {
this.changeGlobalData({
theme: resp.theme,
});
},
onLaunch() {
// TODO: 检测适老化
},
});
4 changes: 2 additions & 2 deletions dist-rpx-mode/app.wxss

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions dist-rpx-mode/example/actionsheet/actionsheet.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Page({
mixins: [require('../../mixin/themeChanged')],
data: {
showIOSDialog: false,
showAndroidDialog: false,
},
close: function() {
this.setData({
showIOSDialog: false,
showAndroidDialog: false
});
},
openIOS: function () {
this.setData({
showIOSDialog: true
});
},
openAndroid: function () {
this.setData({
showAndroidDialog: true
});
}
mixins: [require('../../mixin/common')],
data: {
showIOSDialog: false,
showAndroidDialog: false,
},
close() {
this.setData({
showIOSDialog: false,
showAndroidDialog: false,
});
},
openIOS() {
this.setData({
showIOSDialog: true,
});
},
openAndroid() {
this.setData({
showAndroidDialog: true,
});
},
});
2 changes: 1 addition & 1 deletion dist-rpx-mode/example/actionsheet/actionsheet.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page" data-weui-theme="{{theme}}" data-weui-mode="{{mode}}">
<view aria-hidden="{{showIOSDialog || showAndroidDialog ? true : false}}" class="page__hd">
<view class="page__title">ActionSheet</view>
<view class="page__desc">弹出式菜单</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.5.0 (https://github.com/weui/weui-wxss)
* WeUI v2.5.2 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
Expand Down
4 changes: 2 additions & 2 deletions dist-rpx-mode/example/article/article.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Page({
mixins: [require('../../mixin/themeChanged')],
});
mixins: [require('../../mixin/common')],
});
73 changes: 40 additions & 33 deletions dist-rpx-mode/example/article/article.wxml
Original file line number Diff line number Diff line change
@@ -1,37 +1,44 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page__hd">
<view class="page__title">Article</view>
<view class="page__desc">文章</view>
</view>
<view class="page__bd">
<view class="weui-article">
<view class="weui-article__h1">大标题</view>
<view class="weui-article__section">
<view class="weui-article__h2">章标题</view>
<view class="weui-article__section">
<view class="weui-article__h3">1.1 节标题</view>
<view class="weui-article__p">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
</view>
<view class="weui-article__p">
<image class="weui-article__img" src="../images/pic_article.png" mode="aspectFit" style="height: 180px" />
<image class="weui-article__img" src="../images/pic_article.png" mode="aspectFit" style="height: 180px" />
</view>
<view class="page" data-weui-theme="{{theme}}" data-weui-mode="{{mode}}">
<view class="weui-article">
<view aria-role="heading" aria-level="4" class="weui-article__h1">大标题</view>
<view class="weui-article__section">
<view class="weui-article__h2">章标题</view>
<view class="weui-article__section">
<view class="weui-article__h3">1.1 节标题</view>
<view class="weui-article__p">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
</view>
<view class="weui-article__p">
<image class="weui-article__img" src="../images/pic_article.png" mode="aspectFit" style="height: 180px;" />
<image class="weui-article__img" src="../images/pic_article.png" mode="aspectFit" style="height: 180px;" />
</view>
</view>
<view class="weui-article__section">
<view class="weui-article__h3">1.2 节标题</view>
<view class="weui-article__section">
<view class="weui-article__h4">1.2.1 小节标题</view>
<view class="weui-article__p">
<view class="weui-a11y-combo">
<view class="weui-a11y-combo__helper" aria-labelledby="txt1 txt2" readonly aria-role="option"></view>
<text id="txt1" class="weui-a11y-combo__content" aria-hidden="true">Lorem ipsum dolor sit amet, consectetur adipisicing elit</text>
<navigator id="txt2" class="weui-a11y-combo__content weui-link weui-wa-hotarea">read more</navigator>
</view>
</view>
<view class="weui-article__section">
<view class="weui-article__h3">1.2 节标题</view>
<view class="weui-article__p">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</view>
</view>
<view class="weui-article__section">
<view class="weui-article__h4">1.2.1 小节标题</view>
<view class="weui-article__p">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
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.5.0 (https://github.com/weui/weui-wxss)
* WeUI v2.5.2 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
Expand Down
4 changes: 2 additions & 2 deletions dist-rpx-mode/example/badge/badge.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Page({
mixins: [require('../../mixin/themeChanged')],
});
mixins: [require('../../mixin/common')],
});
2 changes: 1 addition & 1 deletion dist-rpx-mode/example/badge/badge.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page" data-weui-theme="{{theme}}" data-weui-mode="{{mode}}">
<view class="page__hd">
<view class="page__title">Badge</view>
<view class="page__desc">徽章</view>
Expand Down
2 changes: 1 addition & 1 deletion dist-rpx-mode/example/badge/badge.wxss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* WeUI v2.5.2 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
Expand Down
22 changes: 11 additions & 11 deletions dist-rpx-mode/example/button/button.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Page({
mixins: [require('../../mixin/themeChanged')],
openDefault: function () {
wx.navigateTo({
url: 'button_default'
})
},
openBottomfixed: function () {
wx.navigateTo({
url: 'button_bottom_fixed'
})
},
mixins: [require('../../mixin/common')],
openDefault() {
wx.navigateTo({
url: 'button_default',
});
},
openBottomfixed() {
wx.navigateTo({
url: 'button_bottom_fixed',
});
},
});
6 changes: 3 additions & 3 deletions dist-rpx-mode/example/button/button.wxml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page" data-weui-theme="{{theme}}" data-weui-mode="{{mode}}">
<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 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>
Expand Down
2 changes: 1 addition & 1 deletion dist-rpx-mode/example/button/button.wxss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* WeUI v2.5.2 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
Expand Down
16 changes: 14 additions & 2 deletions dist-rpx-mode/example/button/button_bottom_fixed.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Page({
mixins: [require('../../mixin/themeChanged')],
});
mixins: [require('../../mixin/common')],
data: {
wrap: false,
},
onShow() {
wx.createSelectorQuery().select('#js_btn')
.boundingClientRect((rect) => {
if (rect.height > 48) {
this.setData({ wrap: true });
}
})
.exec();
},
});
11 changes: 7 additions & 4 deletions dist-rpx-mode/example/button/button_bottom_fixed.wxml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="weui-bottom-fixed-opr-page">

<view class="page" data-weui-theme="{{theme}}" data-weui-mode="{{mode}}">
<view class="weui-bottom-fixed-opr-page {{wrap ? 'weui-bottom-fixed-opr-page_btn-wrap' : ''}}">
<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 class="weui-bottom-fixed-opr" id="js_opr">
<navigator class="weui-btn weui-btn_primary" id="js_btn" aria-role="button" url="javascript:;">阅读并同意</navigator>
<navigator class="weui-btn weui-btn_default" aria-role="button" url="javascript:;">取消</navigator>
</view>
</view>
</view>

2 changes: 1 addition & 1 deletion dist-rpx-mode/example/button/button_bottom_fixed.wxss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* WeUI v2.5.2 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
Expand Down
4 changes: 2 additions & 2 deletions dist-rpx-mode/example/button/button_default.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Page({
mixins: [require('../../mixin/themeChanged')],
});
mixins: [require('../../mixin/common')],
});
2 changes: 1 addition & 1 deletion dist-rpx-mode/example/button/button_default.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<page-meta root-font-size="system"/>
<view class="page" data-weui-theme="{{theme}}">
<view class="page" data-weui-theme="{{theme}}" data-weui-mode="{{mode}}">
<view class="page__hd">
<view class="page__title">Button</view>
<view class="page__desc">按钮</view>
Expand Down
2 changes: 1 addition & 1 deletion dist-rpx-mode/example/button/button_default.wxss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* WeUI v2.5.0 (https://github.com/weui/weui-wxss)
* WeUI v2.5.2 (https://github.com/weui/weui-wxss)
* Copyright 2021 Tencent, Inc.
* Licensed under the MIT license
*/
Expand Down
Loading

0 comments on commit be693ec

Please sign in to comment.