Univer
Univer Sheet
功能
评论 / 批注
评论 / 批注简介

评论 / 批注简介

📊 Univer Sheet📝 Univer Doc

评论 / 批注插件提供了对单元格进行评论或者批注的功能。

安装

pnpm add @univerjs/sheets-thread-comment-base @univerjs/sheets-thread-comment @univerjs/thread-comment @univerjs/thread-comment-ui

引入

import '@univerjs/thread-comment-ui/lib/index.css';
 
import { IThreadCommentMentionDataService, UniverThreadCommentUIPlugin } from '@univerjs/thread-comment-ui';
import { UniverThreadCommentPlugin } from '@univerjs/thread-comment';
import { UniverSheetsThreadCommentBasePlugin } from '@univerjs/sheets-thread-comment-base';
import { UniverSheetsThreadCommentPlugin } from '@univerjs/sheets-thread-comment';

国际化

import { LocaleType, Tools } from '@univerjs/core';
import ThreadCommentUIZhCN from '@univerjs/thread-comment-ui/locale/zh-CN';
import SheetsThreadCommentZhCN from '@univerjs/sheets-thread-comment/locale/zh-CN';
 
const univer = new Univer({
  theme: defaultTheme,
  locale: LocaleType.ZH_CN,
  locales: {
    [LocaleType.ZH_CN]: Tools.deepMerge(
      ThreadCommentUIZhCN,
      SheetsThreadCommentZhCN
    ),
  },
});

注册

univer.registerPlugin(UniverThreadCommentPlugin);
univer.registerPlugin(UniverThreadCommentUIPlugin);
univer.registerPlugin(UniverSheetsThreadCommentBasePlugin);
univer.registerPlugin(UniverSheetsThreadCommentPlugin);

Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.