在src下新建文件装载公用方法:mixin/baseMixin.js const baseMixin = { data() { return { title: '这个是公用标题' } }, methods: { onClick()