筛选
📊 Univer Sheet
筛选插件提供了对单元格的筛选功能。
安装
pnpm add @univerjs/sheets-filter @univerjs/sheets-filter-ui
引入
import '@univerjs/sheets-filter-ui/lib/index.css';
import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
import { UniverSheetsFilterUIPlugin } from '@univerjs/sheets-filter-ui';
国际化
import { LocaleType, Tools } from '@univerjs/core';
import SheetsFilterUIZhCN from '@univerjs/sheets-filter-ui/locale/zh-CN';
const univer = new Univer({
theme: defaultTheme,
locale: LocaleType.ZH_CN,
locales: {
[LocaleType.ZH_CN]: Tools.deepMerge(
SheetsFilterUIZhCN
),
},
});
注册
univer.registerPlugin(UniverSheetsFilterPlugin);
univer.registerPlugin(UniverSheetsFilterUIPlugin);
API
插件 API
Facade API
FRange
对象上的 APIFWorksheet
对象上的 APIFFilter
对象