长文本添加对齐方式属性 🔧 修改umirc文件title名

This commit is contained in:
xujiang 2020-09-10 20:36:33 +08:00
parent e1a576f5e6
commit c44179a71b
3 changed files with 30 additions and 4 deletions

View File

@ -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/',

View File

@ -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 (
<div
className={styles.textWrap}
style={{ color, textIndent: indent + 'px', fontSize, lineHeight }}
style={{ color, textIndent: indent + 'px', fontSize, lineHeight, textAlign }}
>
{text}
</div>

View File

@ -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<T extends LongTextKeyType> {
key: T;
name: string;
type: BasicSchemaType;
range?: Array<number>;
range?: Array<LongTextRageItem | number>;
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: {