@gct-paas/word 0.1.74-beta.4 → 0.1.74-beta.5
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/dist/assets/theme/field-state.d.ts +64 -56
- package/dist/base/select/src/basic-select.vue.d.ts +2 -2
- package/dist/base/select/src/searchable-select.vue.d.ts +28 -1
- package/dist/core/constants/paper.d.ts +3 -1
- package/dist/core/view/utils/TextUtil.d.ts +1 -9
- package/dist/index.es.js +322 -242
- package/dist/suites/edhr/component/resolve-field-render-colors.d.ts +2 -4
- package/dist/suites/edhr/component/resolve-marker-color.d.ts +7 -0
- package/dist/suites/shared/components/option-control-colors.d.ts +14 -0
- package/dist/utils/pdf/resolve-pdf-text-baseline.d.ts +1 -2
- package/dist/word.css +363 -363
- package/package.json +1 -1
- package/dist/utils/fonts/cjk-optical-offset.d.ts +0 -12
|
@@ -1,66 +1,74 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* 字段态配色 —— 唯一数据源(Canvas / PDF / 布局)。
|
|
3
|
+
*
|
|
4
|
+
* DOM 控件(input / select)另见 field-state.less,仅保留 DOM 用到的子集;
|
|
5
|
+
* 改色时以本文件为准,并同步 less 中同语义变量。
|
|
6
|
+
*
|
|
7
|
+
* 空值占位 / 括号 [](填报,同色):
|
|
8
|
+
* 可编辑 editable.placeholderColor / marker.default
|
|
9
|
+
* 必填 required.placeholderColor
|
|
10
|
+
* 只读 readonly.placeholderColor / marker.readonly
|
|
11
|
+
* 必填+只读 requiredReadonly.placeholderColor / color + background
|
|
12
|
+
* 禁用 disabled.color / marker.disabled
|
|
4
13
|
*/
|
|
5
14
|
export declare const FieldStateColors: {
|
|
6
|
-
/**
|
|
7
|
-
readonly
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
readonly
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readonly readonlyValueBgActive: "#e8ebf0";
|
|
23
|
-
readonly readonlyValueText: "rgba(0, 0, 0, 0.78)";
|
|
24
|
-
readonly readonlyValueLine: "#adb5bd";
|
|
25
|
-
/** 填报只读 - 空值占位(gct-placeholder-render) */
|
|
26
|
-
readonly readonlyPlaceholderBg: "#f5f7fa";
|
|
27
|
-
readonly readonlyPlaceholderBgActive: "#eef1f5";
|
|
28
|
-
readonly readonlyPlaceholderLine: "#c4c9d0";
|
|
29
|
-
/** 详情页普通字符底色 */
|
|
30
|
-
readonly printBg: "transparent";
|
|
31
|
-
/** 详情页字段底色 */
|
|
32
|
-
readonly printFieldBg: "#E8F3FF";
|
|
33
|
-
/** 详情页字段校验失败底色 */
|
|
34
|
-
readonly printFieldErrorBg: "#FEECED";
|
|
35
|
-
/** 字段括号 [] 颜色 */
|
|
36
|
-
readonly markerDefault: "#000000";
|
|
37
|
-
readonly markerReadonly: "#8c8c8c";
|
|
38
|
-
readonly markerDisabled: "#c9c9c9";
|
|
39
|
-
/** 只读选中态(checkbox / radio) */
|
|
40
|
-
readonly readonlyCheckedBorder: "#91caff";
|
|
41
|
-
readonly readonlyCheckedBg: "#e6f4ff";
|
|
42
|
-
readonly readonlyCheckedFill: "#69b1ff";
|
|
15
|
+
/** 字段括号 []:默认可编辑黑;只读/禁用见下;必填 / 必填+只读复用对应 placeholderColor */
|
|
16
|
+
readonly marker: {
|
|
17
|
+
readonly default: "#1A1D23";
|
|
18
|
+
readonly readonly: "#8c8c8c";
|
|
19
|
+
readonly disabled: "#C6C6C6";
|
|
20
|
+
};
|
|
21
|
+
/** 可编辑 */
|
|
22
|
+
readonly editable: {
|
|
23
|
+
readonly background: "#E8F3FF";
|
|
24
|
+
readonly placeholderColor: "#8B8B8B";
|
|
25
|
+
};
|
|
26
|
+
/** 必填 */
|
|
27
|
+
readonly required: {
|
|
28
|
+
readonly placeholderColor: "#F54547";
|
|
29
|
+
readonly background: "#FEECED";
|
|
30
|
+
};
|
|
43
31
|
/** 禁用 */
|
|
44
|
-
readonly
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
32
|
+
readonly disabled: {
|
|
33
|
+
readonly background: "#F1F2F5";
|
|
34
|
+
readonly color: "#C6C6C6";
|
|
35
|
+
};
|
|
36
|
+
/** 必填 + 只读(他岗字段,弱提示:字色 + 底色) */
|
|
37
|
+
readonly requiredReadonly: {
|
|
38
|
+
readonly placeholderColor: "#FAA9AA";
|
|
39
|
+
readonly color: "#FAA9AA";
|
|
40
|
+
readonly background: "#FFF4F4";
|
|
41
|
+
};
|
|
42
|
+
/** 只读 */
|
|
43
|
+
readonly readonly: {
|
|
44
|
+
readonly background: "#f5f6f8";
|
|
45
|
+
readonly border: "#d9d9d9";
|
|
46
|
+
/** DOM overlay / 下拉等 */
|
|
47
|
+
readonly color: "rgba(0, 0, 0, 0.65)";
|
|
48
|
+
readonly placeholderColor: "#b0b0b0";
|
|
49
|
+
readonly valueColor: "rgba(0, 0, 0, 0.78)";
|
|
50
|
+
};
|
|
51
|
+
/** 详情页 / 打印 */
|
|
52
|
+
readonly print: {
|
|
53
|
+
/** run 级底(字段组底由 fieldBackground 绘制) */
|
|
54
|
+
readonly background: "transparent";
|
|
55
|
+
readonly fieldBackground: "#E8F3FF";
|
|
56
|
+
readonly fieldErrorBackground: "#FEECED";
|
|
57
|
+
readonly placeholderColor: "#b8b8b8";
|
|
58
|
+
};
|
|
51
59
|
/** 校验失败 */
|
|
52
|
-
readonly
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
readonly
|
|
60
|
+
readonly validation: {
|
|
61
|
+
readonly color: "#ff4d4f";
|
|
62
|
+
readonly background: "#fff2f2";
|
|
63
|
+
readonly disabledColor: "#ff7072";
|
|
64
|
+
readonly disabledBackground: "#f5f5f5";
|
|
65
|
+
};
|
|
66
|
+
/** 字段变更批注字色 */
|
|
67
|
+
readonly fieldChange: "#FF9442";
|
|
60
68
|
};
|
|
61
69
|
/** 详情页字段内容四周内边距 */
|
|
62
70
|
export declare const PRINT_FIELD_PAD = 2;
|
|
63
71
|
/** 详情页相邻字段背景间距 */
|
|
64
72
|
export declare const PRINT_FIELD_GAP = 2;
|
|
65
|
-
/**
|
|
66
|
-
export declare const PRINT_EMPTY_FIELD_SIZE =
|
|
73
|
+
/** 详情页字段空值占位尺寸(默认字号 + MEASURE_LINE_HEIGHT 1.1 下字高) */
|
|
74
|
+
export declare const PRINT_EMPTY_FIELD_SIZE = 21;
|
|
@@ -66,12 +66,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
66
66
|
getRef: import('vue').Ref<any, any>;
|
|
67
67
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
68
68
|
edit: (option: DropdownOption) => any;
|
|
69
|
-
click: () => any;
|
|
69
|
+
click: (evt: any) => any;
|
|
70
70
|
change: (val: string | number | (string | number)[], item?: DropdownOption | undefined) => any;
|
|
71
71
|
"update:modelValue": (val: string | number | (string | number)[]) => any;
|
|
72
72
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
73
73
|
onEdit?: ((option: DropdownOption) => any) | undefined;
|
|
74
|
-
onClick?: (() => any) | undefined;
|
|
74
|
+
onClick?: ((evt: any) => any) | undefined;
|
|
75
75
|
onChange?: ((val: string | number | (string | number)[], item?: DropdownOption | undefined) => any) | undefined;
|
|
76
76
|
"onUpdate:modelValue"?: ((val: string | number | (string | number)[]) => any) | undefined;
|
|
77
77
|
}>, {
|
|
@@ -7,8 +7,28 @@ type __VLS_Props = {
|
|
|
7
7
|
readonly?: boolean;
|
|
8
8
|
allowClear?: boolean;
|
|
9
9
|
popperWidth?: number;
|
|
10
|
+
/** 是否需要分组展示 */
|
|
11
|
+
grouped?: boolean;
|
|
10
12
|
};
|
|
11
|
-
declare
|
|
13
|
+
declare function __VLS_template(): {
|
|
14
|
+
attrs: Partial<{}>;
|
|
15
|
+
slots: {
|
|
16
|
+
option?(_: {
|
|
17
|
+
option: DropdownOption;
|
|
18
|
+
}): any;
|
|
19
|
+
'gct-ss-option-icon'?(_: {
|
|
20
|
+
option: DropdownOption;
|
|
21
|
+
}): any;
|
|
22
|
+
};
|
|
23
|
+
refs: {
|
|
24
|
+
rootRef: HTMLDivElement;
|
|
25
|
+
inputRef: HTMLInputElement;
|
|
26
|
+
dropdownRef: HTMLDivElement;
|
|
27
|
+
};
|
|
28
|
+
rootEl: HTMLDivElement;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
31
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
32
|
change: (val?: string | number | undefined, item?: DropdownOption | undefined) => any;
|
|
13
33
|
"update:modelValue": (val?: string | number | undefined) => any;
|
|
14
34
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
@@ -19,10 +39,17 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
19
39
|
disabled: boolean;
|
|
20
40
|
options: DropdownOption[];
|
|
21
41
|
placeholder: string;
|
|
42
|
+
grouped: boolean;
|
|
22
43
|
allowClear: boolean;
|
|
23
44
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
45
|
rootRef: HTMLDivElement;
|
|
25
46
|
inputRef: HTMLInputElement;
|
|
26
47
|
dropdownRef: HTMLDivElement;
|
|
27
48
|
}, HTMLDivElement>;
|
|
49
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
50
|
export default _default;
|
|
51
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -27,7 +27,9 @@ export declare const DEFAULT_PAGE_PADDING: [number, number, number, number];
|
|
|
27
27
|
export declare const DEFAULT_CELL_PADDING: [number, number, number, number];
|
|
28
28
|
export declare const DEFAULT_FONT_SIZE = 16;
|
|
29
29
|
/** 默认黑体 */
|
|
30
|
-
export declare const DEFAULT_LINE_HEIGHT = 1.
|
|
30
|
+
export declare const DEFAULT_LINE_HEIGHT = 1.5715;
|
|
31
|
+
/** Konva 度量 lineHeight(仅量字盒,不含段落 DEFAULT_LINE_HEIGHT) */
|
|
32
|
+
export declare const MEASURE_LINE_HEIGHT = 1.1;
|
|
31
33
|
/** 图片 / 签名行高,略高于内容,避免贴行又不过松 */
|
|
32
34
|
export declare const IMAGE_LINE_HEIGHT = 1.1;
|
|
33
35
|
export declare const DEFAULT_FONT_FAMILY = "\"Noto Sans SC\", \"NotoSansSC\", \"\u9ED1\u4F53\", \"SimHei\", sans-serif";
|
|
@@ -66,17 +66,9 @@ export declare class TextUtil {
|
|
|
66
66
|
* @returns
|
|
67
67
|
*/
|
|
68
68
|
private static getMeasureCacheKey;
|
|
69
|
-
/** 历史默认西文栈:仅黑体垂直定位参照,保持与旧版观感一致 */
|
|
70
|
-
private static readonly VERTICAL_METRICS_REF_FONT;
|
|
71
|
-
/**
|
|
72
|
-
* 是否为文档黑体(Noto Sans SC);宋体/楷体不走 Roboto 垂直参照
|
|
73
|
-
*/
|
|
74
|
-
private static isHeitiDocumentFontFamily;
|
|
75
69
|
/**
|
|
76
70
|
* 计算字体度量 ascent / descent
|
|
77
|
-
*
|
|
78
|
-
* 黑体:用 Roboto 栈的 'Hg' + actualBoundingBox 做垂直定位(接近旧默认观感)。
|
|
79
|
-
* 宋体/楷体/其它:用自身字体度量。
|
|
71
|
+
* 与屏显/PDF 绘制字体一致,直接用文档 fontFamily 度量(黑体为 Noto Sans SC)。
|
|
80
72
|
*/
|
|
81
73
|
static getFontMetrics(payload: Konva.TextConfig): {
|
|
82
74
|
ascent: number;
|