mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-10 20:02:54 +00:00
Compare commits
6 Commits
c496af0566
...
861ff875ce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
861ff875ce | ||
|
|
0a09a661b9 | ||
|
|
766033a18d | ||
|
|
2fc8c351ae | ||
|
|
66b36ac39f | ||
|
|
8976bf67a2 |
@ -2,11 +2,12 @@ import { inject, reactive, ref } from "vue";
|
||||
import { useConfig } from "../../../hooks";
|
||||
import { getValue, mergeConfig } from "../../../utils";
|
||||
import { ElTable } from "element-plus";
|
||||
import type { TableInstance } from "element-plus";
|
||||
|
||||
export function useTable(props: any) {
|
||||
const { style } = useConfig();
|
||||
|
||||
const Table = ref<InstanceType<typeof ElTable>>();
|
||||
const Table = ref<TableInstance>();
|
||||
|
||||
// 配置
|
||||
const config = reactive<ClTable.Config>(mergeConfig(props, inject("useTable__options") || {}));
|
||||
|
||||
@ -223,7 +223,7 @@ async function getDept() {
|
||||
async function getRole() {
|
||||
return service.base.sys.role.list().then(res => {
|
||||
res.forEach(e => {
|
||||
e.children = users.value.filter(u => u.roleIds.includes(u.id));
|
||||
e.children = users.value.filter(u => u.roleIds.includes(e.id));
|
||||
});
|
||||
|
||||
data.role = res as Item[];
|
||||
|
||||
@ -275,7 +275,10 @@ function open() {
|
||||
}
|
||||
|
||||
if (props.onSubmit) {
|
||||
props.onSubmit(upload, { done, close });
|
||||
props.onSubmit({
|
||||
...upload,
|
||||
..._
|
||||
}, { done, close });
|
||||
} else {
|
||||
ElMessage.error(t('[cl-import-btn] onSubmit is required'));
|
||||
done();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user