- 博客(8)
- 收藏
- 关注
原创 浅拷贝和深拷贝
浅拷贝的方法方法可以将任意多个源对象自身的可枚举属性拷贝给目标对象,然后返回目标对象Object.assign()const obj = { name: 'xiaolizi', age: 20, sex: '男'}const newObj = Object.assign({}, obj)const obj1 = Object.assign(obj, {name: 'newxiaolizi', age: 25})console.log(newObj.name, obj1) 深拷贝
2023-02-28 16:24:44 95
原创 vue error Unexpected ‘debugger‘ statement no-debugger
vue 报错error Unexpected ‘debugger’ statement no-debugger问题描述使用debugger报错error Unexpected ‘debugger’ statement no-debugger解决办法:找到项目中的 package.json 文件找到 eslintConfig 配置参数在 eslintConfig 下的 rules 添加 “no-debugger”: “off”,重启项目...
2023-02-22 09:52:01 414
原创 vue2.x知识点
笔记脚手架环境结构:|——— node_modules|—— public| |—— favicon.ico 页签图标| |—— index.html 主页面|—— src| |—— assets 主页面| | |——logo.png| |—— components 存放组件| | |——HelloWorld.vue| |—— App.vue 汇总所有组件| |—— main.js 入口文件| |—— .gitignore git版本管理
2021-12-31 14:47:54 623
原创 Vue3.0知识点
1.拉开序幕的setup理解:Vue3.0新配置项,值为一个函数setup是所有 Composition API(组合API) “表演的舞台”组件中所用到的:数据,方法等等,均要配置在setup中setup函数的两种返回值:若返回一个对象,测对象中的属性,方法,在模板中均可以直接使用。(重点关注!)若返回一个渲染函数:则可以自定义渲染内容注意点:尽量不要与vue2.x配置混用Vue2.x配置(data, methods, computed…)中可以访问到se
2021-12-31 10:28:41 1002
翻译 时间格式化转换
格式化时间(年月日时分秒~1997-03-23 05:20:15)/** * 时间戳格式化 * @param {number} timeStamp 时间戳 */function formatDateTime(timeStamp) { var date = new Date(); date.setTime(timeStamp); var y = date.getFullYear(); var m = date.getMonth() + 1;
2020-09-28 11:38:52 112
翻译 vscode基础
vscode<!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><link rel="styl
2020-09-18 16:15:38 106
翻译 es6_babel环境搭建
es6转换es5安装node.js环境:https:nodejs.org/zh-cn/进入到项目,初始化package.json : npm init -y安装:npm install --save-dev babel-preset-env babel-cli创建文件并配置:.babelrc { "presets":["env"] }文件转换文件:babel src/index.js -o dist/index.js文件夹:babel src -d dist实时监控
2020-08-31 16:53:14 156
原创 git常规操作
查看状态git statusgit add .提交代码到暂存git commit -m ‘1’提交代码到远程git push克隆代码git clonegit fetctgit rebasegit rebase --continue拉取代码git pull
2020-08-25 17:01:17 157
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人