dream-num / univer

Univer is an Isomorphic Full-Stack Framework for Creating and Editing Spreadsheets, Docs, and Slides Across Web and Server
https://univer.ai
Apache License 2.0
7.15k stars 629 forks source link

[Bug] document.save is not a function #2870

Open LeosPrograms opened 3 months ago

LeosPrograms commented 3 months ago

在您提交此问题之前,您是否检查了以下内容?

受影响的包和版本

0.2.5

复现链接

https://univer.ai/guides/doc/facade/doc-api

预期行为

The following code should print details about the document:

document = univer.createUnit(UniverInstanceType.UNIVER_DOC, {});
console.log(document.save())

实际行为

This error: document.save is not a function

运行环境

No response

系统信息

No response

univer-bot[bot] commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Origin Title: [Bug] document.save is not a function

Title: [Bug] document.save is not a function


Before you submitted this question, did you check the following?

Affected packages and versions

0.2.5

Recurrence link

https://univer.ai/guides/doc/facade/doc-api

Expected behavior

The following code should print details about the document:

document = univer.createUnit(UniverInstanceType.UNIVER_DOC, {});
console.log(document.save())

Actual behavior

This error: document.save is not a function

Running environment

No response

system message

No response

Jocs commented 3 months ago

document do not has this API, Would you like to have this API? The expected return value?

LeosPrograms commented 2 months ago

I would expect it to be similar to the way it works for spreadsheets. However, if this is not part of the documents api, it should be removed from this page https://univer.ai/guides/doc/facade/doc-api