Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"rootvalue" In the case of two designs, only one parameter can be set #100

Open
declanchiu opened this issue May 19, 2023 · 1 comment
Open

Comments

@declanchiu
Copy link

how to set the root value for a web project that has both mobile and PC designs? The mobile design has a size of 375px and the PC design has a size of 1920px. I would greatly appreciate any guidance on how to approach this, or if there is a function that can help with this issue. Thank you very much.

@pandavips
Copy link

I think in this situation, you can store your PC and mobile files in separate directories, and then perform the necessary checks in the rootValue function to return the corresponding values. The rootValue can be a function that takes parameters for performing the required checks.

Of course, you are not obligated to follow my suggestion exactly. As long as you can come up with conditions that satisfy the differentiation within the function, it should work. I hope this helps you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants