forked from Tencent/tdesign-miniprogram
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(avatar): 头像aria-label 兜底问题. (Tencent#1028)
- Loading branch information
Showing
70 changed files
with
848 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 46 additions & 15 deletions
61
src/action-sheet/__test__/__snapshots__/demo.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,100 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ActionSheet ActionSheet grid demo works fine 1`] = ` | ||
<grid> | ||
exports[`ActionSheet ActionSheet align demo works fine 1`] = ` | ||
<align> | ||
<t-action-sheet | ||
id="t-action-sheet" | ||
bind:selected="handleSelected" | ||
/> | ||
<t-button | ||
block="{{true}}" | ||
size="large" | ||
theme="primary" | ||
variant="outline" | ||
bind:tap="handleAction" | ||
> | ||
宫格型 | ||
左对齐列表型 | ||
</t-button> | ||
</grid> | ||
</align> | ||
`; | ||
|
||
exports[`ActionSheet ActionSheet grid-multi demo works fine 1`] = ` | ||
<grid-multi> | ||
exports[`ActionSheet ActionSheet grid demo works fine 1`] = ` | ||
<grid> | ||
<t-action-sheet | ||
id="t-action-sheet" | ||
bind:selected="handleSelected" | ||
/> | ||
<t-button | ||
block="{{true}}" | ||
size="large" | ||
theme="primary" | ||
variant="outline" | ||
bind:tap="handleAction" | ||
> | ||
宫格型-多页 | ||
常规宫格型 | ||
</t-button> | ||
<t-button | ||
block="{{true}}" | ||
size="large" | ||
theme="primary" | ||
variant="outline" | ||
bind:tap="handleMultiAction" | ||
> | ||
带翻页宫格型 | ||
</t-button> | ||
</grid-multi> | ||
</grid> | ||
`; | ||
|
||
exports[`ActionSheet ActionSheet icon-list demo works fine 1`] = ` | ||
<icon-list> | ||
exports[`ActionSheet ActionSheet list demo works fine 1`] = ` | ||
<list> | ||
<t-action-sheet | ||
id="t-action-sheet" | ||
bind:selected="handleSelected" | ||
/> | ||
<t-button | ||
block="{{true}}" | ||
size="large" | ||
theme="primary" | ||
variant="outline" | ||
bind:tap="handleAction" | ||
> | ||
列表型 | ||
</t-button> | ||
<t-button | ||
block="{{true}}" | ||
size="large" | ||
theme="primary" | ||
variant="outline" | ||
bind:tap="showDescAction" | ||
> | ||
带描述列表型 | ||
</t-button> | ||
<t-button | ||
block="{{true}}" | ||
size="large" | ||
theme="primary" | ||
variant="outline" | ||
bind:tap="showIconAction" | ||
> | ||
带图标列表型 | ||
</t-button> | ||
</icon-list> | ||
</list> | ||
`; | ||
|
||
exports[`ActionSheet ActionSheet list demo works fine 1`] = ` | ||
<list> | ||
exports[`ActionSheet ActionSheet status demo works fine 1`] = ` | ||
<status> | ||
<t-action-sheet | ||
id="t-action-sheet" | ||
bind:selected="handleSelected" | ||
/> | ||
<t-button | ||
block="{{true}}" | ||
size="large" | ||
theme="primary" | ||
variant="outline" | ||
bind:tap="handleAction" | ||
> | ||
列表型 | ||
列表型选项状态 | ||
</t-button> | ||
</list> | ||
</status> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ page { | |
|
||
.wrapper { | ||
margin: 0 32rpx; | ||
display: block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
<view class="demo"> | ||
<view class="demo-title">ActionSheet 动作面板</view> | ||
<view class="demo-desc">底部弹起的模态面板,包含与当前情境相关的多个选项。</view> | ||
<t-demo title="01 类型" /> | ||
<view class="wrapper"> | ||
<list /> | ||
<icon-list /> | ||
<grid /> | ||
<grid-multi /> | ||
</view> | ||
<view class="demo-desc">从底部弹出的模态框,提供和当前场景相关的操作动作,也支持提供信息输入和描述。</view> | ||
<t-demo title="01 组件类型" desc="列表型动作面板" /> | ||
<list class="wrapper" /> | ||
|
||
<t-demo desc="宫格型动作面板" /> | ||
<grid class="wrapper" /> | ||
|
||
<t-demo title="02 组件状态" desc="宫格型动作面板" /> | ||
<status class="wrapper" /> | ||
|
||
<t-demo title="03 组件样式" desc="列表型对齐方式" /> | ||
<align class="wrapper" /> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index'; | ||
|
||
Component({ | ||
methods: { | ||
handleAction() { | ||
ActionSheet.show({ | ||
theme: ActionSheetTheme.List, | ||
selector: '#t-action-sheet', | ||
context: this, | ||
align: 'left', | ||
description: '动作面板描述文字', | ||
items: [ | ||
{ | ||
label: '选项一', | ||
}, | ||
{ | ||
label: '选项二', | ||
}, | ||
{ | ||
label: '选项三', | ||
}, | ||
{ | ||
label: '选项四', | ||
icon: 'app', | ||
}, | ||
], | ||
}); | ||
}, | ||
handleSelected(e) { | ||
console.log(e.detail); | ||
}, | ||
}, | ||
}); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...tion-sheet/_example/grid-multi/index.wxml → src/action-sheet/_example/align/index.wxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<t-action-sheet id="t-action-sheet" bind:selected="handleSelected" /> | ||
|
||
<t-button size="large" variant="outline" bind:tap="handleAction" block>宫格型-多页</t-button> | ||
<t-button size="large" variant="outline" bind:tap="handleAction" block theme="primary">左对齐列表型</t-button> |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.