Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(comp:tabs): add size props, default value is md (#1361)
- Loading branch information
1 parent
8aeb214
commit 41eb8d9
Showing
14 changed files
with
119 additions
and
7 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
2 changes: 1 addition & 1 deletion
2
packages/components/tabs/__tests__/__snapshots__/tabs.spec.ts.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
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,12 @@ | ||
--- | ||
title: | ||
zh: 尺寸 | ||
en: Size | ||
order: 7 | ||
--- | ||
|
||
## zh | ||
|
||
提供了`lg` 和 `md` 两种尺寸 | ||
|
||
## en |
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,37 @@ | ||
<template> | ||
<IxSpace :size="20" vertical> | ||
<IxRadioGroup v-model:value="size"> | ||
<IxRadio value="lg">大</IxRadio> | ||
<IxRadio value="md">中</IxRadio> | ||
</IxRadioGroup> | ||
<IxTabs v-model:selectedKey="selectedKey" :size="size"> | ||
<IxTab key="tab1" title="标签1" /> | ||
<IxTab key="tab2" title="标签2" /> | ||
<IxTab key="tab3" title="标签3" /> | ||
</IxTabs> | ||
<IxTabs v-model:selectedKey="selectedKey" type="line" :size="size"> | ||
<IxTab key="tab1" title="标签1" /> | ||
<IxTab key="tab2" title="标签2" /> | ||
<IxTab key="tab3" title="标签3" /> | ||
</IxTabs> | ||
<IxTabs v-model:selectedKey="selectedKey" type="segment" :size="size"> | ||
<IxTab key="tab1" title="标签1" /> | ||
<IxTab key="tab2" title="标签2" /> | ||
<IxTab key="tab3" title="标签3" /> | ||
</IxTabs> | ||
<IxTabs v-model:selectedKey="selectedKey" type="segment" mode="primary" :size="size"> | ||
<IxTab key="tab1" title="标签1" /> | ||
<IxTab key="tab2" title="标签2" /> | ||
<IxTab key="tab3" title="标签3" /> | ||
</IxTabs> | ||
</IxSpace> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
import { type TabsSize } from '@idux/components/tabs' | ||
const size = ref<TabsSize>('md') | ||
const selectedKey = ref('tab1') | ||
</script> |
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
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
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
@import './default.variable.less'; | ||
|
||
@tabs-nav-font-size-md: var(--ix-font-size-sm); | ||
@tabs-nav-font-size-lg: var(--ix-font-size-md); |