- 博客(20)
- 资源 (1)
- 收藏
- 关注
原创 vue 打印页面(解决打印预览不全的问题)
不同分辨率下,页面内容打印不全的问题参考的博客https://www.cnblogs.com/scallop/p/14184580.html参考的博客(scallop)安装插件print-js,html2canvas页面使用<template> <div> <el-button class="acticedBtn" @click="printFn">打印</el-button> <div ref="printId">
2021-09-08 09:41:01
4739
3
原创 vue js防抖节流
防抖触发高频事件后n秒内函数只会执行一次,如果n秒内高频事件再次被触发,则重新计算时间防抖就是在函数需要频繁触发情况时,只有足够空闲的时间,才执行一次节流高频事件触发,但在n秒内只会执行一次,所以节流会稀释函数的执行频率函数节流就是预定一个函数只有在大于等于执行周期是才执行,周期内调用不执行常用场景:防抖: 可以用于鼠标移动确定最后一次的位置, resize改变布局次数过于频繁节流: 按钮点击多次 ,search搜索联想,scroll滚动事件Debounces.js//节流export
2021-01-19 14:41:34
372
原创 高德地图 点聚合功能加点击事件
效果展示放大缩小地图层级时,点位会自动聚合或分散主要用到的方法是 聚合点插件:AMap.MarkerClusterer高德地图官方api:https://lbs.amap.com/api/javascript-api/reference/plugin#AMap.MarkerClusterer开始要先引入<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=自己的key">&
2021-01-07 15:28:21
4024
15
原创 js 批量下载多个文件
function downloadFile(url){//下载文件方法 const iframe = document.createElement("iframe"); iframe.style.display = "none"; // 防止影响页面 iframe.style.height = 0; // 防止影响页面 iframe.src = url; document.body.appendChild(iframe); // 这一行必须,iframe挂在到dom
2020-10-22 17:21:08
2615
1
原创 vue兄弟组件之间传值的两种办法
效果展示第一种办法通过事件总线bus传值再main.js里首先声明Vue.prototype.$bus=new Vue();父组件<template> <div> <child1></child1> <child2></child2> </div></template><script>import child1 from './us
2020-07-07 13:59:42
10174
8
原创 高德地图 map遮挡其他区域只显示某个城市,加区域边界
效果展示<template> <div class="hot_wrapper"> <div class="map"> <div style="height:100%;width:100%;outline: none!important;" id="container" tabindex="0"> </div> </div> </div></t
2020-06-30 11:31:14
5227
19
原创 高德地图地图层级不同显示marker数量不同
<template> <div class="hot_wrapper"> <div class="map"> <div style="height:100%;width:100%;outline: none!important;" id="container" tabindex="0"> </div> </div> </div></templat
2020-06-12 15:52:10
4530
原创 关于深拷贝 扩展运算符...
…扩展运算符之前一直以为…可以进行深拷贝,但其实不是第一种情况,可以深拷贝的//{key:value},[value]当value是string,number,Boolean类型都是深拷贝var aa=[1,2,3,4],bb;bb=[...aa];bb[0]=5;console.log(aa)//[1, 2, 3, 4]console.log(bb)//[5, 2, 3, 4]当对象或数组穿插或者多层时拷贝的就是引用地址了,//{key:value},[value] value为ar
2020-05-11 14:21:58
340
原创 uni-app切换tabs列表
<template> <view class="alarmList"> <view class="switchHead"> <view v-for="(item,index) in tabTitleData" class="boxList" :class="{activeCss:activeIndex==index}" :key="index"...
2020-05-06 18:15:10
4188
2
原创 小程序 封装下拉框组件,带搜索
1.组件select.wxml<!--Componet/select/select.wxml--><view class='com-selectBox'> <view class='com-sContent' bindtap='selectToggle'> <input value="{{nowText==''?propArra...
2020-05-02 15:18:49
1897
4
原创 element UI面包屑 breadcrumb
路由页面菜单页面//html<el-breadcrumb separator=">"> <span class="crumbBox"></span> <el-breadcrumb-item v-for="item in breadCrumbData" :key="item.path"> <router-lin...
2020-04-30 10:58:46
2149
原创 v-for循环 form表单 validate 验证
<template> <div class="driverPermit"> <div v-for="(item,index) in datas.realForm" :key="index"> <el-form ref="form" :model="datas" label-width="16...
2020-04-25 17:33:10
2838
原创 安装node,npm配置
node安装1.node官方下载地址:https://nodejs.org/zh-cn/2.下载完成后,点击运行exe文件,一直点击下一步即可,(我安装的是在d盘D:\Program Files\)安装完成后在cmd里面输入node -v ,npm -v(若显示版本号及安装成功,我这是之前下载安装的,安装什么版本,这块显示的版本号就是什么版本)以上node npm就安装完成了,接下来就...
2020-04-15 11:58:25
222
原创 vue 后台管理登录权限不同,不同的导航菜单
后台管理不同的权限登录,后台的导航栏显示不同菜单1.router.js路由页面的配置首先路由页面分两块,一块是默认的路由,无论用户的权限是什么,都会访问到的页面,也叫公共路由另一块是需要用户权限才能查看的某些特定的页面import Vue from 'vue'import Router from 'vue-router'const login=()=>import('@/co...
2020-04-08 18:36:06
9564
10
原创 vue element UI分页组件引用
1.子组件分页页面//pagination.vue页面<template> <div> <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentCha...
2020-04-08 16:43:11
422
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人