Compare commits

..

28 Commits
v2.1 ... master

Author SHA1 Message Date
Zyronon
c9e2a5d3b9
Merge pull request #109 from zyronon/dependabot/npm_and_yarn/node/axios-1.7.4
build(deps): bump axios from 1.6.7 to 1.7.4 in /node
2024-09-18 16:18:52 +08:00
dependabot[bot]
0f443d5328
build(deps): bump axios from 1.6.7 to 1.7.4 in /node
Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.7...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-18 02:16:05 +00:00
Zyronon
1e30b71800
Merge pull request #108 from zyronon/dependabot/npm_and_yarn/vite-5.2.14
build(deps-dev): bump vite from 5.2.10 to 5.2.14
2024-09-18 10:15:00 +08:00
dependabot[bot]
f9682a17e5
build(deps-dev): bump vite from 5.2.10 to 5.2.14
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.10 to 5.2.14.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.2.14/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.14/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-17 22:19:45 +00:00
Zyronon
1fd5c98c49
Merge pull request #104 from wangzhiyonglyk/master
fix: 修复纵向滑动的下标的bug
2024-09-08 20:57:53 +08:00
王志勇
9a23497964 fix: 修复纵向滑动的下标的bug 2024-09-08 20:28:16 +08:00
Zyronon
83caeaf669
Merge pull request #90 from zyronon/test
save
2024-06-06 16:46:54 +08:00
Zyronon
0478cc868c
save 2024-06-06 16:46:04 +08:00
zyronon
27ee8d87d6 docs: update readme.md 2024-05-30 14:41:37 +08:00
zyronon
26b2d240b5 Merge remote-tracking branch 'origin/master' 2024-05-30 10:47:07 +08:00
zyronon
8dcda1bd10 fix: root font-size automatic adaptation 2024-05-30 10:46:41 +08:00
Zyronon
84f4febd2e
Update README.ja.md 2024-05-11 00:18:40 +08:00
Zyronon
c5b4f2eb33
Merge pull request #81 from eltociear/update-jpdoc
Update README.ja.md
2024-05-08 13:39:55 +08:00
Ikko Eltociear Ashimine
f18b7b19f3 Update README.ja.md 2024-05-08 14:26:41 +09:00
zyronon
e4a9ce5df3 docs: update README.md 2024-05-08 11:32:42 +08:00
github-actions[bot]
9e2fb6683e docs: Added README."es".md translation via https://github.com/dephraiim/translate-readme 2024-05-08 03:28:40 +00:00
github-actions[bot]
975a95f6da docs: Added README."fr".md translation via https://github.com/dephraiim/translate-readme 2024-05-08 03:28:35 +00:00
github-actions[bot]
84e68fcf6a docs: Added README."de".md translation via https://github.com/dephraiim/translate-readme 2024-05-08 03:28:29 +00:00
github-actions[bot]
4451761e77 docs: Added README."ja".md translation via https://github.com/dephraiim/translate-readme 2024-05-08 03:28:24 +00:00
github-actions[bot]
b7efb141d1 docs: Added README."en".md translation via https://github.com/dephraiim/translate-readme 2024-05-08 03:28:18 +00:00
zyronon
84a38c3678 docs: update README.md 2024-05-08 11:16:48 +08:00
zyronon
a08900bfd8 docs: update README.md 2024-05-07 10:21:23 +08:00
github-actions[bot]
313f38de4f docs: Added README."es".md translation via https://github.com/dephraiim/translate-readme 2024-05-07 02:19:26 +00:00
github-actions[bot]
1357d8cf9a docs: Added README."fr".md translation via https://github.com/dephraiim/translate-readme 2024-05-07 02:19:21 +00:00
github-actions[bot]
92029d3703 docs: Added README."de".md translation via https://github.com/dephraiim/translate-readme 2024-05-07 02:19:16 +00:00
github-actions[bot]
dc973483be docs: Added README."ja".md translation via https://github.com/dephraiim/translate-readme 2024-05-07 02:19:11 +00:00
github-actions[bot]
07f32c8c1f docs: Added README."en".md translation via https://github.com/dephraiim/translate-readme 2024-05-07 02:19:05 +00:00
zyronon
d374310e2a docs: update README.md 2024-05-07 10:18:22 +08:00
12 changed files with 3968 additions and 4097 deletions

View File

@ -46,7 +46,8 @@ Github Pages: [https://dy.ttentau.top/](https://dy.ttentau.top/)
【模仿抖音系列】二:[实现抖音 “视频无限滑动“效果](https://juejin.cn/post/7361614921519054883)
【模仿抖音系列】三:[Vue 路由使用介绍以及添加转场动画](https://juejin.cn/post/7362528152777130025)
【模仿抖音系列】四:[Vue 有条件路由缓存,就像传统新闻网站一样](https://juejin.cn/post/7365334891473240101)
【模仿抖音系列】四:[Github Actions 部署 Pages、同步到 Gitee、翻译 README 、 打包 docker 镜像](https://juejin.cn/post/7365757742381957161)
【模仿抖音系列】五:[Github Actions 部署 Pages、同步到 Gitee、翻译 README 、 打包 docker 镜像](https://juejin.cn/post/7365757742381957161)
【模仿抖音系列】六:[使用rem、动态vh自适应移动端](https://juejin.cn/post/7374452765273538595)
## 运行
注意:本项目仅适用于学习和研究,不得用于商业使用

View File

@ -50,7 +50,8 @@ Github-Seiten:<https://dy.ttentau.top/>
\[Imitation Douyin-Serie] 1:[200 Codezeilen zur Implementierung einer Karussellkomponente ähnlich Swiper.js](https://juejin.cn/post/7360512664317018146)
\[Imitation Douyin-Serie] 2:[Verwirklichen Sie den „unendlich gleitenden Video“-Effekt auf Douyin](https://juejin.cn/post/7361614921519054883)
\[Imitation Douyin-Serie] Drei:[Einführung in die Verwendung des Vue-Routings und das Hinzufügen von Übergangsanimationen](https://juejin.cn/post/7362528152777130025)
\[Imitation Douyin-Serie] Vier:[Bedingtes Routen-Caching von Vue, genau wie bei herkömmlichen Nachrichtenseiten](https://juejin.cn/post/7365334891473240101)\[Imitation Douyin-Serie] Vier:[Github-Aktionen stellen Seiten bereit, synchronisieren mit Gitee, übersetzen README, packen Docker-Image](https://juejin.cn/post/7365757742381957161)
\[Imitation Douyin-Serie] Vier:[Bedingtes Routen-Caching von Vue, genau wie bei herkömmlichen Nachrichtenseiten](https://juejin.cn/post/7365334891473240101)
\[Imitation Douyin-Serie] Fünf:[Github-Aktionen stellen Seiten bereit, synchronisieren mit Gitee, übersetzen README, packen Docker-Image](https://juejin.cn/post/7365757742381957161)
## laufen

View File

@ -13,14 +13,14 @@
<a><img src="https://img.shields.io/badge/Powered%20by-Vue-blue"/></a>
</p>
`douyin-vue`is a parody`抖音|TikTok`mobile short video project.`Vue`"Best practices" on the mobile side, comparable to native`App`Silky and smooth experience. Used the latest`Vue`technology stack, based on[`Vue3`](https://cn.vuejs.org/)、[`Vite5`](https://cn.vitejs.dev/)、[`Pinia`](https://pinia.vuejs.org/)accomplish. The data is saved locally in the project through[`axios-mock-adapter`](https://github.com/ctimmerm/axios-mock-adapter)The library intercepts the API and returns local json data to simulate real backend requests.
`douyin-vue`is a parody`抖音|TikTok`mobile short video project.`Vue`"Best practices" on the mobile side, comparable to native`App` 丝滑流畅的使用体验。使用了最新的 `Vue`technology stack, based on[`Vue3`](https://cn.vuejs.org/)、[`Vite5`](https://cn.vitejs.dev/)、[`Pinia`](https://pinia.vuejs.org/)accomplish. The data is saved locally in the project through[`axios-mock-adapter`](https://github.com/ctimmerm/axios-mock-adapter)The library intercepts the API and returns local json data to simulate real backend requests.
<div>
<img width="150px" src='imgs/1.gif' />
<img width="150px" src='imgs/2.gif' />
<img width="150px" src='imgs/3.gif' />
<img width="150px" src='imgs/4.gif' />
<img width="150px" src='imgs/5.gif' />
<img width="150px" src='docs/imgs/1.gif' />
<img width="150px" src='docs/imgs/2.gif' />
<img width="150px" src='docs/imgs/3.gif' />
<img width="150px" src='docs/imgs/4.gif' />
<img width="150px" src='docs/imgs/5.gif' />
</div>
## Online access
@ -47,10 +47,11 @@ Github Pages:<https://dy.ttentau.top/>
## Link
\[Imitation Douyin Series] 1:[200行代码实现类似Swiper.js的轮播组件](https://juejin.cn/post/7360512664317018146)
\[Imitation Douyin Series] 1:[200 lines of code to implement a carousel component similar to Swiper.js](https://juejin.cn/post/7360512664317018146)
\[Imitation Douyin Series] 2:[Realize the "infinite sliding video" effect on Douyin](https://juejin.cn/post/7361614921519054883)
\[Imitation Douyin Series] Three:[Introduction to using Vue routing and adding transition animations](https://juejin.cn/post/7362528152777130025)
\[Imitation Douyin Series] Four:[Vue conditional route caching, just like traditional news sites](https://juejin.cn/post/7365334891473240101)\[Imitation Douyin Series] Four:[Github Actions deploy Pages, synchronize to Gitee, translate README, package docker image](https://juejin.cn/post/7365757742381957161)
\[Imitation Douyin Series] Four:[Vue conditional route caching, just like traditional news sites](https://juejin.cn/post/7365334891473240101)
\[Imitation Douyin Series] Five:[Github Actions deploy Pages, synchronize to Gitee, translate README, package docker image](https://juejin.cn/post/7365757742381957161)
## run
@ -84,7 +85,7 @@ npm run dev
Open your browser and visit:<http://127.0.0.1:3000>
**Note: You need to switch the browser to mobile mode, first press`F12`To bring up the console, press`Ctrl+Shift+M`to preview normally**
**注意:需要将浏览器切至手机模式,先按 `F12`To bring up the console, press`Ctrl+Shift+M`to preview normally**
## Data Sources
@ -110,7 +111,7 @@ The above content is all public information on the Internet
## Features and suggestions
The project is currently in the early stages of development, and new features are being added continuously. If you have any features or suggestions for the software, please feel free to contact us.`Issues`raised in
The project is currently in the early stages of development and new features are being added continuously. If you have any features or suggestions for the software, please feel free to contact us.`Issues`raised in
If you also like the design ideas of this software, please submit it`PR`, thank you very much for your support!
## contact me

View File

@ -16,11 +16,11 @@
`douyin-vue`es una parodia`抖音|TikTok`Proyecto de vídeo corto móvil.`Vue`"Mejores prácticas" en el lado móvil, comparables a las nativas`App`Experiencia sedosa y suave. Usado lo último`Vue`pila de tecnología, basada en[`Vue3`](https://cn.vuejs.org/)、[`Vite5`](https://cn.vitejs.dev/)、[`Pinia`](https://pinia.vuejs.org/)lograr. Los datos se guardan localmente en el proyecto a través de[`axios-mock-adapter`](https://github.com/ctimmerm/axios-mock-adapter)La biblioteca intercepta la API y devuelve datos json locales para simular solicitudes de backend reales.
<div>
<img width="150px" src='imgs/1.gif' />
<img width="150px" src='imgs/2.gif' />
<img width="150px" src='imgs/3.gif' />
<img width="150px" src='imgs/4.gif' />
<img width="150px" src='imgs/5.gif' />
<img width="150px" src='docs/imgs/1.gif' />
<img width="150px" src='docs/imgs/2.gif' />
<img width="150px" src='docs/imgs/3.gif' />
<img width="150px" src='docs/imgs/4.gif' />
<img width="150px" src='docs/imgs/5.gif' />
</div>
## Acceso en linea
@ -49,8 +49,9 @@ Páginas de Github:<https://dy.ttentau.top/>
\[Serie Imitación Douyin] 1:[200 líneas de código para implementar un componente carrusel similar a Swiper.js](https://juejin.cn/post/7360512664317018146)
\[Serie Imitación Douyin] 2:[Realice el efecto de "vídeo deslizante infinito" en Douyin](https://juejin.cn/post/7361614921519054883)
\[Serie Imitación Douyin] Tres:[Introducción al uso del enrutamiento de Vue y la adición de animaciones de transición](https://juejin.cn/post/7362528152777130025)
\[Serie Imitación Douyin] Cuatro:[Almacenamiento en caché de rutas condicionales de Vue, al igual que los sitios de noticias tradicionales](https://juejin.cn/post/7365334891473240101)\[Serie Imitación Douyin] Cuatro:[Github Actions implementa páginas, sincroniza con Gitee, traduce README, empaqueta la imagen de la ventana acoplable](https://juejin.cn/post/7365757742381957161)
\[Serie Imitación Douyin] Tres:[Vue 路由使用介绍以及添加转场动画](https://juejin.cn/post/7362528152777130025)
\[Serie Imitación Douyin] Cuatro:[Almacenamiento en caché de rutas condicionales de Vue, al igual que los sitios de noticias tradicionales](https://juejin.cn/post/7365334891473240101)
\[Serie Imitación Douyin] Cinco:[Github Actions implementa páginas, sincroniza con Gitee, traduce README, empaqueta la imagen de la ventana acoplable](https://juejin.cn/post/7365757742381957161)
## correr
@ -106,7 +107,7 @@ El video proviene de las siguientes celebridades de Douyin.
Imagen de las notas públicas de Xiaohongshu.
El contenido anterior es toda información pública en Internet.
以上内容均是互联网公开信息
## Funciones y sugerencias
@ -119,7 +120,7 @@ Puedes contactar a mi correo<a href="mailto:zyronon@163.com">zyronon@163.com</a>
> Comparta mis otros proyectos de código abierto:
>
> _[**Escribir palabra**- Software de memorización de vocabulario que se puede utilizar en la web ~](https://github.com/zyronon/typing-word)<img src="https://img.shields.io/github/stars/zyronon/typing-word.svg?style=flat-square&label=Star&color=4285dd&logo=github" height="16px" />_
> _[**Escribir palabra**- Software de memorización de vocabulario que se puede utilizar en la web ~](https://github.com/zyronon/typing-word) <img src="https://img.shields.io/github/stars/zyronon/typing-word.svg?style=flat-square&label=Star&color=4285dd&logo=github" height="16px" />_
> _[**Guiones web**- Algunos scripts útiles de Grease Monkey~](https://github.com/zyronon/web-scripts)<img src="https://img.shields.io/github/stars/zyronon/web-scripts.svg?style=flat-square&label=Star&color=4285dd&logo=github" height="16px" />_
## acuerdo

View File

@ -4,7 +4,7 @@
<p align="center">
<a href="README.en.md">English</a> | <a href="README.es.md">Spanish</a> | <a href="README.de.md">German</a> |
<a href="README.fr.md">French</a> | <a href="README.md">简体中文</a> | <a href="README.ja.md">日本語</a>
<a href="README.fr.md">French</a> | <a href="../README.md">简体中文</a> | <a href="README.ja.md">日本語</a>
</p>
<p align="center">
@ -50,7 +50,8 @@ Pages GitHub :<https://dy.ttentau.top/>
\[Série Imitation Douyin] 1 :[200 lignes de code pour implémenter un composant carrousel similaire à Swiper.js](https://juejin.cn/post/7360512664317018146)
\[Série Imitation Douyin] 2 :[Réaliser l'effet "vidéo coulissante infinie" sur Douyin](https://juejin.cn/post/7361614921519054883)
\[Série Imitation Douyin] Trois :[Introduction à l'utilisation du routage Vue et à l'ajout d'animations de transition](https://juejin.cn/post/7362528152777130025)
\[Série Imitation Douyin] Quatre :[Mise en cache des routes conditionnelles Vue, tout comme les sites d'information traditionnels](https://juejin.cn/post/7365334891473240101)\[Série Imitation Douyin] Quatre :[Les actions Github déploient des pages, synchronisent avec Gitee, traduisent README, emballent l'image Docker](https://juejin.cn/post/7365757742381957161)
\[Série Imitation Douyin] Quatre :[Mise en cache des routes conditionnelles Vue, tout comme les sites d'information traditionnels](https://juejin.cn/post/7365334891473240101)
\[Série Imitation Douyin] Cinq :[Les actions Github déploient des pages, synchronisent avec Gitee, traduisent README, emballent l'image Docker](https://juejin.cn/post/7365757742381957161)
## courir
@ -113,7 +114,7 @@ Le contenu ci-dessus est toute l'information publique sur Internet
Le projet en est actuellement aux premiers stades de développement et de nouvelles fonctionnalités sont ajoutées continuellement. Si vous avez des fonctionnalités ou des suggestions pour le logiciel, n'hésitez pas à nous contacter.`Issues`élevé dans
Si vous aimez également les idées de conception de ce logiciel, veuillez le soumettre`PR`, Merci beaucoup pour votre soutient!
## 联系我
## Contactez moi
Vous pouvez contacter mon email<a href="mailto:zyronon@163.com">zyronon@163.com</a>

View File

@ -4,7 +4,7 @@
<p align="center">
<a href="README.en.md">English</a> | <a href="README.es.md">Spanish</a> | <a href="README.de.md">German</a> |
<a href="README.fr.md">French</a> | <a href="README.md">简体中文</a> | <a href="README.ja.md">日本語</a>
<a href="README.fr.md">French</a> | <a href="../README.md">简体中文</a> | <a href="README.ja.md">日本語</a>
</p>
<p align="center">
@ -29,7 +29,7 @@
[//]: # "注意Gitee Pages现在无法更新代码不是最新的。如果你能翻墙推荐访问下面地址 "
Github ページ:[hっtps://dy。ってんたう。とp/](https://dy.ttentau.top/)
Github ページ:[https://dy.ttentau.top/](https://dy.ttentau.top/)
[//]: # "Gitee pages: [https://dy.ttentau.top/](https://dy.ttentau.top/) (中国地区推荐访问这个地址) "
@ -48,11 +48,12 @@ Github ページ:[hっtps://dy。ってんたう。とp/](
## リンク
【模倣同音シリーズ】 1:[Swiper.js に似たカルーセル コンポーネントを実装するための 200 行のコード](https://juejin.cn/post/7360512664317018146)
【模倣同音シリーズ】2:[Douyinで「無限スライドビデオ」効果を実現](https://juejin.cn/post/7361614921519054883)
【模倣同音シリーズ】その3:[Vue ルーティングの使用とトランジション アニメーションの追加の概要](https://juejin.cn/post/7362528152777130025)
【模仿抖音系列】四:[従来のニュースサイトと同様に、Vue の条件付きルート キャッシュ](https://juejin.cn/post/7365334891473240101)【模倣同音シリーズ】 4[Github Actions ページのデプロイ、Gitee への同期、README の翻訳、Docker イメージのパッケージ化](https://juejin.cn/post/7365757742381957161)
【模倣同音シリーズ】 2[Douyinで「無限スライドビデオ」効果を実現](https://juejin.cn/post/7361614921519054883)
【模倣同音シリーズ】 3[Vue ルーティングの使用とトランジション アニメーションの追加の概要](https://juejin.cn/post/7362528152777130025)
【模倣同音シリーズ】 4[従来のニュースサイトと同様に、Vue の条件付きルート キャッシュ](https://juejin.cn/post/7365334891473240101)
【模倣同音シリーズ】 5[Github Actions ページのデプロイ、Gitee への同期、README の翻訳、Docker イメージのパッケージ化](https://juejin.cn/post/7365757742381957161)
## 走る
## 実行
注: このプロジェクトは研究と研究のみに適しており、商業利用には適していません。
@ -82,27 +83,27 @@ npm install
npm run dev
```
ブラウザを開いて、以下にアクセスしてください。[hっtp://127。0。0。1:3000](http://127.0.0.1:3000)
ブラウザを開いて、以下にアクセスしてください。[http://127.0.0.1:3000](http://127.0.0.1:3000)
**注: ブラウザをモバイル モードに切り替える必要があります。最初に を押します。`F12`コンソールを表示するには、 を押します。`Ctrl+Shift+M`通常にプレビューする**
**注: ブラウザをモバイル モードに切り替える必要があります。最初に を押します。`F12`コンソールを表示するには、`Ctrl+Shift+M` を押します。通常にプレビューする**
## データソース
このビデオは以下のDouyinの有名人からのものです
- `我是香秀 🐂🍺`[hっtps://v。どうyいん。こm/いYらぱ2L/](https://v.douyin.com/iYRAPA2L/)
- `杨老虎 🐯(磕穿下巴掉牙版)`[hっtps://v。どうyいん。こm/いYら56で/](https://v.douyin.com/iYRA56de/)
- `条子`[hっtps://v。どうyいん。こm/いYらあqjr/](https://v.douyin.com/iYRAaqjr/)
- `达莎 Digi`[hっtps://v。どうyいん。こm/いYら6rwT/](https://v.douyin.com/iYRA6rwT/)
- `小橙子`[hっtps://v。どうyいん。こm/いYらぬdw/](https://v.douyin.com/iYRAnudw/)
- `南恬`[hっtps://v。どうyいん。こm/いYらbKm3/](https://v.douyin.com/iYRAbKm3/)
- `小霸宠牛排 🥩`[hっtps://v。どうyいん。こm/いYRそsVB/](https://v.douyin.com/iYRSosVB/)
- `奶茶妹 ◕🌱`[hっtps://v。どうyいん。こm/いYらCKhP/](https://v.douyin.com/iYRACKhP/)
- `我才是岚岚`[hっtps://v。どうyいん。こm/いYらQM1C/](https://v.douyin.com/iYRAQM1C/)
- `周憬艺 ziran`[hっtps://v。どうyいん。こm/いYらQs4h/](https://v.douyin.com/iYRAQs4h/)
- `刘思瑶 nice`[hっtps://v。どうyいん。こm/いYらあえRん/](https://v.douyin.com/iYRAaERn/)
- `彭十六 elf`[hっtps://v。どうyいん。こm/いYらHrVG/](https://v.douyin.com/iYRAHrVG/)
- `李子柒`[hっtps://v。どうyいん。こm/いYら5B88/](https://v.douyin.com/iYRA5B88/)
- `我是香秀 🐂🍺`: [https://v.douyin.com/iYRAPA2L/](https://v.douyin.com/iYRAPA2L/)
- `杨老虎 🐯(磕穿下巴掉牙版)`: [https://v.douyin.com/iYRA56de/](https://v.douyin.com/iYRA56de/)
- `条子`: [https://v.douyin.com/iYRAaqjr/](https://v.douyin.com/iYRAaqjr/)
- `达莎 Digi`[https://v.douyin.com/iYRA6rwT/](https://v.douyin.com/iYRA6rwT/)
- `小橙子`: [https://v.douyin.com/iYRAnudw/](https://v.douyin.com/iYRAnudw/)
- `南恬`: [https://v.douyin.com/iYRAbKm3/](https://v.douyin.com/iYRAbKm3/)
- `小霸宠牛排 🥩`[https://v.douyin.com/iYRSosVB/](https://v.douyin.com/iYRSosVB/)
- `奶茶妹 ◕🌱`: [https://v.douyin.com/iYRACKhP/](https://v.douyin.com/iYRACKhP/)
- `我才是岚岚`: [https://v.douyin.com/iYRAQM1C/](https://v.douyin.com/iYRAQM1C/)
- `周憬艺 ziran`: [https://v.douyin.com/iYRAQs4h/](https://v.douyin.com/iYRAQs4h/)
- `刘思瑶 nice`: [https://v.douyin.com/iYRAaERn/](https://v.douyin.com/iYRAaERn/)
- `彭十六 elf`: [https://v.douyin.com/iYRAHrVG/](https://v.douyin.com/iYRAHrVG/)
- `李子柒`: [https://v.douyin.com/iYRA5B88/](https://v.douyin.com/iYRA5B88/)
小紅書公文書からの写真
@ -110,12 +111,12 @@ npm run dev
## 特徴と提案
プロジェクトは現在開発の初期段階にあり、新しい機能が継続的に追加されています。ソフトウェアに関する機能や提案がありましたら、お気軽にお問い合わせください。`Issues`で育ちました
このソフトウェアのデザインアイデアも気に入っていただけましたら、ぜひ送信してください`PR`、 ご支援ありがとうございました!
プロジェクトは現在開発の初期段階にあり、ソフトウェアの新機能や提案があれば、お気軽にお問い合わせください。`Issues`で育ちました
このソフトウェアのデザインアイデアも気に入っていただけましたら、ぜひ `PR`送信してください、 ご支援ありがとうございました!
## 私に連絡して
私のメールアドレスにご連絡いただけます<a href="mailto:zyronon@163.com">zyろのん@163。こm</a>
私のメールアドレスにご連絡いただけます<a href="mailto:zyronon@163.com">zyronon@163.com</a>
> 私の他のオープンソース プロジェクトを共有してください:
>

View File

@ -1,52 +0,0 @@
---
theme: cyanosis
highlight: vs2015
---
# 前言
---
这是我的 [**模仿抖音**](https://juejin.cn/column/7357362143396118528) 系列文章的第四篇:这篇我们将实现页面缓存,就像我们访问传统新闻网站一样
> 第一篇:[200行代码实现类似Swiper.js的轮播组件](https://juejin.cn/post/7360512664317018146)
> 第二篇:[实现抖音 “视频无限滑动“效果](https://juejin.cn/post/7361614921519054883)
> 第三篇:[Vue 路由使用介绍以及添加转场动画](https://juejin.cn/post/7362528152777130025)
# 最终效果
在线预览:[dy.ttentau.top/](https://dy.ttentau.top/)
Github地址[https://github.com/zyronon/douyin](https://github.com/zyronon/douyin)
路由定义源码:[routes.ts](https://github.com/zyronon/douyin/blob/master/src/router/index.ts)
# 实现
## 原理
KeepAlive
组件介绍:[https://cn.vuejs.org/guide/built-ins/keep-alive.html](https://cn.vuejs.org/guide/built-ins/keep-alive.html)
我们知道 `Vue` 内置的 `<KeepAlive>` 组件可以缓存组件,只需要像下面这样写就可以缓存所有组件了
```vue
<router-view v-slot="{ Component }">
<keep-alive>
<component :is="Component" />
</keep-alive>
</router-view>
```
可是,这样写所有组件都会被缓存,这显然不是我们希望看到的效果。
我们想要的效果是什么?就像 `jQuery` 时代的网站(例如:[`www.v2ex.com`](https://www.v2ex.com)
)一样,点击一个链接,前进到下一页,浏览完成之后,返回上一页,当前页面被丢弃。再次访问的话需要重新加载
> 吐槽:找了一圈国内的知名网站,点击链接全是单独打开一个标签页,根本没有在当前页跳转的了!
>
> 有喜欢逛 v2ex 的朋友可以试试我开发的这个油猴脚本:[V2Next](https://greasyfork.org/zh-CN/scripts/458024)
> 有UI美化、楼中楼、回复上下文、高赞回复、简洁模式、发送图片和表情 emoji、base64 解码等功能现在每天都1800个 v 友在使用!
大多数情况下,用户进入一个页面,这个页面会请求数据。用户浏览完毕退出页面。如果再次进入,页面就像新开的一样,重新开始请求数据,这是符合用户预期的
而不是像现在这样,不管重新进入多少次,页面都是一开始进入的样子,这时用户可能会怀疑自己是否断网了?我们总不能在每次页面都写 `onActivated`
`onDeactivated` 方法吧!

View File

@ -1,392 +1,346 @@
lockfileVersion: '6.0'
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
axios:
specifier: ^1.6.7
version: 1.6.7
nanoid:
specifier: ^5.0.6
version: 5.0.6
request:
specifier: ^2.88.2
version: 2.88.2
importers:
.:
dependencies:
axios:
specifier: ^1.6.7
version: 1.7.4
nanoid:
specifier: ^5.0.6
version: 5.0.6
request:
specifier: ^2.88.2
version: 2.88.2
packages:
/ajv@6.12.6:
resolution:
{
integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==,
}
ajv@6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
asn1@0.2.6:
resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==}
assert-plus@1.0.0:
resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==}
engines: {node: '>=0.8'}
asynckit@0.4.0:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
aws-sign2@0.7.0:
resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==}
aws4@1.12.0:
resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==}
axios@1.7.4:
resolution: {integrity: sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==}
bcrypt-pbkdf@1.0.2:
resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==}
caseless@0.12.0:
resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==}
combined-stream@1.0.8:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
core-util-is@1.0.2:
resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==}
dashdash@1.14.1:
resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==}
engines: {node: '>=0.10'}
delayed-stream@1.0.0:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
ecc-jsbn@0.1.2:
resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==}
extend@3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
extsprintf@1.3.0:
resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==}
engines: {'0': node >=0.6.0}
fast-deep-equal@3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
fast-json-stable-stringify@2.1.0:
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
follow-redirects@1.15.6:
resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==}
engines: {node: '>=4.0'}
peerDependencies:
debug: '*'
peerDependenciesMeta:
debug:
optional: true
forever-agent@0.6.1:
resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==}
form-data@2.3.3:
resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==}
engines: {node: '>= 0.12'}
form-data@4.0.0:
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
engines: {node: '>= 6'}
getpass@0.1.7:
resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==}
har-schema@2.0.0:
resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==}
engines: {node: '>=4'}
har-validator@5.1.5:
resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==}
engines: {node: '>=6'}
deprecated: this library is no longer supported
http-signature@1.2.0:
resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==}
engines: {node: '>=0.8', npm: '>=1.3.7'}
is-typedarray@1.0.0:
resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==}
isstream@0.1.2:
resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==}
jsbn@0.1.1:
resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==}
json-schema-traverse@0.4.1:
resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
json-schema@0.4.0:
resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==}
json-stringify-safe@5.0.1:
resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==}
jsprim@1.4.2:
resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==}
engines: {node: '>=0.6.0'}
mime-db@1.52.0:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
engines: {node: '>= 0.6'}
mime-types@2.1.35:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
nanoid@5.0.6:
resolution: {integrity: sha512-rRq0eMHoGZxlvaFOUdK1Ev83Bd1IgzzR+WJ3IbDJ7QOSdAxYjlurSPqFs9s4lJg29RT6nPwizFtJhQS6V5xgiA==}
engines: {node: ^18 || >=20}
hasBin: true
oauth-sign@0.9.0:
resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==}
performance-now@2.1.0:
resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
proxy-from-env@1.1.0:
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
psl@1.9.0:
resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==}
punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
qs@6.5.3:
resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==}
engines: {node: '>=0.6'}
request@2.88.2:
resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==}
engines: {node: '>= 6'}
deprecated: request has been deprecated, see https://github.com/request/request/issues/3142
safe-buffer@5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
safer-buffer@2.1.2:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
sshpk@1.18.0:
resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==}
engines: {node: '>=0.10.0'}
hasBin: true
tough-cookie@2.5.0:
resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==}
engines: {node: '>=0.8'}
tunnel-agent@0.6.0:
resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}
tweetnacl@0.14.5:
resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==}
uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
uuid@3.4.0:
resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==}
deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
hasBin: true
verror@1.10.0:
resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==}
engines: {'0': node >=0.6.0}
snapshots:
ajv@6.12.6:
dependencies:
fast-deep-equal: 3.1.3
fast-json-stable-stringify: 2.1.0
json-schema-traverse: 0.4.1
uri-js: 4.4.1
dev: false
/asn1@0.2.6:
resolution:
{
integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==,
}
asn1@0.2.6:
dependencies:
safer-buffer: 2.1.2
dev: false
/assert-plus@1.0.0:
resolution:
{
integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==,
}
engines: { node: '>=0.8' }
dev: false
assert-plus@1.0.0: {}
/asynckit@0.4.0:
resolution:
{
integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==,
}
dev: false
asynckit@0.4.0: {}
/aws-sign2@0.7.0:
resolution:
{
integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==,
}
dev: false
aws-sign2@0.7.0: {}
/aws4@1.12.0:
resolution:
{
integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==,
}
dev: false
aws4@1.12.0: {}
/axios@1.6.7:
resolution:
{
integrity: sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==,
}
axios@1.7.4:
dependencies:
follow-redirects: 1.15.6
form-data: 4.0.0
proxy-from-env: 1.1.0
transitivePeerDependencies:
- debug
dev: false
/bcrypt-pbkdf@1.0.2:
resolution:
{
integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==,
}
bcrypt-pbkdf@1.0.2:
dependencies:
tweetnacl: 0.14.5
dev: false
/caseless@0.12.0:
resolution:
{
integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==,
}
dev: false
caseless@0.12.0: {}
/combined-stream@1.0.8:
resolution:
{
integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==,
}
engines: { node: '>= 0.8' }
combined-stream@1.0.8:
dependencies:
delayed-stream: 1.0.0
dev: false
/core-util-is@1.0.2:
resolution:
{
integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==,
}
dev: false
core-util-is@1.0.2: {}
/dashdash@1.14.1:
resolution:
{
integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==,
}
engines: { node: '>=0.10' }
dashdash@1.14.1:
dependencies:
assert-plus: 1.0.0
dev: false
/delayed-stream@1.0.0:
resolution:
{
integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==,
}
engines: { node: '>=0.4.0' }
dev: false
delayed-stream@1.0.0: {}
/ecc-jsbn@0.1.2:
resolution:
{
integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==,
}
ecc-jsbn@0.1.2:
dependencies:
jsbn: 0.1.1
safer-buffer: 2.1.2
dev: false
/extend@3.0.2:
resolution:
{
integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==,
}
dev: false
extend@3.0.2: {}
/extsprintf@1.3.0:
resolution:
{
integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==,
}
engines: { '0': node >=0.6.0 }
dev: false
extsprintf@1.3.0: {}
/fast-deep-equal@3.1.3:
resolution:
{
integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==,
}
dev: false
fast-deep-equal@3.1.3: {}
/fast-json-stable-stringify@2.1.0:
resolution:
{
integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==,
}
dev: false
fast-json-stable-stringify@2.1.0: {}
/follow-redirects@1.15.6:
resolution:
{
integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==,
}
engines: { node: '>=4.0' }
peerDependencies:
debug: '*'
peerDependenciesMeta:
debug:
optional: true
dev: false
follow-redirects@1.15.6: {}
/forever-agent@0.6.1:
resolution:
{
integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==,
}
dev: false
forever-agent@0.6.1: {}
/form-data@2.3.3:
resolution:
{
integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==,
}
engines: { node: '>= 0.12' }
form-data@2.3.3:
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
mime-types: 2.1.35
dev: false
/form-data@4.0.0:
resolution:
{
integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==,
}
engines: { node: '>= 6' }
form-data@4.0.0:
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
mime-types: 2.1.35
dev: false
/getpass@0.1.7:
resolution:
{
integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==,
}
getpass@0.1.7:
dependencies:
assert-plus: 1.0.0
dev: false
/har-schema@2.0.0:
resolution:
{
integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==,
}
engines: { node: '>=4' }
dev: false
har-schema@2.0.0: {}
/har-validator@5.1.5:
resolution:
{
integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==,
}
engines: { node: '>=6' }
deprecated: this library is no longer supported
har-validator@5.1.5:
dependencies:
ajv: 6.12.6
har-schema: 2.0.0
dev: false
/http-signature@1.2.0:
resolution:
{
integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==,
}
engines: { node: '>=0.8', npm: '>=1.3.7' }
http-signature@1.2.0:
dependencies:
assert-plus: 1.0.0
jsprim: 1.4.2
sshpk: 1.18.0
dev: false
/is-typedarray@1.0.0:
resolution:
{
integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==,
}
dev: false
is-typedarray@1.0.0: {}
/isstream@0.1.2:
resolution:
{
integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==,
}
dev: false
isstream@0.1.2: {}
/jsbn@0.1.1:
resolution:
{
integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==,
}
dev: false
jsbn@0.1.1: {}
/json-schema-traverse@0.4.1:
resolution:
{
integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==,
}
dev: false
json-schema-traverse@0.4.1: {}
/json-schema@0.4.0:
resolution:
{
integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==,
}
dev: false
json-schema@0.4.0: {}
/json-stringify-safe@5.0.1:
resolution:
{
integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==,
}
dev: false
json-stringify-safe@5.0.1: {}
/jsprim@1.4.2:
resolution:
{
integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==,
}
engines: { node: '>=0.6.0' }
jsprim@1.4.2:
dependencies:
assert-plus: 1.0.0
extsprintf: 1.3.0
json-schema: 0.4.0
verror: 1.10.0
dev: false
/mime-db@1.52.0:
resolution:
{
integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==,
}
engines: { node: '>= 0.6' }
dev: false
mime-db@1.52.0: {}
/mime-types@2.1.35:
resolution:
{
integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==,
}
engines: { node: '>= 0.6' }
mime-types@2.1.35:
dependencies:
mime-db: 1.52.0
dev: false
/nanoid@5.0.6:
resolution:
{
integrity: sha512-rRq0eMHoGZxlvaFOUdK1Ev83Bd1IgzzR+WJ3IbDJ7QOSdAxYjlurSPqFs9s4lJg29RT6nPwizFtJhQS6V5xgiA==,
}
engines: { node: ^18 || >=20 }
hasBin: true
dev: false
nanoid@5.0.6: {}
/oauth-sign@0.9.0:
resolution:
{
integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==,
}
dev: false
oauth-sign@0.9.0: {}
/performance-now@2.1.0:
resolution:
{
integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==,
}
dev: false
performance-now@2.1.0: {}
/proxy-from-env@1.1.0:
resolution:
{
integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==,
}
dev: false
proxy-from-env@1.1.0: {}
/psl@1.9.0:
resolution:
{
integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==,
}
dev: false
psl@1.9.0: {}
/punycode@2.3.1:
resolution:
{
integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==,
}
engines: { node: '>=6' }
dev: false
punycode@2.3.1: {}
/qs@6.5.3:
resolution:
{
integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==,
}
engines: { node: '>=0.6' }
dev: false
qs@6.5.3: {}
/request@2.88.2:
resolution:
{
integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==,
}
engines: { node: '>= 6' }
deprecated: request has been deprecated, see https://github.com/request/request/issues/3142
request@2.88.2:
dependencies:
aws-sign2: 0.7.0
aws4: 1.12.0
@ -408,29 +362,12 @@ packages:
tough-cookie: 2.5.0
tunnel-agent: 0.6.0
uuid: 3.4.0
dev: false
/safe-buffer@5.2.1:
resolution:
{
integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==,
}
dev: false
safe-buffer@5.2.1: {}
/safer-buffer@2.1.2:
resolution:
{
integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==,
}
dev: false
safer-buffer@2.1.2: {}
/sshpk@1.18.0:
resolution:
{
integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==,
}
engines: { node: '>=0.10.0' }
hasBin: true
sshpk@1.18.0:
dependencies:
asn1: 0.2.6
assert-plus: 1.0.0
@ -441,61 +378,26 @@ packages:
jsbn: 0.1.1
safer-buffer: 2.1.2
tweetnacl: 0.14.5
dev: false
/tough-cookie@2.5.0:
resolution:
{
integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==,
}
engines: { node: '>=0.8' }
tough-cookie@2.5.0:
dependencies:
psl: 1.9.0
punycode: 2.3.1
dev: false
/tunnel-agent@0.6.0:
resolution:
{
integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==,
}
tunnel-agent@0.6.0:
dependencies:
safe-buffer: 5.2.1
dev: false
/tweetnacl@0.14.5:
resolution:
{
integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==,
}
dev: false
tweetnacl@0.14.5: {}
/uri-js@4.4.1:
resolution:
{
integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==,
}
uri-js@4.4.1:
dependencies:
punycode: 2.3.1
dev: false
/uuid@3.4.0:
resolution:
{
integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==,
}
deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
hasBin: true
dev: false
uuid@3.4.0: {}
/verror@1.10.0:
resolution:
{
integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==,
}
engines: { '0': node >=0.6.0 }
verror@1.10.0:
dependencies:
assert-plus: 1.0.0
core-util-is: 1.0.2
extsprintf: 1.3.0
dev: false

View File

@ -57,7 +57,7 @@
"rollup-plugin-visualizer": "^5.9.2",
"typescript": "5.3.3",
"unplugin-vue-macros": "^2.9.1",
"vite": "^5.2.0",
"vite": "^5.2.14",
"vite-plugin-cdn-import": "0.3.5",
"vue-tsc": "^2.0.6"
},

File diff suppressed because it is too large Load Diff

View File

@ -53,18 +53,19 @@ watch(
}
)
function setVh() {
function resetVhAndPx() {
let vh = window.innerHeight * 0.01
document.documentElement.style.setProperty('--vh', `${vh}px`)
//document.documentElement.style.fontSize = document.documentElement.clientWidth / 375 + 'px'
}
onMounted(() => {
store.init()
setVh()
resetVhAndPx()
// resize 1vh
window.addEventListener('resize', () => {
location.href = BASE_URL + '/'
setVh()
resetVhAndPx()
})
})
</script>

View File

@ -79,8 +79,8 @@ watch(
() => props.list,
(newVal, oldVal) => {
// console.log('watch-list', newVal.length, oldVal.length, newVal)
//
if (newVal.length < oldVal.length) {
//
if (newVal.length <= oldVal.length) {
insertContent()
} else {
//
@ -112,10 +112,45 @@ watch(
watch(
() => props.index,
(newVal, oldVal) => {
(newVal) => {
state.localIndex = newVal
// console.log('watch-index', newVal, oldVal)
if (!props.list.length) return
if (!props?.list?.length) return
//
if (
slideListEl.value &&
slideListEl.value?.innerHTML &&
state.localIndex < props?.list?.length
) {
let startIndex = slideListEl.value
.querySelector(`.${itemClassName}:first-child`)
.getAttribute('data-index')
let endIndex = slideListEl.value
.querySelector(`.${itemClassName}:last-child`)
.getAttribute('data-index')
if (
state.localIndex >= (startIndex as any) * 1 &&
state.localIndex <= (endIndex as any) * 1
) {
//
touchEnd({})
} else {
//
insertContent()
}
}
}
)
/**
* 滑动
*/
watch(
() => state.localIndex,
(newVal, oldVal) => {
bus.emit(EVENT_KEY.CURRENT_ITEM, props.list[newVal])
bus.emit(EVENT_KEY.SINGLE_CLICK_BROADCAST, {
uniqueId: props.uniqueId,
@ -131,7 +166,6 @@ watch(
}, 200)
}
)
watch(
() => props.active,
(newVal) => {
@ -166,7 +200,7 @@ function insertContent() {
if (!props.list.length) return
//SlideList
slideListEl.value.innerHTML = ''
let half = (props.virtualTotal - 1) / 2
let half = parseInt((props.virtualTotal / 2).toString()) //
// props.virtualTotal domindex0
let start = 0
if (state.localIndex > half) {
@ -272,7 +306,7 @@ function touchEnd(e) {
emit('refresh')
}
slideTouchEnd(e, state, canNext, (isNext) => {
let half = (props.virtualTotal - 1) / 2
let half = parseInt((props.virtualTotal / 2).toString()) //
if (props.list.length > props.virtualTotal) {
//()
if (isNext) {