- 博客(17)
- 收藏
- 关注

原创 React
React 1.React核心概念 1.React 使用 单页面调试代码 <script src="https://unpkg.com/react@16/umd/react.development.js"></script> <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> <script src="https://u
2021-11-02 15:58:14
186
原创 setting.json配置
{ "window.zoomLevel": 1, "terminal.integrated.rendererType": "dom", "editor.suggest.snippetsPreventQuickSuggestions": false, "files.associations": { "*.vue": "vue", "*.cjson": "jsonc", "*.wxss": "css", "*.wxs": "javascript" }, "
2021-11-25 16:37:41
768
1
原创 setting.json配置
{ "window.zoomLevel": 1, "terminal.integrated.rendererType": "dom", "editor.suggest.snippetsPreventQuickSuggestions": false, "files.associations": { "*.vue": "vue", "*.cjson": "jsonc", "*.wxss": "css", "*.wxs": "javascript" }, "
2021-11-25 16:33:55
1687
原创 .prettierrc.js配置
module.exports = { printWidth: 300, //一行的字符数,如果超过会进行换行,默认为80 singleQuote: true, //字符串是否使用单引号,默认为false,使用双引号 endOfLine: 'auto', //避免报错delete (cr)的错 semi: false, singleQuote: true, // 使用单引号 printWidth: 115, proseWrap: 'always', semi: false, /
2021-11-25 16:32:23
2208
原创 .bablerc.js配置
babel: { presets: ['es2016'] Plugins: ['transform-object-rest-spread'] }
2021-11-25 16:31:11
583
原创 .eslintrc.js配置
module.exports = { root: true, parserOptions: { parser: 'babel-eslint', sourceType: 'module' }, env: { browser: true, node: true, es6: true }, extends: ['plugin:vue/recommended', 'eslint:recommended'], // add your custom
2021-11-25 16:29:14
146
原创 React
React 1.React语法初试 1.使用React 语法 注意: 使用React语法需要将vscode中的js编译模式变成js-React模式 <script type="text/babel"> {/* 1. 使用实例 将h1内容插入id名为example的节点中 */} ReactDOM.render( <h1>React Example</h1>, document.getElementById('
2021-11-01 15:05:54
141
原创 使用问题总结
1.使用scss替换css报错冲突 npm uninstall sass-loader node-sass 写在sass和node-sass 不要安装node-sass npm install sass-loader@8.0.2 sass@1.26.5 --save-dev 安装指定版本的sass 2. foreach中return 原数组 循环中使用递归 会导致超出最大调用栈 const routes = [ // 主页面路由表 { path: "/", na
2021-10-29 10:54:55
205
原创 html代码段
{ // Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $
2020-11-20 20:30:54
217
原创 前端面题
Vue面试题 生命周期函数面试题 1.什么是 vue 生命周期 一个vue实例从创建到消亡的过程,中间有3个阶段 2.vue生命周期的作用是什么 作用,: 可以在vue的某个生命周期进行设置操作, 从而影响vue实例 3.第一次页面加载会触发哪几个钩子 6个生命钩子 4.简述每个周期具体适合哪些场景 created阶段 加载vue实例数据 实现双向绑定 初始化数据 同时将数据注入vue实例中, mounted阶段 vue实例数据与视图结合, update,数据发生改变的时候,同时已经将数
2020-10-31 18:57:33
562
原创 vue-bilibili学习笔记
1.vue基础 VUE调试工具 vue调试工具步骤: 1.远程克隆仓库 2.安装依赖包 3.构建 4.打开谷歌页面 5.选中开发者模式 6.加载已解压的扩展,选择shells/chrome 1.组件间数据及交互 数据交互原则: 单向数据流 父组件的数据传递给子组件, 只要父组件的数据变化了,自动重新向下流动, 进而子组件会进行更新数据 所以父组件的数据应该交给父组件修改 数据来源 data: 自己的数据可以随便更改 props: 传进来的数据不允许更改, 或..
2020-10-31 18:53:08
1381
原创 git配置相关
1. git基础入门 Git是一款免费、开源的分布式 版本控制系统 ,用于敏捷高效地处理任何或小或大的项目。 1.1 git的安装 下载地址 注意: 不要安装在中文目录 不要使用桌面管理软件 安装很简单,一直下一步即可。在任意的目录下右键,能看到菜单, 就表示安装成功了。 github账号注册 github官网 1.2 git三个区 要对某个项目使用git进行管理,需要使用git init命令初始化git仓库 git init会在当前目录生成一个隐藏文件夹 .git 不要去修改这个文件夹下的任意
2020-10-29 14:44:23
172
原创 vue之项目上线
项目上线 1. 打包准备 隐藏打印日志 console.log = () => {} 环境判断 axios.defaults.baseURL = process.env.NODE_ENV==='development' ? 'http://localhost:3000' : 'http://xiaomage.com' // 开发 : development // 发布 : production 2. 打包 npm run build ==> dist ===&g
2020-10-29 08:09:04
293
原创 递归中浅拷贝不影响原对象复杂数据类型的情况
function copy(obj) { var newObj = {}; for (var key in obj) { // 判断遇到复杂数据类型的时候 进行递归再次遍历里面的复杂数据类型 // if (typeof obj[key] === 'object') { // // 再次调用里面的copy 进行赋值里面的常量 返回里面的数据 自动创建的新的
2020-08-12 10:19:43
220
原创 有关js对象构造函数的几个问题?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <script.
2020-07-17 15:28:58
157
原创 js构造函数创建对象
<script> // 创建对象 function Student(room, group, name, age, address, teacher, course) { this.room = room; this.group = group; this.name = name; this.age = age; this.course = course; this.teach
2020-07-17 12:05:18
574
1
原创 菜鸟笔记:块级元素margin垂直距离会合并问题
第一种情况: 红盒子下边距为50px,紫盒子上边距也为0px,测量得到两个盒子垂直距离为50px. 第二种情况: 红盒子下边距为50px,紫盒子上边距也为50px,但是测量得到两个盒子垂直距离也为50px. 第三种情况: 红盒子下边距为50px,紫盒子上边距为100px,但是测量得到两个盒子垂直距离100px,这时两个盒子的距离变为两个盒子中较大的值,并没有发生叠加情况 ...
2020-05-18 23:24:30
388
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人