|
@@ -16,6 +16,8 @@
|
|
|
class="mr-8"
|
|
|
style="max-width: 60px"
|
|
|
@change="changeAnimateName($event, item)"
|
|
|
+ @blur="checkAnimateName(item)"
|
|
|
+ @focus="bakAnimateName(item.name)"
|
|
|
/>
|
|
|
<t-icon
|
|
|
v-if="isPlaying === i"
|
|
@@ -233,6 +235,7 @@ import { MessagePlugin } from 'tdesign-vue-next';
|
|
|
const props = defineProps<{
|
|
|
pen: any;
|
|
|
}>();
|
|
|
+let animateNameBak = '';
|
|
|
function changeAnimateAutoPlay(value, item) {
|
|
|
if (value) {
|
|
|
props.pen.autoPlay = true;
|
|
@@ -254,7 +257,15 @@ function changeAnimateAutoPlay(value, item) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+const checkAnimateName = (item:any) => {
|
|
|
+ if(!item.name) {
|
|
|
+ MessagePlugin.warning('动画名不能为空!');
|
|
|
+ item.name = animateNameBak;
|
|
|
+ }
|
|
|
+}
|
|
|
+const bakAnimateName = (name:string) => {
|
|
|
+ animateNameBak = name;
|
|
|
+}
|
|
|
const changeAnimateName = (event, item) => {
|
|
|
let result = props.pen.animations.filter(
|
|
|
(animation) => animation.name === event
|