globalFunction.js 323 B

12345678910
  1. export const EchartfontSize = {
  2. install(Vue) {
  3. Vue.prototype.EchartfontSize = (res) => {
  4. const clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
  5. if (!clientWidth) return
  6. const fontSize = (clientWidth / 1920)
  7. return res * fontSize
  8. }
  9. }
  10. }