🔱: [client] sync upgrade with 21 commits [trident-sync]
'admin-22.12.12:发布v2.4.21版本,具体更新内容查看CHANGELOG.md' !42 修复 工作流无法添加新节点问题 Merge pull request !42 from beta/bugfix_workflow 修复 工作流无法添加新节点问题 1. 修复 工作流无法添加新节点问题 2. 修复 左侧导航无法隐藏问题 'admin-22.12.09:发布v2.4.2版本,具体更新内容查看CHANGELOG.md' !41 修复get请求传递嵌套对象或数组时无法正常编码问题 Merge pull request !41 from 随心/master !40 开启TagsView缓存后,刷新后所有的路由都变成组件缓存了 Merge pull request !40 from mrjimin/master 修复get请求传递嵌套对象或数组时无法正常编码问题 update src/layout/routerView/parent.vue. Signed-off-by: mrjimin <z8888788@163.com> update src/layout/routerView/parent.vue. 这里应该拿到的是已经设置开启组件缓存的路由,而不是全部,需要先判断item.meta.isKeepAlive Signed-off-by: mrjimin <z8888788@163.com> 'admin-22.11.30:发布v2.4.1版本,具体更新内容查看CHANGELOG.md' Merge branch 'master' of https://gitee.com/lyt-top/vue-next-admin 'admin-22.11.30:删除v2.4.0版本不需要的依赖' update src/views/error/404.vue. Signed-off-by: lyt-Top <1105290566@qq.com> update src/components/table/index.vue. Signed-off-by: lyt-Top <1105290566@qq.com> 'admin-22.11.30:修改v2.4.0文字说明' 'admin-22.11.30:修改v2.4.0文字说明' 'admin-22.11.29:发布v2.4.0版本,具体更新内容查看CHANGELOG.md' 'admin-22.11.19:修复v2.3.0版本动态路由事件调用关闭当前tagsview、普通路由刷新界面参数丢失问题' 'admin-22.11.18:优化v2.3.0版本tagsview风格5兼容火狐' 'admin-22.11.17:优化v2.3.0版本iframe右键菜单刷新问题' ...
This commit is contained in:
13
web/src/types/axios.d.ts
vendored
Normal file
13
web/src/types/axios.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/* eslint-disable */
|
||||
import * as axios from 'axios';
|
||||
|
||||
// 扩展 axios 数据返回类型,可自行扩展
|
||||
declare module 'axios' {
|
||||
export interface AxiosResponse<T = any> {
|
||||
code: number;
|
||||
data: T;
|
||||
message: string;
|
||||
type?: string;
|
||||
[key: string]: T;
|
||||
}
|
||||
}
|
||||
111
web/src/types/global.d.ts
vendored
Normal file
111
web/src/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
// 申明外部 npm 插件模块
|
||||
declare module 'vue-grid-layout';
|
||||
declare module 'qrcodejs2-fixes';
|
||||
declare module 'splitpanes';
|
||||
declare module 'js-cookie';
|
||||
declare module '@wangeditor/editor-for-vue';
|
||||
declare module 'js-table2excel';
|
||||
declare module 'qs';
|
||||
|
||||
// 声明一个模块,防止引入文件时报错
|
||||
declare module '*.json';
|
||||
declare module '*.png';
|
||||
declare module '*.jpg';
|
||||
declare module '*.scss';
|
||||
declare module '*.ts';
|
||||
declare module '*.js';
|
||||
|
||||
// 声明文件,*.vue 后缀的文件交给 vue 模块来处理
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue';
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
// 声明文件,定义全局变量
|
||||
/* eslint-disable */
|
||||
declare interface Window {
|
||||
nextLoading: boolean;
|
||||
}
|
||||
|
||||
// 声明路由当前项类型
|
||||
declare type RouteItem<T = any> = {
|
||||
path: string;
|
||||
name?: string | symbol | undefined | null;
|
||||
redirect?: string;
|
||||
k?: T;
|
||||
meta?: {
|
||||
title?: string;
|
||||
isLink?: string;
|
||||
isHide?: boolean;
|
||||
isKeepAlive?: boolean;
|
||||
isAffix?: boolean;
|
||||
isIframe?: boolean;
|
||||
roles?: string[];
|
||||
icon?: string;
|
||||
isDynamic?: boolean;
|
||||
isDynamicPath?: string;
|
||||
isIframeOpen?: string;
|
||||
loading?: boolean;
|
||||
};
|
||||
children: T[];
|
||||
query?: { [key: string]: T };
|
||||
params?: { [key: string]: T };
|
||||
contextMenuClickId?: string | number;
|
||||
commonUrl?: string;
|
||||
isFnClick?: boolean;
|
||||
url?: string;
|
||||
transUrl?: string;
|
||||
title?: string;
|
||||
id?: string | number;
|
||||
};
|
||||
|
||||
// 声明路由 to from
|
||||
declare interface RouteToFrom<T = any> extends RouteItem {
|
||||
path?: string;
|
||||
children?: T[];
|
||||
}
|
||||
|
||||
// 声明路由当前项类型集合
|
||||
declare type RouteItems<T extends RouteItem = any> = T[];
|
||||
|
||||
// 声明 ref
|
||||
declare type RefType<T = any> = T | null;
|
||||
|
||||
// 声明 HTMLElement
|
||||
declare type HtmlType = HTMLElement | string | undefined | null;
|
||||
|
||||
// 申明 children 可选
|
||||
declare type ChilType<T = any> = {
|
||||
children?: T[];
|
||||
};
|
||||
|
||||
// 申明 数组
|
||||
declare type EmptyArrayType<T = any> = T[];
|
||||
|
||||
// 申明 对象
|
||||
declare type EmptyObjectType<T = any> = {
|
||||
[key: string]: T;
|
||||
};
|
||||
|
||||
// 申明 select option
|
||||
declare type SelectOptionType = {
|
||||
value: string | number;
|
||||
label: string | number;
|
||||
};
|
||||
|
||||
// 鼠标滚轮滚动类型
|
||||
declare interface WheelEventType extends WheelEvent {
|
||||
wheelDelta: number;
|
||||
}
|
||||
|
||||
// table 数据格式公共类型
|
||||
declare interface TableType<T = any> {
|
||||
total: number;
|
||||
loading: boolean;
|
||||
param: {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
[key: string]: T;
|
||||
};
|
||||
}
|
||||
59
web/src/types/layout.d.ts
vendored
Normal file
59
web/src/types/layout.d.ts
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
// aside
|
||||
declare type AsideState = {
|
||||
menuList: RouteRecordRaw[];
|
||||
clientWidth: number;
|
||||
};
|
||||
|
||||
// columnsAside
|
||||
declare type ColumnsAsideState<T = any> = {
|
||||
columnsAsideList: T[];
|
||||
liIndex: number;
|
||||
liOldIndex: null | number;
|
||||
liHoverIndex: null | number;
|
||||
liOldPath: null | string;
|
||||
difference: number;
|
||||
routeSplit: string[];
|
||||
};
|
||||
|
||||
// navBars breadcrumb
|
||||
declare type BreadcrumbState<T = any> = {
|
||||
breadcrumbList: T[];
|
||||
routeSplit: string[];
|
||||
routeSplitFirst: string;
|
||||
routeSplitIndex: number;
|
||||
};
|
||||
|
||||
// navBars search
|
||||
declare type SearchState<T = any> = {
|
||||
isShowSearch: boolean;
|
||||
menuQuery: string;
|
||||
tagsViewList: T[];
|
||||
};
|
||||
|
||||
// navBars tagsView
|
||||
declare type TagsViewState<T = any> = {
|
||||
routeActive: string | T;
|
||||
routePath: string | unknown;
|
||||
dropdown: {
|
||||
x: string | number;
|
||||
y: string | number;
|
||||
};
|
||||
sortable: T;
|
||||
tagsRefsIndex: number;
|
||||
tagsViewList: T[];
|
||||
tagsViewRoutesList: T[];
|
||||
};
|
||||
|
||||
// navBars parent
|
||||
declare type ParentViewState<T = any> = {
|
||||
refreshRouterViewKey: string;
|
||||
iframeRefreshKey: string;
|
||||
keepAliveNameList: string[];
|
||||
iframeList: T[];
|
||||
};
|
||||
|
||||
// navBars link
|
||||
declare type LinkViewState = {
|
||||
title: string;
|
||||
isLink: string;
|
||||
};
|
||||
38
web/src/types/mitt.d.ts
vendored
Normal file
38
web/src/types/mitt.d.ts
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* mitt 事件类型定义
|
||||
*
|
||||
* @method openSetingsDrawer 打开布局设置弹窗
|
||||
* @method restoreDefault 分栏布局,鼠标移入、移出数据显示
|
||||
* @method setSendColumnsChildren 分栏布局,鼠标移入、移出菜单数据传入到 navMenu 下的菜单中
|
||||
* @method setSendClassicChildren 经典布局,开启切割菜单时,菜单数据传入到 navMenu 下的菜单中
|
||||
* @method getBreadcrumbIndexSetFilterRoutes 布局设置弹窗,开启切割菜单时,菜单数据传入到 navMenu 下的菜单中
|
||||
* @method layoutMobileResize 浏览器窗口改变时,用于适配移动端界面显示
|
||||
* @method openOrCloseSortable 布局设置弹窗,开启 TagsView 拖拽
|
||||
* @method openShareTagsView 布局设置弹窗,开启 TagsView 共用
|
||||
* @method onTagsViewRefreshRouterView tagsview 刷新界面
|
||||
* @method onCurrentContextmenuClick tagsview 右键菜单每项点击时
|
||||
*/
|
||||
declare type MittType<T = any> = {
|
||||
openSetingsDrawer?: string;
|
||||
restoreDefault?: string;
|
||||
setSendColumnsChildren: T;
|
||||
setSendClassicChildren: T;
|
||||
getBreadcrumbIndexSetFilterRoutes?: string;
|
||||
layoutMobileResize: T;
|
||||
openOrCloseSortable?: string;
|
||||
openShareTagsView?: string;
|
||||
onTagsViewRefreshRouterView?: T;
|
||||
onCurrentContextmenuClick?: T;
|
||||
};
|
||||
|
||||
// mitt 参数类型定义
|
||||
declare type LayoutMobileResize = {
|
||||
layout: string;
|
||||
clientWidth: number;
|
||||
};
|
||||
|
||||
// mitt 参数菜单类型
|
||||
declare type MittMenu = {
|
||||
children: RouteRecordRaw[];
|
||||
item?: RouteItem;
|
||||
};
|
||||
91
web/src/types/pinia.d.ts
vendored
Normal file
91
web/src/types/pinia.d.ts
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* pinia 类型定义
|
||||
*/
|
||||
|
||||
// 用户信息
|
||||
declare interface UserInfosState<T = any> {
|
||||
userInfos: {
|
||||
authBtnList: string[];
|
||||
photo: string;
|
||||
roles: string[];
|
||||
time: number;
|
||||
userName: string;
|
||||
[key: string]: T;
|
||||
};
|
||||
}
|
||||
|
||||
// 路由缓存列表
|
||||
declare interface KeepAliveNamesState {
|
||||
keepAliveNames: string[];
|
||||
cachedViews: string[];
|
||||
}
|
||||
|
||||
// 后端返回原始路由(未处理时)
|
||||
declare interface RequestOldRoutesState {
|
||||
requestOldRoutes: string[];
|
||||
}
|
||||
|
||||
// TagsView 路由列表
|
||||
declare interface TagsViewRoutesState<T = any> {
|
||||
tagsViewRoutes: T[];
|
||||
isTagsViewCurrenFull: Boolean;
|
||||
}
|
||||
|
||||
// 路由列表
|
||||
declare interface RoutesListState<T = any> {
|
||||
routesList: T[];
|
||||
isColumnsMenuHover: Boolean;
|
||||
isColumnsNavHover: Boolean;
|
||||
}
|
||||
|
||||
// 布局配置
|
||||
declare interface ThemeConfigState {
|
||||
themeConfig: {
|
||||
isDrawer: boolean;
|
||||
primary: string;
|
||||
topBar: string;
|
||||
topBarColor: string;
|
||||
isTopBarColorGradual: boolean;
|
||||
menuBar: string;
|
||||
menuBarColor: string;
|
||||
menuBarActiveColor: string;
|
||||
isMenuBarColorGradual: boolean;
|
||||
columnsMenuBar: string;
|
||||
columnsMenuBarColor: string;
|
||||
isColumnsMenuBarColorGradual: boolean;
|
||||
isColumnsMenuHoverPreload: boolean;
|
||||
isCollapse: boolean;
|
||||
isUniqueOpened: boolean;
|
||||
isFixedHeader: boolean;
|
||||
isFixedHeaderChange: boolean;
|
||||
isClassicSplitMenu: boolean;
|
||||
isLockScreen: boolean;
|
||||
lockScreenTime: number;
|
||||
isShowLogo: boolean;
|
||||
isShowLogoChange: boolean;
|
||||
isBreadcrumb: boolean;
|
||||
isTagsview: boolean;
|
||||
isBreadcrumbIcon: boolean;
|
||||
isTagsviewIcon: boolean;
|
||||
isCacheTagsView: boolean;
|
||||
isSortableTagsView: boolean;
|
||||
isShareTagsView: boolean;
|
||||
isFooter: boolean;
|
||||
isGrayscale: boolean;
|
||||
isInvert: boolean;
|
||||
isIsDark: boolean;
|
||||
isWartermark: boolean;
|
||||
wartermarkText: string;
|
||||
tagsStyle: string;
|
||||
animation: string;
|
||||
columnsAsideStyle: string;
|
||||
columnsAsideLayout: string;
|
||||
layout: string;
|
||||
isRequestRoutes: boolean;
|
||||
globalTitle: string;
|
||||
globalViceTitle: string;
|
||||
globalViceTitleMsg: string;
|
||||
globalI18n: string;
|
||||
globalComponentSize: string;
|
||||
};
|
||||
}
|
||||
329
web/src/types/views.d.ts
vendored
Normal file
329
web/src/types/views.d.ts
vendored
Normal file
@@ -0,0 +1,329 @@
|
||||
/**
|
||||
* views personal
|
||||
*/
|
||||
type NewInfo = {
|
||||
title: string;
|
||||
date: string;
|
||||
link: string;
|
||||
};
|
||||
type Recommend = {
|
||||
title: string;
|
||||
msg: string;
|
||||
icon: string;
|
||||
bg: string;
|
||||
iconColor: string;
|
||||
};
|
||||
declare type PersonalState = {
|
||||
newsInfoList: NewInfo[];
|
||||
recommendList: Recommend[];
|
||||
personalForm: {
|
||||
name: string;
|
||||
email: string;
|
||||
autograph: string;
|
||||
occupation: string;
|
||||
phone: string;
|
||||
sex: string;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* views visualizing
|
||||
*/
|
||||
declare type Demo2State<T = any> = {
|
||||
time: {
|
||||
txt: string;
|
||||
fun: number;
|
||||
};
|
||||
dropdownList: T[];
|
||||
dropdownActive: string;
|
||||
skyList: T[];
|
||||
dBtnList: T[];
|
||||
chartData4Index: number;
|
||||
dBtnActive: number;
|
||||
earth3DBtnList: T[];
|
||||
chartData4List: T[];
|
||||
myCharts: T[];
|
||||
};
|
||||
|
||||
/**
|
||||
* views params
|
||||
*/
|
||||
declare type ParamsState = {
|
||||
value: string;
|
||||
tagsViewName: string;
|
||||
tagsViewNameIsI18n: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* views system
|
||||
*/
|
||||
// role
|
||||
declare interface RowRoleType {
|
||||
roleName: string;
|
||||
roleSign: string;
|
||||
describe: string;
|
||||
sort: number;
|
||||
status: boolean;
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
interface SysRoleTableType extends TableType {
|
||||
data: RowRoleType[];
|
||||
}
|
||||
|
||||
declare interface SysRoleState {
|
||||
tableData: SysRoleTableType;
|
||||
}
|
||||
|
||||
declare type TreeType = {
|
||||
id: number;
|
||||
label: string;
|
||||
children?: TreeType[];
|
||||
};
|
||||
|
||||
// user
|
||||
declare type RowUserType<T = any> = {
|
||||
userName: string;
|
||||
userNickname: string;
|
||||
roleSign: string;
|
||||
department: string[];
|
||||
phone: string;
|
||||
email: string;
|
||||
sex: string;
|
||||
password: string;
|
||||
overdueTime: T;
|
||||
status: boolean;
|
||||
describe: string;
|
||||
createTime: T;
|
||||
};
|
||||
|
||||
interface SysUserTableType extends TableType {
|
||||
data: RowUserType[];
|
||||
}
|
||||
|
||||
declare interface SysUserState {
|
||||
tableData: SysUserTableType;
|
||||
}
|
||||
|
||||
declare type DeptTreeType = {
|
||||
deptName: string;
|
||||
createTime: string;
|
||||
status: boolean;
|
||||
sort: number;
|
||||
describe: string;
|
||||
id: number | string;
|
||||
children?: DeptTreeType[];
|
||||
};
|
||||
|
||||
// dept
|
||||
declare interface RowDeptType extends DeptTreeType {
|
||||
deptLevel: string[];
|
||||
person: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
interface SysDeptTableType extends TableType {
|
||||
data: DeptTreeType[];
|
||||
}
|
||||
|
||||
declare interface SysDeptState {
|
||||
tableData: SysDeptTableType;
|
||||
}
|
||||
|
||||
// dic
|
||||
type ListType = {
|
||||
id: number;
|
||||
label: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
declare interface RowDicType {
|
||||
dicName: string;
|
||||
fieldName: string;
|
||||
describe: string;
|
||||
status: boolean;
|
||||
createTime: string;
|
||||
list: ListType[];
|
||||
}
|
||||
|
||||
interface SysDicTableType extends TableType {
|
||||
data: RowDicType[];
|
||||
}
|
||||
|
||||
declare interface SysDicState {
|
||||
tableData: SysDicTableType;
|
||||
}
|
||||
|
||||
/**
|
||||
* views pages
|
||||
*/
|
||||
// filtering
|
||||
declare type FilteringChilType = {
|
||||
id: number | string;
|
||||
label: string;
|
||||
active: boolean;
|
||||
};
|
||||
|
||||
declare type FilterListType = {
|
||||
img: string;
|
||||
title: string;
|
||||
evaluate: string;
|
||||
collection: string;
|
||||
price: string;
|
||||
monSales: string;
|
||||
id: number | string;
|
||||
loading?: boolean;
|
||||
};
|
||||
|
||||
declare type FilteringRowType = {
|
||||
title: string;
|
||||
isMore: boolean;
|
||||
isShowMore: boolean;
|
||||
id: number | string;
|
||||
children: FilteringChilType[];
|
||||
};
|
||||
|
||||
// tableRules
|
||||
declare type TableRulesHeaderType = {
|
||||
prop: string;
|
||||
width: string | number;
|
||||
label: string;
|
||||
isRequired?: boolean;
|
||||
isTooltip?: boolean;
|
||||
type: string;
|
||||
};
|
||||
|
||||
declare type TableRulesState = {
|
||||
tableData: {
|
||||
data: EmptyObjectType[];
|
||||
header: TableRulesHeaderType[];
|
||||
option: SelectOptionType[];
|
||||
};
|
||||
};
|
||||
|
||||
declare type TableRulesOneProps = {
|
||||
name: string;
|
||||
email: string;
|
||||
autograph: string;
|
||||
occupation: string;
|
||||
};
|
||||
|
||||
// tree
|
||||
declare type RowTreeType = {
|
||||
id: number;
|
||||
label: string;
|
||||
label1: string;
|
||||
label2: string;
|
||||
isShow: boolean;
|
||||
children?: RowTreeType[];
|
||||
};
|
||||
|
||||
// workflow index
|
||||
declare type NodeListState = {
|
||||
id: string | number;
|
||||
nodeId: string | undefined;
|
||||
class: HTMLElement | string;
|
||||
left: number | string;
|
||||
top: number | string;
|
||||
icon: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
declare type LineListState = {
|
||||
sourceId: string;
|
||||
targetId: string;
|
||||
label: string;
|
||||
};
|
||||
|
||||
declare type XyState = {
|
||||
x: string | number;
|
||||
y: string | number;
|
||||
};
|
||||
|
||||
declare type WorkflowState<T = any> = {
|
||||
leftNavList: T[];
|
||||
dropdownNode: XyState;
|
||||
dropdownLine: XyState;
|
||||
isShow: boolean;
|
||||
jsPlumb: T;
|
||||
jsPlumbNodeIndex: null | number;
|
||||
jsplumbDefaults: T;
|
||||
jsplumbMakeSource: T;
|
||||
jsplumbMakeTarget: T;
|
||||
jsplumbConnect: T;
|
||||
jsplumbData: {
|
||||
nodeList: NodeListState[];
|
||||
lineList: LineListState[];
|
||||
};
|
||||
};
|
||||
|
||||
// workflow drawer
|
||||
declare type WorkflowDrawerNodeState<T = any> = {
|
||||
node: { [key: string]: T };
|
||||
nodeRules: T;
|
||||
form: T;
|
||||
tabsActive: string;
|
||||
loading: {
|
||||
extend: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
declare type WorkflowDrawerLabelType = {
|
||||
type: string;
|
||||
label: string;
|
||||
};
|
||||
|
||||
declare type WorkflowDrawerState<T = any> = {
|
||||
isOpen: boolean;
|
||||
nodeData: {
|
||||
type: string;
|
||||
};
|
||||
jsplumbConn: T;
|
||||
};
|
||||
|
||||
/**
|
||||
* views make
|
||||
*/
|
||||
// tableDemo
|
||||
declare type TableDemoPageType = {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
};
|
||||
|
||||
declare type TableHeaderType = {
|
||||
key: string;
|
||||
width: string;
|
||||
title: string;
|
||||
type: string | number;
|
||||
colWidth: string;
|
||||
width?: string | number;
|
||||
height?: string | number;
|
||||
isCheck: boolean;
|
||||
};
|
||||
|
||||
declare type TableSearchType = {
|
||||
label: string;
|
||||
prop: string;
|
||||
placeholder: string;
|
||||
required: boolean;
|
||||
type: string;
|
||||
options?: SelectOptionType[];
|
||||
};
|
||||
|
||||
declare type TableDemoState = {
|
||||
tableData: {
|
||||
data: EmptyObjectType[];
|
||||
header: TableHeaderType[];
|
||||
config: {
|
||||
total: number;
|
||||
loading: boolean;
|
||||
isBorder: boolean;
|
||||
isSelection: boolean;
|
||||
isSerialNo: boolean;
|
||||
isOperate: boolean;
|
||||
};
|
||||
search: TableSearchType[];
|
||||
param: EmptyObjectType;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user