template div {{message}} /div /template script //import Vue from 'vue' var mixin = { data: function () { return { message: 'hello', foo: 'abc' } } } export default{ mixins: [mixin] , components: { }, data() { return { message: 'goodby', bar
<template>
<div >
{{message}}
</div>
</template>
<script>
//import Vue from 'vue'
var mixin = {
data: function () {
return {
message: 'hello',
foo: 'abc'
}
}
}
export default{
mixins: [mixin]
,
components: {
},
data() {
return {
message: 'goodby',
bar: 'def'
}
},
methods:{
},
created(){
console.log(JSON.stringify(this.$data))
// => { message: "goodbye", foo: "abc", bar: "def" }
},
computed: {
},
watch: {
}
}
</script>
<style >
</style>