2021年5月28日

快速删除node_modules

摘要: 全局安装rimraf: npm install rimraf -g 到你的项目根目录下(即有node_modules的目录),执行命令: rimraf node_modules 阅读全文

posted @ 2021-05-28 17:20 幺蛾子多 阅读(47) 评论(0) 推荐(0) 编辑

2020年11月19日

vue 高德地图 地图初始化显示接口返回的多个经纬度

摘要: npm 安装 依赖。 npm install vue-amap --save mian.js 中注册import VueAMap from 'vue-amap';Vue.use(VueAMap);VueAMap.initAMapApiLoader({ key: '高德的key',//高德的key p 阅读全文

posted @ 2020-11-19 14:41 幺蛾子多 阅读(900) 评论(0) 推荐(0) 编辑

vue element UI el-table 单元格中超出字省略号显示

摘要: filters: { formatLongText(value) { if(value undefined||value null||value ''){ return '暂无'; }else if(value.length>8){ return value.substr(0, 8) + '...' 阅读全文

posted @ 2020-11-19 10:49 幺蛾子多 阅读(4775) 评论(0) 推荐(0) 编辑

vue + element ui 打印

摘要: 使用方式 安装 npm install vue-print-nb --save 在main.js文件中注册 import Print from 'vue-print-nb' Vue.use(Print); 1.对象打印方式 <div> <div id="printMe"> <div class="g 阅读全文

posted @ 2020-11-19 10:28 幺蛾子多 阅读(3482) 评论(0) 推荐(0) 编辑

2019年9月26日

css3中的属性 变形(transform)、过渡(transtion)、动画(animation)

摘要: 1、transform: 旋转rotate、移动translate、缩放scale、扭曲skew transform:rotate(±30deg) 正数:顺时针旋转,负数:逆时针旋转。 旋转 transform:translate(100px,20px) translateX translateY 阅读全文

posted @ 2019-09-26 18:28 幺蛾子多 阅读(1025) 评论(0) 推荐(0) 编辑

2016年12月6日

bootstrap 模态框垂直居中

摘要: 1 /** 2 * 使页面中所有.modal元素在窗口可视范围之内居中 3 **/ 4 function centerModals(){ 5 $('.modal').each(function(i){ 6 var $clone = $(this).clone().css('display', 'block').appendTo('body');... 阅读全文

posted @ 2016-12-06 11:04 幺蛾子多 阅读(214) 评论(0) 推荐(0) 编辑

2015年3月2日

BFC和IE的hasLayout

摘要: 关于Block Formatting Context--BFC和IE的hasLayoutBFC(Block Formatting Context)直译为“块级格式化范围”。在普通流中的 Box(框) 属于一种 formatting context(格式化上下文) ,类型可以是 block ,或者... 阅读全文

posted @ 2015-03-02 23:18 幺蛾子多 阅读(191) 评论(0) 推荐(0) 编辑

2014年11月25日

js碰撞

摘要: 两个div从不同方向、用不等的速度移动。html:javascript: var lastTime = Date.now(); var boxSpeed1 = 100; var boxSpeed2 = 150; var box1 = document.getElementById(... 阅读全文

posted @ 2014-11-25 22:49 幺蛾子多 阅读(166) 评论(0) 推荐(0) 编辑

回调函数

摘要: 定义 在JavaScript中,回调函数具体的定义为:函数A作为参数(函数引用)传递到另一个函数B中,并且这个函数B执行函数A。我们就说函数A叫做回调函数。如果没有名称(函数表达式),就叫做匿名回调函数。 回调函数就是一个通过函数指针调用的函数。如果你把函数的指针(地址)作为参数传递给另一个函数... 阅读全文

posted @ 2014-11-25 22:26 幺蛾子多 阅读(132) 评论(0) 推荐(0) 编辑

2014年11月19日

javascript面向对象——继承

摘要: 一、 构造函数绑定先来看下面两个函数的意义:function ClassA(sColor){ this.color=sColor; this.sayColor=function(){ alert(this.color); };} function ClassB(sC... 阅读全文

posted @ 2014-11-19 16:34 幺蛾子多 阅读(130) 评论(0) 推荐(0) 编辑

导航