export default{
mounted() {
},
methods: {
getdata(){
this.name
}
},
data() {
return {
name:'jack'
}
},
}
<script>
import mixin from '../mixin'
export default {
mixins:[mixin],
name: '',
//接收父组件传递过来的参数
props: {
},
components: {
},
data() {
return {
msg:'jack'
}
},
mounted() {
this.getdata(
this.mag= this.name
)
},