随笔分类 -  Vue

Vue
摘要:问题1 const allotVO = reactive<DeviceInfoVO[]>([]); allotVO = []; 不能对 allotVO 进行初始化,怎么能把 allotVO 里面的数据给清掉。 直接修改数组长度(推荐) // 方法1 - 最简洁 allotVO.length = 0; 阅读全文
posted @ 2026-01-09 15:36 VipSoft 阅读(9) 评论(0) 推荐(0)
摘要:使用 el-table 实现表格嵌套效果 <template> <el-card shadow="never"> <el-table :data="tableData" border class="detail-table"> <el-table-column prop="ReportTitleNa 阅读全文
posted @ 2026-01-09 10:57 VipSoft 阅读(23) 评论(0) 推荐(0)
摘要:WebStorm 没有启动按钮,右击 package.json 选择 Show npm Scripts 阅读全文
posted @ 2026-01-06 14:56 VipSoft 阅读(11) 评论(0) 推荐(0)
摘要:vue3-element-admin Unresolved function or method defineOptions() 这边的 defineOptions 是标红的 全局 pmports src\types\auto-imports.d.ts 添加: const defineOptions 阅读全文
posted @ 2025-11-06 15:35 VipSoft 阅读(6) 评论(0) 推荐(0)
摘要:Vue3 修改原有的多环境切换方式: https://www.cnblogs.com/vipsoft/p/19059258 Vue 多环境配置: https://www.cnblogs.com/vipsoft/p/16696640.html 创建文件 创建 public/app-settings.j 阅读全文
posted @ 2025-09-15 09:52 VipSoft 阅读(20) 评论(0) 推荐(0)
摘要:Vue 父页面调用子页面的方法 父页面 <el-col :lg="4" :xs="24" class="mb-[12px]"> <HospitalTree ref="hospitalTreeRef" v-model="queryParams.HospitalId__eq" @node-click=" 阅读全文
posted @ 2025-09-10 10:29 VipSoft 阅读(17) 评论(0) 推荐(0)
摘要:<script setup lang="ts"> //引用对象 + 扩展属性 const props = defineProps({ detailData: { type: Object, default: () => ({}), // 默认空对象,避免 undefined }, }); const 阅读全文
posted @ 2025-09-10 07:59 VipSoft 阅读(31) 评论(0) 推荐(0)
摘要://这句要加,否则前端获取不到 "Content-Disposition" response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); response.setHeader("Content-Disposit 阅读全文
posted @ 2025-09-04 15:05 VipSoft 阅读(42) 评论(0) 推荐(0)
摘要:注意:indeterminate = false ,表示没被选中,提交的时候没有值 <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=devic 阅读全文
posted @ 2025-09-04 13:58 VipSoft 阅读(12) 评论(0) 推荐(0)
摘要:前端更新程序后,通知用户刷新UI 需要手动修改版本号 在 public 目录下 创建 version.json { "version": "1.0.0" } src\App.vue 文件中添加如下代码 <script setup lang="ts"> // 检查版本更新 const checkVer 阅读全文
posted @ 2025-09-01 08:33 VipSoft 阅读(118) 评论(0) 推荐(0)
摘要:菜单权限 store\modules\permisstion.ts -> generateRoutes() 按钮权限 directive\permission\index.ts 路由权限 plugins\permission.ts permission.ts 修改如下 import type { N 阅读全文
posted @ 2025-08-28 09:50 VipSoft 阅读(18) 评论(0) 推荐(0)
摘要:<el-button size="small" link icon="Switch">更多</el-button> 修改后 <el-button type="primary" size="small" link> 更多 <el-icon class="el-icon--right"><DArrowR 阅读全文
posted @ 2025-08-27 15:07 VipSoft 阅读(60) 评论(0) 推荐(0)
摘要:Vue2 多环境配置:https://www.cnblogs.com/vipsoft/p/16696640.html 一般可以使用 Jenkins 对配置 .env.development、.env.production,不同的环境进行构建 在没有 CI/CD 的情况下。Vue 项目的打包变得繁琐。 阅读全文
posted @ 2025-08-26 16:39 VipSoft 阅读(50) 评论(0) 推荐(0)
摘要:Unknown series wordCloud 缺少引用: import "echarts-wordcloud"; https://ecomfe.github.io/echarts-wordcloud/ https://www.npmjs.com/package/echarts-wordcloud 阅读全文
posted @ 2025-08-26 14:12 VipSoft 阅读(67) 评论(0) 推荐(0)
摘要:由于 wss://echo.websocket.org 不支持STOMP协议,改用原生WebSocket API 这个地址可以用来测试,wss://echo.websocket.org/ws 最终效果 代码如下: <template> <div class="app-container"> <el- 阅读全文
posted @ 2025-08-26 11:37 VipSoft 阅读(82) 评论(0) 推荐(0)
摘要:const { IsSuperAdmin } = useUserStore().userInfo; /** * 获取后台动态路由数据,解析并注册到全局路由 * * @returns Promise<RouteRecordRaw[]> 解析后的动态路由列表 */ function generateRo 阅读全文
posted @ 2025-08-26 10:00 VipSoft 阅读(213) 评论(0) 推荐(0)
摘要:目录localStorage 与 useStorage 的区别localStorage(原生 API)useStorage(VueUse 工具函数)对比示例总结删除 userInfo 的 key 方法1. 使用 useStorage 的推荐方式2. 手动删除 localStorage 的 key3. 阅读全文
posted @ 2025-08-25 14:26 VipSoft 阅读(304) 评论(0) 推荐(1)
摘要:菜单权限 store\modules\permisstion.ts -> generateRoutes() import { RouteRecordRaw } from "vue-router"; //privateRoutes 前端配置好的JS菜单,权限控制由前端控制,【后端省事】 import 阅读全文
posted @ 2025-08-22 17:21 VipSoft 阅读(41) 评论(0) 推荐(0)
摘要:去服务器获取数据 getVisitStats() { return request<any, VisitStatsVO>({ url: `${LOG_BASE_URL}/visit-stats`, method: "get", }); }, 将 VisitStats.ts 中的 JSON 数据作为模 阅读全文
posted @ 2025-08-22 11:30 VipSoft 阅读(27) 评论(0) 推荐(0)
摘要:function generateRoutes() { return new Promise<RouteRecordRaw[]>((resolve, reject) => { MenuAPI.getRoutes() .then((data) => { const dynamicRoutes = pa 阅读全文
posted @ 2025-08-21 16:16 VipSoft 阅读(74) 评论(0) 推荐(0)