@gct-paas/word 0.1.73-patch.4 → 0.1.73-patch.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.
package/README.md CHANGED
@@ -158,7 +158,10 @@ Vue 运行时注册函数。建议在 `createApp` 后、`mount` 前调用。
158
158
  - `options.factoryType`:`'template' | 'instance'`
159
159
  - `options.modelKey`:主模型 key
160
160
  - `options.suiteKey?`:套件 key(默认常用 `edhr`)
161
- - `options.isPreview?` / `options.isDetailPage?` / `options.renderModeType?`:运行模式控制
161
+ - `options.isPreview?` / `options.isRefer?` / `options.isDetailPage?` / `options.renderModeType?`:运行模式控制
162
+ - `isPreview`:设计器预览,隐藏 ribbon / toolkit / panel
163
+ - `isRefer`:设计器引用只读(对齐 Excel `DesignMode.Refer`),仅保留右侧属性 panel(隐藏 ribbon / toolkit),禁止编辑
164
+ - `isPreview` 与 `isRefer` **互斥**;同时为 true 时忽略 `isPreview`,仅启用 `isRefer`
162
165
 
163
166
  返回值:
164
167
 
@@ -2,6 +2,7 @@ import { IModalProps } from './modal.type';
2
2
  declare const _default: import('vue').DefineComponent<IModalProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IModalProps> & Readonly<{}>, {
3
3
  body: import('vue').Component | null;
4
4
  title: string;
5
+ readonly: boolean;
5
6
  width: number;
6
7
  zIndex: number;
7
8
  className: string;
@@ -28,6 +28,11 @@ export interface IModalOptions {
28
28
  draggable?: boolean;
29
29
  /** 是否显示遮罩,draggable 时默认 false */
30
30
  showMask?: boolean;
31
+ /**
32
+ * 只读查看:隐藏取消/继续确认,确认按钮变为「关闭」且不落盘;
33
+ * body 内容入口锁,仅可滚动查看。
34
+ */
35
+ readonly?: boolean;
31
36
  onConfirm?: (ins: IModalInstance) => Promise<void> | void;
32
37
  onConfirmContinue?: (ins: IModalInstance) => Promise<void> | void;
33
38
  onCancel?: (ins: IModalInstance) => Promise<void> | void;
@@ -15,6 +15,13 @@ export interface DocInitOptions {
15
15
  mode?: DocModeType;
16
16
  model?: DocModel;
17
17
  preview?: boolean;
18
+ /**
19
+ * 设计器引用只读态;与 preview 互斥。
20
+ * 仅保留右侧属性 panel,禁止修改文档与配置
21
+ */
22
+ refer?: boolean;
23
+ /** 是否是模拟填报 */
24
+ isMockReport?: boolean;
18
25
  mainModelKey: ModelKey;
19
26
  /** 文档运行时元信息(接口数据 + 业务数据) */
20
27
  docRuntimeMeta: DocRuntimeMeta;
@@ -43,8 +50,14 @@ export declare class Doc {
43
50
  mode: DocModeType;
44
51
  /** 按钮区渲染模式 */
45
52
  btnRenderModeType: DocModeType;
46
- /** 是否是设计器预览模式 */
53
+ /** 是否是设计器预览模式(隐藏设计器壳) */
47
54
  preview: boolean;
55
+ /** 是否是设计器引用只读态(保留壳,禁止编辑) */
56
+ refer: boolean;
57
+ /** 是否是模拟填报 */
58
+ isMockReport: boolean;
59
+ /** 填报内容区底色开关配置 */
60
+ showPrintFieldBg: boolean;
48
61
  model?: DocModel;
49
62
  pages: Page[];
50
63
  commandManager: CommandManager;
@@ -125,6 +138,13 @@ export declare class Doc {
125
138
  isInFillMode(): boolean;
126
139
  /** 是否是打印模式 */
127
140
  isInPrintMode(): boolean;
141
+ /**
142
+ * 设计侧不可编辑:预览(藏壳)或引用只读(留 panel)。
143
+ * 用于命令 / 输入 / 拖拽等写操作拦截。
144
+ */
145
+ isDesignReadonly(): boolean;
146
+ /** 打印时临时开关填报内容区底色 */
147
+ setShowPrintFieldBg(show: boolean): void;
128
148
  bumpUpdateTick(): void;
129
149
  increaseTextRunCount(): void;
130
150
  /**
@@ -11,6 +11,7 @@ export declare function useDocPubApiContext(): {
11
11
  query: ComputedRef<import('../../../sdk/types').DocQueryAPI>;
12
12
  updateTick: ComputedRef<number>;
13
13
  isDesignMode: ComputedRef<boolean>;
14
+ isRefer: ComputedRef<boolean>;
14
15
  loading: ComputedRef<boolean>;
15
16
  hasData: ComputedRef<boolean>;
16
17
  hasPages: ComputedRef<boolean>;