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 = {