Skip to content

Commit e113856

Browse files
author
weilei
committed
refactor: 简化文档
1 parent 5a48219 commit e113856

File tree

12 files changed

+1
-155
lines changed

12 files changed

+1
-155
lines changed

packages/storybook/.storybook/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ module.exports = {
4444
defaultName: 'Documentation',
4545
},
4646

47-
4847
// 自定义页面标题
4948
managerHead: head => `
5049
${head}
51-
<title>Element UI X Storybook</title>
50+
<title>Element UI X</title>
5251
<meta name="description" content="Element UI X 组件库 Storybook 文档" />
5352
`,
5453
};

packages/storybook/stories/Attachments/Attachments.stories.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export default {
2525
argTypes: {
2626
items: {
2727
control: 'object',
28-
description: '文件列表数组',
2928
table: {
3029
type: { summary: 'Array' },
3130
defaultValue: { summary: '[]' },
@@ -34,39 +33,34 @@ export default {
3433
overflow: {
3534
control: { type: 'select' },
3635
options: ['scrollX', 'scrollY', 'wrap'],
37-
description: '溢出处理方式',
3836
table: {
3937
type: { summary: 'String' },
4038
defaultValue: { summary: 'scrollX' },
4139
},
4240
},
4341
listStyle: {
4442
control: 'object',
45-
description: '列表容器样式',
4643
table: {
4744
type: { summary: 'Object' },
4845
defaultValue: { summary: '{}' },
4946
},
5047
},
5148
uploadIconSize: {
5249
control: 'text',
53-
description: '上传图标尺寸',
5450
table: {
5551
type: { summary: 'String' },
5652
defaultValue: { summary: '64px' },
5753
},
5854
},
5955
dragTarget: {
6056
control: 'text',
61-
description: '拖拽目标元素ID或选择器',
6257
table: {
6358
type: { summary: 'String | Object | HTMLElement' },
6459
defaultValue: { summary: 'undefined' },
6560
},
6661
},
6762
hideUpload: {
6863
control: 'boolean',
69-
description: '是否隐藏上传按钮',
7064
table: {
7165
type: { summary: 'Boolean' },
7266
defaultValue: { summary: 'false' },
@@ -79,15 +73,13 @@ export default {
7973
max: 50,
8074
step: 1,
8175
},
82-
description: '文件数量限制',
8376
table: {
8477
type: { summary: 'Number' },
8578
defaultValue: { summary: 'undefined' },
8679
},
8780
},
8881
uploadAction: {
8982
control: 'text',
90-
description: '上传地址',
9183
table: {
9284
type: { summary: 'String' },
9385
defaultValue: { summary: '#' },
@@ -96,31 +88,27 @@ export default {
9688
// 继承的Upload属性
9789
accept: {
9890
control: 'text',
99-
description: '接受的文件类型',
10091
table: {
10192
type: { summary: 'String' },
10293
defaultValue: { summary: 'undefined' },
10394
},
10495
},
10596
multiple: {
10697
control: 'boolean',
107-
description: '是否支持多选文件',
10898
table: {
10999
type: { summary: 'Boolean' },
110100
defaultValue: { summary: 'false' },
111101
},
112102
},
113103
disabled: {
114104
control: 'boolean',
115-
description: '是否禁用上传',
116105
table: {
117106
type: { summary: 'Boolean' },
118107
defaultValue: { summary: 'false' },
119108
},
120109
},
121110
drag: {
122111
control: 'boolean',
123-
description: '是否启用拖拽上传',
124112
table: {
125113
type: { summary: 'Boolean' },
126114
defaultValue: { summary: 'false' },

packages/storybook/stories/Bubble/Bubble.stories.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ export default {
2222
argTypes: {
2323
content: {
2424
control: 'text',
25-
description: '汽包显示的文本内容',
2625
table: {
2726
type: { summary: 'String' },
2827
defaultValue: { summary: "''" },
2928
},
3029
},
3130
avatar: {
3231
control: 'text',
33-
description: '头像图片地址',
3432
table: {
3533
type: { summary: 'String' },
3634
defaultValue: { summary: "''" },
@@ -39,7 +37,6 @@ export default {
3937
placement: {
4038
control: { type: 'select' },
4139
options: ['start', 'end'],
42-
description: '汽包位置(左侧或右侧)',
4340
table: {
4441
type: { summary: 'String' },
4542
defaultValue: { summary: "'start'" },
@@ -48,7 +45,6 @@ export default {
4845
variant: {
4946
control: { type: 'select' },
5047
options: ['filled', 'outlined', 'borderless', 'shadow'],
51-
description: '汽包样式变体',
5248
table: {
5349
type: { summary: 'String' },
5450
defaultValue: { summary: "'filled'" },
@@ -57,15 +53,13 @@ export default {
5753
shape: {
5854
control: { type: 'select' },
5955
options: ['', 'round', 'corner'],
60-
description: '汽包形状',
6156
table: {
6257
type: { summary: 'String' },
6358
defaultValue: { summary: "''" },
6459
},
6560
},
6661
maxWidth: {
6762
control: 'text',
68-
description: '汽包内容最大宽度',
6963
table: {
7064
type: { summary: 'String' },
7165
defaultValue: { summary: "'500px'" },
@@ -78,7 +72,6 @@ export default {
7872
max: 100,
7973
step: 4,
8074
},
81-
description: '头像大小(像素)',
8275
table: {
8376
type: { summary: 'Number' },
8477
defaultValue: { summary: '0' },
@@ -91,7 +84,6 @@ export default {
9184
max: 50,
9285
step: 2,
9386
},
94-
description: '头像与内容的间距(像素)',
9587
table: {
9688
type: { summary: 'Number' },
9789
defaultValue: { summary: '12' },
@@ -100,23 +92,20 @@ export default {
10092
avatarShape: {
10193
control: { type: 'select' },
10294
options: ['circle', 'square'],
103-
description: '头像形状',
10495
table: {
10596
type: { summary: 'String' },
10697
defaultValue: { summary: "'circle'" },
10798
},
10899
},
109100
avatarSrcSet: {
110101
control: 'text',
111-
description: '头像 srcset 属性',
112102
table: {
113103
type: { summary: 'String' },
114104
defaultValue: { summary: "''" },
115105
},
116106
},
117107
avatarAlt: {
118108
control: 'text',
119-
description: '头像 alt 属性',
120109
table: {
121110
type: { summary: 'String' },
122111
defaultValue: { summary: "''" },
@@ -125,48 +114,41 @@ export default {
125114
avatarFit: {
126115
control: { type: 'select' },
127116
options: ['fill', 'contain', 'cover', 'none', 'scale-down'],
128-
description: '头像图片适应方式',
129117
table: {
130118
type: { summary: 'String' },
131119
defaultValue: { summary: "'cover'" },
132120
},
133121
},
134122
noStyle: {
135123
control: 'boolean',
136-
description: '是否禁用默认样式',
137124
table: {
138125
type: { summary: 'Boolean' },
139126
defaultValue: { summary: 'false' },
140127
},
141128
},
142129
typing: {
143130
control: 'object',
144-
description:
145-
'打字机效果配置。可以是布尔值或对象 { step: 每次打字字符数, interval: 间隔毫秒, suffix: 光标字符 }',
146131
table: {
147132
type: { summary: 'Boolean | Object' },
148133
defaultValue: { summary: 'undefined' },
149134
},
150135
},
151136
loading: {
152137
control: 'boolean',
153-
description: '是否显示加载状态',
154138
table: {
155139
type: { summary: 'Boolean' },
156140
defaultValue: { summary: 'false' },
157141
},
158142
},
159143
isMarkdown: {
160144
control: 'boolean',
161-
description: '是否渲染为 Markdown',
162145
table: {
163146
type: { summary: 'Boolean' },
164147
defaultValue: { summary: 'false' },
165148
},
166149
},
167150
isFog: {
168151
control: 'object',
169-
description: '雾化效果配置。可以是布尔值或对象 { bgColor: 背景色, width: 雾化宽度 }',
170152
table: {
171153
type: { summary: 'Boolean | Object' },
172154
defaultValue: { summary: 'true' },

packages/storybook/stories/BubbleList/BubbleList.stories.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,13 @@ export default {
3838
argTypes: {
3939
list: {
4040
control: 'object',
41-
description: '对话消息列表数组',
4241
table: {
4342
type: { summary: 'Array' },
4443
defaultValue: { summary: '[]' },
4544
},
4645
},
4746
maxHeight: {
4847
control: 'text',
49-
description: '列表容器最大高度',
5048
table: {
5149
type: { summary: 'String' },
5250
defaultValue: { summary: "'500px'" },
@@ -55,15 +53,13 @@ export default {
5553
triggerIndices: {
5654
control: { type: 'select' },
5755
options: ['only-last', 'all'],
58-
description: '触发完成事件的索引规则',
5956
table: {
6057
type: { summary: 'String | Array' },
6158
defaultValue: { summary: "'only-last'" },
6259
},
6360
},
6461
alwaysShowScrollbar: {
6562
control: 'boolean',
66-
description: '是否始终显示滚动条',
6763
table: {
6864
type: { summary: 'Boolean' },
6965
defaultValue: { summary: 'false' },
@@ -76,39 +72,34 @@ export default {
7672
max: 200,
7773
step: 10,
7874
},
79-
description: '显示返回底部按钮的滚动距离阈值(像素)',
8075
table: {
8176
type: { summary: 'Number' },
8277
defaultValue: { summary: '80' },
8378
},
8479
},
8580
showBackButton: {
8681
control: 'boolean',
87-
description: '是否显示返回底部按钮',
8882
table: {
8983
type: { summary: 'Boolean' },
9084
defaultValue: { summary: 'true' },
9185
},
9286
},
9387
backButtonPosition: {
9488
control: 'object',
95-
description: '返回底部按钮的位置配置',
9689
table: {
9790
type: { summary: 'Object' },
9891
defaultValue: { summary: "{ bottom: '20px', left: 'calc(50% - 19px)' }" },
9992
},
10093
},
10194
btnLoading: {
10295
control: 'boolean',
103-
description: '返回按钮是否显示加载状态',
10496
table: {
10597
type: { summary: 'Boolean' },
10698
defaultValue: { summary: 'true' },
10799
},
108100
},
109101
btnColor: {
110102
control: 'color',
111-
description: '返回按钮的颜色',
112103
table: {
113104
type: { summary: 'String' },
114105
defaultValue: { summary: "'#409EFF'" },
@@ -121,7 +112,6 @@ export default {
121112
max: 32,
122113
step: 2,
123114
},
124-
description: '返回按钮图标大小(像素)',
125115
table: {
126116
type: { summary: 'Number' },
127117
defaultValue: { summary: '24' },
@@ -130,7 +120,6 @@ export default {
130120

131121
defaultNoStyle: {
132122
control: 'boolean',
133-
description: '全局默认是否禁用样式',
134123
table: {
135124
type: { summary: 'Boolean' },
136125
defaultValue: { summary: 'undefined' },

0 commit comments

Comments
 (0)