1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| import type { QualityComponentDefinition } from '../core/types';
|
| import { QUALITY_ICONS } from '../core/icons';
| import { QUALITY_CATEGORY } from '../core/types';
|
| export const spacerDefinition: QualityComponentDefinition = {
| type: 'Spacer',
| name: 'spacer',
| label: '间距',
| category: QUALITY_CATEGORY.BASIC,
| icon: QUALITY_ICONS.spacer,
| aiHint: '纯空白间距,只用来撑开版面,不承载任何内容。',
| defaults: { height: 16 },
| propertySchema: [{ key: 'height', label: '高度(px)', type: 'number', defaultValue: 16 }],
| dataSchema: [],
| buildContent: (properties) => ({
| tagName: 'div',
| style: { height: `${Number(properties.height ?? 16)}px` },
| }),
| };
|
|