摘要: 随机keys生成 const fs=require(& 39;fs& 39;); const KEY_LEN=1024; const KEY_COUNT=2048; const CHARS=& 39;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX 阅读全文
posted @ 2019-07-22 10:52 korea 阅读(292) 评论(0) 推荐(1)
摘要: <template> <! TODO swipe > <div id="hy swiper"> <div class="swiper" @touchstart="touchStart" @touch 阅读全文
posted @ 2019-07-16 09:22 korea 阅读(1229) 评论(0) 推荐(1)
摘要: 1.<!DOCTYPE HTML>文档类型的声明。 产生条件:IE6浏览器,当我们没有书写这个文档声明的时候,会触发IE6浏览器的怪异解析现象; 解决办法:书写文档声明。 2.不同浏览器当中,很多的标签的默认样式不同,如默认的外部丁内补丁。 产生条件:不同浏览器; 解决办法:利用CSS 阅读全文
posted @ 2019-07-15 21:31 korea 阅读(155) 评论(1) 推荐(2)
摘要: 项目 范例 说明 ! [if !IE] The NOT operator. This is placed immediately in front of the _feature_, _operator_, or _subexpression_ to reve 阅读全文
posted @ 2019-07-15 21:24 korea 阅读(248) 评论(1) 推荐(2)
摘要: Vue中局部配置axios & 39;use strict& 39; import axios from & 39;axios& 39;; import { Loading } from & 39;element ui& 39;; export const http = (config) => 阅读全文
posted @ 2019-07-15 18:42 korea 阅读(841) 评论(1) 推荐(2)
摘要: 面试题: 1). react/vue中的key的作用/内部原理 2). 为什么列表的key尽量不要用index 虚拟DOM的key的作用? 1). 简单的说: key是虚拟DOM对象的标识, 在更新显示时key起着极其重要的作用 2). 详细的说: 当列表数组中的数据发生变化生成新的虚拟DOM后, 阅读全文
posted @ 2019-07-15 08:23 korea 阅读(690) 评论(0) 推荐(1)
摘要: Component存在的问题? 1). 父组件重新render(), 当前组件也会重新执行render(), 即使没有任何变化 2). 当前组件setState(), 重新执行render(), 即使state没有任何变化解决Component存在的问题 1). 原因: 组件的componentSh 阅读全文
posted @ 2019-07-15 08:21 korea 阅读(228) 评论(0) 推荐(1)
摘要: setState()更新状态的2种写法 setState(updater, [callback]), updater为返回stateChange对象的函数: (state, props) => stateChange 接收的state和props被保证为最新的 setState(stateCh 阅读全文
posted @ 2019-07-10 20:00 korea 阅读(2462) 评论(0) 推荐(1)
摘要: 常用函数 1. static: 检测数据是不是除了symbol外的原始数据 function isStatic(value) { return (typeof value === 'string' || typeof value === 'number' || typeof value === 'b 阅读全文
posted @ 2019-07-08 21:54 korea 阅读(566) 评论(0) 推荐(1)
摘要: 手机号 let phone = /^1((3[\d])|(4[5,6,9])|(5[0 3,5 9])|(6[5 7])|(7[0 8])|(8[1 3,5 8])|(9[1,8,9]))\d{8}$/ 大写字母 let Upper = /^[A Z]+$/ 日期,如: 2000 01 01 let 阅读全文
posted @ 2019-07-08 13:00 korea 阅读(213) 评论(0) 推荐(0)