operp-print-designer 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/components/Canvas.d.ts +2 -0
- package/dist/components/PrintDesigner/index.d.ts +3 -1
- package/dist/components/PrintPreview.d.ts +4 -1
- package/dist/constants/index.d.ts +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/operp-print-designer.es.js +4095 -3965
- package/dist/operp-print-designer.umd.js +21 -21
- package/dist/types/index.d.ts +6 -0
- package/dist/utils/dataHelper.d.ts +4 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -41,6 +41,12 @@ export interface DataSource {
|
|
|
41
41
|
/** 创建时间戳 */
|
|
42
42
|
createdAt: number;
|
|
43
43
|
}
|
|
44
|
+
export interface PrintDesignerDataSource {
|
|
45
|
+
/** 对象数据,用于文本、图片、条码、二维码等单值绑定 */
|
|
46
|
+
data?: Record<string, unknown>;
|
|
47
|
+
/** 数组数据,用于表格绑定 */
|
|
48
|
+
list?: Record<string, unknown>[];
|
|
49
|
+
}
|
|
44
50
|
export type PaperSizePreset = 'A4' | 'A3' | 'A5' | 'Letter' | 'Legal' | 'custom';
|
|
45
51
|
export type Orientation = 'portrait' | 'landscape';
|
|
46
52
|
export interface PageSettings {
|
|
@@ -7,6 +7,10 @@ export declare function safeParseJSON(jsonStr: string): any;
|
|
|
7
7
|
* 获取组件属性的渲染值(支持数据绑定)
|
|
8
8
|
*/
|
|
9
9
|
export declare function getRenderValue(comp: CanvasComponent, propName: string, dataSources: DataSource[]): string;
|
|
10
|
+
/**
|
|
11
|
+
* 按组件格式配置渲染值。目前支持常用日期格式,如 yyyyMMdd、yyyy-MM-dd HH:mm:ss。
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatRenderValue(value: string, format?: string): string;
|
|
10
14
|
/**
|
|
11
15
|
* 通过路径获取对象属性值
|
|
12
16
|
* 例如:obj = {a: {b: 123}}, path = 'a.b' -> return 123
|