You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<template>
<div>
<!--<button @click="startTextAnimation">Text Animation starten</button><div :class="{ 'meine-text-animation': textAnimationActive }">Text Animiertes Element</div>-->
<button @click="items[0].name='Foo'">Change name</button>
<ul>
<liv-for="(item, index) in items" :key="index" :class="{ 'meine-text-animation': textAnimationActive }">
{{ item.name }}
<hr />
{{ item.value }}
</li>
</ul>
</div>
</template>
<script>exportdefault {data() {return { items: [{ name:"Name #1", value:"value-1" }, { name:"Name #2", value:"value-2" }, { name:"Name #3", value:"value-3" }], textAnimationActive:false, boxAnimationActive:false }; }, methods: {startTextAnimation() {this.textAnimationActive=true;setTimeout(() => {this.textAnimationActive=false; }, 280); }, },/* updated() { this.$nextTick(() => { console.log("Updated") //this.startTextAnimation(); }); }*/ watch: { items: {handler(newValue, oldValue) {// Hier wird die Funktion aufgerufen, wenn sich das Array ändertconsole.log('Array wurde geändert', newValue, oldValue);this.startTextAnimation(); }, deep:true, // Damit wird ein "Deep Watch" aktiviert, um auch Änderungen in den Objekten zu überwachen }, },};</script><stylescoped>@keyframestextShadowAnimation {0% {text-shadow: 000transparent;color: #fff; }50% {/*text-shadow: 0px 0px 4px rgb(255, 255, 255);*//*text-shadow: 0 0 8px rgba(var(--bs-primary-rgb), 1);*/color: rgba(var(--bs-primary-rgb), 1) }100% {text-shadow: 000transparent;color: #fff }}.meine-text-animation {animation: textShadowAnimation 0.28sease-out;animation-iteration-count: 1;}hr {margin: 2px;background-color: red;}</style>
When the name changes, the css animation is triggered.
Works, but applies the animation to all items. Only the one that changed should be animated.
This should be enabled/disable via settings under "Look and Feel" section.
The text was updated successfully, but these errors were encountered:
Quick draft:
When the name changes, the css animation is triggered.
Works, but applies the animation to all items. Only the one that changed should be animated.
This should be enabled/disable via settings under "Look and Feel" section.
The text was updated successfully, but these errors were encountered: