上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 默认插槽 <template> <div> <h1>App</h1> <Son> <p>传递给默认插槽的内容</p> </Son> </div> </template> <script> import Son from '@/components/Son' export default { comp 阅读全文
posted @ 2022-01-23 22:32 霸哥yyds 阅读(76) 评论(0) 推荐(0)
摘要: 文档游标 执行 find 方法后该方法的返回值称为文档游标 let arr = []; for(let i = 0; i < 100; i++) { arr.push({name: 'js' + i, age: 18 + i}) } db.person.insertMany(arr); MongoD 阅读全文
posted @ 2022-01-23 20:14 霸哥yyds 阅读(44) 评论(0) 推荐(0)
摘要: find db.<collection>.find( <query>, <projection> ); query:查询条件 projection:投影文档,规定了查询的结果中显示哪些字段 查询所有文档 db.person.find() 查询 person 集合中所有的文档(不传入条件默认查询所有文 阅读全文
posted @ 2022-01-21 12:36 霸哥yyds 阅读(124) 评论(0) 推荐(0)
摘要: insertMany db.<collection>.insertMany( [<document>, ...], { writeConcern: <document>, ordered: <boolean> } ); ordered 取值默认为true 代表按顺序写入,如果写入文档出错,则后面所有 阅读全文
posted @ 2022-01-20 23:04 霸哥yyds 阅读(58) 评论(0) 推荐(0)
摘要: insertOne db.<collection>.insertOne( <document>, { writeConcern: <document> } ) document 需要写入的文档 writeConcern 写入安全级别 往 person 集合中写入一个文档 db.person.inse 阅读全文
posted @ 2022-01-20 22:43 霸哥yyds 阅读(47) 评论(0) 推荐(0)
摘要: 主键 MongoDB的主键用于保证每条数据的唯一性 每一个文档被添加到集合之后,MongoDB会自动添加主键 主键的名称是 _id 默认情况下文档的主键是 ObjectId 类型的数据 ObjectId 类型是12个字节的字符串 ObjectId("61e96767a033bdae9c1b2a07" 阅读全文
posted @ 2022-01-20 22:08 霸哥yyds 阅读(187) 评论(0) 推荐(0)
摘要: 连接MongoDB服务器 mongo 命令连接数据库 查看所有数据库 show dbs 数据库基本操作 use demo 创建一个名称叫 demo 的数据库 db 进入刚才创建的数据库 show collections 查看当前数据库中的集合 db.createCollection('person' 阅读全文
posted @ 2022-01-20 21:38 霸哥yyds 阅读(50) 评论(0) 推荐(0)
摘要: 下载 下载地址 https://www.mongodb.com/try/download/ 选择社区免费版本 mongoDB Community Server 阅读全文
posted @ 2022-01-20 17:28 霸哥yyds 阅读(69) 评论(0) 推荐(0)
摘要: 配置用户名和邮箱 git config --global user.name '自己的名字' git config --global user.email '邮箱地址' 阅读全文
posted @ 2022-01-04 10:15 霸哥yyds 阅读(66) 评论(0) 推荐(0)
摘要: 发布流程 npm login 登录自己的npm账号 (不要使用淘宝源登录) npm publish 测试本地包 npm link 将当前项目链接到本地 node 全局环境中作为一个库文件 ,并根据该项目中的 package.json 文件解析出 bin 配置创建可执行文件 多个本地包进行本地测试 如 阅读全文
posted @ 2021-12-30 16:03 霸哥yyds 阅读(52) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页