|
@@ -63,7 +63,8 @@
|
|
import {
|
|
import {
|
|
reactive,
|
|
reactive,
|
|
computed,
|
|
computed,
|
|
- onUnmounted
|
|
|
|
|
|
+ onUnmounted,
|
|
|
|
+ nextTick
|
|
} from 'vue';
|
|
} from 'vue';
|
|
import {
|
|
import {
|
|
getUserIdentity,
|
|
getUserIdentity,
|
|
@@ -125,12 +126,16 @@
|
|
if (code == 'all') {
|
|
if (code == 'all') {
|
|
// 全部清空
|
|
// 全部清空
|
|
data.answer = '';
|
|
data.answer = '';
|
|
- data.result = null;
|
|
|
|
} else {
|
|
} else {
|
|
// 单个清空
|
|
// 单个清空
|
|
- data.answer = data.answer ? data.answer.slice(0, -1) : ''
|
|
|
|
|
|
+ data.answer = data.answer ? data.answer.slice(0, -1) : '';
|
|
|
|
+ }
|
|
|
|
+ // 重置错误状态
|
|
|
|
+ if (!data.answer.length) {
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ data.result = null;
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
function handleSelect(word) {
|
|
function handleSelect(word) {
|