<input
  type="file"
  name="upload"
  @change="fileChange"
>
const picture = ref({} as unknown);
const fileChange = (event: Event) => {
  const files = (event.target as HTMLInputElement).files; // DOM.files
  if (files)
    (picture.value as HTMLFrameElement).src = URL.createObjectURL(files[0]);
};

相关文章:

  • 2022-01-14
  • 2022-12-23
  • 2021-11-29
  • 2021-07-14
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案