mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2026-03-17 19:23:31 +00:00
✨ 长文本添加对齐方式属性 🔧 修改umirc文件title名
This commit is contained in:
parent
e1a576f5e6
commit
c44179a71b
@ -10,7 +10,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
antd: {},
|
antd: {},
|
||||||
title: '趣谈前端-h5-visible-tool',
|
title: '趣谈前端-h5-dooring',
|
||||||
exportStatic: {},
|
exportStatic: {},
|
||||||
base: 'h5_plus',
|
base: 'h5_plus',
|
||||||
publicPath: '/h5_plus/',
|
publicPath: '/h5_plus/',
|
||||||
|
|||||||
@ -57,11 +57,11 @@ const Qrcode = memo((props: QRCodeConfigType) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const LongText = memo((props: LongTextConfigType) => {
|
const LongText = memo((props: LongTextConfigType) => {
|
||||||
const { text, fontSize, color, indent, lineHeight } = props;
|
const { text, fontSize, color, indent, lineHeight, textAlign } = props;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={styles.textWrap}
|
className={styles.textWrap}
|
||||||
style={{ color, textIndent: indent + 'px', fontSize, lineHeight }}
|
style={{ color, textIndent: indent + 'px', fontSize, lineHeight, textAlign }}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -112,15 +112,21 @@ export type LongTextConfigType = {
|
|||||||
color: string;
|
color: string;
|
||||||
indent: number;
|
indent: number;
|
||||||
lineHeight: number;
|
lineHeight: number;
|
||||||
|
textAlign: TextAlignRangeType;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LongTextKeyType = keyof LongTextConfigType;
|
export type LongTextKeyType = keyof LongTextConfigType;
|
||||||
|
|
||||||
|
export type LongTextRageItem = {
|
||||||
|
key: string;
|
||||||
|
text: string;
|
||||||
|
};
|
||||||
|
|
||||||
export interface LongTextEditItem<T extends LongTextKeyType> {
|
export interface LongTextEditItem<T extends LongTextKeyType> {
|
||||||
key: T;
|
key: T;
|
||||||
name: string;
|
name: string;
|
||||||
type: BasicSchemaType;
|
type: BasicSchemaType;
|
||||||
range?: Array<number>;
|
range?: Array<LongTextRageItem | number>;
|
||||||
step?: number;
|
step?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,6 +590,25 @@ const schema: SchemaType = {
|
|||||||
type: 'Number',
|
type: 'Number',
|
||||||
range: [0, 100],
|
range: [0, 100],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'textAlign',
|
||||||
|
name: '对齐方式',
|
||||||
|
type: 'Select',
|
||||||
|
range: [
|
||||||
|
{
|
||||||
|
key: 'left',
|
||||||
|
text: '左对齐',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'center',
|
||||||
|
text: '居中对齐',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'right',
|
||||||
|
text: '右对齐',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'lineHeight',
|
key: 'lineHeight',
|
||||||
name: '行高',
|
name: '行高',
|
||||||
@ -597,6 +622,7 @@ const schema: SchemaType = {
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
indent: 20,
|
indent: 20,
|
||||||
lineHeight: 1.8,
|
lineHeight: 1.8,
|
||||||
|
textAlign: 'left',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Tab: {
|
Tab: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user