mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-22 19:43:37 +08:00
1.9 KiB
1.9 KiB
Purpose
This directory contains components closely coupled to the template:
- app: Components bound to template data.
- provider: Components that provide template services through injection.
Pages and providers
AppPageHeaderstandardizes the eyebrow, main title, description, and right-side actions. Pages retain their own body layouts; do not wrap business content here.AppShareLinkdefaults to a compact entry point. The dashboard usesvariant="cards"for named link cards while preserving the login page's space constraints.AppAvatarreads the avatar and name from the signing store and retains Naive UI size, shape and object-fit props.avatarSizeremains an optional legacy size override. Its button remains keyboard focusable.AppGlobalSpinbinds visibility to runtime state and merges caller theme overrides over its default opacity. It forwards the remaining Spin props and slots.AppLockScreenand its lock/unlock views share bilingual rules and copy. Clock updates align to minute boundaries, pause while the document is hidden, and release their timer on unmount.AppNaiveGlobalProvidersupplies Naive UI context andwindow.$message,$notification,$dialog, and$loadingBar. Discrete notification instances initialize and dispose with the provider and track theme/locale changes. Use them only while the provider is mounted.AppWatermarkProviderprovides the global watermark entry point;useWatermarkcontrols visibility and content. Change the provider's mount location to limit its coverage.AppRequestCancelerProvidercancels old requests before route updates. Default layout content mounts it; custom content slots must retain the required cancellation behavior.
Keep component introductions in documents like this one rather than large blocks before declarations. Follow the shared comment style for comment placement and formatting.