10 2020 档案

摘要:常见自适应布局 <div class="box"> <div class="left"></div> <div class="right"></div> </div> 左侧固定宽度,右侧自适应布局 方法一: 左侧盒子使用float浮动,固定宽度,右侧盒子设置margin-left控制与左侧的距离: 阅读全文
posted @ 2020-10-27 00:15 actorhuang 阅读(328) 评论(0) 推荐(0)
摘要:实例1:动态展示列表数据 <div id="box1"></div> <!-- 如何将一个数据的数组转换为一个标签的数组? 使用数组的map() --> <script type="text/babel"> const names = ['张三','李四','王五','赵六'] //1.创建虚拟DO 阅读全文
posted @ 2020-10-13 09:33 actorhuang 阅读(85) 评论(0) 推荐(0)
摘要:模板引擎基础概念 模板引擎是第三模块,让开发者以更加友好的方式拼接字符串,使项目代码更加清晰、更加易于维护。 art-template模板引擎 使用npm install art-template命令进行下载 使用const template = require('art-template')引入模 阅读全文
posted @ 2020-10-08 10:40 actorhuang 阅读(200) 评论(0) 推荐(0)
摘要:MongoDB增删改查操作 MongoDB数据库服务启动和关闭 net start mongodb net stop mongodb 数据库连接 先使用npm install mongoose安装mongoose依赖,之后使用mongoose提供的connect方法即可连接数据库。 const mo 阅读全文
posted @ 2020-10-05 10:08 actorhuang 阅读(136) 评论(0) 推荐(0)
摘要:Node.js异步编程 同步API,异步API 同步API:只有当前API执行完成后,才能继续执行下一个API console.log('before'); console.log('after'); 异步API:当前API的执行不会阻塞后续代码的执行 console.log('before'); 阅读全文
posted @ 2020-10-04 11:04 actorhuang 阅读(191) 评论(0) 推荐(0)