@gct-paas/word 0.1.74-beta.5 → 0.1.74-beta.6

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.
@@ -5,6 +5,9 @@ type __VLS_Props = {
5
5
  declare function __VLS_template(): {
6
6
  attrs: Partial<{}>;
7
7
  slots: {
8
+ expandIcon?(_: {
9
+ open: boolean;
10
+ }): any;
8
11
  default?(_: {}): any;
9
12
  };
10
13
  refs: {
@@ -1,7 +1,7 @@
1
1
  import { IEmptyProps } from './empty';
2
2
  declare const _default: import('vue').DefineComponent<IEmptyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IEmptyProps> & Readonly<{}>, {
3
- width: number | string;
4
3
  height: number | string;
4
+ width: number | string;
5
5
  tip: string;
6
6
  iconSrc: string;
7
7
  iconHeight: number | string;
@@ -6,8 +6,8 @@ declare const _default: import('vue').DefineComponent<IUploadProps, {}, {}, {},
6
6
  onChange?: ((...args: any[]) => any) | undefined;
7
7
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
8
8
  }>, {
9
- width: string;
10
9
  height: string;
10
+ width: string;
11
11
  tip: string;
12
12
  accept: string;
13
13
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -30,7 +30,13 @@ export interface ContainLayout extends ImageSize {
30
30
  }
31
31
  /** object-fit: contain —— 等比缩放到目标框内并居中,保证完整显示 */
32
32
  export declare function computeContainLayout(natural: ImageSize, box: ImageSize): ContainLayout;
33
- /** 将签名姓名绘制为图片 DataURL */
34
- export declare function createSignatureImageDataUrl(name: string, width: number, height: number): string;
35
- /** 创建签名图片 */
36
- export declare function createSignatureImage(name: string, width: number, height: number): Promise<unknown>;
33
+ /**
34
+ * 在目标框内等比缩放(contain),不压缩、不拉伸
35
+ */
36
+ export declare function computeContainDisplaySize(natural: ImageSize, box: ImageSize): ImageSize;
37
+ /**
38
+ * 创建无图签名兜底图(用户名 + 电子签名 + 验证日期)
39
+ * 按字段宽高绘制,显示框设多大,字就按多大排
40
+ */
41
+ export declare function createSignatureImageDataUrl(name: string, width?: number, height?: number, time?: number | string): string;
42
+ export declare function createSignatureImage(name: string, width?: number, height?: number, time?: number | string): Promise<HTMLImageElement>;
@@ -58,8 +58,8 @@ export declare class Page extends LayoutGroup<PageChild> implements IContainerMe
58
58
  */
59
59
  get contentMaxHeight(): number;
60
60
  /**
61
- * 获取当前页面所有子元素的总高度
62
- * 累加段落、表格等子组件的高度
61
+ * 获取当前页面正文实际占用高度
62
+ * 按段落、表格等子组件的底边计算,包含显式块间距
63
63
  */
64
64
  getContentHeight(): number;
65
65
  /** 获取当前是第几页 */
@@ -1,4 +1,12 @@
1
1
  import { LayoutNode, LayoutNodeOptions } from './LayoutNode';
2
+ type PositionedLayoutNode = Pick<LayoutNode, 'y' | 'height'>;
3
+ /**
4
+ * 按子节点的实际底边计算内容占位高度。
5
+ *
6
+ * 子节点可能带有块级间距形成的 y 偏移;仅累加 height 会漏掉这些间距,
7
+ * 导致后续文档流插入到已有内容之间。
8
+ */
9
+ export declare function measureLayoutContentHeight(children: readonly PositionedLayoutNode[]): number;
2
10
  /**
3
11
  * 布局容器配置
4
12
  */
@@ -68,6 +76,8 @@ export declare abstract class LayoutGroup<T extends LayoutNode = LayoutNode> ext
68
76
  * 获取子节点数量
69
77
  */
70
78
  getChildCount(): number;
79
+ /** 获取所有子节点在当前容器中实际占用的纵向高度。 */
80
+ protected getChildrenContentHeight(): number;
71
81
  /**
72
82
  * 获取第一个子节点
73
83
  */
@@ -109,3 +119,4 @@ export declare abstract class LayoutGroup<T extends LayoutNode = LayoutNode> ext
109
119
  */
110
120
  filterChildren(predicate: (child: T) => boolean): T[];
111
121
  }
122
+ export {};
@@ -10,6 +10,8 @@ export interface IImageWidget extends IImageRun {
10
10
  /** 组件元数据 */
11
11
  widgetMeta?: WidgetMeta;
12
12
  signature?: string;
13
+ /** 无图签名时的验证时间 */
14
+ signTime?: number;
13
15
  pageWidgetMeta?: Record<string, any>;
14
16
  dataSlotIndex?: DataSlotIndex;
15
17
  }
@@ -19,6 +21,7 @@ export interface ImageWidgetOptions extends ImageRunOptions {
19
21
  /** 组件元数据 */
20
22
  widgetMeta?: WidgetMeta;
21
23
  signature?: string;
24
+ signTime?: number;
22
25
  pageWidgetMeta?: IImageWidget['pageWidgetMeta'];
23
26
  dataSlotIndex?: DataSlotIndex;
24
27
  }
@@ -30,6 +33,7 @@ export declare class ImageWidget extends ImageRun implements IImageWidget {
30
33
  valuePath?: string;
31
34
  widgetMeta?: WidgetMeta;
32
35
  signature?: string;
36
+ signTime?: number;
33
37
  pageWidgetMeta?: IImageWidget['pageWidgetMeta'];
34
38
  dataSlotIndex?: DataSlotIndex;
35
39
  constructor(options: ImageWidgetOptions);