2020年8月26日

typescript-interface

摘要: interface Girll{ name:string; age:number; bust:number; } const girl={ name:'大脚', age:18, bust:100 } const screenResume2=( girl:Girl)=>{ girl.age<24 && 阅读全文

posted @ 2020-08-26 15:09 秃了头也不退休 阅读(198) 评论(0) 推荐(0) 编辑

typescript-数组类型的定义

摘要: 简单的定义 const numArr:number[]=[1,2,3] const strArr:string[]=['a','b','c'] const undeArr:undefined[]=[undefined,undefined] 数组中有字符串又有数组的类型 const arr:(numb 阅读全文

posted @ 2020-08-26 14:37 秃了头也不退休 阅读(4611) 评论(0) 推荐(0) 编辑

typescript-函数参数和返回类型的定义

摘要: 方法的返回类型是number function getTotal(one: number, two: number): number { //返回类型是number return one + two } const total = getTotal(1, 2) console.log(total) 阅读全文

posted @ 2020-08-26 11:34 秃了头也不退休 阅读(2002) 评论(0) 推荐(0) 编辑

typescript-定义静态类型和对象类型

摘要: 1.定义静态类型(一旦定义了就不能改变) //错误代码 let count : number=1 count=2 2.对象类型 const xiaoJieJie:{ name:string, age:number } = { name:'大脚', age:18 } console.log(xiaoJ 阅读全文

posted @ 2020-08-26 10:54 秃了头也不退休 阅读(1665) 评论(0) 推荐(0) 编辑

typescript-全局安装

摘要: 1.需求环境 node.js 2.全局安装 typescript npm install typescript -g yarn global add typescript 3.新建文件Demo1.ts function jspang(){ let web: string="Hello World" 阅读全文

posted @ 2020-08-26 10:30 秃了头也不退休 阅读(5775) 评论(0) 推荐(0) 编辑

Cube-ui的使用

摘要: 官网:https://didi.github.io/cube-ui/#/zh-CN/docs/introduction vue create hello-cube-ui vue add cube-ui 阅读全文

posted @ 2020-08-26 09:26 秃了头也不退休 阅读(480) 评论(0) 推荐(0) 编辑

导航