We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For example, i want to inject a back to top component, then i can register it by following config:
// config.ts export default { globalUIComponents: ['/User/project/src/components/BackToTop/index.tsx'] }
Then the component will be injected to page automatically.
// Layout/index.tsx import globalComponents from 'virtual:components'
load(id) { if (id === 'virtual:components') { return ` import BackToTop from '/User/project/src/components/BackToTop/index.tsx'; export default [BackToTop] ` } }
// Layout/index.tsx function Layout() { return ( // 省略 globalComponents.map(globalComponent => React.createElement(globalComponent)) ) }
No response
The text was updated successfully, but these errors were encountered:
I am not clear how to implement it
Sorry, something went wrong.
No branches or pull requests
Is your feature request related to a problem? Please describe.
For example, i want to inject a back to top component, then i can register it by following config:
Then the component will be injected to page automatically.
Describe the solution you'd like
Describe alternatives you've considered
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: