@@ -7,7 +7,6 @@ import type {
7
7
import type { ECharts } from "echarts" ;
8
8
import type { IconifyIcon } from "@iconify/vue" ;
9
9
import type { TableColumns } from "@pureadmin/table" ;
10
- import { type RouteComponent , type RouteLocationNormalized } from "vue-router" ;
11
10
12
11
/**
13
12
* 全局类型声明,无需引入直接在 `.vue` 、`.ts` 、`.tsx` 文件使用即可获得类型提示
@@ -166,98 +165,6 @@ declare global {
166
165
tags ?: Array < any > ;
167
166
}
168
167
169
- /**
170
- * `src/router` 文件夹里的类型声明
171
- */
172
- interface toRouteType extends RouteLocationNormalized {
173
- meta : {
174
- roles : Array < string > ;
175
- keepAlive ?: boolean ;
176
- dynamicLevel ?: string ;
177
- } ;
178
- }
179
-
180
- /**
181
- * @description 完整子路由配置表
182
- */
183
- interface RouteChildrenConfigsTable {
184
- /** 子路由地址 `必填` */
185
- path : string ;
186
- /** 路由名字(对应不要重复,和当前组件的`name`保持一致)`必填` */
187
- name ?: string ;
188
- /** 路由重定向 `可选` */
189
- redirect ?: string ;
190
- /** 按需加载组件 `可选` */
191
- component ?: RouteComponent ;
192
- meta ?: {
193
- /** 菜单名称(兼容国际化、非国际化,如何用国际化的写法就必须在根目录的`locales`文件夹下对应添加) `必填` */
194
- title : string ;
195
- /** 菜单图标 `可选` */
196
- icon ?: string | FunctionalComponent | IconifyIcon ;
197
- /** 菜单名称右侧的额外图标 */
198
- extraIcon ?: string | FunctionalComponent | IconifyIcon ;
199
- /** 是否在菜单中显示(默认`true`)`可选` */
200
- showLink ?: boolean ;
201
- /** 是否显示父级菜单 `可选` */
202
- showParent ?: boolean ;
203
- /** 页面级别权限设置 `可选` */
204
- roles ?: Array < string > ;
205
- /** 按钮级别权限设置 `可选` */
206
- auths ?: Array < string > ;
207
- /** 路由组件缓存(开启 `true`、关闭 `false`)`可选` */
208
- keepAlive ?: boolean ;
209
- /** 内嵌的`iframe`链接 `可选` */
210
- frameSrc ?: string ;
211
- /** `iframe`页是否开启首次加载动画(默认`true`)`可选` */
212
- frameLoading ?: boolean ;
213
- /** 页面加载动画(有两种形式,一种直接采用vue内置的`transitions`动画,另一种是使用`animate.css`写进、离场动画)`可选` */
214
- transition ?: {
215
- /**
216
- * @description 当前路由动画效果
217
- * @see {@link https://next.router.vuejs.org/guide/advanced/transitions.html#transitions }
218
- * @see animate.css {@link https://animate.style}
219
- */
220
- name ?: string ;
221
- /** 进场动画 */
222
- enterTransition ?: string ;
223
- /** 离场动画 */
224
- leaveTransition ?: string ;
225
- } ;
226
- // 是否不添加信息到标签页,(默认`false`)
227
- hiddenTag ?: boolean ;
228
- /** 动态路由可打开的最大数量 `可选` */
229
- dynamicLevel ?: number ;
230
- } ;
231
- /** 子路由配置项 */
232
- children ?: Array < RouteChildrenConfigsTable > ;
233
- }
234
-
235
- /**
236
- * @description 整体路由配置表(包括完整子路由)
237
- */
238
- interface RouteConfigsTable {
239
- /** 路由地址 `必填` */
240
- path : string ;
241
- /** 路由名字(保持唯一)`可选` */
242
- name ?: string ;
243
- /** `Layout`组件 `可选` */
244
- component ?: RouteComponent ;
245
- /** 路由重定向 `可选` */
246
- redirect ?: string ;
247
- meta ?: {
248
- /** 菜单名称(兼容国际化、非国际化,如何用国际化的写法就必须在根目录的`locales`文件夹下对应添加)`必填` */
249
- title : string ;
250
- /** 菜单图标 `可选` */
251
- icon ?: string | FunctionalComponent | IconifyIcon ;
252
- /** 是否在菜单中显示(默认`true`)`可选` */
253
- showLink ?: boolean ;
254
- /** 菜单升序排序,值越高排的越后(只针对顶级路由)`可选` */
255
- rank ?: number ;
256
- } ;
257
- /** 子路由配置项 */
258
- children ?: Array < RouteChildrenConfigsTable > ;
259
- }
260
-
261
168
/**
262
169
* 平台里所有组件实例都能访问到的全局属性对象的类型声明
263
170
*/
0 commit comments