mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 08:36:19 +08:00
perf(form): improve the form function
This commit is contained in:
11
src/api/demo/model/optionsModel.ts
Normal file
11
src/api/demo/model/optionsModel.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface DemoOptionsItem {
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Request list return value
|
||||
*/
|
||||
export type DemoOptionsGetResultModel = BasicFetchResult<DemoOptionsItem[]>;
|
16
src/api/demo/select.ts
Normal file
16
src/api/demo/select.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { DemoOptionsGetResultModel } from './model/optionsModel';
|
||||
|
||||
enum Api {
|
||||
OPTIONS_LIST = '/select/getDemoOptions',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Get sample options value
|
||||
*/
|
||||
export function optionsListApi() {
|
||||
return defHttp.request<DemoOptionsGetResultModel>({
|
||||
url: Api.OPTIONS_LIST,
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user