momentJS时间相加 eg: 2024-12-12 12:30:12 + 50 = ?

watch(() => props.record, () => {
	if (props?.record) {
		let recordData = props?.record
		console.log('output-> recordData', recordData)
		// 2 - 待反馈
		if (recordData.status === 2) {
			deadline.value = moment(
				moment(recordData.createTime).add(!recordData?.feedBackMinute ? 0 : recordData?.feedBackMinute, 'm')
			).format('YYYY-MM-DD HH:mm:ss')
		}
		// 1 - 待签收
		if (recordData.status === 1) {
			deadline.value = moment(
				moment(recordData.createTime).add(!recordData?.signMinute ? 0 : recordData?.signMinute, 'm')
			).format('YYYY-MM-DD HH:mm:ss')
		}
	}
}, { deep: true, immediate: true })
posted @ 2024-04-10 14:44  Felix_Openmind  阅读(53)  评论(0编辑  收藏  举报