Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body[ui-theme='deep-theme'],
body[ui-theme='galaxy-theme'] {
// TODO: 组件支持全局配置默认尺寸参数后删除
// button default size change to '32px'
.#{$devui-prefix}-button:not(.#{$devui-prefix}-button--xs):not(.#{$devui-prefix}-button--sm):not(.#{$devui-prefix}-button--lg) {
.#{$devui-prefix}-button:not(.#{$devui-prefix}-button--sm):not(.#{$devui-prefix}-button--lg) {
height: 32px;
line-height: 32px;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/button/src/button-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ComputedRef, ExtractPropTypes, PropType ,InjectionKey, Ref } from

export type IButtonVariant = 'solid' | 'outline' | 'text';
export type IButtonColor = 'secondary' | 'primary' | 'danger';
export type IButtonSize = 'lg' | 'md' | 'sm' | 'xs';
export type IButtonSize = 'lg' | 'md' | 'sm';
export type IButtonShape = 'round' | 'circle';

export const buttonProps = {
Expand Down
9 changes: 0 additions & 9 deletions packages/devui-vue/devui/button/src/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,6 @@ $devui-btn-lg-padding: var(--devui-btn-lg-padding, 0 24px);
}
}

&--xs {
padding: 0 4px;
height: $devui-size-sm;
font-size: $devui-font-size-sm;
min-width: 48px;
}

&--sm {
padding: $devui-btn-sm-padding;
height: $devui-size-sm;
Expand Down Expand Up @@ -330,7 +323,6 @@ $devui-btn-lg-padding: var(--devui-btn-lg-padding, 0 24px);
border: 1px solid transparent;
}

&.#{$devui-prefix}-button--xs,
&.#{$devui-prefix}-button--sm {
padding: 4px;
min-width: 24px;
Expand All @@ -347,7 +339,6 @@ $devui-btn-lg-padding: var(--devui-btn-lg-padding, 0 24px);
&.#{$devui-prefix}-button--circle {
width: $devui-size-md;

&.#{$devui-prefix}-button--xs,
&.#{$devui-prefix}-button--sm {
width: $devui-size-sm;
}
Expand Down
17 changes: 5 additions & 12 deletions packages/devui-vue/docs/components/button/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@

### 尺寸

:::demo 通过`size`设置按钮尺寸,支持`xs`、`sm`、`md`、`lg`四种类型的尺寸,默认为`md`。
:::demo 通过`size`设置按钮尺寸,支持`sm`、`md`、`lg`三种类型的尺寸,默认为`md`。

```vue
<template>
<div class="demo-spacing">
<d-button size="xs">Mini</d-button>
<d-button size="sm">Small</d-button>
<d-button>Medium</d-button>
<d-button size="lg">Large</d-button>
Expand Down Expand Up @@ -132,7 +131,7 @@ export default {
<d-button icon="connect" variant="text">Link</d-button>
<d-button icon="delete" variant="text" title="Delete"></d-button>
<d-button shape="round" title="Add">Add</d-button>
<d-button icon="delete" shape="circle" title="Delete" size="xs"></d-button>
<d-button icon="delete" shape="circle" title="Delete" size="sm"></d-button>
<d-button icon="delete" shape="circle" title="Delete"></d-button>
<d-button variant="solid" icon="filter" shape="circle" title="Add" size="lg"></d-button>
</div>
Expand All @@ -153,13 +152,7 @@ export default {
<d-button variant="solid">按钮名称</d-button>
<d-button icon="icon-select-arrow" variant="solid"></d-button>
</d-button-group>
<p>尺寸:xs</p>
<d-button-group size="xs">
<d-button disabled>上海</d-button>
<d-button color="primary" variant="solid">北京</d-button>
<d-button disabled>深圳</d-button>
</d-button-group>


<p>尺寸:sm</p>
<d-button-group size="sm">
<d-button color="primary" variant="solid">上海</d-button>
Expand Down Expand Up @@ -258,7 +251,7 @@ type IButtonVariant = 'solid' | 'outline' | 'text';
#### IButtonSize

```ts
type IButtonSize = 'lg' | 'md' | 'sm' | 'xs';
type IButtonSize = 'lg' | 'md' | 'sm';
```

#### IButtonColor
Expand All @@ -284,5 +277,5 @@ type IButtonShape = 'circle' | 'round';
#### IButtonGroupSize

```ts
type IButtonGroupSize = 'lg' | 'md' | 'sm' | 'xs';
type IButtonGroupSize = 'lg' | 'md' | 'sm';
```