mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Made the animation working again :)
This commit is contained in:
parent
2faaf3941c
commit
d9c6cec16e
3 changed files with 29 additions and 12 deletions
|
@ -33,12 +33,21 @@ const {
|
|||
|
||||
const orgNameAnimation = ref(null);
|
||||
|
||||
onMounted(() => {
|
||||
gsap.to(orgNameAnimation.value, {
|
||||
duration: 1,
|
||||
scrambleText: fetchNewsOrgInfo.value?.title,
|
||||
});
|
||||
});
|
||||
watch(
|
||||
() => fetchNewsOrgInfo.value,
|
||||
(newValue) => {
|
||||
if (newValue?.title) {
|
||||
nextTick(() => {
|
||||
gsap.to(orgNameAnimation.value, {
|
||||
duration: 1,
|
||||
scrambleText: newValue.title,
|
||||
ease: "none",
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
|
@ -52,7 +61,10 @@ onMounted(() => {
|
|||
draggable="false"
|
||||
/>
|
||||
<div class="flex flex-col gap-3 text-left">
|
||||
<h1 class="text-4xl font-bold m-3 text-left">
|
||||
<h1
|
||||
class="text-4xl font-bold m-3 text-left"
|
||||
ref="orgNameAnimation"
|
||||
>
|
||||
{{ fetchNewsOrgInfo?.title }}
|
||||
</h1>
|
||||
<span class="text-ms m-1 mt-5 text-left text-wrap">{{
|
||||
|
|
|
@ -28,9 +28,9 @@ const {
|
|||
lang: locale,
|
||||
},
|
||||
});
|
||||
if (error) {
|
||||
if (error === null) {
|
||||
eerrrroorr.value = true;
|
||||
errorMsg.value = error.value.message;
|
||||
errorMsg.value = error.value;
|
||||
}
|
||||
|
||||
async function getImageSource(image: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue