From 98c1d50ca59b41cf2810ca8d37adf23f14942a25 Mon Sep 17 00:00:00 2001 From: zoujing Date: Tue, 20 Jan 2026 22:46:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=A4=9A=E8=A1=8C?= =?UTF-8?q?=E5=A4=9A=E5=88=97=E9=9B=AA=E7=A2=A7=E5=9B=BE=E7=9A=84=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Sprite/SpriteAnimator.vue | 112 ++++++++++++++++++ .../components/chat/ChatTopWelcome/index.vue | 37 +++++- 2 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 src/components/Sprite/SpriteAnimator.vue diff --git a/src/components/Sprite/SpriteAnimator.vue b/src/components/Sprite/SpriteAnimator.vue new file mode 100644 index 0000000..8d427b6 --- /dev/null +++ b/src/components/Sprite/SpriteAnimator.vue @@ -0,0 +1,112 @@ + + + + + \ No newline at end of file diff --git a/src/pages/index/components/chat/ChatTopWelcome/index.vue b/src/pages/index/components/chat/ChatTopWelcome/index.vue index 7c03319..c11e73e 100644 --- a/src/pages/index/components/chat/ChatTopWelcome/index.vue +++ b/src/pages/index/components/chat/ChatTopWelcome/index.vue @@ -3,7 +3,17 @@ v - + + {{ welcomeContent }} @@ -18,6 +28,7 @@ v import { defineProps, computed, getCurrentInstance, defineExpose } from "vue"; import { getCurrentConfig } from "@/constant/base"; import ChatMoreTips from "../ChatMoreTips/index.vue"; +import SpriteAnimator from "@/components/Sprite/SpriteAnimator.vue"; const props = defineProps({ mainPageDataModel: { @@ -51,6 +62,30 @@ const initPageImages = computed(() => { const config = getCurrentConfig(); +const spriteStyle = computed(() => { + const images = initPageImages.value; + return { + welcomeImageUrl: 'https://oss.nianxx.cn/mp/static/version_101/zn/zn_large.png', + frameWidth: 395, + frameHeight: 335, + totalFrames: 71, + columns: 1, + displayWidth: 158, + }; +}); + + // "ipLargeImage":"https://oss.nianxx.cn/mp/static/version_101/dh/dh_large.png", + // "ipLargeImageWidth": 395, + // "ipLargeImageHeight": 335, + // "ipLargeTotalFrames": 71, + // "ipLargeColumns": 1, + + // "ipSmallImage":"https://oss.nianxx.cn/mp/static/version_101/dh/dh_small.png", + // "ipSmallImageWidth": 395, + // "ipSmallImageHeight": 335, + // "ipSmallTotalFrames": 71, + // "ipSmallColumns": 1 + const getStyle = computed(() => { const images = initPageImages.value; const style = {