feat: 法语词汇学习应用

- Vue 3 + TypeScript + Tailwind CSS
- 词汇学习和管理功能
- 支持生词本和复习
This commit is contained in:
likingcode
2026-03-07 05:42:32 +00:00
commit 71232cf489
28 changed files with 9561 additions and 0 deletions

24
public/sw.js Normal file
View File

@@ -0,0 +1,24 @@
const CACHE_NAME = 'french-vocab-v1';
const urlsToCache = [
'/',
'/index.html',
'/assets/index.css',
'/assets/index.js'
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME)
.then((cache) => cache.addAll(urlsToCache))
);
});
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request)
.then((response) => {
if (response) return response;
return fetch(event.request);
})
);
});