-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
Submodule fs-admin-antdv
updated
5 files
+9 −0 | src/router/source/modules/crud.ts | |
+0 −0 | src/views/crud/debug/api.ts | |
+28 −40 | src/views/crud/debug/crud.tsx | |
+0 −0 | src/views/crud/debug/index.vue | |
+13 −2 | src/views/crud/debug/mock.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Ref } from "vue"; | ||
|
||
export default { | ||
/** | ||
* 重构object,但忽略某些字段 | ||
* @param ref | ||
* @param skips | ||
*/ | ||
omit(ref: Ref, ...skips: string[]): any { | ||
const keys = Object.keys(ref.value); | ||
const pAttrs: any = {}; | ||
for (const key of keys) { | ||
if (key === "loading") { | ||
continue; | ||
} | ||
if (skips.indexOf(key) >= 0) { | ||
continue; | ||
} | ||
pAttrs[key] = ref.value[key]; | ||
} | ||
return pAttrs; | ||
} | ||
}; |