first add files

This commit is contained in:
2025-08-15 14:05:08 +08:00
parent c58f74bcc0
commit b6216570d9
2451 changed files with 29056 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import SkylineBehavior from '@behaviors/skyline.js';
Component({
options: {
styleIsolation: 'apply-shared',
},
behaviors: [SkylineBehavior],
});

View File

@@ -0,0 +1,9 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-badge": "tdesign-miniprogram/badge/badge",
"t-cell": "tdesign-miniprogram/cell/cell",
"t-icon": "tdesign-miniprogram/icon/icon"
}
}

View File

@@ -0,0 +1,32 @@
<!--
由于 button 被 t-badeg包裹t-badge 中存在 role="option", 导致button中的 role=button 失去作用。相当于button 被申明了 role=presentation
因此提升了 aria-role=button 到 t-badge上
可参考: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/option_role
https://www.zhangxinxu.com/wordpress/2017/01/voiceover-aria-web-accessible-iphone/
-->
<view class="demo-desc">圆形徽标</view>
<view class="demo-wrapper">
<t-badge count="2" offset="{{ [2, -2] }}">
<t-icon name="notification" size="48rpx" ariaLabel="通知" />
</t-badge>
</view>
<view class="demo-desc">方形徽标</view>
<view class="demo-wrapper">
<t-badge count="2" shape="square" offset="{{ [1, -2] }}">
<t-icon name="notification" size="48rpx" ariaLabel="通知" />
</t-badge>
</view>
<view class="demo-desc">气泡徽标</view>
<view class="demo-wrapper">
<t-badge count="领积分" shape="bubble" ariaRole="button">
<t-button icon="shop" ariaLabel="商店" shape="square" size="large" />
</t-badge>
</view>
<view class="demo-desc" style="margin-bottom: 32rpx">角标</view>
<t-cell title="单行标题" t-class="t-class-cell">
<t-badge count="New" offset="{{skylineRender ? ['-16rpx', '-56rpx']: [0, 0]}}" shape="ribbon" slot="note" />
</t-cell>

View File

@@ -0,0 +1,11 @@
.demo-wrapper {
display: flex;
margin-left: 32rpx;
margin-top: 28px;
margin-bottom: 24px;
align-items: center;
}
.t-class-cell {
overflow: hidden;
}