@a200888213/gbdocx 0.6.0 → 0.6.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a200888213/gbdocx",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "挂逼文档:独立 .docx 编辑器(内核移植自 guabi office/docx 编解码 + 自研 contenteditable 编辑器内核,UI 用原生 HTML 重写),只依赖 gbooxml。",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -104,6 +104,9 @@ function renderHead() {
104
104
  const hostPath = this.embed ? this.io?.getPath?.() : '';
105
105
  this.pathEl.textContent = hostPath
106
106
  || (this.embed ? '' : this.doc.pathText || (this.doc.handle ? '(已关联文件)' : '(未关联文件,保存将另存为)'));
107
+ // 嵌入模式:保存状态由宿主给(落盘结果只有宿主知道)
108
+ const hostStatus = this.embed ? this.io?.getStatus?.() : null;
109
+ this.statusEl.textContent = hostStatus?.text || '';
107
110
  this.dirtyEl.hidden = !this.dirty;
108
111
  }
109
112
 
@@ -157,6 +157,7 @@ export class WordApp {
157
157
  this.editorWrap = root.querySelector('.word-editor');
158
158
  this.titleEl = this.head.titleEl;
159
159
  this.pathEl = this.head.subEl;
160
+ this.statusEl = this.head.statusEl;
160
161
  this.dirtyEl = dirtyEl;
161
162
  this.autosaveEl = this.head.autosaveEl;
162
163
  this.previewBtn = this.head.previewBtn;