上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: html { font-size: 16px; } @media screen and (min-width: 375px) { html { /* iPhone6的375px尺寸作为16px基准,414px正好18px大小, 600 20px */ font-size: calc(100% + 2 * (100vw - 375px) / 39); font-size: calc(16px + 2 阅读全文
posted @ 2019-08-19 13:27 Tutao1995 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1.状态管理 提供全局的状态。 2.一般逻辑:首先创建store文件夹,创建index文件,引入createStore 以及reducer 对外暴露出store,store = createStore(reducer) reducer为一个纯函数,即返回的结果只于传入的参数相关,与其他全局变量无关。 阅读全文
posted @ 2019-08-14 09:34 Tutao1995 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 为 <div> 元素添加 class: document.getElementById("myDIV").classList.add("mystyle"); 为 <div> 元素添加多个类: document.getElementById("myDIV").classList.add("mystyl 阅读全文
posted @ 2019-08-08 14:47 Tutao1995 阅读(995) 评论(0) 推荐(0) 编辑
摘要: 1.安装了 node 2.安装了 create-react-app 3.执行代码 create-react-app 报错 create-react-app 不是内部命令 解决方法:1.更新你的npm版本 npm install -g npm@latest 2.npx create-react-app 阅读全文
posted @ 2019-08-07 15:11 Tutao1995 阅读(197) 评论(0) 推荐(0) 编辑
摘要: let arr = [1,2,4,5,6];let newArr = [];//es6 新增数组方法//forEach(); 遍历数组每一项,让每一项做某件事(执行callback函数);不能使用return//forEach 参数: callback this对象(执行 callback 函数时使 阅读全文
posted @ 2019-08-07 13:36 Tutao1995 阅读(135) 评论(0) 推荐(0) 编辑
摘要: function Foo(){ } let f1 = new Foo(); console.log(Foo.prototype.constructor Foo); console.log(f1.constructor Foo); console.log(f1.__proto__ Foo.protot 阅读全文
posted @ 2019-08-05 16:25 Tutao1995 阅读(119) 评论(0) 推荐(0) 编辑
摘要: overflow: hidden; text-overflow:ellipsis; white-space: nowrap; 阅读全文
posted @ 2019-08-01 09:47 Tutao1995 阅读(161) 评论(0) 推荐(0) 编辑
摘要: var a = [3, 62, null, 0, 38, undefined, NaN,NaN, ' ', 38, " "]; //1.set+array 不能区别nan '' "" // 优点:代码简洁,速度快 时间复杂度O(N) //缺点:需要一个额外的set和array的存储空间,空间复杂度 阅读全文
posted @ 2019-07-24 11:45 Tutao1995 阅读(98) 评论(0) 推荐(0) 编辑
摘要: const Koa = require('koa'); const Router = require('koa-router'); const bodyparser = require('koa-bodyparser'); var mongoose = require('mongoose'); va 阅读全文
posted @ 2019-07-02 17:02 Tutao1995 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1.confused 数据库服务器未开启 2. MongoNetworkError: failed to connect to server [localhost:27017] on first connect [[object Object]] 链接数据库的时候 将url 写成了 localhos 阅读全文
posted @ 2019-07-02 16:37 Tutao1995 阅读(156) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页