🎉 Release v0.1.13 #2394
Replies: 1 comment
-
🎊 [email protected]🚧 重要提示该项目仍在积极开发中,预计会有重大 API 更改。您的反馈至关重要!请提交 issues 和建议,帮助我们塑造 Univer 的未来。 🚀 快速开始如果您希望了解 Univer,请查看我们的入门文档。 🆕 版本亮点🎉 新功能在本次发布中,我们很高兴介绍一组新功能和改进,以增强您的 Univer 体验: 浮动图像 现在,您可以在电子表格 / 文档中插入浮动图像,使您的数据更加直观。此功能允许您将图像添加到工作表画布区域,并根据需要调整它们的位置和大小。
pnpm add @univerjs/drawing @univerjs/drawing-ui 如果您想在 Univer Sheet 中使用此功能,还需安装以下包: pnpm add @univerjs/sheets-drawing @univerjs/sheets-drawing-ui 如果您想在 Univer Doc 中使用此功能,则安装以下包: pnpm add @univerjs/docs-drawing @univerjs/docs-drawing-ui
import '@univerjs/drawing-ui/lib/index.css';
import '@univerjs/docs-drawing-ui/lib/index.css';
import { UniverDrawingPlugin } from '@univerjs/drawing';
import { UniverDrawingUIPlugin } from '@univerjs/drawing-ui';
// 在 Univer Sheet 中使用此功能
import { UniverSheetsDrawingPlugin } from '@univerjs/sheets-drawing';
import { UniverSheetsDrawingUIPlugin } from '@univerjs/sheets-drawing-ui';
// 在 Univer Doc 中使用此功能
import { UniverDocsDrawingPlugin} from '@univerjs/docs-drawing';
import { UniverDocsDrawingUIPlugin } from '@univerjs/docs-drawing-ui';
import { LocaleType, Tools } from '@univerjs/core'
+ import DrawingUIZhCN from '@univerjs/drawing-ui/locale/zh-CN';
// 在 Univer Sheet 中使用此功能
+ import SheetsDrawingUIZhCN from '@univerjs/sheets-drawing-ui/locale/zh-CN';
// 在 Univer Doc 中使用此功能
+ import DocsDrawingUIZhCN from '@univerjs/docs-drawing-ui/locale/zh-CN';
const univer = new Univer({
theme: defaultTheme,
locale: LocaleType.ZH_CN,
locales: {
[LocaleType.ZH_CN]: Tools.deepMerge(
+ DrawingUIZhCN,
// 在 Univer Sheet 中使用此功能
+ SheetsDrawingUIZhCN
// 在 Univer Doc 中使用此功能
+ DocsDrawingUIZhCN
),
},
});
univer.registerPlugin(UniverDrawingPlugin);
univer.registerPlugin(UniverDrawingUIPlugin);
// 在 Univer Sheet 中使用此功能
univer.registerPlugin(UniverSheetsDrawingPlugin);
univer.registerPlugin(UniverSheetsDrawingUIPlugin);
// 在 Univer Doc 中使用此功能
univer.registerPlugin(UniverDocsDrawingPlugin);
univer.registerPlugin(UniverDocsDrawingUIPlugin); 此外, import { SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui';
const floatDomService = accessor.get(SheetCanvasFloatDomManagerService);
floatDomService.addFloatDomToPosition({
allowTransform: true,
initPosition: {
startX: 200,
endX: 400,
startY: 200,
endY: 400,
},
componentKey: 'ImageDemo',
}); 有关更多详细信息,请查看文档。 超链接文本
用法: import { UniverSheetsHyperLinkUIPlugin } from '@univerjs/sheets-hyper-link-ui';
univer.registerPlugin(UniverSheetsHyperLinkUIPlugin); 有关更多详细信息,请查看文档。 权限控制 在前端场景中处理权限拦截。当检测到某个操作没有相应的权限时,将终止代码执行并提示用户缺少权限。 用法: import { WorkbookEditablePermission } from '@univerjs/sheets';
import { IPermissionService } from '@univerjs/core';
class YourService {
constructor(@IPermissionService private _permissionService: IPermissionService) {
}
setWorkbookNotEditable() {
this._permissionService.updatePermissionPoint(new WorkbookEditablePermission('unitId').id, false);
}
setWorkbookEditable() {
this._permissionService.updatePermissionPoint(new WorkbookEditablePermission('unitId').id, true);
}
} 有关更多详细信息,请查看文档。 💔 破坏性更新从 v0.1.13 开始,我们统一了导入国际化资源的方式: - import { enUS as DesignEnUS } from '@univerjs/design';
+ import DesignEnUS from '@univerjs/design/locale/en-US'; 我们还删除了内置的简体中文语言包,开发人员需要自行导入: const univer = new Univer({
theme: defaultTheme,
+ locale: LocaleType.ZH_CN,
+ locales: {
+ [LocaleType.ZH_CN]: zhCN,
+ },
}); 温馨提示: 如果您正在为导入大量国际化资源和样式文件而烦恼,可以使用univer plugins来避免这些琐事。 🎢 特别感谢感谢以下社区用户为本次发布做出的杰出贡献:
📢 加入讨论我们欢迎您的参与和见解,一起踏上这个激动人心的旅程。请通过以下方式与我们联系: 📝 更新日志完整的更新日志 (2024-06-03) |
Beta Was this translation helpful? Give feedback.
-
🎊 [email protected]
🚧 Important Note
This project is still in heavy development, and major API changes are expected. Your feedback is crucial! Please submit issues and suggestions to help us shape the future of Univer.
🚀 Getting Started
If you're eager to explore Univer, check out our getting started documentation.
Dive into the world of collaborative document, spreadsheet, and presentation editing powered by Univer!
🆕 What's new
🎉 Highlights
In this release, we are excited to introduce a new set of features and improvements to enhance your Univer experience. Here are the highlights:
Floating Images
Now you can insert floating images into your spreadsheet / document to make your data more visually appealing. This feature allows you to add images to your sheet canvas area and adjust their position and size as needed.
If you want to use this feature in Univer Sheet, install the following package:
Or if you want to use this feature in Univer Doc, install the following package:
In addition,
@univerjs/sheets-drawing-ui
provides an API to allow developers to add a floating image to the sheet canvas area.Check out the documentation for more details.
Hyperlink
@univerjs/sheets-hyper-link-ui
provides a hyperlink feature that allows users to create links for quick access to resources both within and outside of the spreadsheet, including web pages, files, email addresses, or other locations in the workbook.For Usage:
Check out the documentation for more details.
Permission
Handle permission interception in front-end scenarios. When it detects that there is no corresponding permission for a certain action, it will terminate the code execution and prompt the user about the missing permission.
For Usage:
Check out the documentation for more details.
💔 Breaking Changes
From v0.1.13, we have unified the way to import internationalization resources:
And we have also removed the built-in Simplified Chinese language pack, developers need to import it themselves:
Note: If you are troubled by importing a large number of internationalization resources and style files, you can use the univer plugins to import them, please refer to univer plugins.
🎢 Special Thanks
Special thanks to the following contributors who have made this release possible:
📢 Join the Conversation
We welcome your input and insights as we embark on this exciting journey. Connect with us on:
📝 Changelog
Full changelog (2024-06-03)
Bug Fixes
Features
This discussion was created from the release 🎉 Release v0.1.13.
Beta Was this translation helpful? Give feedback.
All reactions