Commit a7a34648 authored by shifangwuji's avatar shifangwuji

9/21(时间格式已经解决)

parent 044ffa3c
......@@ -327,8 +327,12 @@ export default {
this.form.jltype = parts[0] || ''
this.form.jllot = parts[1] || ''
// 验证并格式化 jlbzq
// 获取 jlbzqPart
const jlbzqPart = parts[2] || ''
// 检查 jlbzqPart 是否有数据
if (jlbzqPart.trim() !== '') {
// 验证并格式化 jlbzq
const jlbzqRegex = /^\d{4}-\d{2}-\d{2}$/ // 正则表达式用于验证 'yyyy-mm-dd' 格式
if (jlbzqRegex.test(jlbzqPart)) {
this.form.jlbzq = jlbzqPart
......@@ -341,10 +345,12 @@ export default {
type: 'error'
})
}
}
},
immediate: true // 立即执行一次以处理初始值
}
},
mounted() {
this.$nextTick(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment