增加多种效果
This commit is contained in:
@@ -72,7 +72,8 @@ const thumbnails = ref({}) // 存储压缩后的 Blob URL
|
||||
let observer = null
|
||||
let imageObserver = null
|
||||
|
||||
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
|
||||
|
||||
// --- 核心优化:浏览器端 Canvas 压缩 ---
|
||||
// 目的:虽然网络流量没变(还是下载了原图),但渲染到 DOM 上的是 resizing 后的 canvas blob,
|
||||
|
||||
@@ -194,7 +194,8 @@ const getCurrentAnimationClass = (index) => {
|
||||
return 'anim-ken-burns-4'
|
||||
}
|
||||
|
||||
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
|
||||
const formatNumber = (num) => num < 10 ? `0${num}` : num
|
||||
const formatDate = (dateStr) => {
|
||||
if(!dateStr) return ''
|
||||
|
||||
@@ -78,7 +78,8 @@ let animationId
|
||||
let photoMeshes = []
|
||||
let particleSystem
|
||||
|
||||
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
|
||||
|
||||
// --- 核心优化:图片压缩与纹理生成 (带 CORS 代理回退) ---
|
||||
const createCompressedTexture = (originalUrl) => {
|
||||
|
||||
@@ -69,7 +69,8 @@ const emit = defineEmits(['loadMore'])
|
||||
const loadTrigger = ref(null)
|
||||
let observer = null
|
||||
|
||||
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
|
||||
|
||||
const formatDate = (dateStr) => {
|
||||
if (!dateStr) return 'Unknown Date'
|
||||
|
||||
@@ -144,7 +144,8 @@ const showToolbar = ref(true)
|
||||
const showSettings = ref(false)
|
||||
let toolbarTimer = null
|
||||
|
||||
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
|
||||
|
||||
const onSlideChange = (swiper) => {
|
||||
currentIndex.value = swiper.activeIndex
|
||||
|
||||
@@ -242,7 +242,8 @@ const loading = ref(true)
|
||||
const viewMode = ref('grid') // 'grid' | 'list' | 'timeline' | 'stack' | 'coverflow'
|
||||
const swiperModules = [EffectCoverflow, EffectCards, Pagination]
|
||||
|
||||
const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
// const getImgUrl = (path) => path ? `http://i.nailaoyun.cn${path}` : ''
|
||||
const getImgUrl = (path) => path ? `/t-oss${path}` : ''
|
||||
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
|
||||
@@ -23,6 +23,11 @@ export default defineConfig({
|
||||
target: 'http://i.nailaoyun.cn/api/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
},
|
||||
'/t-oss': {
|
||||
target: 'http://i.nailaoyun.cn/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/t-oss/, '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user