mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2026-01-27 08:38:15 +00:00
优化
This commit is contained in:
parent
6412330d2e
commit
719fb21fda
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-vue/crud",
|
||||
"version": "7.2.12",
|
||||
"version": "7.2.13",
|
||||
"private": false,
|
||||
"main": "./dist/index.umd.min.js",
|
||||
"typings": "types/index.d.ts",
|
||||
|
||||
@ -60,10 +60,15 @@ export function useProxy(ctx: any) {
|
||||
}
|
||||
|
||||
export function useElApi(keys: string[], el: any) {
|
||||
return keys.reduce((apis, key) => {
|
||||
apis[key] = computed(() => el.value?.[key]);
|
||||
return apis;
|
||||
}, {} as obj);
|
||||
const apis: obj = {};
|
||||
|
||||
keys.forEach((e) => {
|
||||
apis[e] = (...args: any[]) => {
|
||||
return el.value[e](...args);
|
||||
};
|
||||
});
|
||||
|
||||
return apis;
|
||||
}
|
||||
|
||||
export * from "./crud";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user