上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 什么是跨域? 协议 域名 ip地址 端口 任何一个不一样 就跨域 解决跨域? 1 jsonp 使用script的src发送 只能get 请求 2 cors 后台设置允许跨域 需要后台设置 允许跨域 ​ 所有后台语言 都可以设置 3 服务器代理,服务器之间不存在跨域问题 vue在 vue.config 阅读全文
posted @ 2021-01-08 16:16 ZJTL 阅读(4251) 评论(0) 推荐(0) 编辑
摘要: 亲测可用! <template> <div> <el-button :disabled="disabled" @click="sendcode" class="sendcode">{{btntxt}}</el-button> </div> </template> <script> export de 阅读全文
posted @ 2021-01-07 19:35 ZJTL 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 在说vue路由钩子函数之前,我先介绍一下路由的两种模式: const router = new VueRouter({ mode: 'history', mode: 'hash', }) 1.hash模式 hash模式背后的原理是onhashchange事件,可以用window.onhashchan 阅读全文
posted @ 2020-12-30 15:21 ZJTL 阅读(1368) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/9c95db596df5 阅读全文
posted @ 2020-12-29 21:46 ZJTL 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 在created钩子的时候处理 created(){ var enterEvent = this document.onkeydowm = function(e){ var key = window.event.keyCode if(key 13){ enterEvent.handle() } } 阅读全文
posted @ 2020-12-29 19:07 ZJTL 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 一、typeof console.log(typeof 1); // number console.log(typeof true); // boolean console.log(typeof 'mc'); // string console.log(typeof function(){}); / 阅读全文
posted @ 2020-12-27 21:35 ZJTL 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 获取所有的DOM节点 document.querySelectorAll('*') NodeList集合转化为数组 [...document.querySelectorAll('*')] 获取数组每个元素的标签名 [...document.querySelectorAll('*')].map(ele 阅读全文
posted @ 2020-12-27 21:19 ZJTL 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 问题描述 当我们开发项目时,常常想限制用户只能输入纯数字: 解决办法 <el-form-item label="角色Id*" class="redItem"> <el-input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" size= 阅读全文
posted @ 2020-09-22 10:33 ZJTL 阅读(4644) 评论(0) 推荐(0) 编辑
摘要: <!-- 引入非对称 RSA 加密工具 --> import { JSEncrypt } from 'jsencrypt' // 加密公钥 const key = ` ` 实际项目中 let key ="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDtID8+nPhj 阅读全文
posted @ 2020-09-11 12:23 ZJTL 阅读(5634) 评论(0) 推荐(0) 编辑
摘要: 检测对象中属性的存在与否可以通过几种方法来判断。 1.使用in关键字。 该方法可以判断对象的自有属性和继承来的属性是否存在。 var o={x:1}; "x" in o; //true,自有属性存在 "y" in o; //false "toString" in o; //true,是一个继承属性 阅读全文
posted @ 2020-09-11 11:20 ZJTL 阅读(386) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页