Commit 33b2d93d authored by linzhiguo's avatar linzhiguo

# 选项重叠 | 表单自动换行| 干扰项BUG

parent aef0967a
...@@ -180,52 +180,54 @@ ...@@ -180,52 +180,54 @@
</div> </div>
<div class="section-content"> <div class="section-content">
<div *ngFor="let choiceItem of data.options; let choiceIndex = index" style="width:220px; height:280px; border:1px solid #CCC; padding:5px; border-radius: 5px; margin: 0 10px;"> <div style="flex-wrap:wrap; width: 800px;display: flex;" >
<div style="display: flex; "> <div *ngFor="let choiceItem of data.options; let choiceIndex = index" style="width:220px; height:280px; border:1px solid #CCC; padding:5px; border-radius: 5px; margin: 0 10px;">
<div style="flex:2"> <div style="display: flex; ">
类型 <div style="flex:2">
</div> 类型
<div style="flex:4">
<nz-radio-group [(ngModel)]="choiceItem.is_text" (ngModelChange)="saveItem()" >
<label nz-radio [nzValue]="true">文字</label>
<label nz-radio [nzValue]="false">图片</label>
</nz-radio-group>
</div>
</div>
<div *ngIf="choiceItem.is_text != false">
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
文字
</div> </div>
<div style="flex:5"> <div style="flex:4">
<input type="text" nz-input placeholder="" [(ngModel)]="choiceItem.word" (blur)="saveItem()" /> <nz-radio-group [(ngModel)]="choiceItem.is_text" (ngModelChange)="saveItem()" >
<label nz-radio [nzValue]="true">文字</label>
<label nz-radio [nzValue]="false">图片</label>
</nz-radio-group>
</div> </div>
</div> </div>
</div> <div *ngIf="choiceItem.is_text != false">
<div *ngIf="choiceItem.is_text == false"> <div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
文字
</div>
<div style="flex:5">
<input type="text" nz-input placeholder="" [(ngModel)]="choiceItem.word" (blur)="saveItem()" />
</div>
</div>
</div>
<div *ngIf="choiceItem.is_text == false">
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
图片
</div>
<div style="flex:5">
<app-upload-image-with-preview style="width: 100%;" [picUrl]="choiceItem.pic_url" (imageUploaded)="onImageUploadSuccess($event, choiceItem, 'pic_url')"></app-upload-image-with-preview>
</div>
</div>
</div>
<div style="display: flex; margin-bottom: 10px;"> <div style="display: flex; margin-bottom: 10px;">
<div style="flex:1"> <div style="flex:1">
图片 音频
</div> </div>
<div style="flex:5"> <div style="flex:5">
<app-upload-image-with-preview style="width: 100%;" [picUrl]="choiceItem.pic_url" (imageUploaded)="onImageUploadSuccess($event, choiceItem, 'pic_url')"></app-upload-image-with-preview> <app-audio-recorder [audioUrl]="choiceItem.audio_url" (audioUploaded)="onAudioUploadSuccess($event, choiceItem, 'audio_url')" ></app-audio-recorder>
</div> </div>
</div> </div>
</div>
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
音频
</div>
<div style="flex:5">
<app-audio-recorder [audioUrl]="choiceItem.audio_url" (audioUploaded)="onAudioUploadSuccess($event, choiceItem, 'audio_url')" ></app-audio-recorder>
</div>
</div>
<div *ngIf="choiceIndex>-1" style="text-align: center;"> <div *ngIf="choiceIndex>-1" style="text-align: center;">
<button style="margin-top: 10px;" nz-button nzType="danger" (click)="delOption(i, choiceIndex)" > <button style="margin-top: 10px;" nz-button nzType="danger" (click)="delOption(i, choiceIndex)" >
<span>删除此选项</span> <span>删除此选项</span>
</button> </button>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -85,7 +85,7 @@ cc.Class({ ...@@ -85,7 +85,7 @@ cc.Class({
_kind.text = ""; _kind.text = "";
_kind.pic = ""; _kind.pic = "";
_kind.audio = ""; _kind.audio = "";
if (!k_item.is_disturb){ if (k_item.is_disturb != true){
if (k_item.kind_type == "0"){ if (k_item.kind_type == "0"){
_kind.text = k_item.word||""; _kind.text = k_item.word||"";
} }
...@@ -333,7 +333,9 @@ cc.Class({ ...@@ -333,7 +333,9 @@ cc.Class({
// }) // })
// .start(); // .start();
this._xs[i%2] += selected.target._w;
selected.target.removeFromParent(); selected.target.removeFromParent();
selected.target = null; selected.target = null;
break; break;
...@@ -704,10 +706,10 @@ cc.Class({ ...@@ -704,10 +706,10 @@ cc.Class({
for(let i = 0; i < area.childrenCount; i++){ for(let i = 0; i < area.childrenCount; i++){
let item = area.children[i]; let item = area.children[i];
item.x += speed; item.x += speed;
if (item.x > this._frameSize.width + item._w/2){ if (item.x > this._frameSize.width + item._w){
this._xs[i%2] -= item._w/2; this._xs[i%2] -= item._w;
//item.x = Math.min(-item._w/2, this._xs[i%2]); item.x = Math.min(-item._w/2, this._xs[i%2]);
item.x = -item._w/2; //item.x = -item._w/2;
} }
} }
}, },
......
...@@ -54,7 +54,7 @@ cc.Class({ ...@@ -54,7 +54,7 @@ cc.Class({
this.word_node.active = type == 1; this.word_node.active = type == 1;
this.word.node.active = type == 1; this.word.node.active = type == 1;
this.word_finish.active = false; this.word_finish.active = false;
this.node._w = [340, 410][type]; this.node._w = [345, 420][type];
this.resetWH(); this.resetWH();
this.changeBackground(); this.changeBackground();
}, },
......
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