Skip to content

Commit

Permalink
feat: weui v2.6.11
Browse files Browse the repository at this point in the history
  • Loading branch information
uxsi committed Jan 12, 2024
1 parent 86b6c9e commit 610e504
Show file tree
Hide file tree
Showing 21 changed files with 237 additions and 123 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
### v2.6.11 (2024-01-12)



### v2.6.10 (2024-01-12)

#### Bugfixes
* fix: 修复form组件上下结构带来的兼容问题
* fix: 调整button组件loading颜色



### v2.6.9 (2023-12-22)

#### Features
* feat: 组件Button UI升级
* feat: 桌面端下鼠标形状统一为箭头


#### Bugfixes
* fix: 调整组件weui-agree的热区
* fix: 调整组件weui-mask透明度



### v2.6.7 (2023-11-01)

#### Features
Expand Down
2 changes: 1 addition & 1 deletion dist/example/example.css

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions dist/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -467,12 +467,15 @@ <h1 class="page__title">Button</h1>

<div class="button-sp-area">
<a href="javascript:" role="button" class="weui-btn weui-btn_primary">主要操作</a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_primary weui-btn_loading"><i class="weui-mask-loading weui-mask-loading_only"></i></a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_primary weui-btn_loading"><i class="weui-mask-loading"></i>主要操作</a>
<a href="javascript:" role="button" aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_primary">主要操作</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_default">次要操作</a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_default weui-btn_loading"><i class="weui-mask-loading weui-mask-loading_only"></i></a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_default weui-btn_loading"><i class="weui-mask-loading"></i>次要操作</a>
<a href="javascript:" role="button" aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_default">次要操作</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_warn">警示操作</a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_warn weui-btn_loading"><i class="weui-mask-loading weui-mask-loading_only"></i></a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_warn weui-btn_loading"><i class="weui-mask-loading"></i>警示操作</a>
<a href="javascript:" role="button" aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_warn">警示操作</a>
</div>
Expand All @@ -484,9 +487,14 @@ <h1 class="page__title">Button</h1>
</div>

<div class="button-sp-area overlay">
<a href="javascript:" role="button" class="weui-btn weui-btn_overlay">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_overlay weui-btn_medium">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_overlay weui-btn_mini">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_primary weui-btn_overlay">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_default weui-btn_overlay">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_warn weui-btn_overlay">overlay 按钮</a>
</div>
<div class="button-sp-area overlay">
<a href="javascript:" role="button" class="weui-btn weui-btn_primary weui-btn_overlay weui-btn_disabled">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_default weui-btn_overlay weui-btn_disabled">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_warn weui-btn_overlay weui-btn_disabled">overlay 按钮</a>
</div>

<div class="button-sp-area cell">
Expand Down
154 changes: 92 additions & 62 deletions dist/style/weui.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/style/weui.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weui",
"version": "2.6.7",
"version": "2.6.11",
"description": "A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.",
"keywords": [
"weui",
Expand Down
14 changes: 11 additions & 3 deletions src/example/button/button_default.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ <h1 class="page__title">Button</h1>

<div class="button-sp-area">
<a href="javascript:" role="button" class="weui-btn weui-btn_primary">主要操作</a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_primary weui-btn_loading"><i class="weui-mask-loading weui-mask-loading_only"></i></a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_primary weui-btn_loading"><i class="weui-mask-loading"></i>主要操作</a>
<a href="javascript:" role="button" aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_primary">主要操作</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_default">次要操作</a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_default weui-btn_loading"><i class="weui-mask-loading weui-mask-loading_only"></i></a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_default weui-btn_loading"><i class="weui-mask-loading"></i>次要操作</a>
<a href="javascript:" role="button" aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_default">次要操作</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_warn">警示操作</a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_warn weui-btn_loading"><i class="weui-mask-loading weui-mask-loading_only"></i></a>
<a href="javascript:" role="button" title="正在操作" class="weui-btn weui-btn_warn weui-btn_loading"><i class="weui-mask-loading"></i>警示操作</a>
<a href="javascript:" role="button" aria-disabled="true" disabled class="weui-btn weui-btn_disabled weui-btn_warn">警示操作</a>
</div>
Expand All @@ -24,9 +27,14 @@ <h1 class="page__title">Button</h1>
</div>

<div class="button-sp-area overlay">
<a href="javascript:" role="button" class="weui-btn weui-btn_overlay">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_overlay weui-btn_medium">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_overlay weui-btn_mini">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_primary weui-btn_overlay">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_default weui-btn_overlay">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_warn weui-btn_overlay">overlay 按钮</a>
</div>
<div class="button-sp-area overlay">
<a href="javascript:" role="button" class="weui-btn weui-btn_primary weui-btn_overlay weui-btn_disabled">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_default weui-btn_overlay weui-btn_disabled">overlay 按钮</a>
<a href="javascript:" role="button" class="weui-btn weui-btn_warn weui-btn_overlay weui-btn_disabled">overlay 按钮</a>
</div>

<div class="button-sp-area cell">
Expand Down
2 changes: 1 addition & 1 deletion src/example/example.less
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ body,
background-color: var(--weui-BG-2);
overflow: hidden;
border-radius: 2px;
cursor: pointer;
cursor: default;
&.js_show {
.weui-flex {
opacity: 0.5;
Expand Down
2 changes: 2 additions & 0 deletions src/style/base/reset.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ a img {
a {
text-decoration: none;
.setTapColor();

cursor: default;
}
input,
textarea {
Expand Down
6 changes: 3 additions & 3 deletions src/style/base/variable/weui-button.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ page {
--weui-BTN-HEIGHT-MEDIUM: 40;
--weui-BTN-HEIGHT-SMALL: 32;
}
.setColor(--weui-BTN-ACTIVE-MASK, rgba(0,0,0,0.1), rgba(255,255,255,0.1));
.setColor(--weui-BTN-ACTIVE-MASK, rgba(0,0,0,0.2), rgba(255,255,255,0.2));



Expand Down Expand Up @@ -63,8 +63,8 @@ page {
@weuiBtnPrimaryDisabledBg: @weuiBtnDisabledBg;

// warn
@weuiBtnWarnFontColor: @weuiColorWarn;
@weuiBtnWarnFontColor: @weuiBtnFontColor;
@weuiBtnWarnDisabledFontColor: @weuiBtnDisabledFontColor;
@weuiBtnWarnBg: @weuiBtnDefaultBg;
@weuiBtnWarnBg: var(--weui-RED-100);
@weuiBtnWarnActiveBg: @weuiBtnDefaultActiveBg;
@weuiBtnwarnDisabledBg: @weuiBtnDefaultDisabledBg;
7 changes: 4 additions & 3 deletions src/style/widget/weui-agree/weui-agree.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
@import "../../base/fn";

.weui-agree {
display: flex;
text-align: justify;
justify-content: center;
display: inline-flex;
vertical-align: bottom;
max-width: 100%;
align-items: center;
text-align: justify;
.hyphens;

line-height: 1.6;
Expand Down
6 changes: 3 additions & 3 deletions src/style/widget/weui-button/weui-btn_default.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
@import "../../base/fn";

.weui-btn_default {
color: @weuiBtnDefaultFontColor;
background-color: @weuiBtnDefaultBg;
color: var(--weui-FG-0);
background-color: var(--weui-FG-5);
&:not(.weui-btn_disabled):visited {
color: @weuiBtnDefaultFontColor;
color: var(--weui-FG-0);
}
}
2 changes: 1 addition & 1 deletion src/style/widget/weui-button/weui-btn_disabled.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
.weui-btn_disabled,
.weui-btn[disabled] {
color: var(--weui-FG-4);
background-color: var(--weui-BG-1);
background-color: var(--weui-FG-5);
}
3 changes: 2 additions & 1 deletion src/style/widget/weui-button/weui-btn_global.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
font-size: @weuiBtnFontSize;
text-align: center;
text-decoration: none;
color: @weuiBtnFontColor;
color: #fff;
line-height: unit(((@weuiBtnHeight - 24) / @weuiBtnFontSize));
border-radius: @weuiBtnBorderRadius;
.setTapColor();

cursor: default;
user-select: none;

&:active {
Expand Down
29 changes: 21 additions & 8 deletions src/style/widget/weui-button/weui-btn_loading.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,35 @@
@import "../../base/fn";

.weui-btn_loading {
.weui-loading {
margin: -0.2em 8px 0 0;
}
.weui-mask-loading {
margin: -0.2em 8px 0 0;
font-size: 20px;
margin: -0.2em 4px 0 0;
color: currentColor;

// 临时用,为了向后兼容,等designtoken完成后再改成默认loading,按需loading+text
&.weui-mask-loading_only {
margin-right: 0;
}
}

&.weui-btn_default {
.weui-mask-loading {
color: #606060;
}
}

.weui-loading {
font-size: 20px;
margin: -0.2em 4px 0 0;
}
.weui-primary-loading {
margin: -0.2em 8px 0 0;
font-size: 20px;
margin: -0.2em 4px 0 0;
vertical-align: middle;
color: currentColor;
&::before {
content: "";
}
}
&.weui-btn_primary {
color: var(--weui-WHITE);
}
}

33 changes: 29 additions & 4 deletions src/style/widget/weui-button/weui-btn_overlay.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,35 @@

@import "../../base/fn";


.weui-btn_overlay {
color: var(--weui-BRAND);
background-color: @LIGHT_BG_5;
&:not(.weui-btn_disabled):visited {
color: var(--weui-BRAND);
&.weui-btn_primary {
color: @LIGHT_FG_0;
background-color: #fff;
&:not(.weui-btn_disabled):visited {
color: @LIGHT_FG_0;
}
}

&.weui-btn_default {
color: #fff;
background-color: rgba(247, 247, 247, 0.3);
&:not(.weui-btn_disabled):visited {
color: #fff;
}
}

&.weui-btn_warn {
color: #fff;
background-color: var(--weui-RED-100);
&:not(.weui-btn_disabled):visited {
color: #fff;
}
}

&.weui-btn_disabled,
&[disabled] {
color: rgba(247, 247, 247, 0.3);
background-color: rgba(255, 255, 255, 0.3);
}
}
4 changes: 2 additions & 2 deletions src/style/widget/weui-button/weui-btn_primary.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
@import "../../base/fn";

.weui-btn_primary {
background-color: @weuiBtnPrimaryBg;
background-color: var(--weui-BRAND);
&:not(.weui-btn_disabled):visited {
color: @weuiBtnPrimaryFontColor;
color: #fff;
}
}
5 changes: 2 additions & 3 deletions src/style/widget/weui-button/weui-btn_warn.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
@import "../../base/fn";

.weui-btn_warn {
color: @weuiBtnWarnFontColor;
background-color: @weuiBtnWarnBg;
background-color: var(--weui-RED-100);
&:not(.weui-btn_disabled):visited {
color: @weuiBtnWarnFontColor;
color: #fff;
}
}
13 changes: 0 additions & 13 deletions src/style/widget/weui-cell/weui-cell_global.less
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,6 @@ z-index:
.weui-cell_primary {
align-items: flex-start;
}
.weui-cell_vertical {
flex-direction: column;
align-items: flex-start;

.weui-cell__hd {
padding-right: 0;
margin-bottom: 12px;
}
.weui-cell__hd,
.weui-cell__bd {
width: 100%;
}
}
.weui-cell__bd {
flex: 1;
min-width: 0;
Expand Down
29 changes: 22 additions & 7 deletions src/style/widget/weui-cell/weui-cells__group.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,28 @@ body {
left: var(--weui-cellPaddingLR);
right: var(--weui-cellPaddingLR);
}
&:not(.weui-cell_vertical) {
.weui-cell__hd {
padding-right: 16px;
}
.weui-cell__ft {
padding-left: 16px;
}
.weui-cell__hd {
padding-right: 16px;
}
.weui-cell__ft {
padding-left: 16px;
}
}

.weui-cell_vertical {
flex-direction: column;
align-items: flex-start;

.weui-cell__hd {
padding-right: 0;
margin-bottom: 12px;
}
.weui-cell__ft {
padding-left: 0;
}
.weui-cell__hd,
.weui-cell__bd {
width: 100%;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/style/widget/weui-tips/weui-mask.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
background: rgba(0, 0, 0, 0.5);
}

.weui-mask_transparent {
Expand Down

0 comments on commit 610e504

Please sign in to comment.