原创 Vue created和activated的區別

created():在創建vue對象時,當html渲染之前就觸發; 全局vue.js只創建一次,也就是說,created()只會觸發一次; activated():在vue對象存活的情況下,進入當前存在activated()函數的頁面時,

原创 Vue子組件修改父組件傳的值

Vue父子間傳值 報錯 Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders

原创 elementUI switch開關文字顯示

// 表格 <el-table-column label="狀態">   <template slot-scope="scope">     <el-switch       v-model="scope.row.flag"      

原创 監聽滾動軸移動的距離

問題: 在mounted裏面直接添加監聽這樣監聽到的值一直是0 window.addEventListener('scroll', this.handleScroll); 解決辦法:添加一個參數 true window.addEven

原创 圖片URL轉BOLB BOLB轉文件

getUrlBolb(url) { let reader = new FileReader(); this.imageToBlob(url, (blob) => { reader.readAsDataURL(blob);

原创 ftp 451 No mapping for the Unicode character

  解決方法: Web管理工具 - IIS管理控制檯 的 FTP 設置界面,“高級設置” 將“允許UTF8”從 “True” 改爲 “False”,重新啓動服務器

原创 文件名稱有多個點的時候怎麼截取後綴名

(file.name).split('.').pop() 1、直接通過"."進行分割 2、拿到數組後,用pop方法 拿到最後的一個