first
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import { list as fetchUsers } from '@/api/user'
|
||||
|
||||
export function loadAllUsers () {
|
||||
const allUsers = ref([])
|
||||
const getAllUsers = async () => {
|
||||
const res = await fetchUsers({ page_size: 9999 }).catch(_ => false)
|
||||
if (res) {
|
||||
allUsers.value = res.data.list
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
allUsers,
|
||||
getAllUsers,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user