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