mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 21:50:24 +08:00
优化datepicker组件
This commit is contained in:
@@ -38,6 +38,13 @@ Vue.component("datepicker", {
|
|||||||
watch: {
|
watch: {
|
||||||
value: function (v) {
|
value: function (v) {
|
||||||
this.day = 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: {
|
methods: {
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ window.teaweb = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (typeof (element) == "string") {
|
if (typeof (element) == "string") {
|
||||||
element = document.getElementById(element);
|
element = document.getElementById(element);
|
||||||
}
|
}
|
||||||
@@ -112,6 +111,8 @@ window.teaweb = {
|
|||||||
},
|
},
|
||||||
reposition: !bottomLeft
|
reposition: !bottomLeft
|
||||||
})
|
})
|
||||||
|
|
||||||
|
element.picker = picker
|
||||||
},
|
},
|
||||||
formatBytes: function (bytes) {
|
formatBytes: function (bytes) {
|
||||||
bytes = Math.ceil(bytes);
|
bytes = Math.ceil(bytes);
|
||||||
|
|||||||
Reference in New Issue
Block a user