image.png
新建js文件
var fun = function (info) {
console.log('hello -> '+info)
}
export default fun
main.js导包并挂载
import log from './common/common.js'
Vue.prototype.$log = log
使用
this.$log('android created')
var fun = function (info) {
console.log('hello -> '+info)
}
export default fun
import log from './common/common.js'
Vue.prototype.$log = log
this.$log('android created')