Univer
Univer Sheet
功能
排序

排序

📊 Univer Sheet

排序插件提供了对指定区域内单元格的排序功能。

安装

pnpm add @univerjs/sheets-sort @univerjs/sheets-sort-ui

引入

import '@univerjs/sheets-sort-ui/lib/index.css';
 
import { UniverSheetsSortPlugin } from '@univerjs/sheets-sort';
import { UniverSheetsSortUIPlugin } from '@univerjs/sheets-sort-ui';

国际化

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

注册

univer.registerPlugin(UniverSheetsSortPlugin);
univer.registerPlugin(UniverSheetsSortUIPlugin);

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