会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
爱吃橘子的小红鞋
博客园
首页
新随笔
联系
订阅
管理
2020年9月3日
TypeScript -- 忽略“Property 'a' does not exist on type 'xxx'“报错的方法
摘要: 直接在报错的前一行添加 // @ts-ignore
阅读全文
posted @ 2020-09-03 10:56 hannahY
阅读(1809)
评论(0)
推荐(1)
编辑
下载导出Excel
摘要: 第一种:直接通过连接下载Excel window.location.href = 'https://x.x.x.243/static/sample/template.xlsx'; 第二种:后端返回文件流下载导出Excel 首先 axios需要设置 responseType: 'blob'; 如果需要
阅读全文
posted @ 2020-09-03 10:48 hannahY
阅读(316)
评论(0)
推荐(0)
编辑
2020年8月27日
纯前端生成Excel的两种方法
摘要: 一、生成的是.csv文件,伪装成Excel文件,很多情况打不开 public downloadExcel(){ let tableJson = [ { name:'AML', phone:'123456', email:'123@123456.com' }, { name:'AML', phone:
阅读全文
posted @ 2020-08-27 10:56 hannahY
阅读(4416)
评论(0)
推荐(0)
编辑
JavaScript -- 去重的几种简单好记的方法
摘要: 去重(性能由高到低) 一、New Set() let arr = [1,1,'true','true',true,true,15,15,false,false, undefined,undefined, null,null, NaN, NaN,'NaN', 0, 0, 'a', 'a',{},{}]
阅读全文
posted @ 2020-08-27 10:30 hannahY
阅读(202)
评论(0)
推荐(0)
编辑
2020年4月13日
Vue -- addEventListener和removeEventListener注意事项
摘要: a.addEventListener('event', function, true/false) a.removeEventListener('event', function, true/false) 1. 不要监听匿名函数; 2. 确保监听的函数和取消监听的函数是同一个函数; 3. 当remo
阅读全文
posted @ 2020-04-13 12:55 hannahY
阅读(1349)
评论(0)
推荐(0)
编辑
2020年1月21日
Angular -- 如何使用JQuery和bootstrap
摘要: 一、在angular中如何使用jQuery npm install jquery --save npm install @types/jquery --sa ve-dev import * as $ from 'jquery'; 二、bootstrap的使用 引入cdn直接使用 npm安装,需要先安
阅读全文
posted @ 2020-01-21 11:15 hannahY
阅读(128)
评论(0)
推荐(0)
编辑
Angular -- 基础知识篇
摘要: 基础知识 创建组件 ng g component 组件名称 对ts文件下的@Component的使用 模板 template 不仅可以配置模板地址templateUrl,还可以配置成template:自定义模板内容 设置样式 styles 设置样式不仅可以在@Component下配置styleUrl
阅读全文
posted @ 2020-01-21 11:10 hannahY
阅读(257)
评论(0)
推荐(0)
编辑
2020年1月19日
Angular -- CLI目录结构
摘要: e2e :端对端的测试目录,主要是集成测试操作的 node_modules :项目的模块依赖目录 src :项目的代码目录 app :包括应用的组件和模块 app.component.css :全局样式文件 app.component.html :全局模板文件 app.component.spec.
阅读全文
posted @ 2020-01-19 11:21 hannahY
阅读(372)
评论(0)
推荐(0)
编辑
2020年1月17日
TypeScript -- 基础知识篇
摘要: 一、配置及基本操作 全局安装TypeScript cnpm install -g typescript tsc -v 查看版本 tsc hello.ts 编译,将ts文件编译成js文件 二、定义变量类型 var str: string = 'hello'; var num: number = 1;
阅读全文
posted @ 2020-01-17 18:01 hannahY
阅读(186)
评论(0)
推荐(0)
编辑
2020年1月13日
Angular -- 路由
摘要: 一、定义路由 方法一:直接在app.module.ts中配置 1 import { BrowserModule } from '@angular/platform-browser'; 2 import { NgModule } from '@angular/core'; 3 import { App
阅读全文
posted @ 2020-01-13 17:59 hannahY
阅读(136)
评论(0)
推荐(0)
编辑
下一页
公告