From 88d80c9f40935c6ce7ea51683c6cdc1a80d1997b Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期五, 22 三月 2024 11:17:45 +0800 Subject: [PATCH] Merge refs/remotes/origin/master into refs/heads/master --- packageBookService/pages/bookServices/examination/questionSchedule/index.js | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packageBookService/pages/bookServices/examination/questionSchedule/index.js b/packageBookService/pages/bookServices/examination/questionSchedule/index.js index 311ed8a..531b569 100644 --- a/packageBookService/pages/bookServices/examination/questionSchedule/index.js +++ b/packageBookService/pages/bookServices/examination/questionSchedule/index.js @@ -24,9 +24,15 @@ answerType: { type: String, value: '' + }, + isNight: { + type: Boolean, + value: false } }, - created() { + created( + + ) { }, detached() { }, @@ -37,7 +43,8 @@ data: { showTime: '', // percentage: 0, - ready: 0 + ready: 0, + scheduleStyle: 'back', }, observers: { 'countdownTime': function (newValue) { @@ -58,12 +65,19 @@ }) } } + }, + 'ready': function (newValue) { + this.setData({ + percentage: (this.data.ready / this.data.questionList.length) * 100 + }) } }, /** * 缁勪欢鐨勬柟娉曞垪琛� */ methods: { + // 澶滈棿鍜屾棩闂存ā寮� + // 鍒ゆ柇鏄惁鏈夌敤鎴风瓟妗� isHaveAnswer(data) { if (typeof data == 'string') { @@ -76,13 +90,15 @@ } else { return false } - } else { + } else if (typeof data == 'object') { const answer = data.find((item) => item.length > 0) if (answer) { return true } else { return false } + } else { + return false } }, // // 鏍煎紡鍖栨椂闂� -- Gitblit v1.9.1