Commit fea2ebd0 authored by 范雪寒's avatar 范雪寒

fix: 文字过长则缩放

parent 926ee851
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</app-audio-recorder> </app-audio-recorder>
<br> <br>
<span style="height: 30px; font-size: 18px;">标题文本:</span> <span style="height: 30px; font-size: 18px;">标题文本:</span>
<input style="width: 150px; " type="text" maxlength="15" nz-input [(ngModel)]="item.tittleTxt" (blur)="save()"> <input style="width: 150px; " type="text" maxlength="" nz-input [(ngModel)]="item.tittleTxt" (blur)="save()">
</div> </div>
<div *ngFor="let question of item.questionList; let i = index"> <div *ngFor="let question of item.questionList; let i = index">
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<br> <br>
<span style="height: 30px; font-size: 18px;">问题{{i + 1}}文本:</span> <span style="height: 30px; font-size: 18px;">问题{{i + 1}}文本:</span>
<br> <br>
<input style="width: 150px; " type="text" maxlength="15" nz-input [(ngModel)]="question.questionTxt" <input style="width: 150px; " type="text" maxlength="" nz-input [(ngModel)]="question.questionTxt"
(blur)="save()"> (blur)="save()">
<br> <br>
<br> <br>
......
...@@ -889,7 +889,7 @@ ...@@ -889,7 +889,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 91.07, "width": 395,
"height": 40.32 "height": 40.32
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -901,8 +901,8 @@ ...@@ -901,8 +901,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, -1.161,
-45, -47.322,
0, 0,
0, 0,
0, 0,
...@@ -946,7 +946,7 @@ ...@@ -946,7 +946,7 @@
"_N$string": "Label", "_N$string": "Label",
"_fontSize": 32, "_fontSize": 32,
"_lineHeight": 32, "_lineHeight": 32,
"_enableWrapText": true, "_enableWrapText": false,
"_N$file": { "_N$file": {
"__uuid__": "73588b7a-9fa6-4401-a693-8cb0a6c4e8e4" "__uuid__": "73588b7a-9fa6-4401-a693-8cb0a6c4e8e4"
}, },
...@@ -958,7 +958,7 @@ ...@@ -958,7 +958,7 @@
"_N$horizontalAlign": 1, "_N$horizontalAlign": 1,
"_N$verticalAlign": 1, "_N$verticalAlign": 1,
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 2,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "c83eSosytNTbF8xtdrdq8O" "_id": "c83eSosytNTbF8xtdrdq8O"
}, },
...@@ -1258,7 +1258,7 @@ ...@@ -1258,7 +1258,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 91.07, "width": 300,
"height": 40.32 "height": 40.32
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -1315,7 +1315,7 @@ ...@@ -1315,7 +1315,7 @@
"_N$string": "Label", "_N$string": "Label",
"_fontSize": 32, "_fontSize": 32,
"_lineHeight": 32, "_lineHeight": 32,
"_enableWrapText": true, "_enableWrapText": false,
"_N$file": { "_N$file": {
"__uuid__": "73588b7a-9fa6-4401-a693-8cb0a6c4e8e4" "__uuid__": "73588b7a-9fa6-4401-a693-8cb0a6c4e8e4"
}, },
...@@ -1324,10 +1324,10 @@ ...@@ -1324,10 +1324,10 @@
"_batchAsBitmap": false, "_batchAsBitmap": false,
"_styleFlags": 0, "_styleFlags": 0,
"_underlineHeight": 0, "_underlineHeight": 0,
"_N$horizontalAlign": 1, "_N$horizontalAlign": 0,
"_N$verticalAlign": 1, "_N$verticalAlign": 1,
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 2,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "79fkcmuPJEzqefLdoN8vA6" "_id": "79fkcmuPJEzqefLdoN8vA6"
}, },
...@@ -1675,7 +1675,7 @@ ...@@ -1675,7 +1675,7 @@
"array": [ "array": [
0, 0,
0, 0,
707.5427548918864, 702.7119569364013,
0, 0,
0, 0,
0, 0,
......
...@@ -281,8 +281,9 @@ cc.Class({ ...@@ -281,8 +281,9 @@ cc.Class({
}, },
async questionBoardDown() { async questionBoardDown() {
const questionLabel = cc.find('Canvas/QuestionLabelBg/QuestionLabelNode').getComponent(cc.Label); const questionStr = this.data.questionList[this.status.currentQuestionIdx].questionTxt;
questionLabel.string = this.data.questionList[this.status.currentQuestionIdx].questionTxt; const questionLabel = cc.find('Canvas/QuestionLabelBg/QuestionLabelNode');
questionLabel.getComponent(cc.Label).string = questionStr;
const labelBgNode = cc.find('Canvas/QuestionLabelBg'); const labelBgNode = cc.find('Canvas/QuestionLabelBg');
await asyncTweenTo(labelBgNode, 1, { y: 263 }); await asyncTweenTo(labelBgNode, 1, { y: 263 });
......
module.exports = { "tittleAudio": "http://staging-teach.cdn.ireadabc.com/6f141b430bf272cafc368256316596db.mp3", "tittleTxt": "asdf sd fs ss", "questionList": [{ "questionAudio": "http://staging-teach.cdn.ireadabc.com/90e313405ba454880e75ff6958ea05c0.mp3", "questionTxt": "12as s df sdf", "rightOptionIdx": 1, "optionList": [{ "optionDragonBone": { "skeJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/a86e5c9e40e818879bb96c6d566e2c47.json", "name": "dc_ske.json" }, "texJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/c7a47999c11c158e717c49861d39c3fa.json", "name": "dc_tex.json" }, "texPngData": { "url": "http://staging-teach.cdn.ireadabc.com/4ca3ab5ea9ce40cfebee20952e22e76e.png", "name": "dc_tex.png" } }, "optionAudio": "http://staging-teach.cdn.ireadabc.com/8ba49890c74b8c68b1da4556ac8c1dda.mp3" }, { "optionDragonBone": { "skeJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/703a41d6c7afe6fe653014d585ef0d58.json", "name": "d1_ske.json" }, "texJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/02bbebdc4a9f4a35d9ec285f61fca19c.json", "name": "d1_tex.json" }, "texPngData": { "url": "http://staging-teach.cdn.ireadabc.com/ba2041fb4f69c37be52b76f5fb274c09.png", "name": "d1_tex.png" } }, "optionAudio": "http://staging-teach.cdn.ireadabc.com/8ba49890c74b8c68b1da4556ac8c1dda.mp3" }, { "optionDragonBone": { "skeJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/2cd8f3daa6534efd6f7ca3b138581e5c.json", "name": "ant_ske.json" }, "texJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/b2d30dbdfe2ec050af5651f8f609b56d.json", "name": "ant_tex.json" }, "texPngData": { "url": "http://staging-teach.cdn.ireadabc.com/ad816ff2b5823868bf87a5c05bc949a1.png", "name": "ant_tex.png" } }, "optionAudio": "http://staging-teach.cdn.ireadabc.com/b75df34ef55bd1c6e3a799f1dac87fec.mp3" }] }] } module.exports = {
\ No newline at end of file "tittleAudio": "http://staging-teach.cdn.ireadabc.com/6f141b430bf272cafc368256316596db.mp3",
"tittleTxt": "asdf sd fs ss",
"questionList": [{
"questionAudio": "http://staging-teach.cdn.ireadabc.com/90e313405ba454880e75ff6958ea05c0.mp3",
"questionTxt": "12as s df sdfab",
"rightOptionIdx": 1,
"optionList": [{
"optionDragonBone": {
"skeJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/a86e5c9e40e818879bb96c6d566e2c47.json",
"name": "dc_ske.json"
},
"texJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/c7a47999c11c158e717c49861d39c3fa.json",
"name": "dc_tex.json"
},
"texPngData": {
"url": "http://staging-teach.cdn.ireadabc.com/4ca3ab5ea9ce40cfebee20952e22e76e.png",
"name": "dc_tex.png"
}
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/8ba49890c74b8c68b1da4556ac8c1dda.mp3"
},
{
"optionDragonBone": {
"skeJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/703a41d6c7afe6fe653014d585ef0d58.json",
"name": "d1_ske.json"
},
"texJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/02bbebdc4a9f4a35d9ec285f61fca19c.json",
"name": "d1_tex.json"
},
"texPngData": {
"url": "http://staging-teach.cdn.ireadabc.com/ba2041fb4f69c37be52b76f5fb274c09.png",
"name": "d1_tex.png"
}
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/8ba49890c74b8c68b1da4556ac8c1dda.mp3"
},
{
"optionDragonBone": {
"skeJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/2cd8f3daa6534efd6f7ca3b138581e5c.json",
"name": "ant_ske.json"
},
"texJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/b2d30dbdfe2ec050af5651f8f609b56d.json",
"name": "ant_tex.json"
},
"texPngData": {
"url": "http://staging-teach.cdn.ireadabc.com/ad816ff2b5823868bf87a5c05bc949a1.png",
"name": "ant_tex.png"
}
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/b75df34ef55bd1c6e3a799f1dac87fec.mp3"
}]
}]
}
\ No newline at end of file
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