wangrong
2026-08-28 17b92e9b60dda6dcc20c748046a5ff3c3958d52e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { getCurrentInstance } from "vue";
import { useConfig } from "../../../hooks";
import { uniqueFns } from "../../../utils";
 
export function usePlugins() {
    const that: any = getCurrentInstance();
    const { style } = useConfig();
 
    // 插件创建
    function create(plugins: ClTable.Plugin[] = []) {
        // 执行
        uniqueFns([...(style.table.plugins || []), ...plugins]).forEach((p) => {
            p({
                exposed: that.exposed
            });
        });
    }
 
    return {
        create
    };
}