关于v-global用法的疑问 #11361
zhenhappy
started this conversation in
General Discussions
关于v-global用法的疑问
#11361
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
没用过uni-app,如果也是vue3的话,或许可以把页面高度改为响应式变量,在子组件里修改,在生命周期结束时复原 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
我如果在当前页面中带有scoped的样式中使用了v-global,这时候切换到其他页面,这个全局的样式会依然留有副作用,要如何做才能让v-global只在当前页生效,我的目的是要在当前页面修改页面之外的元素样式。
当然,你可能会问v-global本来就是修改全局样式用的,当然一旦加载到当前页面,就会产生作用,并一直持续。
我这边其实场景是这样的,在uni-app中,如果要让页面高度100%,就要修改page元素的,但是这个元素是在页面之上的,我在元素内是修改不到的,通过v-global可以修改到,但是修改了之后,其他页面便会收到影响,我希望的是只对当前页面高度100%,各位有何妙招
Beta Was this translation helpful? Give feedback.
All reactions