路由配置优化及页面元信息添加
This commit is contained in:
+11
-2
@@ -111,6 +111,15 @@ import tao from "@/assets/images/树枝桃.png";
|
||||
import denglong from "@/assets/images/灯笼.png";
|
||||
import { throttle } from 'es-toolkit';
|
||||
import { nextTick, onMounted, onUnmounted, ref } from 'vue';
|
||||
|
||||
definePage({
|
||||
name:'gallery',
|
||||
meta: {
|
||||
title: '画廊',
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// 画廊页逻辑
|
||||
const tid = ref('share');
|
||||
const fileList = ref<any[]>([]);
|
||||
@@ -195,12 +204,12 @@ function getImageSizeByCheck(url: string): any {
|
||||
image.src = url;
|
||||
let height = 0
|
||||
let width = 0
|
||||
let timer = setInterval(() => {
|
||||
let timer = setTimeout(() => {
|
||||
if (image.width > 0 && image.height > 0) {
|
||||
height = image.height
|
||||
width = image.width
|
||||
resolve({ height, width })
|
||||
clearInterval(timer)
|
||||
clearTimeout(timer)
|
||||
}
|
||||
}, 40)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user