<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[weixin_44141261的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/weixin_44141261</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; weixin_44141261]]></copyright><item><title><![CDATA[Typescript学习之三——进阶]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/103495417</link><guid>https://blog.csdn.net/weixin_44141261/article/details/103495417</guid><author>weixin_44141261</author><pubDate>Wed, 11 Dec 2019 16:46:01 +0800</pubDate><description><![CDATA[Typescript学习之三——进阶

类型别名
字符串字面量类型
元组
枚举
类
类与接口
泛型
声明合并
扩展阅读



1. 类型别名
类型别名用来给类型起一个新的名字我们使用 type&nbsp;创建类型别名：
type Name = string;
type NameResolver = ()=&gt;string;
type NameOrResolver = Name|NameReso...]]></description><category></category></item><item><title><![CDATA[TypeScript学习之二——基础]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/103440998</link><guid>https://blog.csdn.net/weixin_44141261/article/details/103440998</guid><author>weixin_44141261</author><pubDate>Sat, 07 Dec 2019 23:30:55 +0800</pubDate><description><![CDATA[TypeScript学习之二——基础

原始数据类型
任意值
类型推论
联合类型
对象的类型——接口
数组的类型
函数的类型
类型断言
声明文件
内置对象


1. 原始数据类型
JAvaScript数据类型分为两种：原始数据类型和对象类型原始数据类型包括：String、Number、Boolean、null、undefined、Symbol

1.1 布尔值
let isDone:boolean...]]></description><category></category></item><item><title><![CDATA[TypeScript学习之一——简介]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/103440982</link><guid>https://blog.csdn.net/weixin_44141261/article/details/103440982</guid><author>weixin_44141261</author><pubDate>Sat, 07 Dec 2019 23:29:34 +0800</pubDate><description><![CDATA[TypeScript学习之一
TypeScript 是JavaScript的一个超集，主要提供 了类型系统和对ES6的支持，它由microsoft开发。

TypeScript 是 JavaScript 的类型的超集，它可以编译成纯 JavaScript。编译出来的 JavaScript 可以运行在任何浏览器上。TypeScript 编译工具可以运行在任何服务器和任何系统上。TypeScript ...]]></description><category></category></item><item><title><![CDATA[window.requestAnimationFrame（）函数作用]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/103005907</link><guid>https://blog.csdn.net/weixin_44141261/article/details/103005907</guid><author>weixin_44141261</author><pubDate>Mon, 11 Nov 2019 10:14:50 +0800</pubDate><description><![CDATA[window.requestAnimationFrame（）
window.requesrAnimateionFrame(callback)告诉浏览器–你希望执行一个动画，并且要求浏览器在下次重绘之前调用指定的回调函数更新动画，该方法需要传入一个回调函数作为参数，该回调函数会在浏览器下一次重绘之前执行。callback（DOMHightResTimeStamp）DOMHightResTimeSta...]]></description><category></category></item><item><title><![CDATA[cookie存储]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102976450</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102976450</guid><author>weixin_44141261</author><pubDate>Fri, 08 Nov 2019 16:59:07 +0800</pubDate><description><![CDATA[cookie存储

function trim(str) {
  return String.prototype.trim.call(str);
}

function isType(arg, type) {
  return Object.prototype.toString.call(arg) === "[object " + type + "]";
}

const doc = window...]]></description><category></category></item><item><title><![CDATA[如何将封装好的组件发布到npm上]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102954566</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102954566</guid><author>weixin_44141261</author><pubDate>Thu, 07 Nov 2019 14:37:47 +0800</pubDate><description><![CDATA[如何将封装好的组件发布到npm上

通常我们在做项目的时候都会用到大佬们发布到npm上的组件，简单的命令下载即可使用
今天我们就来走一波大佬走过的路


简单的目录结构


1.下载相关依赖

通过 npm init 命令，创建package文件

{
  "name": "vue-component-button",
  "version": "0.0.2",
  "description": ...]]></description><category></category></item><item><title><![CDATA[vue组件深层次传值方式-$attrs/$listeners]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102897798</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102897798</guid><author>weixin_44141261</author><pubDate>Mon, 04 Nov 2019 16:09:17 +0800</pubDate><description><![CDATA[$attrs

包含了父作用域中不作为 prop 被识别 (且获取) 的特性绑定 (class 和 style 除外)。当一个组件没有声明任何 prop 时，这里会包含所有父作用域的绑定 (class 和 style 除外)，并且可以通过 v-bind="$attrs"传入内部组件——在创建高级别的组件时非常有用。
注意：父组件给子组件传值可以通过v-bind="$attrs"传入内部组件，内部...]]></description><category></category></item><item><title><![CDATA[js实现精准运算——加减乘除]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102854430</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102854430</guid><author>weixin_44141261</author><pubDate>Fri, 01 Nov 2019 11:33:32 +0800</pubDate><description><![CDATA[精准运算

1.Math.pow()函数返回基数的指数次幂
Math.pow(2,3); // 8


2.除法
主要思路是先取到小数部分的位数，再通过去掉小数点的方式将小数转化为整数进行除法运算，最后再用计算结果乘以10的小数差的次幂倍
//除法函数，用来得到精确的除法结果
//说明：javascript的除法结果会有误差，在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。
//...]]></description><category></category></item><item><title><![CDATA[js实现复制粘贴功能]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102854318</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102854318</guid><author>weixin_44141261</author><pubDate>Fri, 01 Nov 2019 11:28:49 +0800</pubDate><description><![CDATA[js实现复制粘贴
使用document.ExecCommand(“copy”)命令，官方文档，点我。
document.ExecCommand(“Copy”)该方法允许运行命令来操纵可编辑内容区域的元素。
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript"&gt;
function co...]]></description><category></category></item><item><title><![CDATA[数组对象去重]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102854208</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102854208</guid><author>weixin_44141261</author><pubDate>Fri, 01 Nov 2019 11:25:04 +0800</pubDate><description><![CDATA[数组对象去重

需求数组对象去重

[{key:1,name:'哈哈'},{key:2,name:'鹤鹤'},{key:1,name:'哈哈'}]

function reduceData(data){
    let obj = {}
    let arr = data.reduce(function(item,next){
      obj[next.item_id] ? '' : obj...]]></description><category></category></item><item><title><![CDATA[vue实现调用手机软键盘搜索按钮进行搜索]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102853980</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102853980</guid><author>weixin_44141261</author><pubDate>Fri, 01 Nov 2019 11:16:02 +0800</pubDate><description><![CDATA[vue实现调用手机软键盘搜索按钮

需求是页面无搜索按钮，需要调用手机软键盘上的搜索按钮实现搜索功能，非实时搜索

&lt;form action="" @submit.prevent="search"&gt;
  &lt;input 
	type="search" 
  :placeholder="type_name ? type_name : '搜索想要的宝贝'" 
	v-model="sea...]]></description><category></category></item><item><title><![CDATA[js工具箱]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102718795</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102718795</guid><author>weixin_44141261</author><pubDate>Thu, 24 Oct 2019 10:58:53 +0800</pubDate><description><![CDATA[今天是1024，祝大家节日快乐！


1.js实现sleep
const sleep = time =&gt; {
 return new Promise(resolve =&gt; setTimeout(resolve,time)
 ) } 
 sleep(1000).then(()=&gt;{ console.log(1) })

2.检测当前宿主环境检测当前宿主环境是否是浏览器：通过判断 ...]]></description><category></category></item><item><title><![CDATA[如何保留HTML中字字间距]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102700400</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102700400</guid><author>weixin_44141261</author><pubDate>Wed, 23 Oct 2019 14:15:11 +0800</pubDate><description><![CDATA[如何保留HTML中字字间距

正常情况下，我们在HTML文本中留有很多空格，实际上是不显示的，为了解决这个问题，总结了如下几种方法

1.字体间距均匀空隙letter-spacing: 2px;
&lt;div style="letter-spacing: 20px;"&gt;你好吗我很好&lt;/div&gt;

如图所示：
2.个别字体间保留空白
&lt;div style=""&gt;你好吗...]]></description><category></category></item><item><title><![CDATA[vue组件传值的几种方式]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102662374</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102662374</guid><author>weixin_44141261</author><pubDate>Mon, 21 Oct 2019 13:28:50 +0800</pubDate><description><![CDATA[vue组件传值的几种方式

1.Vuex
Vuex是一种转为Vue.js应用程序开发的状态管理模式。它采用集中式存储管理应用的多有组件的状态，并以相应的规则保证状态以一种可预期的方式发生变化。

优点

解决了多层组件之间繁琐的事件传播。
解决了多组件依赖统同一状态的问题。
单向数据流
为Vue量身定做，学习成本不高


缺点

不能做数据持久化，刷新页面就要重制，要做数据持久化可以考虑使用loc...]]></description><category></category></item><item><title><![CDATA[插件loading开发]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102659582</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102659582</guid><author>weixin_44141261</author><pubDate>Mon, 21 Oct 2019 10:47:17 +0800</pubDate><description><![CDATA[插件loading开发
1.新建loading.vue 文件
&lt;template&gt;
  &lt;!--loading--&gt;
    &lt;div class="pop" v-show="show" @mousewheel.prevent&gt;
      &lt;div class="confirm"&gt;
				&lt;img src="../../assets/ima...]]></description><category></category></item><item><title><![CDATA[通过Vue.extend（）方法，手写messageBox组件]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102629384</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102629384</guid><author>weixin_44141261</author><pubDate>Fri, 18 Oct 2019 17:32:27 +0800</pubDate><description><![CDATA[Vue.extend（）实例应用-messageBox

Vue.extend(options)
用法：使用基础Vue构造器，创建一个‘子类’，参数是一个包含组件选项的对象。注意：data选项必须是一个函数
//创建构造器
var Profile = Vue.extend({
	template:'&lt;p&gt;{{firstName}} {{lastName}} aka {{alias}}&...]]></description><category></category></item><item><title><![CDATA[在js中为何不能将变量名定义为name]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102563247</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102563247</guid><author>weixin_44141261</author><pubDate>Tue, 15 Oct 2019 11:05:33 +0800</pubDate><description><![CDATA[在js中为何不能将变量名定义为name
在论坛中有一个人的问题刚好是因为变量名定义为“name”引发的。问题如下：怎么onfocus事件和onblur事件在我电脑的谷歌浏览器和火狐浏览器没反应，在IE又可以了呢？
&lt;input type="text" class="name"&gt;

var name = document.querySelector('.name');
name.onfo...]]></description><category></category></item><item><title><![CDATA[js中数组相关方法汇总]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102551325</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102551325</guid><author>weixin_44141261</author><pubDate>Mon, 14 Oct 2019 16:30:29 +0800</pubDate><description><![CDATA[数组相关方法

数组常用方法汇总

1.concat()——用于链接两个或者多个数组** （不改变原数组）**语法：arrayObject.concat(arrayX,arrayX,…,arrayX)参数：可以是具体要合并的数组元素也可以是一个数组对象。返回值：一个新的数组。
2.join（）——用于把数组中的所有元素放入一个字符串中。（不改变原数组）语法：arrayObject.join(sep...]]></description><category></category></item><item><title><![CDATA[for循环中var与let定义变量区别]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102551302</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102551302</guid><author>weixin_44141261</author><pubDate>Mon, 14 Oct 2019 16:29:35 +0800</pubDate><description><![CDATA[for循环中var与let定义变量区别
** 参考文档 （https://www.cnblogs.com/echolun/p/10584703.html）**

1.使用var定义和使用let定义变量输出结果
//使用var声明，得到3个3
var a = [];
for (var i = 0; i &lt; 3; i++) {
  a[i] = function () {
    console...]]></description><category></category></item><item><title><![CDATA[Object.assign()用法]]></title><link>https://blog.csdn.net/weixin_44141261/article/details/102551262</link><guid>https://blog.csdn.net/weixin_44141261/article/details/102551262</guid><author>weixin_44141261</author><pubDate>Mon, 14 Oct 2019 16:27:44 +0800</pubDate><description><![CDATA[Object.assign()
Object.assign 方法用于将所有可枚举属性的值从一个或者多个源对象赋值到目标对象。
语法：Object.assign(target , …sources)&nbsp;返回值是目标对象
描述：如果目标对象中的属性具有相同的键，则属性将被源对象中的属性覆盖。Object.assign不会在那些source对象值为null或者undefined的时候抛出错误。
...]]></description><category></category></item></channel></rss>