Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/overlay/__test__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ exports[`Overlay Overlay base demo works fine 1`] = `
/>
<t-button
block="{{true}}"
size="large"
theme="primary"
variant="outline"
bind:tap="handleClick"
>
Expand Down
2 changes: 1 addition & 1 deletion src/overlay/_example/base/index.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<t-overlay visible="{{visible}}" bind:click="handleOverlayClick" />

<t-button block variant="outline" bind:tap="handleClick">基础用法</t-button>
<t-button block size="large" theme="primary" variant="outline" bind:tap="handleClick">基础用法</t-button>
2 changes: 1 addition & 1 deletion src/overlay/_example/overlay.wxml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<view class="demo">
<view class="demo-title">Overlay 遮罩层</view>
<view class="demo-desc">通过遮罩层,可以强调部分内容</view>
<t-demo title="01 类型" desc="基础遮罩层">
<t-demo title="01 组件类型" desc="基础遮罩层">
<view class="wrapper">
<base />
</view>
Expand Down
6 changes: 4 additions & 2 deletions src/overlay/overlay.less
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
@import '../common/style/index.less';

@overlay: ~'@{prefix}-overlay';
@overlay-bg-color: var(--td-overlay-bg-color, @font-gray-2);
@overlay-transition-duration: var(--td-overlay-transition-duration, 300ms);

.@{overlay} {
position: fixed;
top: 0;
left: 0;
width: 100%;
bottom: 0;
background-color: rgba(0, 0, 0, 0.6);
transition: opacity 300ms ease;
background-color: @overlay-bg-color;
transition: opacity @overlay-transition-duration ease;
}

.t-fade-enter {
Expand Down