bugfix
This commit is contained in:
parent
bff0557fed
commit
6a9f4c858d
@ -485,17 +485,17 @@ bricks.UiFile = class extends bricks.VBox {
|
||||
this.dom_element.appendChild(this.input);
|
||||
}
|
||||
handleFileSelect(event){
|
||||
if (this.opts.multiple){
|
||||
files = [];
|
||||
var files = [];
|
||||
event.target.files.forEach(f => {
|
||||
if (! this.accept || f.type.startsWith(this.accept)){
|
||||
files.push(f);
|
||||
}
|
||||
});
|
||||
if (files.length == 0) return;
|
||||
if (this.opts.multiple){
|
||||
this.value = files;
|
||||
} else {
|
||||
const file = event.target.files[0];
|
||||
this.value = file;
|
||||
this.value = files[0];
|
||||
}
|
||||
console.log('"changed" fired', this.value);
|
||||
this.dispatch('changed', this.getValue());
|
||||
|
||||
@ -126,7 +126,9 @@ bricks.VideoPlayer = class extends bricks.VBox {
|
||||
|
||||
bindEvents() {
|
||||
// 播放/暂停
|
||||
this.playPauseBtn.addEventListener('click', () => {
|
||||
this.playPauseBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (this.video.paused) {
|
||||
this.video.play();
|
||||
} else {
|
||||
@ -135,7 +137,9 @@ bricks.VideoPlayer = class extends bricks.VBox {
|
||||
});
|
||||
|
||||
// 静音切换
|
||||
this.muteBtn.addEventListener('click', () => {
|
||||
this.muteBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
this.video.muted = !this.video.muted;
|
||||
this.updateMuteUI();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user