Просмотр исходного кода

feat: 新增cursor项目文档,修改部分需求

laiqi 1 год назад
Родитель
Сommit
9e58b32a17

+ 67 - 0
.cursor/rules/vben-cli-tools.mdc

@@ -0,0 +1,67 @@
+---
+description:
+globs:
+alwaysApply: false
+---
+# Vben 项目 CLI 工具
+
+项目在 `scripts/` 目录下提供了一些命令行工具,用于简化常用操作。
+
+## vsh (`pnpm vsh`)
+
+`vsh` 是一个用于项目级别操作的工具,例如代码检查、依赖管理等。
+代码位于 [scripts/vsh/](mdc:scripts/vsh)
+
+### 用法
+```bash
+pnpm vsh [command] [options]
+```
+
+### `vsh check-circular`
+检查整个项目的循环引用。如果存在循环引用,会在控制台输出相关模块。
+-   用法: `pnpm vsh check-circular`
+-   选项:
+    -   `--staged`: 只检查 Git 暂存区内的文件 (默认 `false`)
+
+### `vsh check-dep`
+检查项目依赖情况,并在控制台输出"未使用的依赖"、"未安装的依赖"信息。
+-   用法: `pnpm vsh check-dep`
+-   选项:
+    -   `-r, --recursive`: 递归删除整个项目 (默认 `true`)
+    -   `--del-lock`: 是否删除 `pnpm-lock.yaml` 文件 (默认 `true`)
+
+### `vsh lint`
+对项目进行 lint 检查,确保代码符合规范。
+-   用法: `pnpm vsh lint`
+-   选项:
+    -   `--format`: 检查并尝试修复错误 (默认 `false`)
+
+### `vsh publint`
+对 Monorepo 项目进行包规范检查。
+-   用法: `pnpm vsh publint`
+-   选项:
+    -   `--check`: 仅执行检查 (默认 `false`)
+
+### `vsh code-workspace`
+生成 `vben-admin.code-workspace` 文件。通常在代码提交时自动执行。
+-   用法: `pnpm vsh code-workspace`
+-   选项:
+    -   `--auto-commit`: Git commit 时自动提交 (默认 `false`)
+    -   `--spaces`: 缩进格式 (默认 2个缩进)
+
+## turbo-run (`pnpm turbo-run`)
+
+用于快速执行 Monorepo 大仓中的脚本,并提供选项式交互选择。
+代码位于 [scripts/turbo-run/](mdc:scripts/turbo-run)
+
+### 用法
+```bash
+pnpm turbo-run [command]
+```
+
+### `turbo-run dev`
+快速执行 `dev` 命令,并提供选项式交互选择子项目进行开发。
+
+## 脚本目录
+
+所有 CLI 相关脚本都位于 [scripts/](mdc:scripts) 目录下。

+ 60 - 0
.cursor/rules/vben-project-structure.mdc

@@ -0,0 +1,60 @@
+---
+description:
+globs:
+alwaysApply: false
+---
+# Vben 项目结构概览
+
+Vben 项目采用 Monorepo 架构,使用 pnpm workspaces 和 Turborepo 进行管理。
+
+## 顶层重要文件和目录
+
+-   **[pnpm-workspace.yaml](mdc:pnpm-workspace.yaml)**: 定义 pnpm workspaces,声明了哪些目录是包 (packages)。
+-   **[turbo.json](mdc:turbo.json)**: Turborepo 配置文件,用于定义任务流水线和缓存策略。
+-   **[package.json](mdc:package.json)**: 项目根目录的 `package.json`,包含顶层脚本和依赖。
+-   **`apps/`**: 存放各个应用程序 (workspaces),例如 `web-ele`、`web-antd` 等。
+    -   例如: [apps/web-ele/](mdc:apps/web-ele) (Element Plus 版本的应用)
+-   **`packages/`**: 存放共享的包和库 (workspaces),这些包可以被 `apps/` 中的应用或其他 `packages/` 中的包复用。
+    -   **`@core/`**: [packages/@core/](mdc:packages/@core) - 包含核心的基础组件、工具函数、类型定义等。
+    -   **`effects/`**: [packages/effects/](mdc:packages/effects) - 包含与UI框架无关的通用效果、布局、插件等。
+    -   其他如 `constants/`, `icons/`, `locales/`, `stores/`, `styles/`, `types/`, `utils/` 等也是共享包。
+-   **`internal/`**: 存放项目内部使用的配置和脚本,不作为发布的包。
+    -   **`lint-configs/`**: [internal/lint-configs/](mdc:internal/lint-configs) - 集中管理 ESLint, Stylelint, Prettier 等代码规范工具的配置。
+    -   **`tsconfig/`**: [internal/tsconfig/](mdc:internal/tsconfig) - 共享的 TypeScript 配置文件。
+    -   **`vite-config/`**: [internal/vite-config/](mdc:internal/vite-config) - 共享的 Vite 配置。
+-   **`scripts/`**: [scripts/](mdc:scripts) - 存放项目级别的脚本,如 `vsh` 和 `turbo-run`。
+
+## 应用 (Apps)
+
+位于 `apps/` 目录下,每个子目录代表一个可独立运行或构建的应用。例如,`apps/web-ele` 是基于 Element Plus 的前端应用。
+其典型结构可能包含:
+-   `src/`: 源代码目录。
+    -   `api/`: API 请求模块。
+    -   `router/`: 路由配置。
+    -   `store/`:状态管理 (如 Pinia)。
+    -   `views/`: 页面组件。
+    -   `main.ts`: 应用入口文件。
+-   `public/`: 静态资源。
+-   `index.html`: HTML 入口文件。
+-   `vite.config.ts`: Vite 配置文件。
+
+## 包 (Packages)
+
+位于 `packages/` 目录下,这些是可复用的模块,旨在提高代码共享和维护性。
+
+-   **`@core`**: 包含非常基础和核心的功能。
+    -   `base/`: 基础设计系统 (design tokens, scss-bem), icons, shared utils, typings。
+        - [packages/@core/base/design/](mdc:packages/@core/base/design)
+        - [packages/@core/base/icons/](mdc:packages/@core/base/icons)
+        - [packages/@core/base/shared/](mdc:packages/@core/base/shared)
+    -   `composables/`: Vue Composables。
+        - [packages/@core/composables/](mdc:packages/@core/composables)
+    -   `ui-kit/`: UI无关的组件或特定UI库的封装。
+        - [packages/@core/ui-kit/shadcn-ui/](mdc:packages/@core/ui-kit/shadcn-ui)
+-   **`effects`**: 包含一些通用效果、布局、插件等,通常与具体UI框架解耦。
+    -   `common-ui/`: 通用UI组件。
+        - [packages/effects/common-ui/](mdc:packages/effects/common-ui)
+    -   `layouts/`: 布局系统。
+        - [packages/effects/layouts/](mdc:packages/effects/layouts)
+
+理解这个 Monorepo 结构对于在项目中导航和开发至关重要。

+ 59 - 0
.cursor/rules/vben-quick-start.mdc

@@ -0,0 +1,59 @@
+---
+description:
+globs:
+alwaysApply: false
+---
+# Vben 项目快速启动
+
+## 环境要求
+
+- Node.js 20.15.0 及以上版本 (推荐使用 `fnm` 或 `nvm` 进行版本管理)
+- Git 任意版本
+
+检查命令:
+`node -v`
+`git -v`
+
+## 启动项目
+
+### 1. 获取源码
+```sh
+# 克隆 GitHub 仓库
+git clone https://github.com/vbenjs/vue-vben-admin.git
+
+# 或者克隆 Gitee 仓库 (可能不是最新的)
+git clone https://gitee.com/annsion/vue-vben-admin.git
+```
+**注意**: 存放代码的目录及所有父级目录不能存在中文、韩文、日文以及空格。
+
+### 2. 安装依赖
+进入项目根目录 (例如 `vue-vben-admin`) 后执行:
+```sh
+# 启用项目指定的 pnpm 版本
+corepack enable
+
+# 安装依赖 (项目只支持 pnpm)
+pnpm install
+```
+
+### 3. 运行项目
+```sh
+# 启动项目 (会提示选择子项目)
+pnpm dev
+```
+之后,可以选择要运行的子项目,例如 `@vben/web-ele`。
+访问 `http://localhost:5555` 查看。
+
+#### 直接运行指定项目
+```sh
+pnpm run dev:antd
+pnpm run dev:ele
+pnpm run dev:naive
+pnpm run dev:docs
+pnpm run dev:play
+```
+
+相关文件:
+- 项目依赖管理: [pnpm-workspace.yaml](mdc:pnpm-workspace.yaml)
+- Turbo Repo 配置: [turbo.json](mdc:turbo.json)
+- 包管理: [package.json](mdc:package.json)

+ 50 - 0
.cursor/rules/vben-standards.mdc

@@ -0,0 +1,50 @@
+---
+description:
+globs:
+alwaysApply: false
+---
+# Vben 项目规范和代码检查
+
+项目遵循严格的代码规范以提高代码质量和开发效率。主要的 lint 工具及其配置位于 `internal/lint-configs` 目录下。
+
+## 主要工具及配置
+
+-   **ESLint**: 用于 JavaScript 和 TypeScript 代码检查。
+    -   命令: `pnpm eslint .`
+    -   配置文件: [eslint.config.mjs](mdc:eslint.config.mjs)
+    -   核心配置: `internal/lint-configs/eslint-config`
+
+-   **Stylelint**: 用于 CSS 样式检查。
+    -   命令: `pnpm stylelint "**/*.{vue,css,less.scss}"`
+    -   配置文件: [stylelint.config.mjs](mdc:stylelint.config.mjs)
+    -   核心配置: `internal/lint-configs/stylelint-config`
+
+-   **Prettier**: 用于代码格式化。
+    -   命令: `pnpm prettier .`
+    -   配置文件: [.prettierrc.mjs](mdc:.prettierrc.mjs)
+    -   核心配置: `internal/lint-configs/prettier-config`
+
+-   **Commitlint**: 用于检查 Git 提交信息的规范。
+    -   配置文件: [.commitlintrc.js](mdc:.commitlintrc.js)
+    -   核心配置: `internal/lint-configs/commitlint-config`
+
+-   **Publint**: 用于检查 npm 包的规范 (针对 Monorepo 项目)。
+    -   相关脚本: `pnpm vsh publint` (详见 CLI 工具规则)
+
+-   **Lint Staged**: 用于在 Git 提交前运行代码校验。
+    -   配置文件: [.lintstagedrc.mjs](mdc:.lintstagedrc.mjs)
+
+-   **Cspell**: 用于检查拼写错误。
+    -   配置文件: [cspell.json](mdc:cspell.json)
+
+## VSCode 插件推荐
+
+为了更好地遵循代码规范,推荐安装以下 VSCode 插件:
+-   ESLint
+-   Prettier
+-   Code Spell Checker
+-   Stylelint
+
+## 核心配置目录
+
+所有 Lint 相关的核心配置都集中在 [internal/lint-configs/](mdc:internal/lint-configs) 目录下。

+ 0 - 10
.cursor/rules/vben.mdc

@@ -1,10 +0,0 @@
----
-description: vbeb framework
-globs: 
-alwaysApply: true
----
-
-# Your rule content
-
--- When adjusting the page, modify the page by referring to the corresponding vben documentation
--- 

+ 8 - 0
apps/web-ele/auto-imports.d.ts

@@ -0,0 +1,8 @@
+/* eslint-disable */
+/* prettier-ignore */
+// @ts-nocheck
+// noinspection JSUnusedGlobalSymbols
+// Generated by unplugin-auto-import
+// biome-ignore lint: disable
+export {}
+declare global {}

+ 16 - 0
apps/web-ele/components.d.ts

@@ -0,0 +1,16 @@
+/* eslint-disable */
+// @ts-nocheck
+// Generated by unplugin-vue-components
+// Read more: https://github.com/vuejs/core/pull/3399
+// biome-ignore lint: disable
+export {};
+
+/* prettier-ignore */
+declare module 'vue' {
+  export interface GlobalComponents {
+    ElButton: typeof import('element-plus/es')['ElButton']
+    ElTooltip: typeof import('element-plus/es')['ElTooltip']
+    RouterLink: typeof import('vue-router')['RouterLink']
+    RouterView: typeof import('vue-router')['RouterView']
+  }
+}

+ 9 - 9
apps/web-ele/src/router/routes/modules/dashboard.ts

@@ -22,15 +22,15 @@ const routes: RouteRecordRaw[] = [
           title: $t('page.dashboard.analytics'),
           title: $t('page.dashboard.analytics'),
         },
         },
       },
       },
-      {
-        name: 'Workspace',
-        path: '/workspace',
-        component: () => import('#/views/dashboard/workspace/index.vue'),
-        meta: {
-          icon: 'carbon:workspace',
-          title: $t('page.dashboard.workspace'),
-        },
-      },
+      // {
+      //   name: 'Workspace',
+      //   path: '/workspace',
+      //   component: () => import('#/views/dashboard/workspace/index.vue'),
+      //   meta: {
+      //     icon: 'carbon:workspace',
+      //     title: $t('page.dashboard.workspace'),
+      //   },
+      // },
     ],
     ],
   },
   },
 ];
 ];

+ 41 - 20
apps/web-ele/src/views/coupon-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { Page, useVbenModal } from '@vben/common-ui';
 import { Page, useVbenModal } from '@vben/common-ui';
 import { MdiDelete, MdiDetail, MdiEdit } from '@vben/icons';
 import { MdiDelete, MdiDetail, MdiEdit } from '@vben/icons';
@@ -90,7 +90,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -163,24 +163,45 @@ function handleFinish() {
         </el-tag>
         </el-tag>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 2 - 2
apps/web-ele/src/views/customer-manage/form.vue

@@ -82,8 +82,8 @@ const [BaseForm, baseFormApi] = useVbenForm({
         placeholder: '请选择用户性质',
         placeholder: '请选择用户性质',
         allowClear: true,
         allowClear: true,
         options: [
         options: [
-          { label: '用户', value: '用户' },
-          { label: '渠道', value: '渠道' },
+          { label: '购机者', value: '购机者' },
+          { label: '经销商', value: '经销商' },
         ],
         ],
       },
       },
       rules: z.string().min(1, { message: '请选择用户性质' }),
       rules: z.string().min(1, { message: '请选择用户性质' }),

+ 41 - 20
apps/web-ele/src/views/customer-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { Page, useVbenModal } from '@vben/common-ui';
 import { Page, useVbenModal } from '@vben/common-ui';
 import { MdiDelete, MdiDetail, MdiEdit } from '@vben/icons';
 import { MdiDelete, MdiDetail, MdiEdit } from '@vben/icons';
@@ -115,7 +115,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -180,24 +180,45 @@ async function handleDelete(row: any) {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 28 - 14
apps/web-ele/src/views/examine-manage/examine-coupon/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { h } from 'vue';
 import { h } from 'vue';
 
 
@@ -126,7 +126,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -174,18 +174,32 @@ function handleFinish() {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template> -->
       </template> -->
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 28 - 14
apps/web-ele/src/views/examine-manage/examine-subsidy/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { Page, useVbenModal } from '@vben/common-ui';
 import { Page, useVbenModal } from '@vben/common-ui';
 import { MdiDetail, MdiEdit } from '@vben/icons';
 import { MdiDetail, MdiEdit } from '@vben/icons';
@@ -97,7 +97,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -145,18 +145,32 @@ function handleFinish() {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template> -->
       </template> -->
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 40 - 19
apps/web-ele/src/views/order-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { h } from 'vue';
 import { h } from 'vue';
 
 
@@ -175,24 +175,45 @@ async function handleDelete(row: any) {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 41 - 20
apps/web-ele/src/views/product-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { Page, useVbenModal } from '@vben/common-ui';
 import { Page, useVbenModal } from '@vben/common-ui';
 import { MdiDelete, MdiDetail, MdiEdit } from '@vben/icons';
 import { MdiDelete, MdiDetail, MdiEdit } from '@vben/icons';
@@ -108,7 +108,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -177,24 +177,45 @@ async function handleDelete(row: any) {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 41 - 20
apps/web-ele/src/views/scqy-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { Page, useVbenModal } from '@vben/common-ui';
 import { Page, useVbenModal } from '@vben/common-ui';
 import { MdiDelete, MdiDetail, MdiEdit } from '@vben/icons';
 import { MdiDelete, MdiDetail, MdiEdit } from '@vben/icons';
@@ -84,7 +84,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -149,24 +149,45 @@ async function handleDelete(row: any) {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 28 - 14
apps/web-ele/src/views/subsidy-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { Page, useVbenModal } from '@vben/common-ui';
 import { Page, useVbenModal } from '@vben/common-ui';
 import { MdiDetail, MdiEdit } from '@vben/icons';
 import { MdiDetail, MdiEdit } from '@vben/icons';
@@ -97,7 +97,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -146,18 +146,32 @@ function handleFinish() {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 41 - 20
apps/web-ele/src/views/system-manage/data-dictionary/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { h } from 'vue';
 import { h } from 'vue';
 
 
@@ -145,7 +145,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -210,24 +210,45 @@ function handleFinish() {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 41 - 20
apps/web-ele/src/views/system-manage/menu-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { h } from 'vue';
 import { h } from 'vue';
 
 
@@ -160,7 +160,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -244,24 +244,45 @@ function handleFinish() {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 3 - 3
apps/web-ele/src/views/system-manage/operation-logs/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { h } from 'vue';
 import { h } from 'vue';
 
 
@@ -116,7 +116,7 @@ const gridOptions: VxeGridProps<any> = {
           return h(
           return h(
             ElTag,
             ElTag,
             {
             {
-              type,
+              type: type as any,
               effect: 'light',
               effect: 'light',
               size: 'small',
               size: 'small',
             },
             },
@@ -138,7 +138,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },

+ 41 - 20
apps/web-ele/src/views/system-manage/role-manage/index.vue

@@ -2,7 +2,7 @@
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 import type { RoleGroupEntity } from '@vben/types';
 import type { RoleGroupEntity } from '@vben/types';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { h } from 'vue';
 import { h } from 'vue';
 
 
@@ -125,7 +125,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -190,24 +190,45 @@ function handleFinish() {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 41 - 20
apps/web-ele/src/views/system-manage/user-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { h } from 'vue';
 import { h } from 'vue';
 
 
@@ -120,7 +120,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -185,24 +185,45 @@ function handleFinish() {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleDelete(row)"
-          :icon="MdiDelete"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDelete(row)"
+            :icon="MdiDelete"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />

+ 28 - 14
apps/web-ele/src/views/system-manage/worker-manage/index.vue

@@ -1,7 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { VbenFormProps } from '@vben/common-ui';
 import type { VbenFormProps } from '@vben/common-ui';
 
 
-import type { VxeGridProps } from '#/adapter/vxe-table';
+import type { VxeGridListeners, VxeGridProps } from '#/adapter/vxe-table';
 
 
 import { Page, useVbenModal } from '@vben/common-ui';
 import { Page, useVbenModal } from '@vben/common-ui';
 import { MdiDetail, MdiEdit } from '@vben/icons';
 import { MdiDetail, MdiEdit } from '@vben/icons';
@@ -102,7 +102,7 @@ const gridOptions: VxeGridProps<any> = {
   ],
   ],
 };
 };
 
 
-const gridEvents: VxeGridListeners<RowType> = {
+const gridEvents: VxeGridListeners<any> = {
   cellDblclick: ({ row }) => {
   cellDblclick: ({ row }) => {
     handleDetail(row);
     handleDetail(row);
   },
   },
@@ -151,18 +151,32 @@ function handleFinish() {
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
         <el-button type="primary" @click="handleCreate"> 新增 </el-button>
       </template>
       </template>
       <template #action="{ row }">
       <template #action="{ row }">
-        <el-button
-          round
-          @click="() => handleDetail(row)"
-          :icon="MdiDetail"
-          class="!p-2"
-        />
-        <el-button
-          round
-          @click="() => handleEdit(row)"
-          :icon="MdiEdit"
-          class="!p-2"
-        />
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleDetail(row)"
+            :icon="MdiDetail"
+            class="!p-2"
+          />
+        </el-tooltip>
+        <el-tooltip
+          class="box-item"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <el-button
+            round
+            @click="() => handleEdit(row)"
+            :icon="MdiEdit"
+            class="!p-2"
+          />
+        </el-tooltip>
       </template>
       </template>
     </Grid>
     </Grid>
     <Modal @finish="handleFinish" />
     <Modal @finish="handleFinish" />