自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 VUE去除绑定回显数据中的空格:v-model.trim

<el-input v-model.trim="item.value" type="textarea" autosize></el-input>

2020-04-30 11:42:07 2940

原创 VUE控制台报错: [vue-router] Duplicate named routes definition: { name: "NotFound", path: "*" }

VUE控制台报错: [vue-router] Duplicate named routes definition: { name: "NotFound", path: "*" }将下面写法{ path: "*", name: 'NotFound', redirect: "/404"}改为{ path: "*", redirect: { name: ...

2020-04-29 09:48:38 3066

原创 Javascript-every遍历数组 每一项均符合条件后执行相应操作

var flag=vm.theme.every(item=>{ if(item.topicName!=value){ return true }else{ vm.$message({ type: 'warning', message: '该主题已存在,请勿重复添加。' });...

2020-04-27 17:35:42 1978

原创 ElementUI dialog弹出层样式优化

.el-dialog{ // 居中弹框 position:absolute; top:50%; left:50%; margin:0 !important; transform:translate(-50%, -50%); // 防止超出视窗 max-height:calc(100% - 30px); max-width:calc(100% - 30px);...

2020-04-26 18:12:59 2611 3

原创 Date类型的操作方法

判断字符串是否为时间格式function isDate(str){ // 是时间类型str instanceof Date if(isNaN(str)&&!isNaN(Date.parse(str))){ return true; }else{ return false; }};console.log(isDate('1980-10-1 2...

2020-04-26 15:54:50 214

原创 JavaScript 动态修改Objcet的属性值

function processPointText(stateCode) { var obj = { editing: false, appointment: false, accept: false, update_state: false, appointment_back: false, register: f...

2020-04-26 13:30:57 317

原创 VUE实现延时请求接口

var setTimeFlag = null;ratioStep(urls){ var vm=this if(setTimeFlag != null){ clearTimeout(setTimeFlag); } setTimeFlag=setTimeout(()=>{ request.get(apis.runSimTask)...

2020-04-25 15:54:47 4513

转载 VUE项目部署到tomcat服务器-前端配置

说明对于前后端分离项目,后端通常直接用springboot以java -jar启动,或者打成war包放置tomcat中;前端工程使用webpack打包在dist文件夹下,再将statis和index.html放置到nginx等服务中。对于后端开发者而言,将后端和前端统一部署在tomcat下的有点如下:tomcat包解压即用非常方便 无需再安装nginx服务(若机器上无nginx或无sudo...

2020-04-25 11:14:15 3121

原创 VUE报错because it violates the following Content Security Policy directive

VUE启动服务后控制台报错:Refused to load the image 'http://localhost:8080/favicon.ico' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not expli...

2020-04-24 10:43:38 11128

转载 vue路由切换报错message: "Navigating to current location (XXX) is not allowed"的解决方案

操作:在VUE项目中点击两次路由切换原因:在路由跳转的时候同一个路由多次添加是不被允许的解决方案(两种):1.切换版本回3.0版本2.重写路由的push方法【在src/router/index.js 里面import Router from 'vue-router'下面写入下面方法即可】import Vue from 'vue' //如果已引用,不需要重复引用i...

2020-04-23 14:47:27 571

原创 VUE根据token,路由判断用户登录状态并跳转登录页

router.beforeEach((to, from, next) => { var token = library.getData("userName"); //如果没登录,都导向登录页 if (!token) { if (to.path !== '/Login') { next({ path: '/Login' }) } else {...

2020-04-23 13:33:46 2797

原创 VUE-axios统一增加请求头并根据接口返回的状态码判断用户登录状态并跳转登录页

背景:后台接口返回code==501表示用户是未登录状态,需要登录才可访问;main.js中通过http拦截做路由跳转import Vue from 'vue'import Axios from 'axios'Vue.prototype.$axios = Axiosimport { Loading, Message, MessageBox } from 'element-ui'...

2020-04-23 11:52:37 1978

原创 css实现长度过长时省略号显示

.ellipsis{ width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}

2020-04-22 18:11:12 474

转载 JavaScript毫秒整数转化为时分秒

function MillisecondToTime (msd) { var time = parseFloat(msd) / 1000; if (null != time && "" != time) { if (time > 60 && time < 60 * 60) { var a = parseInt(t...

2020-04-22 15:53:40 1063 1

原创 Javascript-filter遍历数组 返回符合条件的每一项

item.children=item.children.filter(i=>{ if(!idArr.includes(i.id)){ return true }})

2020-04-18 15:22:07 5438

原创 ElementUI 之 el-tabs添加自定义按钮

<div style='position: relative;'> <el-tabs v-model="activeName" @tab-click="handleClick" style='width:100%'> <el-tab-pane label="用户管理" name="first">用户管理</el-tab-pane&...

2020-04-15 10:23:08 10625

原创 Cesium基于czml billboard的模型转向

var czml = [{ "id" : "document", "name" : "CZML Point - Time Dynamic", "version" : "1.0"},{ "id" : "point", "availability" :"2012-08-04T16:00:00Z/2012-08-04T16:05:00Z", "posi...

2020-04-09 17:20:23 4246 6

原创 Cesium基于czml的model模型转向

var czml = [{ "id" : "document", "name" : "CZML Point - Time Dynamic", "version" : "1.0"},{ "id" : "point", "availability" :"2012-08-04T16:00:00Z/2012-08-04T16:05:00Z", "posi...

2020-04-09 17:02:38 4342 9

原创 Cesium:entity实体二维贴地运动+模型转向

var viewer = new Cesium.Viewer('cesiumContainer', { sceneMode: 2, infoBox: false, //Disable InfoBox widget selectionIndicator: false, //Disable selection indicator shouldAnimate: true...

2020-04-09 16:40:10 4409 3

原创 Ceisum二维状态下czml贴地光滑运动

"resolution":1//将路径显示为以1秒为增量采样的路径线。var czml = [{ "id" : "document", "name" : "CZML Point - Time Dynamic", "version" : "1.0"}, { "id" : "point", "availability" :"2012-08-04T16:0...

2020-04-09 16:24:14 689

原创 cesium经纬度转笛卡尔坐标

笛卡尔坐标系

2020-04-08 14:14:09 3135 3

原创 VUE项目启动后特定接口只调用一次

data(){ return{ getDataFlag:true }},handleClick(tab, event) { if(Bus.headName=="third"&&this.getDataFlag){ // 获取步长 this.getData(apis.step,) // 获...

2020-04-03 15:04:48 3918

原创 ElementUI 之 Cascader 级联选择器回显

级联选择器多选功能回显// 选择器赋值 去除为children空数组 traverse(arr,value) { if(arr.length){ arr.forEach(item => { Vue.set(item,"name",item.label.name) Vue.set(item,"id",item.l...

2020-04-03 11:24:20 3094

原创 InputNumber 计数器 连续点击一定时间内只允许执行一次

var timeoutflag = null;ratio(){ var vm=this if(timeoutflag != null){ clearTimeout(timeoutflag); } timeoutflag=setTimeout(function(){ console.log(vm.Num,"ces");//此处是一个...

2020-04-03 11:06:46 1605

原创 ElementUI遍历生成Form表单

<el-form ref="formAttr" :model="formAttr" label-width="80px" label-position="left" size="mini"> <template v-for="(items,key) in formAttr.Parameters" > <el-form-item :label...

2020-04-02 17:47:19 2429

空空如也

空空如也

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

TA关注的人

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