自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 收藏
  • 关注

原创 前端JS如何校验 座机号码

var reg = /^[0-9-{0,}$/

2019-12-30 16:37:52 1214

原创 前端使用ElementUI +Vue table表头添加tooltip悬浮提示框

<el-tableempty-text=“正在加载中…”:data=“contentList”style=“width: 100%”@sort-change=“sort”class=“pro-table-item”tooltip-effect=“dark” <template v-for="(item,index) in titleList">    <...

2019-12-30 10:23:16 7848 1

原创 js字符串中不能包含中文与英文用来校验座机号码

var reg = /1{0,}$/0-9- ↩︎

2019-12-27 10:43:05 276

原创 前端表格无限滚动

使用安装npm install --save el-table-infinite-scroll1全局引入import Vue from ‘vue’;import elTableInfiniteScroll from ‘el-table-infinite-scroll’;Vue.use(elTableInfiniteScroll);1234局部引入123456...

2019-12-25 20:14:26 1089

原创 react如何使用react-router-dom路由

import React from ‘react’;// 引入hashHistoryimport {HashRouter, Route, Switch, hashHistory} from ‘react-router-dom’;import Home from ‘./v/home.jsx’;import Mine from ‘./v/detail’;const BasicRoute = ...

2019-12-24 17:03:17 167

原创 react中如何跳转路由

通过a标签跳转a href=’#/detail’>去detail</a通过函数编程import {HashRouter, Route, Switch, hashHistory} from ‘react-router-dom’;<button onClick={() => this.props.history.push(‘Mine’)}>通过函数跳转...

2019-12-24 17:01:11 1300

原创 前端如何创建 react脚手架 1分钟就能创建成功

(1)npm install -g create-react-app(2)create-react-app my-app(3)cd my-app(4)npm start

2019-12-23 10:44:21 137

原创 前端页面使用表格文字超出30字后显示省略号

1.设置过滤器filters: {ellipsis(value) {if (!value) return “”;if (value.length > 30) {return value.slice(0, 30) + “…”;}return value;}},2.使用过滤器el-table-column label=“题干” width=“600”template sl...

2019-12-20 14:00:56 784

原创 前端使用Element-ui表格内容过长时候,添加悬浮效果

1.el-table是有这个控制属性的::show-overflow-tooltip=“true”2.悬浮颜色覆盖.el-tooltip__popper{max-width:20%;}.el-tooltip__popper,.el-tooltip__popper.is-dark {background:#f5f5f5 !important;color: #303133 !import...

2019-12-20 13:56:18 3664

原创 前端生成唯一id解决SessionId不一致

在项目开发中我们常需要给某些数据定义一个唯一标识符,便于寻找,关联。node-uuid模块很好的提供了这个功能。https://github.com/broofa/node-uuid/使用起来很简单,两种:1、uuid.v1(); -->基于时间戳生成 (time-based)2、uuid.v4(); -->随机生成 (random)通常我们使用基于时间戳 v1() ...

2019-12-19 16:26:10 1749

原创 element-ui表格内容过多样式优化

el-table-column:render-header=“labelHead”:prop=“col.filedName”show-overflow-tooltip=“true”sortable:label=“col.alias”:formatter=“formatterTableCol”>el-table-column>methods: {labelHead: f...

2019-12-19 16:18:54 1644

原创 前端element-ui表格滚动条样式优化

2019-12-18 10:30:49 786

原创 IE浏览器如何获取本地ip地址

function GetAdapterInfo() {//var locator = new ActiveXObject(“WbemScripting.SWbemLocator”);var service = locator.ConnectServer("."); //连接本机服务器var properties = service.ExecQuery(“SELECT * FROM Win...

2019-12-13 19:04:29 1803

原创 IE浏览器如何获取IP地址

<object classid="CLSID:76A64158-CB41-11D1-8B02-00600806D9B6" id="locator" style="display:none;visibility:hidden"></object><object classid="CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223"...

2019-12-13 18:52:51 1184

原创 js获取ip地址

function getUserIP(onNewIP) { // onNewIp - your listener function for new IPs//compatibility for firefox and chromevar myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || ...

2019-12-13 14:48:47 277

原创 纯前端js获取电脑本地IP地址(必用)

注意 启动本地服务才能获取到:function getUserIP(onNewIP) { // onNewIp - your listener function for new IPs//compatibility for firefox and chromevar myPeerConnection = window.RTCPeerConnection || window.mozRTCPe...

2019-12-13 11:56:32 4938 2

原创 Vue下载文件,如何把后端返回的文件流变为下载地址

axios({method: ‘post’,url: ‘api/user/’,data: {firstName: ‘Fred’,lastName: ‘Flintstone’},responseType: ‘blob’}).then(response => {this.download(response)}).catch((error) => {})methods...

2019-12-09 15:26:57 2249

原创 前端使用Element-ui上传文件如何添加Token

<el-upload action="test" :headers="myHeaders"></el-upload>var token = localStorage.getItem(‘token’) // 要保证取到export default {data () {return {myHeaders: {Authorization: token}}}}...

2019-12-09 14:08:34 2033

原创 前端ES5与ES6继承

es5的继承原型链继承function Parent(){this.name=‘kevin’;}Parent.prototype.getName=function (){console.log(this.name);}function Child(){}Child.prototype=new Parent();var child=new Child();child.getNa...

2019-12-05 14:58:54 242

原创 js面向对象与继承

function Person(name,sex){// var this=new Object();//这里注释的代码 假想 new操作时系统内部帮我们做了这些 this.name=name; this.sex=sex; //不建议方法写在构造函数里 this.showSex=function(){ con...

2019-12-03 20:21:09 105

原创 前端表格懒加载

那如何判断滚动条滚到底部了呢?scrollHeight-scrollTop-clientHeight=0,这个时候可以就是滚动条滚到底部的时候了。在第一次请求数据的时候,先设置一个变量来记录请求次数(其实后台也是做分页的处理)this.currentPage = 1,this=this;this.this = this;this.this=this;this.axios.fun().th...

2019-12-02 16:19:12 1611

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除