1.首先在子组件调用父组件的方法
setFontSize (fontSize) {
this.defaultFontSize = fontSize
// 在父类操作fontSize(调用父组件的setFontSize方法)
this.$emit('setFontSize', fontSize)
}
2.在父组件中写此方法
setFontSize (fontSize) {
if (this.themes) {
this.themes.fontSize(fontSize + 'px')
}
},