1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| /*
| * @Author: 秦少卫
| * @Date: 2024-05-29 15:13:58
| * @LastEditors: 秦少卫
| * @LastEditTime: 2024-05-29 15:32:49
| * @Description: 文件夹分页
| */
|
| import {
| createFileType as createFileTypeApi,
| getFileTypeList as getFileTypeListApi,
| } from '@/api/user';
| import { Spin } from 'view-ui-plus';
| export default function useFileType() {
| const createFileType = async (fileTypeName, parentId = '') => {
| Spin.show();
| const res = await createFileTypeApi({
| data: {
| name: fileTypeName,
| parentId,
| },
| });
| Spin.hide();
| return res;
| };
|
| const getFileTypeList = async (params) => {
| Spin.show();
| const res = await getFileTypeListApi({
| data: params,
| });
| Spin.hide();
| return res;
| };
|
| return {
| createFileType,
| getFileTypeList,
| };
| }
|
|