web-infra-dev / web-infra-dev/garfish
vite 应用在后台管理系统中,如何做 tab 页签缓存
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Reproduction
main
Used Package Manager
npm
System Info
System:
OS: macOS 26.1
CPU: (10) arm64 Apple M4
Memory: 211.56 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.19.5 - /Users/applebad/.nvm/versions/node/v20.19.5/bin/node
Yarn: 1.22.22 - /Users/applebad/.nvm/versions/node/v20.19.5/bin/yarn
npm: 10.8.2 - /Users/applebad/.nvm/versions/node/v20.19.5/bin/npm
pnpm: 10.20.0 - /Users/applebad/.nvm/versions/node/v20.19.5/bin/pnpm
Browsers:
Safari: 26.1
npmPackages:
@garfish/bridge-vue-v3: ^1.19.7 => 1.19.7
garfish: ^1.19.7 => 1.19.7
Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Garfish issue and not a framework-specific issue.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the main reproduction and the @garfish/bridge-vue-v3 integration, focusing on the keepalive tab switching described in the report. Reproduce navigation through useRouter and observe cache eviction, onBeforeUnmount calls, and shared-store updates. Done means a minimal reproduction and a clearly confirmed framework behavior or fix path, but the payload does not identify source files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100