上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 33 下一页

2018年8月31日

TypeScript 之 tsconfig.json

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/tsconfig.json.html 如果一个目录下存在一个tsconfig.json文件,那么它意味着这个目录是TypeScript项目的根目录。 tsconfig. 阅读全文

posted @ 2018-08-31 10:41 cag2050 阅读(436) 评论(0) 推荐(0) 编辑

2018年8月30日

TypeScript 之 声明文件的结构

摘要: https://www.tslang.cn/docs/handbook/declaration files/library structures.html 模块化库 一些库只能工作在模块加载器的环境下。 比如,像 express只能在Node.js里工作所以必须使用CommonJS的require函 阅读全文

posted @ 2018-08-30 18:14 cag2050 阅读(711) 评论(0) 推荐(0) 编辑

TypeScript 之 声明文件的使用

摘要: https://www.tslang.cn/docs/handbook/declaration files/consumption.html 下载 在TypeScript 2.0以上的版本,获取类型声明文件只需要使用npm。 比如,获取lodash库的声明文件,只需使用下面的命令: 如果一个npm包 阅读全文

posted @ 2018-08-30 16:15 cag2050 阅读(1004) 评论(0) 推荐(0) 编辑

TypeScript 之 声明文件的发布

摘要: https://www.tslang.cn/docs/handbook/declaration files/publishing.html 发布声明文件到npm,有两种方式: 1. 与你的npm包捆绑在一起(推荐) 2. 发布到npm上的@types organization。 包含声明文件到你的n 阅读全文

posted @ 2018-08-30 15:04 cag2050 阅读(468) 评论(0) 推荐(0) 编辑

TypeScript 之 NPM包的类型

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Typings%20for%20NPM%20Packages.html 你的定义文件应该: 1. 是.d.ts文件 2. 写做外部模块 3. 不包含 引用 阅读全文

posted @ 2018-08-30 09:59 cag2050 阅读(808) 评论(0) 推荐(0) 编辑

2018年8月29日

create-react-app-typescript 知识点

摘要: github:https://github.com/wmonk/create react app typescript 报错: 原因:import名称排序问题,要求按照字母从小到大排序;修改rules的规则“ordered imports”为false即可。 解决:https://cdn2.jian 阅读全文

posted @ 2018-08-29 15:54 cag2050 阅读(936) 评论(0) 推荐(0) 编辑

TypeScript 之 泛型

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Generics.html 泛型:可以支持多种类型的数据 泛型函数的定义 这里使用了类型变量,它是一种特殊的变量,只用于表示类型而不是值。 我们给identity添加了 阅读全文

posted @ 2018-08-29 14:17 cag2050 阅读(127) 评论(0) 推荐(0) 编辑

TypeScript 之 类型推导

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Type%20Inference.html 类型推导:发生在初始化变量和成员,设置默认参数值和决定函数返回值时。 最佳通用类型 计算通用类型算法会考虑所有的候选类型,并 阅读全文

posted @ 2018-08-29 12:03 cag2050 阅读(1266) 评论(0) 推荐(0) 编辑

TypeScript 之 JSX

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/JSX.html JSX中,类型断言必须使用as操作符。 类型检查 固有元素:环境自带的某些东西(比如,在DOM环境里的div或span)。 基于值的元素:你自定义的组 阅读全文

posted @ 2018-08-29 11:44 cag2050 阅读(1641) 评论(0) 推荐(0) 编辑

TypeScript 之 书写.d.ts文件

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Writing%20Definition%20Files.html 类的分解 TypeScript的类会创建出两个类型: 1. 实例类型,定义了类的实例具有哪些成员; 阅读全文

posted @ 2018-08-29 11:01 cag2050 阅读(1630) 评论(0) 推荐(0) 编辑

2018年8月28日

TypeScript 之 函数

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Functions.html 为函数定义类型 为函数添加类型: TypeScript能够根据返回语句自动推断出返回值类型,因此我们通常省略它。 TypeScript中, 阅读全文

posted @ 2018-08-28 19:06 cag2050 阅读(111) 评论(0) 推荐(0) 编辑

TypeScript 之 基础类型、高级类型

摘要: 基础类型:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Basic%20Types.html 高级类型:https://m.runoob.com/manual/gitbook/TypeScript/_book/do 阅读全文

posted @ 2018-08-28 11:55 cag2050 阅读(256) 评论(0) 推荐(0) 编辑

TypeScript 之 三斜线指令

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Triple Slash%20Directives.html 一个三斜线引用路径是相对于包含它的文件的,如果不是根文件。 三斜线指令 : 用于声明文件间的依赖,告诉编译 阅读全文

posted @ 2018-08-28 11:18 cag2050 阅读(1207) 评论(0) 推荐(1) 编辑

TypeScript 与 es6 写法的区别

摘要: import 方式 ts 默认对于 commonjs 的模块是这样加载的: es6: 不想改变 es6 的写法,可以使用 ts 提供的一个编译参数 : 阅读全文

posted @ 2018-08-28 11:07 cag2050 阅读(834) 评论(0) 推荐(0) 编辑

TypeScript 之 模块

摘要: https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Modules.html 外部模块简写 外部模块简写: 的含义: 告诉编译器,以 结尾的模块存在、且导出的值的类型为 。 阅读全文

posted @ 2018-08-28 10:40 cag2050 阅读(194) 评论(0) 推荐(0) 编辑

2018年8月26日

gaea-basic-components 知识点

摘要: github 地址:https://github.com/ascoders/gaea basic components 阅读全文

posted @ 2018-08-26 12:03 cag2050 阅读(223) 评论(0) 推荐(0) 编辑

gaea-editor 知识点

摘要: github 地址:https://github.com/ascoders/gaea editor 阅读全文

posted @ 2018-08-26 12:02 cag2050 阅读(360) 评论(0) 推荐(0) 编辑

2018年8月23日

git submodule的使用(.gitmodules文件子模块加载)

摘要: https://blog.csdn.net/qq_27295403/article/details/80486116 阅读全文

posted @ 2018-08-23 16:41 cag2050 阅读(2733) 评论(0) 推荐(0) 编辑

2018年8月17日

React 中的 Component、PureComponent、无状态组件 之间的比较

摘要: React 中的 Component、PureComponent、无状态组件之间的比较 table th:first of type { width: 150px; } 组件类型 | 说明 | React.createClass | 不使用ES6语法,只能使用 React.createClass 来 阅读全文

posted @ 2018-08-17 14:33 cag2050 阅读(1205) 评论(1) 推荐(0) 编辑

2018年8月9日

在vue-cli 2.x 项目中,引入stylus的全局CSS变量

摘要: 出处:https://blog.csdn.net/weixin_39378610/article/details/81140358 阅读全文

posted @ 2018-08-09 15:38 cag2050 阅读(1154) 评论(0) 推荐(0) 编辑

2018年7月31日

create-react-app 搭建的项目中,使用 CSS Modules

摘要: create react app 搭建的项目中,使用 CSS Modules: 修改config目录下 webpack.config.dev.js 和 webpack.config.prod.js 文件: CSS Modules 与 stylus 结合: create react app引入styl 阅读全文

posted @ 2018-07-31 10:20 cag2050 阅读(426) 评论(0) 推荐(0) 编辑

2018年7月30日

Nginx + keepalived 双机热备(主从模式)

摘要: 双机高可用一般是通过虚拟IP(飘移IP)方法来实现的,基于Linux/Unix的IP别名技术。 双机高可用方法目前分为两种: 1)双机主从模式:即前端使用两台服务器,一台主服务器和一台热备服务器,正常情况下,主服务器绑定一个公网虚拟IP,提供负载均衡服务,热备服务器处于空闲状态;当主服务器发生故障时 阅读全文

posted @ 2018-07-30 11:55 cag2050 阅读(160) 评论(0) 推荐(0) 编辑

2018年7月25日

从后端接口下载文件的2种方式:get方式、post方式

摘要: 从后端接口下载文件的2种方式 一、get方式 直接使用: 二、post方式 当有文件需要传给后端接口、后端处理后返回文件时,用post方式发送formdata。 此时下载后端返回的文件,流程: 1、后端设置Response Headers的2个值: 2、前端处理下blob文件: 以vue、vue r 阅读全文

posted @ 2018-07-25 11:00 cag2050 阅读(2946) 评论(0) 推荐(0) 编辑

2018年7月19日

Visual Studio Code 使用

摘要: VS Code 快捷键: 快捷键 | 作用 | Option+Up 或 Option+Down | 上下移动一行 Shift+Option+Up 或 Shift+Option+Down | 向上向下复制一行 VS Code 设置 设置 | 作用 | Preferences Settings USER 阅读全文

posted @ 2018-07-19 10:26 cag2050 阅读(140) 评论(0) 推荐(0) 编辑

2018年7月15日

ES6 中 Class 与 TypeScript 中 Class 的区别(待补充)

摘要: ES6 中 Class 与 TypeScript 中 Class 的区别(待补充) 阅读全文

posted @ 2018-07-15 13:43 cag2050 阅读(259) 评论(0) 推荐(0) 编辑

2018年7月14日

gaea-editor 项目使用

摘要: 项目地址:https://github.com/ascoders/gaea editor 打开编辑器界面:运行 下载gaea editor项目,进行调试,注意点: gaea editor/packages 中,需要下载 gaea render:https://github.com/ascoders/ 阅读全文

posted @ 2018-07-14 12:16 cag2050 阅读(1559) 评论(0) 推荐(0) 编辑

2018年7月12日

页面可视化搭建 整理

摘要: 页面可视化搭建工具前生今世:https://github.com/CntChen/cntchen.github.io/issues/15 前端服务化——页面搭建工具的死与生:https://www.cnblogs.com/sskyy/p/6496287.html esview 项目实现原理: 如何实 阅读全文

posted @ 2018-07-12 15:00 cag2050 阅读(4786) 评论(0) 推荐(0) 编辑

2018年7月11日

单页面应用(SPA)重新部署后,正在浏览的页面如何更新缓存?

摘要: 当单页面的系统在重新部署更新时,此时正在浏览网页,并且已经在网页内的用户,始终会使用老的js与css文件,一直在使用已经缓存了的静态资源。 所有的缓存问题焦点都在index.html上,只要index.html刷新即可重新获取代码。 出处:https://www.cnblogs.com/mamimi 阅读全文

posted @ 2018-07-11 13:16 cag2050 阅读(3724) 评论(2) 推荐(0) 编辑

vim 使用

摘要: vim 快捷键: 快捷键 | 说明 | 符号:$ | 移动到行尾 数字:0 | 移动到行首 阅读全文

posted @ 2018-07-11 11:17 cag2050 阅读(137) 评论(0) 推荐(0) 编辑

浏览器缓存 知识点

摘要: 一篇比较好的介绍文章:http://www.netkiller.cn/journal/cache.html 阅读全文

posted @ 2018-07-11 10:10 cag2050 阅读(121) 评论(0) 推荐(0) 编辑

2018年7月8日

http 2.0 新特性

摘要: http 2.0 新特性: 二进制分帧 首部压缩 流量控制 多路复用 请求优先级 服务器推送 出处:https://juejin.im/post/5a4dfb2ef265da43305ee2d0 阅读全文

posted @ 2018-07-08 16:14 cag2050 阅读(709) 评论(0) 推荐(0) 编辑

2018年7月5日

GoJS 在 vue 项目中的使用

摘要: GoJS 在 html vue 项目中的使用,github地址:https://github.com/cag2050/gojs_demo GoJS 在 vue cli 2.x 项目中的使用,github地址:https://github.com/cag2050/vue_cli_2_gojs_demo 阅读全文

posted @ 2018-07-05 09:47 cag2050 阅读(2118) 评论(0) 推荐(0) 编辑

2018年6月29日

详解Vue中watch的高级用法

摘要: 出处:https://www.sohu.com/a/230309191_201105 阅读全文

posted @ 2018-06-29 18:46 cag2050 阅读(120) 评论(0) 推荐(0) 编辑

2018年6月21日

什么是 PWA?

摘要: 出处:https://segmentfault.com/a/1190000012353473 阅读全文

posted @ 2018-06-21 18:28 cag2050 阅读(210) 评论(0) 推荐(0) 编辑

代码风格统一工具:EditorConfig 和 静态代码检查工具:ESLint

摘要: EditorConfig 最常见的用途是:统一文件的编码字符集以及缩进风格 使用 Eslint 做代码 lint,那么为什么还要使用 .editorconfig 呢?细细想了下,应该有两个方面吧。 1. Eslint 确实包含 .editorconfig 中的一些属性,如缩进等,但并不全部包含,如 阅读全文

posted @ 2018-06-21 17:58 cag2050 阅读(988) 评论(0) 推荐(0) 编辑

2018年6月19日

vue-cli 3.x 使用

摘要: vue cli 3.x 安装: vue cli 3.x 常用命令 vue cli 3.x 常用命令 | 命令含义 | vue help | vue cli 3.x 不像 create react app 或是 angular cli 生成的的项目一样去 eject 配置,通过在项目下设置 vue.c 阅读全文

posted @ 2018-06-19 14:31 cag2050 阅读(492) 评论(0) 推荐(0) 编辑

2018年6月17日

nginx 学习资料

摘要: nginx 学习资料 table th:first of type { width: 90px; } table th:nth of type(2) { } table th:nth of type(3) { width: 400px; } 知识 | 链接网址 | 说明 | | nginx | ht 阅读全文

posted @ 2018-06-17 19:38 cag2050 阅读(184) 评论(0) 推荐(0) 编辑

2018年6月14日

create-react-app 搭建的项目中,引入 webpack-bundle-analyzer 打包分析

摘要: 1. 安装 1. 在 config/webpack.config.prod.js 文件(推荐)或 config/webpack.config.dev.js 中,添加 1. 运行 (推荐,这样只在打包时,打开分析网页;这个地方具体命令名,可在 package.json 文件中 scripts 部分修改 阅读全文

posted @ 2018-06-14 18:07 cag2050 阅读(1886) 评论(0) 推荐(0) 编辑

vue-cli、create-react-app 项目如何查看打包分析?

摘要: vue cli、create react app 项目如何查看打包分析? 项目 | 如何查看打包分析 | vue cli 创建的项目 | 已经集成 webpack bundle analyzer,运行 create react app 创建的项目 | 官方推荐使用 source map explor 阅读全文

posted @ 2018-06-14 16:56 cag2050 阅读(2179) 评论(0) 推荐(1) 编辑

vue-cli 创建的项目,在 nginx 上配置启用浏览器缓存

摘要: nginx 配置,关键参数: 详见地址:https://github.com/cag2050/vue_cli_nginx 阅读全文

posted @ 2018-06-14 10:05 cag2050 阅读(398) 评论(0) 推荐(0) 编辑

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 33 下一页

导航