From d9a13b33c31203f3bd3890458a18ab9632940a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E4=BB=99=E9=83=BD=E6=B2=A1=E7=94=A8?= <615206459@qq.com> Date: Thu, 20 Feb 2025 00:17:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - .prettierrc | 9 + build/cool/eps.d.ts | 2528 +++++++++ build/cool/eps.json | 1 + package.json | 2 +- packages/crud/index.d.ts | 3 + packages/crud/package.json | 2 +- packages/crud/src/components/crud/index.tsx | 4 +- .../crud/src/components/table/helper/index.ts | 5 + packages/crud/src/components/table/index.tsx | 2 +- .../types/components/table/helper/index.d.ts | 3 + pnpm-lock.yaml | 10 +- src/modules/base/locales/en.json | 284 +- src/modules/base/locales/zh-cn.json | 284 +- src/modules/base/locales/zh-tw.json | 284 +- .../base/pages/main/components/global.vue | 16 +- src/modules/base/views/menu/index.vue | 104 +- src/modules/demo/locales/en.json | 106 +- src/modules/demo/locales/zh-cn.json | 106 +- src/modules/demo/locales/zh-tw.json | 106 +- src/modules/dict/locales/en.json | 30 +- src/modules/dict/locales/zh-cn.json | 30 +- src/modules/dict/locales/zh-tw.json | 30 +- src/modules/dict/views/list.vue | 133 +- src/modules/helper/components/ai-code/btn.vue | 65 +- src/modules/helper/locales/en.json | 119 +- src/modules/helper/locales/zh-cn.json | 119 +- src/modules/helper/locales/zh-tw.json | 119 +- src/modules/recycle/locales/en.json | 26 +- src/modules/recycle/locales/zh-cn.json | 26 +- src/modules/recycle/locales/zh-tw.json | 26 +- src/modules/space/locales/en.json | 38 +- src/modules/space/locales/zh-cn.json | 38 +- src/modules/space/locales/zh-tw.json | 38 +- src/modules/task/locales/en.json | 66 +- src/modules/task/locales/zh-cn.json | 66 +- src/modules/task/locales/zh-tw.json | 66 +- src/modules/user/locales/en.json | 49 +- src/modules/user/locales/zh-cn.json | 49 +- src/modules/user/locales/zh-tw.json | 49 +- src/plugins/crud/components/select/index.tsx | 89 +- src/plugins/crud/config.ts | 32 +- src/plugins/crud/locales/en.json | 61 +- src/plugins/crud/locales/zh-cn.json | 61 +- src/plugins/crud/locales/zh-tw.json | 61 +- src/plugins/crud/plugins/table/index.ts | 4 +- src/plugins/crud/plugins/table/rowEdit.tsx | 4 + src/plugins/crud/plugins/table/toTree.ts | 94 + src/plugins/dev-tools/locales/en.json | 26 +- src/plugins/dev-tools/locales/zh-cn.json | 26 +- src/plugins/dev-tools/locales/zh-tw.json | 26 +- src/plugins/editor-preview/locales/en.json | 16 +- src/plugins/editor-preview/locales/zh-cn.json | 16 +- src/plugins/editor-preview/locales/zh-tw.json | 16 +- src/plugins/editor-wang/locales/en.json | 4 +- src/plugins/editor-wang/locales/zh-cn.json | 4 +- src/plugins/editor-wang/locales/zh-tw.json | 4 +- src/plugins/excel/locales/en.json | 32 +- src/plugins/excel/locales/zh-cn.json | 32 +- src/plugins/excel/locales/zh-tw.json | 32 +- src/plugins/theme/locales/en.json | 30 +- src/plugins/theme/locales/zh-cn.json | 30 +- src/plugins/theme/locales/zh-tw.json | 30 +- src/plugins/upload/locales/en.json | 42 +- src/plugins/upload/locales/zh-cn.json | 42 +- src/plugins/upload/locales/zh-tw.json | 42 +- src/plugins/view/locales/en.json | 28 +- src/plugins/view/locales/zh-cn.json | 28 +- src/plugins/view/locales/zh-tw.json | 28 +- stats.html | 4949 ----------------- vite.config.ts | 74 +- 71 files changed, 4368 insertions(+), 6637 deletions(-) create mode 100644 .prettierrc create mode 100644 build/cool/eps.d.ts create mode 100644 build/cool/eps.json create mode 100644 src/plugins/crud/plugins/table/toTree.ts delete mode 100644 stats.html diff --git a/.gitignore b/.gitignore index 0d6f1ef..615a016 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .DS_Store node_modules/ /dist/ -/build/ dist-ssr/ # Log files diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..b82b0c6 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "tabWidth": 4, + "useTabs": true, + "semi": true, + "jsxBracketSameLine": true, + "singleQuote": false, + "printWidth": 100, + "trailingComma": "none" +} diff --git a/build/cool/eps.d.ts b/build/cool/eps.d.ts new file mode 100644 index 0000000..f773106 --- /dev/null +++ b/build/cool/eps.d.ts @@ -0,0 +1,2528 @@ +declare namespace Eps { + interface BaseSysDepartmentEntity { + /** + * ID + */ + id?: number; + + /** + * 部门名称 + */ + name?: string; + + /** + * 上级部门ID + */ + parentId?: number; + + /** + * 排序 + */ + orderNum?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysLogEntity { + /** + * ID + */ + id?: number; + + /** + * 用户ID + */ + userId?: number; + + /** + * 行为 + */ + action?: string; + + /** + * ip + */ + ip?: string; + + /** + * 参数 + */ + params?: json; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 姓名 + */ + name?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysMenuEntity { + /** + * ID + */ + id?: number; + + /** + * 父菜单ID + */ + parentId?: number; + + /** + * 菜单名称 + */ + name?: string; + + /** + * 菜单地址 + */ + router?: string; + + /** + * 权限标识 + */ + perms?: string; + + /** + * 类型 0-目录 1-菜单 2-按钮 + */ + type?: number; + + /** + * 图标 + */ + icon?: string; + + /** + * 排序 + */ + orderNum?: number; + + /** + * 视图地址 + */ + viewPath?: string; + + /** + * 路由缓存 + */ + keepAlive?: boolean; + + /** + * 是否显示 + */ + isShow?: boolean; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysParamEntity { + /** + * ID + */ + id?: number; + + /** + * 键 + */ + keyName?: string; + + /** + * 名称 + */ + name?: string; + + /** + * 数据 + */ + data?: string; + + /** + * 数据类型 0-字符串 1-富文本 2-文件 + */ + dataType?: number; + + /** + * 备注 + */ + remark?: string; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysRoleEntity { + /** + * ID + */ + id?: number; + + /** + * 用户ID + */ + userId?: string; + + /** + * 名称 + */ + name?: string; + + /** + * 角色标签 + */ + label?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 数据权限是否关联上下级 + */ + relevance?: boolean; + + /** + * 菜单权限 + */ + menuIdList?: json; + + /** + * 部门权限 + */ + departmentIdList?: json; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysUserEntity { + /** + * ID + */ + id?: number; + + /** + * 部门ID + */ + departmentId?: number; + + /** + * 姓名 + */ + name?: string; + + /** + * 用户名 + */ + username?: string; + + /** + * 密码 + */ + password?: string; + + /** + * 密码版本, 作用是改完密码,让原来的token失效 + */ + passwordV?: number; + + /** + * 昵称 + */ + nickName?: string; + + /** + * 头像 + */ + headImg?: string; + + /** + * 手机 + */ + phone?: string; + + /** + * 邮箱 + */ + email?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 状态 0-禁用 1-启用 + */ + status?: number; + + /** + * socketId + */ + socketId?: string; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface DemoGoodsEntity { + /** + * ID + */ + id?: number; + + /** + * 标题 + */ + title?: string; + + /** + * 价格 + */ + price?: number; + + /** + * 描述 + */ + description?: string; + + /** + * 主图 + */ + mainImage?: string; + + /** + * 分类 + */ + type?: number; + + /** + * 状态 + */ + status?: number; + + /** + * 示例图 + */ + exampleImages?: json; + + /** + * 库存 + */ + stock?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 昵称 + */ + userName?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface DictInfoEntity { + /** + * ID + */ + id?: number; + + /** + * 类型ID + */ + typeId?: number; + + /** + * 名称 + */ + name?: string; + + /** + * 值 + */ + value?: string; + + /** + * 排序 + */ + orderNum?: number; + + /** + * 备注 + */ + remark?: string; + + /** + * 父ID + */ + parentId?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface DictTypeEntity { + /** + * ID + */ + id?: number; + + /** + * 名称 + */ + name?: string; + + /** + * 标识 + */ + key?: string; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface PluginInfoEntity { + /** + * ID + */ + id?: number; + + /** + * 名称 + */ + name?: string; + + /** + * 简介 + */ + description?: string; + + /** + * Key名 + */ + keyName?: string; + + /** + * Hook + */ + hook?: string; + + /** + * 描述 + */ + readme?: string; + + /** + * 版本 + */ + version?: string; + + /** + * Logo(base64) + */ + logo?: string; + + /** + * 作者 + */ + author?: string; + + /** + * 状态 0-禁用 1-启用 + */ + status?: number; + + /** + * 内容 + */ + content?: json; + + /** + * ts内容 + */ + tsContent?: json; + + /** + * 插件的plugin.json + */ + pluginJson?: json; + + /** + * 配置 + */ + config?: json; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface RecycleDataEntity { + /** + * ID + */ + id?: number; + + /** + * 表 + */ + entityInfo?: json; + + /** + * 操作人 + */ + userId?: number; + + /** + * 被删除的数据 + */ + data?: json; + + /** + * 请求的接口 + */ + url?: string; + + /** + * 请求参数 + */ + params?: json; + + /** + * 删除数据条数 + */ + count?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 姓名 + */ + userName?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface ShopCategoryEntity { + /** + * ID + */ + id?: number; + + /** + * 图片 + */ + pic?: string; + + /** + * 名称 + */ + name?: string; + + /** + * 父类ID + */ + parentId?: number; + + /** + * 排序 + */ + order?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface ShopCommentEntity { + /** + * ID + */ + id?: number; + + /** + * 用户ID + */ + userId?: number; + + /** + * 内容 + */ + content?: string; + + /** + * 评分 [1-5] + */ + score?: number; + + /** + * 商品ID + */ + productId?: number; + + /** + * 提交时间 + */ + submitTime?: string; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 昵称 + */ + userName?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface ShopProductEntity { + /** + * ID + */ + id?: number; + + /** + * 图片 + */ + pic?: string; + + /** + * 名称 + */ + name?: string; + + /** + * 价格 + */ + price?: number; + + /** + * 分类ID + */ + categoryId?: number; + + /** + * 品牌 + */ + brand?: string; + + /** + * 产地 + */ + origin?: string; + + /** + * 状态 [0-上架|1-下架] + */ + status?: number; + + /** + * 详情 + */ + detail?: string; + + /** + * 排序 + */ + order?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface SpaceInfoEntity { + /** + * ID + */ + id?: number; + + /** + * 地址 + */ + url?: string; + + /** + * 类型 + */ + type?: string; + + /** + * 分类ID + */ + classifyId?: number; + + /** + * 文件id + */ + fileId?: string; + + /** + * 文件名 + */ + name?: string; + + /** + * 文件大小 + */ + size?: number; + + /** + * 文档版本 + */ + version?: number; + + /** + * 文件位置 + */ + key?: string; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface SpaceTypeEntity { + /** + * ID + */ + id?: number; + + /** + * 类别名称 + */ + name?: string; + + /** + * 父分类ID + */ + parentId?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface TaskInfoEntity { + /** + * ID + */ + id?: number; + + /** + * 任务ID + */ + jobId?: string; + + /** + * 任务配置 + */ + repeatConf?: string; + + /** + * 名称 + */ + name?: string; + + /** + * cron + */ + cron?: string; + + /** + * 最大执行次数 不传为无限次 + */ + limit?: number; + + /** + * 每间隔多少毫秒执行一次 如果cron设置了 这项设置就无效 + */ + every?: number; + + /** + * 备注 + */ + remark?: string; + + /** + * 状态 0-停止 1-运行 + */ + status?: number; + + /** + * 开始时间 + */ + startDate?: Date; + + /** + * 结束时间 + */ + endDate?: Date; + + /** + * 数据 + */ + data?: string; + + /** + * 执行的service实例ID + */ + service?: string; + + /** + * 状态 0-系统 1-用户 + */ + type?: number; + + /** + * 下一次执行时间 + */ + nextRunTime?: Date; + + /** + * 状态 0-cron 1-时间间隔 + */ + taskType?: number; + + /** + * undefined + */ + lastExecuteTime?: Date; + + /** + * undefined + */ + lockExpireTime?: Date; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface UserAddressEntity { + /** + * ID + */ + id?: number; + + /** + * 用户ID + */ + userId?: number; + + /** + * 联系人 + */ + contact?: string; + + /** + * 手机号 + */ + phone?: string; + + /** + * 省 + */ + province?: string; + + /** + * 市 + */ + city?: string; + + /** + * 区 + */ + district?: string; + + /** + * 地址 + */ + address?: string; + + /** + * 是否默认 + */ + isDefault?: boolean; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + interface UserInfoEntity { + /** + * ID + */ + id?: number; + + /** + * 登录唯一ID + */ + unionid?: string; + + /** + * 头像 + */ + avatarUrl?: string; + + /** + * 昵称 + */ + nickName?: string; + + /** + * 手机号 + */ + phone?: string; + + /** + * 性别 + */ + gender?: number; + + /** + * 状态 + */ + status?: number; + + /** + * 登录方式 + */ + loginType?: number; + + /** + * 密码 + */ + password?: string; + + /** + * 介绍 + */ + description?: string; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 更新时间 + */ + updateTime?: string; + + /** + * 任意键值 + */ + [key: string]: any; + } + + type json = any; + + interface BaseCoding { + /** + * 获取模块目录结构 + */ + getModuleTree(data?: any): Promise; + + /** + * 创建代码 + */ + createCode(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { getModuleTree: string; createCode: string }; + + /** + * 权限状态 + */ + _permission: { getModuleTree: boolean; createCode: boolean }; + + request: Service["request"]; + } + + interface BaseComm { + /** + * 修改个人信息 + */ + personUpdate(data?: any): Promise; + + /** + * 文件上传模式 + */ + uploadMode(data?: any): Promise; + + /** + * 权限与菜单 + */ + permmenu(data?: any): Promise; + + /** + * 编程 + */ + program(data?: any): Promise; + + /** + * 个人信息 + */ + person(data?: any): Promise; + + /** + * 文件上传 + */ + upload(data?: any): Promise; + + /** + * 退出 + */ + logout(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + personUpdate: string; + uploadMode: string; + permmenu: string; + program: string; + person: string; + upload: string; + logout: string; + }; + + /** + * 权限状态 + */ + _permission: { + personUpdate: boolean; + uploadMode: boolean; + permmenu: boolean; + program: boolean; + person: boolean; + upload: boolean; + logout: boolean; + }; + + request: Service["request"]; + } + + interface BaseOpen { + /** + * 刷新token + */ + refreshToken(data?: any): Promise; + + /** + * 验证码 + */ + captcha(data?: any): Promise; + + /** + * 登录 + */ + login(data?: any): Promise; + + /** + * 获得网页内容的参数值 + */ + html(data?: any): Promise; + + /** + * 实体信息与路径 + */ + eps(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + refreshToken: string; + captcha: string; + login: string; + html: string; + eps: string; + }; + + /** + * 权限状态 + */ + _permission: { + refreshToken: boolean; + captcha: boolean; + login: boolean; + html: boolean; + eps: boolean; + }; + + request: Service["request"]; + } + + interface BaseSysDepartment { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 排序 + */ + order(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { delete: string; update: string; order: string; list: string; add: string }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + order: boolean; + list: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface BaseSysLog { + /** + * 日志保存时间 + */ + setKeep(data?: any): Promise; + + /** + * 获得日志保存时间 + */ + getKeep(data?: any): Promise; + + /** + * 清理 + */ + clear(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysLogEntity[]; + [key: string]: any; + }>; + + /** + * 权限标识 + */ + permission: { setKeep: string; getKeep: string; clear: string; page: string }; + + /** + * 权限状态 + */ + _permission: { setKeep: boolean; getKeep: boolean; clear: boolean; page: boolean }; + + request: Service["request"]; + } + + interface BaseSysMenu { + /** + * 创建代码 + */ + create(data?: any): Promise; + + /** + * 导出 + */ + export(data?: any): Promise; + + /** + * 导入 + */ + import(data?: any): Promise; + + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 解析 + */ + parse(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysMenuEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + create: string; + export: string; + import: string; + delete: string; + update: string; + parse: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + create: boolean; + export: boolean; + import: boolean; + delete: boolean; + update: boolean; + parse: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface BaseSysParam { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 获得网页内容的参数值 + */ + html(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysParamEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + html: string; + info: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + html: boolean; + info: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface BaseSysRole { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysRoleEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface BaseSysUser { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 移动部门 + */ + move(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysUserEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + move: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + move: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface DemoGoods { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: DemoGoodsEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface DemoTenant { + /** + * 局部不使用多租户 + */ + noTenant(data?: any): Promise; + + /** + * 不使用多租户 + */ + noUse(data?: any): Promise; + + /** + * use + */ + use(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { noTenant: string; noUse: string; use: string }; + + /** + * 权限状态 + */ + _permission: { noTenant: boolean; noUse: boolean; use: boolean }; + + request: Service["request"]; + } + + interface DictInfo { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 获得所有字典类型 + */ + types(data?: any): Promise; + + /** + * 获得字典数据 + */ + data(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: DictInfoEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + types: string; + data: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + types: boolean; + data: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface DictType { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: DictTypeEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface PluginInfo { + /** + * 安装插件 + */ + install(data?: any): Promise; + + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: PluginInfoEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + install: string; + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + install: boolean; + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface RecycleData { + /** + * 恢复数据 + */ + restore(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: RecycleDataEntity[]; + [key: string]: any; + }>; + + /** + * 权限标识 + */ + permission: { restore: string; info: string; page: string }; + + /** + * 权限状态 + */ + _permission: { restore: boolean; info: boolean; page: boolean }; + + request: Service["request"]; + } + + interface ShopCategory { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: ShopCategoryEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface ShopComment { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: ShopCommentEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface ShopProduct { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: ShopProductEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface SpaceInfo { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: SpaceInfoEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface SpaceType { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: SpaceTypeEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface TaskInfo { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 开始 + */ + start(data?: any): Promise; + + /** + * 执行一次 + */ + once(data?: any): Promise; + + /** + * 停止 + */ + stop(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: TaskInfoEntity[]; + [key: string]: any; + }>; + + /** + * 日志 + */ + log(data?: any): Promise; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + start: string; + once: string; + stop: string; + info: string; + page: string; + log: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + start: boolean; + once: boolean; + stop: boolean; + info: boolean; + page: boolean; + log: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface UserAddress { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: UserAddressEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + interface UserInfo { + /** + * 删除 + */ + delete(data?: any): Promise; + + /** + * 修改 + */ + update(data?: any): Promise; + + /** + * 单个信息 + */ + info(data?: any): Promise; + + /** + * 列表查询 + */ + list(data?: any): Promise; + + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: UserInfoEntity[]; + [key: string]: any; + }>; + + /** + * 新增 + */ + add(data?: any): Promise; + + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + + request: Service["request"]; + } + + type Service = { + /** + * 基础请求 + */ + request(options?: { + url: string; + method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS"; + data?: any; + params?: any; + headers?: { + authorization?: string; + [key: string]: any; + }; + timeout?: number; + proxy?: boolean; + [key: string]: any; + }): Promise; + + base: { + coding: BaseCoding; + comm: BaseComm; + open: BaseOpen; + sys: { + department: BaseSysDepartment; + log: BaseSysLog; + menu: BaseSysMenu; + param: BaseSysParam; + role: BaseSysRole; + user: BaseSysUser; + }; + }; + demo: { goods: DemoGoods; tenant: DemoTenant }; + dict: { info: DictInfo; type: DictType }; + plugin: { info: PluginInfo }; + recycle: { data: RecycleData }; + shop: { category: ShopCategory; comment: ShopComment; product: ShopProduct }; + space: { info: SpaceInfo; type: SpaceType }; + task: { info: TaskInfo }; + user: { address: UserAddress; info: UserInfo }; + }; + + type DictKey = "brand" | "occupation"; +} diff --git a/build/cool/eps.json b/build/cool/eps.json new file mode 100644 index 0000000..7786fa8 --- /dev/null +++ b/build/cool/eps.json @@ -0,0 +1 @@ +[{"prefix":"/admin/base/coding","name":"","api":[{"method":"get","path":"/getModuleTree"},{"method":"post","path":"/createCode"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/base/comm","name":"","api":[{"method":"post","path":"/personUpdate"},{"method":"get","path":"/uploadMode"},{"method":"get","path":"/permmenu"},{"method":"get","path":"/program"},{"method":"get","path":"/person"},{"method":"post","path":"/upload"},{"method":"post","path":"/logout"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/base/open","name":"","api":[{"method":"get","path":"/refreshToken"},{"method":"get","path":"/captcha"},{"method":"post","path":"/login"},{"method":"get","path":"/html"},{"method":"get","path":"/eps"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/base/sys/department","name":"BaseSysDepartmentEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/order"},{"method":"post","path":"/list"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/base/sys/log","name":"BaseSysLogEntity","api":[{"method":"post","path":"/setKeep"},{"method":"get","path":"/getKeep"},{"method":"post","path":"/clear"},{"method":"post","path":"/page"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[{"propertyName":"name","type":"string","length":"","comment":"姓名","nullable":true,"source":"b.name"},{"propertyName":"action","type":"string","length":"","comment":"行为","nullable":false,"source":"a.action"},{"propertyName":"ip","type":"string","length":"","comment":"ip","nullable":true,"source":"a.ip"}]}},{"prefix":"/admin/base/sys/menu","name":"BaseSysMenuEntity","api":[{"method":"post","path":"/create"},{"method":"post","path":"/export"},{"method":"post","path":"/import"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/parse"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/base/sys/param","name":"BaseSysParamEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/html"},{"method":"get","path":"/info"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[{"propertyName":"dataType","type":"number","length":"","comment":"数据类型 0-字符串 1-富文本 2-文件 ","nullable":false,"defaultValue":0,"source":"a.dataType"}],"fieldLike":[],"keyWordLikeFields":[{"propertyName":"name","type":"string","length":"","comment":"名称","nullable":false,"source":"a.name"},{"propertyName":"keyName","type":"string","length":"","comment":"键","nullable":false,"source":"a.keyName"}]}},{"prefix":"/admin/base/sys/role","name":"BaseSysRoleEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[{"propertyName":"name","type":"string","length":"","comment":"名称","nullable":false,"source":"a.name"},{"propertyName":"label","type":"string","length":"50","comment":"角色标签","nullable":true,"source":"a.label"}]}},{"prefix":"/admin/base/sys/user","name":"BaseSysUserEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/move"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/demo/goods","name":"DemoGoodsEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[{"propertyName":"status","type":"number","length":"","comment":"状态","nullable":false,"defaultValue":1,"dict":["禁用","启用"],"source":"a.status"}],"fieldLike":[{"propertyName":"title","type":"string","length":"50","comment":"标题","nullable":false,"source":"a.title"}],"keyWordLikeFields":[{"propertyName":"description","type":"string","length":"","comment":"描述","nullable":true,"source":"a.description"}]}},{"prefix":"/admin/demo/tenant","name":"DemoGoodsEntity","api":[{"method":"post","path":"/noTenant"},{"method":"post","path":"/noUse"},{"method":"post","path":"/use"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/dict/info","name":"DictInfoEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/types"},{"method":"post","path":"/data"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/dict/type","name":"DictTypeEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/plugin/info","name":"PluginInfoEntity","api":[{"method":"post","path":"/install"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/recycle/data","name":"RecycleDataEntity","api":[{"method":"post","path":"/restore"},{"method":"get","path":"/info"},{"method":"post","path":"/page"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[{"propertyName":"userName","type":"string","length":"","comment":"姓名","nullable":true,"source":"b.name"},{"propertyName":"url","type":"string","length":"","comment":"请求的接口","nullable":true,"source":"a.url"}]}},{"prefix":"/admin/shop/category","name":"ShopCategoryEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[{"propertyName":"name","type":"string","length":"255","comment":"名称","nullable":false,"source":"a.name"}]}},{"prefix":"/admin/shop/comment","name":"ShopCommentEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[{"propertyName":"content","type":"text","length":"","comment":"内容","nullable":false,"source":"a.content"}]}},{"prefix":"/admin/shop/product","name":"ShopProductEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[{"propertyName":"name","type":"string","length":"255","comment":"名称","nullable":false,"source":"a.name"},{"propertyName":"brand","type":"string","length":"255","comment":"品牌","nullable":true,"source":"a.brand"}]}},{"prefix":"/admin/space/info","name":"SpaceInfoEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[{"propertyName":"type","type":"string","length":"","comment":"类型","nullable":false,"source":"a.type"},{"propertyName":"classifyId","type":"number","length":"","comment":"分类ID","nullable":true,"source":"a.classifyId"}],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/space/type","name":"SpaceTypeEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/task/info","name":"TaskInfoEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/start"},{"method":"post","path":"/once"},{"method":"post","path":"/stop"},{"method":"get","path":"/info"},{"method":"post","path":"/page"},{"method":"get","path":"/log"},{"method":"post","path":"/add"}],"search":{"fieldEq":[{"propertyName":"status","type":"number","length":"","comment":"状态 0-停止 1-运行","nullable":false,"defaultValue":1,"source":"a.status"},{"propertyName":"type","type":"number","length":"","comment":"状态 0-系统 1-用户","nullable":false,"defaultValue":0,"source":"a.type"}],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/user/address","name":"UserAddressEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[],"fieldLike":[],"keyWordLikeFields":[]}},{"prefix":"/admin/user/info","name":"UserInfoEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}],"search":{"fieldEq":[{"propertyName":"status","type":"number","length":"","comment":"状态","nullable":false,"defaultValue":1,"dict":["禁用","正常","已注销"],"source":"a.status"},{"propertyName":"gender","type":"number","length":"","comment":"性别","nullable":false,"defaultValue":0,"dict":["未知","男","女"],"source":"a.gender"},{"propertyName":"loginType","type":"number","length":"","comment":"登录方式","nullable":false,"defaultValue":0,"dict":["小程序","公众号","H5"],"source":"a.loginType"}],"fieldLike":[],"keyWordLikeFields":[{"propertyName":"nickName","type":"string","length":"","comment":"昵称","nullable":true,"source":"a.nickName"},{"propertyName":"phone","type":"string","length":"","comment":"手机号","nullable":true,"source":"a.phone"}]}}] \ No newline at end of file diff --git a/package.json b/package.json index d1452ba..28da638 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "format": "prettier --write src/" }, "dependencies": { - "@cool-vue/crud": "^8.0.0", + "@cool-vue/crud": "^8.0.1", "@element-plus/icons-vue": "^2.3.1", "@vueuse/core": "^12.5.0", "@wangeditor/editor": "^5.1.23", diff --git a/packages/crud/index.d.ts b/packages/crud/index.d.ts index 4751372..b9ca55d 100644 --- a/packages/crud/index.d.ts +++ b/packages/crud/index.d.ts @@ -407,6 +407,9 @@ declare namespace ClTable { on?: { [key: string]: (...args: any[]) => void; }; + props?: { + [key: string]: any; + }; plugins?: Plugin[]; onRowContextmenu?(row: T, column: any, event: any): void; } diff --git a/packages/crud/package.json b/packages/crud/package.json index 0b43af2..01b1699 100644 --- a/packages/crud/package.json +++ b/packages/crud/package.json @@ -1,6 +1,6 @@ { "name": "@cool-vue/crud", - "version": "8.0.0", + "version": "8.0.1", "private": false, "main": "./dist/index.umd.js", "module": "./dist/index.es.js", diff --git a/packages/crud/src/components/crud/index.tsx b/packages/crud/src/components/crud/index.tsx index 097a1e3..a87a7b4 100644 --- a/packages/crud/src/components/crud/index.tsx +++ b/packages/crud/src/components/crud/index.tsx @@ -57,7 +57,9 @@ export default defineComponent({ // 权限 permission: {}, // 事件 - mitt + mitt, + // 配置 + config }, cloneDeep({ dict, permission }) ) diff --git a/packages/crud/src/components/table/helper/index.ts b/packages/crud/src/components/table/helper/index.ts index 4985d2b..8ec2b41 100644 --- a/packages/crud/src/components/table/helper/index.ts +++ b/packages/crud/src/components/table/helper/index.ts @@ -25,6 +25,11 @@ export function useTable(props: any) { config.on = {}; } + // 参数 + if (!config.props) { + config.props = {}; + } + return { Table, config }; } diff --git a/packages/crud/src/components/table/index.tsx b/packages/crud/src/components/table/index.tsx index 7cbe8fd..3120841 100644 --- a/packages/crud/src/components/table/index.tsx +++ b/packages/crud/src/components/table/index.tsx @@ -126,6 +126,7 @@ export default defineComponent({ , { ...config.on, + ...config.props, // config maxHeight: config.autoHeight ? ctx.maxHeight.value : null, @@ -145,7 +146,6 @@ export default defineComponent({ highlightCurrentRow: style.table.highlightCurrentRow, resizable: style.table.resizable, stripe: style.table.stripe, - }, { default() { diff --git a/packages/crud/types/components/table/helper/index.d.ts b/packages/crud/types/components/table/helper/index.d.ts index 292ca40..6f8a1ef 100644 --- a/packages/crud/types/components/table/helper/index.d.ts +++ b/packages/crud/types/components/table/helper/index.d.ts @@ -1027,6 +1027,9 @@ export declare function useTable(props: any): { on?: { [key: string]: (...args: any[]) => void; }; + props?: { + [key: string]: any; + }; plugins?: ClTable.Plugin[]; onRowContextmenu?: (row: any, column: any, event: any) => void; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55f92c5..f8e70db 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@cool-vue/crud': - specifier: ^8.0.0 - version: 8.0.0(typescript@5.5.4) + specifier: ^8.0.1 + version: 8.0.1(typescript@5.5.4) '@element-plus/icons-vue': specifier: ^2.3.1 version: 2.3.1(vue@3.5.13(typescript@5.5.4)) @@ -331,8 +331,8 @@ packages: resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==} engines: {node: '>=6.9.0'} - '@cool-vue/crud@8.0.0': - resolution: {integrity: sha512-4KneWQBEwf9WNkhNe97p+ua7ae5+tANhRP9DdiclJSXvriSEjdXV5VzeMh4vnJJFtYkNBMZWKIti+MCWzPNW9Q==} + '@cool-vue/crud@8.0.1': + resolution: {integrity: sha512-qITCLcmc5gCiqF2J2I5KsiywqTc/+4Umqy9MBx1dFsYvYfrGcqoRcybcz8cTO4CEDyIv0icymt4PRuKOf01igw==} '@cool-vue/vite-plugin@8.0.0': resolution: {integrity: sha512-XNVTF+NUyyW5qVfyOusD6KUVT5IbbX11zI5PuFjUXXwMjMauwGN2/BT7/TM5IoWwa7Cwul8TPG5rr+h3KyA5sg==} @@ -3079,7 +3079,7 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@cool-vue/crud@8.0.0(typescript@5.5.4)': + '@cool-vue/crud@8.0.1(typescript@5.5.4)': dependencies: '@vue/runtime-core': 3.5.13 element-plus: 2.9.4(vue@3.5.13(typescript@5.5.4)) diff --git a/src/modules/base/locales/en.json b/src/modules/base/locales/en.json index d6415a0..f48f186 100644 --- a/src/modules/base/locales/en.json +++ b/src/modules/base/locales/en.json @@ -1,143 +1,143 @@ { - "请填写新密码": "Please fill in the new password", - "保存修改": "Save Changes", - "修改成功": "Modification Successful", - "拼命加载中": "Loading hard", - "转移": "Transfer", - "搜索用户名、姓名": "Search Username, Name", - "用户列表": "User List", - "用户名": "Username", - "姓名": "Name", - "部门名称": "Department Name", - "角色": "Role", - "状态": "Status", - "手机号码": "Mobile Number", - "选择头像": "Select Avatar", - "密码": "Password", - "密码长度在 6 到 16 个字符": "Password length should be between 6 and 16 characters", - "邮箱": "Email", - "启用": "Enable", - "禁用": "Disable", - "部门转移": "Department Transfer", - "角色标签": "Character Tag", - "请输入备注": "Please enter remarks", - "清空": "Clear", - "日志保存天数": "Log save days", - "搜索请求地址、用户昵称、ip": "Search request address, user nickname, IP", - "用户ID": "User ID", - "用户昵称": "User nickname", - "请求地址": "Request address", - "参数": "Parameters", - "请求时间": "Request time", - "保存成功": "Saved successfully", - "是否要清空日志?": "Do you want to clear the log?", - "提示": "Tip", - "清空成功": "Cleared successfully", - "基本信息": "Basic information", - "头像": "Avatar", - "昵称": "Nickname", - "请填写昵称": "Please fill in the nickname", - "原密码": "Original password", - "请填写原密码": "Please fill in the original password", - "新密码": "New password", - "个人中心": "Personal Center", - "正在加载资源...": "Loading resources...", - "初次加载资源可能需要较多时间,请耐心等待": "It may take some time for the initial resource loading. Please wait patiently.", - "搜索名称": "Search Name", - "是否关联上下级": "Whether to associate with upper and lower levels", - "名称": "Name", - "标识": "Identifier", - "备注": "Remark", - "功能权限": "Function Permission", - "数据权限": "Data Permission", - "创建时间": "Creation Time", - "更新时间": "Update Time", - "数据类型": "Data Type", - "搜索名称、keyName": "Search Name, keyName", - "字符串": "String", - "富文本": "Rich Text", - "文件": "File", - "请输入Key": "Please enter Key", - "类型": "Type", - "数据": "Data", - "菜单导入": "Menu Import", - "添加": "Add", - "导入成功": "Import Success", - "{file}文件格式错误:{error}": "{file} File Format Error: {error}", - "导出": "Export", - "选择菜单": "Select Menu", - "请先选择要导出的菜单": "Please select the menu to export first", - "菜单数据": "Menu Data", - "退出登录": "Logout", - "确定退出登录吗?": "Are you sure you want to logout?", - "搜索关键字": "Search Keyword", - "关闭当前": "Close Current", - "关闭其他": "Close Others", - "关闭所有": "Close All", - "{label} 没有子菜单,请先添加": "{label} has no submenus, please add first", - "快速开发后台权限管理系统": "Quick Development Background Permission Management System", - "请输入用户名": "Please enter username", - "请输入密码": "Please enter password", - "验证码": "Verification Code", - "登录": "Login", - "删除": "Delete", - "新增成员": "Add Member", - "目录": "Directory", - "菜单": "Menu", - "权限": "Permission", - "是否显示": "Display", - "图标": "Icon", - "节点路由": "Node Route", - "路由缓存": "Route Cache", - "文件路径": "File Path", - "排序号": "Sorting Number", - "节点类型": "Node Type", - "节点名称": "Node Name", - "上级节点": "Parent Node", - "请输入节点路由,如:/test": "Please enter the node route, e.g.: /test", - "开启": "Enable", - "关闭": "Disable", - "请填写排序号": "Please fill in the sorting number", - "导入": "Import", - "如遇到问题无法导入菜单,请检查文件并尝试重新导入。": "If you encounter problems importing the menu, please check the file and try re-importing.", - "选择部门": "Select Department", - "请选择部门": "Please select department", - "转移到新部门,是否继续?": "Transfer to a new department. Do you want to continue?", - "转移成功": "Transfer successful", - "组织架构": "Organization Structure", - "刷新": "Refresh", - "拖动排序": "Drag to sort", - "编辑部门": "Edit Department", - "上级部门": "Superior Department", - "排序": "Sort", - "新增部门 “{name}” 成功": "Successfully added a new department “{name}”", - "删除成功": "Delete successful", - "“{name}” 部门的用户已成功转移到 “{parentName}” 部门。": "The users in the “{name}” department have been successfully transferred to the “{parentName}” department.", - "此操作将会删除 “{name}” 部门的所有用户,是否确认?": "This operation will delete all users in the “{name}” department. Are you sure?", - "直接删除": "Delete directly", - "保留用户": "Keep users", - "部门架构已发生改变,是否保存?": "The department structure has changed. Do you want to save?", - "更新排序成功": "Successfully updated the sort", - "新增": "Add", - "编辑": "Edit", - "用户名不能为空": "Username cannot be empty", - "密码不能为空": "Password cannot be empty", - "图片验证码不能为空": "Image verification code cannot be empty", - "验证码获取失败": "Failed to obtain verification code", - "马上回来": "Be right back", - "糟糕,出了点问题": "Oops, something went wrong", - "找不到您要查找的页面": "Page not found", - "您无权访问此页面": "You are not authorized to access this page", - "认证失败,请重新登录!": "Authentication failed, please log in again!", - "返回首页": "Return to home page", - "重新登录": "Log in again", - "返回登录页": "Return to login page", - "自定义输入": "Custom input", - "请输入": "Please enter", - "输入关键字进行过滤": "Enter keyword to filter", - "复制": "Copy", - "行为": "Behavior", - "ip": "IP", - "数据类型 0-字符串 1-富文本 2-文件 ": "Data type 0 - String 1 - Rich text 2 - File ", - "键": "Key" -} + "删除": "Delete", + "新增成员": "Add Member", + "目录": "Directory", + "菜单": "Menu", + "权限": "Permission", + "是否显示": "Show/Hide", + "图标": "Icon", + "节点路由": "Node Route", + "路由缓存": "Route Cache", + "文件路径": "File Path", + "排序号": "Sorting Number", + "节点类型": "Node Type", + "节点名称": "Node Name", + "上级节点": "Parent Node", + "请输入节点路由,如:/test": "Please enter the node route, e.g.: /test", + "开启": "Enable", + "关闭": "Disable", + "请填写排序号": "Please fill in the sorting number", + "导入": "Import", + "如遇到问题无法导入菜单,请检查文件并尝试重新导入。": "If you encounter problems importing the menu, please check the file and try to import again.", + "角色标签": "Character Tag", + "请填写新密码": "Please fill in the new password", + "保存修改": "Save Changes", + "修改成功": "Modification Successful", + "拼命加载中": "Loading拼命", + "转移": "Transfer", + "搜索用户名、姓名": "Search Username, Name", + "用户列表": "User List", + "用户名": "Username", + "姓名": "Name", + "部门名称": "Department Name", + "角色": "Role", + "状态": "Status", + "手机号码": "Mobile Phone Number", + "选择头像": "Select Avatar", + "密码": "Password", + "密码长度在 6 到 16 个字符": "Password length should be between 6 and 16 characters", + "邮箱": "Email", + "启用": "Enable", + "禁用": "Disable", + "部门转移": "Department Transfer", + "请输入备注": "Please enter remarks", + "清空": "Clear", + "日志保存天数": "Log save days", + "搜索请求地址、用户昵称、ip": "Search request address, user nickname, IP", + "用户ID": "User ID", + "用户昵称": "User nickname", + "请求地址": "Request address", + "参数": "Parameter", + "请求时间": "Request time", + "保存成功": "Save successful", + "是否要清空日志?": "Do you want to clear the log?", + "提示": "Tip", + "清空成功": "Clear successful", + "基本信息": "Basic information", + "头像": "Avatar", + "昵称": "Nickname", + "请填写昵称": "Please fill in the nickname", + "原密码": "Original password", + "请填写原密码": "Please fill in the original password", + "新密码": "New password", + "菜单导入": "Menu Import", + "添加": "Add", + "导入成功": "Import Success", + "{file}文件格式错误:{error}": "{file} File Format Error: {error}", + "导出": "Export", + "选择菜单": "Select Menu", + "请先选择要导出的菜单": "Please select the menu to export first", + "菜单数据": "Menu Data", + "退出登录": "Log out", + "确定退出登录吗?": "Are you sure you want to log out?", + "搜索关键字": "Search Keyword", + "关闭当前": "Close Current", + "关闭其他": "Close Others", + "关闭所有": "Close All", + "{label} 没有子菜单,请先添加": "{label} has no sub-menus. Please add them first", + "快速开发后台权限管理系统": "Quick Development Background Permission Management System", + "请输入用户名": "Please enter your username", + "请输入密码": "Please enter your password", + "验证码": "Verification Code", + "登录": "Log in", + "用户名不能为空": "Username cannot be empty", + "密码不能为空": "Password cannot be empty", + "图片验证码不能为空": "Image verification code cannot be empty", + "验证码获取失败": "Failed to obtain verification code", + "马上回来": "Be right back", + "糟糕,出了点问题": "Oops, something went wrong", + "找不到您要查找的页面": "Page not found", + "您无权访问此页面": "You are not authorized to access this page", + "认证失败,请重新登录!": "Authentication failed, please log in again!", + "返回首页": "Return to home page", + "重新登录": "Log in again", + "返回登录页": "Return to login page", + "自定义输入": "Custom input", + "请输入": "Please enter", + "输入关键字进行过滤": "Enter keywords for filtering", + "复制": "Copy", + "行为": "Behavior", + "ip": "IP", + "数据类型 0-字符串 1-富文本 2-文件 ": "Data type 0 - String 1 - Rich text 2 - File", + "键": "Key", + "选择部门": "Select Department", + "请选择部门": "Please Select Department", + "转移到新部门,是否继续?": "Transfer to a new department. Continue?", + "转移成功": "Transfer Successful", + "组织架构": "Organization Structure", + "刷新": "Refresh", + "拖动排序": "Drag to Sort", + "编辑部门": "Edit Department", + "上级部门": "Superior Department", + "排序": "Sort", + "新增部门 “{name}” 成功": "Successfully added new department “{name}”", + "删除成功": "Delete Successful", + "“{name}” 部门的用户已成功转移到 “{parentName}” 部门。": "Users in the “{name}” department have been successfully transferred to the “{parentName}” department.", + "此操作将会删除 “{name}” 部门的所有用户,是否确认?": "This operation will delete all users in the “{name}” department. Are you sure?", + "直接删除": "Delete Directly", + "保留用户": "Keep Users", + "部门架构已发生改变,是否保存?": "The department structure has changed. Do you want to save?", + "更新排序成功": "Successfully updated sorting", + "新增": "Add", + "编辑": "Edit", + "个人中心": "Personal Center", + "正在加载资源...": "Loading resources...", + "初次加载资源可能需要较多时间,请耐心等待": "It may take some time for the initial resource loading. Please wait patiently.", + "搜索名称": "Search Name", + "是否关联上下级": "Whether to associate with superiors and subordinates", + "名称": "Name", + "标识": "Identifier", + "备注": "Remarks", + "功能权限": "Function Permissions", + "数据权限": "Data Permissions", + "创建时间": "Creation Time", + "更新时间": "Update Time", + "数据类型": "Data Type", + "搜索名称、keyName": "Search Name, keyName", + "字符串": "String", + "富文本": "Rich Text", + "文件": "File", + "请输入Key": "Please enter Key", + "类型": "Type", + "数据": "Data" +} \ No newline at end of file diff --git a/src/modules/base/locales/zh-cn.json b/src/modules/base/locales/zh-cn.json index 16d4d84..ac9bfdf 100644 --- a/src/modules/base/locales/zh-cn.json +++ b/src/modules/base/locales/zh-cn.json @@ -1,143 +1,143 @@ { - "个人中心": "个人中心", - "正在加载资源...": "正在加载资源...", - "初次加载资源可能需要较多时间,请耐心等待": "初次加载资源可能需要较多时间,请耐心等待", - "搜索名称": "搜索名称", - "是否关联上下级": "是否关联上下级", - "名称": "名称", - "标识": "标识", - "备注": "备注", - "功能权限": "功能权限", - "数据权限": "数据权限", - "创建时间": "创建时间", - "更新时间": "更新时间", - "数据类型": "数据类型", - "搜索名称、keyName": "搜索名称、keyName", - "字符串": "字符串", - "富文本": "富文本", - "文件": "文件", - "请输入Key": "请输入Key", - "类型": "类型", - "数据": "数据", - "请输入备注": "请输入备注", - "清空": "清空", - "日志保存天数": "日志保存天数", - "搜索请求地址、用户昵称、ip": "搜索请求地址、用户昵称、ip", - "用户ID": "用户ID", - "用户昵称": "用户昵称", - "请求地址": "请求地址", - "参数": "参数", - "请求时间": "请求时间", - "保存成功": "保存成功", - "是否要清空日志?": "是否要清空日志?", - "提示": "提示", - "清空成功": "清空成功", - "基本信息": "基本信息", - "头像": "头像", - "昵称": "昵称", - "请填写昵称": "请填写昵称", - "原密码": "原密码", - "请填写原密码": "请填写原密码", - "新密码": "新密码", - "请填写新密码": "请填写新密码", - "保存修改": "保存修改", - "修改成功": "修改成功", - "拼命加载中": "拼命加载中", - "转移": "转移", - "搜索用户名、姓名": "搜索用户名、姓名", - "用户列表": "用户列表", - "用户名": "用户名", - "姓名": "姓名", - "部门名称": "部门名称", - "角色": "角色", - "状态": "状态", - "手机号码": "手机号码", - "选择头像": "选择头像", - "密码": "密码", - "密码长度在 6 到 16 个字符": "密码长度在 6 到 16 个字符", - "邮箱": "邮箱", - "启用": "启用", - "禁用": "禁用", - "部门转移": "部门转移", - "选择部门": "选择部门", - "请选择部门": "请选择部门", - "转移到新部门,是否继续?": "转移到新部门,是否继续?", - "转移成功": "转移成功", - "组织架构": "组织架构", - "刷新": "刷新", - "拖动排序": "拖动排序", - "编辑部门": "编辑部门", - "上级部门": "上级部门", - "排序": "排序", - "新增部门 “{name}” 成功": "新增部门 “{name}” 成功", - "删除成功": "删除成功", - "“{name}” 部门的用户已成功转移到 “{parentName}” 部门。": "“{name}” 部门的用户已成功转移到 “{parentName}” 部门。", - "此操作将会删除 “{name}” 部门的所有用户,是否确认?": "此操作将会删除 “{name}” 部门的所有用户,是否确认?", - "直接删除": "直接删除", - "保留用户": "保留用户", - "部门架构已发生改变,是否保存?": "部门架构已发生改变,是否保存?", - "更新排序成功": "更新排序成功", - "新增": "新增", - "编辑": "编辑", - "删除": "删除", - "新增成员": "新增成员", - "目录": "目录", - "菜单": "菜单", - "权限": "权限", - "是否显示": "是否显示", - "图标": "图标", - "节点路由": "节点路由", - "路由缓存": "路由缓存", - "文件路径": "文件路径", - "排序号": "排序号", - "节点类型": "节点类型", - "节点名称": "节点名称", - "上级节点": "上级节点", - "请输入节点路由,如:/test": "请输入节点路由,如:/test", - "开启": "开启", - "关闭": "关闭", - "请填写排序号": "请填写排序号", - "导入": "导入", - "如遇到问题无法导入菜单,请检查文件并尝试重新导入。": "如遇到问题无法导入菜单,请检查文件并尝试重新导入。", - "菜单导入": "菜单导入", - "添加": "添加", - "导入成功": "导入成功", - "{file}文件格式错误:{error}": "{file}文件格式错误:{error}", - "导出": "导出", - "选择菜单": "选择菜单", - "请先选择要导出的菜单": "请先选择要导出的菜单", - "菜单数据": "菜单数据", - "退出登录": "退出登录", - "确定退出登录吗?": "确定退出登录吗?", - "搜索关键字": "搜索关键字", - "关闭当前": "关闭当前", - "关闭其他": "关闭其他", - "关闭所有": "关闭所有", - "{label} 没有子菜单,请先添加": "{label} 没有子菜单,请先添加", - "快速开发后台权限管理系统": "快速开发后台权限管理系统", - "请输入用户名": "请输入用户名", - "请输入密码": "请输入密码", - "验证码": "验证码", - "登录": "登录", - "用户名不能为空": "用户名不能为空", - "密码不能为空": "密码不能为空", - "图片验证码不能为空": "图片验证码不能为空", - "验证码获取失败": "验证码获取失败", - "马上回来": "马上回来", - "糟糕,出了点问题": "糟糕,出了点问题", - "找不到您要查找的页面": "找不到您要查找的页面", - "您无权访问此页面": "您无权访问此页面", - "认证失败,请重新登录!": "认证失败,请重新登录!", - "返回首页": "返回首页", - "重新登录": "重新登录", - "返回登录页": "返回登录页", - "自定义输入": "自定义输入", - "请输入": "请输入", - "输入关键字进行过滤": "输入关键字进行过滤", - "复制": "复制", - "行为": "行为", - "ip": "ip", - "数据类型 0-字符串 1-富文本 2-文件 ": "数据类型 0-字符串 1-富文本 2-文件 ", - "键": "键", - "角色标签": "角色标签" -} + "个人中心": "个人中心", + "正在加载资源...": "正在加载资源...", + "初次加载资源可能需要较多时间,请耐心等待": "初次加载资源可能需要较多时间,请耐心等待", + "搜索名称": "搜索名称", + "是否关联上下级": "是否关联上下级", + "名称": "名称", + "标识": "标识", + "备注": "备注", + "功能权限": "功能权限", + "数据权限": "数据权限", + "创建时间": "创建时间", + "更新时间": "更新时间", + "数据类型": "数据类型", + "搜索名称、keyName": "搜索名称、keyName", + "字符串": "字符串", + "富文本": "富文本", + "文件": "文件", + "请输入Key": "请输入Key", + "类型": "类型", + "数据": "数据", + "请输入备注": "请输入备注", + "清空": "清空", + "日志保存天数": "日志保存天数", + "搜索请求地址、用户昵称、ip": "搜索请求地址、用户昵称、ip", + "用户ID": "用户ID", + "用户昵称": "用户昵称", + "请求地址": "请求地址", + "参数": "参数", + "请求时间": "请求时间", + "保存成功": "保存成功", + "是否要清空日志?": "是否要清空日志?", + "提示": "提示", + "清空成功": "清空成功", + "基本信息": "基本信息", + "头像": "头像", + "昵称": "昵称", + "请填写昵称": "请填写昵称", + "原密码": "原密码", + "请填写原密码": "请填写原密码", + "新密码": "新密码", + "请填写新密码": "请填写新密码", + "保存修改": "保存修改", + "修改成功": "修改成功", + "拼命加载中": "拼命加载中", + "转移": "转移", + "搜索用户名、姓名": "搜索用户名、姓名", + "用户列表": "用户列表", + "用户名": "用户名", + "姓名": "姓名", + "部门名称": "部门名称", + "角色": "角色", + "状态": "状态", + "手机号码": "手机号码", + "选择头像": "选择头像", + "密码": "密码", + "密码长度在 6 到 16 个字符": "密码长度在 6 到 16 个字符", + "邮箱": "邮箱", + "启用": "启用", + "禁用": "禁用", + "部门转移": "部门转移", + "选择部门": "选择部门", + "请选择部门": "请选择部门", + "转移到新部门,是否继续?": "转移到新部门,是否继续?", + "转移成功": "转移成功", + "组织架构": "组织架构", + "刷新": "刷新", + "拖动排序": "拖动排序", + "编辑部门": "编辑部门", + "上级部门": "上级部门", + "排序": "排序", + "新增部门 “{name}” 成功": "新增部门 “{name}” 成功", + "删除成功": "删除成功", + "“{name}” 部门的用户已成功转移到 “{parentName}” 部门。": "“{name}” 部门的用户已成功转移到 “{parentName}” 部门。", + "此操作将会删除 “{name}” 部门的所有用户,是否确认?": "此操作将会删除 “{name}” 部门的所有用户,是否确认?", + "直接删除": "直接删除", + "保留用户": "保留用户", + "部门架构已发生改变,是否保存?": "部门架构已发生改变,是否保存?", + "更新排序成功": "更新排序成功", + "新增": "新增", + "编辑": "编辑", + "删除": "删除", + "新增成员": "新增成员", + "目录": "目录", + "菜单": "菜单", + "权限": "权限", + "是否显示": "是否显示", + "图标": "图标", + "节点路由": "节点路由", + "路由缓存": "路由缓存", + "文件路径": "文件路径", + "排序号": "排序号", + "节点类型": "节点类型", + "节点名称": "节点名称", + "上级节点": "上级节点", + "请输入节点路由,如:/test": "请输入节点路由,如:/test", + "开启": "开启", + "关闭": "关闭", + "请填写排序号": "请填写排序号", + "导入": "导入", + "如遇到问题无法导入菜单,请检查文件并尝试重新导入。": "如遇到问题无法导入菜单,请检查文件并尝试重新导入。", + "菜单导入": "菜单导入", + "添加": "添加", + "导入成功": "导入成功", + "{file}文件格式错误:{error}": "{file}文件格式错误:{error}", + "导出": "导出", + "选择菜单": "选择菜单", + "请先选择要导出的菜单": "请先选择要导出的菜单", + "菜单数据": "菜单数据", + "退出登录": "退出登录", + "确定退出登录吗?": "确定退出登录吗?", + "搜索关键字": "搜索关键字", + "关闭当前": "关闭当前", + "关闭其他": "关闭其他", + "关闭所有": "关闭所有", + "{label} 没有子菜单,请先添加": "{label} 没有子菜单,请先添加", + "快速开发后台权限管理系统": "快速开发后台权限管理系统", + "请输入用户名": "请输入用户名", + "请输入密码": "请输入密码", + "验证码": "验证码", + "登录": "登录", + "用户名不能为空": "用户名不能为空", + "密码不能为空": "密码不能为空", + "图片验证码不能为空": "图片验证码不能为空", + "验证码获取失败": "验证码获取失败", + "马上回来": "马上回来", + "糟糕,出了点问题": "糟糕,出了点问题", + "找不到您要查找的页面": "找不到您要查找的页面", + "您无权访问此页面": "您无权访问此页面", + "认证失败,请重新登录!": "认证失败,请重新登录!", + "返回首页": "返回首页", + "重新登录": "重新登录", + "返回登录页": "返回登录页", + "自定义输入": "自定义输入", + "请输入": "请输入", + "输入关键字进行过滤": "输入关键字进行过滤", + "复制": "复制", + "行为": "行为", + "ip": "ip", + "数据类型 0-字符串 1-富文本 2-文件 ": "数据类型 0-字符串 1-富文本 2-文件 ", + "键": "键", + "角色标签": "角色标签" +} \ No newline at end of file diff --git a/src/modules/base/locales/zh-tw.json b/src/modules/base/locales/zh-tw.json index 685f4de..867fe59 100644 --- a/src/modules/base/locales/zh-tw.json +++ b/src/modules/base/locales/zh-tw.json @@ -1,143 +1,143 @@ { - "个人中心": "個人中心", - "正在加载资源...": "正在加載資源...", - "初次加载资源可能需要较多时间,请耐心等待": "初次加載資源可能需要較多時間,請耐心等待", - "搜索名称": "搜索名稱", - "是否关联上下级": "是否關聯上下級", - "名称": "名稱", - "标识": "標識", - "备注": "備註", - "功能权限": "功能權限", - "数据权限": "數據權限", - "创建时间": "創建時間", - "更新时间": "更新時間", - "数据类型": "數據類型", - "搜索名称、keyName": "搜索名稱、keyName", - "字符串": "字串", - "富文本": "富文本", - "文件": "文件", - "请输入Key": "請輸入Key", - "类型": "類型", - "数据": "數據", - "用户名不能为空": "用戶名不得為空", - "密码不能为空": "密碼不得為空", - "图片验证码不能为空": "圖片驗證碼不得為空", - "验证码获取失败": "驗證碼獲取失敗", - "马上回来": "馬上回來", - "糟糕,出了点问题": "糟糕,出了點問題", - "找不到您要查找的页面": "找不到您要查找的頁面", - "您无权访问此页面": "您無權訪問此頁面", - "认证失败,请重新登录!": "認證失敗,請重新登錄!", - "返回首页": "返回首頁", - "重新登录": "重新登錄", - "返回登录页": "返回登錄頁", - "自定义输入": "自定義輸入", - "请输入": "請輸入", - "输入关键字进行过滤": "輸入關鍵字進行過濾", - "复制": "複製", - "行为": "行為", - "ip": "IP", - "数据类型 0-字符串 1-富文本 2-文件 ": "數據類型 0-字串 1-富文本 2-文件 ", - "键": "鍵", - "请输入备注": "請輸入備註", - "清空": "清空", - "日志保存天数": "日誌保存天數", - "搜索请求地址、用户昵称、ip": "搜索請求地址、用戶暱稱、ip", - "用户ID": "用戶ID", - "用户昵称": "用戶暱稱", - "请求地址": "請求地址", - "参数": "參數", - "请求时间": "請求時間", - "保存成功": "保存成功", - "是否要清空日志?": "是否要清空日誌?", - "提示": "提示", - "清空成功": "清空成功", - "基本信息": "基本信息", - "头像": "頭像", - "昵称": "暱稱", - "请填写昵称": "請填寫暱稱", - "原密码": "原密碼", - "请填写原密码": "請填寫原密碼", - "新密码": "新密碼", - "选择部门": "選擇部門", - "请选择部门": "請選擇部門", - "转移到新部门,是否继续?": "轉移到新部門,是否繼續?", - "转移成功": "轉移成功", - "组织架构": "組織架構", - "刷新": "刷新", - "拖动排序": "拖動排序", - "编辑部门": "編輯部門", - "上级部门": "上級部門", - "排序": "排序", - "新增部门 “{name}” 成功": "新增部門 “{name}” 成功", - "删除成功": "刪除成功", - "“{name}” 部门的用户已成功转移到 “{parentName}” 部门。": "“{name}” 部門的用戶已成功轉移到 “{parentName}” 部門。", - "此操作将会删除 “{name}” 部门的所有用户,是否确认?": "此操作將會刪除 “{name}” 部門的所有用戶,是否確認?", - "直接删除": "直接刪除", - "保留用户": "保留用戶", - "部门架构已发生改变,是否保存?": "部門架構已發生改變,是否保存?", - "更新排序成功": "更新排序成功", - "新增": "新增", - "编辑": "編輯", - "角色标签": "角色標籤", - "删除": "刪除", - "新增成员": "新增成員", - "目录": "目錄", - "菜单": "菜單", - "权限": "權限", - "是否显示": "是否顯示", - "图标": "圖標", - "节点路由": "節點路由", - "路由缓存": "路由緩存", - "文件路径": "文件路徑", - "排序号": "排序號", - "节点类型": "節點類型", - "节点名称": "節點名稱", - "上级节点": "上級節點", - "请输入节点路由,如:/test": "請輸入節點路由,如:/test", - "开启": "開啟", - "关闭": "關閉", - "请填写排序号": "請填寫排序號", - "导入": "導入", - "如遇到问题无法导入菜单,请检查文件并尝试重新导入。": "如遇到問題無法導入菜單,請檢查文件並嘗試重新導入。", - "请填写新密码": "請填寫新密碼", - "保存修改": "保存修改", - "修改成功": "修改成功", - "拼命加载中": "拼命加載中", - "转移": "轉移", - "搜索用户名、姓名": "搜索用戶名、姓名", - "用户列表": "用戶列表", - "用户名": "用戶名", - "姓名": "姓名", - "部门名称": "部門名稱", - "角色": "角色", - "状态": "狀態", - "手机号码": "手機號碼", - "选择头像": "選擇頭像", - "密码": "密碼", - "密码长度在 6 到 16 个字符": "密碼長度在6到16個字符", - "邮箱": "郵箱", - "启用": "啟用", - "禁用": "禁用", - "部门转移": "部門轉移", - "菜单导入": "菜單導入", - "添加": "添加", - "导入成功": "導入成功", - "{file}文件格式错误:{error}": "{file}文件格式錯誤:{error}", - "导出": "導出", - "选择菜单": "選擇菜單", - "请先选择要导出的菜单": "請先選擇要導出的菜單", - "菜单数据": "菜單數據", - "退出登录": "退出登錄", - "确定退出登录吗?": "確定退出登錄嗎?", - "搜索关键字": "搜索關鍵字", - "关闭当前": "關閉當前", - "关闭其他": "關閉其他", - "关闭所有": "關閉所有", - "{label} 没有子菜单,请先添加": "{label} 沒有子菜單,請先添加", - "快速开发后台权限管理系统": "快速開發後台權限管理系統", - "请输入用户名": "請輸入用戶名", - "请输入密码": "請輸入密碼", - "验证码": "驗證碼", - "登录": "登錄" -} + "请填写新密码": "請填寫新密碼", + "保存修改": "保存修改", + "修改成功": "修改成功", + "拼命加载中": "拼命加載中", + "转移": "轉移", + "搜索用户名、姓名": "搜索用戶名、姓名", + "用户列表": "用戶列表", + "用户名": "用戶名", + "姓名": "姓名", + "部门名称": "部門名稱", + "角色": "角色", + "状态": "狀態", + "手机号码": "手機號碼", + "选择头像": "選擇頭像", + "密码": "密碼", + "密码长度在 6 到 16 个字符": "密碼長度在6到16個字符", + "邮箱": "郵箱", + "启用": "啟用", + "禁用": "禁用", + "部门转移": "部門轉移", + "请输入备注": "請輸入備註", + "清空": "清空", + "日志保存天数": "日誌保存天數", + "搜索请求地址、用户昵称、ip": "搜索請求地址、用戶暱稱、ip", + "用户ID": "用戶ID", + "用户昵称": "用戶暱稱", + "请求地址": "請求地址", + "参数": "參數", + "请求时间": "請求時間", + "保存成功": "保存成功", + "是否要清空日志?": "是否要清空日誌?", + "提示": "提示", + "清空成功": "清空成功", + "基本信息": "基本信息", + "头像": "頭像", + "昵称": "暱稱", + "请填写昵称": "請填寫暱稱", + "原密码": "原密碼", + "请填写原密码": "請填寫原密碼", + "新密码": "新密碼", + "角色标签": "角色標籤", + "个人中心": "個人中心", + "正在加载资源...": "正在加載資源...", + "初次加载资源可能需要较多时间,请耐心等待": "初次加載資源可能需要較多時間,請耐心等待", + "搜索名称": "搜索名稱", + "是否关联上下级": "是否關聯上下級", + "名称": "名稱", + "标识": "標識", + "备注": "備註", + "功能权限": "功能權限", + "数据权限": "數據權限", + "创建时间": "創建時間", + "更新时间": "更新時間", + "数据类型": "數據類型", + "搜索名称、keyName": "搜索名稱、keyName", + "字符串": "字串", + "富文本": "富文本", + "文件": "文件", + "请输入Key": "請輸入Key", + "类型": "類型", + "数据": "數據", + "删除": "刪除", + "新增成员": "新增成員", + "目录": "目錄", + "菜单": "菜單", + "权限": "權限", + "是否显示": "是否顯示", + "图标": "圖標", + "节点路由": "節點路由", + "路由缓存": "路由緩存", + "文件路径": "文件路徑", + "排序号": "排序號", + "节点类型": "節點類型", + "节点名称": "節點名稱", + "上级节点": "上級節點", + "请输入节点路由,如:/test": "請輸入節點路由,如:/test", + "开启": "開啟", + "关闭": "關閉", + "请填写排序号": "請填寫排序號", + "导入": "導入", + "如遇到问题无法导入菜单,请检查文件并尝试重新导入。": "如遇到問題無法導入菜單,請檢查文件並嘗試重新導入。", + "用户名不能为空": "用戶名不得為空", + "密码不能为空": "密碼不得為空", + "图片验证码不能为空": "圖片驗證碼不得為空", + "验证码获取失败": "驗證碼獲取失敗", + "马上回来": "馬上回來", + "糟糕,出了点问题": "糟糕,出了點問題", + "找不到您要查找的页面": "找不到您要查找的頁面", + "您无权访问此页面": "您無權訪問此頁面", + "认证失败,请重新登录!": "認證失敗,請重新登錄!", + "返回首页": "返回首頁", + "重新登录": "重新登錄", + "返回登录页": "返回登錄頁", + "自定义输入": "自定義輸入", + "请输入": "請輸入", + "输入关键字进行过滤": "輸入關鍵字進行過濾", + "复制": "複製", + "行为": "行為", + "ip": "IP", + "数据类型 0-字符串 1-富文本 2-文件 ": "數據類型 0-字串 1-富文本 2-文件 ", + "键": "鍵", + "菜单导入": "菜單導入", + "添加": "添加", + "导入成功": "導入成功", + "{file}文件格式错误:{error}": "{file}文件格式錯誤:{error}", + "导出": "導出", + "选择菜单": "選擇菜單", + "请先选择要导出的菜单": "請先選擇要導出的菜單", + "菜单数据": "菜單數據", + "退出登录": "退出登錄", + "确定退出登录吗?": "確定退出登錄嗎?", + "搜索关键字": "搜索關鍵字", + "关闭当前": "關閉當前", + "关闭其他": "關閉其他", + "关闭所有": "關閉所有", + "{label} 没有子菜单,请先添加": "{label} 沒有子菜單,請先添加", + "快速开发后台权限管理系统": "快速開發後台權限管理系統", + "请输入用户名": "請輸入用戶名", + "请输入密码": "請輸入密碼", + "验证码": "驗證碼", + "登录": "登錄", + "选择部门": "選擇部門", + "请选择部门": "請選擇部門", + "转移到新部门,是否继续?": "轉移到新部門,是否繼續?", + "转移成功": "轉移成功", + "组织架构": "組織架構", + "刷新": "刷新", + "拖动排序": "拖動排序", + "编辑部门": "編輯部門", + "上级部门": "上級部門", + "排序": "排序", + "新增部门 “{name}” 成功": "新增部門 “{name}” 成功", + "删除成功": "刪除成功", + "“{name}” 部门的用户已成功转移到 “{parentName}” 部门。": "“{name}” 部門的用戶已成功轉移到 “{parentName}” 部門。", + "此操作将会删除 “{name}” 部门的所有用户,是否确认?": "此操作將會刪除 “{name}” 部門的所有用戶,是否確認?", + "直接删除": "直接刪除", + "保留用户": "保留用戶", + "部门架构已发生改变,是否保存?": "部門架構已發生改變,是否保存?", + "更新排序成功": "更新排序成功", + "新增": "新增", + "编辑": "編輯" +} \ No newline at end of file diff --git a/src/modules/base/pages/main/components/global.vue b/src/modules/base/pages/main/components/global.vue index 2ea46a0..7134814 100644 --- a/src/modules/base/pages/main/components/global.vue +++ b/src/modules/base/pages/main/components/global.vue @@ -3,22 +3,22 @@ diff --git a/src/modules/demo/locales/en.json b/src/modules/demo/locales/en.json index a85a4ac..20572fb 100644 --- a/src/modules/demo/locales/en.json +++ b/src/modules/demo/locales/en.json @@ -1,54 +1,54 @@ { - "浏览量": "Views", - "访客数": "Visitors", - "总用户数": "Total Users", - "日增用户数": "Daily New Users", - "付款笔数": "Payment Transactions", - "转化率": "Conversion Rate", - "总销售额": "Total Sales", - "周同比": "Week-on-Week", - "日同比": "Day-on-Day", - "类别占比": "Category Share", - "启用": "Enabled", - "描述": "Description", - "未知": "Unknown", - "男": "Male", - "女": "Female", - "禁用": "Disabled", - "正常": "Normal", - "已注销": "Canceled", - "小程序": "Mini Program", - "公众号": "Official Account", - "H5": "H5", - "登录唯一ID": "Login Unique ID", - "头像": "Avatar", - "昵称": "Nickname", - "手机号": "Mobile Phone Number", - "性别": "Gender", - "状态": "Status", - "登录方式": "Login Method", - "来源": "Source", - "密码": "Password", - "介绍": "Introduction", - "余额": "Balance", - "标题": "Title", - "ID": "ID", - "创建时间": "Creation Time", - "更新时间": "Update Time", - "搜索手机号、昵称": "Search Mobile Number, Nickname", - "{year}年": "{year}", - "销售金额": "Sales Amount", - "销售订单": "Sales Order", - "{i}月": "{i} Month", - "热门商品排行": "Popular Product Ranking", - "今日": "Today", - "本周": "This Week", - "本月": "This Month", - "全年": "Full Year", - "排名": "Ranking", - "商品名称": "Product Name", - "商品金额": "Product Amount", - "下单次数": "Order Quantity", - "日涨幅": "Daily Increase", - "上架时间": "上架时间" -} + "浏览量": "Views", + "访客数": "Visitors", + "总用户数": "Total Users", + "日增用户数": "Daily New Users", + "付款笔数": "Payment Transactions", + "转化率": "Conversion Rate", + "总销售额": "Total Sales", + "周同比": "Week-on-Week", + "日同比": "Day-on-Day", + "类别占比": "Category Share", + "启用": "Enabled", + "描述": "Description", + "未知": "Unknown", + "男": "Male", + "女": "Female", + "禁用": "Disabled", + "正常": "Normal", + "已注销": "Canceled", + "小程序": "Mini Program", + "公众号": "Official Account", + "H5": "H5", + "登录唯一ID": "Login Unique ID", + "头像": "Avatar", + "昵称": "Nickname", + "手机号": "Mobile Phone Number", + "性别": "Gender", + "状态": "Status", + "登录方式": "Login Method", + "来源": "Source", + "密码": "Password", + "介绍": "Introduction", + "余额": "Balance", + "标题": "Title", + "ID": "ID", + "创建时间": "Create Time", + "更新时间": "Update Time", + "搜索手机号、昵称": "Search Mobile Number, Nickname", + "{year}年": "{year} Year", + "销售金额": "Sales Amount", + "销售订单": "Sales Order", + "{i}月": "{i} Month", + "热门商品排行": "Popular Product Ranking", + "今日": "Today", + "本周": "This Week", + "本月": "This Month", + "全年": "Full Year", + "排名": "Ranking", + "商品名称": "Product Name", + "商品金额": "Product Amount", + "下单次数": "Order Placed Times", + "日涨幅": "Daily Increase", + "上架时间": "Listing Time" +} \ No newline at end of file diff --git a/src/modules/demo/locales/zh-cn.json b/src/modules/demo/locales/zh-cn.json index e9afa05..8182c78 100644 --- a/src/modules/demo/locales/zh-cn.json +++ b/src/modules/demo/locales/zh-cn.json @@ -1,54 +1,54 @@ { - "未知": "未知", - "男": "男", - "女": "女", - "禁用": "禁用", - "正常": "正常", - "已注销": "已注销", - "小程序": "小程序", - "公众号": "公众号", - "H5": "H5", - "登录唯一ID": "登录唯一ID", - "头像": "头像", - "昵称": "昵称", - "手机号": "手机号", - "性别": "性别", - "状态": "状态", - "登录方式": "登录方式", - "来源": "来源", - "密码": "密码", - "介绍": "介绍", - "余额": "余额", - "标题": "标题", - "ID": "ID", - "创建时间": "创建时间", - "更新时间": "更新时间", - "搜索手机号、昵称": "搜索手机号、昵称", - "{year}年": "{year}年", - "销售金额": "销售金额", - "销售订单": "销售订单", - "{i}月": "{i}月", - "热门商品排行": "热门商品排行", - "今日": "今日", - "本周": "本周", - "本月": "本月", - "全年": "全年", - "排名": "排名", - "商品名称": "商品名称", - "商品金额": "商品金额", - "下单次数": "下单次数", - "日涨幅": "日涨幅", - "上架时间": "上架时间", - "浏览量": "浏览量", - "访客数": "访客数", - "总用户数": "总用户数", - "日增用户数": "日增用户数", - "付款笔数": "付款笔数", - "转化率": "转化率", - "总销售额": "总销售额", - "周同比": "周同比", - "日同比": "日同比", - "类别占比": "类别占比", - "启用": "启用", - "描述": "描述" -} + "未知": "未知", + "男": "男", + "女": "女", + "禁用": "禁用", + "正常": "正常", + "已注销": "已注销", + "小程序": "小程序", + "公众号": "公众号", + "H5": "H5", + "登录唯一ID": "登录唯一ID", + "头像": "头像", + "昵称": "昵称", + "手机号": "手机号", + "性别": "性别", + "状态": "状态", + "登录方式": "登录方式", + "来源": "来源", + "密码": "密码", + "介绍": "介绍", + "余额": "余额", + "标题": "标题", + "ID": "ID", + "创建时间": "创建时间", + "更新时间": "更新时间", + "搜索手机号、昵称": "搜索手机号、昵称", + "{year}年": "{year}年", + "销售金额": "销售金额", + "销售订单": "销售订单", + "{i}月": "{i}月", + "热门商品排行": "热门商品排行", + "今日": "今日", + "本周": "本周", + "本月": "本月", + "全年": "全年", + "排名": "排名", + "商品名称": "商品名称", + "商品金额": "商品金额", + "下单次数": "下单次数", + "日涨幅": "日涨幅", + "上架时间": "上架时间", + "浏览量": "浏览量", + "访客数": "访客数", + "总用户数": "总用户数", + "日增用户数": "日增用户数", + "付款笔数": "付款笔数", + "转化率": "转化率", + "总销售额": "总销售额", + "周同比": "周同比", + "日同比": "日同比", + "类别占比": "类别占比", + "启用": "启用", + "描述": "描述" +} \ No newline at end of file diff --git a/src/modules/demo/locales/zh-tw.json b/src/modules/demo/locales/zh-tw.json index 349fbc5..74117a5 100644 --- a/src/modules/demo/locales/zh-tw.json +++ b/src/modules/demo/locales/zh-tw.json @@ -1,54 +1,54 @@ { - "浏览量": "瀏覽量", - "访客数": "訪客數", - "总用户数": "總用戶數", - "日增用户数": "日增用戶數", - "付款笔数": "付款筆數", - "转化率": "轉化率", - "总销售额": "總銷售額", - "周同比": "周同比", - "日同比": "日同比", - "类别占比": "類別占比", - "启用": "啟用", - "描述": "描述", - "标题": "標題", - "ID": "ID", - "创建时间": "創建時間", - "更新时间": "更新時間", - "搜索手机号、昵称": "搜索手機號、暱稱", - "{year}年": "{year}年", - "销售金额": "銷售金額", - "销售订单": "銷售訂單", - "{i}月": "{i}月", - "热门商品排行": "熱門商品排行", - "今日": "今日", - "本周": "本周", - "本月": "本月", - "全年": "全年", - "排名": "排名", - "商品名称": "商品名稱", - "商品金额": "商品金額", - "下单次数": "下單次數", - "日涨幅": "日漲幅", - "上架时间": "上架時間", - "未知": "未知", - "男": "男", - "女": "女", - "禁用": "禁用", - "正常": "正常", - "已注销": "已註銷", - "小程序": "小程序", - "公众号": "公眾號", - "H5": "H5", - "登录唯一ID": "登錄唯一ID", - "头像": "頭像", - "昵称": "昵稱", - "手机号": "手機號", - "性别": "性別", - "状态": "狀態", - "登录方式": "登錄方式", - "来源": "來源", - "密码": "密碼", - "介绍": "介紹", - "余额": "餘額" -} + "浏览量": "瀏覽量", + "访客数": "訪客數", + "总用户数": "總用戶數", + "日增用户数": "日增用戶數", + "付款笔数": "付款筆數", + "转化率": "轉化率", + "总销售额": "總銷售額", + "周同比": "周同比", + "日同比": "日同比", + "类别占比": "類別占比", + "启用": "啟用", + "描述": "描述", + "未知": "未知", + "男": "男", + "女": "女", + "禁用": "禁用", + "正常": "正常", + "已注销": "已註銷", + "小程序": "小程序", + "公众号": "公眾號", + "H5": "H5", + "登录唯一ID": "登錄唯一ID", + "头像": "頭像", + "昵称": "暱稱", + "手机号": "手機號", + "性别": "性別", + "状态": "狀態", + "登录方式": "登錄方式", + "来源": "來源", + "密码": "密碼", + "介绍": "介紹", + "余额": "餘額", + "标题": "標題", + "ID": "ID", + "创建时间": "創建時間", + "更新时间": "更新時間", + "搜索手机号、昵称": "搜索手機號、暱稱", + "{year}年": "{year}年", + "销售金额": "銷售金額", + "销售订单": "銷售訂單", + "{i}月": "{i}月", + "热门商品排行": "熱門商品排行", + "今日": "今日", + "本周": "本周", + "本月": "本月", + "全年": "全年", + "排名": "排名", + "商品名称": "商品名稱", + "商品金额": "商品金額", + "下单次数": "下單次數", + "日涨幅": "日漲幅", + "上架时间": "上架時間" +} \ No newline at end of file diff --git a/src/modules/dict/locales/en.json b/src/modules/dict/locales/en.json index 48134a2..60e2043 100644 --- a/src/modules/dict/locales/en.json +++ b/src/modules/dict/locales/en.json @@ -1,16 +1,16 @@ { - "搜索名称": "Search Name", - "新增": "New", - "请填写值": "Please fill in the value", - "使用文件": "Use File", - "类型": "Type", - "字典列表": "Dictionary List", - "名称": "Name", - "上级节点": "Parent Node", - "值": "Value", - "排序": "Sort", - "备注": "Remarks", - "ID": "ID", - "创建时间": "Creation Time", - "更新时间": "Update Time" -} + "搜索名称": "Search Name", + "请填写值": "Please fill in the value", + "使用文件": "Use File", + "类型": "Type", + "字典列表": "Dictionary List", + "名称": "Name", + "上级节点": "Parent Node", + "值": "Value", + "排序": "Sort", + "备注": "Remarks", + "新增": "Add", + "ID": "ID", + "创建时间": "Create Time", + "更新时间": "Update Time" +} \ No newline at end of file diff --git a/src/modules/dict/locales/zh-cn.json b/src/modules/dict/locales/zh-cn.json index 0e0118e..196194c 100644 --- a/src/modules/dict/locales/zh-cn.json +++ b/src/modules/dict/locales/zh-cn.json @@ -1,16 +1,16 @@ { - "搜索名称": "搜索名称", - "新增": "新增", - "请填写值": "请填写值", - "使用文件": "使用文件", - "类型": "类型", - "字典列表": "字典列表", - "名称": "名称", - "上级节点": "上级节点", - "值": "值", - "排序": "排序", - "备注": "备注", - "ID": "ID", - "创建时间": "创建时间", - "更新时间": "更新时间" -} + "搜索名称": "搜索名称", + "请填写值": "请填写值", + "使用文件": "使用文件", + "类型": "类型", + "字典列表": "字典列表", + "名称": "名称", + "上级节点": "上级节点", + "值": "值", + "排序": "排序", + "备注": "备注", + "新增": "新增", + "ID": "ID", + "创建时间": "创建时间", + "更新时间": "更新时间" +} \ No newline at end of file diff --git a/src/modules/dict/locales/zh-tw.json b/src/modules/dict/locales/zh-tw.json index 574ed56..f91fb7a 100644 --- a/src/modules/dict/locales/zh-tw.json +++ b/src/modules/dict/locales/zh-tw.json @@ -1,16 +1,16 @@ { - "搜索名称": "搜尋名稱", - "新增": "新增", - "请填写值": "請填寫值", - "使用文件": "使用文件", - "类型": "類型", - "字典列表": "字典列表", - "名称": "名稱", - "上级节点": "上級節點", - "值": "值", - "排序": "排序", - "备注": "備註", - "ID": "ID", - "创建时间": "創建時間", - "更新时间": "更新時間" -} + "搜索名称": "搜尋名稱", + "请填写值": "請填寫值", + "使用文件": "使用文件", + "类型": "類型", + "字典列表": "字典列表", + "名称": "名稱", + "上级节点": "上級節點", + "值": "值", + "排序": "排序", + "备注": "備註", + "新增": "新增", + "ID": "ID", + "创建时间": "創建時間", + "更新时间": "更新時間" +} \ No newline at end of file diff --git a/src/modules/dict/views/list.vue b/src/modules/dict/views/list.vue index 6a6f1dc..28fb789 100644 --- a/src/modules/dict/views/list.vue +++ b/src/modules/dict/views/list.vue @@ -18,18 +18,7 @@ - - - + @@ -39,22 +28,21 @@ @@ -70,9 +58,6 @@ defineOptions({ import { useCrud, useTable, useUpsert } from '@cool-vue/crud'; import { useCool } from '/@/cool'; -import { computed } from 'vue'; -import { deepTree } from '/@/cool/utils'; -import { cloneDeep } from 'lodash-es'; import { useDict } from '../index'; import { useViewGroup } from '/@/plugins/view'; import { useI18n } from 'vue-i18n'; @@ -89,7 +74,9 @@ const { ViewGroup } = useViewGroup({ onSelect(item) { refresh({ typeId: item.id, - page: 1 + page: 1, + prop: 'orderNum', + order: 'desc' }); }, onEdit() { @@ -139,41 +126,14 @@ const Upsert = useUpsert({ label: t('上级节点'), prop: 'parentId', component: { - name: 'el-tree-select', + name: 'cl-select', props: { - data: computed(() => { - const data = cloneDeep(Table.value?.data); - - function deep(d: any, f: boolean) { - if (d.id && d.id == Upsert.value?.getForm('id')) { - f = true; - } - - if (f) { - d.disabled = true; - } - - if (d.children) { - d.children.forEach((e: any) => { - deep(e, f); - }); - } - } - - deep({ children: data }, false); - - return data; - }), - props: { - label: 'name', - value: 'id', - children: 'children', - disabled: 'disabled' - }, - clearable: true, - filterable: true, - 'default-expand-all': true, - 'check-strictly': true + labelKey: 'name', + valueKey: 'id', + checkStrictly: true, + tree: true, + current: true, + defaultExpandAll: true } } }, @@ -271,29 +231,37 @@ const Table = useTable({ { type: 'op', width: 250, - buttons: ['slot-btn', 'edit', 'delete'] + buttons: [ + { + label: t('新增'), + type: 'success', + hidden: !service.dict.info._permission.add, + onClick({ scope }) { + append(scope.row); + } + }, + 'edit', + 'delete' + ] } + ], + plugins: [ + Plugins.Table.toTree({ + async onRefresh(params) { + return service.dict.info.list(params).then(res => { + // 刷新字典 + dict.refresh([ViewGroup.value?.selected?.key]); + + return res; + }); + } + }) ] }); // cl-crud const Crud = useCrud({ - service: service.dict.info, - onRefresh(params, { render }) { - service.dict.info - .list({ - ...params, - page: undefined, - size: undefined - }) - .then(res => { - // 渲染数据 - render(deepTree(res, params.sort)); - - // 刷新字典 - dict.refresh([ViewGroup.value?.selected?.key]); - }); - } + service: service.dict.info }); // 刷新 @@ -301,13 +269,6 @@ function refresh(params?: any) { Crud.value?.refresh(params); } -// 行点击展开 -function onRowClick(row: any, column: any) { - if (column?.property && row.children) { - Table.value?.toggleRowExpansion(row); - } -} - // 追加子集 function append(row: any) { Crud.value?.rowAppend({ @@ -321,11 +282,3 @@ function onFileConfirm(selection: any[]) { Upsert.value?.setForm('value', selection[0]?.url); } - - diff --git a/src/modules/helper/components/ai-code/btn.vue b/src/modules/helper/components/ai-code/btn.vue index 521776c..cdf5bde 100644 --- a/src/modules/helper/components/ai-code/btn.vue +++ b/src/modules/helper/components/ai-code/btn.vue @@ -1,32 +1,77 @@ diff --git a/src/modules/helper/locales/en.json b/src/modules/helper/locales/en.json index d96af61..fe8da7c 100644 --- a/src/modules/helper/locales/en.json +++ b/src/modules/helper/locales/en.json @@ -1,57 +1,64 @@ { - "请选择数据结构": "Please select data structure", - "数据结构": "Data structure", - "上级节点": "Parent node", - "请选择上级节点": "Please select parent node", - "菜单名称": "Menu name", - "请输入菜单名称": "Please enter menu name", - "菜单路由": "Menu route", - "请输入菜单路由,如:/test": "Please enter menu route, e.g.: /test", - "必须以 / 开头": "Must start with /", - "菜单排序": "Menu sorting", - "请填写菜单排序": "Please fill in menu sorting", - "菜单图标": "Menu icon", - "请选择图标": "Please select icon", - "路由缓存": "Route cache", - "开始创建": "Start creating", - "搜索插件名称": "Search Plugin Name", - "后端": "Backend", - "未知": "Unknown", - "暂无描述": "No description yet", - "示例": "Example", - "预览": "Preview", - "文档": "Documentation", - "图片预览": "Image Preview", - "说明文档": "Instruction Document", - "作者": "Author", - "更新时间": "Update Time", - "格式化": "Format", - "插入文件链接": "Insert File Link", - "已安装": "Installed", - "全部插件": "All Plugins", - "插件开发": "Plugin Development", - "提示": "Tip", - "继续": "Continue", - "插件安装成功": "Plugin installed successfully", - "确定要卸载插件【{name}】吗?": "Are you sure you want to uninstall the plugin [{name}]?", - "卸载成功": "Uninstall success", - "启用成功": "Enable success", - "禁用成功": "Disable success", - "参数格式错误": "Parameter format error", - "设置": "Settings", - "参数": "Parameter", - "修改成功": "Modify success", - "检测到插件,是否安装": "Plugin detected. Install?", - "安装": "Install", - "自动添加": "Auto add", - "权限名称": "Permission name", - "实体数据": "Entity data", - "自动添加权限": "Auto add permission", - "一键添加": "Add in one click", - "权限列表": "Permission list", - "请选择实体数据": "Please select entity data", - "请填写权限名称": "Please fill in the permission name", - "请至少选择一个权限": "Please select at least one permission", - "添加权限成功": "Add permission success", - "快速创建": "Quick create" -} + "搜索插件名称": "Search Plugin Name", + "后端": "Backend", + "未知": "Unknown", + "暂无描述": "No description yet", + "示例": "Example", + "预览": "Preview", + "文档": "Documentation", + "图片预览": "Image Preview", + "说明文档": "Instruction Document", + "作者": "Author", + "更新时间": "Update Time", + "格式化": "Format", + "插入文件链接": "Insert File Link", + "已安装": "Installed", + "全部插件": "All Plugins", + "插件开发": "Plugin Development", + "插件安装成功": "Plugin Installed Successfully", + "提示": "Tip", + "继续": "Continue", + "确定要卸载插件【{name}】吗?": "Are you sure you want to uninstall the plugin [{name}]?", + "卸载成功": "Uninstall success", + "启用成功": "Enable success", + "禁用成功": "Disable success", + "参数格式错误": "Parameter format error", + "设置": "Settings", + "参数": "Parameter", + "修改成功": "Modify success", + "检测到插件,是否安装": "Plugin detected. Install?", + "安装": "Install", + "确定要退出编码吗?": "Are you sure you want to exit encoding?", + "创建目录:{name}": "Create directory: {name}", + "创建菜单:{name}": "Create menu: {name}", + "创建 Node 文件": "Create Node file", + "正在重启服务": "Restarting service", + "创建 Vue 文件": "Create Vue file", + "自动添加": "Auto add", + "权限名称": "Permission name", + "实体数据": "Entity data", + "自动添加权限": "Auto add permission", + "一键添加": "Add in one click", + "权限列表": "Permission List", + "请选择实体数据": "Please Select Entity Data", + "请填写权限名称": "Please Fill in Permission Name", + "请至少选择一个权限": "Please Select at Least One Permission", + "添加权限成功": "Permission Added Successfully", + "快速创建": "Quick Create", + "请选择数据结构": "Please Select Data Structure", + "数据结构": "Data Structure", + "上级节点": "Parent Node", + "请选择上级节点": "Please Select Parent Node", + "菜单名称": "Menu Name", + "请输入菜单名称": "Please Enter Menu Name", + "菜单路由": "Menu Route", + "请输入菜单路由,如:/test": "Please Enter Menu Route, e.g.: /test", + "必须以 / 开头": "Must Start with /", + "菜单排序": "Menu Sort", + "请填写菜单排序": "Please Fill in Menu Sort", + "菜单图标": "Menu Icon", + "请选择图标": "Please Select Icon", + "路由缓存": "Route Cache", + "开始创建": "Start Creation", + "极速编码": "Fast Encoding" +} \ No newline at end of file diff --git a/src/modules/helper/locales/zh-cn.json b/src/modules/helper/locales/zh-cn.json index 324d73c..84310e8 100644 --- a/src/modules/helper/locales/zh-cn.json +++ b/src/modules/helper/locales/zh-cn.json @@ -1,57 +1,64 @@ { - "搜索插件名称": "搜索插件名称", - "后端": "后端", - "未知": "未知", - "暂无描述": "暂无描述", - "示例": "示例", - "预览": "预览", - "文档": "文档", - "图片预览": "图片预览", - "说明文档": "说明文档", - "作者": "作者", - "更新时间": "更新时间", - "格式化": "格式化", - "插入文件链接": "插入文件链接", - "已安装": "已安装", - "全部插件": "全部插件", - "插件开发": "插件开发", - "提示": "提示", - "继续": "继续", - "插件安装成功": "插件安装成功", - "确定要卸载插件【{name}】吗?": "确定要卸载插件【{name}】吗?", - "卸载成功": "卸载成功", - "启用成功": "启用成功", - "禁用成功": "禁用成功", - "参数格式错误": "参数格式错误", - "设置": "设置", - "参数": "参数", - "修改成功": "修改成功", - "检测到插件,是否安装": "检测到插件,是否安装", - "安装": "安装", - "自动添加": "自动添加", - "权限名称": "权限名称", - "实体数据": "实体数据", - "自动添加权限": "自动添加权限", - "一键添加": "一键添加", - "权限列表": "权限列表", - "请选择实体数据": "请选择实体数据", - "请填写权限名称": "请填写权限名称", - "请至少选择一个权限": "请至少选择一个权限", - "添加权限成功": "添加权限成功", - "快速创建": "快速创建", - "请选择数据结构": "请选择数据结构", - "数据结构": "数据结构", - "上级节点": "上级节点", - "请选择上级节点": "请选择上级节点", - "菜单名称": "菜单名称", - "请输入菜单名称": "请输入菜单名称", - "菜单路由": "菜单路由", - "请输入菜单路由,如:/test": "请输入菜单路由,如:/test", - "必须以 / 开头": "必须以 / 开头", - "菜单排序": "菜单排序", - "请填写菜单排序": "请填写菜单排序", - "菜单图标": "菜单图标", - "请选择图标": "请选择图标", - "路由缓存": "路由缓存", - "开始创建": "开始创建" -} + "搜索插件名称": "搜索插件名称", + "后端": "后端", + "未知": "未知", + "暂无描述": "暂无描述", + "示例": "示例", + "预览": "预览", + "文档": "文档", + "图片预览": "图片预览", + "说明文档": "说明文档", + "作者": "作者", + "更新时间": "更新时间", + "格式化": "格式化", + "插入文件链接": "插入文件链接", + "已安装": "已安装", + "全部插件": "全部插件", + "插件开发": "插件开发", + "插件安装成功": "插件安装成功", + "提示": "提示", + "继续": "继续", + "确定要卸载插件【{name}】吗?": "确定要卸载插件【{name}】吗?", + "卸载成功": "卸载成功", + "启用成功": "启用成功", + "禁用成功": "禁用成功", + "参数格式错误": "参数格式错误", + "设置": "设置", + "参数": "参数", + "修改成功": "修改成功", + "检测到插件,是否安装": "检测到插件,是否安装", + "安装": "安装", + "确定要退出编码吗?": "确定要退出编码吗?", + "创建目录:{name}": "创建目录:{name}", + "创建菜单:{name}": "创建菜单:{name}", + "创建 Node 文件": "创建 Node 文件", + "正在重启服务": "正在重启服务", + "创建 Vue 文件": "创建 Vue 文件", + "自动添加": "自动添加", + "权限名称": "权限名称", + "实体数据": "实体数据", + "自动添加权限": "自动添加权限", + "一键添加": "一键添加", + "权限列表": "权限列表", + "请选择实体数据": "请选择实体数据", + "请填写权限名称": "请填写权限名称", + "请至少选择一个权限": "请至少选择一个权限", + "添加权限成功": "添加权限成功", + "快速创建": "快速创建", + "请选择数据结构": "请选择数据结构", + "数据结构": "数据结构", + "上级节点": "上级节点", + "请选择上级节点": "请选择上级节点", + "菜单名称": "菜单名称", + "请输入菜单名称": "请输入菜单名称", + "菜单路由": "菜单路由", + "请输入菜单路由,如:/test": "请输入菜单路由,如:/test", + "必须以 / 开头": "必须以 / 开头", + "菜单排序": "菜单排序", + "请填写菜单排序": "请填写菜单排序", + "菜单图标": "菜单图标", + "请选择图标": "请选择图标", + "路由缓存": "路由缓存", + "开始创建": "开始创建", + "极速编码": "极速编码" +} \ No newline at end of file diff --git a/src/modules/helper/locales/zh-tw.json b/src/modules/helper/locales/zh-tw.json index ed64aaa..a1b10d4 100644 --- a/src/modules/helper/locales/zh-tw.json +++ b/src/modules/helper/locales/zh-tw.json @@ -1,57 +1,64 @@ { - "搜索插件名称": "搜尋插件名稱", - "后端": "後端", - "未知": "未知", - "暂无描述": "暫無描述", - "示例": "示例", - "预览": "預覽", - "文档": "文檔", - "图片预览": "圖片預覽", - "说明文档": "說明文檔", - "作者": "作者", - "更新时间": "更新時間", - "格式化": "格式化", - "插入文件链接": "插入文件鏈接", - "已安装": "已安裝", - "全部插件": "全部插件", - "插件开发": "插件開發", - "提示": "提示", - "继续": "繼續", - "插件安装成功": "插件安裝成功", - "确定要卸载插件【{name}】吗?": "確定要卸載插件【{name}】嗎?", - "请选择数据结构": "請選擇資料結構", - "数据结构": "資料結構", - "上级节点": "上級節點", - "请选择上级节点": "請選擇上級節點", - "菜单名称": "菜單名稱", - "请输入菜单名称": "請輸入菜單名稱", - "菜单路由": "菜單路由", - "请输入菜单路由,如:/test": "請輸入菜單路由,如:/test", - "必须以 / 开头": "必須以 / 開頭", - "菜单排序": "菜單排序", - "请填写菜单排序": "請填寫菜單排序", - "菜单图标": "菜單圖示", - "请选择图标": "請選擇圖示", - "路由缓存": "路由快取", - "开始创建": "開始建立", - "卸载成功": "卸載成功", - "启用成功": "啟用成功", - "禁用成功": "禁用成功", - "参数格式错误": "參數格式錯誤", - "设置": "設定", - "参数": "參數", - "修改成功": "修改成功", - "检测到插件,是否安装": "檢測到插件,是否安裝", - "安装": "安裝", - "自动添加": "自動添加", - "权限名称": "權限名稱", - "实体数据": "實體數據", - "自动添加权限": "自動添加權限", - "一键添加": "一鍵添加", - "权限列表": "權限列表", - "请选择实体数据": "請選擇實體數據", - "请填写权限名称": "請填寫權限名稱", - "请至少选择一个权限": "請至少選擇一個權限", - "添加权限成功": "添加權限成功", - "快速创建": "快速創建" -} + "开始创建": "開始創建", + "极速编码": "極速編碼", + "搜索插件名称": "搜尋插件名稱", + "后端": "後端", + "未知": "未知", + "暂无描述": "暂无描述", + "示例": "示例", + "预览": "預覽", + "文档": "文檔", + "图片预览": "圖片預覽", + "说明文档": "說明文檔", + "作者": "作者", + "更新时间": "更新時間", + "格式化": "格式化", + "插入文件链接": "插入文件鏈接", + "已安装": "已安裝", + "全部插件": "全部插件", + "插件开发": "插件開發", + "插件安装成功": "插件安裝成功", + "提示": "提示", + "继续": "繼續", + "确定要卸载插件【{name}】吗?": "確定要卸載插件【{name}】嗎?", + "卸载成功": "卸載成功", + "启用成功": "啟用成功", + "禁用成功": "禁用成功", + "参数格式错误": "參數格式錯誤", + "设置": "設置", + "参数": "參數", + "修改成功": "修改成功", + "检测到插件,是否安装": "檢測到插件,是否安裝", + "安装": "安裝", + "确定要退出编码吗?": "確定要退出編碼嗎?", + "创建目录:{name}": "創建目錄:{name}", + "创建菜单:{name}": "創建菜單:{name}", + "创建 Node 文件": "創建 Node 文件", + "正在重启服务": "正在重啟服務", + "创建 Vue 文件": "創建 Vue 文件", + "自动添加": "自動添加", + "权限名称": "權限名稱", + "实体数据": "實體數據", + "自动添加权限": "自動添加權限", + "一键添加": "一鍵添加", + "权限列表": "權限列表", + "请选择实体数据": "請選擇實體數據", + "请填写权限名称": "請填寫權限名稱", + "请至少选择一个权限": "請至少選擇一個權限", + "添加权限成功": "添加權限成功", + "快速创建": "快速創建", + "请选择数据结构": "請選擇數據結構", + "数据结构": "數據結構", + "上级节点": "上級節點", + "请选择上级节点": "請選擇上級節點", + "菜单名称": "菜單名稱", + "请输入菜单名称": "請輸入菜單名稱", + "菜单路由": "菜單路由", + "请输入菜单路由,如:/test": "請輸入菜單路由,如:/test", + "必须以 / 开头": "必須以 / 開頭", + "菜单排序": "菜單排序", + "请填写菜单排序": "請填寫菜單排序", + "菜单图标": "菜單圖標", + "请选择图标": "請選擇圖標", + "路由缓存": "路由緩存" +} \ No newline at end of file diff --git a/src/modules/recycle/locales/en.json b/src/modules/recycle/locales/en.json index e659639..99e6164 100644 --- a/src/modules/recycle/locales/en.json +++ b/src/modules/recycle/locales/en.json @@ -1,14 +1,14 @@ { - "批量恢复": "Batch Recovery", - "操作人": "Operator", - "被删除的数据": "Deleted Data", - "请求的接口": "Requested Interface", - "请求参数": "Request Parameters", - "删除条数": "Number of Deletions", - "创建时间": "Creation Time", - "恢复": "Restore", - "此操作将恢复被删除的数据,是否继续?": "This operation will restore the deleted data. Do you want to continue?", - "提示": "Prompt", - "数据恢复成功": "Data Recovery Successful", - "姓名": "Name" -} + "批量恢复": "Batch Recovery", + "操作人": "Operator", + "被删除的数据": "Deleted Data", + "请求的接口": "Requested Interface", + "请求参数": "Request Parameters", + "删除条数": "Number of Deletions", + "创建时间": "Creation Time", + "恢复": "Restore", + "此操作将恢复被删除的数据,是否继续?": "This operation will restore the deleted data. Do you want to continue?", + "提示": "Tip", + "数据恢复成功": "Data Recovery Successful", + "姓名": "Name" +} \ No newline at end of file diff --git a/src/modules/recycle/locales/zh-cn.json b/src/modules/recycle/locales/zh-cn.json index db0b4a6..0a2a75e 100644 --- a/src/modules/recycle/locales/zh-cn.json +++ b/src/modules/recycle/locales/zh-cn.json @@ -1,14 +1,14 @@ { - "批量恢复": "批量恢复", - "操作人": "操作人", - "被删除的数据": "被删除的数据", - "请求的接口": "请求的接口", - "请求参数": "请求参数", - "删除条数": "删除条数", - "创建时间": "创建时间", - "恢复": "恢复", - "此操作将恢复被删除的数据,是否继续?": "此操作将恢复被删除的数据,是否继续?", - "提示": "提示", - "数据恢复成功": "数据恢复成功", - "姓名": "姓名" -} + "批量恢复": "批量恢复", + "操作人": "操作人", + "被删除的数据": "被删除的数据", + "请求的接口": "请求的接口", + "请求参数": "请求参数", + "删除条数": "删除条数", + "创建时间": "创建时间", + "恢复": "恢复", + "此操作将恢复被删除的数据,是否继续?": "此操作将恢复被删除的数据,是否继续?", + "提示": "提示", + "数据恢复成功": "数据恢复成功", + "姓名": "姓名" +} \ No newline at end of file diff --git a/src/modules/recycle/locales/zh-tw.json b/src/modules/recycle/locales/zh-tw.json index d509488..cc09ff8 100644 --- a/src/modules/recycle/locales/zh-tw.json +++ b/src/modules/recycle/locales/zh-tw.json @@ -1,14 +1,14 @@ { - "批量恢复": "批量恢復", - "操作人": "操作人", - "被删除的数据": "被刪除的數據", - "请求的接口": "請求的接口", - "请求参数": "請求參數", - "删除条数": "刪除條數", - "创建时间": "創建時間", - "恢复": "恢復", - "此操作将恢复被删除的数据,是否继续?": "此操作將恢復被刪除的數據,是否繼續?", - "提示": "提示", - "数据恢复成功": "數據恢復成功", - "姓名": "姓名" -} + "批量恢复": "批量恢復", + "操作人": "操作人", + "被删除的数据": "被刪除的數據", + "请求的接口": "請求的接口", + "请求参数": "請求參數", + "删除条数": "刪除條數", + "创建时间": "創建時間", + "恢复": "恢復", + "此操作将恢复被删除的数据,是否继续?": "此操作將恢復被刪除的數據,是否繼續?", + "提示": "提示", + "数据恢复成功": "數據恢復成功", + "姓名": "姓名" +} \ No newline at end of file diff --git a/src/modules/space/locales/en.json b/src/modules/space/locales/en.json index cffc222..e609f98 100644 --- a/src/modules/space/locales/en.json +++ b/src/modules/space/locales/en.json @@ -1,20 +1,20 @@ { - "取消": "Cancel", - "选择 {count}/{limit} 个": "Select {count}/{limit} items", - "选择文件": "Select Files", - "文件空间": "File Space", - "点击上传": "Click to Upload", - "刷新": "Refresh", - "删除选中文件": "Delete Selected Files", - "将文件拖到此处,或点击按钮上传": "Drag files here or click the button to upload", - "共 {total} 条": "Total {total} items", - "分类": "Category", - "文件列表": "File List", - "名称": "Name", - "最多只能选择{limit}个文件": "You can select a maximum of {limit} files", - "此操作将删除文件, 是否继续?": "This operation will delete the files. Do you want to continue?", - "提示": "Prompt", - "删除成功": "Delete Successful", - "类型": "Type", - "分类ID": "Category ID" -} + "取消": "Cancel", + "选择 {count}/{limit} 个": "Select {count}/{limit}", + "选择文件": "Select File", + "文件空间": "File Space", + "点击上传": "Click to Upload", + "刷新": "Refresh", + "删除选中文件": "Delete Selected Files", + "将文件拖到此处,或点击按钮上传": "Drag files here or click the button to upload", + "共 {total} 条": "Total {total} items", + "分类": "Category", + "文件列表": "File List", + "名称": "Name", + "最多只能选择{limit}个文件": "You can select up to {limit} files", + "此操作将删除文件, 是否继续?": "This operation will delete the file. Do you want to continue?", + "提示": "Tip", + "删除成功": "Delete Successful", + "类型": "Type", + "分类ID": "Category ID" +} \ No newline at end of file diff --git a/src/modules/space/locales/zh-cn.json b/src/modules/space/locales/zh-cn.json index 0dcf766..33f6ace 100644 --- a/src/modules/space/locales/zh-cn.json +++ b/src/modules/space/locales/zh-cn.json @@ -1,20 +1,20 @@ { - "取消": "取消", - "选择 {count}/{limit} 个": "选择 {count}/{limit} 个", - "选择文件": "选择文件", - "文件空间": "文件空间", - "点击上传": "点击上传", - "刷新": "刷新", - "删除选中文件": "删除选中文件", - "将文件拖到此处,或点击按钮上传": "将文件拖到此处,或点击按钮上传", - "共 {total} 条": "共 {total} 条", - "分类": "分类", - "文件列表": "文件列表", - "名称": "名称", - "最多只能选择{limit}个文件": "最多只能选择{limit}个文件", - "此操作将删除文件, 是否继续?": "此操作将删除文件, 是否继续?", - "提示": "提示", - "删除成功": "删除成功", - "类型": "类型", - "分类ID": "分类ID" -} + "取消": "取消", + "选择 {count}/{limit} 个": "选择 {count}/{limit} 个", + "选择文件": "选择文件", + "文件空间": "文件空间", + "点击上传": "点击上传", + "刷新": "刷新", + "删除选中文件": "删除选中文件", + "将文件拖到此处,或点击按钮上传": "将文件拖到此处,或点击按钮上传", + "共 {total} 条": "共 {total} 条", + "分类": "分类", + "文件列表": "文件列表", + "名称": "名称", + "最多只能选择{limit}个文件": "最多只能选择{limit}个文件", + "此操作将删除文件, 是否继续?": "此操作将删除文件, 是否继续?", + "提示": "提示", + "删除成功": "删除成功", + "类型": "类型", + "分类ID": "分类ID" +} \ No newline at end of file diff --git a/src/modules/space/locales/zh-tw.json b/src/modules/space/locales/zh-tw.json index 88ab42f..ce4b8c9 100644 --- a/src/modules/space/locales/zh-tw.json +++ b/src/modules/space/locales/zh-tw.json @@ -1,20 +1,20 @@ { - "取消": "取消", - "选择 {count}/{limit} 个": "選擇 {count}/{limit} 個", - "选择文件": "選擇文件", - "文件空间": "文件空間", - "点击上传": "點擊上傳", - "刷新": "刷新", - "删除选中文件": "刪除選中文件", - "将文件拖到此处,或点击按钮上传": "將文件拖到此處,或點擊按鈕上傳", - "共 {total} 条": "共 {total} 條", - "分类": "分類", - "文件列表": "文件列表", - "名称": "名稱", - "最多只能选择{limit}个文件": "最多只能選擇{limit}個文件", - "此操作将删除文件, 是否继续?": "此操作將刪除文件, 是否繼續?", - "提示": "提示", - "删除成功": "刪除成功", - "类型": "類型", - "分类ID": "分類ID" -} + "取消": "取消", + "选择 {count}/{limit} 个": "選擇 {count}/{limit} 個", + "选择文件": "選擇文件", + "文件空间": "文件空間", + "点击上传": "點擊上傳", + "刷新": "刷新", + "删除选中文件": "刪除選中文件", + "将文件拖到此处,或点击按钮上传": "將文件拖到此处,或點擊按鈕上傳", + "共 {total} 条": "共 {total} 條", + "分类": "分類", + "文件列表": "文件列表", + "名称": "名稱", + "最多只能选择{limit}个文件": "最多只能選擇{limit}個文件", + "此操作将删除文件, 是否继续?": "此操作將刪除文件, 是否繼續?", + "提示": "提示", + "删除成功": "刪除成功", + "类型": "類型", + "分类ID": "分類ID" +} \ No newline at end of file diff --git a/src/modules/task/locales/en.json b/src/modules/task/locales/en.json index 2b02cc1..9ee9558 100644 --- a/src/modules/task/locales/en.json +++ b/src/modules/task/locales/en.json @@ -1,34 +1,34 @@ { - "编辑": "Edit", - "删除": "Delete", - "查看日志": "View Log", - "状态": "Status", - "成功": "Success", - "失败": "Failure", - "描述": "Description", - "执行状态": "Execution Status", - "执行时间": "Execution Time", - "日志列表({name})": "Log List ({name})", - "状态 0-停止 1-运行": "Status 0 - Stopped 1 - Running", - "状态 0-系统 1-用户": "Status 0 - System 1 - User", - "执行服务": "Execute Service", - "定时规则": "Scheduling Rule", - "间隔{every}秒执行": "Execute every {every} seconds", - "进行中": "In Progress", - "已停止": "Stopped", - "添加计划任务": "Add Scheduled Task", - "此操作将启用任务({name}),是否继续?": "This operation will enable the task ({name}), do you want to continue?", - "此操作将停用任务({name}),是否继续?": "This operation will disable the task ({name}), do you want to continue?", - "此操作将删除任务({name}),是否继续?": "This operation will delete the task ({name}), do you want to continue?", - "编辑计划任务": "Edit Scheduled Task", - "名称": "Name", - "类型": "Type", - "时间间隔": "Time Interval", - "间隔(秒)": "Interval (seconds)", - "开始时间": "Start Time", - "备注": "Remarks", - "保存成功": "Save Successful", - "暂停": "Pause", - "开始": "Start", - "立即执行": "Execute Immediately" -} + "编辑": "Edit", + "删除": "Delete", + "查看日志": "View Log", + "状态": "Status", + "成功": "Success", + "失败": "Failure", + "描述": "Description", + "执行状态": "Execution Status", + "执行时间": "Execution Time", + "日志列表({name})": "Log List ({name})", + "状态 0-停止 1-运行": "Status 0 - Stopped 1 - Running", + "状态 0-系统 1-用户": "Status 0 - System 1 - User", + "执行服务": "Execute Service", + "定时规则": "Scheduled Rule", + "间隔{every}秒执行": "Execute every {every} seconds", + "进行中": "In Progress", + "已停止": "Stopped", + "添加计划任务": "Add Scheduled Task", + "此操作将启用任务({name}),是否继续?": "This operation will enable the task ({name}), do you want to continue?", + "此操作将停用任务({name}),是否继续?": "This operation will disable the task ({name}), do you want to continue?", + "此操作将删除任务({name}),是否继续?": "This operation will delete the task ({name}), do you want to continue?", + "编辑计划任务": "Edit Scheduled Task", + "名称": "Name", + "类型": "Type", + "时间间隔": "Time Interval", + "间隔(秒)": "Interval (seconds)", + "开始时间": "Start Time", + "备注": "Remarks", + "保存成功": "Save Success", + "暂停": "Pause", + "开始": "Start", + "立即执行": "Execute Immediately" +} \ No newline at end of file diff --git a/src/modules/task/locales/zh-cn.json b/src/modules/task/locales/zh-cn.json index 0fb329d..556525c 100644 --- a/src/modules/task/locales/zh-cn.json +++ b/src/modules/task/locales/zh-cn.json @@ -1,34 +1,34 @@ { - "执行服务": "执行服务", - "定时规则": "定时规则", - "间隔{every}秒执行": "间隔{every}秒执行", - "进行中": "进行中", - "已停止": "已停止", - "添加计划任务": "添加计划任务", - "此操作将启用任务({name}),是否继续?": "此操作将启用任务({name}),是否继续?", - "此操作将停用任务({name}),是否继续?": "此操作将停用任务({name}),是否继续?", - "此操作将删除任务({name}),是否继续?": "此操作将删除任务({name}),是否继续?", - "编辑计划任务": "编辑计划任务", - "名称": "名称", - "类型": "类型", - "时间间隔": "时间间隔", - "间隔(秒)": "间隔(秒)", - "开始时间": "开始时间", - "备注": "备注", - "保存成功": "保存成功", - "暂停": "暂停", - "开始": "开始", - "立即执行": "立即执行", - "编辑": "编辑", - "删除": "删除", - "查看日志": "查看日志", - "状态": "状态", - "成功": "成功", - "失败": "失败", - "描述": "描述", - "执行状态": "执行状态", - "执行时间": "执行时间", - "日志列表({name})": "日志列表({name})", - "状态 0-停止 1-运行": "状态 0-停止 1-运行", - "状态 0-系统 1-用户": "状态 0-系统 1-用户" -} + "执行服务": "执行服务", + "定时规则": "定时规则", + "间隔{every}秒执行": "间隔{every}秒执行", + "进行中": "进行中", + "已停止": "已停止", + "添加计划任务": "添加计划任务", + "此操作将启用任务({name}),是否继续?": "此操作将启用任务({name}),是否继续?", + "此操作将停用任务({name}),是否继续?": "此操作将停用任务({name}),是否继续?", + "此操作将删除任务({name}),是否继续?": "此操作将删除任务({name}),是否继续?", + "编辑计划任务": "编辑计划任务", + "名称": "名称", + "类型": "类型", + "时间间隔": "时间间隔", + "间隔(秒)": "间隔(秒)", + "开始时间": "开始时间", + "备注": "备注", + "保存成功": "保存成功", + "暂停": "暂停", + "开始": "开始", + "立即执行": "立即执行", + "编辑": "编辑", + "删除": "删除", + "查看日志": "查看日志", + "状态": "状态", + "成功": "成功", + "失败": "失败", + "描述": "描述", + "执行状态": "执行状态", + "执行时间": "执行时间", + "日志列表({name})": "日志列表({name})", + "状态 0-停止 1-运行": "状态 0-停止 1-运行", + "状态 0-系统 1-用户": "状态 0-系统 1-用户" +} \ No newline at end of file diff --git a/src/modules/task/locales/zh-tw.json b/src/modules/task/locales/zh-tw.json index fe894da..5a8fb6a 100644 --- a/src/modules/task/locales/zh-tw.json +++ b/src/modules/task/locales/zh-tw.json @@ -1,34 +1,34 @@ { - "编辑": "編輯", - "删除": "刪除", - "查看日志": "查看日誌", - "状态": "狀態", - "成功": "成功", - "失败": "失敗", - "描述": "描述", - "执行状态": "執行狀態", - "执行时间": "執行時間", - "日志列表({name})": "日誌列表({name})", - "状态 0-停止 1-运行": "狀態 0-停止 1-運行", - "状态 0-系统 1-用户": "狀態 0-系統 1-用戶", - "执行服务": "執行服務", - "定时规则": "定時規則", - "间隔{every}秒执行": "間隔{every}秒執行", - "进行中": "進行中", - "已停止": "已停止", - "添加计划任务": "添加計劃任務", - "此操作将启用任务({name}),是否继续?": "此操作將啟用任務({name}),是否繼續?", - "此操作将停用任务({name}),是否继续?": "此操作將停用任務({name}),是否繼續?", - "此操作将删除任务({name}),是否继续?": "此操作將刪除任務({name}),是否繼續?", - "编辑计划任务": "編輯計劃任務", - "名称": "名稱", - "类型": "類型", - "时间间隔": "時間間隔", - "间隔(秒)": "間隔(秒)", - "开始时间": "開始時間", - "备注": "備註", - "保存成功": "保存成功", - "暂停": "暫停", - "开始": "開始", - "立即执行": "立即執行" -} + "编辑": "編輯", + "删除": "刪除", + "查看日志": "查看日誌", + "状态": "狀態", + "成功": "成功", + "失败": "失敗", + "描述": "描述", + "执行状态": "執行狀態", + "执行时间": "執行時間", + "日志列表({name})": "日誌列表({name})", + "状态 0-停止 1-运行": "狀態 0-停止 1-運行", + "状态 0-系统 1-用户": "狀態 0-系統 1-用戶", + "执行服务": "執行服務", + "定时规则": "定時規則", + "间隔{every}秒执行": "間隔{every}秒執行", + "进行中": "進行中", + "已停止": "已停止", + "添加计划任务": "添加計劃任務", + "此操作将启用任务({name}),是否继续?": "此操作將啟用任務({name}),是否繼續?", + "此操作将停用任务({name}),是否继续?": "此操作將停用任務({name}),是否繼續?", + "此操作将删除任务({name}),是否继续?": "此操作將刪除任務({name}),是否繼續?", + "编辑计划任务": "編輯計劃任務", + "名称": "名稱", + "类型": "類型", + "时间间隔": "時間間隔", + "间隔(秒)": "間隔(秒)", + "开始时间": "開始時間", + "备注": "備註", + "保存成功": "保存成功", + "暂停": "暫停", + "开始": "開始", + "立即执行": "立即執行" +} \ No newline at end of file diff --git a/src/modules/user/locales/en.json b/src/modules/user/locales/en.json index 7b93230..c6bbd99 100644 --- a/src/modules/user/locales/en.json +++ b/src/modules/user/locales/en.json @@ -1,31 +1,20 @@ { - "全选": "Select All", - "搜索昵称、手机号": "Search Nickname, Mobile Number", - "已选": "Selected", - "选择": "Select", - "人": "Person", - "取消": "Cancel", - "启用": "Enable", - "操作": "Operation", - "姓名": "Name", - "小程序": "Mini Program", - "公众号": "Official Account", - "H5": "H5", - "未知": "Unknown", - "男": "Male", - "女": "Female", - "禁用": "Disabled", - "正常": "Normal", - "已注销": "Canceled", - "昵称": "Nickname", - "头像": "Avatar", - "手机号": "Mobile Number", - "性别": "Gender", - "登录方式": "Login Method", - "状态": "Status", - "创建时间": "Creation Time", - "添加": "Add", - "移除": "Remove", - "请选择用户": "Please Select User", - "选择用户": "Select User" -} + "小程序": "Mini Program", + "公众号": "Official Account", + "H5": "H5", + "未知": "Unknown", + "男": "Male", + "女": "Female", + "禁用": "Disabled", + "正常": "Normal", + "已注销": "Canceled", + "昵称": "Nickname", + "头像": "Avatar", + "手机号": "Mobile Number", + "性别": "Gender", + "登录方式": "Login Method", + "状态": "Status", + "创建时间": "Creation Time", + "选择用户": "Select User", + "姓名": "Name" +} \ No newline at end of file diff --git a/src/modules/user/locales/zh-cn.json b/src/modules/user/locales/zh-cn.json index 13a320b..9c2cba2 100644 --- a/src/modules/user/locales/zh-cn.json +++ b/src/modules/user/locales/zh-cn.json @@ -1,31 +1,20 @@ { - "小程序": "小程序", - "公众号": "公众号", - "H5": "H5", - "未知": "未知", - "男": "男", - "女": "女", - "禁用": "禁用", - "正常": "正常", - "已注销": "已注销", - "昵称": "昵称", - "头像": "头像", - "手机号": "手机号", - "性别": "性别", - "登录方式": "登录方式", - "状态": "状态", - "创建时间": "创建时间", - "添加": "添加", - "移除": "移除", - "请选择用户": "请选择用户", - "选择用户": "选择用户", - "全选": "全选", - "搜索昵称、手机号": "搜索昵称、手机号", - "已选": "已选", - "选择": "选择", - "人": "人", - "取消": "取消", - "启用": "启用", - "操作": "操作", - "姓名": "姓名" -} + "小程序": "小程序", + "公众号": "公众号", + "H5": "H5", + "未知": "未知", + "男": "男", + "女": "女", + "禁用": "禁用", + "正常": "正常", + "已注销": "已注销", + "昵称": "昵称", + "头像": "头像", + "手机号": "手机号", + "性别": "性别", + "登录方式": "登录方式", + "状态": "状态", + "创建时间": "创建时间", + "选择用户": "选择用户", + "姓名": "姓名" +} \ No newline at end of file diff --git a/src/modules/user/locales/zh-tw.json b/src/modules/user/locales/zh-tw.json index 04da49c..0aeb0dd 100644 --- a/src/modules/user/locales/zh-tw.json +++ b/src/modules/user/locales/zh-tw.json @@ -1,31 +1,20 @@ { - "全选": "全選", - "搜索昵称、手机号": "搜尋暱稱、手機號", - "已选": "已選", - "选择": "選擇", - "人": "人", - "取消": "取消", - "启用": "啟用", - "操作": "操作", - "姓名": "姓名", - "小程序": "小程序", - "公众号": "公眾號", - "H5": "H5", - "未知": "未知", - "男": "男", - "女": "女", - "禁用": "禁用", - "正常": "正常", - "已注销": "已註銷", - "昵称": "暱稱", - "头像": "頭像", - "手机号": "手機號", - "性别": "性別", - "登录方式": "登錄方式", - "状态": "狀態", - "创建时间": "創建時間", - "添加": "添加", - "移除": "移除", - "请选择用户": "請選擇用戶", - "选择用户": "選擇用戶" -} + "小程序": "小程序", + "公众号": "公眾號", + "H5": "H5", + "未知": "未知", + "男": "男", + "女": "女", + "禁用": "禁用", + "正常": "正常", + "已注销": "已註銷", + "昵称": "暱稱", + "头像": "頭像", + "手机号": "手機號", + "性别": "性別", + "登录方式": "登錄方式", + "状态": "狀態", + "创建时间": "創建時間", + "选择用户": "選擇用戶", + "姓名": "姓名" +} \ No newline at end of file diff --git a/src/plugins/crud/components/select/index.tsx b/src/plugins/crud/components/select/index.tsx index 7eeae8f..2e1555d 100644 --- a/src/plugins/crud/components/select/index.tsx +++ b/src/plugins/crud/components/select/index.tsx @@ -1,7 +1,7 @@ -import { useCrud, useForm } from '@cool-vue/crud'; -import { isEmpty, isString } from 'lodash-es'; -import { computed, defineComponent, type PropType, type Ref, toValue, useModel } from 'vue'; -import { parsePx } from '/@/cool/utils'; +import { useCrud, useForm, } from '@cool-vue/crud'; +import { cloneDeep, isEmpty, isFunction, isString } from 'lodash-es'; +import { computed, defineComponent, onMounted, type PropType, ref, type Ref, toValue, useModel } from 'vue'; +import { deepTree, parsePx } from '/@/cool/utils'; import { useI18n } from 'vue-i18n'; import { useCool } from '/@/cool'; import { CrudProps } from '../../comm'; @@ -25,13 +25,23 @@ export default defineComponent({ type: String, default: 'value' }, + // 请求接口,如果是字符串,则使用 crud 下的方法 + api: [String, Function], width: [String, Number], + // 是否树形 tree: Boolean, // 是否返回选中层级下的所有值 allLevelsId: Boolean, // 是否父子不互相关联 checkStrictly: Boolean, + // 默认展开所有 + defaultExpandAll: Boolean, + // 顶级标签 + topLabel: String, + + // 是否选择当前表格数据,如果是,则不能选择自身及其下级 + current: Boolean, // 值变化刷新 refreshOnChange: { type: Boolean, @@ -54,11 +64,55 @@ export default defineComponent({ // 是否用于搜索 const isSearch = computed(() => !Form.value || Form.value?.name === 'search'); + // 选项 + const options = ref() + // 选中值 const value = useModel(props, 'modelValue'); // 列表 - const list = computed(() => toValue(props.options) || []); + const list = computed(() => { + let data: any[] = [] + + if (props.current) { + data = cloneDeep(toValue(Crud.value?.['cl-table']?.data)); + + // 禁用自身及其下级 + function deep(d: any, f: boolean) { + if (d.id && d.id == Form.value?.getForm('id')) { + f = true; + } + + if (f) { + d.disabled = true; + } + + if (d.children) { + d.children.forEach((e: any) => { + deep(e, f); + }); + } + } + + deep({ children: data }, false); + + } else { + data = toValue(options.value || props.options) || []; + } + + // 如果存在顶级标签 + if (props.topLabel) { + return [ + { + [props.labelKey]: props.topLabel, + [props.valueKey]: 0, + children: data + } + ] + } + + return data + }); // 获取值 function getValue(val: any): any | any[] { @@ -108,6 +162,29 @@ export default defineComponent({ refs.select?.$.proxy.$el?.querySelector('.el-select__wrapper')?.click(); } + // 获取选项数据 + function refresh() { + let req: Promise | null = null + + if (isString(props.api)) { + req = Crud.value?.service[props.api]() + } + + if (isFunction(props.api)) { + req = props.api() + } + + if (req) { + req.then(res => { + options.value = deepTree(res); + }) + } + } + + onMounted(() => { + refresh() + }) + expose({ focus }); @@ -121,6 +198,7 @@ export default defineComponent({ // 占位符 const placeholder = isSearch.value ? t('全部') : t('请选择'); + // 树形下拉框 const TreeSelect = ( => { order: 99, // 组件全注册 - components: Object.values(import.meta.glob('./components/**/*.{vue,tsx}')), + components: Object.values(import.meta.glob("./components/**/*.{vue,tsx}")), // 配置参数,具体配置点 CrudOptions 查看 options: { @@ -28,7 +28,7 @@ export default (): Merge => { // contextMenu: [] }, form: { - labelPosition: 'top', + labelPosition: "top", // 插件列表 plugins: [ // 自动聚焦插件 @@ -46,8 +46,8 @@ export default (): Merge => { dict: { // 排序字段 sort: { - prop: 'order', - order: 'sort' + prop: "order", + order: "sort" }, // 按钮及提示文案 label: locale[config.i18n.locale] @@ -57,12 +57,12 @@ export default (): Merge => { // 安装 install: Crud.install, - label: 'CRUD', - description: '快速增删改查及一系列辅助组件', - author: 'COOL', - version: '1.1.2', - updateTime: '2024-12-31', - doc: 'https://vue.cool-admin.com/src/guide/plugins/crud.html', - demo: '/demo/crud' + label: "CRUD", + description: "快速增删改查及一系列辅助组件", + author: "COOL", + version: "1.1.2", + updateTime: "2024-12-31", + doc: "https://vue.cool-admin.com/src/guide/plugins/crud.html", + demo: "/demo/crud" }; }; diff --git a/src/plugins/crud/locales/en.json b/src/plugins/crud/locales/en.json index 0b9e48a..73b99a7 100644 --- a/src/plugins/crud/locales/en.json +++ b/src/plugins/crud/locales/en.json @@ -1,28 +1,35 @@ { - "今日": "Today", - "本周": "This Week", - "本月": "This Month", - "今年": "This Year", - "自定义列": "Custom Column", - "重置": "Reset", - "请输入": "Please enter", - "保存": "Save", - "操作成功": "Operation successful", - "取消": "Cancel", - "搜索{name}": "Search {name}", - "关键字": "Keyword", - "请选择": "Please select", - "选择成员": "Select members", - "搜索名称": "Search name", - "确定": "OK", - "按部门分组": "Group by department", - "按角色分组": "Group by role", - "请选择成员": "Please select members", - "更新成功": "Update successful", - "确定要开启吗?": "Are you sure you want to enable it?", - "确定要关闭吗?": "Are you sure you want to disable it?", - "提示": "Tip", - "全部": "All", - "起": "Start", - "止": "End" -} + "已选": "Selected", + "选择": "Select", + "人": "Person", + "操作": "Operation", + "全部": "All", + "起": "Start", + "止": "End", + "今日": "Today", + "本周": "This Week", + "本月": "This Month", + "今年": "This Year", + "自定义列": "Custom Column", + "重置": "Reset", + "请输入": "Please enter", + "保存": "Save", + "操作成功": "Operation successful", + "取消": "Cancel", + "搜索{name}": "Search {name}", + "关键字": "Keyword", + "请选择": "Please select", + "选择成员": "Select members", + "搜索名称": "Search name", + "确定": "OK", + "按部门分组": "Group by department", + "按角色分组": "Group by role", + "请选择成员": "Please select members", + "更新成功": "Update successful", + "确定要开启吗?": "Are you sure you want to enable it?", + "确定要关闭吗?": "Are you sure you want to disable it?", + "提示": "Tip", + "添加": "Add", + "移除": "Remove", + "全选": "Select all" +} \ No newline at end of file diff --git a/src/plugins/crud/locales/zh-cn.json b/src/plugins/crud/locales/zh-cn.json index 6a01f7e..df7185d 100644 --- a/src/plugins/crud/locales/zh-cn.json +++ b/src/plugins/crud/locales/zh-cn.json @@ -1,28 +1,35 @@ { - "请输入": "请输入", - "保存": "保存", - "操作成功": "操作成功", - "取消": "取消", - "搜索{name}": "搜索{name}", - "关键字": "关键字", - "请选择": "请选择", - "选择成员": "选择成员", - "搜索名称": "搜索名称", - "确定": "确定", - "按部门分组": "按部门分组", - "按角色分组": "按角色分组", - "请选择成员": "请选择成员", - "更新成功": "更新成功", - "确定要开启吗?": "确定要开启吗?", - "确定要关闭吗?": "确定要关闭吗?", - "提示": "提示", - "全部": "全部", - "起": "起", - "止": "止", - "今日": "今日", - "本周": "本周", - "本月": "本月", - "今年": "今年", - "自定义列": "自定义列", - "重置": "重置" -} + "请输入": "请输入", + "保存": "保存", + "操作成功": "操作成功", + "取消": "取消", + "搜索{name}": "搜索{name}", + "关键字": "关键字", + "请选择": "请选择", + "选择成员": "选择成员", + "搜索名称": "搜索名称", + "确定": "确定", + "按部门分组": "按部门分组", + "按角色分组": "按角色分组", + "请选择成员": "请选择成员", + "更新成功": "更新成功", + "确定要开启吗?": "确定要开启吗?", + "确定要关闭吗?": "确定要关闭吗?", + "提示": "提示", + "添加": "添加", + "移除": "移除", + "全选": "全选", + "已选": "已选", + "选择": "选择", + "人": "人", + "操作": "操作", + "全部": "全部", + "起": "起", + "止": "止", + "今日": "今日", + "本周": "本周", + "本月": "本月", + "今年": "今年", + "自定义列": "自定义列", + "重置": "重置" +} \ No newline at end of file diff --git a/src/plugins/crud/locales/zh-tw.json b/src/plugins/crud/locales/zh-tw.json index 436ef25..bdaad53 100644 --- a/src/plugins/crud/locales/zh-tw.json +++ b/src/plugins/crud/locales/zh-tw.json @@ -1,28 +1,35 @@ { - "今日": "今日", - "本周": "本周", - "本月": "本月", - "今年": "今年", - "自定义列": "自定義欄", - "重置": "重置", - "请输入": "請輸入", - "保存": "保存", - "操作成功": "操作成功", - "取消": "取消", - "搜索{name}": "搜索{name}", - "关键字": "關鍵字", - "请选择": "請選擇", - "选择成员": "選擇成員", - "搜索名称": "搜索名稱", - "确定": "確定", - "按部门分组": "按部門分組", - "按角色分组": "按角色分組", - "请选择成员": "請選擇成員", - "更新成功": "更新成功", - "确定要开启吗?": "確定要開啟嗎?", - "确定要关闭吗?": "確定要關閉嗎?", - "提示": "提示", - "全部": "全部", - "起": "起", - "止": "止" -} + "已选": "已選", + "选择": "選擇", + "人": "人", + "操作": "操作", + "全部": "全部", + "起": "起", + "止": "止", + "今日": "今日", + "本周": "本周", + "本月": "本月", + "今年": "今年", + "自定义列": "自定義列", + "重置": "重置", + "请输入": "請輸入", + "保存": "保存", + "操作成功": "操作成功", + "取消": "取消", + "搜索{name}": "搜索{name}", + "关键字": "關鍵字", + "请选择": "請選擇", + "选择成员": "選擇成員", + "搜索名称": "搜索名稱", + "确定": "確定", + "按部门分组": "按部門分組", + "按角色分组": "按角色分組", + "请选择成员": "請選擇成員", + "更新成功": "更新成功", + "确定要开启吗?": "確定要開啟嗎?", + "确定要关闭吗?": "確定要關閉嗎?", + "提示": "提示", + "添加": "添加", + "移除": "移除", + "全选": "全選" +} \ No newline at end of file diff --git a/src/plugins/crud/plugins/table/index.ts b/src/plugins/crud/plugins/table/index.ts index 07e5bfa..a3aa6d6 100644 --- a/src/plugins/crud/plugins/table/index.ts +++ b/src/plugins/crud/plugins/table/index.ts @@ -1,5 +1,7 @@ import { rowEdit } from './rowEdit'; +import { toTree } from './toTree'; export const Table = { - rowEdit + rowEdit, + toTree }; diff --git a/src/plugins/crud/plugins/table/rowEdit.tsx b/src/plugins/crud/plugins/table/rowEdit.tsx index 3792ac5..e957f92 100644 --- a/src/plugins/crud/plugins/table/rowEdit.tsx +++ b/src/plugins/crud/plugins/table/rowEdit.tsx @@ -6,6 +6,10 @@ import { cloneDeep } from 'lodash-es'; import { nextTick, reactive } from 'vue'; import { useRefs } from '/@/cool'; +/** + * 行编辑 + * @returns + */ export function rowEdit() { return ({ exposed }) => { const Crud = useCrud(); diff --git a/src/plugins/crud/plugins/table/toTree.ts b/src/plugins/crud/plugins/table/toTree.ts new file mode 100644 index 0000000..7084bcb --- /dev/null +++ b/src/plugins/crud/plugins/table/toTree.ts @@ -0,0 +1,94 @@ +import { useCrud } from "@cool-vue/crud"; +import { deepTree } from "/@/cool/utils"; +import { isEmpty } from "lodash-es"; + +interface Item extends Eps.BaseSysMenuEntity { + children?: Item[]; + _children?: Item[]; + hasChildren?: boolean; +} + +/** + * 树形表格 + * @param options.lazy 是否懒加载,数据过多时开启 + * @param options.onRefresh 刷新方法 + * @returns + */ +export function toTree( + options: { lazy?: boolean; onRefresh?: (params: any) => Promise } = {} +) { + return ({ exposed }) => { + const Crud = useCrud(); + + // 设置刷新方法 + if (Crud.value) { + Crud.value.config.onRefresh = (params: any, { render }: any) => { + const req = options.onRefresh + ? options.onRefresh(params) + : Crud.value?.service.list(params); + + if (req) { + req.then((list) => { + render(onData(list, params.sort)); + }); + } + }; + } + + // 数据处理 + const onData = (list: Item[], sort: "desc" | "asc") => { + const data = deepTree(list, sort); + + // 递归处理 + const deep = (arr: Item[]) => { + arr.forEach((e) => { + const nodes: { [key: number]: Item[] } = + exposed.Table.value?.store.states.lazyTreeNodeMap.value || {}; + + if (nodes[e.id!]) { + nodes[e.id!] = e.children || []; + } + + if (!isEmpty(e.children)) { + e.hasChildren = true; + e._children = e.children; + + if (options.lazy) { + delete e.children; + } + + deep(e._children || []); + } + }); + }; + + deep(data); + + return data; + }; + + // 层级参数 + exposed.config.props.lazy = true; + exposed.config.props["row-key"] = "id"; + exposed.config.props["tree-props"] = { + children: "children", + hasChildren: "hasChildren" + }; + + // 层级事件 + exposed.config.on.load = ( + row: Item, + treeNode: unknown, + resolve: (data: Item[]) => void + ) => { + resolve(row._children || []); + }; + + // 行点击 + exposed.config.on.onRowClick = (row: Item) => { + if (row._children) { + exposed.Table.value?.store.loadOrToggle(row); + } + }; + }; +} diff --git a/src/plugins/dev-tools/locales/en.json b/src/plugins/dev-tools/locales/en.json index 2815e43..8f1b981 100644 --- a/src/plugins/dev-tools/locales/en.json +++ b/src/plugins/dev-tools/locales/en.json @@ -1,14 +1,14 @@ { - "代理请求": "Proxy Request", - "字典": "Dictionary", - "账号": "Account", - "文档": "Document", - "刷新": "Refresh", - "搜索关键字": "Search Keyword", - "Eps 错误,请在后端代码中设置:": "Eps Error, please set in backend code:", - "没有可用的字典": "No available dictionary", - "请添加新的字典条目": "Please add a new dictionary entry", - "去添加": "Go to add", - "是否删除该账号?": "Delete this account?", - "提示": "Tip" -} + "代理请求": "Proxy Request", + "字典": "Dictionary", + "账号": "Account", + "文档": "Document", + "刷新": "Refresh", + "搜索关键字": "Search Keyword", + "Eps 错误,请在后端代码中设置:": "Eps error, please set in backend code:", + "没有可用的字典": "No available dictionary", + "请添加新的字典条目": "Please add new dictionary entry", + "去添加": "Go to add", + "是否删除该账号?": "Delete this account?", + "提示": "Tip" +} \ No newline at end of file diff --git a/src/plugins/dev-tools/locales/zh-cn.json b/src/plugins/dev-tools/locales/zh-cn.json index 123cd6f..aaec654 100644 --- a/src/plugins/dev-tools/locales/zh-cn.json +++ b/src/plugins/dev-tools/locales/zh-cn.json @@ -1,14 +1,14 @@ { - "代理请求": "代理请求", - "字典": "字典", - "账号": "账号", - "文档": "文档", - "刷新": "刷新", - "搜索关键字": "搜索关键字", - "Eps 错误,请在后端代码中设置:": "Eps 错误,请在后端代码中设置:", - "没有可用的字典": "没有可用的字典", - "请添加新的字典条目": "请添加新的字典条目", - "去添加": "去添加", - "是否删除该账号?": "是否删除该账号?", - "提示": "提示" -} + "代理请求": "代理请求", + "字典": "字典", + "账号": "账号", + "文档": "文档", + "刷新": "刷新", + "搜索关键字": "搜索关键字", + "Eps 错误,请在后端代码中设置:": "Eps 错误,请在后端代码中设置:", + "没有可用的字典": "没有可用的字典", + "请添加新的字典条目": "请添加新的字典条目", + "去添加": "去添加", + "是否删除该账号?": "是否删除该账号?", + "提示": "提示" +} \ No newline at end of file diff --git a/src/plugins/dev-tools/locales/zh-tw.json b/src/plugins/dev-tools/locales/zh-tw.json index 816a1ca..9ff4bdf 100644 --- a/src/plugins/dev-tools/locales/zh-tw.json +++ b/src/plugins/dev-tools/locales/zh-tw.json @@ -1,14 +1,14 @@ { - "代理请求": "代理請求", - "字典": "字典", - "账号": "帳號", - "文档": "文檔", - "刷新": "刷新", - "搜索关键字": "搜索關鍵字", - "Eps 错误,请在后端代码中设置:": "Eps 錯誤,請在後端代碼中設置:", - "没有可用的字典": "沒有可用的字典", - "请添加新的字典条目": "請添加新的字典條目", - "去添加": "去添加", - "是否删除该账号?": "是否刪除該帳號?", - "提示": "提示" -} + "代理请求": "代理請求", + "字典": "字典", + "账号": "賬號", + "文档": "文檔", + "刷新": "刷新", + "搜索关键字": "搜索關鍵字", + "Eps 错误,请在后端代码中设置:": "Eps 錯誤,請在後端代碼中設置:", + "没有可用的字典": "沒有可用的字典", + "请添加新的字典条目": "請添加新的字典條目", + "去添加": "去添加", + "是否删除该账号?": "是否刪除該賬號?", + "提示": "提示" +} \ No newline at end of file diff --git a/src/plugins/editor-preview/locales/en.json b/src/plugins/editor-preview/locales/en.json index 82f630b..d549880 100644 --- a/src/plugins/editor-preview/locales/en.json +++ b/src/plugins/editor-preview/locales/en.json @@ -1,9 +1,9 @@ { - "查看内容": "View Content", - "关闭": "Close", - "复制": "Copy", - "代码预览": "Code Preview", - "文本预览": "Text Preview", - "点击查看": "Click to View", - "复制成功": "Copy Success" -} + "查看内容": "View Content", + "关闭": "Close", + "复制": "Copy", + "代码预览": "Code Preview", + "文本预览": "Text Preview", + "点击查看": "Click to View", + "复制成功": "Copy Success" +} \ No newline at end of file diff --git a/src/plugins/editor-preview/locales/zh-cn.json b/src/plugins/editor-preview/locales/zh-cn.json index 53cba80..2bcb9ea 100644 --- a/src/plugins/editor-preview/locales/zh-cn.json +++ b/src/plugins/editor-preview/locales/zh-cn.json @@ -1,9 +1,9 @@ { - "查看内容": "查看内容", - "关闭": "关闭", - "复制": "复制", - "代码预览": "代码预览", - "文本预览": "文本预览", - "点击查看": "点击查看", - "复制成功": "复制成功" -} + "查看内容": "查看内容", + "关闭": "关闭", + "复制": "复制", + "代码预览": "代码预览", + "文本预览": "文本预览", + "点击查看": "点击查看", + "复制成功": "复制成功" +} \ No newline at end of file diff --git a/src/plugins/editor-preview/locales/zh-tw.json b/src/plugins/editor-preview/locales/zh-tw.json index 1eec73d..fa45bb0 100644 --- a/src/plugins/editor-preview/locales/zh-tw.json +++ b/src/plugins/editor-preview/locales/zh-tw.json @@ -1,9 +1,9 @@ { - "查看内容": "查看內容", - "关闭": "關閉", - "复制": "複製", - "代码预览": "代碼預覽", - "文本预览": "文本預覽", - "点击查看": "點擊查看", - "复制成功": "複製成功" -} + "查看内容": "查看內容", + "关闭": "關閉", + "复制": "複製", + "代码预览": "代碼預覽", + "文本预览": "文本預覽", + "点击查看": "點擊查看", + "复制成功": "複製成功" +} \ No newline at end of file diff --git a/src/plugins/editor-wang/locales/en.json b/src/plugins/editor-wang/locales/en.json index 2008c53..26c6021 100644 --- a/src/plugins/editor-wang/locales/en.json +++ b/src/plugins/editor-wang/locales/en.json @@ -1,3 +1,3 @@ { - "请输入": "Please enter" -} + "请输入": "Please enter" +} \ No newline at end of file diff --git a/src/plugins/editor-wang/locales/zh-cn.json b/src/plugins/editor-wang/locales/zh-cn.json index 4127826..782d2a0 100644 --- a/src/plugins/editor-wang/locales/zh-cn.json +++ b/src/plugins/editor-wang/locales/zh-cn.json @@ -1,3 +1,3 @@ { - "请输入": "请输入" -} + "请输入": "请输入" +} \ No newline at end of file diff --git a/src/plugins/editor-wang/locales/zh-tw.json b/src/plugins/editor-wang/locales/zh-tw.json index 4cb3689..1d8a10f 100644 --- a/src/plugins/editor-wang/locales/zh-tw.json +++ b/src/plugins/editor-wang/locales/zh-tw.json @@ -1,3 +1,3 @@ { - "请输入": "請輸入" -} + "请输入": "請輸入" +} \ No newline at end of file diff --git a/src/plugins/excel/locales/en.json b/src/plugins/excel/locales/en.json index c475022..7c091bd 100644 --- a/src/plugins/excel/locales/en.json +++ b/src/plugins/excel/locales/en.json @@ -1,17 +1,17 @@ { - "导入": "Import", - "下载模版": "Download Template", - "重新上传": "Re-upload", - "批量删除": "Batch Delete", - "序号": "No.", - "操作": "Operation", - "删除": "Delete", - "请按照模版填写信息": "Please fill in the information according to the template", - "提交": "Submit", - "请选择文件": "Please select a file", - "[cl-import-btn] onSubmit is required": "[cl-import-btn] onSubmit is required", - "导出数据异常": "Export data exception", - "导出": "Export", - "选择列": "Select columns", - "请先选择要导出的列": "Please select the columns to be exported first" -} + "导入": "Import", + "下载模版": "Download Template", + "重新上传": "Re-upload", + "批量删除": "Batch Delete", + "序号": "Serial Number", + "操作": "Operation", + "删除": "Delete", + "请按照模版填写信息": "Please fill in the information according to the template", + "提交": "Submit", + "请选择文件": "Please select a file", + "[cl-import-btn] onSubmit is required": "[cl-import-btn] onSubmit is required", + "导出数据异常": "Export data exception", + "导出": "Export", + "选择列": "Select Columns", + "请先选择要导出的列": "Please select the columns to be exported first" +} \ No newline at end of file diff --git a/src/plugins/excel/locales/zh-cn.json b/src/plugins/excel/locales/zh-cn.json index 856262e..4fee4f3 100644 --- a/src/plugins/excel/locales/zh-cn.json +++ b/src/plugins/excel/locales/zh-cn.json @@ -1,17 +1,17 @@ { - "导入": "导入", - "下载模版": "下载模版", - "重新上传": "重新上传", - "批量删除": "批量删除", - "序号": "序号", - "操作": "操作", - "删除": "删除", - "请按照模版填写信息": "请按照模版填写信息", - "提交": "提交", - "请选择文件": "请选择文件", - "[cl-import-btn] onSubmit is required": "[cl-import-btn] onSubmit is required", - "导出数据异常": "导出数据异常", - "导出": "导出", - "选择列": "选择列", - "请先选择要导出的列": "请先选择要导出的列" -} + "导入": "导入", + "下载模版": "下载模版", + "重新上传": "重新上传", + "批量删除": "批量删除", + "序号": "序号", + "操作": "操作", + "删除": "删除", + "请按照模版填写信息": "请按照模版填写信息", + "提交": "提交", + "请选择文件": "请选择文件", + "[cl-import-btn] onSubmit is required": "[cl-import-btn] onSubmit is required", + "导出数据异常": "导出数据异常", + "导出": "导出", + "选择列": "选择列", + "请先选择要导出的列": "请先选择要导出的列" +} \ No newline at end of file diff --git a/src/plugins/excel/locales/zh-tw.json b/src/plugins/excel/locales/zh-tw.json index fa30aa3..939beb9 100644 --- a/src/plugins/excel/locales/zh-tw.json +++ b/src/plugins/excel/locales/zh-tw.json @@ -1,17 +1,17 @@ { - "导入": "導入", - "下载模版": "下載模版", - "重新上传": "重新上傳", - "批量删除": "批量刪除", - "序号": "序號", - "操作": "操作", - "删除": "刪除", - "请按照模版填写信息": "請按照模版填寫信息", - "提交": "提交", - "请选择文件": "請選擇文件", - "[cl-import-btn] onSubmit is required": "[cl-import-btn] onSubmit is required", - "导出数据异常": "導出數據異常", - "导出": "導出", - "选择列": "選擇列", - "请先选择要导出的列": "請先選擇要導出的列" -} + "导入": "導入", + "下载模版": "下載模版", + "重新上传": "重新上傳", + "批量删除": "批量刪除", + "序号": "序號", + "操作": "操作", + "删除": "刪除", + "请按照模版填写信息": "請按照模版填寫信息", + "提交": "提交", + "请选择文件": "請選擇文件", + "[cl-import-btn] onSubmit is required": "[cl-import-btn] onSubmit is required", + "导出数据异常": "導出數據異常", + "导出": "導出", + "选择列": "選擇列", + "请先选择要导出的列": "請先選擇要導出的列" +} \ No newline at end of file diff --git a/src/plugins/theme/locales/en.json b/src/plugins/theme/locales/en.json index 97423ab..754bf3a 100644 --- a/src/plugins/theme/locales/en.json +++ b/src/plugins/theme/locales/en.json @@ -1,16 +1,16 @@ { - "默认": "Default", - "翠绿": "Emerald", - "紫檀": "Rosewood", - "金橙": "Golden Orange", - "樱桃": "Cherry", - "薄荷": "Mint", - "青灰": "Slate Gray", - "珊瑚": "Coral", - "设置主题": "Set Theme", - "推荐": "Recommend", - "自定义主色": "Customize Primary Color", - "菜单分组显示": "Group Menu Display", - "转场动画": "Transition Animation", - "切换主题": "Switch Theme" -} + "默认": "Default", + "翠绿": "Emerald", + "紫檀": "Rosewood", + "金橙": "Gold Orange", + "樱桃": "Cherry", + "薄荷": "Mint", + "青灰": "Slate Gray", + "珊瑚": "Coral", + "设置主题": "Set Theme", + "推荐": "Recommend", + "自定义主色": "Customize Primary Color", + "菜单分组显示": "Group Menu Display", + "转场动画": "Transition Animation", + "切换主题": "Switch Theme" +} \ No newline at end of file diff --git a/src/plugins/theme/locales/zh-cn.json b/src/plugins/theme/locales/zh-cn.json index e4bacc8..874c45e 100644 --- a/src/plugins/theme/locales/zh-cn.json +++ b/src/plugins/theme/locales/zh-cn.json @@ -1,16 +1,16 @@ { - "默认": "默认", - "翠绿": "翠绿", - "紫檀": "紫檀", - "金橙": "金橙", - "樱桃": "樱桃", - "薄荷": "薄荷", - "青灰": "青灰", - "珊瑚": "珊瑚", - "设置主题": "设置主题", - "推荐": "推荐", - "自定义主色": "自定义主色", - "菜单分组显示": "菜单分组显示", - "转场动画": "转场动画", - "切换主题": "切换主题" -} + "默认": "默认", + "翠绿": "翠绿", + "紫檀": "紫檀", + "金橙": "金橙", + "樱桃": "樱桃", + "薄荷": "薄荷", + "青灰": "青灰", + "珊瑚": "珊瑚", + "设置主题": "设置主题", + "推荐": "推荐", + "自定义主色": "自定义主色", + "菜单分组显示": "菜单分组显示", + "转场动画": "转场动画", + "切换主题": "切换主题" +} \ No newline at end of file diff --git a/src/plugins/theme/locales/zh-tw.json b/src/plugins/theme/locales/zh-tw.json index 64090d3..708d23c 100644 --- a/src/plugins/theme/locales/zh-tw.json +++ b/src/plugins/theme/locales/zh-tw.json @@ -1,16 +1,16 @@ { - "默认": "預設", - "翠绿": "翠綠", - "紫檀": "紫檀", - "金橙": "金橙", - "樱桃": "櫻桃", - "薄荷": "薄荷", - "青灰": "青灰", - "珊瑚": "珊瑚", - "设置主题": "設定主題", - "推荐": "推薦", - "自定义主色": "自訂主色", - "菜单分组显示": "選單分組顯示", - "转场动画": "轉場動畫", - "切换主题": "切換主題" -} + "默认": "默認", + "翠绿": "翠綠", + "紫檀": "紫檀", + "金橙": "金橙", + "樱桃": "櫻桃", + "薄荷": "薄荷", + "青灰": "青灰", + "珊瑚": "珊瑚", + "设置主题": "設置主題", + "推荐": "推薦", + "自定义主色": "自定義主色", + "菜单分组显示": "菜單分組顯示", + "转场动画": "轉場動畫", + "切换主题": "切換主題" +} \ No newline at end of file diff --git a/src/plugins/upload/locales/en.json b/src/plugins/upload/locales/en.json index 52338e6..e7f1bbb 100644 --- a/src/plugins/upload/locales/en.json +++ b/src/plugins/upload/locales/en.json @@ -1,22 +1,22 @@ { - "文件上传失败": "File upload failed", - "单选": "Single choice", - "多选": "Multiple choice", - "自定义": "Customize", - "选择头像": "Select avatar", - "选择图片": "Select picture", - "文件上传": "File upload", - "拖拽排序": "Drag and sort", - "拖拽上传": "Drag and upload", - "上传": "Upload", - "文件不能大于100k": "The file cannot be larger than 100k", - "点击上传或将文件拖动到此处,文件大小限制{n}M": "Click to upload or drag the file here, file size limit {n}M", - "选择文件": "Select file", - "最多只能上传{n}个文件": "Up to {n} files can be uploaded at most", - "上传文件大小不能超过 {n}MB!": "The uploaded file size cannot exceed {n}MB!", - "文档预览": "Document preview", - "加载失败": "Loading failed", - "预览": "Preview", - "复制链接": "Copy link", - "删除": "Delete" -} + "文件上传失败": "File upload failed", + "单选": "Single choice", + "多选": "Multiple choice", + "自定义": "Customize", + "选择头像": "Select avatar", + "选择图片": "Select picture", + "文件上传": "File upload", + "拖拽排序": "Drag and sort", + "拖拽上传": "Drag and upload", + "上传": "Upload", + "文件不能大于100k": "File cannot be larger than 100k", + "点击上传或将文件拖动到此处,文件大小限制{n}M": "Click to upload or drag the file here, file size limit {n}M", + "选择文件": "Select file", + "最多只能上传{n}个文件": "Up to {n} files can be uploaded at most", + "上传文件大小不能超过 {n}MB!": "The uploaded file size cannot exceed {n}MB!", + "文档预览": "Document preview", + "加载失败": "Load failed", + "预览": "Preview", + "复制链接": "Copy link", + "删除": "Delete" +} \ No newline at end of file diff --git a/src/plugins/upload/locales/zh-cn.json b/src/plugins/upload/locales/zh-cn.json index 0a62570..80e7584 100644 --- a/src/plugins/upload/locales/zh-cn.json +++ b/src/plugins/upload/locales/zh-cn.json @@ -1,22 +1,22 @@ { - "文件上传失败": "文件上传失败", - "单选": "单选", - "多选": "多选", - "自定义": "自定义", - "选择头像": "选择头像", - "选择图片": "选择图片", - "文件上传": "文件上传", - "拖拽排序": "拖拽排序", - "拖拽上传": "拖拽上传", - "上传": "上传", - "文件不能大于100k": "文件不能大于100k", - "点击上传或将文件拖动到此处,文件大小限制{n}M": "点击上传或将文件拖动到此处,文件大小限制{n}M", - "选择文件": "选择文件", - "最多只能上传{n}个文件": "最多只能上传{n}个文件", - "上传文件大小不能超过 {n}MB!": "上传文件大小不能超过 {n}MB!", - "文档预览": "文档预览", - "加载失败": "加载失败", - "预览": "预览", - "复制链接": "复制链接", - "删除": "删除" -} + "文件上传失败": "文件上传失败", + "单选": "单选", + "多选": "多选", + "自定义": "自定义", + "选择头像": "选择头像", + "选择图片": "选择图片", + "文件上传": "文件上传", + "拖拽排序": "拖拽排序", + "拖拽上传": "拖拽上传", + "上传": "上传", + "文件不能大于100k": "文件不能大于100k", + "点击上传或将文件拖动到此处,文件大小限制{n}M": "点击上传或将文件拖动到此处,文件大小限制{n}M", + "选择文件": "选择文件", + "最多只能上传{n}个文件": "最多只能上传{n}个文件", + "上传文件大小不能超过 {n}MB!": "上传文件大小不能超过 {n}MB!", + "文档预览": "文档预览", + "加载失败": "加载失败", + "预览": "预览", + "复制链接": "复制链接", + "删除": "删除" +} \ No newline at end of file diff --git a/src/plugins/upload/locales/zh-tw.json b/src/plugins/upload/locales/zh-tw.json index fa95ee2..3d0a3e8 100644 --- a/src/plugins/upload/locales/zh-tw.json +++ b/src/plugins/upload/locales/zh-tw.json @@ -1,22 +1,22 @@ { - "文件上传失败": "文件上傳失敗", - "单选": "單選", - "多选": "多選", - "自定义": "自定義", - "选择头像": "選擇頭像", - "选择图片": "選擇圖片", - "文件上传": "文件上傳", - "拖拽排序": "拖曳排序", - "拖拽上传": "拖曳上傳", - "上传": "上傳", - "文件不能大于100k": "文件不能大於100k", - "点击上传或将文件拖动到此处,文件大小限制{n}M": "點擊上傳或將文件拖動到此處,文件大小限制{n}M", - "选择文件": "選擇文件", - "最多只能上传{n}个文件": "最多只能上傳{n}個文件", - "上传文件大小不能超过 {n}MB!": "上傳文件大小不能超過 {n}MB!", - "文档预览": "文檔預覽", - "加载失败": "加載失敗", - "预览": "預覽", - "复制链接": "複製鏈接", - "删除": "刪除" -} + "文件上传失败": "文件上傳失敗", + "单选": "單選", + "多选": "多選", + "自定义": "自定義", + "选择头像": "選擇頭像", + "选择图片": "選擇圖片", + "文件上传": "文件上傳", + "拖拽排序": "拖拽排序", + "拖拽上传": "拖拽上傳", + "上传": "上傳", + "文件不能大于100k": "文件不能大於100k", + "点击上传或将文件拖动到此处,文件大小限制{n}M": "點擊上傳或將文件拖動到此處,文件大小限制{n}M", + "选择文件": "選擇文件", + "最多只能上传{n}个文件": "最多只能上傳{n}個文件", + "上传文件大小不能超过 {n}MB!": "上傳文件大小不能超過 {n}MB!", + "文档预览": "文檔預覽", + "加载失败": "加載失敗", + "预览": "預覽", + "复制链接": "複製鏈接", + "删除": "刪除" +} \ No newline at end of file diff --git a/src/plugins/view/locales/en.json b/src/plugins/view/locales/en.json index a34a3f0..7158505 100644 --- a/src/plugins/view/locales/en.json +++ b/src/plugins/view/locales/en.json @@ -1,15 +1,15 @@ { - "标题": "Title", - "刷新": "Refresh", - "添加": "Add", - "搜索关键字": "Search keyword", - "未选择": "Not selected", - "组": "Group", - "列表": "List", - "编辑": "Edit", - "保存成功": "Save successfully", - "此操作将会删除选择的数据,是否继续?": "This operation will delete the selected data. Do you want to continue?", - "提示": "Tip", - "删除成功": "Delete successfully", - "删除": "Delete" -} + "标题": "Title", + "刷新": "Refresh", + "添加": "Add", + "搜索关键字": "Search keyword", + "未选择": "Not selected", + "组": "Group", + "列表": "List", + "编辑": "Edit", + "保存成功": "Save successfully", + "此操作将会删除选择的数据,是否继续?": "This operation will delete the selected data. Do you want to continue?", + "提示": "Tip", + "删除成功": "Delete successfully", + "删除": "Delete" +} \ No newline at end of file diff --git a/src/plugins/view/locales/zh-cn.json b/src/plugins/view/locales/zh-cn.json index b313b1c..902fa30 100644 --- a/src/plugins/view/locales/zh-cn.json +++ b/src/plugins/view/locales/zh-cn.json @@ -1,15 +1,15 @@ { - "标题": "标题", - "刷新": "刷新", - "添加": "添加", - "搜索关键字": "搜索关键字", - "未选择": "未选择", - "组": "组", - "列表": "列表", - "编辑": "编辑", - "保存成功": "保存成功", - "此操作将会删除选择的数据,是否继续?": "此操作将会删除选择的数据,是否继续?", - "提示": "提示", - "删除成功": "删除成功", - "删除": "删除" -} + "标题": "标题", + "刷新": "刷新", + "添加": "添加", + "搜索关键字": "搜索关键字", + "未选择": "未选择", + "组": "组", + "列表": "列表", + "编辑": "编辑", + "保存成功": "保存成功", + "此操作将会删除选择的数据,是否继续?": "此操作将会删除选择的数据,是否继续?", + "提示": "提示", + "删除成功": "删除成功", + "删除": "删除" +} \ No newline at end of file diff --git a/src/plugins/view/locales/zh-tw.json b/src/plugins/view/locales/zh-tw.json index db6fae3..c6ce8c4 100644 --- a/src/plugins/view/locales/zh-tw.json +++ b/src/plugins/view/locales/zh-tw.json @@ -1,15 +1,15 @@ { - "标题": "標題", - "刷新": "刷新", - "添加": "添加", - "搜索关键字": "搜索關鍵字", - "未选择": "未選擇", - "组": "組", - "列表": "列表", - "编辑": "編輯", - "保存成功": "保存成功", - "此操作将会删除选择的数据,是否继续?": "此操作將會刪除選擇的數據,是否繼續?", - "提示": "提示", - "删除成功": "刪除成功", - "删除": "刪除" -} + "标题": "標題", + "刷新": "刷新", + "添加": "添加", + "搜索关键字": "搜索關鍵字", + "未选择": "未選擇", + "组": "組", + "列表": "列表", + "编辑": "編輯", + "保存成功": "保存成功", + "此操作将会删除选择的数据,是否继续?": "此操作將會刪除選擇的數據,是否繼續?", + "提示": "提示", + "删除成功": "刪除成功", + "删除": "刪除" +} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index fa97e1a..0000000 --- a/stats.html +++ /dev/null @@ -1,4949 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - diff --git a/vite.config.ts b/vite.config.ts index ee77316..0c790a7 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,13 +1,13 @@ -import { fileURLToPath, URL } from 'node:url'; -import { ConfigEnv, UserConfig } from 'vite'; -import vue from '@vitejs/plugin-vue'; -import vueJsx from '@vitejs/plugin-vue-jsx'; -import vueDevTools from 'vite-plugin-vue-devtools'; -import compression from 'vite-plugin-compression'; -import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'; -import { visualizer } from 'rollup-plugin-visualizer'; -import { proxy } from './src/config/proxy'; -import { cool } from '@cool-vue/vite-plugin'; +import { fileURLToPath, URL } from "node:url"; +import { ConfigEnv, UserConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; +import vueJsx from "@vitejs/plugin-vue-jsx"; +import compression from "vite-plugin-compression"; +import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite"; +import vueDevTools from "vite-plugin-vue-devtools"; +import { visualizer } from "rollup-plugin-visualizer"; +import { proxy } from "./src/config/proxy"; +import { cool } from "@cool-vue/vite-plugin"; function toPath(dir: string) { return fileURLToPath(new URL(dir, import.meta.url)); @@ -15,7 +15,7 @@ function toPath(dir: string) { // https://vitejs.dev/config export default ({ mode }: ConfigEnv): UserConfig => { - const isDev = mode === 'development'; + const isDev = mode === "development"; return { plugins: [ @@ -24,23 +24,23 @@ export default ({ mode }: ConfigEnv): UserConfig => { vueJsx(), // vueDevTools(), cool({ - type: 'admin', + type: "admin", proxy, eps: { enable: true }, - demo: mode == 'demo' // 是否开启演示模式 - }), - visualizer({ - open: false, - gzipSize: true, - brotliSize: true + demo: mode == "demo" // 是否开启演示模式 }), + // visualizer({ + // open: false, + // gzipSize: true, + // brotliSize: true + // }), VueI18nPlugin({ - include: [toPath('./src/{modules,plugins}/**/locales/**')] + include: [toPath("./src/{modules,plugins}/**/locales/**")] }) ], - base: '/', + base: "/", server: { port: 9000, proxy, @@ -52,23 +52,23 @@ export default ({ mode }: ConfigEnv): UserConfig => { preprocessorOptions: { scss: { charset: false, - api: 'modern-compiler' + api: "modern-compiler" } } }, resolve: { alias: { - '/@': toPath('./src'), - '/$': toPath('./src/modules'), - '/#': toPath('./src/plugins'), - '/~': toPath('./packages') + "/@": toPath("./src"), + "/$": toPath("./src/modules"), + "/#": toPath("./src/plugins"), + "/~": toPath("./packages") } }, esbuild: { - drop: isDev ? [] : ['console', 'debugger'] + drop: isDev ? [] : ["console", "debugger"] }, build: { - minify: 'esbuild', + minify: "esbuild", // terserOptions: { // compress: { // drop_console: true, @@ -78,23 +78,23 @@ export default ({ mode }: ConfigEnv): UserConfig => { sourcemap: isDev, rollupOptions: { output: { - chunkFileNames: 'static/js/[name]-[hash].js', - entryFileNames: 'static/js/[name]-[hash].js', - assetFileNames: 'static/[ext]/[name]-[hash].[ext]', + chunkFileNames: "static/js/[name]-[hash].js", + entryFileNames: "static/js/[name]-[hash].js", + assetFileNames: "static/[ext]/[name]-[hash].[ext]", manualChunks(id) { - if (id.includes('node_modules')) { - if (!['@cool-vue/crud'].find(e => id.includes(e))) { - if (id.includes('prettier')) { + if (id.includes("node_modules")) { + if (!["@cool-vue/crud"].find((e) => id.includes(e))) { + if (id.includes("prettier")) { return; } return id .toString() - .split('node_modules/')[1] - .replace('.pnpm/', '') - .split('/')[0]; + .split("node_modules/")[1] + .replace(".pnpm/", "") + .split("/")[0]; } else { - return 'comm'; + return "comm"; } } }