|
@@ -226,13 +226,23 @@ const props = defineProps<{
|
|
|
}>();
|
|
|
function changeAnimateAutoPlay(value,item) {
|
|
|
if(value){
|
|
|
- if(props.pen.animations.length === 1)return
|
|
|
+ props.pen.autoPlay = true;
|
|
|
+ if(props.pen.animations.length === 1){
|
|
|
+ item.autoPlay = true
|
|
|
+ return
|
|
|
+ }
|
|
|
props.pen.animations.forEach(i=>{
|
|
|
if(i.name !== item.name){
|
|
|
i.autoPlay = false
|
|
|
}
|
|
|
})
|
|
|
item.autoPlay = true
|
|
|
+ }else {
|
|
|
+ let allFalse = props.pen.animations.every(i=>!i.autoPlay);
|
|
|
+ if(allFalse) {
|
|
|
+ props.pen.autoPlay = false
|
|
|
+ props.pen.frames = null
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
const penTree: any = ref([]);
|