博客 / 列表

早飯君 - async await實際用法

async handleSubmit() { await this.handleSubmitReport() // 1 await this.handleSubmitEdit() // 2 this.showSuccess = true // 3 this.showSuccessText = '你已成功提交檢查結果!'

ecmascript-6 , async-await , async

早飯君 - 在validate校驗函數內,使用async異步函數

在validate校驗函數內,使用async異步函數 async handleLogin() { this.$refs.form.validate(async (valid) = { if (valid) { // 獲取公鑰 await this.getEncrypte() } })

async-await , async

早飯君 - vue移動端 px2rem-loader與vux移動端組件庫樣式錯亂,應該使用postcss-plugin-px2rem完美解決

整了半天,還是不能用px2rem-loader這個組件,因為他沒有忽略範圍,要換postcss-plugin-px2rem 1、先npm 安裝postcss-plugin-px2rem插件 npm i postcss-plugin-px2rem --save -dev 2、找到與src同級目錄下的.postcssrc.js module.exports = { "plugins": {

vue.js , px2rem , vux , rem