初始化

This commit is contained in:
yziiy
2025-08-11 11:06:07 +08:00
parent 083bc37c00
commit 5607d11395
19772 changed files with 3108723 additions and 18 deletions

26
uni_modules/UniDevTools/node_modules/licia/openFile.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
exports = function() {
var options =
arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return new Promise(function(resolve) {
var input = document.createElement('input');
input.style.position = 'fixed';
input.style.bottom = '0';
input.style.left = '0';
input.style.visibility = 'hidden';
input.setAttribute('type', 'file');
if (options.accept) {
input.setAttribute('accept', options.accept);
}
if (options.multiple) {
input.setAttribute('multiple', '');
}
document.body.appendChild(input);
input.addEventListener('change', function() {
document.body.removeChild(input);
resolve(input.files);
});
input.click();
});
};
module.exports = exports;