mao 1 year ago
parent
commit
784fab4eee
27 changed files with 1939 additions and 381 deletions
  1. 2 2
      api/business/dayWorkItem.js
  2. 2 2
      api/resourceGroup/resourceGroupDetail.js
  3. 64 22
      components/dialog-end-work/dialog-end-work.vue
  4. 1 1
      components/dialog-selectEquipment/dialog-selectEquipment.vue
  5. 1 1
      components/dialog-turnoverApplication/dialog-turnoverApplication.vue
  6. 19 17
      directive/roles/index.js
  7. 4 0
      pages/addNewBatch/index.vue
  8. 14 8
      pages/batchReporting/index.vue
  9. 3 4
      pages/changeBox/index.vue
  10. 1 1
      pages/dashboard/index.vue
  11. 0 1
      pages/handlingList/index.vue
  12. 143 14
      pages/reportHistory/index.vue
  13. 2 2
      pages/reportingForWork/index.vue
  14. 14 0
      uni_modules/uni-datetime-picker/changelog.md
  15. 1 1
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
  16. 0 8
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
  17. 210 199
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
  18. 101 83
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js
  19. 1 1
      uni_modules/uni-datetime-picker/package.json
  20. 10 0
      uni_modules/uni-icons/changelog.md
  21. 8 6
      uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
  22. 9 7
      uni_modules/uni-icons/components/uni-icons/uni-icons.vue
  23. 8 0
      uni_modules/uni-icons/components/uni-icons/uniicons.css
  24. 664 0
      uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
  25. 649 0
      uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
  26. 1 1
      uni_modules/uni-icons/package.json
  27. 7 0
      utils/common.js

+ 2 - 2
api/business/dayWorkItem.js

@@ -95,9 +95,9 @@ export function listItem(data) {
 }
 
 
-export function getDayWorkItemHistory() {
+export function getDayWorkItemHistory(startTime,endTime) {
 	return req.request({
-		url: '/business/dayworkItem/getDayWorkItemHistory',
+		url: '/business/dayworkItem/getDayWorkItemHistory?startTime=' + startTime + '&endTime=' + endTime,
 		method: 'GET',
 	})
 }

+ 2 - 2
api/resourceGroup/resourceGroupDetail.js

@@ -1,9 +1,9 @@
 import req from '@/utils/request.js'
 
 
-export function getEquipmentByUidAndDid(planDetailId) {
+export function getEquipmentByUidAndDid(planDetailId,deptId) {
 	return req.request({
-		url:'/business/detail/getEquipmentByUidAndDid?planDetailId=' + planDetailId ,
+		url:'/business/detail/getEquipmentByUidAndDid?planDetailId=' + planDetailId + '&deptId=' + deptId,
 		method: 'GET',
 	})
 }

+ 64 - 22
components/dialog-end-work/dialog-end-work.vue

@@ -3,7 +3,7 @@
 		<view class="list-container">
 			<view class="list-title uni-row">
 				<text class="label">合格量</text>
-				<input class="input" @input="handleInputQualifiedNum" style="width: 70%;"
+				<input class="input" @input="debounce(handleInputQualifiedNum,500)" style="width: 70%;"
 					v-model="workInfo.qualifiedNum" placeholder="请输入合格量" />
 			</view>
 			<view class="list-title uni-row">
@@ -96,6 +96,7 @@
 	const temp = ref(0) // 保存workInfo.value.qualifiedNum的值(还原用)
 	const lotPreSumReject = ref(0)
 	const lotPreSumQualifiedNum = ref(0)
+	const remainingQualifiedNum = ref(0) // 当前的合格量还能最大添加多少(剩余数量)
 
 	onLoad(() => {})
 
@@ -116,22 +117,20 @@
 					for (let i = 0; i < res.data.length; i++) {
 						specialDeptProcessList.value[i] = res.data[i].processId;
 					}
-				}
-				if (specialDeptProcessList.value.includes(workInfo.value.processId)) {
 					for (let i = 0; i < response.rows.length; i++) {
-						if(response.rows[i].processId == workInfo.value.processId){ // 判断是当前工序再累加item合格数和废品数
+						if (response.rows[i].processId == workInfo.value.processId) { 
 							lotPreSumReject.value += response.rows[i].rejectSum;
 							lotPreSumQualifiedNum.value += response.rows[i].qualifiedNum;
 						}
 					}
+				}
+				if (specialDeptProcessList.value.includes(workInfo.value.processId)) {
 					workInfo.value.qualifiedNum = store.dayworkInfo.processQualifiedNum > 0 ?
-						Math.max(0, store.dayworkInfo.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value) :
-						Math.max(0, store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value);
-
+						Math.max(0, store.dayworkInfo.processQualifiedNum - lotPreSumQualifiedNum.value -
+							lotPreSumReject.value) :
+						Math.max(0, store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject
+							.value);
 					// temp.value = workInfo.value.qualifiedNum;
-					console.log(store.dayworkInfo)
-					console.log(lotPreSumQualifiedNum.value)
-					console.log(lotPreSumReject.value)
 				} else {
 					workInfo.value.qualifiedNum = 0;
 				}
@@ -155,6 +154,7 @@
 		endFlag.value = 0;
 		lotPreSumReject.value = 0;
 		lotPreSumQualifiedNum.value = 0;
+		remainingQualifiedNum.value = 0;
 	}
 
 	function init() {
@@ -236,23 +236,63 @@
 	}
 
 	function handlePreFinishReporting() {
-		handleSave();
+		// 填入数大于剩余量情况
+		if (store.isPreProcess && (parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value - store.dayworkInfo
+				.oneLotQuantity > 0)) {
+			uni.showModal({
+				title: '提示',
+				content: `合格数总量超出投入量${Math.round((parseInt(workInfo.value.qualifiedNum)  + lotPreSumQualifiedNum.value - store.dayworkInfo.oneLotQuantity) / store.dayworkInfo.oneLotQuantity) * 100}%,是否继续保存?`,
+				success: function(res) {
+					if (res.confirm) {
+						handleSave();
+					} else if (res.cancel) {} 
+				}
+			})
+		} else {
+			handleSave();
+		}
 	}
 
 	function handleFinishReporting() {
-		if (showCarrierList.value) {
-			if (endFlag.value >= bindList.value.length) {
-				handleSave();
+		if (store.isPreProcess && (parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value - store.dayworkInfo
+				.oneLotQuantity > 0)) {
+			uni.showModal({
+				title: '提示',
+				content: `合格数总量超出投入量${Math.round((parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value - store.dayworkInfo.oneLotQuantity) / store.dayworkInfo.oneLotQuantity) * 100}%,是否继续保存?`,
+				success: function(res) {
+					if (res.confirm) {
+						if (showCarrierList.value) {
+							if (endFlag.value >= bindList.value.length) {
+								handleSave();
+							} else {
+								uni.showToast({
+									icon: "none",
+									title: "请先扫码确认载具",
+									duration: 2000
+								})
+								return;
+							}
+						} else {
+							handleSave();
+						}
+					} else if (res.cancel) {}
+				}
+			})
+		} else {
+			if (showCarrierList.value) {
+				if (endFlag.value >= bindList.value.length) {
+					handleSave();
+				} else {
+					uni.showToast({
+						icon: "none",
+						title: "请先扫码确认载具",
+						duration: 2000
+					})
+					return;
+				}
 			} else {
-				uni.showToast({
-					icon: "none",
-					title: "请先扫码确认载具",
-					duration: 2000
-				})
-				return;
+				handleSave();
 			}
-		} else {
-			handleSave();
 		}
 	}
 
@@ -295,6 +335,8 @@
 		}
 		workInfo.value.endTime = timestampToTime(new Date());
 		workInfo.value.rejectList = wasteInfo.value;
+		workInfo.value.isPreProcess = store.isPreProcess;
+
 		console.log(workInfo.value)
 		saveDayWorkItem(workInfo.value).then(res => {
 			if (res.code === 200) {

+ 1 - 1
components/dialog-selectEquipment/dialog-selectEquipment.vue

@@ -161,7 +161,7 @@
 		// 		}
 		// 		baseDialog.value.open()
 		// 	});
-		getEquipmentByUidAndDid(store.planDetails.id).then(equipmentRes => {
+		getEquipmentByUidAndDid(store.planDetails.id,store.curDeptDetails.deptId).then(equipmentRes => {
 			if(equipmentRes.code == 200){
 				for (var i = 0; i < equipmentRes.rows.length; i++) {
 					equipmentList.value[i] = {

+ 1 - 1
components/dialog-turnoverApplication/dialog-turnoverApplication.vue

@@ -266,7 +266,7 @@
 			deptId: curDayworkItem.value.deptId,
 		}).then(res => {
 			for (var i = 0; i < res.data.length; i++) {
-				if (res.data[i].status == 0) {
+				if (res.data[i].status != 1) {
 					turnAreaList.value[i] = res.data[i];
 				}
 			}

+ 19 - 17
directive/roles/index.js

@@ -1,22 +1,24 @@
-import { store } from "@/store/index.js"
- 
+import {
+	store
+} from "@/store/index.js"
+
 const hasRoles = (el, binding) => {
 	const {
-			value
-		} = binding;
-		const roles = store.userInfo.roles.map(item => item.roleKey);
-	 
-		if (value && value instanceof Array && value.length > 0) {
-			const hasRole = roles.some(role => {
-				return value.includes(role)
-			})
-			console.log(hasRole);
-			if (!hasRole) {
-				el.remove()
-			}
-		} else {
-			throw new Error('请填写当前操作权限值')
+		value
+	} = binding;
+	const roles = store.userInfo.roles.map(item => item.roleKey);
+
+	if (value && value instanceof Array && value.length > 0) {
+		const hasRole = roles.some(role => {
+			return value.includes(role)
+		})
+		console.log(hasRole);
+		if (!hasRole) {
+			el.remove()
 		}
+	} else {
+		throw new Error('请填写当前操作权限值')
+	}
 }
- 
+
 export default hasRoles;

+ 4 - 0
pages/addNewBatch/index.vue

@@ -192,6 +192,10 @@
 				batchNoList.value = [res.rows[0]];
 				dayWork.value.lotId = batchNoList.value[0].id;
 				dayWork.value.lotCode = batchNoList.value[0].lotCode;
+				if(dayWork.value.technologicalProcessId != batchNoList.value[0].technologicalProcessId){
+					dayWork.value.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
+					store.planDetails.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
+				}
 			} else {
 				batchNoList.value = res.rows;
 			}

+ 14 - 8
pages/batchReporting/index.vue

@@ -273,13 +273,19 @@
 	}
 
 	function handleScanCode() {
-		uni.scanCode({
-			scanType: ['qrCode'],
-			onlyFromCamera: true, // 只允许相机扫码
-			autoZoom: false,
-			success: function(res) {
-				console.log(res.result)
-				let vehicleObj = JSON.parse(res.result);
+		// 引入原生插件
+		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// 调用插件的 mpaasScan 方法
+		mpaasScanModule.mpaasScan({
+				// 扫码识别类型,参数可多选,qrCode、barCode,
+				// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+				scanType: ["qrCode", "barCode"],
+				// 是否隐藏相册,默认false不隐藏
+				hideAlbum: false,
+			},
+			(ret) => {
+				console.log(ret);
+				let vehicleObj = JSON.parse(ret.resp_result);
 				if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
 					uni.showToast({
 						icon: "none",
@@ -315,7 +321,7 @@
 					}
 				})
 			}
-		});
+		);
 	}
 
 	function handleAddDaywork(data) {

+ 3 - 4
pages/changeBox/index.vue

@@ -227,17 +227,16 @@
 			if (res.code === 200) {
 				uni.showToast({
 					icon: 'success',
-					title: '添加成功'
+					title: '添加成功',
 				});
-				// uni.$emit('batchReporting-addBatch')
-				// uni.$emit('dayworkItemUpdate');
 				uni.navigateBack({
 					delta: 1
 				});
 			} else {
 				uni.showToast({
 					icon: 'none',
-					title: res.msg
+					title: res.msg,
+					duration: 2500
 				});
 			}
 		})

+ 1 - 1
pages/dashboard/index.vue

@@ -24,7 +24,7 @@
 			</uni-section>
 		</view>
 		<!-- <view class="business-btn uni-row" v-if="showOther" @click="handleRecerptSfprod"><text class="label">半成品接收</text></view> -->
-		<view class="business-btn uni-row" v-if="showOther" @click="handeleToReportHistory"><text class="label">报工历史</text></view>
+		<view class="business-btn uni-row" v-if="showOther" @click="handeleToReportHistory"><text class="label">我的报工</text></view>
 		<view class="business-btn uni-row" v-if="showOther" @click="handleToProductionPlan"><text class="label">报工</text></view>
 		<!-- v-hasRoles="['porter']" 可通过v-Roles自定义指令进行显隐 -->
 		<view class="business-btn uni-row" v-if="showTurn" @click="handleToHandlingList"><text class="label">周转</text></view>

+ 0 - 1
pages/handlingList/index.vue

@@ -319,7 +319,6 @@
 		}
 	}
 
-
 	function handleUpadteStatus(status,isBack) {
 		// 设置周转状态
 		for (let i = 0; i < selection.value.length; i++) {

+ 143 - 14
pages/reportHistory/index.vue

@@ -1,24 +1,41 @@
 <template>
-	<view class="uni-column container">
+	<view v-if="!show" class="time-controls">
+		<view class="title">
+			<view class="first">请选择日期区间</view>
+			<view class="second">注意日期区间最长不超过31天</view>
+		</view>
+		<uni-section title="开始日期:" type="square" class="uni-row sta">
+			<input v-model="startTime" type="date"/>
+		</uni-section>
+		<uni-section title="结束日期:" type="square" class="uni-row end">
+			<input v-model="endTime" type="date"/>
+		</uni-section>
+		<button @click="handleSearch">查询</button>
+	</view>
+	<view v-if="show" class="uni-column container">
 		<view class="uni-row" style="position: fixed;
 		top: 0;width: 100%;
 		height: 120rpx;
 		z-index: 2;
 		margin:0 auto;
 		background-color: white;
-		justify-content: space-around;
+		justify-content: flex-start;
 		align-items: center;
 		border-top: 1rpx solid lightgray;
 		border-bottom: 1rpx solid lightgray;">
-			<uni-section title="选择日期:" type="square" class="uni-row"> 
-				<uni-data-select v-model="selectDate" :localdata="dateList" @change="change"
-					:clear="false" style="width: 280rpx;"></uni-data-select>
+			<uni-section title="选择日期:" type="square" class="uni-row" style="margin-left: 16rpx;">
+				<uni-data-select v-model="selectDate" :localdata="dateList" @change="change" :clear="false"
+					style="width: 200rpx;"></uni-data-select>
 			</uni-section>
-			<uni-section title="条数:" type="square" class="uni-row" style="justify-content: center;align-items: center;"> 
+			<uni-section title="总数:" type="square" class="uni-row" style="justify-content: center;align-items: center;">
+				{{ total }}
+			</uni-section>
+			<uni-section title="条数:" type="square" class="uni-row" style="justify-content: center;align-items: center;">
 				{{ listDataItem.length }}
 			</uni-section>
 		</view>
 		<view class="scroll-container">
+
 			<view v-for="(item, index) in listDataItem" :key="index" class="list-item">
 				<view class="title-container">
 					<view class="title uni-row">
@@ -92,28 +109,88 @@
 		toHHmmss
 	} from '@/utils/common.js'
 
+
 	const listData = ref([]) // 回显 	
 	const listDataItem = ref([])
 	const lotInfo = ref(null) // 详情弹窗
 	const selectDate = ref('')
-	const dateList = ref([])
-
+	const dateList = ref([]) // 选择的日期列表
+	const show = ref(false)
+	const startTime = ref('')
+	const endTime = ref('')
+	const total = ref(0)
 
 	onLoad(() => {
-
+		
+		
 	})
 
 	onShow(() => {
-		init();
+		resetPage();
 	})
 
+	function resetPage() {
+		listData.value = [];
+		listDataItem.value = [];
+		selectDate.value = '';
+		dateList.value = [];
+		show.value = false;
+		startTime.value = '';
+		endTime.value = '';
+	}
+
+	function handleSearch() {
+		let today = Date.parse(new Date());
+		let startTimestamp = Date.parse(new Date(startTime.value));
+		let endTimestamp = Date.parse(new Date(endTime.value));
+		if(endTimestamp - startTimestamp < 0){
+			uni.showToast({
+				icon: 'none',
+				title: '开始日期不能超过结束日期',
+				duration: 2000
+			})
+			return;
+		}
+		if(today - endTimestamp < 0 || today - startTimestamp < 0){
+			uni.showToast({
+				icon: 'none',
+				title: '开始或结束日期不能超过今日',
+				duration: 2000
+			})
+			return;
+		}
+		if(!startTime.value || !endTime.value){
+			uni.showToast({
+				icon: 'none',
+				title: '请选择开始或结束日期',
+				duration: 2000
+			})
+			return;
+		}
+		if(endTimestamp - startTimestamp > 1000 * 60 * 60 * 24 * 30){
+			uni.showToast({
+				icon: 'none',
+				title: '日期区间最长不超过31天',
+				duration: 2000
+			})
+			return;
+		}
+		show.value = !show.value
+		if(show.value) {
+			init();
+		}
+	}
+
 	function init() {
 		uni.showLoading({
 			title: '加载中'
 		});
-		getDayWorkItemHistory().then(res => {
+		console.log(startTime.value);
+		console.log(endTime.value)
+		getDayWorkItemHistory(startTime.value,endTime.value).then(res => {
 			if (res.code == 200) {
 				listData.value = res.rows || [];
+				total.value = res.rows.length;
 				// 时间戳转工时
 				for (var i = 0; i < listData.value.length; i++) {
 					let timeStamp = listData.value[i].workingHours;
@@ -130,7 +207,6 @@
 					} else {
 						accumulator[dateString] = [currentItem];
 					}
-
 					return accumulator;
 				}, {});
 				// 时间下拉
@@ -141,8 +217,10 @@
 					}
 				}
 				listData.value = groupedData;
-				listDataItem.value = listData.value[dateList.value[0].value]
-				selectDate.value = dateList.value[0].value;
+				if(dateList.value.length > 0){
+					listDataItem.value = listData.value[dateList.value[0].value]
+					selectDate.value = dateList.value[0].value;
+				}	
 				console.log(groupedData)
 				uni.hideLoading();
 			} else {
@@ -166,7 +244,58 @@
 </script>
 
 <style lang="scss">
+	.time-controls {
+		.title {
+			margin: 20% auto 40% auto; 
+			
+			.first {
+				font-size: 48rpx;
+				margin: 0 auto;
+			}
+			
+			.second {
+				color: red;
+				font-size: 24rpx;
+				margin: 10rpx auto 0 auto;
+			}
+		}
+		
+		.sta {
+			justify-content: center;
+			align-items: center;
+			margin-bottom: 48rpx;
+			
+			input {
+				border:1rpx solid gray;
+				border-radius: 8rpx;
+				width: 400rpx;
+				height: 64rpx;
+			}
+		}
+		
+		.end {
+			justify-content: center;
+			align-items: center;
+			margin-bottom: 64rpx;
+			
+			input {
+				border:1rpx solid gray;
+				border-radius: 8rpx;
+				width: 400rpx;
+				height: 64rpx;
+			}
+		}
+		
+		button {
+			width: 78%;
+			background-color: #1684fc;
+			color: white;
+			margin: 0 auto;
+		}
+	}
+
 	.container {
+		height: 100%;
 		background-color: #f5f5f5;
 		overflow: auto;
 	}

+ 2 - 2
pages/reportingForWork/index.vue

@@ -172,9 +172,9 @@
 			}
 		})
 
-		getEquipmentByUidAndDid(store.planDetails.id).then(equipmentRes => {
+		getEquipmentByUidAndDid(store.planDetails.id,store.curDeptDetails.deptId).then(equipmentRes => {
 			if (equipmentRes.code == 200) {
-				hasEquipment.value = equipmentRes.rows.length > 0 ? 'true' : 'false';
+				hasEquipment.value = equipmentRes.rows.length > 0 ? true : false;
 			}
 		})
 	}

+ 14 - 0
uni_modules/uni-datetime-picker/changelog.md

@@ -1,3 +1,17 @@
+## 2.2.32(2024-02-20)
+- 修复 日历的close事件触发异常的bug [详情](https://github.com/dcloudio/uni-ui/issues/844)
+## 2.2.31(2024-02-20)
+- 修复 h5平台 右边日历的月份默认+1的bug [详情](https://github.com/dcloudio/uni-ui/issues/841)
+## 2.2.30(2024-01-31)
+- 修复 隐藏“秒”时,在IOS15及以下版本时出现 结束时间在开始时间之前 的bug [详情](https://github.com/dcloudio/uni-ui/issues/788)
+## 2.2.29(2024-01-20)
+- 新增 show事件,弹窗弹出时触发该事件 [详情](https://github.com/dcloudio/uni-app/issues/4694)
+## 2.2.28(2024-01-18)
+- 去除 noChange事件,当进行日期范围选择时,若只选了一天,则开始结束日期都为同一天 [详情](https://github.com/dcloudio/uni-ui/issues/815)
+## 2.2.27(2024-01-10)
+- 优化 增加noChange事件,当进行日期范围选择时,若有空值,则触发该事件 [详情](https://github.com/dcloudio/uni-ui/issues/815)
+## 2.2.26(2024-01-08)
+- 修复 字节小程序时间选择范围器失效问题 [详情](https://github.com/dcloudio/uni-ui/issues/834)
 ## 2.2.25(2023-10-18)
 - 修复 PC端初次修改时间,开始时间未更新的Bug [详情](https://github.com/dcloudio/uni-ui/issues/737)
 ## 2.2.24(2023-06-02)

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

@@ -21,7 +21,7 @@
 					<view class="uni-calendar__header-btn uni-calendar--right"></view>
 				</view>
 
-				<view v-if="!insert" class="dialog-close" @click="close">
+				<view v-if="!insert" class="dialog-close" @click="maskClick">
 					<view class="dialog-close-plus" data-id="close"></view>
 					<view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
 				</view>

+ 0 - 8
uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue

@@ -649,14 +649,6 @@
 				return new Date(year, month, 0).getDate();
 			},
 
-			//兼容 iOS、safari 日期格式
-			fixIosDateFormat(value) {
-				if (typeof value === 'string') {
-					value = value.replace(/-/g, '/')
-				}
-				return value
-			},
-
 			/**
 			 * 生成时间戳
 			 * @param {Object} time

+ 210 - 199
uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue

@@ -2,22 +2,20 @@
 	<view class="uni-date">
 		<view class="uni-date-editor" @click="show">
 			<slot>
-				<view
-          class="uni-date-editor--x"
-          :class="{'uni-date-editor--x__disabled': disabled,'uni-date-x--border': border}"
-        >
+				<view class="uni-date-editor--x"
+					:class="{'uni-date-editor--x__disabled': disabled,'uni-date-x--border': border}">
 					<view v-if="!isRange" class="uni-date-x uni-date-single">
 						<uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
 						<view class="uni-date__x-input">{{ displayValue || singlePlaceholderText }}</view>
 					</view>
 
 					<view v-else class="uni-date-x uni-date-range">
-            <uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
-            <view class="uni-date__x-input text-center">{{ displayRangeValue.startDate || startPlaceholderText }}</view>
+						<uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
+						<view class="uni-date__x-input text-center">{{ displayRangeValue.startDate || startPlaceholderText }}</view>
 
-            <view class="range-separator">{{rangeSeparator}}</view>
+						<view class="range-separator">{{rangeSeparator}}</view>
 
-            <view class="uni-date__x-input text-center">{{ displayRangeValue.endDate || endPlaceholderText }}</view>
+						<view class="uni-date__x-input text-center">{{ displayRangeValue.endDate || endPlaceholderText }}</view>
 					</view>
 
 					<view v-if="showClearIcon" class="uni-date__icon-clear" @click.stop="clear">
@@ -34,8 +32,7 @@
 				<view class="uni-popper__arrow"></view>
 
 				<view v-if="hasTime" class="uni-date-changed popup-x-header">
-					<input class="uni-date__input text-center" type="text" v-model="inputDate"
-						:placeholder="selectDateText" />
+					<input class="uni-date__input text-center" type="text" v-model="inputDate" :placeholder="selectDateText" />
 
 					<time-picker type="time" v-model="pickerTime" :border="false" :disabled="!inputDate"
 						:start="timepickerStartTime" :end="timepickerEndTime" :hideSecond="hideSecond" style="width: 100%;">
@@ -45,8 +42,7 @@
 				</view>
 
 				<Calendar ref="pcSingle" :showMonth="false" :start-date="calendarRange.startDate"
-					:end-date="calendarRange.endDate" :date="calendarDate" @change="singleChange"
-          :default-value="defaultValue"
+					:end-date="calendarRange.endDate" :date="calendarDate" @change="singleChange" :default-value="defaultValue"
 					style="padding: 0 8px;" />
 
 				<view v-if="hasTime" class="popup-x-footer">
@@ -58,18 +54,17 @@
 				<view class="uni-popper__arrow"></view>
 				<view v-if="hasTime" class="popup-x-header uni-date-changed">
 					<view class="popup-x-header--datetime">
-            <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startDate"
-            :placeholder="startDateText" />
+						<input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startDate"
+							:placeholder="startDateText" />
 
 						<time-picker type="time" v-model="tempRange.startTime" :start="timepickerStartTime" :border="false"
-            :disabled="!tempRange.startDate" :hideSecond="hideSecond">
-            <input class="uni-date__input uni-date-range__input" type="text"
-            v-model="tempRange.startTime" :placeholder="startTimeText"
-            :disabled="!tempRange.startDate" />
-          </time-picker>
-        </view>
+							:disabled="!tempRange.startDate" :hideSecond="hideSecond">
+							<input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startTime"
+								:placeholder="startTimeText" :disabled="!tempRange.startDate" />
+						</time-picker>
+					</view>
 
-        <uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons>
+					<uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons>
 
 					<view class="popup-x-header--datetime">
 						<input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.endDate"
@@ -85,12 +80,11 @@
 
 				<view class="popup-x-body">
 					<Calendar ref="left" :showMonth="false" :start-date="calendarRange.startDate"
-            :end-date="calendarRange.endDate" :range="true" :pleStatus="endMultipleStatus"
-            @change="leftChange" @firstEnterCale="updateRightCale" style="padding: 0 8px;" />
+						:end-date="calendarRange.endDate" :range="true" :pleStatus="endMultipleStatus" @change="leftChange"
+						@firstEnterCale="updateRightCale" style="padding: 0 8px;" />
 					<Calendar ref="right" :showMonth="false" :start-date="calendarRange.startDate"
-						:end-date="calendarRange.endDate" :range="true" @change="rightChange"
-						:pleStatus="startMultipleStatus" @firstEnterCale="updateLeftCale"
-						style="padding: 0 8px;border-left: 1px solid #F1F1F1;" />
+						:end-date="calendarRange.endDate" :range="true" @change="rightChange" :pleStatus="startMultipleStatus"
+						@firstEnterCale="updateLeftCale" style="padding: 0 8px;border-left: 1px solid #F1F1F1;" />
 				</view>
 
 				<view v-if="hasTime" class="popup-x-footer">
@@ -102,8 +96,7 @@
 
 		<Calendar v-if="isPhone" ref="mobile" :clearDate="false" :date="calendarDate" :defTime="mobileCalendarTime"
 			:start-date="calendarRange.startDate" :end-date="calendarRange.endDate" :selectableTimes="mobSelectableTime"
-      :startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder"
-      :default-value="defaultValue"
+			:startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder" :default-value="defaultValue"
 			:pleStatus="endMultipleStatus" :showMonth="false" :range="isRange" :hasTime="hasTime" :insert="false"
 			:hideSecond="hideSecond" @confirm="mobileChange" @maskClose="close" />
 	</view>
@@ -133,9 +126,19 @@
 	 **/
 	import Calendar from './calendar.vue'
 	import TimePicker from './time-picker.vue'
-	import { initVueI18n } from '@dcloudio/uni-i18n'
+	import {
+		initVueI18n
+	} from '@dcloudio/uni-i18n'
 	import i18nMessages from './i18n/index.js'
-  import { getDateTime, getDate, getTime, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat } from './util'
+	import {
+		getDateTime,
+		getDate,
+		getTime,
+		getDefaultSecond,
+		dateCompare,
+		checkDate,
+		fixIosDateFormat
+	} from './util'
 
 	export default {
 		name: 'UniDatetimePicker',
@@ -188,7 +191,7 @@
 				isEmitValue: false,
 				isPhone: false,
 				isFirstShow: true,
-        i18nT: () => {}
+				i18nT: () => {}
 			}
 		},
 		props: {
@@ -221,7 +224,7 @@
 				default: ''
 			},
 			startPlaceholder: {
-        type: String,
+				type: String,
 				default: ''
 			},
 			endPlaceholder: {
@@ -248,16 +251,16 @@
 				type: [Boolean],
 				default: false
 			},
-      defaultValue: {
-        type: [String, Object, Array],
-        default: ''
-      }
+			defaultValue: {
+				type: [String, Object, Array],
+				default: ''
+			}
 		},
 		watch: {
 			type: {
 				immediate: true,
 				handler(newVal) {
-          this.hasTime = newVal.indexOf('time') !== -1
+					this.hasTime = newVal.indexOf('time') !== -1
 					this.isRange = newVal.indexOf('range') !== -1
 				}
 			},
@@ -348,9 +351,9 @@
 			selectDateText() {
 				return this.i18nT("uni-datetime-picker.selectDate")
 			},
-      selectDateTimeText() {
-        return this.i18nT("uni-datetime-picker.selectDateTime")
-      },
+			selectDateTimeText() {
+				return this.i18nT("uni-datetime-picker.selectDateTime")
+			},
 			selectTimeText() {
 				return this.i18nT("uni-datetime-picker.selectTime")
 			},
@@ -373,18 +376,19 @@
 				return this.i18nT("uni-datetime-picker.clear")
 			},
 			showClearIcon() {
-				return this.clearIcon && !this.disabled && (this.displayValue || (this.displayRangeValue.startDate && this.displayRangeValue.endDate))
+				return this.clearIcon && !this.disabled && (this.displayValue || (this.displayRangeValue.startDate && this
+					.displayRangeValue.endDate))
 			}
 		},
 		created() {
 			this.initI18nT()
-      this.platform()
+			this.platform()
 		},
 		methods: {
-      initI18nT() {
-        const vueI18n = initVueI18n(i18nMessages)
-        this.i18nT = vueI18n.t
-      },
+			initI18nT() {
+				const vueI18n = initVueI18n(i18nMessages)
+				this.i18nT = vueI18n.t
+			},
 			initPicker(newVal) {
 				if ((!newVal && !this.defaultValue) || Array.isArray(newVal) && !newVal.length) {
 					this.$nextTick(() => {
@@ -394,26 +398,26 @@
 				}
 
 				if (!Array.isArray(newVal) && !this.isRange) {
-          if(newVal){
-            this.displayValue = this.inputDate = this.calendarDate = getDate(newVal)
-            if (this.hasTime) {
-              this.pickerTime = getTime(newVal, this.hideSecond)
-              this.displayValue = `${this.displayValue} ${this.pickerTime}`
-            }
-          }else if(this.defaultValue){
-            this.inputDate = this.calendarDate = getDate(this.defaultValue)
-            if(this.hasTime){
-              this.pickerTime = getTime(this.defaultValue, this.hideSecond)
-            }
-          }
+					if (newVal) {
+						this.displayValue = this.inputDate = this.calendarDate = getDate(newVal)
+						if (this.hasTime) {
+							this.pickerTime = getTime(newVal, this.hideSecond)
+							this.displayValue = `${this.displayValue} ${this.pickerTime}`
+						}
+					} else if (this.defaultValue) {
+						this.inputDate = this.calendarDate = getDate(this.defaultValue)
+						if (this.hasTime) {
+							this.pickerTime = getTime(this.defaultValue, this.hideSecond)
+						}
+					}
 				} else {
 					const [before, after] = newVal
 					if (!before && !after) return
-          const beforeDate = getDate(before)
-          const beforeTime = getTime(before, this.hideSecond)
+					const beforeDate = getDate(before)
+					const beforeTime = getTime(before, this.hideSecond)
 
-          const afterDate = getDate(after)
-          const afterTime = getTime(after, this.hideSecond)
+					const afterDate = getDate(after)
+					const afterTime = getTime(after, this.hideSecond)
 					const startDate = beforeDate
 					const endDate = afterDate
 					this.displayRangeValue.startDate = this.tempRange.startDate = startDate
@@ -450,23 +454,26 @@
 				right.setDate(this.$refs.right.nowDate.fullDate)
 			},
 			platform() {
-        if(typeof navigator !== "undefined"){
-          this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
-          return
-        }
-				const { windowWidth } = uni.getSystemInfoSync()
+				if (typeof navigator !== "undefined") {
+					this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
+					return
+				}
+				const {
+					windowWidth
+				} = uni.getSystemInfoSync()
 				this.isPhone = windowWidth <= 500
 				this.windowWidth = windowWidth
 			},
 			show() {
+				this.$emit("show")
 				if (this.disabled) {
 					return
 				}
 				this.platform()
 				if (this.isPhone) {
 					setTimeout(() => {
-            this.$refs.mobile.open()
-          }, 0);
+						this.$refs.mobile.open()
+					}, 0);
 					return
 				}
 				this.pickerPositionStyle = {
@@ -491,8 +498,8 @@
 								this.$refs.right.changeMonth('pre')
 							}
 						} else {
-							this.$refs.right.changeMonth('next')
-							if(this.isPhone){
+							// this.$refs.right.changeMonth('next')
+							if (this.isPhone) {
 								this.$refs.right.cale.lastHover = false;
 							}
 						}
@@ -546,52 +553,52 @@
 				this.confirmSingleChange()
 			},
 			confirmSingleChange() {
-        if(!checkDate(this.inputDate)){
+				if (!checkDate(this.inputDate)) {
 					const now = new Date()
-          this.calendarDate = this.inputDate = getDate(now)
+					this.calendarDate = this.inputDate = getDate(now)
 					this.pickerTime = getTime(now, this.hideSecond)
-        }
-
-        let startLaterInputDate = false
-        let startDate, startTime
-        if(this.start) {
-          let startString = this.start
-          if(typeof this.start === 'number'){
-            startString = getDateTime(this.start, this.hideSecond)
-          }
-          [startDate, startTime] = startString.split(' ')
-          if(this.start && !dateCompare(startDate, this.inputDate)) {
-            startLaterInputDate = true
-            this.inputDate = startDate
-          }
-        }
-
-        let endEarlierInputDate = false
-        let endDate, endTime
-        if(this.end) {
-          let endString = this.end
-          if(typeof this.end === 'number'){
-            endString = getDateTime(this.end, this.hideSecond)
-          }
-          [endDate, endTime] = endString.split(' ')
-          if(this.end && !dateCompare(this.inputDate, endDate)) {
-            endEarlierInputDate = true
-            this.inputDate = endDate
-          }
-        }
+				}
+
+				let startLaterInputDate = false
+				let startDate, startTime
+				if (this.start) {
+					let startString = this.start
+					if (typeof this.start === 'number') {
+						startString = getDateTime(this.start, this.hideSecond)
+					}
+					[startDate, startTime] = startString.split(' ')
+					if (this.start && !dateCompare(startDate, this.inputDate)) {
+						startLaterInputDate = true
+						this.inputDate = startDate
+					}
+				}
+
+				let endEarlierInputDate = false
+				let endDate, endTime
+				if (this.end) {
+					let endString = this.end
+					if (typeof this.end === 'number') {
+						endString = getDateTime(this.end, this.hideSecond)
+					}
+					[endDate, endTime] = endString.split(' ')
+					if (this.end && !dateCompare(this.inputDate, endDate)) {
+						endEarlierInputDate = true
+						this.inputDate = endDate
+					}
+				}
 				if (this.hasTime) {
-          if(startLaterInputDate){
-            this.pickerTime = startTime || getDefaultSecond(this.hideSecond)
-          }
-          if(endEarlierInputDate){
-            this.pickerTime = endTime || getDefaultSecond(this.hideSecond)
-          }
-          if(!this.pickerTime){
-            this.pickerTime = getTime(Date.now(), this.hideSecond)
-          }
+					if (startLaterInputDate) {
+						this.pickerTime = startTime || getDefaultSecond(this.hideSecond)
+					}
+					if (endEarlierInputDate) {
+						this.pickerTime = endTime || getDefaultSecond(this.hideSecond)
+					}
+					if (!this.pickerTime) {
+						this.pickerTime = getTime(Date.now(), this.hideSecond)
+					}
 					this.displayValue = `${this.inputDate} ${this.pickerTime}`
 				} else {
-          this.displayValue = this.inputDate
+					this.displayValue = this.inputDate
 				}
 				this.setEmit(this.displayValue)
 				this.pickerVisible = false
@@ -626,11 +633,13 @@
 			},
 			mobileChange(e) {
 				if (this.isRange) {
-					const {before, after} = e.range
-
-          if(!before || !after){
-            return
-          }
+					const {
+						before,
+						after
+					} = e.range
+					if (!before) {
+						return;
+					}
 
 					this.handleStartAndEnd(before, after, true)
 					if (this.hasTime) {
@@ -663,79 +672,79 @@
 					this.pickerVisible = false
 					return
 				}
-        if(!checkDate(this.tempRange.startDate)){
-          this.tempRange.startDate = getDate(Date.now())
-        }
-        if(!checkDate(this.tempRange.endDate)){
-          this.tempRange.endDate = getDate(Date.now())
-        }
+				if (!checkDate(this.tempRange.startDate)) {
+					this.tempRange.startDate = getDate(Date.now())
+				}
+				if (!checkDate(this.tempRange.endDate)) {
+					this.tempRange.endDate = getDate(Date.now())
+				}
 
 				let start, end
 
-        let startDateLaterRangeStartDate = false
-        let startDateLaterRangeEndDate = false
-        let startDate, startTime
-        if(this.start) {
-          let startString = this.start
-          if(typeof this.start === 'number'){
-            startString = getDateTime(this.start, this.hideSecond)
-          }
-          [startDate,startTime] = startString.split(' ')
-          if(this.start && !dateCompare(this.start, this.tempRange.startDate)) {
-            startDateLaterRangeStartDate = true
-            this.tempRange.startDate = startDate
-          }
-          if(this.start && !dateCompare(this.start, this.tempRange.endDate)) {
-            startDateLaterRangeEndDate = true
-            this.tempRange.endDate = startDate
-          }
-        }
-        let endDateEarlierRangeStartDate = false
-        let endDateEarlierRangeEndDate = false
-        let endDate, endTime
-        if(this.end) {
-          let endString = this.end
-          if(typeof this.end === 'number'){
-            endString = getDateTime(this.end, this.hideSecond)
-          }
-          [endDate,endTime] = endString.split(' ')
-
-          if(this.end && !dateCompare(this.tempRange.startDate, this.end)) {
-            endDateEarlierRangeStartDate = true
-            this.tempRange.startDate = endDate
-          }
-          if(this.end && !dateCompare(this.tempRange.endDate, this.end)) {
-            endDateEarlierRangeEndDate = true
-            this.tempRange.endDate = endDate
-          }
-        }
+				let startDateLaterRangeStartDate = false
+				let startDateLaterRangeEndDate = false
+				let startDate, startTime
+				if (this.start) {
+					let startString = this.start
+					if (typeof this.start === 'number') {
+						startString = getDateTime(this.start, this.hideSecond)
+					}
+					[startDate, startTime] = startString.split(' ')
+					if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
+						startDateLaterRangeStartDate = true
+						this.tempRange.startDate = startDate
+					}
+					if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
+						startDateLaterRangeEndDate = true
+						this.tempRange.endDate = startDate
+					}
+				}
+				let endDateEarlierRangeStartDate = false
+				let endDateEarlierRangeEndDate = false
+				let endDate, endTime
+				if (this.end) {
+					let endString = this.end
+					if (typeof this.end === 'number') {
+						endString = getDateTime(this.end, this.hideSecond)
+					}
+					[endDate, endTime] = endString.split(' ')
+
+					if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
+						endDateEarlierRangeStartDate = true
+						this.tempRange.startDate = endDate
+					}
+					if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
+						endDateEarlierRangeEndDate = true
+						this.tempRange.endDate = endDate
+					}
+				}
 				if (!this.hasTime) {
-          start = this.displayRangeValue.startDate = this.tempRange.startDate
+					start = this.displayRangeValue.startDate = this.tempRange.startDate
 					end = this.displayRangeValue.endDate = this.tempRange.endDate
 				} else {
-          if(startDateLaterRangeStartDate){
-            this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond)
-          }else if(endDateEarlierRangeStartDate){
-            this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond)
-          }
-          if(!this.tempRange.startTime){
-            this.tempRange.startTime = getTime(Date.now(), this.hideSecond)
-          }
-
-          if(startDateLaterRangeEndDate){
-            this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond)
-          }else if(endDateEarlierRangeEndDate){
-            this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond)
-          }
-          if(!this.tempRange.endTime){
-            this.tempRange.endTime = getTime(Date.now(), this.hideSecond)
-          }
+					if (startDateLaterRangeStartDate) {
+						this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond)
+					} else if (endDateEarlierRangeStartDate) {
+						this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond)
+					}
+					if (!this.tempRange.startTime) {
+						this.tempRange.startTime = getTime(Date.now(), this.hideSecond)
+					}
+
+					if (startDateLaterRangeEndDate) {
+						this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond)
+					} else if (endDateEarlierRangeEndDate) {
+						this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond)
+					}
+					if (!this.tempRange.endTime) {
+						this.tempRange.endTime = getTime(Date.now(), this.hideSecond)
+					}
 					start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`
 					end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`
 				}
-        if(!dateCompare(start,end)){
-          [start, end] = [end, start]
-        }
+				if (!dateCompare(start, end)) {
+					[start, end] = [end, start]
+				}
 				this.displayRangeValue.startDate = start
 				this.displayRangeValue.endDate = end
 				const displayRange = [start, end]
@@ -743,13 +752,13 @@
 				this.pickerVisible = false
 			},
 			handleStartAndEnd(before, after, temp = false) {
-				if (!(before && after)) return
-
+				if (!before) return
+				if(!after)after = before;
 				const type = temp ? 'tempRange' : 'range'
-        const isStartEarlierEnd = dateCompare(before, after)
-        this[type].startDate = isStartEarlierEnd ? before : after
-        this[type].endDate = isStartEarlierEnd ? after : before
-    },
+				const isStartEarlierEnd = dateCompare(before, after)
+				this[type].startDate = isStartEarlierEnd ? before : after
+				this[type].endDate = isStartEarlierEnd ? after : before
+			},
 			/**
 			 * 比较时间大小
 			 */
@@ -820,6 +829,7 @@
 		width: 100%;
 		flex: 1;
 	}
+
 	.uni-date-x {
 		display: flex;
 		flex-direction: row;
@@ -831,16 +841,17 @@
 		font-size: 14px;
 		flex: 1;
 
-    .icon-calendar{
-      padding-left: 3px;
-    }
-    .range-separator{
-      height: 35px;
-      /* #ifndef MP */
-      padding: 0 2px;
-      /* #endif */
+		.icon-calendar {
+			padding-left: 3px;
+		}
+
+		.range-separator {
+			height: 35px;
+			/* #ifndef MP */
+			padding: 0 2px;
+			/* #endif */
 			line-height: 35px;
-    }
+		}
 	}
 
 	.uni-date-x--border {
@@ -867,9 +878,9 @@
 	.uni-date__x-input {
 		width: auto;
 		height: 35px;
-    /* #ifndef MP */
-    padding-left: 5px;
-    /* #endif */
+		/* #ifndef MP */
+		padding-left: 5px;
+		/* #endif */
 		position: relative;
 		flex: 1;
 		line-height: 35px;

+ 101 - 83
uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js

@@ -13,7 +13,7 @@ class Calendar {
 		this.startDate = startDate
 		// 终止时间
 		this.endDate = endDate
-    // 是否范围选择
+		// 是否范围选择
 		this.range = range
 		// 多选状态
 		this.cleanMultipleStatus()
@@ -49,44 +49,44 @@ class Calendar {
 		this.endDate = endDate
 	}
 
-  getPreMonthObj(date){
-    date = fixIosDateFormat(date)
-    date = new Date(date)
-
-    const oldMonth = date.getMonth()
-    date.setMonth(oldMonth - 1)
-    const newMonth = date.getMonth()
-    if(oldMonth !== 0 && newMonth - oldMonth === 0){
-      date.setMonth(newMonth - 1)
-    }
-    return this.getDateObj(date)
-  }
-  getNextMonthObj(date){
-    date = fixIosDateFormat(date)
-    date = new Date(date)
-
-    const oldMonth = date.getMonth()
-    date.setMonth(oldMonth + 1)
-    const newMonth = date.getMonth()
-    if(newMonth - oldMonth > 1){
-      date.setMonth(newMonth - 1)
-    }
-    return this.getDateObj(date)
-  }
+	getPreMonthObj(date) {
+		date = fixIosDateFormat(date)
+		date = new Date(date)
+
+		const oldMonth = date.getMonth()
+		date.setMonth(oldMonth - 1)
+		const newMonth = date.getMonth()
+		if (oldMonth !== 0 && newMonth - oldMonth === 0) {
+			date.setMonth(newMonth - 1)
+		}
+		return this.getDateObj(date)
+	}
+	getNextMonthObj(date) {
+		date = fixIosDateFormat(date)
+		date = new Date(date)
+
+		const oldMonth = date.getMonth()
+		date.setMonth(oldMonth + 1)
+		const newMonth = date.getMonth()
+		if (newMonth - oldMonth > 1) {
+			date.setMonth(newMonth - 1)
+		}
+		return this.getDateObj(date)
+	}
 
 	/**
 	 * 获取指定格式Date对象
 	 */
 	getDateObj(date) {
-    date = fixIosDateFormat(date)
-    date = new Date(date)
+		date = fixIosDateFormat(date)
+		date = new Date(date)
 
 		return {
 			fullDate: getDate(date),
-      year: date.getFullYear(),
-      month: addZero(date.getMonth() + 1),
-      date: addZero(date.getDate()),
-      day: date.getDay()
+			year: date.getFullYear(),
+			month: addZero(date.getMonth() + 1),
+			date: addZero(date.getDate()),
+			day: date.getDay()
 		}
 	}
 
@@ -96,7 +96,7 @@ class Calendar {
 	getPreMonthDays(amount, dateObj) {
 		const result = []
 		for (let i = amount - 1; i >= 0; i--) {
-      const month = dateObj.month - 1
+			const month = dateObj.month - 1
 			result.push({
 				date: new Date(dateObj.year, month, -i).getDate(),
 				month,
@@ -135,11 +135,11 @@ class Calendar {
 			let multiples = this.multipleStatus.data
 			let multiplesStatus = -1
 			if (this.range && multiples) {
-        multiplesStatus = multiples.findIndex((item) => {
-          return this.dateEqual(item, currentDate)
-        })
+				multiplesStatus = multiples.findIndex((item) => {
+					return this.dateEqual(item, currentDate)
+				})
 			}
-      const checked = multiplesStatus !== -1
+			const checked = multiplesStatus !== -1
 
 			result.push({
 				fullDate: currentDate,
@@ -149,10 +149,11 @@ class Calendar {
 				beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
 				afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
 				month: dateObj.month,
-				disable: (this.startDate && !dateCompare(this.startDate, currentDate)) || (this.endDate && !dateCompare(currentDate,this.endDate)),
+				disable: (this.startDate && !dateCompare(this.startDate, currentDate)) || (this.endDate && !dateCompare(
+					currentDate, this.endDate)),
 				isToday,
 				userChecked: false,
-        extraInfo: info
+				extraInfo: info
 			})
 		}
 		return result
@@ -162,7 +163,7 @@ class Calendar {
 	 */
 	_getNextMonthDays(amount, dateObj) {
 		const result = []
-    const month = dateObj.month + 1
+		const month = dateObj.month + 1
 		for (let i = 1; i <= amount; i++) {
 			result.push({
 				date: i,
@@ -240,7 +241,7 @@ class Calendar {
 	 *  获取多选状态
 	 */
 	setMultiple(fullDate) {
-    if (!this.range) return
+		if (!this.range) return
 
 		let {
 			before,
@@ -259,6 +260,7 @@ class Calendar {
 		} else {
 			if (!before) {
 				this.multipleStatus.before = fullDate
+				this.multipleStatus.after = undefined;
 				this.lastHover = false
 			} else {
 				this.multipleStatus.after = fullDate
@@ -279,9 +281,12 @@ class Calendar {
 	 *  鼠标 hover 更新多选状态
 	 */
 	setHoverMultiple(fullDate) {
-    if (!this.range || this.lastHover) return
-
-		const { before } = this.multipleStatus
+		//抖音小程序点击会触发hover事件,需要避免一下
+		// #ifndef MP-TOUTIAO
+		if (!this.range || this.lastHover) return
+		const {
+			before
+		} = this.multipleStatus
 
 		if (!before) {
 			this.multipleStatus.before = fullDate
@@ -294,6 +299,8 @@ class Calendar {
 			}
 		}
 		this.getWeeks(fullDate)
+		// #endif
+
 	}
 
 	/**
@@ -324,22 +331,22 @@ class Calendar {
 		} = this.getDateObj(dateData)
 
 		const preMonthDayAmount = new Date(year, month - 1, 1).getDay()
-    const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData))
+		const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData))
 
 		const currentMonthDayAmount = new Date(year, month, 0).getDate()
-    const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData))
+		const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData))
 
-    const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount
-    const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData))
+		const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount
+		const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData))
 
 		const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays]
 
 		const weeks = new Array(6)
 		for (let i = 0; i < calendarDays.length; i++) {
-      const index = Math.floor(i / 7)
-      if(!weeks[index]){
-        weeks[index] = new Array(7)
-      }
+			const index = Math.floor(i / 7)
+			if (!weeks[index]) {
+				weeks[index] = new Array(7)
+			}
 			weeks[index][i % 7] = calendarDays[i]
 		}
 
@@ -348,56 +355,67 @@ class Calendar {
 	}
 }
 
-function getDateTime(date, hideSecond){
-  return `${getDate(date)} ${getTime(date, hideSecond)}`
+function getDateTime(date, hideSecond) {
+	return `${getDate(date)} ${getTime(date, hideSecond)}`
 }
 
 function getDate(date) {
-  date = fixIosDateFormat(date)
-  date = new Date(date)
-  const year = date.getFullYear()
-  const month = date.getMonth()+1
-  const day = date.getDate()
-  return `${year}-${addZero(month)}-${addZero(day)}`
+	date = fixIosDateFormat(date)
+	date = new Date(date)
+	const year = date.getFullYear()
+	const month = date.getMonth() + 1
+	const day = date.getDate()
+	return `${year}-${addZero(month)}-${addZero(day)}`
 }
 
-function getTime(date, hideSecond){
-  date = fixIosDateFormat(date)
-  date = new Date(date)
-  const hour = date.getHours()
-  const minute = date.getMinutes()
-  const second = date.getSeconds()
-  return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`
+function getTime(date, hideSecond) {
+	date = fixIosDateFormat(date)
+	date = new Date(date)
+	const hour = date.getHours()
+	const minute = date.getMinutes()
+	const second = date.getSeconds()
+	return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`
 }
 
 function addZero(num) {
-  if(num < 10){
-    num = `0${num}`
-  }
-  return num
+	if (num < 10) {
+		num = `0${num}`
+	}
+	return num
 }
 
 function getDefaultSecond(hideSecond) {
-  return hideSecond ? '00:00' : '00:00:00'
+	return hideSecond ? '00:00' : '00:00:00'
 }
 
 function dateCompare(startDate, endDate) {
-  startDate = new Date(fixIosDateFormat(startDate))
-  endDate = new Date(fixIosDateFormat(endDate))
-  return startDate <= endDate
+	startDate = new Date(fixIosDateFormat(startDate))
+	endDate = new Date(fixIosDateFormat(endDate))
+	return startDate <= endDate
 }
 
-function checkDate(date){
-  const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g
-  return date.match(dateReg)
+function checkDate(date) {
+	const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g
+	return date.match(dateReg)
 }
+//ios低版本15及以下,无法匹配 没有 ’秒‘ 时的情况,所以需要在末尾 秒 加上 问号
+const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?)?$/;
 
-const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9]:[0-5]?[0-9])?$/
 function fixIosDateFormat(value) {
-  if (typeof value === 'string' && dateTimeReg.test(value)) {
-    value = value.replace(/-/g, '/')
-  }
-  return value
+	if (typeof value === 'string' && dateTimeReg.test(value)) {
+		value = value.replace(/-/g, '/')
+	}
+	return value
 }
 
-export {Calendar, getDateTime, getDate, getTime, addZero, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat}
+export {
+	Calendar,
+	getDateTime,
+	getDate,
+	getTime,
+	addZero,
+	getDefaultSecond,
+	dateCompare,
+	checkDate,
+	fixIosDateFormat
+}

+ 1 - 1
uni_modules/uni-datetime-picker/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-datetime-picker",
   "displayName": "uni-datetime-picker 日期选择器",
-  "version": "2.2.25",
+  "version": "2.2.32",
   "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
   "keywords": [
     "uni-datetime-picker",

+ 10 - 0
uni_modules/uni-icons/changelog.md

@@ -1,3 +1,13 @@
+## 2.0.9(2024-01-12)
+fix: 修复图标大小默认值错误的问题
+## 2.0.8(2023-12-14)
+- 修复 项目未使用 ts 情况下,打包报错的bug
+## 2.0.7(2023-12-14)
+- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
+## 2.0.6(2023-12-11)
+- 优化 兼容老版本icon类型,如 top ,bottom 等
+## 2.0.5(2023-12-11)
+- 优化 兼容老版本icon类型,如 top ,bottom 等
 ## 2.0.4(2023-12-06)
 - 优化 uni-app x 下示例项目图标排序
 ## 2.0.3(2023-12-06)

+ 8 - 6
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue

@@ -5,7 +5,7 @@
 </template>
 
 <script>
-	import { fontData, IconsDataItem } from './uniicons-uvue'
+	import { fontData, IconsDataItem } from './uniicons_file'
 
 	/**
 	 * Icons 图标
@@ -30,7 +30,7 @@
 			},
 			size: {
 				type: Object,
-				default: 24
+				default: 16
 			},
 			fontFamily: {
 				type: String,
@@ -49,11 +49,13 @@
 				return ''
 			},
 			iconSize() : string {
-				if (typeof this.size == 'string') {
-					return '' + this.size
+				const size = this.size
+				if (typeof size == 'string') {
+					const reg = /^[0-9]*$/g
+					return reg.test(size as string) ? '' + size + 'px' : '' + size;
+					// return '' + this.size
 				}
-				const size = this.size as number
-				return this.getFontSize(size)
+				return this.getFontSize(size as number)
 			},
 			styleObj() : UTSJSONObject {
 				if (this.fontFamily !== '') {

+ 9 - 7
uni_modules/uni-icons/components/uni-icons/uni-icons.vue

@@ -10,7 +10,13 @@
 </template>
 
 <script>
-	import { fontData } from './uniicons.js';
+	import { fontData } from './uniicons_file_vue.js';
+
+	const getVal = (val) => {
+		const reg = /^[0-9]*$/g
+		return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
+	}
+
 	// #ifdef APP-NVUE
 	var domModule = weex.requireModule('dom');
 	import iconUrl from './uniicons.ttf'
@@ -44,7 +50,7 @@
 			},
 			size: {
 				type: [Number, String],
-				default: 24
+				default: 16
 			},
 			customPrefix: {
 				type: String,
@@ -69,11 +75,7 @@
 				return ''
 			},
 			iconSize() {
-				if (typeof this.size == 'string') {
-					return this.size
-				}
-				const size = this.size
-				return size + 'px'
+				return getVal(this.size)
 			},
 			styleObj() {
 				if (this.fontFamily !== '') {

+ 8 - 0
uni_modules/uni-icons/components/uni-icons/uniicons.css

@@ -131,6 +131,10 @@
   content: "\e6b8";
 }
 
+.uniui-bottom:before {
+  content: "\e6b8";
+}
+
 .uniui-arrowright:before {
   content: "\e6d5";
 }
@@ -143,6 +147,10 @@
   content: "\e6b6";
 }
 
+.uniui-top:before {
+  content: "\e6b6";
+}
+
 .uniui-left:before {
   content: "\e6b7";
 }

+ 664 - 0
uni_modules/uni-icons/components/uni-icons/uniicons_file.ts

@@ -0,0 +1,664 @@
+
+export type IconsData = {
+	id : string
+	name : string
+	font_family : string
+	css_prefix_text : string
+	description : string
+	glyphs : Array<IconsDataItem>
+}
+
+export type IconsDataItem = {
+	font_class : string
+	unicode : string
+}
+
+
+export const fontData = [
+  {
+    "font_class": "arrow-down",
+    "unicode": "\ue6be"
+  },
+  {
+    "font_class": "arrow-left",
+    "unicode": "\ue6bc"
+  },
+  {
+    "font_class": "arrow-right",
+    "unicode": "\ue6bb"
+  },
+  {
+    "font_class": "arrow-up",
+    "unicode": "\ue6bd"
+  },
+  {
+    "font_class": "auth",
+    "unicode": "\ue6ab"
+  },
+  {
+    "font_class": "auth-filled",
+    "unicode": "\ue6cc"
+  },
+  {
+    "font_class": "back",
+    "unicode": "\ue6b9"
+  },
+  {
+    "font_class": "bars",
+    "unicode": "\ue627"
+  },
+  {
+    "font_class": "calendar",
+    "unicode": "\ue6a0"
+  },
+  {
+    "font_class": "calendar-filled",
+    "unicode": "\ue6c0"
+  },
+  {
+    "font_class": "camera",
+    "unicode": "\ue65a"
+  },
+  {
+    "font_class": "camera-filled",
+    "unicode": "\ue658"
+  },
+  {
+    "font_class": "cart",
+    "unicode": "\ue631"
+  },
+  {
+    "font_class": "cart-filled",
+    "unicode": "\ue6d0"
+  },
+  {
+    "font_class": "chat",
+    "unicode": "\ue65d"
+  },
+  {
+    "font_class": "chat-filled",
+    "unicode": "\ue659"
+  },
+  {
+    "font_class": "chatboxes",
+    "unicode": "\ue696"
+  },
+  {
+    "font_class": "chatboxes-filled",
+    "unicode": "\ue692"
+  },
+  {
+    "font_class": "chatbubble",
+    "unicode": "\ue697"
+  },
+  {
+    "font_class": "chatbubble-filled",
+    "unicode": "\ue694"
+  },
+  {
+    "font_class": "checkbox",
+    "unicode": "\ue62b"
+  },
+  {
+    "font_class": "checkbox-filled",
+    "unicode": "\ue62c"
+  },
+  {
+    "font_class": "checkmarkempty",
+    "unicode": "\ue65c"
+  },
+  {
+    "font_class": "circle",
+    "unicode": "\ue65b"
+  },
+  {
+    "font_class": "circle-filled",
+    "unicode": "\ue65e"
+  },
+  {
+    "font_class": "clear",
+    "unicode": "\ue66d"
+  },
+  {
+    "font_class": "close",
+    "unicode": "\ue673"
+  },
+  {
+    "font_class": "closeempty",
+    "unicode": "\ue66c"
+  },
+  {
+    "font_class": "cloud-download",
+    "unicode": "\ue647"
+  },
+  {
+    "font_class": "cloud-download-filled",
+    "unicode": "\ue646"
+  },
+  {
+    "font_class": "cloud-upload",
+    "unicode": "\ue645"
+  },
+  {
+    "font_class": "cloud-upload-filled",
+    "unicode": "\ue648"
+  },
+  {
+    "font_class": "color",
+    "unicode": "\ue6cf"
+  },
+  {
+    "font_class": "color-filled",
+    "unicode": "\ue6c9"
+  },
+  {
+    "font_class": "compose",
+    "unicode": "\ue67f"
+  },
+  {
+    "font_class": "contact",
+    "unicode": "\ue693"
+  },
+  {
+    "font_class": "contact-filled",
+    "unicode": "\ue695"
+  },
+  {
+    "font_class": "down",
+    "unicode": "\ue6b8"
+  },
+	{
+	  "font_class": "bottom",
+	  "unicode": "\ue6b8"
+	},
+  {
+    "font_class": "download",
+    "unicode": "\ue68d"
+  },
+  {
+    "font_class": "download-filled",
+    "unicode": "\ue681"
+  },
+  {
+    "font_class": "email",
+    "unicode": "\ue69e"
+  },
+  {
+    "font_class": "email-filled",
+    "unicode": "\ue69a"
+  },
+  {
+    "font_class": "eye",
+    "unicode": "\ue651"
+  },
+  {
+    "font_class": "eye-filled",
+    "unicode": "\ue66a"
+  },
+  {
+    "font_class": "eye-slash",
+    "unicode": "\ue6b3"
+  },
+  {
+    "font_class": "eye-slash-filled",
+    "unicode": "\ue6b4"
+  },
+  {
+    "font_class": "fire",
+    "unicode": "\ue6a1"
+  },
+  {
+    "font_class": "fire-filled",
+    "unicode": "\ue6c5"
+  },
+  {
+    "font_class": "flag",
+    "unicode": "\ue65f"
+  },
+  {
+    "font_class": "flag-filled",
+    "unicode": "\ue660"
+  },
+  {
+    "font_class": "folder-add",
+    "unicode": "\ue6a9"
+  },
+  {
+    "font_class": "folder-add-filled",
+    "unicode": "\ue6c8"
+  },
+  {
+    "font_class": "font",
+    "unicode": "\ue6a3"
+  },
+  {
+    "font_class": "forward",
+    "unicode": "\ue6ba"
+  },
+  {
+    "font_class": "gear",
+    "unicode": "\ue664"
+  },
+  {
+    "font_class": "gear-filled",
+    "unicode": "\ue661"
+  },
+  {
+    "font_class": "gift",
+    "unicode": "\ue6a4"
+  },
+  {
+    "font_class": "gift-filled",
+    "unicode": "\ue6c4"
+  },
+  {
+    "font_class": "hand-down",
+    "unicode": "\ue63d"
+  },
+  {
+    "font_class": "hand-down-filled",
+    "unicode": "\ue63c"
+  },
+  {
+    "font_class": "hand-up",
+    "unicode": "\ue63f"
+  },
+  {
+    "font_class": "hand-up-filled",
+    "unicode": "\ue63e"
+  },
+  {
+    "font_class": "headphones",
+    "unicode": "\ue630"
+  },
+  {
+    "font_class": "heart",
+    "unicode": "\ue639"
+  },
+  {
+    "font_class": "heart-filled",
+    "unicode": "\ue641"
+  },
+  {
+    "font_class": "help",
+    "unicode": "\ue679"
+  },
+  {
+    "font_class": "help-filled",
+    "unicode": "\ue674"
+  },
+  {
+    "font_class": "home",
+    "unicode": "\ue662"
+  },
+  {
+    "font_class": "home-filled",
+    "unicode": "\ue663"
+  },
+  {
+    "font_class": "image",
+    "unicode": "\ue670"
+  },
+  {
+    "font_class": "image-filled",
+    "unicode": "\ue678"
+  },
+  {
+    "font_class": "images",
+    "unicode": "\ue650"
+  },
+  {
+    "font_class": "images-filled",
+    "unicode": "\ue64b"
+  },
+  {
+    "font_class": "info",
+    "unicode": "\ue669"
+  },
+  {
+    "font_class": "info-filled",
+    "unicode": "\ue649"
+  },
+  {
+    "font_class": "left",
+    "unicode": "\ue6b7"
+  },
+  {
+    "font_class": "link",
+    "unicode": "\ue6a5"
+  },
+  {
+    "font_class": "list",
+    "unicode": "\ue644"
+  },
+  {
+    "font_class": "location",
+    "unicode": "\ue6ae"
+  },
+  {
+    "font_class": "location-filled",
+    "unicode": "\ue6af"
+  },
+  {
+    "font_class": "locked",
+    "unicode": "\ue66b"
+  },
+  {
+    "font_class": "locked-filled",
+    "unicode": "\ue668"
+  },
+  {
+    "font_class": "loop",
+    "unicode": "\ue633"
+  },
+  {
+    "font_class": "mail-open",
+    "unicode": "\ue643"
+  },
+  {
+    "font_class": "mail-open-filled",
+    "unicode": "\ue63a"
+  },
+  {
+    "font_class": "map",
+    "unicode": "\ue667"
+  },
+  {
+    "font_class": "map-filled",
+    "unicode": "\ue666"
+  },
+  {
+    "font_class": "map-pin",
+    "unicode": "\ue6ad"
+  },
+  {
+    "font_class": "map-pin-ellipse",
+    "unicode": "\ue6ac"
+  },
+  {
+    "font_class": "medal",
+    "unicode": "\ue6a2"
+  },
+  {
+    "font_class": "medal-filled",
+    "unicode": "\ue6c3"
+  },
+  {
+    "font_class": "mic",
+    "unicode": "\ue671"
+  },
+  {
+    "font_class": "mic-filled",
+    "unicode": "\ue677"
+  },
+  {
+    "font_class": "micoff",
+    "unicode": "\ue67e"
+  },
+  {
+    "font_class": "micoff-filled",
+    "unicode": "\ue6b0"
+  },
+  {
+    "font_class": "minus",
+    "unicode": "\ue66f"
+  },
+  {
+    "font_class": "minus-filled",
+    "unicode": "\ue67d"
+  },
+  {
+    "font_class": "more",
+    "unicode": "\ue64d"
+  },
+  {
+    "font_class": "more-filled",
+    "unicode": "\ue64e"
+  },
+  {
+    "font_class": "navigate",
+    "unicode": "\ue66e"
+  },
+  {
+    "font_class": "navigate-filled",
+    "unicode": "\ue67a"
+  },
+  {
+    "font_class": "notification",
+    "unicode": "\ue6a6"
+  },
+  {
+    "font_class": "notification-filled",
+    "unicode": "\ue6c1"
+  },
+  {
+    "font_class": "paperclip",
+    "unicode": "\ue652"
+  },
+  {
+    "font_class": "paperplane",
+    "unicode": "\ue672"
+  },
+  {
+    "font_class": "paperplane-filled",
+    "unicode": "\ue675"
+  },
+  {
+    "font_class": "person",
+    "unicode": "\ue699"
+  },
+  {
+    "font_class": "person-filled",
+    "unicode": "\ue69d"
+  },
+  {
+    "font_class": "personadd",
+    "unicode": "\ue69f"
+  },
+  {
+    "font_class": "personadd-filled",
+    "unicode": "\ue698"
+  },
+  {
+    "font_class": "personadd-filled-copy",
+    "unicode": "\ue6d1"
+  },
+  {
+    "font_class": "phone",
+    "unicode": "\ue69c"
+  },
+  {
+    "font_class": "phone-filled",
+    "unicode": "\ue69b"
+  },
+  {
+    "font_class": "plus",
+    "unicode": "\ue676"
+  },
+  {
+    "font_class": "plus-filled",
+    "unicode": "\ue6c7"
+  },
+  {
+    "font_class": "plusempty",
+    "unicode": "\ue67b"
+  },
+  {
+    "font_class": "pulldown",
+    "unicode": "\ue632"
+  },
+  {
+    "font_class": "pyq",
+    "unicode": "\ue682"
+  },
+  {
+    "font_class": "qq",
+    "unicode": "\ue680"
+  },
+  {
+    "font_class": "redo",
+    "unicode": "\ue64a"
+  },
+  {
+    "font_class": "redo-filled",
+    "unicode": "\ue655"
+  },
+  {
+    "font_class": "refresh",
+    "unicode": "\ue657"
+  },
+  {
+    "font_class": "refresh-filled",
+    "unicode": "\ue656"
+  },
+  {
+    "font_class": "refreshempty",
+    "unicode": "\ue6bf"
+  },
+  {
+    "font_class": "reload",
+    "unicode": "\ue6b2"
+  },
+  {
+    "font_class": "right",
+    "unicode": "\ue6b5"
+  },
+  {
+    "font_class": "scan",
+    "unicode": "\ue62a"
+  },
+  {
+    "font_class": "search",
+    "unicode": "\ue654"
+  },
+  {
+    "font_class": "settings",
+    "unicode": "\ue653"
+  },
+  {
+    "font_class": "settings-filled",
+    "unicode": "\ue6ce"
+  },
+  {
+    "font_class": "shop",
+    "unicode": "\ue62f"
+  },
+  {
+    "font_class": "shop-filled",
+    "unicode": "\ue6cd"
+  },
+  {
+    "font_class": "smallcircle",
+    "unicode": "\ue67c"
+  },
+  {
+    "font_class": "smallcircle-filled",
+    "unicode": "\ue665"
+  },
+  {
+    "font_class": "sound",
+    "unicode": "\ue684"
+  },
+  {
+    "font_class": "sound-filled",
+    "unicode": "\ue686"
+  },
+  {
+    "font_class": "spinner-cycle",
+    "unicode": "\ue68a"
+  },
+  {
+    "font_class": "staff",
+    "unicode": "\ue6a7"
+  },
+  {
+    "font_class": "staff-filled",
+    "unicode": "\ue6cb"
+  },
+  {
+    "font_class": "star",
+    "unicode": "\ue688"
+  },
+  {
+    "font_class": "star-filled",
+    "unicode": "\ue68f"
+  },
+  {
+    "font_class": "starhalf",
+    "unicode": "\ue683"
+  },
+  {
+    "font_class": "trash",
+    "unicode": "\ue687"
+  },
+  {
+    "font_class": "trash-filled",
+    "unicode": "\ue685"
+  },
+  {
+    "font_class": "tune",
+    "unicode": "\ue6aa"
+  },
+  {
+    "font_class": "tune-filled",
+    "unicode": "\ue6ca"
+  },
+  {
+    "font_class": "undo",
+    "unicode": "\ue64f"
+  },
+  {
+    "font_class": "undo-filled",
+    "unicode": "\ue64c"
+  },
+  {
+    "font_class": "up",
+    "unicode": "\ue6b6"
+  },
+	{
+	  "font_class": "top",
+	  "unicode": "\ue6b6"
+	},
+  {
+    "font_class": "upload",
+    "unicode": "\ue690"
+  },
+  {
+    "font_class": "upload-filled",
+    "unicode": "\ue68e"
+  },
+  {
+    "font_class": "videocam",
+    "unicode": "\ue68c"
+  },
+  {
+    "font_class": "videocam-filled",
+    "unicode": "\ue689"
+  },
+  {
+    "font_class": "vip",
+    "unicode": "\ue6a8"
+  },
+  {
+    "font_class": "vip-filled",
+    "unicode": "\ue6c6"
+  },
+  {
+    "font_class": "wallet",
+    "unicode": "\ue6b1"
+  },
+  {
+    "font_class": "wallet-filled",
+    "unicode": "\ue6c2"
+  },
+  {
+    "font_class": "weibo",
+    "unicode": "\ue68b"
+  },
+  {
+    "font_class": "weixin",
+    "unicode": "\ue691"
+  }
+] as IconsDataItem[]
+
+// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 649 - 0
uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js

@@ -0,0 +1,649 @@
+
+export const fontData = [
+  {
+    "font_class": "arrow-down",
+    "unicode": "\ue6be"
+  },
+  {
+    "font_class": "arrow-left",
+    "unicode": "\ue6bc"
+  },
+  {
+    "font_class": "arrow-right",
+    "unicode": "\ue6bb"
+  },
+  {
+    "font_class": "arrow-up",
+    "unicode": "\ue6bd"
+  },
+  {
+    "font_class": "auth",
+    "unicode": "\ue6ab"
+  },
+  {
+    "font_class": "auth-filled",
+    "unicode": "\ue6cc"
+  },
+  {
+    "font_class": "back",
+    "unicode": "\ue6b9"
+  },
+  {
+    "font_class": "bars",
+    "unicode": "\ue627"
+  },
+  {
+    "font_class": "calendar",
+    "unicode": "\ue6a0"
+  },
+  {
+    "font_class": "calendar-filled",
+    "unicode": "\ue6c0"
+  },
+  {
+    "font_class": "camera",
+    "unicode": "\ue65a"
+  },
+  {
+    "font_class": "camera-filled",
+    "unicode": "\ue658"
+  },
+  {
+    "font_class": "cart",
+    "unicode": "\ue631"
+  },
+  {
+    "font_class": "cart-filled",
+    "unicode": "\ue6d0"
+  },
+  {
+    "font_class": "chat",
+    "unicode": "\ue65d"
+  },
+  {
+    "font_class": "chat-filled",
+    "unicode": "\ue659"
+  },
+  {
+    "font_class": "chatboxes",
+    "unicode": "\ue696"
+  },
+  {
+    "font_class": "chatboxes-filled",
+    "unicode": "\ue692"
+  },
+  {
+    "font_class": "chatbubble",
+    "unicode": "\ue697"
+  },
+  {
+    "font_class": "chatbubble-filled",
+    "unicode": "\ue694"
+  },
+  {
+    "font_class": "checkbox",
+    "unicode": "\ue62b"
+  },
+  {
+    "font_class": "checkbox-filled",
+    "unicode": "\ue62c"
+  },
+  {
+    "font_class": "checkmarkempty",
+    "unicode": "\ue65c"
+  },
+  {
+    "font_class": "circle",
+    "unicode": "\ue65b"
+  },
+  {
+    "font_class": "circle-filled",
+    "unicode": "\ue65e"
+  },
+  {
+    "font_class": "clear",
+    "unicode": "\ue66d"
+  },
+  {
+    "font_class": "close",
+    "unicode": "\ue673"
+  },
+  {
+    "font_class": "closeempty",
+    "unicode": "\ue66c"
+  },
+  {
+    "font_class": "cloud-download",
+    "unicode": "\ue647"
+  },
+  {
+    "font_class": "cloud-download-filled",
+    "unicode": "\ue646"
+  },
+  {
+    "font_class": "cloud-upload",
+    "unicode": "\ue645"
+  },
+  {
+    "font_class": "cloud-upload-filled",
+    "unicode": "\ue648"
+  },
+  {
+    "font_class": "color",
+    "unicode": "\ue6cf"
+  },
+  {
+    "font_class": "color-filled",
+    "unicode": "\ue6c9"
+  },
+  {
+    "font_class": "compose",
+    "unicode": "\ue67f"
+  },
+  {
+    "font_class": "contact",
+    "unicode": "\ue693"
+  },
+  {
+    "font_class": "contact-filled",
+    "unicode": "\ue695"
+  },
+  {
+    "font_class": "down",
+    "unicode": "\ue6b8"
+  },
+	{
+	  "font_class": "bottom",
+	  "unicode": "\ue6b8"
+	},
+  {
+    "font_class": "download",
+    "unicode": "\ue68d"
+  },
+  {
+    "font_class": "download-filled",
+    "unicode": "\ue681"
+  },
+  {
+    "font_class": "email",
+    "unicode": "\ue69e"
+  },
+  {
+    "font_class": "email-filled",
+    "unicode": "\ue69a"
+  },
+  {
+    "font_class": "eye",
+    "unicode": "\ue651"
+  },
+  {
+    "font_class": "eye-filled",
+    "unicode": "\ue66a"
+  },
+  {
+    "font_class": "eye-slash",
+    "unicode": "\ue6b3"
+  },
+  {
+    "font_class": "eye-slash-filled",
+    "unicode": "\ue6b4"
+  },
+  {
+    "font_class": "fire",
+    "unicode": "\ue6a1"
+  },
+  {
+    "font_class": "fire-filled",
+    "unicode": "\ue6c5"
+  },
+  {
+    "font_class": "flag",
+    "unicode": "\ue65f"
+  },
+  {
+    "font_class": "flag-filled",
+    "unicode": "\ue660"
+  },
+  {
+    "font_class": "folder-add",
+    "unicode": "\ue6a9"
+  },
+  {
+    "font_class": "folder-add-filled",
+    "unicode": "\ue6c8"
+  },
+  {
+    "font_class": "font",
+    "unicode": "\ue6a3"
+  },
+  {
+    "font_class": "forward",
+    "unicode": "\ue6ba"
+  },
+  {
+    "font_class": "gear",
+    "unicode": "\ue664"
+  },
+  {
+    "font_class": "gear-filled",
+    "unicode": "\ue661"
+  },
+  {
+    "font_class": "gift",
+    "unicode": "\ue6a4"
+  },
+  {
+    "font_class": "gift-filled",
+    "unicode": "\ue6c4"
+  },
+  {
+    "font_class": "hand-down",
+    "unicode": "\ue63d"
+  },
+  {
+    "font_class": "hand-down-filled",
+    "unicode": "\ue63c"
+  },
+  {
+    "font_class": "hand-up",
+    "unicode": "\ue63f"
+  },
+  {
+    "font_class": "hand-up-filled",
+    "unicode": "\ue63e"
+  },
+  {
+    "font_class": "headphones",
+    "unicode": "\ue630"
+  },
+  {
+    "font_class": "heart",
+    "unicode": "\ue639"
+  },
+  {
+    "font_class": "heart-filled",
+    "unicode": "\ue641"
+  },
+  {
+    "font_class": "help",
+    "unicode": "\ue679"
+  },
+  {
+    "font_class": "help-filled",
+    "unicode": "\ue674"
+  },
+  {
+    "font_class": "home",
+    "unicode": "\ue662"
+  },
+  {
+    "font_class": "home-filled",
+    "unicode": "\ue663"
+  },
+  {
+    "font_class": "image",
+    "unicode": "\ue670"
+  },
+  {
+    "font_class": "image-filled",
+    "unicode": "\ue678"
+  },
+  {
+    "font_class": "images",
+    "unicode": "\ue650"
+  },
+  {
+    "font_class": "images-filled",
+    "unicode": "\ue64b"
+  },
+  {
+    "font_class": "info",
+    "unicode": "\ue669"
+  },
+  {
+    "font_class": "info-filled",
+    "unicode": "\ue649"
+  },
+  {
+    "font_class": "left",
+    "unicode": "\ue6b7"
+  },
+  {
+    "font_class": "link",
+    "unicode": "\ue6a5"
+  },
+  {
+    "font_class": "list",
+    "unicode": "\ue644"
+  },
+  {
+    "font_class": "location",
+    "unicode": "\ue6ae"
+  },
+  {
+    "font_class": "location-filled",
+    "unicode": "\ue6af"
+  },
+  {
+    "font_class": "locked",
+    "unicode": "\ue66b"
+  },
+  {
+    "font_class": "locked-filled",
+    "unicode": "\ue668"
+  },
+  {
+    "font_class": "loop",
+    "unicode": "\ue633"
+  },
+  {
+    "font_class": "mail-open",
+    "unicode": "\ue643"
+  },
+  {
+    "font_class": "mail-open-filled",
+    "unicode": "\ue63a"
+  },
+  {
+    "font_class": "map",
+    "unicode": "\ue667"
+  },
+  {
+    "font_class": "map-filled",
+    "unicode": "\ue666"
+  },
+  {
+    "font_class": "map-pin",
+    "unicode": "\ue6ad"
+  },
+  {
+    "font_class": "map-pin-ellipse",
+    "unicode": "\ue6ac"
+  },
+  {
+    "font_class": "medal",
+    "unicode": "\ue6a2"
+  },
+  {
+    "font_class": "medal-filled",
+    "unicode": "\ue6c3"
+  },
+  {
+    "font_class": "mic",
+    "unicode": "\ue671"
+  },
+  {
+    "font_class": "mic-filled",
+    "unicode": "\ue677"
+  },
+  {
+    "font_class": "micoff",
+    "unicode": "\ue67e"
+  },
+  {
+    "font_class": "micoff-filled",
+    "unicode": "\ue6b0"
+  },
+  {
+    "font_class": "minus",
+    "unicode": "\ue66f"
+  },
+  {
+    "font_class": "minus-filled",
+    "unicode": "\ue67d"
+  },
+  {
+    "font_class": "more",
+    "unicode": "\ue64d"
+  },
+  {
+    "font_class": "more-filled",
+    "unicode": "\ue64e"
+  },
+  {
+    "font_class": "navigate",
+    "unicode": "\ue66e"
+  },
+  {
+    "font_class": "navigate-filled",
+    "unicode": "\ue67a"
+  },
+  {
+    "font_class": "notification",
+    "unicode": "\ue6a6"
+  },
+  {
+    "font_class": "notification-filled",
+    "unicode": "\ue6c1"
+  },
+  {
+    "font_class": "paperclip",
+    "unicode": "\ue652"
+  },
+  {
+    "font_class": "paperplane",
+    "unicode": "\ue672"
+  },
+  {
+    "font_class": "paperplane-filled",
+    "unicode": "\ue675"
+  },
+  {
+    "font_class": "person",
+    "unicode": "\ue699"
+  },
+  {
+    "font_class": "person-filled",
+    "unicode": "\ue69d"
+  },
+  {
+    "font_class": "personadd",
+    "unicode": "\ue69f"
+  },
+  {
+    "font_class": "personadd-filled",
+    "unicode": "\ue698"
+  },
+  {
+    "font_class": "personadd-filled-copy",
+    "unicode": "\ue6d1"
+  },
+  {
+    "font_class": "phone",
+    "unicode": "\ue69c"
+  },
+  {
+    "font_class": "phone-filled",
+    "unicode": "\ue69b"
+  },
+  {
+    "font_class": "plus",
+    "unicode": "\ue676"
+  },
+  {
+    "font_class": "plus-filled",
+    "unicode": "\ue6c7"
+  },
+  {
+    "font_class": "plusempty",
+    "unicode": "\ue67b"
+  },
+  {
+    "font_class": "pulldown",
+    "unicode": "\ue632"
+  },
+  {
+    "font_class": "pyq",
+    "unicode": "\ue682"
+  },
+  {
+    "font_class": "qq",
+    "unicode": "\ue680"
+  },
+  {
+    "font_class": "redo",
+    "unicode": "\ue64a"
+  },
+  {
+    "font_class": "redo-filled",
+    "unicode": "\ue655"
+  },
+  {
+    "font_class": "refresh",
+    "unicode": "\ue657"
+  },
+  {
+    "font_class": "refresh-filled",
+    "unicode": "\ue656"
+  },
+  {
+    "font_class": "refreshempty",
+    "unicode": "\ue6bf"
+  },
+  {
+    "font_class": "reload",
+    "unicode": "\ue6b2"
+  },
+  {
+    "font_class": "right",
+    "unicode": "\ue6b5"
+  },
+  {
+    "font_class": "scan",
+    "unicode": "\ue62a"
+  },
+  {
+    "font_class": "search",
+    "unicode": "\ue654"
+  },
+  {
+    "font_class": "settings",
+    "unicode": "\ue653"
+  },
+  {
+    "font_class": "settings-filled",
+    "unicode": "\ue6ce"
+  },
+  {
+    "font_class": "shop",
+    "unicode": "\ue62f"
+  },
+  {
+    "font_class": "shop-filled",
+    "unicode": "\ue6cd"
+  },
+  {
+    "font_class": "smallcircle",
+    "unicode": "\ue67c"
+  },
+  {
+    "font_class": "smallcircle-filled",
+    "unicode": "\ue665"
+  },
+  {
+    "font_class": "sound",
+    "unicode": "\ue684"
+  },
+  {
+    "font_class": "sound-filled",
+    "unicode": "\ue686"
+  },
+  {
+    "font_class": "spinner-cycle",
+    "unicode": "\ue68a"
+  },
+  {
+    "font_class": "staff",
+    "unicode": "\ue6a7"
+  },
+  {
+    "font_class": "staff-filled",
+    "unicode": "\ue6cb"
+  },
+  {
+    "font_class": "star",
+    "unicode": "\ue688"
+  },
+  {
+    "font_class": "star-filled",
+    "unicode": "\ue68f"
+  },
+  {
+    "font_class": "starhalf",
+    "unicode": "\ue683"
+  },
+  {
+    "font_class": "trash",
+    "unicode": "\ue687"
+  },
+  {
+    "font_class": "trash-filled",
+    "unicode": "\ue685"
+  },
+  {
+    "font_class": "tune",
+    "unicode": "\ue6aa"
+  },
+  {
+    "font_class": "tune-filled",
+    "unicode": "\ue6ca"
+  },
+  {
+    "font_class": "undo",
+    "unicode": "\ue64f"
+  },
+  {
+    "font_class": "undo-filled",
+    "unicode": "\ue64c"
+  },
+  {
+    "font_class": "up",
+    "unicode": "\ue6b6"
+  },
+	{
+	  "font_class": "top",
+	  "unicode": "\ue6b6"
+	},
+  {
+    "font_class": "upload",
+    "unicode": "\ue690"
+  },
+  {
+    "font_class": "upload-filled",
+    "unicode": "\ue68e"
+  },
+  {
+    "font_class": "videocam",
+    "unicode": "\ue68c"
+  },
+  {
+    "font_class": "videocam-filled",
+    "unicode": "\ue689"
+  },
+  {
+    "font_class": "vip",
+    "unicode": "\ue6a8"
+  },
+  {
+    "font_class": "vip-filled",
+    "unicode": "\ue6c6"
+  },
+  {
+    "font_class": "wallet",
+    "unicode": "\ue6b1"
+  },
+  {
+    "font_class": "wallet-filled",
+    "unicode": "\ue6c2"
+  },
+  {
+    "font_class": "weibo",
+    "unicode": "\ue68b"
+  },
+  {
+    "font_class": "weixin",
+    "unicode": "\ue691"
+  }
+]
+
+// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 1 - 1
uni_modules/uni-icons/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-icons",
   "displayName": "uni-icons 图标",
-  "version": "2.0.4",
+  "version": "2.0.9",
   "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
   "keywords": [
     "uni-ui",

+ 7 - 0
utils/common.js

@@ -107,4 +107,11 @@ export function toHHmmss(data, flag = true) {
 			10 ? ('0' + seconds) : seconds);
 	}
 	return time;
+}
+
+export function getDate(date) {
+	let year = date.getFullYear();
+	let month = date.getMonth() + 1;
+	let day = date.getDate();
+	return `${year}-${month}-${day}`;
 }