diff --git a/package.json b/package.json
index 255abec..f906745 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,8 @@
"qrcode": "^1.5.4",
"vite-plugin-vue-devtools": "^8.0.1",
"vue": "^3.5.18",
- "vue-router": "^4.5.1"
+ "vue-router": "^4.5.1",
+ "vue-virtual-scroller": "2.0.0-beta.8"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index bf86dcb..4cc9195 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -38,6 +38,9 @@ importers:
vue-router:
specifier: ^4.5.1
version: 4.5.1(vue@3.5.20)
+ vue-virtual-scroller:
+ specifier: 2.0.0-beta.8
+ version: 2.0.0-beta.8(vue@3.5.20)
devDependencies:
'@vitejs/plugin-vue':
specifier: ^6.0.1
@@ -852,6 +855,9 @@ packages:
memoize-one@6.0.0:
resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
+ mitt@2.1.0:
+ resolution: {integrity: sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==}
+
mitt@3.0.1:
resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==}
@@ -1120,11 +1126,26 @@ packages:
'@vue/composition-api':
optional: true
+ vue-observe-visibility@2.0.0-alpha.1:
+ resolution: {integrity: sha512-flFbp/gs9pZniXR6fans8smv1kDScJ8RS7rEpMjhVabiKeq7Qz3D9+eGsypncjfIyyU84saU88XZ0zjbD6Gq/g==}
+ peerDependencies:
+ vue: ^3.0.0
+
+ vue-resize@2.0.0-alpha.1:
+ resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==}
+ peerDependencies:
+ vue: ^3.0.0
+
vue-router@4.5.1:
resolution: {integrity: sha512-ogAF3P97NPm8fJsE4by9dwSYtDwXIY1nFY9T6DyQnGHd1E2Da94w9JIolpe42LJGIl0DwOHBi8TcRPlPGwbTtw==}
peerDependencies:
vue: ^3.2.0
+ vue-virtual-scroller@2.0.0-beta.8:
+ resolution: {integrity: sha512-b8/f5NQ5nIEBRTNi6GcPItE4s7kxNHw2AIHLtDp+2QvqdTjVN0FgONwX9cr53jWRgnu+HRLPaWDOR2JPI5MTfQ==}
+ peerDependencies:
+ vue: ^3.2.0
+
vue@3.5.20:
resolution: {integrity: sha512-2sBz0x/wis5TkF1XZ2vH25zWq3G1bFEPOfkBcx2ikowmphoQsPH6X0V3mmPCXA2K1N/XGTnifVyDQP4GfDDeQw==}
peerDependencies:
@@ -1943,6 +1964,8 @@ snapshots:
memoize-one@6.0.0: {}
+ mitt@2.1.0: {}
+
mitt@3.0.1: {}
mrmime@2.0.1: {}
@@ -2180,11 +2203,26 @@ snapshots:
dependencies:
vue: 3.5.20
+ vue-observe-visibility@2.0.0-alpha.1(vue@3.5.20):
+ dependencies:
+ vue: 3.5.20
+
+ vue-resize@2.0.0-alpha.1(vue@3.5.20):
+ dependencies:
+ vue: 3.5.20
+
vue-router@4.5.1(vue@3.5.20):
dependencies:
'@vue/devtools-api': 6.6.4
vue: 3.5.20
+ vue-virtual-scroller@2.0.0-beta.8(vue@3.5.20):
+ dependencies:
+ mitt: 2.1.0
+ vue: 3.5.20
+ vue-observe-visibility: 2.0.0-alpha.1(vue@3.5.20)
+ vue-resize: 2.0.0-alpha.1(vue@3.5.20)
+
vue@3.5.20:
dependencies:
'@vue/compiler-dom': 3.5.20
diff --git a/src/assets/main.css b/src/assets/main.css
index 56c1134..dc91559 100644
--- a/src/assets/main.css
+++ b/src/assets/main.css
@@ -35,3 +35,13 @@
justify-content: center;
align-items: center;
}
+
+.vue-recycle-scroller__item-wrapper {
+ width: 100%;
+ display: flex;
+ flex-flow: wrap;
+}
+.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view {
+ width: 42vw !important;
+ position: relative !important;
+}
\ No newline at end of file
diff --git a/src/components/HomePage.vue b/src/components/HomePage.vue
index 25a659d..e962ea0 100644
--- a/src/components/HomePage.vue
+++ b/src/components/HomePage.vue
@@ -14,11 +14,8 @@ defineProps({
const isMusicOn = ref(false);
const audioElement = ref(null);
onMounted(() => {
- // 创建音频
audioElement.value = new Audio(faceFamily);
- // 尝试自动播放
tryAutoPlay();
- //TODO 判断登录之后获取浏览器参数fromid, mergeid
})
// 尝试自动播放
@@ -81,12 +78,12 @@ const navigateSelectTemplatePage = () => {
const isMyPhotoVisible = ref(false);
const isPhotoSquareVisible = ref(false);
-
-const activeTab = ref('my-photo')
-
-const showMyPhoto = () => { activeTab.value = 'my-photo', isMyPhotoVisible.value = true; }
+const showMyPhoto = () => {
+ isMyPhotoVisible.value = true;
+ isPhotoSquareVisible.value = false;
+}
const showPhotoSquare=()=>{
- activeTab.value='photo-square',
+ isMyPhotoVisible.value = false;
isPhotoSquareVisible.value = true;
}
@@ -133,8 +130,8 @@ const showPhotoSquare=()=>{
-
-
+
+