原创 前端記錄最後一天
async、await的理解使用 let asyncFn = async()=> { let data = null; data = await getData(url);//getData()返回的數據是 {name:'my
原创 css三角形, css製作select 記錄
css三角形 .drop-icon { position: absolute; width: 0; height: 0; border-right: 4px solid transparent; border-left: 4p
原创 vue-router總結
this.$router 相當於一個全局的路由器對象,包含了很多屬性和對象(比如 history 對象),任何頁面都可以調用其 push(), replace(), go() 等方法。 this.$route 表示當前路由對象,每一個
原创 less && scss
less 變量(Variables) @width: 10px; #header { width: @width; } 混合(Mixins) .bordered { border-top: dotted 1px black; bo
原创 微信小程序記錄 - api
wx.canIUse(string schema) 當前版本是否可用 返回值 boolean wx.switchTab({ url: '/index
原创 JS操作數組對象
數組 array.some(function(item,index,array){ return item>1; }) 只要有一個滿足的就返回true,沒有滿足的返回false e
原创 weex踩坑第一天之vue-router和weex-navigation配合使用
vue-router和weex-navigation配合使用(原理獲得地址欄地址截取路由,push路由跳轉) entry.js navigation跳轉的時候: 攔截: WXPageActivity.
原创 linux命令(系統爲centos)
linux下安裝pm2 npm install pm2 -g 創建軟連接 常用全局bin echo $PATH 輸出:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bi
原创 微信小程序記錄與項目實踐
wx.opensetting廢棄之後的二次授權(可以通過button也可以通過modal的方式,很多人說不可以用showModal但本人親測可用,版本爲2.8.3) wx.showModal({ title: '提
原创 vue使用echarts
npm install echarts -S main.js import echarts from 'echarts' Vue.prototype.$echarts = echarts echart.vue <templat
原创 vue安裝和卸載
查看版本 vue/cli --version 查看2.xx版本 npm view vue-cli versions --json vue init webpack vue2xx 查看3.xx以上版本 npm view @vue/cl
原创 vue打包路徑錯誤
修改 config/index.js
原创 postcss-plugin-px2rem和postcss-px2rem-exclude使用方法
npm i postcss-px2rem-exclude -D 鏈接:https://www.npmjs.com/package/postcss-px2rem-exclude .postcssrc.js module.export
原创 js操作以及es6小結
選擇器以及操作類名: document.getElementById("Id").classList.add("mystyle"); document.getElementById("Id").classList.remove("myst
原创 flex佈局
<div class="box"> <span class="item"></span> </div> css .box { display: flex; justify-content: center; // mian