摘要: 限大写字母,小写字母和数字;至少包含2种,6-20位 /^(?=.*[a-z])(?=.*[A-Z])|(?=.*[a-z])(?=.*\d)|(?=.*[A-Z])(?=.*\d)[^]{6,20}$/ 阅读全文
posted @ 2021-05-26 15:03 dxl_coder 阅读(201) 评论(0) 推荐(0)
摘要: //在生命周期中监听键盘keydown事件 const _this = this; document.onkeydown = function(e) { console.log(e) if (e.keyCode 13) { const isFromHaveOneInput = _this._isFr 阅读全文
posted @ 2020-12-09 13:36 dxl_coder 阅读(252) 评论(0) 推荐(0)
摘要: /** * 检测图片是否存在 * @param url */ function imageIsExist(url) { return new Promise((resolve) => { var img = new Image(); img.onload = function () { if (th 阅读全文
posted @ 2020-10-29 17:14 dxl_coder 阅读(365) 评论(0) 推荐(0)
摘要: Vue.directive('longpress', { bind: function (el, binding, vNode) { // Make sure expression provided is a function if (typeof binding.value !== 'functi 阅读全文
posted @ 2020-10-12 15:31 dxl_coder 阅读(412) 评论(0) 推荐(1)