Bläddra i källkod

选择日期取消后日历回滚问题处理

vaecebyZ 9 månader sedan
förälder
incheckning
20ff423012

+ 6 - 1
study/studyGoodsDetail.vue

@@ -114,7 +114,7 @@
 		</view>
 
 		<uni-calendar @monthSwitch="chnageMonth" :date="selectDate" :selected="selected" clearDate ref="calendar"
-			:showMonth="false" style="z-index: 999;" :insert="false" @confirm="confirm" @close="closeCalendar">
+			:showMonth="false" style="z-index: 999;" @change="selectChange" :insert="false" @confirm="confirm" @close="closeCalendar">
 		</uni-calendar>
 	</view>
 
@@ -282,8 +282,13 @@ export default {
 		closeCalendar() {
 			this.isSubscribe = false
 		},
+		selectChange({ fulldate }){
+			console.log(fulldate)
+			this.selectDate = fulldate
+		},
 		confirm({ fulldate }) {
 			this.reserveTime = fulldate
+			this.selectDate = fulldate
 			try {
 				const user = JSON.parse(uni.getStorageSync('userInfo'))
 				if (this.isSubscribe) {

+ 1 - 1
uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue

@@ -332,7 +332,7 @@ export default {
 		 * 变化触发
 		 */
 		change() {
-			if (!this.insert) return
+			// if (!this.insert) return
 			this.setEmit('change')
 		},
 		/**