<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[wxxmagic的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/wxxmagic</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; wxxmagic]]></copyright><item><title><![CDATA[浅谈深浅拷贝以及Object.assign和JSON.parse(JSON.stringify(obj))]]></title><link>https://blog.csdn.net/wxxmagic/article/details/141575376</link><guid>https://blog.csdn.net/wxxmagic/article/details/141575376</guid><author>wxxmagic</author><pubDate>Mon, 26 Aug 2024 23:22:09 +0800</pubDate><description><![CDATA[深浅拷贝是因为计算机对js不同数据类型存储方式不同才引申出来的对于基本数据类型，存储在栈中，在复制基本数据类型的时候，会在栈中开辟新空间，将值复制给新的变量（对于基本数据类型来说都是深拷贝），修改旧的变量不会影响新的变量。而对于引用数据类型的值是在堆中存储，栈中存储的是对堆中实际数据的引用（指针），在复制引用数据类型时，会将对堆中的引用复制给新的变量（也就是浅拷贝），因此，新的变量和旧的变量保存的都是对同一个堆的引用，所以在修改堆中的数据时，新的变量也会跟着修改，因此引申出深拷贝的概念。]]></description><category></category></item><item><title><![CDATA[vue自定义指令的基础使用和内部钩子函数以及函数参数]]></title><link>https://blog.csdn.net/wxxmagic/article/details/141503214</link><guid>https://blog.csdn.net/wxxmagic/article/details/141503214</guid><author>wxxmagic</author><pubDate>Sat, 24 Aug 2024 18:51:12 +0800</pubDate><description><![CDATA[自定义指令本身是个对象代码如下使用时需要在组件中注册vue2中有bind：只调用一次，指令第一次绑定到元素时调用。在这里可以进行一次性的初始化设置。inserted：被绑定元素插入父节点时调用 (仅保证父节点存在，但不一定已被插入文档中)。update：所在组件的 VNode 更新时调用，但是可能发生在其子 VNode更新之前。指令的值可能发生了改变，也可能没有。但是你可以通过比较更新前后的值来忽略不必要的模板更新 (详细的钩子函数参数见下)。]]></description><category></category></item><item><title><![CDATA[vue项目打包后依赖在哪里]]></title><link>https://blog.csdn.net/wxxmagic/article/details/136221255</link><guid>https://blog.csdn.net/wxxmagic/article/details/136221255</guid><author>wxxmagic</author><pubDate>Wed, 21 Feb 2024 21:47:45 +0800</pubDate><description><![CDATA[很基础的一个问题，但是查之前我确实不知道，以前也没在意过，说实话自己的基础实在是差，之所以发现这个问题是因为我们现在是内网开发，依赖包都是在本地的压缩包里面，以前的我以为项目依赖不参与打包，当访问项目地址的时候重新下载依赖，现在不一样了，内网无法下载依赖，但是项目依旧可以正常打开，所以有疑问就查了查。这些文件通常被称为 bundle（捆绑包）或 chunk（块），它们包含了整个应用程序的代码，包括依赖关系。如果你使用Vue CLI，你可以查看项目根目录下的。确实有这些文件，那好吧，就这样了，了解就好。]]></description><category></category></item><item><title><![CDATA[vue2X与vue3X的区别（未完）]]></title><link>https://blog.csdn.net/wxxmagic/article/details/122805024</link><guid>https://blog.csdn.net/wxxmagic/article/details/122805024</guid><author>wxxmagic</author><pubDate>Mon, 07 Feb 2022 17:28:24 +0800</pubDate><description><![CDATA[记录vue2与vue3中的区别，每一项都铁友官网地址]]></description><category></category></item><item><title><![CDATA[前端开发过程的小技巧（长期更新）]]></title><link>https://blog.csdn.net/wxxmagic/article/details/120740594</link><guid>https://blog.csdn.net/wxxmagic/article/details/120740594</guid><author>wxxmagic</author><pubDate>Wed, 13 Oct 2021 11:31:09 +0800</pubDate><description><![CDATA[js篇


2021-09-10  转  2021年9月10日
起初问了下其他人怎么处理这种，回答说“截呗”，反问“就是09转9月还得加判断去零”，又答“转数字呗09转数字是9  10转数字还是10”


formatterIssueTime(val){
      // let mounth = val.substring(5,7)
      // let day = val.substring(8,10)
      // console.log('mounth=========',mounth);
]]></description><category></category></item><item><title><![CDATA[vue 模拟长按事件]]></title><link>https://blog.csdn.net/wxxmagic/article/details/120737685</link><guid>https://blog.csdn.net/wxxmagic/article/details/120737685</guid><author>wxxmagic</author><pubDate>Wed, 13 Oct 2021 10:33:06 +0800</pubDate><description><![CDATA[在网页中没有长按事件，但是有的页面尤其是h5页面经常需要监听长按事件，所以通过touchstart事件和touchend事件来模拟长按事件
 &lt;!-- css --&gt;
&lt;div
      id="home"
      @touchstart="gotouchstart()"
      @touchmove="gotouchmove()"
      @touchend="gotouchend()"
    &gt;
&lt;/div&gt;

//js
	gotouchstart()]]></description><category></category></item><item><title><![CDATA[自定义构造函数以及类class的用法]]></title><link>https://blog.csdn.net/wxxmagic/article/details/120673273</link><guid>https://blog.csdn.net/wxxmagic/article/details/120673273</guid><author>wxxmagic</author><pubDate>Sat, 09 Oct 2021 16:13:56 +0800</pubDate><description><![CDATA[我们通过构造函数来创建一个对象
构造函数创建的时候和普通函数一样，只不过构造函数通常以大写字母开头
我们通过new  运算符来调用构造函数
在new 一个构造函数的时候都执行了哪些那
(1) 创建一个新对象；
(2) 将构造函数的作用域赋给新对象（因此 this 就指向了这个新对象） ；
(3) 执行构造函数中的代码（为这个新对象添加属性） ；
(4) 返回新对象。
function Point(x, y) {
//为新对象添加x，y属性以及f方法
  this.x = x;
  this.y = y;
 ]]></description><category></category></item><item><title><![CDATA[关于对promise的理解]]></title><link>https://blog.csdn.net/wxxmagic/article/details/120266393</link><guid>https://blog.csdn.net/wxxmagic/article/details/120266393</guid><author>wxxmagic</author><pubDate>Mon, 13 Sep 2021 16:18:47 +0800</pubDate><description><![CDATA[目前只看了一点点，先做下记录
贴下阮一峰关于promise的文章
https://es6.ruanyifeng.com/#docs/promise
这里写的已经很详细了，大家可以直接看阮一峰的
promise的含义
所谓 Promise，简单说就是一个容器，里面保存着某个未来才会结束的事件（通常是一个异步操作）的结果。
创建容器的方法就是new Promise
注意，在你需要解决异步操作带来的问题的时候，才要去创建这个容器比如有两个函数，f() 和 g()，两个都是异步函数，并且 g() 的参数依赖于f()]]></description><category></category></item><item><title><![CDATA[try catch 的用法]]></title><link>https://blog.csdn.net/wxxmagic/article/details/120266257</link><guid>https://blog.csdn.net/wxxmagic/article/details/120266257</guid><author>wxxmagic</author><pubDate>Mon, 13 Sep 2021 14:19:32 +0800</pubDate><description><![CDATA[最近开发的项目里有个上传图片的功能，上传前需要进行图片压缩，压缩过程中会有压缩失败的问题。所以就需要捕获这个错误，将我上传图片的状态置为失败，以提示用户重新上传于是就是用了try  catch的方法
很简单
try {
	//你的js代码
}
catch {
	//当try作用域里面的js代码出现错误的情况下，catch捕获到js错误，就会执行catch里面的代码了
	console.log("捕获到错误了")
}


...]]></description><category></category></item><item><title><![CDATA[微信小程序wxs文件，（indexOf方法）]]></title><link>https://blog.csdn.net/wxxmagic/article/details/117415887</link><guid>https://blog.csdn.net/wxxmagic/article/details/117415887</guid><author>wxxmagic</author><pubDate>Mon, 31 May 2021 14:32:32 +0800</pubDate><description><![CDATA[// WXS（WeiXin Script）是小程序的一套脚本语言，结合 WXML，可以构建出页面的结构。

// 说白了就是一些js语法无法在页面标签中使用可以在这里定义
// Object.keys()   
// toString()  
// indexOf() 
// 这些不能用
function indexOf(arr, value) {
    if (arr.indexOf(value) &lt; 0) {
        return false;
    } else {
        ]]></description><category></category></item><item><title><![CDATA[JSON字符串转base64以及base64转urlsafeBASE64的方法(含小程序方法)]]></title><link>https://blog.csdn.net/wxxmagic/article/details/117414816</link><guid>https://blog.csdn.net/wxxmagic/article/details/117414816</guid><author>wxxmagic</author><pubDate>Mon, 31 May 2021 14:17:12 +0800</pubDate><description><![CDATA[参考文献
https://blog.csdn.net/qq_43466457/article/details/103328931
https://blog.csdn.net/SeriousLose/article/details/110817689
vue项目中JSON字符串可以直接通过window对象下挂的btoa()和atob()方法进行编码和解码
JSON转base64
//json转base64
var base64 = window.btoa(jsonCode)

base64转JSON
//ba]]></description><category></category></item><item><title><![CDATA[vscode代码段的配置]]></title><link>https://blog.csdn.net/wxxmagic/article/details/116789244</link><guid>https://blog.csdn.net/wxxmagic/article/details/116789244</guid><author>wxxmagic</author><pubDate>Fri, 14 May 2021 14:08:16 +0800</pubDate><description><![CDATA["wxxLog": {
		"prefix": ".log",
		"body": [
			"console.log('$1=========',$2);"
		],
		"description": "wxxLog"
	},

prefix：是vscode识别的字段，当你输入prefix的字段的时候点击tab  会自动转换成body里面的代码段
以上面的例子来说当输入.log的时候按tab键就会生成
console.log(’=========’,);
这段代码
$1的位置是编辑光标在的第一个位置，$2]]></description><category></category></item><item><title><![CDATA[关于伪类和伪元素的理解]]></title><link>https://blog.csdn.net/wxxmagic/article/details/116783658</link><guid>https://blog.csdn.net/wxxmagic/article/details/116783658</guid><author>wxxmagic</author><pubDate>Fri, 14 May 2021 11:18:05 +0800</pubDate><description><![CDATA[伪类和伪元素是针对某个已经存在的元素来说的，所以称为伪元素和伪类而不是元素和类
伪元素可以理解为针对某个元素的选择器，可以选择某个元素的某个位置来设置样式
::first-line 伪元素用于向文本的首行添加特殊样式

note：只能应用于块级元素

::first-letter 伪元素用于向文本的首字母添加特殊样式。

note：只能应用于块级元素

::before 伪元素可用于在元素内容之前插入一些内容。

::after 伪元素可用于在元素内容之后插入一些内容。

::selection 伪元素匹配]]></description><category></category></item><item><title><![CDATA[element表单验证以及开发过程中碰到的其他情况]]></title><link>https://blog.csdn.net/wxxmagic/article/details/109319537</link><guid>https://blog.csdn.net/wxxmagic/article/details/109319537</guid><author>wxxmagic</author><pubDate>Wed, 12 May 2021 15:33:03 +0800</pubDate><description><![CDATA[11

]]></description><category></category></item><item><title><![CDATA[element  switch  组件绑定值变化的问题]]></title><link>https://blog.csdn.net/wxxmagic/article/details/116662544</link><guid>https://blog.csdn.net/wxxmagic/article/details/116662544</guid><author>wxxmagic</author><pubDate>Tue, 11 May 2021 17:19:31 +0800</pubDate><description><![CDATA[&lt;el-switch
                @change="handleChangeSwitch(scope.row.status, scope.row.id)"
                :value="scope.row.status"
                :active-value="0"
                :inactive-value="1"
                active-color="#13ce66"
          ...]]></description><category></category></item><item><title><![CDATA[超出div宽度文本隐藏显示...省略号]]></title><link>https://blog.csdn.net/wxxmagic/article/details/116660737</link><guid>https://blog.csdn.net/wxxmagic/article/details/116660737</guid><author>wxxmagic</author><pubDate>Tue, 11 May 2021 16:42:33 +0800</pubDate><description><![CDATA[.subTitleBox {
	//超出部分显示...
 	 text-overflow: ellipsis;  
 	 //超出部分隐藏
  	overflow: hidden;
 	 //文本禁止换行
  	white-space: nowrap;
}


]]></description><category></category></item><item><title><![CDATA[procxy代理]]></title><link>https://blog.csdn.net/wxxmagic/article/details/116274501</link><guid>https://blog.csdn.net/wxxmagic/article/details/116274501</guid><author>wxxmagic</author><pubDate>Thu, 29 Apr 2021 18:21:42 +0800</pubDate><description><![CDATA[出于浏览器的同源策略限制，当一个请求url的协议、域名、端口三者之间任意一个与当前页面url不同即为跨域
服务器之间不存在跨域
vue-cli的proxyTable用的是http-proxy-middleware中间件，该中间件本质上是在本地开了一个服务器dev-server，所有的请求都通过这里转发出去，即把浏览器的发送请求代理转发到代理服务器上，再由代理服务器发送请求给目标服务器，从而解决跨域问题。
那pathRewrite是用来干嘛的呢，这里的作用，相当于是替代/api，如果接口中是没有api的，那就]]></description><category></category></item><item><title><![CDATA[html引入字体包的方法]]></title><link>https://blog.csdn.net/wxxmagic/article/details/112305960</link><guid>https://blog.csdn.net/wxxmagic/article/details/112305960</guid><author>wxxmagic</author><pubDate>Thu, 07 Jan 2021 11:32:03 +0800</pubDate><description><![CDATA[@font-face {
//这里定义你引入字体包的名称
    font-family: 'mFontRegular';
    src:url('字体包资源路径');
}

html {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
    //background-size: 100% auto;
    //background-position: top;
    fon]]></description><category></category></item><item><title><![CDATA[H5页面移动端背景图以及文字适配方法]]></title><link>https://blog.csdn.net/wxxmagic/article/details/112236525</link><guid>https://blog.csdn.net/wxxmagic/article/details/112236525</guid><author>wxxmagic</author><pubDate>Thu, 07 Jan 2021 10:55:21 +0800</pubDate><description><![CDATA[H5页面适配的方法
背景的适配
给页面设置背景图，因为适配不同的设备（设备屏幕分辨率不同），所以再给背景图宽高的时候不能全部给100%
背景图（ui设计图）的比例是固定的，这里举例750px*1468px,如果给背景图设置为
background-size: 100% 100%;

那么背景图就会完全填充到整个屏幕，当屏幕的比例不同于你设计图的比例的时候，你的背景图就会有拉伸现象（背景变形）
为了让背景不变形有两种方法
固定宽填充整个屏幕，让高自适应
background-size: 100% auto;
]]></description><category></category></item><item><title><![CDATA[2020-12-31 树状结构根据末级id查到所有的父级id的方法]]></title><link>https://blog.csdn.net/wxxmagic/article/details/112001441</link><guid>https://blog.csdn.net/wxxmagic/article/details/112001441</guid><author>wxxmagic</author><pubDate>Thu, 31 Dec 2020 03:12:11 +0800</pubDate><description><![CDATA[树状结构不知道有多少级的情况  根据末级id查到所有的父级id的方法
先上我的代码
获取到子集id
this.typeid = this.questionData[0].type;

接下来
//sortOptions是整个树状结构
this.sortOptions.forEach((item,index)=&gt;{
//循环第一层判断
                        if(item.children){
                            console.log("z]]></description><category></category></item></channel></rss>