摘要:
index.js import React from 'react' import ReactDOM from 'react-dom' function render() { const element = <h1>{new Date().toLocaleTimeString()}</h1> Rea 阅读全文
2021年9月10日
摘要:
npm npm update -g @vue/cli 阅读全文
摘要:
index.html <sript src="//example.js"></sript> 阅读全文
摘要:
index.js import React from 'react' import ReactDOM from 'react-dom' class Clock extends React.Component { constructor() { super() this.state = { time: 阅读全文
摘要:
./store/state.js export default { count: 3, name: '李雷', } ./store/mutations.js export default { INCREMENT(state) { state.count++ }, } ./App.vue <templ 阅读全文
摘要:
index.js import React, { Component } from 'react' import ReactDOM from 'react-dom' class App extends Component { clickHandler = name => { alert(name) 阅读全文
摘要:
index.js // 方法1:严格模式 function Person(name) { "use strict"; this.name = name; } const lilei = Person("李雷"); // Error console.log(lilei.name); index.js 阅读全文
摘要:
index.ts interface Cat { name: string run(): void } interface Fish { name: string swim(): void } function isCat(animal: Cat | Fish): boolean { return 阅读全文
摘要:
index.html <!-- integrity 属性为该外部脚本写入哈希签名,用于验证脚本一致性 --> <script src="./xxx.js" integrity="****"></script> 阅读全文
2021年9月9日
摘要:
./store/state.js export default { userInfo: { name: '' }, } ./store/mutations.js export default { UPDATE_NAME(state, payload = {}) { state.userInfo.na 阅读全文
摘要:
index.ts const foo: string[] = ["foo", "bar"] 阅读全文
摘要:
./build - build - webpack.common.js - webpack.dev.js - webpack.prod.js webpack.common.js module.exports = { entry: output: plugins: module: ... } webp 阅读全文
摘要:
index.ts abstract class Foo { constructor() {} className = "Foo"; } class FooChild extends Foo { constructor() { super(); } } // const foo = new Foo() 阅读全文
摘要:
index.ts const lilei: [string, number] = ["Lilei", 23] 阅读全文
摘要:
index.ts let decLiteral: number = 6 // 10 let hexLiteral: number = 0xf00d // 16 let binaryLiteral: number = 0b1010 // 2 let octalLiteral: number = 0o7 阅读全文
摘要:
index.ts function foo(name: string, age?: number) { console.log(name + age); } foo("a"); // "aundefined" 阅读全文
摘要:
index.ts interface IPerson { name: string age: number gender?: number } const lilei: IPerson = { name: "Lilei", age: 23, } 阅读全文
摘要:
index.ts interface IPerson { name: string age: number family?: any[] // Error,因为不是任意类型的子集 [propName: string]: string | number // 一般设置 any,因为其他类型必需是任意类 阅读全文
摘要:
index.ts function foo(...rest: any[]) { console.log(rest) } foo(1, 2, 3) // [1, 2, 3] 阅读全文
摘要:
index.js window.alert('Hello! \n Lilei!') 阅读全文
摘要:
index.js const res = window.prompt("What's your name?"); alert(`Your name is ${res}`); 阅读全文
摘要:
index.sh code D:/projFolder && git pull && npm run serve 阅读全文
摘要:
index.js const res = window.confirm("Are you a programmer?"); alert(`Your answer is ${res}`); 阅读全文
摘要:
npm npm i -D sass-loader node-sass webpack.config.js module.exports = { // ... module: { rules: [ { test: /\.(css|scss)$/, use: ['style-loader', 'css- 阅读全文
摘要:
npm npm i -D file-loader webpack.config.js module.exports = { module: { rules: [ { test: /\.(png|jpg|gif|jpeg)$/, use: { loader: 'file-loader', }, }, 阅读全文
摘要:
index.js const foo = Object(null); const bar = Object.create(null); console.log(foo instanceof Object); // true console.log(bar instanceof Object); // 阅读全文
摘要:
npm npm i -D style-loader css.loader webpack.config.js module.exports = { // ... module: { rules: [ { test: /\.css$/, use: ['style-loader', 'css-loade 阅读全文
摘要:
@vue/cli vue create xxx 阅读全文
摘要:
browser https://www.dcloud.io/hbuilderx.html https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html HBuilderX 文件 -> 新建 -> 项目 -> uni-a 阅读全文
摘要:
index.js const specialObj = Object.create(null); console.log(specialObj.__proto__); // undefined 阅读全文
摘要:
index.js import React from "react"; class App extends React.Component { render() { return <h1>Hello, World!</h1>; } } 阅读全文
摘要:
index.js function Foo() { const list = []; this.push = function (val) { list.push(val); }; this.getList = function () { console.log(list); }; } const 阅读全文
摘要:
index.html <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> </head> <body> <button onclick="clickHandler()">print</button> <script> function cli 阅读全文
摘要:
yarn yarn create react-app my-app 阅读全文
摘要:
tsconfig.json { "compilerOptions": { "target": "ESNEXT", "lib": ["DOM", "ESNEXT"], }, } index.ts const a = 11n 阅读全文
摘要:
browser https://www.typescriptlang.org/dt/search?search= 阅读全文
摘要:
功能类似:撤回,Ctrl + Z。 git-bash git checkout -- file_name 这个命令只能撤回没有保存到暂存区和工作区中的变动,用于对做了修改,没暂存没提交但关闭了(导致无法Ctrl+Z)的文件进行撤销。 阅读全文
摘要:
查看仓库当前状态 git-bash git status 阅读全文
摘要:
查看全局用户名和 Email git-bash git config --global user.name git config --global user.email 查看当前仓库用户名和 Email git-bash git config user.name git config user.em 阅读全文
摘要:
bash npm view vue versions 阅读全文