提交 0a3e9f02 编写于 作者: fxy060608's avatar fxy060608

feat(h5): nvue

上级 5b762be8
...@@ -144,7 +144,12 @@ function beforeEach (to, from, next, routes) { ...@@ -144,7 +144,12 @@ function beforeEach (to, from, next, routes) {
/* eslint-disable no-undef */ /* eslint-disable no-undef */
if (__PLATFORM__ === 'h5') { if (__PLATFORM__ === 'h5') {
if (to.meta && to.meta.name) { if (to.meta && to.meta.name) {
document.body.className = 'uni-body ' + to.meta.name document.body.className = 'uni-body ' + to.meta.name
if (to.meta.isNVue) {
document.body.setAttribute('nvue', '')
} else {
document.body.removeAttribute('nvue')
}
} }
} }
......
...@@ -106,7 +106,10 @@ export default { ...@@ -106,7 +106,10 @@ export default {
/* eslint-disable no-undef */ /* eslint-disable no-undef */
if (__PLATFORM__ === 'h5') { if (__PLATFORM__ === 'h5') {
if (entryRoute.meta && entryRoute.meta.name) { if (entryRoute.meta && entryRoute.meta.name) {
document.body.className = 'uni-body ' + entryRoute.meta.name document.body.className = 'uni-body ' + entryRoute.meta.name
if (entryRoute.meta.isNVue) {
document.body.setAttribute('nvue', '')
}
} }
} }
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册