diff --git a/.umirc.ts b/.umirc.ts index 2c92787..a9f1b4e 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -10,7 +10,7 @@ export default defineConfig({ }, devtool: 'source-map', antd: {}, - title: '趣谈前端-h5-visible-tool', + title: '趣谈前端-h5-dooring', exportStatic: {}, base: 'h5_plus', publicPath: '/h5_plus/', diff --git a/src/components/DynamicEngine/components.tsx b/src/components/DynamicEngine/components.tsx index 003a29c..c0fb77d 100644 --- a/src/components/DynamicEngine/components.tsx +++ b/src/components/DynamicEngine/components.tsx @@ -57,11 +57,11 @@ const Qrcode = memo((props: QRCodeConfigType) => { }); const LongText = memo((props: LongTextConfigType) => { - const { text, fontSize, color, indent, lineHeight } = props; + const { text, fontSize, color, indent, lineHeight, textAlign } = props; return (
{text}
diff --git a/src/components/DynamicEngine/schema.ts b/src/components/DynamicEngine/schema.ts index 997ecaa..f443f93 100644 --- a/src/components/DynamicEngine/schema.ts +++ b/src/components/DynamicEngine/schema.ts @@ -112,15 +112,21 @@ export type LongTextConfigType = { color: string; indent: number; lineHeight: number; + textAlign: TextAlignRangeType; }; export type LongTextKeyType = keyof LongTextConfigType; +export type LongTextRageItem = { + key: string; + text: string; +}; + export interface LongTextEditItem { key: T; name: string; type: BasicSchemaType; - range?: Array; + range?: Array; step?: number; } @@ -584,6 +590,25 @@ const schema: SchemaType = { type: 'Number', range: [0, 100], }, + { + key: 'textAlign', + name: '对齐方式', + type: 'Select', + range: [ + { + key: 'left', + text: '左对齐', + }, + { + key: 'center', + text: '居中对齐', + }, + { + key: 'right', + text: '右对齐', + }, + ], + }, { key: 'lineHeight', name: '行高', @@ -597,6 +622,7 @@ const schema: SchemaType = { fontSize: 14, indent: 20, lineHeight: 1.8, + textAlign: 'left', }, }, Tab: {