|
@@ -18,7 +18,7 @@
|
|
/>
|
|
/>
|
|
<t-icon
|
|
<t-icon
|
|
v-if="isPlaying === i"
|
|
v-if="isPlaying === i"
|
|
- name="stop-circle-1"
|
|
|
|
|
|
+ name="stop-circle"
|
|
class="hover primary"
|
|
class="hover primary"
|
|
style="font-size: 16px"
|
|
style="font-size: 16px"
|
|
@click="stop"
|
|
@click="stop"
|
|
@@ -44,10 +44,7 @@
|
|
<t-popconfirm
|
|
<t-popconfirm
|
|
content="确认删除该动画吗"
|
|
content="确认删除该动画吗"
|
|
placement="left"
|
|
placement="left"
|
|
- @confirm="
|
|
|
|
- props.pen.animations.splice(i, 1);
|
|
|
|
- animate = undefined;
|
|
|
|
- "
|
|
|
|
|
|
+ @confirm="delAnimate(i)"
|
|
>
|
|
>
|
|
<t-icon name="delete" class="hover" />
|
|
<t-icon name="delete" class="hover" />
|
|
</t-popconfirm>
|
|
</t-popconfirm>
|
|
@@ -435,6 +432,15 @@ const addAnimate = () => {
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const delAnimate = (i: number) => {
|
|
|
|
+ if (isPlaying.value === i) {
|
|
|
|
+ meta2d.stopAnimate(props.pen.id);
|
|
|
|
+ isPlaying.value = undefined;
|
|
|
|
+ }
|
|
|
|
+ props.pen.animations.splice(i, 1);
|
|
|
|
+ animate.value = undefined;
|
|
|
|
+};
|
|
|
|
+
|
|
const changeAnimate = (item: any) => {
|
|
const changeAnimate = (item: any) => {
|
|
const animate: any = animateList.find((elem: any) => {
|
|
const animate: any = animateList.find((elem: any) => {
|
|
return elem.value === item.animate;
|
|
return elem.value === item.animate;
|