mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-12 05:32:48 +00:00
22 lines
411 B
TypeScript
22 lines
411 B
TypeScript
import { getCurrentInstance } from "vue";
|
|
import { useConfig } from "../../../hooks";
|
|
|
|
export function usePlugins() {
|
|
const that: any = getCurrentInstance();
|
|
const { style } = useConfig();
|
|
|
|
// 插件创建
|
|
function create(plugins: ClTable.Plugin[] = []) {
|
|
// 执行
|
|
[...(style.table.plugins || []), ...plugins].forEach((p) => {
|
|
p({
|
|
exposed: that.exposed
|
|
});
|
|
});
|
|
}
|
|
|
|
return {
|
|
create
|
|
};
|
|
}
|