feat(editor): 样式中的position选项加上中文

This commit is contained in:
roymondchen 2025-06-09 19:36:54 +08:00
parent 6152a78467
commit 1614b62d2a

View File

@ -12,6 +12,14 @@ const emit = defineEmits<{
change: [v: string | StyleSchema, eventData: ContainerChangeEventData];
}>();
const positionText: Record<string, string> = {
static: '不定位',
relative: '相对定位',
absolute: '绝对定位',
fixed: '固定定位',
sticky: '粘性定位',
};
const config = {
items: [
{
@ -21,9 +29,9 @@ const config = {
type: 'data-source-field-select',
fieldConfig: {
type: 'select',
options: ['static', 'relative', 'absolute', 'fixed', 'sticky'].map((item) => ({
options: Object.keys(positionText).map((item) => ({
value: item,
text: item,
text: `${item}(${positionText[item]})`,
})),
},
},