<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[moon_tang的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/moon_tang</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; moon_tang]]></copyright><item><title><![CDATA[js中三种弹窗的简单使用alert、confirm、prompt]]></title><link>https://blog.csdn.net/moon_tang/article/details/105908198</link><guid>https://blog.csdn.net/moon_tang/article/details/105908198</guid><author>moon_tang</author><pubDate>Sun, 03 May 2020 20:29:30 +0800</pubDate><description><![CDATA[]]></description><category></category></item><item><title><![CDATA[vue 使用定时器setInterval，且解决不起作用]]></title><link>https://blog.csdn.net/moon_tang/article/details/105907769</link><guid>https://blog.csdn.net/moon_tang/article/details/105907769</guid><author>moon_tang</author><pubDate>Sun, 03 May 2020 20:08:32 +0800</pubDate><description><![CDATA[在网上看到一篇Vue中使用定时器setInterval和setTimeou讲解得很好，但是放在自己代码中却不能实现定时器的作用，后来了解到是因为vue中要用箭头函数才能使setInterval起作用
解决方案
  this.timer = setInterval(this.get, 1000);  

修改为
 var _this = this;  //注意，要有，因为有箭头函数所以this作用域...]]></description><category></category></item><item><title><![CDATA[vue  纯css环形加载Loading]]></title><link>https://blog.csdn.net/moon_tang/article/details/105907706</link><guid>https://blog.csdn.net/moon_tang/article/details/105907706</guid><author>moon_tang</author><pubDate>Sun, 03 May 2020 19:50:25 +0800</pubDate><description><![CDATA[动态的，可以转。其实就是一张动态图片

&lt;div v-if="isOk" class="loading"&gt;&lt;/div&gt;

.loading{
    margin: 40px auto;
    display: block;
    width: 65px;
    height: 65px;
    border: 1px solid #ddd;
    border-...]]></description><category></category></item><item><title><![CDATA[vue 路由传参]]></title><link>https://blog.csdn.net/moon_tang/article/details/105833217</link><guid>https://blog.csdn.net/moon_tang/article/details/105833217</guid><author>moon_tang</author><pubDate>Wed, 29 Apr 2020 10:03:51 +0800</pubDate><description><![CDATA[由OrderDetail页面跳转到OrderPayment页面，且传两个参数orderNo和qrPath

OrderPayment获取参数


]]></description><category></category></item><item><title><![CDATA[用watch监听this.$store数据的变化]]></title><link>https://blog.csdn.net/moon_tang/article/details/105208188</link><guid>https://blog.csdn.net/moon_tang/article/details/105208188</guid><author>moon_tang</author><pubDate>Mon, 30 Mar 2020 20:49:57 +0800</pubDate><description><![CDATA[如监听this.$store.state.username的值，在watch对象中写
watch: {
    '$store.state.username': function () {
      //你需要执行的代码
    }
  },


]]></description><category></category></item><item><title><![CDATA[两个平级div顶部不对齐]]></title><link>https://blog.csdn.net/moon_tang/article/details/105205778</link><guid>https://blog.csdn.net/moon_tang/article/details/105205778</guid><author>moon_tang</author><pubDate>Mon, 30 Mar 2020 18:48:49 +0800</pubDate><description><![CDATA[问题
div宽高一样就是里面内容有所不同，有些div顶端不对齐，如图

解决
给每个div设置属性
vertical-align:top;




]]></description><category></category></item><item><title><![CDATA[There are multiple modules with names that only differ in casing.]]></title><link>https://blog.csdn.net/moon_tang/article/details/105081182</link><guid>https://blog.csdn.net/moon_tang/article/details/105081182</guid><author>moon_tang</author><pubDate>Tue, 24 Mar 2020 21:10:23 +0800</pubDate><description><![CDATA[问题
在 npm run dev 后，控制台出现警告，没有出现链接，但是在浏览器上直接输入地址http://localhost:8080/#/ 又可显示界面

There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on...]]></description><category></category></item><item><title><![CDATA[vue项目中自定义toast弹框]]></title><link>https://blog.csdn.net/moon_tang/article/details/104999458</link><guid>https://blog.csdn.net/moon_tang/article/details/104999458</guid><author>moon_tang</author><pubDate>Fri, 20 Mar 2020 22:01:43 +0800</pubDate><description><![CDATA[直接引用别人封装的 vue toast组件，地址http://www.jq22.com/jquery-info10876   直接进去看演示效果以及下载代码 （声明：如有不妥请联系可删）

接下来我就操作怎样下载下来的文件让他在vue项目中运行起来
1、将toast文件放在 src 目录下

2、 自定义toast.js文件
export function Toast(msg, type) {
 ...]]></description><category></category></item><item><title><![CDATA[报错 Uncaught (in promise) TypeError: Cannot read property 'id' of undefined]]></title><link>https://blog.csdn.net/moon_tang/article/details/104972958</link><guid>https://blog.csdn.net/moon_tang/article/details/104972958</guid><author>moon_tang</author><pubDate>Thu, 19 Mar 2020 18:02:04 +0800</pubDate><description><![CDATA[//出错的代码块
formatTableData(data){
      for (var i = 0; i &lt;=data.length; i++) {
        var obj = new Object();
        obj.id = data[i].id;
        obj.name = data[i].name;
        obj.price = data...]]></description><category></category></item><item><title><![CDATA[github新建仓库 + 初始化vue项目]]></title><link>https://blog.csdn.net/moon_tang/article/details/103055491</link><guid>https://blog.csdn.net/moon_tang/article/details/103055491</guid><author>moon_tang</author><pubDate>Wed, 13 Nov 2019 19:24:55 +0800</pubDate><description><![CDATA[在GitHub上新建一个仓库，并且将它拉取到本地，本地文件中放vue项目。以后项目每次修改直接从Vscode上推更新到GitHub。
1、GitHub上新建仓库



2、克隆到本地

git bash here
cd test （进入test）
vue init webpack (初始化vue项目）

完成-----------


...]]></description><category></category></item><item><title><![CDATA[vscode统计项目代码总行数]]></title><link>https://blog.csdn.net/moon_tang/article/details/102601417</link><guid>https://blog.csdn.net/moon_tang/article/details/102601417</guid><author>moon_tang</author><pubDate>Thu, 17 Oct 2019 10:55:21 +0800</pubDate><description><![CDATA[edit -&gt; find in files

输入正则表达式   b*[:b#/]+.*$  ，图中10331就是代码行数



]]></description><category></category></item><item><title><![CDATA[vue中当内容超出一定长度以……代替]]></title><link>https://blog.csdn.net/moon_tang/article/details/102526359</link><guid>https://blog.csdn.net/moon_tang/article/details/102526359</guid><author>moon_tang</author><pubDate>Sat, 12 Oct 2019 19:53:21 +0800</pubDate><description><![CDATA[]]></description><category></category></item><item><title><![CDATA[button被点击后的蓝框  css button 的四种状态]]></title><link>https://blog.csdn.net/moon_tang/article/details/100973121</link><guid>https://blog.csdn.net/moon_tang/article/details/100973121</guid><author>moon_tang</author><pubDate>Wed, 18 Sep 2019 09:50:47 +0800</pubDate><description><![CDATA[1.普通状态2，鼠标hover状态  3.active 点击状态  4.focus 取得焦点状态
focus  经常用来取消a链接点击后产生的虚线边框
a:focus{
outline: none;
}



    
    
&lt;style type="text/css"&gt;
    .btn {
        color: white;
        background-col...]]></description><category></category></item><item><title><![CDATA[slot 插槽子组件向父组件传值]]></title><link>https://blog.csdn.net/moon_tang/article/details/100520622</link><guid>https://blog.csdn.net/moon_tang/article/details/100520622</guid><author>moon_tang</author><pubDate>Tue, 03 Sep 2019 16:02:09 +0800</pubDate><description><![CDATA[slot 插槽要实现子组件向父组件传值，则需要运用 作用域插槽
1、父组件中用 标签加上 slot-scoped 的属性，属性值随性。（旧版本是scope,vue新版本必须用slot-scope)
2、子组件中给  加上一个自定义属性，在父组件中的slot-scope就能接收这个自定义属性的值
//父组件
&lt;template slot-scope="props" slot="append-o...]]></description><category></category></item><item><title><![CDATA[不能在slot上绑定和触发事件]]></title><link>https://blog.csdn.net/moon_tang/article/details/100520325</link><guid>https://blog.csdn.net/moon_tang/article/details/100520325</guid><author>moon_tang</author><pubDate>Tue, 03 Sep 2019 15:51:53 +0800</pubDate><description><![CDATA[在 slot 上进行事件的监听和分发，这是不可能的。
组件的 slot 由调用它的父组件提供，这意味着所有事件都应该与父组件相关联。尝试去倾听这些变化意味着你的父子组件是紧密耦合的，可以使用 $parent 来操作。
&lt;script src="https://unpkg.com/vue@2.1.3/dist/vue.js"&gt;&lt;/script&gt;

&lt;div id="ap...]]></description><category></category></item><item><title><![CDATA[table tr th td 去除默认的边距，间距]]></title><link>https://blog.csdn.net/moon_tang/article/details/100513634</link><guid>https://blog.csdn.net/moon_tang/article/details/100513634</guid><author>moon_tang</author><pubDate>Tue, 03 Sep 2019 10:52:21 +0800</pubDate><description><![CDATA[给table的表头设置背景色后，发现每列之间有间隙

解决办法：给table标签加上**border=“0” cellspacing=“0” cellpadding=“0”**即可
&lt;table border="0" cellspacing="0" cellpadding="0"&gt; 



...]]></description><category></category></item><item><title><![CDATA[npm run dev 报错：missing script:dev]]></title><link>https://blog.csdn.net/moon_tang/article/details/100191141</link><guid>https://blog.csdn.net/moon_tang/article/details/100191141</guid><author>moon_tang</author><pubDate>Mon, 02 Sep 2019 08:52:13 +0800</pubDate><description><![CDATA[在 npm run dev 或 npm start 报错

打开package.js，发现没有script 里面的内容，本应该有如图内容

解决方法：
1、 vue init webpack， package.js文件中会添加内容

2、npm run dev 即可

...]]></description><category></category></item><item><title><![CDATA[解决vue中v-model绑定的变量赋值给了另一个变量后，两个变量同时改变]]></title><link>https://blog.csdn.net/moon_tang/article/details/100184246</link><guid>https://blog.csdn.net/moon_tang/article/details/100184246</guid><author>moon_tang</author><pubDate>Sun, 01 Sep 2019 16:06:47 +0800</pubDate><description><![CDATA[先来看一下问题背景 我们要做一个 搜索+分页 的功能，使用vue 我们将分页控件绑定了点击事件，点击后提交v-model绑定的formData表单，但是我们忽略了一个问题，就是当输入的信息改变的情况下，不点击搜索，直接点击分页控件，提交的将会是新现在搜索框中的搜索条件。这样就不和逻辑了。 于是我们在data中新加了一个表单的对象 submitForm，只有在点击 查询 的时候，v-model绑定的 formData 表单才会赋值给这个对象，而翻页的时候提交的是 submitForm 。这样就解决了这个问题。]]></description><category></category></item><item><title><![CDATA[vue中央事件总线bus]]></title><link>https://blog.csdn.net/moon_tang/article/details/100183753</link><guid>https://blog.csdn.net/moon_tang/article/details/100183753</guid><author>moon_tang</author><pubDate>Sun, 01 Sep 2019 15:33:22 +0800</pubDate><description><![CDATA[全局 1、新建 eventBus.js 文件 import Vue from 'vue' export default new Vue() 2、引用 (哪里要用就import eventBus.js 文件） $on : 监听 $emit ：触发 $off : 释放 ( 监听后一定要在beforeDestroy中释放）]]></description><category></category></item><item><title><![CDATA[vue移动端项目屏幕适配--flexible rem]]></title><link>https://blog.csdn.net/moon_tang/article/details/100106756</link><guid>https://blog.csdn.net/moon_tang/article/details/100106756</guid><author>moon_tang</author><pubDate>Tue, 27 Aug 2019 19:17:28 +0800</pubDate><description><![CDATA[开始
首先，我们使用 vue 的脚手架 vue-cli 来初始化一个 webpack 项目
没有安装过 vue-cli 的请先安装 vue-cli
安装所需依赖后安装 lib-flexible 和 px2rem-loader
1.下载lib-flexible
npm i lib-flexible --save
2.引入lib-flexible
在main.js中引入lib-flexible
imp...]]></description><category></category></item></channel></rss>