📜  livewire 上传文件进度指示器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:51.378000             🧑  作者: Mango

代码示例1
window.addEventListener('livewire-upload-start', event => {
  console.log('upload started');
});
window.addEventListener('livewire-upload-finished', event => {
  console.log('upload finished');
});
window.addEventListener('livewire-upload-error', event => {
  console.log('upload error');
});
window.addEventListener('livewire-upload-progress', event => {
  console.log(`${event.detail.progress}%`);
});