Commit 8c12485f authored by Chen Jiping's avatar Chen Jiping

模板完善

parent 018ffe28
...@@ -16,6 +16,7 @@ import { Palette } from './Palette2'; ...@@ -16,6 +16,7 @@ import { Palette } from './Palette2';
import { Stage } from './Stage'; import { Stage } from './Stage';
import { Star } from './StarUtil' import { Star } from './StarUtil'
import { Petal } from './PetalUtil'; import { Petal } from './PetalUtil';
import { Course } from '../form/Course';
...@@ -443,7 +444,25 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -443,7 +444,25 @@ export class PlayComponent implements OnInit, OnDestroy {
*/ */
initDefaultData() { initDefaultData() {
if (!this.data.type) {
this.data.type = '01';
}
if (!this.data.text) {
this.data.text = 'colour the food from plants in green and the food from animals in red';
}
if (!this.data.picArr) {
this.data.picArr = [];
}
if (!this.data.colorArr) {
this.data.colorArr = [];
}
console.log(this.data);
} }
...@@ -782,7 +801,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -782,7 +801,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if (touchedColorCard) { if (touchedColorCard) {
return; return;
} }
else{ else {
if (this.curCard) { if (this.curCard) {
this.curCard.clearColor(); this.curCard.clearColor();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment