yanzhen-design-vue
Version:
42 lines (41 loc) • 1.48 kB
JavaScript
import { provideApiConfig } from "@yanzhen-lowcode/core";
import { contactsApis } from "../contacts.mjs";
import { Contacts } from "../constants/contacts.mjs";
import "../constants/index.mjs";
import { Search } from "../constants/apis.mjs";
const useContactsApi = (props) => {
const _api = provideApiConfig(props);
const getUserList = (options) => {
return _api == null ? void 0 : _api.value.request(options, contactsApis[Contacts.USER]);
};
const getUsuallyList = (options) => {
return _api == null ? void 0 : _api.value.request(options, contactsApis[Contacts.USUALLY]);
};
const getOutOrgList = (options) => {
return _api == null ? void 0 : _api.value.request(options, contactsApis[Contacts.OUTORG]);
};
const getRoleList = (options) => {
return _api == null ? void 0 : _api.value.request(options, contactsApis[Contacts.ROLE]);
};
const getOrganizationList = (options) => {
return _api == null ? void 0 : _api.value.request(options, contactsApis[Contacts.ORGANIZATION]);
};
const getGroupList = (options) => {
return _api == null ? void 0 : _api.value.request(options, contactsApis[Contacts.GROUP]);
};
const getSearchList = (options) => {
return _api == null ? void 0 : _api.value.request(options, contactsApis[Search.API_KEY]);
};
return {
getSearchList,
getUserList,
getUsuallyList,
getOutOrgList,
getRoleList,
getGroupList,
getOrganizationList
};
};
export {
useContactsApi
};