mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-30 17:41:54 +08:00
upload image by url in web ui
This commit is contained in:
@@ -211,11 +211,22 @@ export var tools = new function() {
|
||||
};
|
||||
};
|
||||
|
||||
self.input = new function() {
|
||||
return {
|
||||
"getFile": function(el) {
|
||||
return (el.files.length ? el.files[0] : null);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
self.hidden = new function() {
|
||||
return {
|
||||
"setVisible": function(el, visible) {
|
||||
el.classList.toggle("hidden", !visible);
|
||||
},
|
||||
"isVisible": function(el) {
|
||||
return !el.classList.contains("hidden");
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user