原创 小程序中使用字體圖標

1.在iconfont上選擇圖標 添加到購物車 添加到項目 下載代碼到本地 2.添加到項目文件 解壓下載下來的圖標文件 新建文件lib,新建文件icon.wxss,將iconfont.css的內容複製進來 在app.wxss

原创 uni-app事件修飾符失效

要用.native配合使用: <image @click.native.stop="navBack" src=""></image>

原创 Vue2.0webpakc打包注意

1.靜態資源路徑 config – index.js – build – assetsPublicPath改爲: assetsPublicPath: './' 2.如果使用了box-orient屬性 build – webpac

原创 Js工具方法--秒數變歷時

function translateSecondToWhen(second) { var releaseTimeMsg; var releaseHours = parseInt((Date.parse(new Date())

原创 微信小程序排坑總結(更新中)

1.動態綁定class,不能用對象的寫法,得用三目運算 wrong: <view class="{current: tabCurrentIndex === index}"></view> right: <view class="{

原创 使用screenfull.js在vue中實現瀏覽器全屏顯示

1.安裝 npm install --save screenfull 2.引入 import screenfull from 'screenfull' 3.調用 screenfull.toggle() 示例 <templat

原创 vue的事件總線--eventBus用法

容器 新建store/eventBus.js import Vue from 'vue' const eventBus = new Vue() export default eventBus 引入 import eventBus

原创 cmd強制刪除目錄

del/f/s/q 盤符:\文件名

原创 Vue組件通信大全

1.$emit 和 props 2.$emit 和 $on(事件總線eventBus) 3.$parent 和 $children 4.$root 和 $refs 5.inject 和 provide 6.v-model 7.Vu

原创 vue的eventBus用法

容器 新建store/eventBus.js import Vue from 'vue' const eventBus = new Vue() export default eventBus 引入 import eventBus

原创 tip

1.初始化參數 var idx = !index ? 0 : index;

原创 不常見的css玩法

1.css禁用鼠標事件 .disabled { pointer-events: none; cursor: default; opacity: 0.6; } 2.實現條紋網格的方式 .row:nth-ch

原创 element-ui表頭錯位

//App.vue中 <style> body .el-table th.gutter{ display: table-cell!important; } body .el-t

原创 watch的初始立即執行

摘自掘金_Dreams的《6個有用的Vue開發技巧》 傳送門 當 watch 一個變量的時候,初始化時並不會執行,如下面的例子,你需要在created的時候手動調用一次。 created() { this.fetchUserL

原创 小程序map組件不顯示座標解決

前提場景: 在使用map組件時,經緯度屬性(latitude,longitude)使用數據綁定,在onLoad裏獲取用戶的地理位置,然後再setData,這時往往map組件拿不到獲取的值。 原因: map組件的組件渲染是優先於接口