摘要: undefined,null,'',false,0,NaN 阅读全文
posted @ 2020-08-18 14:52 star-meteor 阅读(1326) 评论(0) 推荐(0)
摘要: 重置时,必须给el-forn-item设置prop属性,否则不生效 阅读全文
posted @ 2020-06-11 13:26 star-meteor 阅读(828) 评论(0) 推荐(0)
摘要: 将‘2017-2-1’转化为时间戳 new Date('2017-2-1').getTime() 在‘2017-2-1’的基础上加一天 先转化时间戳 new Date('2017-2-1').getTime(),在此基础上加24*3600*1000 再将时间戳转化为想要的格式 new Date(时间 阅读全文
posted @ 2020-05-26 18:26 star-meteor 阅读(7040) 评论(0) 推荐(0)
摘要: 密码中必须包含字母(不区分大小写)、数字 var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z]).{8,30}'); 2 3 if (!pwdRegex.test('a2b3c4d5')) { 4 alert("您的密码复杂度太低(密码中必须包含字母 阅读全文
posted @ 2020-05-18 11:05 star-meteor 阅读(246) 评论(0) 推荐(0)
摘要: .stop 阻止冒泡 .prevent 阻止默认事件 .capture 添加事件侦听器时使用事件捕获模式 .self 只当事件在该元素本身(比如不是子元素)触发时触发回调 .once 事件只触发一次native .native在某个组件的根元素上绑定事件,直接使用 @click=''function 阅读全文
posted @ 2020-05-15 17:27 star-meteor 阅读(885) 评论(0) 推荐(0)
摘要: 1卸载cnpm uninstall XXX --save 2一般安装cnpm i xxx- --save 3安装制定版本cnpm install xxx@3.0.1 --save 或者在package.json文件中先写入,在通过cnpm install自动安装 参考https://blog.csd 阅读全文
posted @ 2020-05-15 11:40 star-meteor 阅读(3547) 评论(0) 推荐(0)
摘要: npm install js-cookie --save import Cookies from 'js-cookie' 使用 1.存入cookies //创建一个cookie Cookies.set('name', 'value'); // 创建一个cookie,从现在起7天 Cookies.se 阅读全文
posted @ 2020-05-13 11:26 star-meteor 阅读(558) 评论(0) 推荐(0)
摘要: 为了保证数据库中存储的密码更安全,则需要在后端用多种单向(非对称)加密手段混合进行加密存储。前端加密后端又需要解密,所以需要对称加密算法,即前端使用 encrypted = encrypt(password+key),后端使用 password = decrypt(encrypted +key) , 阅读全文
posted @ 2020-05-12 11:39 star-meteor 阅读(295) 评论(0) 推荐(0)
摘要: 报错原因: Mixed spaces and tabs(混合空格和制表符)。 大多数代码约定要求使用空格或 tab 进行缩进,因此,一行代码若同时混有 tab缩进和空格缩进,通常是错误的,需先删除报错的地方的空格再进行编译 解决方法 在报错的文件前面加上: /* eslint-disable */ 阅读全文
posted @ 2020-05-11 15:08 star-meteor 阅读(941) 评论(0) 推荐(0)
摘要: 第一种:组件切换 //三个按钮 <div id="dynamic-component-demo" class="demo"> <button v-for="tab in tabs" v-bind:key="tab" v-bind:class="['tab-button', { active: cur 阅读全文
posted @ 2020-05-09 15:11 star-meteor 阅读(336) 评论(0) 推荐(0)