This commit is contained in:
Harvey Zack committed 2018-12-02 10:51:22 +08:00
1 parent 6deccca9be
commit 3e429add87
2 files changed
+4 -9

No files matched your search

+2 -5
View File
@@ -5565,7 +5565,6 @@
i18nMix$1(i18n);
return {
attach: function attach(target) {
console.log(target);
var $input = append(target, '<input type="file">');
setStyle(target, 'position', 'relative');
setStyles($input, {
@@ -5579,10 +5578,7 @@
proxy($input, 'change', function () {
var file = $input.files[0];
if (!file) {
return;
}
if (file) {
var ext = getExt(file.name);
if (ext && formats.includes(ext)) {
@@ -5601,6 +5597,7 @@
notice.show(tip, true, 3000);
console.warn(tip);
}
}
});
}
};
@@ -34,7 +34,6 @@ export default function artplayerPluginLocalPreview(art) {
return {
attach(target) {
console.log(target);
const $input = append(target, '<input type="file">');
setStyle(target, 'position', 'relative');
setStyles($input, {
@@ -47,9 +46,7 @@ export default function artplayerPluginLocalPreview(art) {
});
proxy($input, 'change', () => {
const file = $input.files[0];
if (!file) {
return;
}
if (file) {
const ext = getExt(file.name);
if (ext && formats.includes(ext)) {
const url = URL.createObjectURL(file);
@@ -67,6 +64,7 @@ export default function artplayerPluginLocalPreview(art) {
notice.show(tip, true, 3000);
console.warn(tip);
}
}
});
},
};