摘要: // base64解码 var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var base64DecodeChars = new Array( -1, -1, -1, 阅读全文
posted @ 2020-08-12 09:47 王小美丶 阅读(1064) 评论(0) 推荐(0) 编辑
摘要: 生命周期 组件将要挂载时触发的函数:componentWillMount 组件挂载完成时触发的函数:componentDidMount 是否要更新数据时触发的函数:shouldComponentUpdate 将要更新数据时触发的函数:componentWillUpdate 数据更新完成时触发的函数: 阅读全文
posted @ 2020-05-29 20:20 王小美丶 阅读(6690) 评论(1) 推荐(2) 编辑
摘要: 最近遇到后端直接给我返回数据类似城市列表,然后需要根据返回的数据进行中文排序,并展示 如图 const arr = [ {brandimg: "http://dummyimage.com/500x500/f2799c/fff.jpg&text=jjokok ", brandname: "北京", b 阅读全文
posted @ 2020-05-18 22:32 王小美丶 阅读(866) 评论(0) 推荐(0) 编辑
摘要: 1.全局注册组件 Vue.component('button-cart',{ data () { return { count: 1 } }, template: '<button @click="count++">{{ count }}</button>' }) new Vue({el: '#ap 阅读全文
posted @ 2020-04-04 23:19 王小美丶 阅读(2650) 评论(0) 推荐(0) 编辑
摘要: 1.进入环境 ./mongo 2.切换数据库 use admin 3.添加超级管理员账号密码 db.createUser( {user: "admin",pwd: "123456",roles: [root]}) // user 用户名 pwd 密码 roles 用来设置用户的权限是否支持读写等操作 阅读全文
posted @ 2020-04-04 15:27 王小美丶 阅读(525) 评论(0) 推荐(0) 编辑
摘要: mongoexport -d test -u admin -p admin -c collection --out test.json --jsonArray // 导出 mongoimport -d test -u admin -p admin -c collection --file test. 阅读全文
posted @ 2020-04-04 14:52 王小美丶 阅读(350) 评论(0) 推荐(0) 编辑
摘要: tokenCook: (name, value, time) => { // 设置cookie var exp = new Date() exp.setTime(exp.getTime() + time * 60 * 24 * 60 * 1000) // 这里的time就是天数 escape()编码 阅读全文
posted @ 2020-04-01 21:57 王小美丶 阅读(721) 评论(0) 推荐(0) 编辑
摘要: 1.安装node(已经安装好了可以跳过) 点击此次去下载 2.创建项目 基于node的express 或 koa 在桌面空白处或者其他文件夹空白处 shift+鼠标右键 打开powershell窗口 全局安装express 这里以express为例 npm install express-gener 阅读全文
posted @ 2020-03-14 17:23 王小美丶 阅读(1992) 评论(0) 推荐(1) 编辑
摘要: html中的单选框和复选框的丑是有目共睹的 记录下怎么去改变样式 第一步,上html代码 此次label的for的值对应的是你需要操作的input的id <form action=""> <input type="text"><br/><br/> <input type="text"><br/><b 阅读全文
posted @ 2020-03-14 16:43 王小美丶 阅读(684) 评论(0) 推荐(0) 编辑
摘要: 注意请求可能存在跨域问题,需要去配置好 这三种建议使用axios 1.resource Vue 要实现异步加载需要使用到 vue-resource 库。 Vue.js 2.0 版本推荐使用 axios 来完成 ajax 请求。 先导入一个线上cdn的地址,当然还可以去npm安装,但个人觉得不做项目的 阅读全文
posted @ 2020-03-14 14:11 王小美丶 阅读(9564) 评论(1) 推荐(0) 编辑