- 博客(10)
- 收藏
- 关注
原创 vue、elForm表单查询区封装
日常中后台,查询区域是避免不了的,今天感觉cv不如封装好,所以就…首先创建个.vue文件,(hyf-form)<!-- 目前支持:input,select,单选日期,日期范围,多选 待完善 labelWidth: 表单名宽度 formModel: 查询所需字段,需要与fromItems中的filed名称一样 elRow: 自适应 itemStyle: 内边距 footer: 表单中自适应的插槽,用于放: 查询,重置等 footer-btn: 表单外插槽另起一行,用于放
2022-04-12 15:03:52
1356
1
原创 vue, el-input失去焦点提交数据,当切换浏览器的时候会提交俩次,就很有意思
今天遇见一个bug,当使用el-input失去焦点提交时,bug在聚焦清空下,切换浏览器会提交俩次数据解决方法:在mounted中获取window失焦,聚焦,具体方式看同学需求是啥吧,我这里用的是状态值,跟计数来检测 // 浏览器失焦处理添加步骤多条问题 window.onblur = () =>{ this.inputSubmit = false this.inputCount = -1 } // 浏览器聚焦处理添加步骤多条问题 windo
2022-03-31 09:03:02
1518
原创 基于vue,自定义条形进度条/辣条进度条
第一种,悬浮选显示进度条,如果不需要悬浮可以 showTip为true,这样会导致菜单折叠进度条位置不变,如果悬浮显示就没有问题,<template> <div :style="{width:width+'px'}" class="processBox" @mouseover="showTip=true" @mouseleave="showTip=false" > <div :style="{width:width+'px'}" class="bgBox"&
2022-03-31 08:52:31
2022
原创 el-tree 默认选中及子节点没有key,父节点版选状态
昨天又遇到了elementui的组件的坑…废话不多说了,下面看代码html<el-tree :data="data" node-key="keywords" ref="tree" show-checkbox highlight-current :default-expanded-keys="data.keywords" :filter-node-method="filterNode"
2021-12-04 15:40:57
479
原创 vue 显示更多,收起功能
话不多说,直接上代码html<div class="listgoods-right-flex"> <div class="content"> <span class="item" v-for="(item,index) in supplierList" :key="index" v-if="index <= tagBtnListLength">{{item.name}}</span> </div>
2021-11-30 10:49:36
421
原创 el-upload 上传验证文件类型
html<el-upload class="avatar-uploader" :http-request="viewUpload" :before-upload="beforeUpload" action="" :multiple="true" :show-fi
2021-11-11 17:38:37
1151
原创 el-image点击遮罩层关闭图片
html <el-image style="width: 200px;" @click="handleClickItem" :src="shopimage" :preview-src-list="[shopimage]" v-if="shopimage"/>```## js```typescript // 背景关闭图片 handleClickItem () { this.$nextTi
2021-11-11 17:36:09
1588
原创 js el-form表单上下交换位置
html <template #operation="scope"> <div> <!-- 上移图片 --> <i class="el-icon-caret-top" @click="tableUp(scope.$index )">&
2021-11-11 17:34:37
1036
原创 js数组数据前后数据交换位置
html<div class="pic-item" v-for="(item,index) in picList" :key="index"> <el-image class="pic" @click="handleClickItem" :src=" item.url" :preview-src-list="[item.ur
2021-11-11 17:31:59
1464
原创 element el-carousel 轮播图分页,一页显示n条
element el-carousel 轮播图分页,一页显示n条html <el-carousel trigger="click" height="650px" :autoplay='false'> <el-carousel-item v-for="(item,index) in productRecommendationList" :key="index">
2021-11-11 17:29:01
3338
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人