iter(g78): 新增 space 间距容器组件
This commit is contained in:
@@ -54,6 +54,7 @@ import {
|
||||
skeleton,
|
||||
splitter,
|
||||
slider,
|
||||
space,
|
||||
spinner,
|
||||
stepper,
|
||||
statistic,
|
||||
@@ -524,6 +525,24 @@ const content = h(
|
||||
button({ label: '导出', variant: 'ghost' }),
|
||||
),
|
||||
),
|
||||
section(
|
||||
'sec-space',
|
||||
'间距容器',
|
||||
'space:用 flex gap 托管一排子元素的间距(不再各自写 margin),size 三档走令牌或直接给像素,direction 切竖排,justify + block 让工具栏两端撑开。',
|
||||
space(
|
||||
{ justify: 'between', block: true },
|
||||
h('span', { class: 'out' }, '左侧标题'),
|
||||
space({ size: 'sm' }, button({ label: '取消', variant: 'ghost' }), button({ label: '保存' })),
|
||||
),
|
||||
space(
|
||||
{ size: 'lg', wrap: true },
|
||||
badge({ label: '默认' }),
|
||||
badge({ label: '成功', variant: 'success' }),
|
||||
badge({ label: '警告', variant: 'warning' }),
|
||||
tag({ label: '#A1024', variant: 'info' }),
|
||||
),
|
||||
space({ direction: 'vertical', align: 'start', size: 6 }, h('span', { class: 'out' }, '竖排第一行'), h('span', { class: 'out' }, '竖排第二行(6px 精确间距)')),
|
||||
),
|
||||
section(
|
||||
'sec-statistic',
|
||||
'统计数值',
|
||||
|
||||
Reference in New Issue
Block a user