zyf-model-engine 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/build/getEnv.d.ts +13 -0
  2. package/build/plugins.d.ts +7 -0
  3. package/build/proxy.d.ts +11 -0
  4. package/index.html +2 -100
  5. package/manifest.webmanifest +1 -0
  6. package/package.json +3 -94
  7. package/registerSW.js +1 -0
  8. package/src/api/config/servicePort.d.ts +2 -0
  9. package/src/api/enums/httpEnum.d.ts +29 -0
  10. package/src/api/helper/axiosCancel.d.ts +21 -0
  11. package/src/api/helper/axiosFileCancel.d.ts +27 -0
  12. package/src/api/helper/checkStatus.d.ts +6 -0
  13. package/src/api/index.d.ts +26 -0
  14. package/src/api/interface/index.d.ts +18 -0
  15. package/src/components/CTree/interface/index.d.ts +6 -0
  16. package/src/components/Grid/interface/index.d.ts +5 -0
  17. package/src/components/ProTable/interface/index.d.ts +66 -0
  18. package/src/config/index.d.ts +5 -0
  19. package/src/config/nprogress.d.ts +3 -0
  20. package/src/config/piniaPersist.d.ts +10 -0
  21. package/src/config/serviceLoading.d.ts +5 -0
  22. package/src/enums/httpEnum.d.ts +19 -0
  23. package/src/hooks/interface/index.d.ts +30 -0
  24. package/src/hooks/useOnline.d.ts +6 -0
  25. package/src/hooks/useTable.d.ts +47 -0
  26. package/src/main.d.ts +1 -0
  27. package/src/stores/commonStore.d.ts +2 -0
  28. package/src/stores/index.d.ts +2 -0
  29. package/src/stores/interface/index.d.ts +1 -0
  30. package/src/utils/color.d.ts +28 -0
  31. package/src/utils/commonUtils.d.ts +63 -0
  32. package/src/utils/errorHandler.d.ts +5 -0
  33. package/src/utils/is.d.ts +82 -0
  34. package/src/utils/layoutUtils.d.ts +44 -0
  35. package/src/utils/localUtils.d.ts +24 -0
  36. package/src/utils/serviceDict.d.ts +7 -0
  37. package/style.css +1 -0
  38. package/sw.js +1 -0
  39. package/vite.config.d.ts +2 -0
  40. package/workbox-3e911b1d.js +1 -0
  41. package/zyf-model-engine.mjs +45118 -0
  42. package/zyf-model-engine.umd.js +81 -0
  43. package/.editorconfig +0 -15
  44. package/.env +0 -13
  45. package/.env.development +0 -20
  46. package/.env.production +0 -25
  47. package/.env.test +0 -25
  48. package/.eslintignore +0 -15
  49. package/.eslintrc-auto-import.json +0 -65
  50. package/.eslintrc.cjs +0 -66
  51. package/.husky/commit-msg +0 -4
  52. package/.husky/pre-commit +0 -5
  53. package/.prettierignore +0 -9
  54. package/.prettierrc.cjs +0 -41
  55. package/.stylelintignore +0 -4
  56. package/.stylelintrc.cjs +0 -40
  57. package/.vscode/extensions.json +0 -14
  58. package/.vscode/settings.json +0 -92
  59. package/CHANGELOG.md +0 -246
  60. package/LICENSE +0 -21
  61. package/README.md +0 -205
  62. package/auto-imports.d.ts +0 -132
  63. package/build/getEnv.ts +0 -46
  64. package/build/plugins.ts +0 -138
  65. package/build/proxy.ts +0 -28
  66. package/commitlint.config.cjs +0 -84
  67. package/components.d.ts +0 -28
  68. package/lint-staged.config.cjs +0 -8
  69. package/postcss.config.cjs +0 -5
  70. package/src/App.vue +0 -16
  71. package/src/api/config/servicePort.ts +0 -3
  72. package/src/api/enums/httpEnum.ts +0 -35
  73. package/src/api/helper/axiosCancel.ts +0 -50
  74. package/src/api/helper/axiosFileCancel.ts +0 -62
  75. package/src/api/helper/checkStatus.ts +0 -97
  76. package/src/api/index.ts +0 -142
  77. package/src/api/interface/index.ts +0 -27
  78. package/src/assets/global-icons/icon-demo.svg +0 -1
  79. package/src/assets/iconfont/iconfont.scss +0 -44
  80. package/src/assets/iconfont/iconfont.ttf +0 -0
  81. package/src/assets/images/empty-img.png +0 -0
  82. package/src/assets/option-icons/add.svg +0 -1
  83. package/src/assets/option-icons/check.svg +0 -1
  84. package/src/assets/option-icons/config.svg +0 -1
  85. package/src/assets/option-icons/del.svg +0 -1
  86. package/src/assets/option-icons/detail.svg +0 -1
  87. package/src/assets/option-icons/edit.svg +0 -2
  88. package/src/assets/option-icons/export.svg +0 -1
  89. package/src/assets/option-icons/folder.svg +0 -1
  90. package/src/assets/option-icons/full-screen.svg +0 -1
  91. package/src/assets/option-icons/more.svg +0 -1
  92. package/src/assets/option-icons/return.svg +0 -1
  93. package/src/assets/option-icons/search.svg +0 -1
  94. package/src/components/CSvgIcon/index.scss +0 -23
  95. package/src/components/CSvgIcon/index.vue +0 -74
  96. package/src/components/CTree/index.scss +0 -48
  97. package/src/components/CTree/index.vue +0 -176
  98. package/src/components/CTree/interface/index.ts +0 -6
  99. package/src/components/Dialog/index.scss +0 -74
  100. package/src/components/Dialog/index.vue +0 -87
  101. package/src/components/Empty/index.scss +0 -16
  102. package/src/components/Empty/index.vue +0 -43
  103. package/src/components/Grid/components/GridItem.vue +0 -68
  104. package/src/components/Grid/index.vue +0 -167
  105. package/src/components/Grid/interface/index.ts +0 -6
  106. package/src/components/Loading/index.scss +0 -67
  107. package/src/components/Loading/index.vue +0 -13
  108. package/src/components/Overflow/index.vue +0 -76
  109. package/src/components/ProTable/components/ColSetting.vue +0 -45
  110. package/src/components/ProTable/components/Pagination.vue +0 -29
  111. package/src/components/ProTable/components/SearchForm/components/SearchFormItem.vue +0 -93
  112. package/src/components/ProTable/components/SearchForm/index.scss +0 -12
  113. package/src/components/ProTable/components/SearchForm/index.vue +0 -91
  114. package/src/components/ProTable/components/TableColumn.vue +0 -56
  115. package/src/components/ProTable/index.scss +0 -14
  116. package/src/components/ProTable/index.vue +0 -274
  117. package/src/components/ProTable/interface/index.ts +0 -86
  118. package/src/components/ScrollBox/index.vue +0 -44
  119. package/src/components/SvgIcon/index.vue +0 -20
  120. package/src/components/Tabs/index.vue +0 -142
  121. package/src/config/index.ts +0 -12
  122. package/src/config/nprogress.ts +0 -12
  123. package/src/config/piniaPersist.ts +0 -19
  124. package/src/config/serviceLoading.ts +0 -45
  125. package/src/enums/httpEnum.ts +0 -24
  126. package/src/hooks/interface/index.ts +0 -32
  127. package/src/hooks/useOnline.ts +0 -27
  128. package/src/hooks/useTable.ts +0 -167
  129. package/src/main.ts +0 -35
  130. package/src/plugins/button/button.vue +0 -56
  131. package/src/plugins/index.js +0 -26
  132. package/src/plugins/index.vue +0 -24
  133. package/src/plugins/msg/msg.vue +0 -56
  134. package/src/stores/commonStore.ts +0 -9
  135. package/src/stores/index.ts +0 -8
  136. package/src/stores/interface/index.ts +0 -1
  137. package/src/styles/common.scss +0 -87
  138. package/src/styles/element.scss +0 -233
  139. package/src/styles/reset.scss +0 -20
  140. package/src/styles/var.scss +0 -2
  141. package/src/typings/global.d.ts +0 -37
  142. package/src/typings/window.d.ts +0 -8
  143. package/src/utils/color.ts +0 -59
  144. package/src/utils/commonUtils.ts +0 -175
  145. package/src/utils/errorHandler.ts +0 -28
  146. package/src/utils/is.ts +0 -147
  147. package/src/utils/layoutUtils.ts +0 -83
  148. package/src/utils/localUtils.ts +0 -42
  149. package/src/utils/serviceDict.ts +0 -9
  150. package/src/vite-env.d.ts +0 -6
  151. package/tsconfig.json +0 -50
  152. package/vite.config.ts +0 -76
  153. /package/{public/logo.png → logo.png} +0 -0
package/src/api/index.ts DELETED
@@ -1,142 +0,0 @@
1
- import axios, { AxiosInstance, AxiosError, AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse } from "axios";
2
- import { showFullScreenLoading, tryHideFullScreenLoading } from "@/config/serviceLoading";
3
- import { AxiosCanceler } from "./helper/axiosCancel";
4
- import { AxiosFileCancel } from "./helper/axiosFileCancel";
5
- import { ElMessage } from "element-plus";
6
- import { ResultData } from "@/api/interface";
7
- import { ResultEnum } from "@/enums/httpEnum";
8
- import { checkStatus } from "./helper/checkStatus";
9
- import router from "@/routers";
10
- import { PORT } from "@/api/config/servicePort";
11
-
12
- export interface CustomAxiosRequestConfig extends InternalAxiosRequestConfig {
13
- noLoading?: boolean;
14
- repeatRequestCancel?: boolean;
15
- fileUid?: number;
16
- }
17
- const axiosCanceler = new AxiosCanceler();
18
- const axiosFileCancel = new AxiosFileCancel();
19
-
20
- const config = {
21
- // 默认地址请求地址,可在 .env.** 文件中修改
22
- baseURL: import.meta.env.VITE_API_URL as string,
23
- // 设置超时时间
24
- timeout: ResultEnum.TIMEOUT as number,
25
- // 跨域时候允许携带凭证
26
- withCredentials: true,
27
- repeatRequestCancel: false, // 是否开启取消重复请求, 默认为 true
28
- //公共请求头配置,本项目请求头大多数接口是这个,所以这里可以配置一下,对于特殊接口单独配置
29
- headers: {
30
- // "Content-Type": ContentTypeEnum.JSON
31
- "Cache-Control": "no-cache"
32
- },
33
- isUpload: false
34
- };
35
-
36
- class RequestHttp {
37
- service: AxiosInstance;
38
- public constructor(config: AxiosRequestConfig) {
39
- // instantiation
40
- this.service = axios.create(config);
41
- /**
42
- * @description 请求拦截器
43
- * 客户端发送请求 -> [请求拦截器] -> 服务器
44
- * token校验(JWT) : 接受服务器返回的 token,存储到 vuex/pinia/本地储存当中
45
- */
46
- this.service.interceptors.request.use(
47
- (config: CustomAxiosRequestConfig) => {
48
- if (config.repeatRequestCancel) {
49
- if (config.fileUid) {
50
- axiosFileCancel.removePending(config);
51
- axiosFileCancel.addPending(config);
52
- } else {
53
- axiosCanceler.removePending(config);
54
- axiosCanceler.addPending(config);
55
- }
56
- }
57
- // 当前请求不需要显示 loading,在 api 服务中通过指定的第三个参数: { noLoading: true } 来控制
58
- config.noLoading || showFullScreenLoading();
59
- return config;
60
- },
61
- (error: AxiosError) => {
62
- return Promise.reject(error);
63
- }
64
- );
65
-
66
- /**
67
- * @description 响应拦截器
68
- * 服务器换返回信息 -> [拦截统一处理] -> 客户端JS获取到信息
69
- */
70
- this.service.interceptors.response.use(
71
- (response: AxiosResponse) => {
72
- if ((response.config as any).fileUid) {
73
- axiosFileCancel.removePending(response.config);
74
- } else {
75
- axiosCanceler.removePending(response.config);
76
- }
77
- const { data } = response;
78
- tryHideFullScreenLoading();
79
- // 登陆失效
80
- if (data.code == ResultEnum.OVERDUE) {
81
- ElMessage.error(data.msg);
82
- return Promise.reject(data);
83
- }
84
-
85
- // 全局错误信息拦截(防止下载文件的时候返回数据流,没有 code 直接报错)
86
- if (data.code && data.code !== ResultEnum.SUCCESS) {
87
- ElMessage.error(data.msg);
88
- return Promise.reject(data);
89
- }
90
- // 成功请求(在页面上除非特殊情况,否则不用处理失败逻辑)
91
- return data.data || data;
92
- },
93
- async (error: AxiosError) => {
94
- if (error.config) {
95
- if ((error.config as any).fileUid) {
96
- axiosFileCancel.removePending(error.config);
97
- } else {
98
- axiosCanceler.removePending(error.config);
99
- }
100
- }
101
- const { response } = error;
102
-
103
- tryHideFullScreenLoading();
104
- // 请求超时 && 网络错误单独判断,没有 response
105
- if (error.message.indexOf("timeout") !== -1) ElMessage.error("请求超时!请您稍后重试");
106
- if (error.message.indexOf("Network Error") !== -1) ElMessage.error("网络错误!请您稍后重试");
107
- // 根据服务器响应的错误状态码,做不同的处理
108
- if (response) {
109
- ElNotification({
110
- title: "警告",
111
- message: (response.data as any).message || (response.data as any).msg,
112
- type: "warning"
113
- });
114
- }
115
-
116
- return Promise.reject(error);
117
- }
118
- );
119
- }
120
-
121
- /**
122
- * @description 常用请求方法封装
123
- */
124
- get<T>(url: string, params: object = {}, _object = {}): Promise<ResultData<T>> {
125
- return this.service.get(PORT + url, { params, ..._object });
126
- }
127
- post<T>(url: string, params: object | string = {}, _object = {}): Promise<ResultData<T>> {
128
- return this.service.post(PORT + url, params, _object);
129
- }
130
- put<T>(url: string, params: object = {}, _object = {}): Promise<ResultData<T>> {
131
- return this.service.put(PORT + url, params, _object);
132
- }
133
- delete<T>(url: string, params: any = {}, _object = {}): Promise<ResultData<T>> {
134
- return this.service.delete(PORT + url, { params, ..._object });
135
- }
136
- download(url: string, params: object = {}, _object = {}): Promise<BlobPart> {
137
- return this.service.post(PORT + url, params, { ..._object, responseType: "blob" });
138
- }
139
- }
140
- export const http = new RequestHttp(config);
141
- export const axiosController = axiosCanceler;
142
- export const axiosFileController = axiosFileCancel;
@@ -1,27 +0,0 @@
1
- // 请求响应参数(不包含data)
2
-
3
- export type fetchType = "get" | "post" | "put" | "delete" | "download";
4
-
5
- export interface Result {
6
- code: string;
7
- msg: string;
8
- }
9
-
10
- // 请求响应参数(包含data)
11
- export interface ResultData<T = any> extends Result {
12
- data: T;
13
- }
14
-
15
- // 分页响应参数
16
- export interface ResPage<T> {
17
- list: T[];
18
- page: number;
19
- limit: number;
20
- total: number;
21
- }
22
-
23
- // 分页请求参数
24
- export interface ReqPage {
25
- page: number;
26
- limit: number;
27
- }
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711097260091" class="icon" viewBox="0 0 2353 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2004" xmlns:xlink="http://www.w3.org/1999/xlink" width="459.5703125" height="200"><path d="M41.840281 1011.047298S-65.841404-121.173333 2346.576842 122.107509C1843.146105-4.706807-266.796912-278.707649 41.840281 1011.029333z" p-id="2005"></path><path d="M1726.805333 365.442246L1445.205333 769.598877V1012.143158H1256.861193V769.598877L975.961825 365.442246h238.753684l138.293895 226.663298 146.575719-226.663298H1726.787368zM998.310175 541.462456L567.26007 850.189474h413.049263v161.953684h-713.386666v-161.953684l450.506105-322.811509h-386.065965c55.475649-56.212211 124.96393-111.292632 212.129684-161.953684h332.027509l122.790175 176.002245zM2318.156351 527.018667h-469.962105v97.262035h375.969684v129.041965h-375.969684V1012.143158H1659.850105V603.189895l166.03172-237.747649h492.274526v161.576421z" p-id="2006"></path></svg>
@@ -1,44 +0,0 @@
1
- @font-face {
2
- font-family: iconfont; /* Project id 2667653 */
3
- src: url("iconfont.ttf?t=1691032190261") format("truetype");
4
- }
5
- .iconfont {
6
- font-family: iconfont !important;
7
- font-size: 20px;
8
- font-style: normal;
9
- -webkit-font-smoothing: antialiased;
10
- -moz-osx-font-smoothing: grayscale;
11
- cursor: pointer;
12
- }
13
- .icon-xiala::before {
14
- content: "\e62b";
15
- }
16
- .icon-tuichu::before {
17
- content: "\e645";
18
- }
19
- .icon-xiaoxi::before {
20
- font-size: 21.2px;
21
- content: "\e61f";
22
- }
23
- .icon-zhuti::before {
24
- font-size: 22.4px;
25
- content: "\e638";
26
- }
27
- .icon-sousuo::before {
28
- content: "\e611";
29
- }
30
- .icon-contentright::before {
31
- content: "\e8c9";
32
- }
33
- .icon-contentleft::before {
34
- content: "\e8ca";
35
- }
36
- .icon-fangda::before {
37
- content: "\e826";
38
- }
39
- .icon-suoxiao::before {
40
- content: "\e641";
41
- }
42
- .icon-zhongyingwen::before {
43
- content: "\e8cb";
44
- }
Binary file
Binary file
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1694768124415" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10907" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M496.097882 812.393412h78.305883v-231.905883h231.905882v-78.305882h-231.905882v-231.905882h-78.305883v231.905882h-231.905882v78.305882h231.905882v231.905883z" p-id="10908"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1695777414020" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6438" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M607.839811 895.957102H214.69447A86.82497 86.82497 0 0 1 127.880338 809.070721V214.784781A86.839419 86.839419 0 0 1 214.69447 127.880338h594.28594a86.33729 86.33729 0 0 1 61.436749 25.456857c16.400473 16.400473 25.362934 38.208767 25.373771 61.411462L894.439878 607.821749v0.10476a32.031496 32.031496 0 0 0 64.059379 0.101149L959.825022 214.889542v-0.104761A150.775976 150.775976 0 0 0 808.98041 63.940169H214.69447A150.638703 150.638703 0 0 0 63.940169 214.784781v594.28594a150.638703 150.638703 0 0 0 150.757914 150.82655h393.141728a31.970084 31.970084 0 0 0 0-63.940169z" fill="" p-id="6439"></path><path d="M950.544667 905.331381l-122.071536-122.071536a192.217875 192.217875 0 1 0-45.213286 45.213286l122.071536 122.071536a31.970084 31.970084 0 0 0 45.213286-45.213286z m-278.547941-105.302594a128.028448 128.028448 0 1 1 90.531332-37.497116 127.193975 127.193975 0 0 1-90.527719 37.497116zM768.004516 352.212795c17.653989 0 31.966472-14.402794 31.970084-32.056783s-14.308871-32.074845-31.966472-32.078457L256.002709 287.911382a32.020659 32.020659 0 0 0-31.970084 32.024271c0 17.657601 14.308871 32.092907 31.966472 32.092908L768.004516 352.212795zM448.000226 544.033302a31.96286 31.96286 0 1 0 0-63.940169h-192.001129a31.937573 31.937573 0 1 0 0 63.878758l192.001129 0.061411zM256.017159 671.91364a31.959247 31.959247 0 1 0 0 63.922107l127.999549 0.018062a31.941185 31.941185 0 1 0 0-63.878757z" fill="" p-id="6440"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1694659603967" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6843" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M1018.752 488.32l0.768 50.368c1.536 51.2-39.872 94.08-90.24 94.848l-25.6 0.704c-6.784 25.6-16.576 50.432-28.608 74.496l19.584 21.12c17.28 17.984 25.6 42.112 24.832 66.944a95.232 95.232 0 0 1-30.08 64.64l-37.632 34.624c-18.112 17.28-42.176 25.6-67.008 24.832a95.232 95.232 0 0 1-64.64-30.08l-7.552-8.32a443.776 443.776 0 0 1-84.288 37.632v9.088c0 51.136-42.112 93.248-93.312 93.248h-50.368c-51.2 0-93.312-42.112-93.312-93.248v-2.304a426.24 426.24 0 0 1-88.768-34.56l-1.536 1.472c-18.048 20.352-43.648 30.08-68.48 30.08-22.528 0-45.12-8.256-63.168-24.832l-37.632-34.56a89.216 89.216 0 0 1-30.08-64.704c-0.768-24.832 8.256-48.96 24.832-67.008l5.248-6.016a431.744 431.744 0 0 1-37.632-90.24h-2.24a93.632 93.632 0 0 1-65.472-28.608 91.392 91.392 0 0 1-26.304-66.24v-49.664a93.632 93.632 0 0 1 94.72-91.776c9.856-33.088 23.36-64 40.704-93.312l-4.48-3.712a93.632 93.632 0 0 1-5.312-131.712l34.56-37.632a89.152 89.152 0 0 1 64.768-30.08c24.832-0.768 48.896 8.32 66.944 24.832l17.28 16.576c25.6-12.8 51.968-22.592 79.04-30.08v-19.584c0-51.2 42.112-93.312 93.312-93.312H531.2c51.2 0 93.312 42.112 93.312 93.312v24.832c25.6 8.32 49.664 18.816 72.96 31.616l28.608-26.368a93.632 93.632 0 0 1 131.648 5.248l34.624 37.632c17.28 18.048 25.6 42.176 24.832 67.008a95.232 95.232 0 0 1-30.08 64.64l-21.12 19.584c13.568 24.064 24.896 50.432 33.152 77.504l24.832-0.768a93.632 93.632 0 0 1 94.784 91.776z m-91.776 76.736c6.016 0 12.8-2.304 17.28-6.784a20.48 20.48 0 0 0 6.784-18.048l-0.704-50.432a26.24 26.24 0 0 0-7.552-18.048 26.944 26.944 0 0 0-18.048-6.784l-51.2 0.768a33.984 33.984 0 0 1-33.856-26.368 353.856 353.856 0 0 0-45.888-108.288 33.344 33.344 0 0 1 5.312-42.88l41.344-38.4a22.528 22.528 0 0 0 8.32-17.28c0-6.784-2.304-12.8-6.784-18.112l-34.624-37.568a24.32 24.32 0 0 0-35.392-1.536l-47.36 43.648a34.048 34.048 0 0 1-41.408 3.776 337.472 337.472 0 0 0-101.568-43.648 33.92 33.92 0 0 1-25.6-33.088v-50.432c0-14.272-11.264-25.6-25.6-25.6h-50.368c-14.272 0-25.6 11.328-25.6 25.6v46.656c0 15.808-11.264 30.08-27.072 33.088a352.512 352.512 0 0 0-107.584 40.64 34.176 34.176 0 0 1-39.872-4.48l-35.392-32.384a25.6 25.6 0 0 0-18.048-6.784 25.28 25.28 0 0 0-17.28 8.32l-34.624 37.568a25.024 25.024 0 0 0 1.536 35.392l25.6 23.296c12.8 11.264 14.976 30.848 5.248 44.416a343.04 343.04 0 0 0-53.44 121.088 34.56 34.56 0 0 1-33.92 26.368l-26.24-0.768a24.96 24.96 0 0 0-18.88 7.552 23.872 23.872 0 0 0-6.72 17.28l-0.768 50.432c0 13.504 10.496 25.6 24.832 25.6l28.608 0.704c15.744 0 29.312 11.328 32.32 26.368 9.024 41.344 25.6 80.512 48.896 116.608 8.32 12.8 6.784 30.08-3.776 41.408l-22.528 24.768a25.6 25.6 0 0 0-6.784 18.112c0.768 6.72 3.008 12.8 8.32 17.28l37.568 34.56c9.792 9.088 25.6 9.088 35.392-1.472l19.52-21.056a34.432 34.432 0 0 1 42.88-6.016 354.24 354.24 0 0 0 118.144 45.888 33.152 33.152 0 0 1 27.84 33.088v29.376c0 14.272 11.264 25.6 25.6 25.6h50.368c14.336 0 25.6-11.328 25.6-25.6v-34.56a33.92 33.92 0 0 1 25.6-33.152 332.992 332.992 0 0 0 112.832-51.2 33.408 33.408 0 0 1 44.416 4.544l27.072 29.312c4.48 5.312 10.56 8.32 17.28 8.32 6.784 0 12.8-2.24 18.112-6.784l37.568-34.56a22.528 22.528 0 0 0 8.32-17.344c0-6.784-2.304-12.8-6.784-18.048l-36.096-39.168a32.896 32.896 0 0 1-4.48-39.872 337.408 337.408 0 0 0 39.808-103.04 33.024 33.024 0 0 1 32.384-27.136l51.2-0.704zM509.44 367.936a147.712 147.712 0 0 0-147.456 147.456 147.712 147.712 0 0 0 147.456 147.456 147.712 147.712 0 0 0 147.52-147.456A147.712 147.712 0 0 0 509.44 367.936zM429.632 515.392a79.808 79.808 0 1 1 159.552 0.064 79.808 79.808 0 0 1-159.552-0.064z" p-id="6844"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1694592765950" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8819" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M625.483294 782.336a30.057412 30.057412 0 0 1-30.117647-30.117647V420.803765a30.057412 30.057412 0 1 1 60.235294 0v331.294117a30.177882 30.177882 0 0 1-30.117647 30.238118zM444.837647 782.336a30.057412 30.057412 0 0 1-30.117647-30.117647V420.803765a30.057412 30.057412 0 1 1 60.235294 0v331.294117a30.177882 30.177882 0 0 1-30.117647 30.238118zM926.780235 270.275765h-150.588235v-60.235294c0-49.874824-40.116706-90.352941-89.630118-90.352942H384.602353a90.352941 90.352941 0 0 0-90.352941 90.352942v60.235294h-150.588236a30.057412 30.057412 0 1 0 0 60.235294h783.119059a30.057412 30.057412 0 1 0 0-60.235294z m-572.235294-60.235294c0-16.504471 13.552941-30.117647 30.057412-30.117647h301.959529c16.504471 0 29.455059 13.251765 29.455059 30.117647v60.235294H354.484706v-60.235294z" p-id="8820"></path><path d="M746.134588 963.041882h-421.647059a90.352941 90.352941 0 0 1-90.292705-90.352941V420.442353a30.057412 30.057412 0 1 1 60.235294 0v452.186353a30.117647 30.117647 0 0 0 30.117647 30.117647h421.707294c16.685176 0 30.117647-13.432471 30.117647-30.117647V421.647059a30.057412 30.057412 0 1 1 60.235294 0v451.041882a90.714353 90.714353 0 0 1-90.473412 90.352941z" p-id="8821"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1697613993537" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11811" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 0a512 512 0 1 1 0 1024A512 512 0 0 1 512 0z m0 70.656a441.344 441.344 0 1 0 0 882.688A441.344 441.344 0 0 0 512 70.656z m0 247.149714a52.955429 52.955429 0 1 0 0-105.910857 52.955429 52.955429 0 0 0 0 105.910857z m0 512a35.328 35.328 0 0 1-35.328-35.328v-388.388571a35.328 35.328 0 0 1 70.656 0v388.388571a35.328 35.328 0 0 1-35.328 35.328z" p-id="11812"></path></svg>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg
2
- PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1693306909737" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2768" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M568.199529 182.753882a30.117647 30.117647 0 0 1 42.164706 0.602353l164.141177 165.526589a30.057412 30.057412 0 0 1-1.566118 43.911529l-395.504941 346.352941a30.117647 30.117647 0 0 1-20.48 7.469177l-146.612706-3.072a30.117647 30.117647 0 0 1-29.515294-30.117647V564.525176a30.117647 30.117647 0 0 1 9.396706-21.805176l377.97647-359.966118z m39.936 484.23153l225.761883 4.336941a30.117647 30.117647 0 0 1-1.204706 60.235294l-225.701647-4.336941a30.057412 30.057412 0 1 1 1.204706-60.235294z m-19.757176-420.261647l-347.256471 330.691764v106.496l105.411765 2.288942 362.616471-317.620706-120.771765-121.856z m244.013176 570.849882a30.117647 30.117647 0 1 1 0.481883 60.235294l-591.510588 4.336941a30.117647 30.117647 0 1 1-0.481883-60.235294l591.510588-4.336941z" p-id="2769"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1695706735403" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6840" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 569.809455a34.909091 34.909091 0 0 1 34.909091 34.90909v260.654546c0 68.002909-55.319273 123.345455-123.345455 123.345454H169.890909a123.485091 123.485091 0 0 1-123.345454-123.345454V227.723636a123.485091 123.485091 0 0 1 123.345454-123.345454h353.745455a34.909091 34.909091 0 1 1 0 69.818182H169.890909a53.597091 53.597091 0 0 0-53.527273 53.527272v637.672728c0 29.509818 24.017455 53.527273 53.527273 53.527272h637.672727c29.509818 0 53.527273-24.017455 53.527273-53.527272v-260.654546a34.909091 34.909091 0 0 1 34.909091-34.909091z m80.896-293.934546c7.400727 6.4 12.194909 15.755636 12.194909 26.298182 0 10.565818-4.770909 19.898182-12.194909 26.344727L781.032727 524.334545a34.792727 34.792727 0 0 1-24.692363 10.216728 34.909091 34.909091 0 0 1-24.669091-59.578182l134.749091-134.818909C563.2 360.261818 442.181818 491.822545 442.181818 790.900364a34.909091 34.909091 0 1 1-69.818182 0c0-341.317818 150.574545-500.573091 499.618909-521.239273L731.694545 129.419636a34.909091 34.909091 0 1 1 49.338182-49.384727l195.863273 195.84z" p-id="6841"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1695777379787" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6297" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" p-id="6298"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M370.688 892.416H194.56c-34.816 0-63.488-28.16-63.488-63.488v-177.664c0-15.872 15.36-28.672 31.232-28.672s31.232 12.8 31.232 28.672v172.544c0 3.072 2.56 5.632 5.632 5.632h171.008c15.872 0 29.184 15.36 29.184 31.232 0 15.872-12.288 31.744-28.16 31.744h-0.512zM162.816 397.824c-15.872 0-31.232-12.8-31.232-28.672V194.56c0-34.816 28.16-63.488 63.488-63.488h176.128c15.872 0 28.672 15.36 28.672 31.232s-12.8 31.232-28.672 31.232H199.68c-3.072 0-5.632 2.56-5.632 5.632V368.64c0 15.872-15.36 29.184-31.232 29.184zM829.44 892.416h-174.592c-15.872 0-28.672-15.36-28.672-31.232s12.8-31.232 28.672-31.232H824.32c3.072 0 5.632-2.56 5.632-5.632v-172.544c0-15.872 15.36-28.672 31.232-28.672 15.872 0 31.232 12.8 31.232 28.672V829.44c0.512 34.816-27.648 62.976-62.976 62.976z m32.256-494.592c-15.872 0-31.232-12.8-31.232-28.672V199.68c0-3.072-2.56-5.632-5.632-5.632H655.36c-15.872 0-28.672-15.36-28.672-31.232s12.8-31.232 28.672-31.232h174.08c34.816 0 63.488 28.16 63.488 63.488V368.64c0 15.872-15.36 29.184-31.232 29.184z" /></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1695785124495" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11813" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M288 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" p-id="11814"></path><path d="M512 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" p-id="11815"></path><path d="M736 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" p-id="11816"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711530027651" class="icon" viewBox="0 0 1216 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3642" xmlns:xlink="http://www.w3.org/1999/xlink" width="237.5" height="200"><path d="M1131.27619 1022.22684a60.287446 60.287446 0 0 1-54.081385-35.463204v-7.09264c-6.206061-16.845022-143.625974-391.868398-469.887446-323.601732v106.38961a102.84329 102.84329 0 0 1-51.421645 88.658009A103.72987 103.72987 0 0 1 443.290043 829.838961L55.854545 514.21645A107.27619 107.27619 0 0 1 0 433.537662 110.822511 110.822511 0 0 1 61.174026 336.900433L453.042424 22.164502A108.162771 108.162771 0 0 1 549.679654 6.206061a88.658009 88.658009 0 0 1 52.308225 68.266666v121.461472a760.685714 760.685714 0 0 1 503.577489 256.221645 611.74026 611.74026 0 0 1 83.338528 523.082251v7.979221a62.947186 62.947186 0 0 1-52.308225 40.782684zM680.893506 554.112554a516.87619 516.87619 0 0 1 434.424243 291.684849 472.547186 472.547186 0 0 0-83.338528-337.787013C877.714286 304.98355 567.411255 285.478788 554.112554 284.592208h-44.329004V96.637229L116.141991 412.25974a117.915152 117.915152 0 0 0-20.391342 16.845022l7.979221 6.206061 7.092641 7.97922 390.981818 312.076191 8.865801 5.31948v-177.316017l33.690043-9.752381a486.732468 486.732468 0 0 1 136.533333-19.504762z" p-id="3643"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M889.6 829.44l-170.688-170.688a104.064 104.064 0 0 0-18.304-14.912l-42.688-29.44a298.688 298.688 0 1 0-231.232 110.912c67.712 0 133.504-22.976 186.432-65.28l32 42.688c3.84 5.504 8.064 10.624 12.8 15.36l170.688 170.688a21.248 21.248 0 0 0 30.272 0l29.888-29.888a21.312 21.312 0 0 0 0.832-29.44zM426.688 640a213.312 213.312 0 1 1 0-426.688 213.312 213.312 0 0 1 0 426.688z" /></svg>
@@ -1,23 +0,0 @@
1
- .svg-icon-box {
2
- display: flex;
3
- align-items: center;
4
- max-width: 100%;
5
- overflow: hidden;
6
- vertical-align: middle;
7
- .text {
8
- flex: 1;
9
- overflow: hidden;
10
- font-family: MiSans-Normal, MiSans;
11
- font-size: 14px;
12
- font-weight: 400;
13
- line-height: 16px;
14
- }
15
- .icon {
16
- width: 100%;
17
- height: 100%;
18
- margin-right: 8px;
19
- overflow: hidden;
20
- vertical-align: -0.15em;
21
- fill: currentColor;
22
- }
23
- }
@@ -1,74 +0,0 @@
1
- <template>
2
- <el-tooltip
3
- class="tooltip-box"
4
- effect="light"
5
- :content="toolTipContent"
6
- placement="top"
7
- :hide-after="100"
8
- :visible="isShowTooltip"
9
- >
10
- <div class="svg-icon-box" @mouseenter="handleTooltip(true)" @mouseout="handleTooltip(false)" :style="{ cursor: cur }">
11
- <div class="left-text text" v-if="leftText" :style="{ color: textColor || color, ...titleStyle }">
12
- <overflow :text="leftText" />
13
- </div>
14
- <SvgIcon
15
- class="icon"
16
- :name="name"
17
- :prefix="prefix"
18
- :style="{ width: size, height: size, color, ...iconStyle }"
19
- :centered="centered"
20
- />
21
- <div class="right-text text" v-if="rightText" :style="{ color: textColor || color, ...titleStyle }">
22
- <overflow :text="rightText" />
23
- </div>
24
- </div>
25
- </el-tooltip>
26
- </template>
27
-
28
- <script setup lang="ts">
29
- interface Props {
30
- name: string;
31
- prefix?: string; // 图标的前缀 ==> 非必传(默认为"icon")
32
- toolTipContent?: string;
33
- cur?: string;
34
- size?: string;
35
- color?: string;
36
- iconStyle?: Record<string, string> | null;
37
- leftText?: string;
38
- rightText?: string;
39
- textColor?: string;
40
- titleStyle?: Record<string, string> | null;
41
- centered?: boolean;
42
- }
43
- const props = withDefaults(defineProps<Props>(), {
44
- toolTipContent: "",
45
- cur: "",
46
- size: "1em",
47
- iconStyle: () => ({}),
48
- color: "",
49
- leftText: "",
50
- rightText: "",
51
- textColor: "",
52
- titleStyle: null,
53
- centered: false
54
- });
55
-
56
- const isShowTooltip = ref(false);
57
-
58
- const handleTooltip = (value: boolean) => {
59
- if (props.toolTipContent) {
60
- isShowTooltip.value = value;
61
- }
62
- };
63
- </script>
64
- <style scoped lang="scss">
65
- @import "./index.scss";
66
- </style>
67
- <style lang="scss">
68
- .custom-over-flow {
69
- > span:nth-child(1) {
70
- display: inline-block;
71
- max-width: 800px !important;
72
- }
73
- }
74
- </style>
@@ -1,48 +0,0 @@
1
- .tree {
2
- width: 100%;
3
- height: 100%;
4
- overflow: hidden auto;
5
- :deep(.el-tree) {
6
- width: 100%;
7
- height: 100%;
8
- .el-tree-node__content {
9
- height: 40px;
10
- }
11
- .is-hide-checkbox {
12
- > .el-tree-node__content {
13
- > .el-checkbox {
14
- display: none;
15
- }
16
- }
17
- }
18
- .custom-tree-node {
19
- width: 100%;
20
- padding-right: 10px;
21
- overflow: hidden;
22
- span {
23
- font-size: 14px;
24
- font-weight: 400;
25
- color: #333333;
26
- }
27
- div,
28
- svg {
29
- font-size: 14px;
30
- font-weight: 400;
31
- color: #333333;
32
-
33
- // line-height: 16px;
34
- }
35
- }
36
- .el-tree-node__content:hover {
37
- background-color: #fafafa;
38
- .custom-tree-node {
39
- color: $primary-color;
40
- span,
41
- div,
42
- svg {
43
- color: $primary-color;
44
- }
45
- }
46
- }
47
- }
48
- }
@@ -1,176 +0,0 @@
1
- <template>
2
- <div class="tree">
3
- <el-tree
4
- ref="treeRef"
5
- v-bind="{
6
- data: treeData,
7
- highlightCurren: true,
8
- nodeKey: 'id',
9
- defaultExpandAll: true,
10
- indent: 7,
11
- props: {
12
- children: 'children',
13
- label: 'name'
14
- },
15
- checkStrictly: true,
16
- emptyText: '暂无数据',
17
- ...$attrs
18
- }"
19
- @check="onCheckTree"
20
- :current-node-key="currentNodeKey"
21
- >
22
- <template v-if="slotDefault" #default="{ node, data }">
23
- <div class="custom-tree-node">
24
- <slot :data="data" :node="node"></slot>
25
- </div>
26
- </template>
27
- <template #empty>
28
- <empty />
29
- </template>
30
- </el-tree>
31
- </div>
32
- </template>
33
-
34
- <script setup lang="ts">
35
- import { ElTree } from "element-plus";
36
- import { PropType } from "vue";
37
- import { fetchType as myFetchType } from "@/api/interface/index";
38
- import { treeDataProps } from "./interface/index";
39
- const props = defineProps({
40
- //列表请求方法
41
- fetch: {
42
- type: [Function, Array<treeDataProps>, String],
43
- default: () => {
44
- return [];
45
- }
46
- },
47
- fetchType: {
48
- type: String as PropType<myFetchType>,
49
- default: () => "post"
50
- },
51
- // 列表请求参数
52
- fetchParams: {
53
- type: Object,
54
- default: () => {
55
- return {};
56
- }
57
- },
58
- // 当前选择的节点
59
- currentNodeKey: {
60
- type: [String, Number],
61
- default: () => ""
62
- },
63
- //是否监听请求方法
64
- requestAuto: {
65
- type: Boolean,
66
- default: () => true
67
- }
68
- });
69
-
70
- const emit = defineEmits(["loadAfter", "onChecked"]);
71
- //判断<slot/>是否有传值
72
- const slotDefault = !!useSlots().default;
73
-
74
- const treeData = ref<treeDataProps[]>([]);
75
- // 加载table数据
76
- const loadData = async () => {
77
- if (props.fetch) {
78
- try {
79
- if (["[object AsyncFunction]", "[object String]"].includes(Object.prototype.toString.call(props.fetch))) {
80
- let res = typeof "string"
81
- ? await http[props.fetchType](props.fetch as string, props.fetchParams || {})
82
- : await (props.fetch as any)(props.fetchParams);
83
- if (Array.isArray(res)) {
84
- treeData.value = res;
85
- } else {
86
- treeData.value = [];
87
- }
88
- nextTick(() => {
89
- emit("loadAfter", res);
90
- });
91
- } else {
92
- treeData.value = props.fetch as treeDataProps[];
93
- }
94
- } catch (e) {
95
- console.log(e);
96
- }
97
- }
98
- };
99
-
100
- const treeRef = ref<InstanceType<typeof ElTree>>();
101
-
102
- // 获取被勾选项的id数组
103
- const getCheckedKeys = () => {
104
- return treeRef.value?.getCheckedKeys();
105
- };
106
- // 设置被勾选项的id数组
107
- const setCheckedKeys = (val: (string | number)[]) => {
108
- treeRef.value?.setCheckedKeys(val);
109
- };
110
- // 获取被勾选前选中节点的数组
111
- const getCheckedNodes = () => {
112
- return treeRef.value?.getCheckedNodes();
113
- };
114
- // 设置目前勾选的节点
115
- const setCheckedNodes = (val: any[]) => {
116
- treeRef.value?.setCheckedNodes(val);
117
- };
118
- // 设置目前勾选的节点 key/data
119
- const setChecked = (key: string, checked: boolean, deep = true) => {
120
- treeRef.value?.setChecked(key, checked, deep);
121
- };
122
-
123
- const onCheckTree = (data: any, checked: any, indeterminate: any) => {
124
- let obj = { data, checked, indeterminate, allChecked: getCheckedKeys(), allCheckedNode: getCheckedNodes() };
125
- emit("onChecked", obj);
126
- };
127
-
128
- const onTreeFilter = (val: string | number) => {
129
- if (treeData.value?.length) {
130
- // 将不符合输入名称多选框字列表隐藏掉
131
- treeRef.value?.filter(val);
132
- }
133
- };
134
- watch(
135
- [() => props.fetch, () => props.fetchParams],
136
- () => {
137
- loadData();
138
- },
139
- {
140
- deep: true
141
- }
142
- );
143
- watch(
144
- () => props.currentNodeKey,
145
- newV => {
146
- if (newV) {
147
- if (treeRef.value) {
148
- treeRef.value.setCurrentKey(newV);
149
- }
150
- } else {
151
- if (treeRef.value) {
152
- treeRef.value.setCurrentKey(undefined);
153
- }
154
- }
155
- }
156
- );
157
- onMounted(() => {
158
- props.requestAuto && loadData();
159
- });
160
-
161
- defineExpose({
162
- element: treeRef,
163
- treeData,
164
- loadData,
165
- getCheckedKeys,
166
- setCheckedKeys,
167
- getCheckedNodes,
168
- setCheckedNodes,
169
- setChecked,
170
- onTreeFilter
171
- });
172
- </script>
173
-
174
- <style scoped lang="scss">
175
- @import "./index.scss";
176
- </style>
@@ -1,6 +0,0 @@
1
- export interface treeDataProps {
2
- id: string;
3
- name: string;
4
- children?: treeDataProps[];
5
- [key: string]: any;
6
- }