64 Commits
dev ... vite8

Author SHA1 Message Date
xingyu4j
06c9e8d7c1 fix: type check 2026-03-14 13:39:51 +08:00
xingyu4j
f32818c6aa fix(lint): resolve shared form and utility warnings 2026-03-14 13:28:45 +08:00
xingyu4j
fb03afb6b7 fix(lint): clean up ai rich text views 2026-03-14 13:28:13 +08:00
xingyu4j
577efa56a9 fix(lint): update bpmn designer compatibility code 2026-03-14 13:27:38 +08:00
xingyu4j
cb98b3a47e fix(lint): add ts-expect-error descriptions 2026-03-14 13:27:00 +08:00
xingyu4j
8daf9a3ce5 docs: update version 2026-03-14 12:32:50 +08:00
xingyu4j
a83d8248d7 fix: lint 2026-03-14 12:27:31 +08:00
xingyu4j
4cdc92f759 fix: lint 2026-03-14 12:16:31 +08:00
xingyu4j
54c668c3f0 chore: update deps 2026-03-14 11:37:28 +08:00
xingyu4j
ac3fc6b7d3 Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into vite8 2026-03-14 11:34:06 +08:00
Jin Mao
a6a6efdf59 chore: release 5.7.0
- 更新 backend-mock 包版本
- 更新 web-antd 包版本
- 更新 web-antdv-next 包版本
- 更新 web-ele 包版本
- 更新 web-naive 包版本
- 更新 web-tdesign 包版本
- 更新 docs 包版本
- 更新 commitlint-config 包版本
- 更新 eslint-config 包版本
- 更新 oxfmt-config 包版本
- 更新 oxlint-config 包版本
- 更新 stylelint-config 包版本
- 更新 node-utils 包版本
- 更新 tsconfig 包版本
- 更新 vite-config 包版本
- 更新 @core/base/design 包版本
- 更新 @core/base/icons 包版本
- 更新 @core/base/shared 包版本
- 更新 @core/base/typings 包版本
- 更新 @core/composables 包版本
- 更新 @core/preferences 包版本
- 更新 @core/ui-kit/form-ui 包版本
- 更新 @core/ui-kit/layout-ui 包版本
- 更新 @core/ui-kit/menu-ui 包版本
- 更新 @core/ui-kit/popup-ui 包版本
- 更新 @core/ui-kit/shadcn-ui 包版本
- 更新 @core/ui-kit/tabs-ui 包版本
- 更新 constants 包版本
- 更新 access 包版本
- 更新 common-ui 包版本
- 更新 hooks 包版本
- 更新 layouts 包版本
- 更新 plugins 包版本
- 更新 request 包版本
- 更新 icons 包版本
- 更新 locales 包版本
- 更新 preferences 包版本
- 更新 stores 包版本
- 更新 styles 包版本
- 更新 types 包版本
- 更新 utils 包版本
- 更新 playground 包版本
- 更新 turbo-run 包版本
- 更新 vsh 包版本
- 更新根目录包版本
2026-03-14 09:14:23 +08:00
xingyu4j
8043faf6c7 docs: remove doc 2026-03-14 00:18:54 +08:00
xingyu4j
ebed9e64ed fix: lint 2026-03-14 00:17:06 +08:00
xingyu4j
913636ae44 refactor: simplify oxc eslint compatibility 2026-03-14 00:16:27 +08:00
xingyu4j
7b064e9f33 chore: vsh lint 2026-03-13 23:41:17 +08:00
xingyu4j
16da0eaca3 fix: vsh lint 2026-03-13 23:31:19 +08:00
xingyu4j
6acfee2737 fix: vsh lint 2026-03-13 23:26:29 +08:00
xingyu4j
92abf7edaa chore: oxlint-tsgolint 2026-03-13 23:22:52 +08:00
xingyu4j
395babc1f5 feat: tsgolint 2026-03-13 23:13:10 +08:00
xingyu4j
68cde54bad feat: add tsgolint 2026-03-13 23:13:01 +08:00
xingyu4j
c7d7529c00 chore: ts 2026-03-13 23:07:04 +08:00
xingyu4j
748f60c7bb chore: lint config 2026-03-13 22:12:15 +08:00
xingyu4j
ffee62e940 chore(vscode): update workspace editor settings 2026-03-13 22:02:50 +08:00
xingyu4j
a0ea221131 style(common-ui): normalize generic formatting 2026-03-13 21:57:18 +08:00
xingyu4j
2846bcb84e fix(common-ui): guard resize drag start state 2026-03-13 21:56:53 +08:00
xingyu4j
542ed6c08f refactor: rename formatter utilities 2026-03-13 21:56:23 +08:00
xingyu4j
6dabb848a5 build: migrate formatting pipeline to oxfmt 2026-03-13 21:56:08 +08:00
xingyu4j
de0181e0d9 fix: lint 2026-03-13 20:58:07 +08:00
xingyu4j
a850d426ef chore: fix lint and typecheck issues 2026-03-13 20:57:52 +08:00
xingyu4j
771277d5d9 fix: align oxlint compat config typing 2026-03-13 20:28:56 +08:00
xingyu4j
20b4f5c99f chore: oxlint config 2026-03-13 20:26:10 +08:00
xingyu4j
e7fa87b301 chore: finalize oxlint migration config 2026-03-13 20:25:25 +08:00
xingyu4j
40c66958bc chore: remove un use deps 2026-03-13 15:59:04 +08:00
xingyu4j
600fc71aed fix: eslint 2026-03-13 15:58:53 +08:00
xingyu4j
443e4b04cd chore: update vite 8 2026-03-13 15:51:28 +08:00
xingyu4j
0e4bf80bf4 chore: update deps 2026-03-13 10:33:23 +08:00
橙子
24e1be47ca fix: fix component type (#7601) 2026-03-10 05:11:06 +08:00
Mr. Xie
7e0978c764 fix: 修复验证码登录发送逻辑,未校验手机号或发送失败仍开始倒计时的问题 (#7616) 2026-03-10 05:10:34 +08:00
Leo
83a0c9662d fix: 修复路由重复 (#7590)
* fix: 修复路由重复

优化mixed模式路由合并逻辑。以backend 为基础,并从frontend补充

* fix: 修复名称冲突时子项合并顺序/覆盖(后端子项可能会丢失)。

* fix: 优化可访问性判断逻辑

* fix: error Forbidden non-null assertion

* refactor(access): 调整可访问性判断逻辑
2026-03-10 05:09:48 +08:00
xingyu
a4736a49f8 feat: migrate to Tailwind CSS v4 (#7614)
* chore: update deps

* feat: use jsonc/x language

* chore: update eslint 10.0

* fix: no-useless-assignment

* feat: add CLAUDE.md

* chore: ignore

* feat: claude

* fix: lint

* chore: suppot eslint v10

* fix: lint

* fix: lint

* fix: type check

* fix: unit test

* fix: Suggested fix

* fix: unit test

* chore: update stylelint v17

* chore: update all major deps

* fix:  echarts console warn

* chore: update vitest v4

* feat: add skills ignores

* chore: update deps

* chore: update deps

* fix: cspell

* chore: update deps

* chore: update tailwindcss v4

* chore: remove postcss config

* fix: no use catalog

* chore: tailwind v4 config

* fix: tailwindcss v4 sort

* feat: use eslint-plugin-better-tailwindcss

* fix: Interference between enforce-consistent-line-wrapping, jsx-curly-brace-presence and Prettier

* fix: Interference between enforce-consistent-line-wrapping, jsx-curly-brace-presence and Prettier

* fix(lint): resolve prettier and better-tailwindcss formatting conflicts

* fix(tailwind): update theme references and lint sources

* style(format): normalize apps docs and playground vue files

* style(format): normalize core ui-kit components

* style(format): normalize effects ui and layout components
2026-03-10 05:08:45 +08:00
zouawen
aa7d8630b5 fix: 侧边菜单栏拖拽优化 (#7606)
* fix: 拖拽使用遮罩层实现,使得拖拽到min或max临界值时cursor显示not-allowed,同时拖拽线条颜色变浅,类似于disabled,提升用户体验

* fix: 修复代码审查建议;修复lint和test报错

* fix: 修复遮罩层挡住hover:bg-primary视觉效果问题
2026-03-07 05:32:09 +08:00
zouawen
2a86404ba5 fix: 修复混合双列布局侧边栏拖拽线条位置显示bug,同步修复普通布局和混合双列布局切换时width计算导致侧边栏宽度显示异常问题,新增普通布局和混合双列布局侧边栏菜单折叠状态同步 (#7596) 2026-03-02 15:31:29 +08:00
han
b8a0199cde feat(preferences): add toggle for copy preferences button (#7594)
Co-authored-by: hl <hl@nmcsoft.com>
2026-03-02 15:30:38 +08:00
Bryan Qiu
a46ed55a86 fix: bump version to 5.6.0 (#7592) 2026-03-02 04:22:21 +08:00
Jin Mao
1a9fbddef4 Merge branch 'main' into main 2026-02-28 12:04:48 +08:00
zouawen
1209aaafb4 fix: 修复lint报错 2026-02-28 11:25:08 +08:00
zouawen
8e71261d49 fix: 侧边栏菜单拖拽功能在设置内增加开关 2026-02-28 11:19:24 +08:00
dependabot[bot]
49e45eab54 chore(deps): bump vue-router from 4.6.4 to 5.0.3 (#7583)
Bumps [vue-router](https://github.com/vuejs/router) from 4.6.4 to 5.0.3.
- [Release notes](https://github.com/vuejs/router/releases)
- [Commits](https://github.com/vuejs/router/compare/v4.6.4...v5.0.3)

---
updated-dependencies:
- dependency-name: vue-router
  dependency-version: 5.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-27 17:06:18 +08:00
Jin Mao
bd22793ceb feat: add the attribute routeCached to route to control cache the DOM corresponding to the route 2026-02-27 16:04:01 +08:00
zouawen
b2013436c5 fix: 优化最大值限制 2026-02-27 11:12:51 +08:00
zouawen
cc808cb8c5 fix: 优化最小值限制 2026-02-27 11:07:28 +08:00
zouawen
afffc4b3f0 fix: 优化侧边栏拖拽逻辑,支持展开和折叠 2026-02-27 10:54:15 +08:00
zouawen
99710ef9dc feat: 优化侧边栏拖拽逻辑 2026-02-26 18:11:53 +08:00
zouawen
3d4ae04d9b Merge branch 'main' into main 2026-02-26 10:20:32 +08:00
zouawen
707b391449 feat: 侧边栏宽度拖拽改为composable实现,同时修复tabbar.ts文件lint报错 2026-02-26 10:09:57 +08:00
ming4762
45b843f344 fix: fix bug where renderEcharts gets stuck in a dead loop (#7561)
* 触发条件:echart所在页面开启keepalive 在其他页面切换颜色模式
2026-02-26 06:21:08 +08:00
Wu Clan
191fd90f06 chore: 更新表单描述显示样式 (#6938) 2026-02-26 06:17:04 +08:00
moil-xm
05920cd66d feat(vite-config): vite export typing (#7569)
* feat(vite-config): vite export typing

* feat(vite-config): add type

---------

Co-authored-by: Jin Mao <50581550+jinmao88@users.noreply.github.com>
2026-02-26 06:14:12 +08:00
Jin Mao
01508d5e42 fix: fix lint 2026-02-26 05:45:36 +08:00
zouawen
57cf6cbc9e feature: 简易版菜单宽度拖拽功能 2026-02-25 17:50:22 +08:00
AxiosLeo
03ebbea46a fix(menu): update hover color variable to use the correct reference (#7544)
* fix(menu): update hover color variable to use the correct reference

Medium Severity

In the horizontal .is-light menu section, --menu-item-hover-color is set to hsl(var(--menu-item-color)), but --menu-item-color is already defined as hsl(var(--accent-foreground)). This results in hsl(hsl(...)) at computed-value time, which is invalid CSS. The non-horizontal .is-light block correctly uses var(--menu-item-color) without the extra hsl() wrapper.

* fix(menu): simplify hover styles by removing redundant nested hover rules

Low Severity

The SCSS &:not(.is-active):hover { &:hover { ... } } compiles to a :hover:hover pseudo-class chain, which is functionally identical to a single :hover. The inner &:hover nesting is redundant and adds unnecessary complexity compared to placing styles directly inside the &:not(.is-active):hover block.
2026-02-12 22:22:53 +08:00
zouawen
8e7a5d1ec3 fix: Fix layout change, ensure div[ref="asideRef"] is contained within <aside> (#7551) 2026-02-12 22:22:34 +08:00
AxiosLeo
aa74a2535b fix(tabbar): visitHistory field (#7543)
High Severity

The visitHistory field is a Stack<string> class instance persisted to sessionStorage via pinia-plugin-persistedstate. There's no custom serializer or hydration hook. When the page reloads, JSON.parse(JSON.stringify(stack)) produces a plain object {dedup, items, maxSize} that lacks all Stack methods (push, pop, remove, retain, etc.) and the size getter. Pinia's $patch replaces the Stack instance with this plain object, so subsequent calls like this.visitHistory.push(...) will throw a TypeError.
2026-02-11 16:09:37 +08:00
zouawen
32379ba4b7 fix: 双列菜单模式下新增深色侧边栏和深色侧边栏子栏 (#7542)
* fix: 双列菜单模式下新增深色侧边栏和深色侧边栏子栏

* fix: 修复报错 config.test.ts.snap

* fix: 修复lint报错

* fix: 修复侧边栏菜单文本内容溢出问题

* fix: 修复lint报错
2026-02-11 16:08:32 +08:00
539 changed files with 9548 additions and 8824 deletions

7
.gitignore vendored
View File

@@ -50,3 +50,10 @@ vite.config.ts.*
*.sw?
.history
.cursor
# AI
.agent
.agents
.claude
.codex
skills-lock.json

4
.npmrc
View File

@@ -1,8 +1,8 @@
registry=https://registry.npmmirror.com
public-hoist-pattern[]=lefthook
public-hoist-pattern[]=eslint
public-hoist-pattern[]=prettier
public-hoist-pattern[]=prettier-plugin-tailwindcss
public-hoist-pattern[]=oxfmt
public-hoist-pattern[]=oxlint
public-hoist-pattern[]=stylelint
public-hoist-pattern[]=*postcss*
public-hoist-pattern[]=@commitlint/*

View File

@@ -1,18 +0,0 @@
dist
dev-dist
.local
.output.js
node_modules
.nvmrc
coverage
CODEOWNERS
.nitro
.output
**/*.svg
**/*.sh
public
.npmrc
*-lock.yaml

View File

@@ -1 +0,0 @@
export { default } from '@vben/prettier-config';

View File

@@ -2,3 +2,7 @@ dist
public
__tests__
coverage
.codex
.claude
.agent
.agents

View File

@@ -2,12 +2,12 @@
"recommendations": [
// Vue 3 的语言支持
"Vue.volar",
// 将 ESLint JavaScript 集成到 VS Code 中。
"dbaeumer.vscode-eslint",
// 将 oxlint 集成到 VS Code 中。
"oxc.oxc-vscode",
// Visual Studio Code 的官方 Stylelint 扩展
"stylelint.vscode-stylelint",
// 使用 Prettier 的代码格式化程序
"esbenp.prettier-vscode",
// 使用 oxfmt 的代码格式化程序
"oxc.oxc-vscode",
// 支持 dotenv 文件语法
"mikestead.dotenv",
// 源代码的拼写检查器

46
.vscode/settings.json vendored
View File

@@ -1,5 +1,6 @@
{
"tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts",
"tailwindCSS.experimental.configFile": "packages/@core/base/design/src/css/global.css",
"tailwindCSS.lint.suggestCanonicalClasses": "ignore",
// workbench
"workbench.list.smoothScrolling": true,
"workbench.startupEditor": "newUntitledFile",
@@ -31,39 +32,49 @@
"editor.autoClosingOvertype": "always",
"editor.autoClosingQuotes": "beforeWhitespace",
"editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?",
"editor.quickSuggestions": {
"strings": "on"
},
// lint && format
"oxc.enable": true,
"oxc.typeAware": true,
"oxc.configPath": "oxlint.config.ts",
"oxc.fmt.configPath": "oxfmt.config.ts",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.oxc": "explicit",
"source.fixAll.stylelint": "explicit",
"source.organizeImports": "never"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "oxc.oxc-vscode",
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
// extensions
"extensions.ignoreRecommendations": true,
@@ -79,6 +90,7 @@
"files.insertFinalNewline": true,
"files.simpleDialog.enable": true,
"files.associations": {
"*.css": "tailwindcss",
"*.ejs": "html",
"*.art": "html",
"**/tsconfig.json": "jsonc",
@@ -118,7 +130,7 @@
// search
"search.searchEditor.singleClickBehaviour": "peekDefinition",
"search.followSymlinks": false,
// 使用搜索功能时,将这些文件夹/文件排除在外
// 使用搜索功能时,将这些文件文件排除在外
"search.exclude": {
"**/node_modules": true,
"**/*.log": true,
@@ -193,7 +205,7 @@
"*": false
},
"cssVariables.lookupFiles": ["packages/core/base/design/src/**/*.css"],
"cssVariables.lookupFiles": ["packages/@core/base/design/src/**/*.css"],
"i18n-ally.localesPaths": [
"packages/locales/src/langs",
@@ -218,12 +230,10 @@
"*.env": "$(capture).env.*",
"README.md": "README*,CHANGELOG*,LICENSE,CNAME",
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,.gitattributes,.gitignore,.gitpod.yml,.npmrc,.browserslistrc,.node-version,.git*,.tazerc.json",
"eslint.config.mjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json,lefthook.yml",
"tailwind.config.mjs": "postcss.*"
"oxlint.config.ts": ".eslintignore,.stylelintignore,.commitlintrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json,lefthook.yml,oxfmt.config.*,eslint.config.*"
},
"commentTranslate.hover.enabled": false,
"commentTranslate.multiLineMerge": true,
"vue.server.hybridMode": true,
"typescript.tsdk": "node_modules/typescript/lib",
"oxc.enable": false
"typescript.tsdk": "node_modules/typescript/lib"
}

View File

@@ -9,7 +9,7 @@
## 🐶 新手必读
- nodejs > v20.19.0 | v22 | v24 && pnpm > 10.20.0 (强制使用pnpm)
- nodejs >= v20.19.0(推荐 v22 / v24 && pnpm >= 10.32.1强制使用 pnpm
- 演示地址【Vue3 + element-plus】<http://dashboard-vue3.yudao.iocoder.cn>
- 演示地址【Vue3 + vben5(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
- 演示地址【Vue2 + element-ui】<http://dashboard.yudao.iocoder.cn>
@@ -20,12 +20,12 @@
**芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
- 采用最新 [vue-vben-admin](https://github.com/vbenjs/vue-vben-admin) v5 实现
- 采用最新 [vue-vben-admin](https://github.com/vbenjs/vue-vben-admin) v5.7.0 实现
- 支持 [Ant Design Vue](https://www.antdv.com/) | [Element Plus](https://element-plus.org/zh-CN/) | [Naive UI](https://www.naiveui.com/) | [TDesign](https://tdesign.tencent.com/) 多种免费开源的中后台模版,具备如下特性:
![首页](.gitee/image/demo/vben.png)
- **最新技术栈**:使用 Vue3、Vite7 等前端前沿技术开发
- **最新技术栈**:使用 Vue3、Vite8 等前端前沿技术开发
- **TypeScript**: 应用程序级 JavaScript 的语言
- **主题**: 提供多套主题色彩,可配置自定义主题
- **国际化**:内置完善的国际化方案
@@ -41,24 +41,24 @@
| 框架 | 说明 | 版本 |
| --- | --- | --- |
| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.27 |
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 7.3.1 |
| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.30 |
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 8.0.0 |
| [Ant Design Vue](https://www.antdv.com/) | Ant Design Vue | 4.2.6 |
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.13.1 |
| [Naive UI](https://www.naiveui.com/) | Naive UI | 2.43.2 |
| [TDesign](https://tdesign.tencent.com/) | TDesign | 1.18.0 |
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.13.5 |
| [Naive UI](https://www.naiveui.com/) | Naive UI | 2.44.1 |
| [TDesign](https://tdesign.tencent.com/) | TDesign | 1.18.5 |
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 超集 | 5.9.3 |
| [pinia](https://pinia.vuejs.org/) | Vue 存储库替代 vuex5 | 3.0.4 |
| [vueuse](https://vueuse.org/) | 常用工具集 | 14.1.0 |
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.2.8 |
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.6.4 |
| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 3.4.19 |
| [vueuse](https://vueuse.org/) | 常用工具集 | 14.2.1 |
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.3.0 |
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 5.0.3 |
| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 4.2.1 |
| [Iconify](https://iconify.design/) | 图标组件 | 5.0.0 |
| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.431 |
| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.449 |
| [TinyMCE](https://www.tiny.cloud/) | 富文本编辑器 | 7.3.0 |
| [Echarts](https://echarts.apache.org/) | 图表库 | 6.0.0 |
| [axios](https://axios-http.com/) | http客户端 | 1.13.2 |
| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.19 |
| [axios](https://axios-http.com/) | http客户端 | 1.13.6 |
| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.20 |
| [vee-validate](https://vee-validate.logaretm.com/) | 表单验证 | 4.15.1 |
| [zod](https://zod.dev/) | 数据验证 | 3.25.76 |

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/web-antd",
"version": "5.6.0",
"version": "5.7.0",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1 +0,0 @@
export { default } from '@vben/tailwind-config/postcss';

View File

@@ -2537,12 +2537,12 @@ interface EditorSelection {
normalize: () => Range;
selectorChanged: (selector: string, callback: (active: boolean, args: {
node: Node;
selector: String;
selector: string;
parents: Node[];
}) => void) => EditorSelection;
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
node: Node;
selector: String;
selector: string;
parents: Node[];
}) => void) => {
unbind: () => void;
@@ -3217,9 +3217,9 @@ interface Tools {
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
};
extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
extend: (obj: object, ext: object, ...objs: object[]) => any;
walk: <T extends Record<string, any>>(obj: T, f: WalkCallback<T>, n?: keyof T, scope?: any) => void;
resolve: (path: string, o?: Object) => any;
resolve: (path: string, o?: object) => any;
explode: (s: string | string[], d?: string | RegExp) => string[];
_addCacheSuffix: (url: string) => string;
}

View File

@@ -199,7 +199,7 @@ setupVbenVxeTable({
vxeUI.renderer.add('CellOperation', {
renderTableDefault({ attrs, options, props }, { column, row }) {
const defaultProps = { size: 'small', type: 'link', ...props };
let align = 'end';
let align: string;
switch (column.align) {
case 'center': {
align = 'center';

View File

@@ -16,10 +16,10 @@ export namespace CrmCustomerLimitConfigApi {
/** 客户限制配置类型 */
export enum LimitConfType {
/** 锁定客户数限制 */
CUSTOMER_LOCK_LIMIT = 2,
/** 拥有客户数限制 */
CUSTOMER_QUANTITY_LIMIT = 1,
/** 锁定客户数限制 */
CUSTOMER_LOCK_LIMIT = 2,
}
/** 查询客户限制配置列表 */

View File

@@ -35,11 +35,11 @@ export namespace CrmPermissionApi {
* CRM 业务类型枚举
*/
export enum BizTypeEnum {
CRM_BUSINESS = 4, // 商机
CRM_CLUE = 1, // 线索
CRM_CONTACT = 3, // 联系人
CRM_CONTRACT = 5, // 合同
CRM_CUSTOMER = 2, // 客户
CRM_CONTACT = 3, // 联系人
CRM_BUSINESS = 4, // 商机
CRM_CONTRACT = 5, // 合同
CRM_PRODUCT = 6, // 产品
CRM_RECEIVABLE = 7, // 回款
CRM_RECEIVABLE_PLAN = 8, // 回款计划

View File

@@ -37,16 +37,12 @@ export function getModbusPoint(id: number) {
}
/** 创建 Modbus 点位配置 */
export function createModbusPoint(
data: IotDeviceModbusPointApi.ModbusPoint,
) {
export function createModbusPoint(data: IotDeviceModbusPointApi.ModbusPoint) {
return requestClient.post('/iot/device-modbus-point/create', data);
}
/** 更新 Modbus 点位配置 */
export function updateModbusPoint(
data: IotDeviceModbusPointApi.ModbusPoint,
) {
export function updateModbusPoint(data: IotDeviceModbusPointApi.ModbusPoint) {
return requestClient.put('/iot/device-modbus-point/update', data);
}

View File

@@ -119,7 +119,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
response.data = apiEncrypt.decryptResponse(response.data);
} catch (error) {
console.error('响应数据解密失败:', error);
throw new Error(`响应数据解密失败: ${(error as Error).message}`);
throw new Error(`响应数据解密失败: ${(error as Error).message}`, {
cause: error,
});
}
}
return response;

View File

@@ -21,7 +21,7 @@ export function useDescription(options?: Partial<DescriptionProps>) {
inheritAttrs: false,
setup(_props, { attrs, slots }) {
return () => {
// @ts-ignore - 避免类型实例化过深
// @ts-expect-error - 避免类型实例化过深
return h(Description, { ...propsState, ...attrs }, slots);
};
},

View File

@@ -2,10 +2,11 @@
<script lang="ts" setup>
import { onMounted, ref, watch } from 'vue';
import { AreaLevelEnum } from '@vben/constants';
import { Cascader } from 'ant-design-vue';
import { getAreaTree } from '#/api/system/area';
import { AreaLevelEnum } from '@vben/constants';
defineOptions({ name: 'AreaSelect' });
@@ -40,12 +41,13 @@ interface AreaVO {
interface Props {
modelValue?: number[] | string[];
value?: number[] | string[];
level?: typeof AreaLevelEnum[keyof typeof AreaLevelEnum];
level?: (typeof AreaLevelEnum)[keyof typeof AreaLevelEnum];
disabled?: boolean;
placeholder?: string;
clearable?: boolean;
showAllLevels?: boolean;
separator?: string;
// eslint-disable-next-line vue/require-default-prop
formCreateInject?: any;
}
@@ -70,7 +72,7 @@ async function loadAreaTree(): Promise<void> {
const data = await getAreaTree();
// 根据 level 限制层级
areaTree.value = filterTreeByLevel(data || [], props.level);
areaTree.value = filterTreeByLevel((data || []) as AreaVO[], props.level);
} catch (error) {
console.warn('[AreaSelect] 加载地区数据失败:', error);
areaTree.value = [];
@@ -99,7 +101,7 @@ function filterTreeByLevel(tree: AreaVO[], maxLevel: number): AreaVO[] {
}
// 处理选中值变化
function handleChange(value: number[] | undefined): void {
function handleChange(value: any): void {
if (value === undefined || value === null) {
emit('update:modelValue', undefined);
emit('update:value', undefined);

View File

@@ -39,15 +39,16 @@ interface DeptVO {
status?: number;
}
// TODO @puhui999linter 报错;
/** 接受父组件参数 */
interface Props {
// eslint-disable-next-line vue/require-default-prop
modelValue?: number | number[] | string | string[];
multiple?: boolean;
returnType?: 'id' | 'name';
defaultCurrentDept?: boolean;
disabled?: boolean;
placeholder?: string;
// eslint-disable-next-line vue/require-default-prop
formCreateInject?: any;
}

View File

@@ -29,6 +29,7 @@ interface Props {
allowfullscreen?: boolean;
loading?: 'eager' | 'lazy';
sandbox?: string;
// eslint-disable-next-line vue/require-default-prop
formCreateInject?: any;
}
@@ -72,9 +73,9 @@ const showPreview = computed(() => {
}
.iframe-preview {
overflow: hidden;
border: 1px solid #d9d9d9;
border-radius: 4px;
overflow: hidden;
}
.iframe-content {
@@ -87,8 +88,8 @@ const showPreview = computed(() => {
align-items: center;
justify-content: center;
min-height: 200px;
background-color: #fafafa;
border: 1px dashed #d9d9d9;
border-radius: 4px;
background-color: #fafafa;
}
</style>

View File

@@ -193,7 +193,8 @@ export function useApiSelect(option: ApiSelectProps) {
let parse: any = null;
if (props.parseFunc) {
// 解析字符串函数
// eslint-disable-next-line no-new-func
// oxlint-disable-next-line typescript/no-implied-eval
// oxlint-disable-next-line no-new-func, typescript/no-implied-eval
parse = new Function(`return ${props.parseFunc}`)();
}
return parse;

View File

@@ -11,14 +11,14 @@ import formCreate from '@form-create/ant-design-vue';
import { apiSelectRule } from '#/components/form-create/rules/data';
import {
useAreaSelectRule,
useDictSelectRule,
useEditorRule,
useIframeRule,
useSelectRule,
useUploadFileRule,
useUploadImageRule,
useUploadImagesRule,
useIframeRule,
useAreaSelectRule,
} from './rules';
/** 编码表单 Conf */

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-template-curly-in-string */
const selectRule = [
{
type: 'select',
@@ -134,7 +133,7 @@ const apiSelectRule = [
type: 'input',
field: 'labelField',
title: 'label 属性',
info: '可以使用 el 表达式:${属性},来实现复杂数据组合。如:${nickname}-${id}',
info: `可以使用 el 表达式:\${},来实现复杂数据组合。如:\${nickname}-\${id}`,
props: {
placeholder: 'nickname',
},
@@ -143,7 +142,7 @@ const apiSelectRule = [
type: 'input',
field: 'valueField',
title: 'value 属性',
info: '可以使用 el 表达式:${属性},来实现复杂数据组合。如:${nickname}-${id}',
info: `可以使用 el 表达式:\${},来实现复杂数据组合。如:\${nickname}-\${id}`,
props: {
placeholder: 'id',
},

View File

@@ -1,8 +1,9 @@
import { AreaLevelEnum } from '@vben/constants';
import {
localeProps,
makeRequiredRule,
} from '#/components/form-create/helpers';
import { AreaLevelEnum } from '@vben/constants';
/** 省市区选择器规则 */
export function useAreaSelectRule() {

View File

@@ -47,6 +47,7 @@ onMounted(async () => {
</script>
<template>
<!-- eslint-disable-next-line vue/no-v-html -->
<div ref="contentRef" class="markdown-view" v-html="renderedMarkdown"></div>
</template>

View File

@@ -146,6 +146,7 @@ async function handlePreview(file: UploadFile) {
async function handleRemove(file: UploadFile) {
if (fileList.value) {
const index = fileList.value.findIndex((item) => item.uid === file.uid);
// oxlint-disable-next-line no-unused-expressions
index !== -1 && fileList.value.splice(index, 1);
const value = getValue();
isInnerOperate.value = true;
@@ -350,6 +351,8 @@ function getValue() {
<style>
.ant-upload-select-picture-card {
@apply flex items-center justify-center;
display: flex;
align-items: center;
justify-content: center;
}
</style>

View File

@@ -83,6 +83,7 @@ export const useAuthStore = defineStore('auth', () => {
if (accessStore.loginExpired) {
accessStore.setLoginExpired(false);
} else {
// oxlint-disable-next-line no-unused-expressions
onSuccess
? await onSuccess?.()
: await router.push(
@@ -132,6 +133,7 @@ export const useAuthStore = defineStore('auth', () => {
async function fetchUserInfo() {
// 加载
// eslint-disable-next-line no-useless-assignment
let authPermissionInfo: AuthPermissionInfo | null = null;
authPermissionInfo = await getAuthPermissionInfoApi();
// userStore

View File

@@ -34,9 +34,7 @@ export const findIndex = <T = Recordable<any>>(
*/
export const isUrl = (path: string): boolean => {
// fix:修复hash路由无法跳转的问题
/* eslint-disable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
const reg =
/(((^https?:(?:\/\/)?)(?:[-:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%#/.\w-]*)?\??[-+=&%@.\w]*(?:#\w*)?)?)$/;
return reg.test(path);
/* eslint-enable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
};

View File

@@ -571,6 +571,7 @@ onMounted(async () => {
size="small"
@click="openChatConversationUpdateForm"
>
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-html="activeConversation?.modelName"></span>
<IconifyIcon icon="lucide:settings" class="ml-2 size-4" />
</Button>

View File

@@ -21,6 +21,7 @@ const imageListRef = ref<any>(); // image 列表 ref
const dall3Ref = ref<any>(); // dall3(openai) ref
const midjourneyRef = ref<any>(); // midjourney ref
const stableDiffusionRef = ref<any>(); // stable diffusion ref
// @ts-expect-error: template ref is retained for future provider expansion
const commonRef = ref<any>(); // stable diffusion ref
const selectPlatform = ref('common'); // 选中的平台
@@ -45,7 +46,9 @@ const platformOptions = [
const models = ref<AiModelModelApi.Model[]>([]); // 模型列表
/** 绘画 start */
async function handleDrawStart() {}
function handleDrawStart() {
// drawing state is handled by child components
}
/** 绘画 complete */
async function handleDrawComplete() {

View File

@@ -150,10 +150,12 @@ defineExpose({
ref="mdContainerRef"
class="wh-full overflow-y-auto"
>
<!-- eslint-disable vue/no-v-html -->
<div
class="flex flex-col items-center justify-center"
v-html="html"
></div>
<!-- eslint-enable vue/no-v-html -->
</div>
<div ref="mindMapRef" class="wh-full">
<svg

View File

@@ -20,6 +20,7 @@ const currentSong = inject<any>('currentSong', {});
{{ currentSong.date }}
</div>
<Button size="small" shape="round" class="my-2">信息复用</Button>
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="text-xs" v-html="currentSong.lyric"></div>
</Card>
</template>

View File

@@ -106,7 +106,9 @@ async function goRun() {
try {
convertedParams[paramKey] = convertParamValue(value, dataType);
} catch (error: any) {
throw new Error(`参数 ${paramKey} 转换失败: ${error.message}`);
throw new Error(`参数 ${paramKey} 转换失败: ${error.message}`, {
cause: error,
});
}
}
@@ -175,7 +177,7 @@ function convertParamValue(value: string, dataType: string) {
try {
return JSON.parse(value);
} catch (error: any) {
throw new Error(`JSON格式错误: ${error.message}`);
throw new Error(`JSON格式错误: ${error.message}`, { cause: error });
}
}
default: {

View File

@@ -22,7 +22,7 @@ import {
import { Button, ButtonGroup, message, Modal, Tooltip } from 'ant-design-vue';
// 模拟流转流程
// @ts-ignore
// @ts-expect-error: token simulation package does not ship compatible types
import tokenSimulation from 'bpmn-js-token-simulation';
import BpmnModeler from 'bpmn-js/lib/Modeler';
// 代码高亮插件
@@ -132,6 +132,7 @@ const emit = defineEmits([
'element-click',
]);
// @ts-expect-error: file input ref is set imperatively by the template
const bpmnCanvas = ref();
const refFile = ref();
@@ -178,6 +179,7 @@ const additionalModules = computed(() => {
) {
Modules.push(...(props.additionalModel as any[]));
} else {
// oxlint-disable-next-line no-unused-expressions
props.additionalModel && Modules.push(props.additionalModel);
}
@@ -417,6 +419,7 @@ const processSimulation = () => {
// bpmnModeler.get('toggleMode', 'strict'),
// "bpmnModeler.get('toggleMode')",
// );
// oxlint-disable-next-line no-unused-expressions
props.simulation && bpmnModeler.get('toggleMode', 'strict').toggleMode();
};
const processRedo = () => {

View File

@@ -7,7 +7,7 @@ import { hasPrimaryModifier } from 'diagram-js/lib/util/Mouse';
/**
* A provider for BPMN 2.0 elements context pad
*/
export default function ContextPadProvider(
function ContextPadProvider(
config,
injector,
eventBus,
@@ -57,6 +57,8 @@ export default function ContextPadProvider(
});
}
export default ContextPadProvider;
ContextPadProvider.$inject = [
'config.contextPad',
'injector',

View File

@@ -3,7 +3,7 @@ import { isFunction, isObject } from '@vben/utils';
const WILDCARD = '*';
function CamundaModdleExtension(eventBus) {
// eslint-disable-next-line unicorn/no-this-assignment, @typescript-eslint/no-this-alias
// eslint-disable-next-line unicorn/no-this-assignment
const self = this;
eventBus.on('moddleCopy.canCopyProperty', (context) => {

View File

@@ -1,6 +1,6 @@
import PaletteProvider from 'bpmn-js/lib/features/palette/PaletteProvider';
export default function CustomPalette(
function CustomPalette(
palette,
create,
elementFactory,
@@ -24,11 +24,21 @@ export default function CustomPalette(
);
}
const F = function () {}; // 核心,利用空对象作为中介;
F.prototype = PaletteProvider.prototype; // 核心将父类的原型赋值给空对象F
CustomPalette.$inject = [
'palette',
'create',
'elementFactory',
'spaceTool',
'lassoTool',
'handTool',
'globalConnect',
'translate',
];
// 利用中介函数重写原型链方法
F.prototype.getPaletteEntries = function () {
CustomPalette.prototype = Object.create(PaletteProvider.prototype);
CustomPalette.prototype.constructor = CustomPalette;
CustomPalette.prototype.getPaletteEntries = function () {
const actions = {};
const create = this._create;
const elementFactory = this._elementFactory;
@@ -94,8 +104,7 @@ F.prototype.getPaletteEntries = function () {
'hand-tool': {
group: 'tools',
className: 'bpmn-icon-hand-tool',
title: '激活抓手工具',
// title: translate("Activate the hand tool"),
title: translate('Activate the hand tool'),
action: {
click(event) {
handTool.activateHand(event);
@@ -219,16 +228,4 @@ F.prototype.getPaletteEntries = function () {
return actions;
};
CustomPalette.$inject = [
'palette',
'create',
'elementFactory',
'spaceTool',
'lassoTool',
'handTool',
'globalConnect',
'translate',
];
CustomPalette.prototype = new F(); // 核心,将 F的实例赋值给子类
CustomPalette.prototype.constructor = CustomPalette; // 修复子类CustomPalette的构造器指向防止原型链的混乱
export default CustomPalette;

View File

@@ -1,7 +1,7 @@
/**
* A palette provider for BPMN 2.0 elements.
*/
export default function PaletteProvider(
function PaletteProvider(
palette,
create,
elementFactory,
@@ -23,6 +23,8 @@ export default function PaletteProvider(
palette.registerProvider(this);
}
export default PaletteProvider;
PaletteProvider.$inject = [
'palette',
'create',

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-template-curly-in-string */
/**
* This is a sample file that should be replaced with the actual translation.
*
@@ -238,10 +237,8 @@ export default {
'Due Date': '到期时间',
'Follow Up Date': '跟踪日期',
Priority: '优先级',
'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':
'跟踪日期必须符合EL表达式 ${someDate} ,或者一个ISO标准日期2015-06-26T09:54:00',
'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':
'跟踪日期必须符合EL表达式 ${someDate} ,或者一个ISO标准日期2015-06-26T09:54:00',
[`The follow up date as an EL expression (e.g. \${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)`]: `跟踪日期必须符合EL表达式 \${someDate} ,或者一个ISO标准日期2015-06-26T09:54:00`,
[`The due date as an EL expression (e.g. \${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)`]: `跟踪日期必须符合EL表达式 \${someDate} ,或者一个ISO标准日期2015-06-26T09:54:00`,
Variables: '变量',
'Candidate Starter Configuration': '候选人起动器配置',
'Candidate Starter Groups': '候选人起动器组',

View File

@@ -39,7 +39,7 @@ watch(
val +=
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
}
// @ts-ignore
// @ts-expect-error: async component registry is indexed dynamically
customConfigComponent.value = (
CustomConfigMap as Record<string, { component: Component }>
)[val]?.component;

View File

@@ -1,4 +1,3 @@
<!-- eslint-disable no-unused-vars -->
<script lang="ts" setup>
import { inject, nextTick, onBeforeUnmount, ref, toRaw, watch } from 'vue';
@@ -66,13 +65,13 @@ const bpmnElement = ref<any>(null);
const multiLoopInstance = ref<any>(null);
declare global {
interface Window {
// @ts-ignore
bpmnInstances?: () => any;
}
}
const bpmnInstances = () => (window as any)?.bpmnInstances;
// @ts-expect-error: retained for legacy multi-instance mode compatibility
// eslint-disable-next-line unused-imports/no-unused-vars
const getElementLoop = (businessObject: any): void => {
if (!businessObject.loopCharacteristics) {
@@ -141,8 +140,7 @@ const changeLoopCharacteristicsType = (type: any): void => {
isSequential: true,
})
: bpmnInstances().moddle.create('bpmn:MultiInstanceLoopCharacteristics', {
// eslint-disable-next-line no-template-curly-in-string
collection: '${coll_userList}',
collection: `\${coll_userList}`,
});
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
loopCharacteristics: toRaw(multiLoopInstance.value),
@@ -233,7 +231,7 @@ const updateLoopAsync = (key: any): void => {
extensionElements: null,
};
} else {
// @ts-ignore
// @ts-expect-error: dynamic async flags are assigned by runtime key
asyncAttr[key] = loopInstanceForm.value[key];
}
bpmnInstances().modeling.updateModdleProperties(
@@ -247,23 +245,23 @@ const changeConfig = (config: string): void => {
switch (config) {
case '会签': {
changeLoopCharacteristicsType('ParallelMultiInstance');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
updateLoopCondition(`\${ nrOfCompletedInstances >= nrOfInstances }`);
break;
}
case '依次审批': {
changeLoopCharacteristicsType('SequentialMultiInstance');
updateLoopCardinality('1');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
updateLoopCondition(`\${ nrOfCompletedInstances >= nrOfInstances }`);
break;
}
case '或签': {
changeLoopCharacteristicsType('ParallelMultiInstance');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances > 0 }');
updateLoopCondition(`\${ nrOfCompletedInstances > 0 }`);
break;
}
@@ -331,8 +329,8 @@ const updateLoopCharacteristics = (): void => {
if (approveMethod.value === ApproveMethodType.APPROVE_BY_RATIO) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: false, collection: '${coll_userList}' },
{ isSequential: false, collection: `\${coll_userList}` },
);
multiLoopInstance.value.completionCondition =
bpmnInstances().moddle.create('bpmn:FormalExpression', {
@@ -344,20 +342,19 @@ const updateLoopCharacteristics = (): void => {
if (approveMethod.value === ApproveMethodType.ANY_APPROVE) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: false, collection: '${coll_userList}' },
{ isSequential: false, collection: `\${coll_userList}` },
);
multiLoopInstance.value.completionCondition =
bpmnInstances().moddle.create('bpmn:FormalExpression', {
// eslint-disable-next-line no-template-curly-in-string
body: '${ nrOfCompletedInstances > 0 }',
body: `\${ nrOfCompletedInstances > 0 }`,
});
}
if (approveMethod.value === ApproveMethodType.SEQUENTIAL_APPROVE) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: true, collection: '${coll_userList}' },
{ isSequential: true, collection: `\${coll_userList}` },
);
multiLoopInstance.value.loopCardinality = bpmnInstances().moddle.create(
'bpmn:FormalExpression',
@@ -367,8 +364,7 @@ const updateLoopCharacteristics = (): void => {
);
multiLoopInstance.value.completionCondition =
bpmnInstances().moddle.create('bpmn:FormalExpression', {
// eslint-disable-next-line no-template-curly-in-string
body: '${ nrOfCompletedInstances >= nrOfInstances }',
body: `\${ nrOfCompletedInstances >= nrOfInstances }`,
});
}
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {

View File

@@ -53,7 +53,7 @@ watch(
() => props.type,
() => {
if (props.type) {
// @ts-ignore
// @ts-expect-error: installed task component map is indexed dynamically
witchTaskComponent.value = installedComponent[props.type].component;
}
},

View File

@@ -65,7 +65,7 @@ const initCallActivity = () => {
// 初始化所有配置项
Object.keys(formData.value).forEach((key: string) => {
// @ts-ignore
// @ts-expect-error: form state is updated through dynamic schema keys
formData.value[key] =
bpmnElement.value.businessObject[key] ??
formData.value[key as keyof FormData];
@@ -183,6 +183,7 @@ const updateElementExtensions = () => {
watch(
() => props.id,
(val) => {
// oxlint-disable-next-line no-unused-expressions
val &&
val.length > 0 &&
nextTick(() => {

View File

@@ -82,7 +82,6 @@ onMounted(() => {
bpmnRootElements.value
.filter((el: any) => el.$type === 'bpmn:Message')
.forEach((m: any) => {
// @ts-ignore
if (bpmnMessageRefsMap.value) {
bpmnMessageRefsMap.value[m.id] = m;
}

View File

@@ -34,7 +34,6 @@ const bpmnInstances = () => (window as any)?.bpmnInstances;
const resetTaskForm = () => {
for (const key in defaultTaskForm.value) {
// @ts-ignore
scriptTaskForm.value[key] =
bpmnElement.value?.businessObject[
key as keyof typeof defaultTaskForm.value

View File

@@ -1,3 +1,4 @@
<!-- eslint-disable unicorn/no-nested-ternary -->
<!-- eslint-disable prettier/prettier -->
<script lang="ts" setup>
import { inject, nextTick, onBeforeUnmount, ref, watch } from 'vue';
@@ -206,9 +207,9 @@ const updateHttpExtensions = (force = false) => {
const persisted = HTTP_BOOLEAN_FIELDS.has(name)
? String(!!rawValue)
: (rawValue === undefined
: rawValue === undefined
? ''
: rawValue.toString());
: rawValue.toString();
desiredEntries.push([name, persisted]);
});

View File

@@ -70,6 +70,7 @@ const deptTreeOptions = ref<any>(); // 部门树
const postOptions = ref<SystemPostApi.Post[]>([]); // 岗位列表
const userOptions = ref<SystemUserApi.User[]>([]); // 用户列表
const userGroupOptions = ref<BpmUserGroupApi.UserGroup[]>([]); // 用户组列表
// @ts-expect-error: tree ref instance type is provided by the UI library at runtime
const treeRef = ref<any>();
const { formFieldOptions } = useFormFieldsPermission(FieldPermissionType.READ);
@@ -128,7 +129,7 @@ const resetTaskForm = () => {
// eslint-disable-next-line unicorn/prefer-switch
if (userTaskForm.value.candidateStrategy === CandidateStrategy.EXPRESSION) {
// 特殊:流程表达式,只有一个 input 输入框
// @ts-ignore
// @ts-expect-error: expression strategy stores a scalar in an array-shaped field
userTaskForm.value.candidateParam = [candidateParamStr];
} else if (
userTaskForm.value.candidateStrategy ===
@@ -152,7 +153,7 @@ const resetTaskForm = () => {
userTaskForm.value.candidateStrategy ===
CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER
) {
// @ts-ignore
// @ts-expect-error: dynamic candidate param shape varies by strategy
userTaskForm.value.candidateParam = +candidateParamStr;
deptLevel.value = +candidateParamStr;
} else if (
@@ -303,7 +304,7 @@ const openProcessExpressionDialog = async () => {
const selectProcessExpression = (
expression: BpmProcessExpressionApi.ProcessExpression,
) => {
// @ts-ignore
// @ts-expect-error: modal helper exposes runtime methods outside static typing
userTaskForm.value.candidateParam = [expression.expression];
updateElementTask();
};
@@ -311,7 +312,7 @@ const selectProcessExpression = (
const handleFormUserChange = (e: any) => {
if (e === 'PROCESS_START_USER_ID') {
userTaskForm.value.candidateParam = [];
// @ts-ignore
// @ts-expect-error: modal helper exposes runtime methods outside static typing
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
}
updateElementTask();

View File

@@ -1,6 +1,6 @@
import BpmnRenderer from 'bpmn-js/lib/draw/BpmnRenderer';
export default function CustomRenderer(
function CustomRenderer(
config,
eventBus,
styles,
@@ -19,12 +19,10 @@ export default function CustomRenderer(
2000,
);
this.handlers.label = function () {
return null;
};
this.handlers.label = () => null;
}
const F = function () {}; // 核心,利用空对象作为中介;
F.prototype = BpmnRenderer.prototype; // 核心将父类的原型赋值给空对象F
CustomRenderer.prototype = new F(); // 核心,将 F的实例赋值给子类
CustomRenderer.prototype.constructor = CustomRenderer; // 修复子类CustomRenderer的构造器指向防止原型链的混乱
CustomRenderer.prototype = Object.create(BpmnRenderer.prototype);
CustomRenderer.prototype.constructor = CustomRenderer;
export default CustomRenderer;

View File

@@ -1,7 +1,8 @@
import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
// eslint-disable-next-line n/no-extraneous-import
import inherits from 'inherits';
export default function CustomRules(eventBus) {
function CustomRules(eventBus) {
BpmnRules.call(this, eventBus);
}
@@ -14,3 +15,5 @@ CustomRules.prototype.canDrop = function () {
CustomRules.prototype.canMove = function () {
return false;
};
export default CustomRules;

View File

@@ -1,4 +1,5 @@
function xmlStr2XmlObj(xmlStr) {
// eslint-disable-next-line no-useless-assignment
let xmlObj = {};
if (document.all) {
const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM');

View File

@@ -71,6 +71,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
// 当前节点
const currentNode = useWatchNode(props);
// 节点名称
// @ts-expect-error: composable typing does not preserve this node schema exactly
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
// 触发器表单配置

View File

@@ -25,12 +25,13 @@ const emits = defineEmits<{
}>();
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
/** 监控节点的变化 */
const currentNode = useWatchNode(props);
/** 节点名称编辑 */
// @ts-expect-error: composable typing does not preserve this node schema exactly
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.CHILD_PROCESS_NODE,

View File

@@ -27,10 +27,11 @@ const emits = defineEmits<{
'update:flowNode': [node: SimpleFlowNode | undefined];
}>();
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
// 监控节点的变化
const currentNode = useWatchNode(props);
// 节点名称编辑
// @ts-expect-error: composable typing does not preserve this node schema exactly
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.COPY_TASK_NODE,

View File

@@ -25,10 +25,11 @@ const emits = defineEmits<{
'update:flowNode': [node: SimpleFlowNode | undefined];
}>();
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
// 监控节点的变化
const currentNode = useWatchNode(props);
// 节点名称编辑
// @ts-expect-error: composable typing does not preserve this node schema exactly
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.DELAY_TIMER_NODE,

View File

@@ -20,7 +20,7 @@ const props = defineProps({
// 监控节点变化
const currentNode = useWatchNode(props);
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const processInstance = inject<Ref<any>>('processInstance', ref({}));
const [Modal, modalApi] = useVbenModal({

View File

@@ -41,7 +41,7 @@ const emits = defineEmits<{
const { proxy } = getCurrentInstance() as any;
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const currentNode = ref<SimpleFlowNode>(props.flowNode);
watch(

View File

@@ -46,7 +46,7 @@ const emits = defineEmits<{
const { proxy } = getCurrentInstance() as any;
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const currentNode = ref<SimpleFlowNode>(props.flowNode);

View File

@@ -36,7 +36,7 @@ const props = defineProps({
const emits = defineEmits(['update:childNode']);
const popoverShow = ref(false);
const readonly = inject<Boolean>('readonly'); // 是否只读
const readonly = inject<boolean>('readonly'); // 是否只读
function addNode(type: number) {
// 校验:条件分支、包容分支后面,不允许直接添加并行分支

View File

@@ -36,7 +36,7 @@ const emits = defineEmits<{
const currentNode = ref<SimpleFlowNode>(props.flowNode);
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
watch(
() => props.flowNode,

View File

@@ -28,10 +28,11 @@ const emits = defineEmits<{
}>();
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
// 监控节点的变化
const currentNode = useWatchNode(props);
// 节点名称编辑
// @ts-expect-error: composable typing does not preserve this node schema exactly
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,

View File

@@ -32,11 +32,12 @@ defineEmits<{
'update:modelValue': [node: SimpleFlowNode | undefined];
}>();
const readonly = inject<Boolean>('readonly'); // 是否只读
const readonly = inject<boolean>('readonly'); // 是否只读
const tasks = inject<Ref<any[]>>('tasks', ref([]));
// 监控节点变化
const currentNode = useWatchNode(props);
// 节点名称编辑
// @ts-expect-error: composable typing does not preserve this node schema exactly
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.START_USER_NODE,

View File

@@ -30,7 +30,7 @@ const emits = defineEmits<{
}>();
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
// 监控节点的变化
const currentNode = useWatchNode(props);
// 节点名称编辑

View File

@@ -32,11 +32,12 @@ const emits = defineEmits<{
}>();
// 是否只读
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const tasks = inject<Ref<any[]>>('tasks', ref([]));
// 监控节点变化
const currentNode = useWatchNode(props);
// 节点名称编辑
// @ts-expect-error: composable typing does not preserve this node schema exactly
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.USER_TASK_NODE,

View File

@@ -7,6 +7,10 @@ interface DictDataType {
// 用户任务的审批类型。 【参考飞书】
export enum ApproveType {
/**
* 人工审批
*/
USER = 1,
/**
* 自动通过
*/
@@ -15,18 +19,14 @@ export enum ApproveType {
* 自动拒绝
*/
AUTO_REJECT = 3,
/**
* 人工审批
*/
USER = 1,
}
// 多人审批方式类型枚举 用于审批节点
export enum ApproveMethodType {
/**
* 多人或签(通过只需一人,拒绝只需一人)
* 随机挑选一人审批
*/
ANY_APPROVE = 3,
RANDOM_SELECT_ONE_APPROVE = 1,
/**
* 多人会签(按通过比例)
@@ -34,9 +34,9 @@ export enum ApproveMethodType {
APPROVE_BY_RATIO = 2,
/**
* 随机挑选一人审批
* 多人或签(通过只需一人,拒绝只需一人)
*/
RANDOM_SELECT_ONE_APPROVE = 1,
ANY_APPROVE = 3,
/**
* 多人依次审批
*/
@@ -70,34 +70,34 @@ export enum ConditionType {
// 操作按钮类型枚举 (用于审批节点)
export enum OperationButtonType {
/**
* 加签
*/
ADD_SIGN = 5,
/**
* 通过
*/
APPROVE = 1,
/**
* 抄送
*/
COPY = 7,
/**
* 委派
*/
DELEGATE = 4,
/**
* 拒绝
*/
REJECT = 2,
/**
* 转办
*/
TRANSFER = 3,
/**
* 委派
*/
DELEGATE = 4,
/**
* 加签
*/
ADD_SIGN = 5,
/**
* 退回
*/
RETURN = 6,
/**
* 转办
* 抄送
*/
TRANSFER = 3,
COPY = 7,
}
// 审批拒绝类型枚举
@@ -114,6 +114,10 @@ export enum RejectHandlerType {
// 用户任务超时处理类型枚举
export enum TimeoutHandlerType {
/**
* 自动提醒
*/
REMINDER = 1,
/**
* 自动同意
*/
@@ -122,10 +126,6 @@ export enum TimeoutHandlerType {
* 自动拒绝
*/
REJECT = 3,
/**
* 自动提醒
*/
REMINDER = 1,
}
// 用户任务的审批人为空时,处理类型枚举
@@ -135,49 +135,49 @@ export enum AssignEmptyHandlerType {
*/
APPROVE = 1,
/**
* 转交给流程管理员
* 自动拒绝
*/
ASSIGN_ADMIN = 4,
REJECT = 2,
/**
* 指定人员审批
*/
ASSIGN_USER = 3,
/**
* 自动拒绝
* 转交给流程管理员
*/
REJECT = 2,
ASSIGN_ADMIN = 4,
}
// 用户任务的审批人与发起人相同时,处理类型枚举
export enum AssignStartUserHandlerType {
/**
* 转交给部门负责人审批
* 由发起人对自己审批
*/
ASSIGN_DEPT_LEADER = 3,
START_USER_AUDIT = 1,
/**
* 自动跳过【参考飞书】1如果当前节点还有其他审批人则交由其他审批人进行审批2如果当前节点没有其他审批人则该节点自动通过
*/
SKIP = 2,
/**
* 由发起人对自己审批
* 转交给部门负责人审批
*/
START_USER_AUDIT = 1,
ASSIGN_DEPT_LEADER = 3,
}
// 时间单位枚举
export enum TimeUnitType {
/**
*
* 分钟
*/
DAY = 3,
MINUTE = 1,
/**
* 小时
*/
HOUR = 2,
/**
* 分钟
*
*/
MINUTE = 1,
DAY = 3,
}
/**
@@ -202,14 +202,14 @@ export enum FieldPermissionType {
* 延迟类型
*/
export enum DelayTypeEnum {
/**
* 固定日期时间
*/
FIXED_DATE_TIME = 2,
/**
* 固定时长
*/
FIXED_TIME_DURATION = 1,
/**
* 固定日期时间
*/
FIXED_DATE_TIME = 2,
}
/**
@@ -217,35 +217,39 @@ export enum DelayTypeEnum {
*/
export enum TriggerTypeEnum {
/**
* 表单数据删除触发器
* 发送 HTTP 请求触发器
*/
FORM_DELETE = 11,
/**
* 表单数据更新触发器
*/
FORM_UPDATE = 10,
HTTP_REQUEST = 1,
/**
* 接收 HTTP 回调请求触发器
*/
HTTP_CALLBACK = 2,
/**
* 发送 HTTP 请求触发器
* 表单数据更新触发器
*/
HTTP_REQUEST = 1,
FORM_UPDATE = 10,
/**
* 表单数据删除触发器
*/
FORM_DELETE = 11,
}
export enum ChildProcessStartUserTypeEnum {
/**
* 同主流程发起人
*/
MAIN_PROCESS_START_USER = 1,
/**
* 表单
*/
FROM_FORM = 2,
}
export enum ChildProcessStartUserEmptyTypeEnum {
/**
* 同主流程发起人
*/
MAIN_PROCESS_START_USER = 1,
}
export enum ChildProcessStartUserEmptyTypeEnum {
/**
* 子流程管理员
*/
@@ -254,10 +258,6 @@ export enum ChildProcessStartUserEmptyTypeEnum {
* 主流程管理员
*/
MAIN_PROCESS_ADMIN = 3,
/**
* 同主流程发起人
*/
MAIN_PROCESS_START_USER = 1,
}
export enum ChildProcessMultiInstanceSourceTypeEnum {
@@ -265,54 +265,50 @@ export enum ChildProcessMultiInstanceSourceTypeEnum {
* 固定数量
*/
FIXED_QUANTITY = 1,
/**
* 多选表单
*/
MULTIPLE_FORM = 3,
/**
* 数字表单
*/
NUMBER_FORM = 2,
/**
* 多选表单
*/
MULTIPLE_FORM = 3,
}
// 候选人策略枚举 用于审批节点。抄送节点 )
export enum CandidateStrategy {
/**
* 审批人自选
* 指定角色
*/
APPROVE_USER_SELECT = 34,
/**
* 部门的负责人
*/
DEPT_LEADER = 21,
ROLE = 10,
/**
* 部门成员
*/
DEPT_MEMBER = 20,
/**
* 流程表达式
* 部门的负责人
*/
EXPRESSION = 60,
/**
* 表单内部门负责人
*/
FORM_DEPT_LEADER = 51,
/**
* 表单内用户字段
*/
FORM_USER = 50,
/**
* 连续多级部门的负责人
*/
MULTI_LEVEL_DEPT_LEADER = 23,
DEPT_LEADER = 21,
/**
* 指定岗位
*/
POST = 22,
/**
* 指定角色
* 连续多级部门的负责人
*/
ROLE = 10,
MULTI_LEVEL_DEPT_LEADER = 23,
/**
* 指定用户
*/
USER = 30,
/**
* 审批人自选
*/
APPROVE_USER_SELECT = 34,
/**
* 发起人自选
*/
START_USER_SELECT = 35,
/**
* 发起人自己
*/
@@ -325,18 +321,22 @@ export enum CandidateStrategy {
* 发起人连续多级部门的负责人
*/
START_USER_MULTI_LEVEL_DEPT_LEADER = 38,
/**
* 发起人自选
*/
START_USER_SELECT = 35,
/**
* 指定用户
*/
USER = 30,
/**
* 指定用户组
*/
USER_GROUP = 40,
/**
* 表单内用户字段
*/
FORM_USER = 50,
/**
* 表单内部门负责人
*/
FORM_DEPT_LEADER = 51,
/**
* 流程表达式
*/
EXPRESSION = 60,
}
export enum BpmHttpRequestParamTypeEnum {

View File

@@ -27,7 +27,7 @@ type EnvType = 'h5' | 'miniapp'; // 环境类型
// UniApp WebView 类型声明
interface UniWebView {
postMessage: (options: { data: any }) => void;
postMessage: (options: { data: any }, targetOrigin?: string) => void;
getEnv: (callback: (res: any) => void) => void;
navigateTo: (options: {
fail?: () => void;
@@ -182,7 +182,7 @@ function postMessageToParent(message: { data: any; type: string }) {
if (envType.value === 'miniapp') {
if (window.uni?.postMessage) {
// 传递的消息信息,必须写在 data 对象中
window.uni.postMessage({ data: message.data });
window.uni.postMessage({ data: message.data }, window.location.origin);
} else {
console.error('小程序环境下 uni 对象未定义');
}

View File

@@ -3,7 +3,7 @@
* - @ 自动补全:插入 mention 占位元素
*/
// @ts-ignore TinyMCE 全局或通过打包器提供
// TinyMCE 全局或通过打包器提供
import type { Editor } from 'tinymce';
export interface MentionItem {

View File

@@ -9,7 +9,7 @@ const props = withDefaults(
defineProps<{
bpmnXml?: string;
loading?: boolean; // 是否加载中
modelView?: Object;
modelView?: object;
}>(),
{
loading: false,
@@ -29,7 +29,7 @@ watch(
async (newModelView) => {
// 加载最新
if (newModelView) {
// @ts-ignore
// @ts-expect-error: viewer instance type is broader than local ref typing
view.value = newModelView;
}
},

View File

@@ -107,6 +107,7 @@ const nodeTypeName = ref('审批'); // 节点类型名称
const reasonRequire = ref();
const approveFormRef = ref<FormInstance>(); // 审批通过意见表单
// @ts-expect-error: template ref is retained for future provider expansion
const approveSignFormRef = ref();
const nextAssigneesActivityNode = ref<BpmProcessInstanceApi.ApprovalNodeInfo[]>(
[],

View File

@@ -10,7 +10,7 @@ import { useUserStore } from '@vben/stores';
import { formatDate } from '@vben/utils';
import { Button } from 'ant-design-vue';
// @ts-ignore - 安装 vue3-print-nb 局部指令 v-print
// @ts-expect-error - 安装 vue3-print-nb 局部指令 v-print
import vPrint from 'vue3-print-nb';
import { getProcessInstancePrintData } from '#/api/bpm/processInstance';

View File

@@ -76,10 +76,10 @@ const chartTabs: TabOption[] = [
</AnalysisChartsTabs>
<div class="mt-5 w-full md:flex">
<AnalysisChartCard class="mt-5 md:mr-4 md:mt-0 md:w-1/3" title="访问数量">
<AnalysisChartCard class="mt-5 md:mt-0 md:mr-4 md:w-1/3" title="访问数量">
<AnalyticsVisitsData />
</AnalysisChartCard>
<AnalysisChartCard class="mt-5 md:mr-4 md:mt-0 md:w-1/3" title="访问来源">
<AnalysisChartCard class="mt-5 md:mt-0 md:mr-4 md:w-1/3" title="访问来源">
<AnalyticsVisitsSource />
</AnalysisChartCard>
<AnalysisChartCard class="mt-5 md:mt-0 md:w-1/3" title="访问来源">

View File

@@ -1,5 +1,5 @@
<!-- eslint-disable no-useless-escape -->
<script setup lang="ts">
// oxlint-disable no-useless-escape
import { onMounted, ref, unref } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';

View File

@@ -1,6 +1,7 @@
<!-- Modbus 配置 -->
<script lang="ts" setup>
import type { VbenFormSchema, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { IotDeviceApi } from '#/api/iot/device/device';
import type { IotDeviceModbusConfigApi } from '#/api/iot/device/modbus/config';
import type { IotDeviceModbusPointApi } from '#/api/iot/device/modbus/point';
@@ -227,7 +228,7 @@ function usePointColumns(): VxeTableGridOptions['columns'] {
];
}
const [Grid, gridApi] = useVbenVxeGrid<IotDeviceModbusPointApi.ModbusPoint>({
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: usePointFormSchema(),
submitOnChange: true,
@@ -255,7 +256,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceModbusPointApi.ModbusPoint>({
refresh: true,
search: true,
},
},
} as VxeTableGridOptions<IotDeviceModbusPointApi.ModbusPoint>,
});
/** 新增点位 - 使用 useVbenModal */

View File

@@ -118,7 +118,7 @@ function useFormSchema(): VbenFormSchema[] {
rules: 'required',
suffix: () => {
const addr = formApi.form.values?.registerAddress;
if (addr == null) {
if (addr === null || addr === undefined) {
return '';
}
return h(

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import type { VbenFormSchema, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { IotDeviceApi } from '#/api/iot/device/device';
import { ref, watch } from 'vue';
@@ -71,7 +72,7 @@ function useGridColumns(): VxeTableGridOptions['columns'] {
];
}
const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
const [Grid, gridApi] = useVbenVxeGrid({
gridOptions: {
columns: useGridColumns(),
height: 'auto',
@@ -96,7 +97,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
pagerConfig: {
enabled: false,
},
},
} as VxeTableGridOptions<IotDeviceApi.Device>,
gridEvents: {
checkboxAll: handleRowCheckboxChange,
checkboxChange: handleRowCheckboxChange,
@@ -219,7 +220,7 @@ function useAddGridColumns(): VxeTableGridOptions['columns'] {
];
}
const [AddGrid, addGridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
const [AddGrid, addGridApi] = useVbenVxeGrid({
formOptions: {
schema: useAddGridFormSchema(),
submitOnChange: true,
@@ -247,7 +248,7 @@ const [AddGrid, addGridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
refresh: true,
search: true,
},
},
} as VxeTableGridOptions<IotDeviceApi.Device>,
gridEvents: {
checkboxAll: handleAddSelectionChange,
checkboxChange: handleAddSelectionChange,

View File

@@ -210,7 +210,7 @@ function handleRowCheckboxChange({
checkedIds.value = records.map((item) => item.id!);
}
const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
const [Grid, gridApi] = useVbenVxeGrid({
gridOptions: {
checkboxConfig: {
highlight: true,
@@ -242,7 +242,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
refresh: true,
search: true,
},
},
} as VxeTableGridOptions<IotDeviceApi.Device>,
gridEvents: {
checkboxAll: handleRowCheckboxChange,
checkboxChange: handleRowCheckboxChange,

View File

@@ -13,8 +13,8 @@ export const IOT_PROVIDE_KEY = {
/** IoT 设备状态枚举 */
export enum DeviceStateEnum {
INACTIVE = 0, // 未激活
OFFLINE = 2, // 离线
ONLINE = 1, // 在线
OFFLINE = 2, // 离线
}
/** IoT 产品物模型类型枚举类 */

View File

@@ -3,8 +3,8 @@ import dayjs from 'dayjs';
/** 时间范围类型枚举 */
export enum TimeRangeTypeEnum {
DAY30 = 1,
MONTH = 30,
WEEK = 7,
MONTH = 30,
YEAR = 365,
}

View File

@@ -3,8 +3,8 @@ import dayjs from 'dayjs';
/** 时间范围类型枚举 */
export enum TimeRangeTypeEnum {
DAY30 = 1,
MONTH = 30,
WEEK = 7,
MONTH = 30,
YEAR = 365,
}

View File

@@ -12,7 +12,7 @@ defineOptions({ name: 'ProductCategorySelect' });
const props = defineProps({
modelValue: {
type: [Number, Array<Number>],
type: [Number, Array<number>],
default: undefined,
}, // 选中的 ID
multiple: {

View File

@@ -50,7 +50,7 @@ const selectedSku = ref<MallSpuApi.Sku>();
/** 处理商品的选择变化 */
async function handleSpuChange(spu?: MallSpuApi.Spu | null) {
// 处理商品选择:如果 spu 为 null 或 id 为 0表示清空选择
const spuId = spu?.id && spu.id ? spu.id : undefined;
const spuId = spu && spu.id ? spu.id : undefined;
formData.value.spuId = spuId;
await formApi.setFieldValue('spuId', spuId);
// 清空已选规格

View File

@@ -110,7 +110,7 @@ function validateSku() {
let validate = true;
for (const sku of formData.value!.skus!) {
for (const rule of props?.ruleConfig as RuleConfig[]) {
for (const rule of props.ruleConfig as RuleConfig[]) {
const value = getNestedValue(sku, rule.name);
if (!rule.rule(value)) {
validate = false;

View File

@@ -102,6 +102,7 @@ async function showInput(index: number) {
attributeIndex.value = index;
inputRef.value?.[index]?.focus();
// 获取属性下拉选项
// oxlint-disable-next-line typescript/no-non-null-asserted-optional-chain
await getAttributeOptions(attributeList.value?.[index]?.id!);
}

View File

@@ -42,7 +42,7 @@ function handleSend(userId: number) {
messageBoxVisible.value = true;
}
const [Grid, gridApi] = useVbenVxeGrid<MpMessageApi.Message>({
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useGridFormSchema(),
},

View File

@@ -65,7 +65,7 @@ const [Modal, modalApi] = useVbenModal({
modalApi.lock();
try {
formData.value = await getTenant(data.id);
// @ts-ignore 特殊https://gitee.com/yudaocode/yudao-ui-admin-vben/issues/ID43CX
// @ts-expect-error: special-case workaround for yudao-ui-admin-vben issue ID43CX
formData.value.expireTime = String(formData.value.expireTime);
// 设置到 values
await formApi.setValues(formData.value);

View File

@@ -1 +0,0 @@
export { default } from '@vben/tailwind-config';

View File

@@ -2,7 +2,6 @@
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/tsconfig/web-app.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"#/*": ["./src/*"]
},

View File

@@ -6,5 +6,5 @@
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"noEmit": false
},
"include": ["vite.config.mts"]
"include": ["vite.config.ts"]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/web-antdv-next",
"version": "5.6.0",
"version": "5.7.0",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1 +0,0 @@
export { default } from '@vben/tailwind-config/postcss';

View File

@@ -98,8 +98,7 @@ export const useAuthStore = defineStore('auth', () => {
}
async function fetchUserInfo() {
let userInfo: null | UserInfo = null;
userInfo = await getUserInfoApi();
const userInfo = await getUserInfoApi();
userStore.setUserInfo(userInfo);
return userInfo;
}

View File

@@ -55,8 +55,7 @@ const formSchema = computed((): VbenFormSchema[] => {
* @param values 登录表单数据
*/
async function handleLogin(values: Recordable<any>) {
// eslint-disable-next-line no-console
console.log(values);
void values;
}
</script>

View File

@@ -29,8 +29,7 @@ const formSchema = computed((): VbenFormSchema[] => {
});
function handleSubmit(value: Recordable<any>) {
// eslint-disable-next-line no-console
console.log('reset email:', value);
void value;
}
</script>

View File

@@ -82,8 +82,7 @@ const formSchema = computed((): VbenFormSchema[] => {
});
function handleSubmit(value: Recordable<any>) {
// eslint-disable-next-line no-console
console.log('register submit:', value);
void value;
}
</script>

View File

@@ -76,10 +76,10 @@ const chartTabs: TabOption[] = [
</AnalysisChartsTabs>
<div class="mt-5 w-full md:flex">
<AnalysisChartCard class="mt-5 md:mr-4 md:mt-0 md:w-1/3" title="访问数量">
<AnalysisChartCard class="mt-5 md:mt-0 md:mr-4 md:w-1/3" title="访问数量">
<AnalyticsVisitsData />
</AnalysisChartCard>
<AnalysisChartCard class="mt-5 md:mr-4 md:mt-0 md:w-1/3" title="访问来源">
<AnalysisChartCard class="mt-5 md:mt-0 md:mr-4 md:w-1/3" title="访问来源">
<AnalyticsVisitsSource />
</AnalysisChartCard>
<AnalysisChartCard class="mt-5 md:mt-0 md:w-1/3" title="访问来源">

View File

@@ -1 +0,0 @@
export { default } from '@vben/tailwind-config';

View File

@@ -2,7 +2,6 @@
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/tsconfig/web-app.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"#/*": ["./src/*"]
}

View File

@@ -6,5 +6,5 @@
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"noEmit": false
},
"include": ["vite.config.mts"]
"include": ["vite.config.ts"]
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/web-ele",
"version": "5.6.0",
"version": "5.7.0",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

Some files were not shown because too many files have changed in this diff Show More