feat: add page number format option

This commit is contained in:
Hufe921
2023-04-03 21:29:08 +08:00
parent 045e2ffe4e
commit 4987723f27
8 changed files with 65 additions and 5 deletions
+9 -1
View File
@@ -1,10 +1,18 @@
import { IPageNumber } from '../../interface/PageNumber'
import { NumberType } from '../enum/Common'
import { RowFlex } from '../enum/Row'
export const FORMAT_PLACEHOLDER = {
PAGE_NO: '{pageNo}',
PAGE_COUNT: '{pageCount}'
}
export const defaultPageNumberOption: Readonly<Required<IPageNumber>> = {
bottom: 60,
size: 12,
font: 'Yahei',
color: '#000000',
rowFlex: RowFlex.CENTER
rowFlex: RowFlex.CENTER,
format: FORMAT_PLACEHOLDER.PAGE_NO,
numberType: NumberType.ARABIC
}
+5
View File
@@ -2,4 +2,9 @@ export enum MaxHeightRatio {
HALF = 'half',
ONE_THIRD = 'one-third',
QUARTER = 'quarter'
}
export enum NumberType {
ARABIC = 'arabic',
CHINESE = 'chinese'
}