Skip to content

Commit

Permalink
fix(Progress): resolve circle type color error in dark mode (#2794)
Browse files Browse the repository at this point in the history
* fix(Progress): resolve circle type color error in dark mode

* test: update snapshots
  • Loading branch information
anlyyao authored May 24, 2024
1 parent 22659bc commit 89a40d3
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/grid/_example/icon-grid/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
align-items: center;
justify-content: center;
overflow: hidden;
background: #f3f3f3;
background-color: var(--td-bg-color-secondarycontainer);
border-radius: 12rpx;
}
1 change: 1 addition & 0 deletions src/progress/progress.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

// 进度条基本样式
.@{progress} {
--td-progress-inner-bg-color: @brand-color;
--td-progress-track-bg-color: @bg-color-component;

&__inner {
Expand Down
2 changes: 1 addition & 1 deletion src/progress/progress.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
aria-label="{{ ariaLabel || (isIOS ? this.getIOSAriaLabel(status) : this.getAndroidAriaLabel(status)) }}"
aria-live="polite"
class="{{classPrefix}}__canvas--circle"
style="background-image: conic-gradient( {{colorCircle || this.STATUS_COLOR[status] || '#0052d9'}} {{computedProgress}}%, {{bgColorBar || 'var(--td-progress-track-bg-color)'}} 0%);"
style="background-image: conic-gradient( {{colorCircle || this.STATUS_COLOR[status] || 'var(--td-progress-inner-bg-color)'}} {{computedProgress}}%, {{bgColorBar || 'var(--td-progress-track-bg-color)'}} 0%);"
>
<view
class="{{classPrefix}}__canvas--inner {{prefix}}-class-bar"
Expand Down
3 changes: 0 additions & 3 deletions src/result/_example/result.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@
<t-button theme="primary" block size="large" variant="outline" bind:tap="goResultPage">页面示例</t-button>
</view>
</t-demo>
<view class="demo-section__wrapper">
<t-button theme="primary" block size="large" variant="outline" bind:tap="goResultPage">页面示例</t-button>
</view>
</view>
1 change: 1 addition & 0 deletions src/sticky/__test__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ exports[`Sticky Sticky container demo works fine 1`] = `
offsetTop="{{0}}"
>
<t-button
hoverClass="hover-class "
size="large"
tClass="external-class green-button"
>
Expand Down
1 change: 1 addition & 0 deletions src/sticky/_example/container/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "shared",
"usingComponents": {
"t-sticky": "tdesign-miniprogram/sticky/sticky",
"t-button": "tdesign-miniprogram/button/button"
Expand Down
2 changes: 1 addition & 1 deletion src/sticky/_example/container/index.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<view class="wrapper">
<t-sticky container="{{ container }}" offset-top="{{navbarHeight}}">
<t-button size="large" t-class="external-class green-button">指定容器</t-button>
<t-button size="large" t-class="external-class green-button" hover-class="hover-class ">指定容器</t-button>
</t-sticky>
</view>
9 changes: 8 additions & 1 deletion src/sticky/_example/container/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
}

.green-button {
background-color: rgba(0, 168, 112, 1) !important;
z-index: 0 !important;
background-color: #008858 !important;
color: #fff !important;
}

.hover-class::after {
z-index: -1;
background-color: #006c45;
border-color: #006c45;
}

0 comments on commit 89a40d3

Please sign in to comment.