Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button #855

Merged
merged 16 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 13 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
70 changes: 35 additions & 35 deletions demo/pages/Button/index.axml
Original file line number Diff line number Diff line change
@@ -1,115 +1,115 @@
<container
title="按钮类型"
class="list">
<button
className="list">
<ant-button
type="primary"
onTap="handleTap">
主要按钮
</button>
</ant-button>

<button
<ant-button
type="default"
onTap="handleTap">
次要按钮
</button>
</ant-button>

<button
<ant-button
type="text"
onTap="handleTap">
文本按钮
</button>
</ant-button>
</container>

<container
title="带辅助文案按钮"
class="list">
<button
className="list">
<ant-button
type="primary"
subText="副标题"
onTap="handleTap">
主要按钮
</button>
</ant-button>

<button
<ant-button
type="default"
subText="副标题"
onTap="handleTap">
次要按钮
</button>
</ant-button>

<button
<ant-button
type="text"
subText="副标题"
onTap="handleTap">
文本按钮
</button>
</ant-button>
</container>

<container
title="禁用"
class="list">
<button
className="list">
<ant-button
type="primary"
disabled>
主要按钮
</button>
</ant-button>

<button
<ant-button
type="default"
disabled>
次要按钮
</button>
</ant-button>

<button
<ant-button
type="text"
disabled>
文本按钮
</button>
</ant-button>
</container>

<container
title="加载状态"
class="list">
<button
className="list">
<ant-button
type="primary"
loading>
主要按钮
</button>
</ant-button>

<button
<ant-button
type="default"
loading>
次要按钮
</button>
</ant-button>

<button
<ant-button
type="text"
loading>
文本
</button>
</ant-button>
</container>

<container
title="危险"
class="list">
<button
className="list">
<ant-button
type="primary"
danger
onTap="handleTap">
主要按钮
</button>
</ant-button>

<button
<ant-button
type="default"
danger
onTap="handleTap">
次要按钮
</button>
</ant-button>

<button
<ant-button
type="text"
danger
onTap="handleTap">
文本按钮
</button>
</ant-button>
</container>
2 changes: 1 addition & 1 deletion demo/pages/Button/index.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"defaultTitle": "Button",
"usingComponents": {
"button": "../../../src/Button/index",
"ant-button": "../../../src/Button/index",
"container": "../../../src/Container/index"
}
}
File renamed without changes.
1 change: 1 addition & 0 deletions demo/pages/Button/index.js → demo/pages/Button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ Page({
my.alert({
title: '点击按钮',
});

},
});
89 changes: 36 additions & 53 deletions demo/pages/ButtonIcon/index.axml
Original file line number Diff line number Diff line change
@@ -1,153 +1,136 @@
<container title="icon">
<button
<ant-button
type="primary"
icon="SmileOutline">
Icon
</button>

<button
</ant-button>
<ant-button
type="default"
icon="SmileOutline">
Icon
</button>

<button
</ant-button>
<ant-button
type="text"
icon="SmileOutline">
Icon
</button>

<button
</ant-button>
<ant-button
type="primary"
danger
icon="ForbidFill">
Icon
</button>

<button
</ant-button>
<ant-button
type="default"
danger
icon="ForbidFill">
Icon
</button>

<button
</ant-button>
<ant-button
type="text"
danger
icon="ForbidFill">
Icon
</button>
</ant-button>
</container>

<container title="inline button">
<button
<ant-button
type="primary"
icon="SmileOutline"
inline
size="large">
Icon
</button>

<button
</ant-button>
<ant-button
type="primary"
icon="SmileOutline"
inline
size="medium">
Icon
</button>

<button
</ant-button>
<ant-button
type="primary"
icon="SmileOutline"
inline
size="small">
Icon
</button>
</ant-button>
</container>

<container title="inline danger icon">
<button
<ant-button
type="primary"
icon="ForbidFill"
inline
danger
size="large">
Icon
</button>

<button
</ant-button>
<ant-button
type="primary"
icon="ForbidFill"
inline
danger
size="medium">
Icon
</button>

<button
</ant-button>
<ant-button
type="primary"
icon="ForbidFill"
inline
danger
size="small">
Icon
</button>
</ant-button>
</container>

<container title="loading icon">
<button
<ant-button
type="primary"
icon="SmileOutline"
onTap="handleTap"
inline
loading>
loading
</button>

<button
</ant-button>
<ant-button
type="primary"
icon="ForbidFill"
onTap="handleTap"
inline
danger
loading>
loading
</button>

<button
</ant-button>
<ant-button
type="primary"
icon="SmileOutline"
onTap="handleTap"
loading>
loading
</button>
</ant-button>
</container>

<container title="disabled icon">
<button
<ant-button
type="primary"
icon="SmileOutline"
onTap="handleTap"
inline
disabled>
disabled
</button>

<button
</ant-button>
<ant-button
type="primary"
icon="ForbidFill"
onTap="handleTap"
inline
danger
disabled>
disabled
</button>

<button
</ant-button>
<ant-button
type="primary"
icon="SmileOutline"
onTap="handleTap"
disabled>
disabled
</button>
</ant-button>
</container>
2 changes: 1 addition & 1 deletion demo/pages/ButtonIcon/index.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"defaultTitle": "Button",
"usingComponents": {
"button": "../../../src/Button/index",
"ant-button": "../../../src/Button/index",
"container": "../../../src/Container/index"
}
}
File renamed without changes.
File renamed without changes.
Loading
Loading