I initialised a weex and vue app using weex create awesome-project
. In the entry.js
file I am trying to register a global mixin but it does not seem to be registering. The code is is:
import weex from 'weex-vue-render'
import Vue from 'vue'
Vue.mixin({
computed: {
device () {
return 'mobile'
},
browser () {
return this.device === 'browser'
},
mobile () {
return this.device === 'mobile'
}
}
})
weex.init(Vue)
None of the component have this.mobile
as true. Works fine in the web simulator but not when I scan the QR code on my phone.