Skip to content

Commit e6e2bec

Browse files
vaebekagol
authored andcommitted
style(button): 组件 size 移除 xs 类型 DevCloudFE#1199
1 parent df615ae commit e6e2bec

File tree

4 files changed

+7
-23
lines changed

4 files changed

+7
-23
lines changed

packages/devui-theme/src/theme-collection/extend-theme-vue.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body[ui-theme='deep-theme'],
77
body[ui-theme='galaxy-theme'] {
88
// TODO: 组件支持全局配置默认尺寸参数后删除
99
// button default size change to '32px'
10-
.#{$devui-prefix}-button:not(.#{$devui-prefix}-button--xs):not(.#{$devui-prefix}-button--sm):not(.#{$devui-prefix}-button--lg) {
10+
.#{$devui-prefix}-button:not(.#{$devui-prefix}-button--sm):not(.#{$devui-prefix}-button--lg) {
1111
height: 32px;
1212
line-height: 32px;
1313
}

packages/devui-vue/devui/button/src/button-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ComputedRef, ExtractPropTypes, PropType ,InjectionKey, Ref } from
22

33
export type IButtonVariant = 'solid' | 'outline' | 'text';
44
export type IButtonColor = 'secondary' | 'primary' | 'danger';
5-
export type IButtonSize = 'lg' | 'md' | 'sm' | 'xs';
5+
export type IButtonSize = 'lg' | 'md' | 'sm';
66
export type IButtonShape = 'round' | 'circle';
77

88
export const buttonProps = {

packages/devui-vue/devui/button/src/button.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,6 @@ $devui-btn-lg-padding: var(--devui-btn-lg-padding, 0 24px);
236236
}
237237
}
238238

239-
&--xs {
240-
padding: 0 4px;
241-
height: $devui-size-sm;
242-
font-size: $devui-font-size-sm;
243-
min-width: 48px;
244-
}
245-
246239
&--sm {
247240
padding: $devui-btn-sm-padding;
248241
height: $devui-size-sm;
@@ -330,7 +323,6 @@ $devui-btn-lg-padding: var(--devui-btn-lg-padding, 0 24px);
330323
border: 1px solid transparent;
331324
}
332325

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

350-
&.#{$devui-prefix}-button--xs,
351342
&.#{$devui-prefix}-button--sm {
352343
width: $devui-size-sm;
353344
}

packages/devui-vue/docs/components/button/index.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,11 @@
5252

5353
### 尺寸
5454

55-
:::demo 通过`size`设置按钮尺寸,支持`xs``sm``md``lg`四种类型的尺寸,默认为`md`
55+
:::demo 通过`size`设置按钮尺寸,支持`sm``md``lg`四种类型的尺寸,默认为`md`
5656

5757
```vue
5858
<template>
5959
<div class="demo-spacing">
60-
<d-button size="xs">Mini</d-button>
6160
<d-button size="sm">Small</d-button>
6261
<d-button>Medium</d-button>
6362
<d-button size="lg">Large</d-button>
@@ -132,7 +131,7 @@ export default {
132131
<d-button icon="connect" variant="text">Link</d-button>
133132
<d-button icon="delete" variant="text" title="Delete"></d-button>
134133
<d-button shape="round" title="Add">Add</d-button>
135-
<d-button icon="delete" shape="circle" title="Delete" size="xs"></d-button>
134+
<d-button icon="delete" shape="circle" title="Delete" size="sm"></d-button>
136135
<d-button icon="delete" shape="circle" title="Delete"></d-button>
137136
<d-button variant="solid" icon="filter" shape="circle" title="Add" size="lg"></d-button>
138137
</div>
@@ -153,13 +152,7 @@ export default {
153152
<d-button variant="solid">按钮名称</d-button>
154153
<d-button icon="icon-select-arrow" variant="solid"></d-button>
155154
</d-button-group>
156-
<p>尺寸:xs</p>
157-
<d-button-group size="xs">
158-
<d-button disabled>上海</d-button>
159-
<d-button color="primary" variant="solid">北京</d-button>
160-
<d-button disabled>深圳</d-button>
161-
</d-button-group>
162-
155+
163156
<p>尺寸:sm</p>
164157
<d-button-group size="sm">
165158
<d-button color="primary" variant="solid">上海</d-button>
@@ -258,7 +251,7 @@ type IButtonVariant = 'solid' | 'outline' | 'text';
258251
#### IButtonSize
259252

260253
```ts
261-
type IButtonSize = 'lg' | 'md' | 'sm' | 'xs';
254+
type IButtonSize = 'lg' | 'md' | 'sm';
262255
```
263256

264257
#### IButtonColor
@@ -284,5 +277,5 @@ type IButtonShape = 'circle' | 'round';
284277
#### IButtonGroupSize
285278

286279
```ts
287-
type IButtonGroupSize = 'lg' | 'md' | 'sm' | 'xs';
280+
type IButtonGroupSize = 'lg' | 'md' | 'sm';
288281
```

0 commit comments

Comments
 (0)