forked from Tencent/tdesign-mobile-vue
-
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.
re Tencent#413
- Loading branch information
Showing
13 changed files
with
1,013 additions
and
771 deletions.
There are no files selected for viewing
1,557 changes: 916 additions & 641 deletions
1,557
src/button/__test__/__snapshots__/demo.test.jsx.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,24 +1,49 @@ | ||
<template> | ||
<div> | ||
<t-button size="large" theme="primary" block :disabled="disabled">强按钮</t-button> | ||
<t-button size="large" theme="primary" block variant="outline" :disabled="disabled"> 弱按钮 </t-button> | ||
<t-button size="large" variant="outline" block :disabled="disabled">次按钮</t-button> | ||
<t-button size="large" theme="primary" variant="outline" :icon="iconFunc" block :disabled="disabled" | ||
>带图标按钮</t-button | ||
> | ||
<t-button size="large" theme="danger" block :disabled="disabled">强警告按钮</t-button> | ||
<t-button size="large" theme="danger" variant="outline" block :disabled="disabled"> 弱警告按钮 </t-button> | ||
<div class="button-demo"> | ||
<t-button size="large" theme="primary" block>强按钮</t-button> | ||
<t-button size="large" theme="primary" block variant="outline"> 弱按钮 </t-button> | ||
<t-button size="large" variant="outline" block>次按钮</t-button> | ||
<t-button size="large" theme="primary" variant="outline" :icon="iconFunc" block> 带图标按钮 </t-button> | ||
<t-button size="large" theme="danger" block>强警告按钮</t-button> | ||
<t-button size="large" theme="danger" variant="outline" block> 弱警告按钮 </t-button> | ||
</div> | ||
|
||
<div style="background: #a6a6a6; padding: 8px 16px; margin-bottom: 16px"> | ||
<t-button size="large" variant="outline" ghost block> 幽灵按钮 </t-button> | ||
</div> | ||
<div class="margin-button"> | ||
<t-button size="large" theme="primary" variant="text" block> 文字按钮 </t-button> | ||
</div> | ||
<div class="no-border-radius margin-button"> | ||
<t-button size="large" theme="primary" block> 通栏按钮 </t-button> | ||
</div> | ||
<div class="no-border-radius no-border flex margin-button"> | ||
<t-button size="large" variant="outline" block>次按钮</t-button> | ||
<t-button size="large" theme="primary" block>主按钮</t-button> | ||
</div> | ||
|
||
<div class="button-demo align-center margin-right"> | ||
<div class="flex align-center margin-right"> | ||
<t-button theme="primary" :icon="iconFunc">带图标按钮</t-button> | ||
<t-button theme="primary" shape="round" :icon="iconFunc">带图标按钮</t-button> | ||
</div> | ||
<div class="flex align-center margin-right"> | ||
<t-button theme="primary" shape="square" :icon="iconFunc"></t-button> | ||
<t-button theme="primary" shape="circle" :icon="iconFunc"></t-button> | ||
</div> | ||
</div> | ||
|
||
<div class="flex align-center margin-right button-demo-loading"> | ||
<div class="button-demo flex"> | ||
<t-button size="large" shape="square" theme="primary" loading></t-button> | ||
<t-button size="large" theme="primary" loading>加载中...</t-button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { toRefs, defineProps, h } from 'vue'; | ||
import { h } from 'vue'; | ||
import { AppIcon as TIconApp } from 'tdesign-icons-vue-next'; | ||
const props = defineProps({ | ||
disabled: Boolean, | ||
}); | ||
const { disabled } = toRefs(props); | ||
const iconFunc = () => h(TIconApp); | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<div class="button-demo"> | ||
<t-button size="large" theme="primary" block :disabled="disabled">强按钮</t-button> | ||
<t-button size="large" theme="primary" block variant="outline" :disabled="disabled"> 弱按钮 </t-button> | ||
<t-button size="large" variant="outline" block :disabled="disabled">次按钮</t-button> | ||
<t-button size="large" theme="primary" variant="outline" :icon="iconFunc" block :disabled="disabled"> | ||
带图标按钮 | ||
</t-button> | ||
<t-button size="large" theme="danger" block :disabled="disabled">强警告按钮</t-button> | ||
<t-button size="large" theme="danger" variant="outline" block :disabled="disabled"> 弱警告按钮 </t-button> | ||
</div> | ||
|
||
<div style="background: #a6a6a6; padding: 8px 16px; margin-bottom: 16px"> | ||
<t-button size="large" variant="outline" ghost block :disabled="disabled"> 幽灵按钮 </t-button> | ||
</div> | ||
<div class="margin-button"> | ||
<t-button size="large" theme="primary" variant="text" block :disabled="disabled"> 文字按钮 </t-button> | ||
</div> | ||
<div class="no-border-radius margin-button"> | ||
<t-button size="large" theme="primary" block :disabled="disabled"> 通栏按钮 </t-button> | ||
</div> | ||
<div class="no-border-radius no-border flex margin-button"> | ||
<t-button size="large" variant="outline" block :disabled="disabled">次按钮</t-button> | ||
<t-button size="large" theme="primary" block :disabled="disabled">主按钮</t-button> | ||
</div> | ||
|
||
<div class="button-demo align-center margin-right"> | ||
<div class="flex align-center margin-right"> | ||
<t-button theme="primary" :icon="iconFunc" :disabled="disabled">带图标按钮</t-button> | ||
<t-button theme="primary" shape="round" :icon="iconFunc" :disabled="disabled">带图标按钮</t-button> | ||
</div> | ||
<div class="flex align-center margin-right"> | ||
<t-button theme="primary" shape="square" :icon="iconFunc" :disabled="disabled"></t-button> | ||
<t-button theme="primary" shape="circle" :icon="iconFunc" :disabled="disabled"></t-button> | ||
</div> | ||
</div> | ||
|
||
<div class="flex align-center margin-right button-demo-loading"> | ||
<div class="button-demo flex"> | ||
<t-button size="large" shape="square" theme="primary" loading :disabled="disabled"></t-button> | ||
<t-button size="large" theme="primary" loading :disabled="disabled">加载中...</t-button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { h, ref } from 'vue'; | ||
import { AppIcon as TIconApp } from 'tdesign-icons-vue-next'; | ||
const disabled = ref(true); | ||
const iconFunc = () => h(TIconApp); | ||
</script> |