上一页 1 2 3 4 5 6 7 ··· 13 下一页

2021年9月10日

摘要: index.js import React from 'react' import ReactDOM from 'react-dom' function render() { const element = <h1>{new Date().toLocaleTimeString()}</h1> Rea 阅读全文
posted @ 2021-09-10 09:39 aisowe 阅读(93) 评论(0) 推荐(0) 编辑
摘要: npm npm update -g @vue/cli 阅读全文
posted @ 2021-09-10 09:39 aisowe 阅读(304) 评论(0) 推荐(0) 编辑
摘要: index.html <sript src="//example.js"></sript> 阅读全文
posted @ 2021-09-10 09:38 aisowe 阅读(28) 评论(0) 推荐(0) 编辑
摘要: index.js import React from 'react' import ReactDOM from 'react-dom' class Clock extends React.Component { constructor() { super() this.state = { time: 阅读全文
posted @ 2021-09-10 09:38 aisowe 阅读(122) 评论(0) 推荐(0) 编辑
摘要: ./store/state.js export default { count: 3, name: '李雷', } ./store/mutations.js export default { INCREMENT(state) { state.count++ }, } ./App.vue <templ 阅读全文
posted @ 2021-09-10 09:37 aisowe 阅读(277) 评论(0) 推荐(0) 编辑
摘要: index.js import React, { Component } from 'react' import ReactDOM from 'react-dom' class App extends Component { clickHandler = name => { alert(name) 阅读全文
posted @ 2021-09-10 09:37 aisowe 阅读(302) 评论(0) 推荐(0) 编辑
摘要: index.js // 方法1:严格模式 function Person(name) { "use strict"; this.name = name; } const lilei = Person("李雷"); // Error console.log(lilei.name); index.js 阅读全文
posted @ 2021-09-10 09:36 aisowe 阅读(39) 评论(0) 推荐(0) 编辑
摘要: index.ts interface Cat { name: string run(): void } interface Fish { name: string swim(): void } function isCat(animal: Cat | Fish): boolean { return 阅读全文
posted @ 2021-09-10 09:36 aisowe 阅读(112) 评论(0) 推荐(0) 编辑
摘要: index.html <!-- integrity 属性为该外部脚本写入哈希签名,用于验证脚本一致性 --> <script src="./xxx.js" integrity="****"></script> 阅读全文
posted @ 2021-09-10 09:35 aisowe 阅读(35) 评论(0) 推荐(0) 编辑

2021年9月9日

摘要: ./store/state.js export default { userInfo: { name: '' }, } ./store/mutations.js export default { UPDATE_NAME(state, payload = {}) { state.userInfo.na 阅读全文
posted @ 2021-09-09 10:53 aisowe 阅读(145) 评论(0) 推荐(0) 编辑
摘要: index.ts const foo: string[] = ["foo", "bar"] 阅读全文
posted @ 2021-09-09 10:52 aisowe 阅读(2076) 评论(0) 推荐(0) 编辑
摘要: ./build - build - webpack.common.js - webpack.dev.js - webpack.prod.js webpack.common.js module.exports = { entry: output: plugins: module: ... } webp 阅读全文
posted @ 2021-09-09 10:52 aisowe 阅读(32) 评论(0) 推荐(0) 编辑
摘要: index.ts abstract class Foo { constructor() {} className = "Foo"; } class FooChild extends Foo { constructor() { super(); } } // const foo = new Foo() 阅读全文
posted @ 2021-09-09 10:51 aisowe 阅读(187) 评论(0) 推荐(0) 编辑
摘要: index.ts const lilei: [string, number] = ["Lilei", 23] 阅读全文
posted @ 2021-09-09 10:51 aisowe 阅读(238) 评论(0) 推荐(0) 编辑
摘要: index.ts let decLiteral: number = 6 // 10 let hexLiteral: number = 0xf00d // 16 let binaryLiteral: number = 0b1010 // 2 let octalLiteral: number = 0o7 阅读全文
posted @ 2021-09-09 10:50 aisowe 阅读(687) 评论(0) 推荐(0) 编辑
摘要: index.ts function foo(name: string, age?: number) { console.log(name + age); } foo("a"); // "aundefined" 阅读全文
posted @ 2021-09-09 10:49 aisowe 阅读(4228) 评论(0) 推荐(0) 编辑
摘要: index.ts interface IPerson { name: string age: number gender?: number } const lilei: IPerson = { name: "Lilei", age: 23, } 阅读全文
posted @ 2021-09-09 10:49 aisowe 阅读(1012) 评论(0) 推荐(0) 编辑
摘要: index.ts interface IPerson { name: string age: number family?: any[] // Error,因为不是任意类型的子集 [propName: string]: string | number // 一般设置 any,因为其他类型必需是任意类 阅读全文
posted @ 2021-09-09 10:49 aisowe 阅读(2544) 评论(0) 推荐(0) 编辑
摘要: index.ts function foo(...rest: any[]) { console.log(rest) } foo(1, 2, 3) // [1, 2, 3] 阅读全文
posted @ 2021-09-09 10:48 aisowe 阅读(285) 评论(0) 推荐(0) 编辑
摘要: index.js window.alert('Hello! \n Lilei!') 阅读全文
posted @ 2021-09-09 10:47 aisowe 阅读(310) 评论(0) 推荐(0) 编辑
摘要: index.js const res = window.prompt("What's your name?"); alert(`Your name is ${res}`); 阅读全文
posted @ 2021-09-09 10:40 aisowe 阅读(687) 评论(0) 推荐(0) 编辑
摘要: index.sh code D:/projFolder && git pull && npm run serve 阅读全文
posted @ 2021-09-09 10:39 aisowe 阅读(388) 评论(0) 推荐(0) 编辑
摘要: index.js const res = window.confirm("Are you a programmer?"); alert(`Your answer is ${res}`); 阅读全文
posted @ 2021-09-09 10:39 aisowe 阅读(145) 评论(0) 推荐(0) 编辑
摘要: npm npm i -D sass-loader node-sass webpack.config.js module.exports = { // ... module: { rules: [ { test: /\.(css|scss)$/, use: ['style-loader', 'css- 阅读全文
posted @ 2021-09-09 10:38 aisowe 阅读(156) 评论(0) 推荐(0) 编辑
摘要: npm npm i -D file-loader webpack.config.js module.exports = { module: { rules: [ { test: /\.(png|jpg|gif|jpeg)$/, use: { loader: 'file-loader', }, }, 阅读全文
posted @ 2021-09-09 10:38 aisowe 阅读(35) 评论(0) 推荐(0) 编辑
摘要: index.js const foo = Object(null); const bar = Object.create(null); console.log(foo instanceof Object); // true console.log(bar instanceof Object); // 阅读全文
posted @ 2021-09-09 10:37 aisowe 阅读(112) 评论(0) 推荐(0) 编辑
摘要: npm npm i -D style-loader css.loader webpack.config.js module.exports = { // ... module: { rules: [ { test: /\.css$/, use: ['style-loader', 'css-loade 阅读全文
posted @ 2021-09-09 10:37 aisowe 阅读(20) 评论(0) 推荐(0) 编辑
摘要: @vue/cli vue create xxx 阅读全文
posted @ 2021-09-09 10:36 aisowe 阅读(28) 评论(0) 推荐(0) 编辑
摘要: browser https://www.dcloud.io/hbuilderx.html https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html HBuilderX 文件 -> 新建 -> 项目 -> uni-a 阅读全文
posted @ 2021-09-09 10:35 aisowe 阅读(47) 评论(0) 推荐(0) 编辑
摘要: index.js const specialObj = Object.create(null); console.log(specialObj.__proto__); // undefined 阅读全文
posted @ 2021-09-09 10:35 aisowe 阅读(276) 评论(0) 推荐(0) 编辑
摘要: index.js import React from "react"; class App extends React.Component { render() { return <h1>Hello, World!</h1>; } } 阅读全文
posted @ 2021-09-09 10:35 aisowe 阅读(89) 评论(0) 推荐(0) 编辑
摘要: index.js function Foo() { const list = []; this.push = function (val) { list.push(val); }; this.getList = function () { console.log(list); }; } const 阅读全文
posted @ 2021-09-09 10:34 aisowe 阅读(116) 评论(0) 推荐(0) 编辑
摘要: index.html <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> </head> <body> <button onclick="clickHandler()">print</button> <script> function cli 阅读全文
posted @ 2021-09-09 10:33 aisowe 阅读(168) 评论(0) 推荐(0) 编辑
摘要: yarn yarn create react-app my-app 阅读全文
posted @ 2021-09-09 10:33 aisowe 阅读(11) 评论(0) 推荐(0) 编辑
摘要: tsconfig.json { "compilerOptions": { "target": "ESNEXT", "lib": ["DOM", "ESNEXT"], }, } index.ts const a = 11n 阅读全文
posted @ 2021-09-09 10:32 aisowe 阅读(263) 评论(0) 推荐(0) 编辑
摘要: browser https://www.typescriptlang.org/dt/search?search= 阅读全文
posted @ 2021-09-09 10:31 aisowe 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 功能类似:撤回,Ctrl + Z。 git-bash git checkout -- file_name 这个命令只能撤回没有保存到暂存区和工作区中的变动,用于对做了修改,没暂存没提交但关闭了(导致无法Ctrl+Z)的文件进行撤销。 阅读全文
posted @ 2021-09-09 10:31 aisowe 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 查看仓库当前状态 git-bash git status 阅读全文
posted @ 2021-09-09 10:30 aisowe 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 查看全局用户名和 Email git-bash git config --global user.name git config --global user.email 查看当前仓库用户名和 Email git-bash git config user.name git config user.em 阅读全文
posted @ 2021-09-09 10:30 aisowe 阅读(1618) 评论(0) 推荐(0) 编辑
摘要: bash npm view vue versions 阅读全文
posted @ 2021-09-09 10:29 aisowe 阅读(167) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 13 下一页

导航