|
|
@@ -183,8 +183,13 @@ export default {
|
|
|
handler(newVal, oldVal) {
|
|
|
if (newVal.type == 45) {
|
|
|
if (JSON.stringify(newVal.json) != JSON.stringify(this.jsonData)) {
|
|
|
-
|
|
|
- this.jsonData = JSON.parse(JSON.stringify(newVal.json));
|
|
|
+ let editJson = JSON.parse(JSON.stringify(newVal.json))
|
|
|
+ editJson.testJson.forEach(item => {
|
|
|
+ if(typeof item.answer == 'string' || typeof item.answer == 'number'){
|
|
|
+ item.answer = [item.answer];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.jsonData = editJson;
|
|
|
if(this.jsonData.testJson.length == 0){
|
|
|
this.addTest();
|
|
|
}
|