摘要:
$.inArray()-判断某个值是否存在于数组中 语法: $.inArray(value, array) 参数 value 是一个值,参数 array 是一个数组。$.inArray(value,array) 表示判断 value 是否存在于 array 中。如果存在,则返回 value 的位置( 阅读全文
摘要:
一、初始化首先需要创建事件总线并将其导出,以便其它模块可以使用或者监听它。我们可以通过两种方式来处理。先来看第一种,新创建一个 .js 文件,比如 event-bus.js // event-bus.js import Vue from 'vue' export const EventBus = n 阅读全文
摘要:
1. Get方法长度限制 Http Get方法提交的数据大小长度并没有限制,HTTP协议规范没有对URL长度进行限制。这个限制是特定的浏览器及服务器对它的限制。 如:IE对URL长度的限制是2083字节(2K+35)。 下面就是对各种浏览器和服务器的最大处理能力做一些说明. Microsoft In 阅读全文
摘要:
背景:列表的详情页做tab,在router.config.js自定义路由; 使用TabLayout会默认缓存数据,tab切换不更新;所以需要在router.config.js, meta加上keepAlive: true在TabLayout.vue文件进行以下修改 阅读全文
摘要:
项目需求: 数据没有经纬度,展示廊坊市地图;存在标记; <template> <div id='MapBox'> <div class='mapDiv' :id='params.id' ref="mapShow"></div> </div> </template> <script> let tile 阅读全文
摘要:
<!--引入需要的js和css--> <link rel="stylesheet" href="http://www.dituyi.com.cn/wmap/wmap.css"> <script src="http://www.dituyi.com.cn/wmap/wmap.js"></script> 阅读全文
摘要:
main.js引入封装好的print import {print} from '@/components/print.js' Vue.prototype.print = print print.js 1 import printJS from 'print-js' 2 3 function remo 阅读全文
摘要:
//比较日期大小 function compareDate(checkStartDate, checkEndDate) { var arys1= new Array(); var arys2= new Array(); if(checkStartDate != null && checkEndDat 阅读全文
摘要:
$.validator.addMethod("checkText",function(value,element,params){ var reg01 = /^[\u4e00-\u9fa5]+$/; return this.optional(element)||(reg01.test(value)) 阅读全文