摘要: ### git 删除源 删除本地仓库的源 git remote remove origin 添加新的源 git remote add origin ***.git 分支重新关联 git branch --set-upstream-to=origin/master master 同步远程的分支到本地 阅读全文
posted @ 2022-04-06 16:36 葫芦娃啊 阅读(317) 评论(0) 推荐(0) 编辑
摘要: https://app.quicktype.io/ 阅读全文
posted @ 2022-04-06 16:31 葫芦娃啊 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 插件 stylelint 样式格式化 https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint scss Formatter: scss 格式化 https://marketplace.visuals 阅读全文
posted @ 2022-04-06 16:27 葫芦娃啊 阅读(109) 评论(0) 推荐(0) 编辑
摘要: node-sass 依赖下载失败问题解决 修改 npm、yarn、pnpm 下载的源即可,以 yarn 为例 yarn config set sass_binary_site https://mirrors.huaweicloud.com/node-sass/ Npm简介 常见的命令解释:npm i 阅读全文
posted @ 2022-04-06 16:21 葫芦娃啊 阅读(1332) 评论(0) 推荐(0) 编辑
摘要: { "tabWidth": 2, // 使用 tabs 替代空格 "useTabs": false, // 行尾 分号 "semi": true, "singleQuote": true, // props 是否用 引号 包裹 "quoteProps": "as-needed", // 单引号 "j 阅读全文
posted @ 2022-04-06 16:05 葫芦娃啊 阅读(268) 评论(0) 推荐(0) 编辑
摘要: interface Shape { kind: "circle" | "square"; //为了避免错误,规定的字面量类型 radius?: number; sideLength?: number; } function handleShape(shape: Shape) { if (shape. 阅读全文
posted @ 2022-04-06 15:39 葫芦娃啊 阅读(19) 评论(0) 推荐(0) 编辑
摘要: /** * 操作符in 来进行类型缩小 * js中in运算符用来确定对象是否具有某个名称的属性 * 所以ts中也有这个,用来缩小潜在的类型范围 */ //例如“value” in x ,value是字符串文字 x代表联合类型 //true x具有可选或者必需属性的类型的值 //false 分支的缩小 阅读全文
posted @ 2022-04-06 15:37 葫芦娃啊 阅读(4) 评论(0) 推荐(0) 编辑
摘要: //type与interface的拓展 interface Animal { name: string; } interface Tiger extends Animal { age: number; } const tiger: Tiger = { name: "xixi", age: 19 }; 阅读全文
posted @ 2022-04-06 15:36 葫芦娃啊 阅读(4) 评论(0) 推荐(0) 编辑
摘要: //基本类型 string boolean number 字面量 //js文件是由ts文件编译完成的 把js变成静态的 //number 指定a的类型且为字符串类型 后面的赋值只能是指定类型 let a: number; //《方法1》 a = 19; //a = "2121å"; //即使ts写的 阅读全文
posted @ 2022-04-06 15:33 葫芦娃啊 阅读(6) 评论(0) 推荐(0) 编辑
摘要: /** * @file 发电碳排放强度 */ import * as echarts from 'echarts'; import { useEffect, useRef } from 'react'; import { xDataYear } from '.'; interface DataPro 阅读全文
posted @ 2022-04-06 15:19 葫芦娃啊 阅读(209) 评论(0) 推荐(0) 编辑