You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
329 B
11 lines
329 B
|
3 years ago
|
export function setPageMeta ({
|
||
|
|
pageStyle,
|
||
|
|
rootFontSize
|
||
|
|
}) {
|
||
|
|
const pageElm = document.querySelector('uni-page-body') || document.body
|
||
|
|
pageElm.setAttribute('style', pageStyle)
|
||
|
|
if (rootFontSize && document.documentElement.style.fontSize !== rootFontSize) {
|
||
|
|
document.documentElement.style.fontSize = rootFontSize
|
||
|
|
}
|
||
|
|
}
|