FunASR/web-pages/src/globalFunctions.js
2023-11-23 16:12:32 +08:00

13 lines
266 B
JavaScript

export default {
install (Vue) {
// px 转 rem
Vue.prototype.pxTorem = (px, needUnit) => {
if (needUnit) {
return px / 19.2 + 'rem'
} else {
return px / 19.2
}
}
}
}