<tap-button>
移动端按钮组件。支持不同语义颜色、尺寸、幽灵/反色样式以及圆角。
Example
Loading...
<tap-button .color=${"normal"}> 主要按钮 </tap-button> <tap-button .color=${"danger"}> 危险按钮 </tap-button> <tap-button .color=${"cancel"}> 取消按钮 </tap-button> <tap-button .type=${"reverse"} .color=${"normal"}> 反色样式 </tap-button> <tap-button
.round=${true}
.small=${true}
.color=${"normal"}> 圆角小按钮 </tap-button> <tap-button .disabled=${true} .color=${"normal"}> 禁用状态 </tap-button>
API
Shadow DOM; Extends GemElement
Instance Properties
| Property(Attribute) | Reactive | Type |
|---|---|---|
type(type) |
Yes | 'solid' | 'reverse' |
color(color) |
Yes | StringList<'normal' | 'danger' | 'cancel'> |
small(small) |
Yes | boolean |
round(round) |
Yes | boolean |
square(square) |
Yes | boolean |
disabled(disabled) |
Yes | boolean |
borderless(borderless) |
Yes | boolean |
route |
Yes | RouteItem |
params |
Yes | Record<string, string> |
query |
Yes | Record<string, string> |
icon |
Yes | string | Element | DocumentFragment |
Other
| Type | Value |
|---|---|
| Slot | unnamed |
| Part | button |
| CSS State | active |
