From 3f1ea0a8e4bb02bf7544df8660b15cfa69d6b84a Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期五, 15 三月 2024 18:54:04 +0800 Subject: [PATCH] Merge refs/remotes/origin/master into refs/heads/master --- pages/bookServices/examination/questionList/index.js | 73 ++++++++++++++++++++++++++++++------ 1 files changed, 60 insertions(+), 13 deletions(-) diff --git a/pages/bookServices/examination/questionList/index.js b/pages/bookServices/examination/questionList/index.js index 75b694a..49a40ba 100644 --- a/pages/bookServices/examination/questionList/index.js +++ b/pages/bookServices/examination/questionList/index.js @@ -1,14 +1,4 @@ // pages/bookServices/examination/questionList/index.js - -const imageCdn = 'https://tdesign.gtimg.com/mobile/demos'; -const swiperList = [ - `${imageCdn}/swiper1.png`, - `${imageCdn}/swiper2.png`, - `${imageCdn}/swiper1.png`, - `${imageCdn}/swiper2.png`, - `${imageCdn}/swiper1.png`, -]; - Component({ /** * 缁勪欢鐨勫睘鎬у垪琛� @@ -17,28 +7,85 @@ questionList: { type: Array, value: [] + }, + submitStatus: { + type: Boolean, + value: false + }, + currentIndex: { + type: Number, + value: 1 } }, created() { - console.log('缁勪欢浼犲弬', this.properties); + // console.log('缁勪欢浼犲弬', this.properties); }, /** * 缁勪欢鐨勫垵濮嬫暟鎹� */ data: { + inputstyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;', + placeholderstyle: "font-size:28rpx", current: 2, autoplay: true, duration: 500, interval: 5000, paginationPosition: 'bottom-right', - swiperList, navigation: { type: 'fraction' }, + showIndex: 0, }, /** * 缁勪欢鐨勬柟娉曞垪琛� */ methods: { - + // 鍒囨崲棰樼洰 + changeSwiper(e) { + console.log(e); + this.setData({ + showIndex: e.detail.current + }) + var myEventDetail = { + index: e.detail.current + } // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 + var myEventOption = { + bubbles: true, + composed: true, + } // 瑙﹀彂浜嬩欢鐨勯�夐」 + this.triggerEvent('changeSwiper', myEventDetail, myEventOption) + }, + // 鍗曢�� 瀵屾枃鏈杈撳叆 瑙﹀彂 + onChangeRadio(e) { + var myEventDetail = { + value: e + } // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 + var myEventOption = { + bubbles: true, + composed: true, + } // 瑙﹀彂浜嬩欢鐨勯�夐」 + this.triggerEvent('onChangeRadio', myEventDetail, myEventOption) + }, + // 澶氶�夎Е鍙� + onChangeCheck(e) { + var myEventDetail = { + value: e + } // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 + var myEventOption = { + bubbles: true, + composed: true, + } // 瑙﹀彂浜嬩欢鐨勯�夐」 + this.triggerEvent('onChangeRadio', myEventDetail, myEventOption) + }, + // 杈撳叆妗嗚Е鍙� + onChangeInput(e) { + var myEventDetail = { + value: e + } // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 + var myEventOption = { + bubbles: true, + composed: true, + } // 瑙﹀彂浜嬩欢鐨勯�夐」 + this.triggerEvent('onChangeInput', myEventDetail, myEventOption) + }, } }) -- Gitblit v1.9.1