Commit 31fde673 authored by Tt's avatar Tt

调整

parent cdf9b4a5
...@@ -797,17 +797,24 @@ cc.Class({ ...@@ -797,17 +797,24 @@ cc.Class({
}, },
cardAction(card) { cardAction(card) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
pg.audio.playAudioByUrlCall(card.data.audio).then((id) => { if (card.data.audio) {
let time = cc.audioEngine.getDuration(id); pg.audio.playAudioByUrlCall(card.data.audio).then((id) => {
let time = cc.audioEngine.getDuration(id);
if (time < 0.5) time = 0.5;
else if (time > 1) time = 1;
cc.tween(card).to(time / 2, { scale: 1.1 }).to(time / 2, { scale: 1 }).call(() => { return resolve("") }).start();
})
} else {
let time = 0.8;
cc.tween(card).to(time / 2, { scale: 1.1 }).to(time / 2, { scale: 1 }).call(() => { return resolve("") }).start(); cc.tween(card).to(time / 2, { scale: 1.1 }).to(time / 2, { scale: 1 }).call(() => { return resolve("") }).start();
}); }
}); });
}, },
showSliderAction(time) { showSliderAction(time) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let card_group = cc.find("card_group", this.node); let card_group = cc.find("card_group", this.node);
let slider = cc.find("slider", card_group); let slider = cc.find("slider", card_group);
slider.action = true; slider.active = true;
let handle = cc.find("Handle", slider); let handle = cc.find("Handle", slider);
handle.active = true; handle.active = true;
let sl = slider.getComponent(cc.Slider) let sl = slider.getComponent(cc.Slider)
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
</div> </div>
<div style="margin:10px"> <div style="margin:10px">
<span>是否标红</span> <span>是否标红</span>
<nz-radio-group [(ngModel)]="obj.color"> <nz-radio-group [(ngModel)]="obj.color" (ngModelChange)="saveItem()">
<label nz-radio nzValue="1"></label> <label nz-radio nzValue="1"></label>
<label nz-radio nzValue="0"></label> <label nz-radio nzValue="0"></label>
</nz-radio-group> </nz-radio-group>
......
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