1 2 3 4 5 ··· 8 下一页
摘要: 问题描述: 前端项目自定义webpack自动构建项目,启动时报错:Error: error:0308010C:digital envelope routines::unsupported 报错原因: 主要是因为 nodeJs V17 版本发布了 OpenSSL3.0 对算法和秘钥大小增加了更为严格的 阅读全文
posted @ 2024-03-12 14:49 Gaochunling 阅读(8257) 评论(0) 推荐(2) 编辑
摘要: 需求: input 备注输入框字数超长输入后,鼠标划上弹框显示所有内容 实现逻辑: 1、传入$event对象 ,获取offsetwidth 与scrollWidth,对比,如果大于则显示 template 定义: <el-input placeholder="" maxlength="100" @m 阅读全文
posted @ 2023-09-06 11:47 Gaochunling 阅读(628) 评论(0) 推荐(0) 编辑
摘要: 需求: 1、element form volid 必填提示框警告2、自动定位到首个未通过校验字段 实现思路:1.validate 校验需要给提交事件添加一个参数 object ; 2.当校验不通过时收集所有未通过字段项提示信息,将其通过 push 方法添加到定义好的数组中(str);3.通过 thi 阅读全文
posted @ 2023-09-06 11:34 Gaochunling 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 微信小程序的附件上传下载。上传后并支持打开 1、wxml 定义 <view> <van-uploader class="autoField" bind:after-read="afterRead" accept="file" upload-text="上传附件" max-count="6" disa 阅读全文
posted @ 2023-06-26 18:24 Gaochunling 阅读(891) 评论(0) 推荐(0) 编辑
摘要: 每个vue单文件组件中,可以加入三种route navigation guards(导航守卫钩子):beforeRouteEnter,beforeRouteUpdate,beforeRouteLeave,比较常用的是beforeRouteEnter和beforeRouteLeave,这里总结下项目中 阅读全文
posted @ 2022-10-10 11:07 Gaochunling 阅读(3452) 评论(0) 推荐(0) 编辑
摘要: 场景描述: 前端请求接口,接口的response返回为文件流,前端进行下载 1、定义触发按钮 <el-button type="success" @click="export()">导 出</el-button> import { export } from '@/views/request.js' 阅读全文
posted @ 2022-07-04 17:27 Gaochunling 阅读(2121) 评论(0) 推荐(0) 编辑
摘要: //示例一:同步 async changeMailFlag(data) { try { const res = await saveOverSeasMailFlag({ mailFlag: data.data.mailFlag, groupId: data.data.groupId }); if ( 阅读全文
posted @ 2021-10-04 16:31 Gaochunling 阅读(106) 评论(0) 推荐(0) 编辑
摘要: // 直接调用$router.push 实现携带参数的跳转 this.$router.push({ path: `/describe/${id}`, 需要对应路由配置如下: { path: '/describe/:id', name: 'Describe', component: Describe 阅读全文
posted @ 2021-07-23 16:14 Gaochunling 阅读(1144) 评论(0) 推荐(0) 编辑
摘要: 原因: Select组件有个API getPopupContainer,Ant Design官方文档给出的用途解释为:“菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位”。同时官网也强调一个特殊情况需要注意:“如果发现下拉菜单跟随页面滚动,或者 阅读全文
posted @ 2020-10-26 14:30 Gaochunling 阅读(3576) 评论(0) 推荐(0) 编辑
摘要: /** * 关闭页面,兼容各浏览器(解决ie提示框问题) */ function closeWindow(){ if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Chrome")!=-1) { 阅读全文
posted @ 2020-06-30 16:56 Gaochunling 阅读(826) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 8 下一页