mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2026-02-07 17:15:33 +00:00
Compare commits
No commits in common. "861ff875cefbeea7b351ed8a815ca014ccf4c4d6" and "c496af0566219b5f21cbba742392092c247811a1" have entirely different histories.
861ff875ce
...
c496af0566
@ -2,12 +2,11 @@ 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<TableInstance>();
|
||||
const Table = ref<InstanceType<typeof ElTable>>();
|
||||
|
||||
// 配置
|
||||
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(e.id));
|
||||
e.children = users.value.filter(u => u.roleIds.includes(u.id));
|
||||
});
|
||||
|
||||
data.role = res as Item[];
|
||||
|
||||
@ -275,10 +275,7 @@ 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