优化datepicker组件

This commit is contained in:
GoEdgeLab
2022-11-04 14:35:32 +08:00
parent 15e89a7717
commit 8f9b428e7e
2 changed files with 9 additions and 1 deletions

View File

@@ -38,6 +38,13 @@ Vue.component("datepicker", {
watch: {
value: function (v) {
this.day = v
let picker = this.$refs.dayInput.picker
if (picker != null) {
if (v != null && /^\d+-\d+-\d+$/.test(v)) {
picker.setDate(v)
}
}
}
},
methods: {