<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Lemon_Haner的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Lemon_Haner</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Lemon_Haner]]></copyright><item><title><![CDATA[vue中token存储在localStorage，放在请求的头部]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/114301145</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/114301145</guid><author>Lemon_Haner</author><pubDate>Wed, 03 Mar 2021 10:29:14 +0800</pubDate><description><![CDATA[存储后端返回的token

localStorage.setItem('token', resp.token)

在请求拦截器中将token放在请求的头部


if (localStorage.getItem('token') !== null) {
  config.headers['authorization'] = localStorage.getItem('token')
}
]]></description><category></category></item><item><title><![CDATA[vue中以对象的形式存放到localStorage中]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/114300411</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/114300411</guid><author>Lemon_Haner</author><pubDate>Wed, 03 Mar 2021 10:17:09 +0800</pubDate><description><![CDATA[resp是从后端取到的数据
let psnInfo = {
  deptCode: resp.psnInfo.deptCode,
  deptName: resp.psnInfo.deptName,
  psnCode: resp.psnInfo.psnCode,
  psnName: resp.psnInfo.psnName
}
localStorage.setItem('psnInfo', JSON.stringify(psnInfo))

获得localStorage的数据


psnInfo ().]]></description><category></category></item><item><title><![CDATA[el-upload组件去掉删除按钮图标]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/114300318</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/114300318</guid><author>Lemon_Haner</author><pubDate>Wed, 03 Mar 2021 09:58:20 +0800</pubDate><description><![CDATA[只需加上:disabled="true"就可以去掉
]]></description><category></category></item><item><title><![CDATA[“vue中每次修改内容都要手动重启,内容才改变“解决]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/113243554</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/113243554</guid><author>Lemon_Haner</author><pubDate>Wed, 27 Jan 2021 11:01:57 +0800</pubDate><description><![CDATA[webstorm保存的时候会先保存到旧时文件中，要在setting-&gt;stystem settings下的“use save write”去掉
]]></description><category></category></item><item><title><![CDATA[vue中get和post请求传参]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/112918821</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/112918821</guid><author>Lemon_Haner</author><pubDate>Thu, 21 Jan 2021 11:01:37 +0800</pubDate><description><![CDATA[get请求只能传params,而params是放在请求的url上的.

post请求能传params和data.params是放在请求的url上,但url是以?name=hh&amp;password=hh这种形式
]]></description><category></category></item><item><title><![CDATA[vue中字符串与变量进行拼接]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109745556</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109745556</guid><author>Lemon_Haner</author><pubDate>Tue, 17 Nov 2020 16:16:01 +0800</pubDate><description><![CDATA[this.des += `面积${this.bizArea}平，门宽${this.doorWidth}米`

其中`要使用Esc下面的标点
]]></description><category></category></item><item><title><![CDATA[el-date-picker设置未来的时间不可选]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109719847</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109719847</guid><author>Lemon_Haner</author><pubDate>Mon, 16 Nov 2020 14:08:03 +0800</pubDate><description><![CDATA[&lt;el-form-item label="起止时间" required&gt;
   &lt;el-date-picker
     v-model="record.beginDate"
     type="date"
     value-format="yyyy-MM-dd"
     placeholder="选择日期"
     :picker-options="expireTimeOption"
     style="width: 40%"&gt;
   &lt;/el-date-pi.]]></description><category></category></item><item><title><![CDATA[vue表单验证(验证是否是座机或手机号)]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109719451</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109719451</guid><author>Lemon_Haner</author><pubDate>Mon, 16 Nov 2020 13:53:38 +0800</pubDate><description><![CDATA[data () {
  var checkPhone = (rule, value, callback) =&gt; {
    let regPone = null
    let mobile = /^((13|14|15|17|18)[0-9]{1}\d{8})$/ // 最新16手机正则
    let tel = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/ // 座机
    if (value !== null &amp;&amp; value.charAt.]]></description><category></category></item><item><title><![CDATA[vue定义数组对象]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109719244</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109719244</guid><author>Lemon_Haner</author><pubDate>Mon, 16 Nov 2020 13:39:49 +0800</pubDate><description><![CDATA[options就是要定义的数组对象,先进行for循环,然后对对象参数进行赋值
personQueryList(this.paramType).then(res =&gt; {
  for (let i = 0; i &lt; res.records.length; i++) {
    this.options[i] = {
      label: res.records[i].name,
      value: res.records[i].code }
  }
})
...]]></description><category></category></item><item><title><![CDATA[vue自动计算日期天数]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109716386</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109716386</guid><author>Lemon_Haner</author><pubDate>Mon, 16 Nov 2020 10:58:58 +0800</pubDate><description><![CDATA[&lt;el-form-item label="日期:"&gt;{{dateRange(this.begin,this.end)}}  ({{this.begin}}至{{this.end}})&lt;/el-form-item&gt;


dateRange (t, t1) {
  let range = ''
  let sj = new Date(t)
  let sj1 = new Date(t1)
  let y = sj.getFullYear()
  let m = sj.getMonth(.]]></description><category></category></item><item><title><![CDATA[“vue项目部署到正式环境中图片网址自动拼接nginx转发的网址“的解决]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109716089</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109716089</guid><author>Lemon_Haner</author><pubDate>Mon, 16 Nov 2020 10:50:49 +0800</pubDate><description><![CDATA[做项目的时候,数据库也有上传的图片地址,但是在前端回显的时候显示不出来.如图:



回显的代码:&lt;img :src="declarationForm.pics[0].url" class="avatar" alt=""&gt;

后端返回的地址是




才发现地址少了个/,导致图片不能回显,在src显示的时候自动拼接nginx转发的网址
...]]></description><category></category></item><item><title><![CDATA[Vue项目中使用svg图标]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109715907</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/109715907</guid><author>Lemon_Haner</author><pubDate>Mon, 16 Nov 2020 10:37:40 +0800</pubDate><description><![CDATA[见https://www.cnblogs.com/shenyf/p/10370949.html
]]></description><category></category></item><item><title><![CDATA[android插入背景图片，报错Error: The resource name must start with a letter]]></title><link>https://blog.youkuaiyun.com/Lemon_Haner/article/details/100062667</link><guid>https://blog.youkuaiyun.com/Lemon_Haner/article/details/100062667</guid><author>Lemon_Haner</author><pubDate>Sun, 25 Aug 2019 14:09:03 +0800</pubDate><description><![CDATA[插入图片，报错Error: The resource name must start with a letter
修改：请将图片以数字开头1.png改为p1.png，代码为android:background="@mipmap/p1"就好了

]]></description><category></category></item></channel></rss>