张诺
20 小时以前 1932a62477dfc3a7e604918c29d0d0d3bfa9c9d8
src/components/filePreview/index.vue
@@ -163,9 +163,14 @@
};
const open = (url) => {
  fileUrl.value = javaApi + url;
  fileUrl.value = window.location.protocol+'//'+window.location.host+ url;
  dialogVisible.value = true;
};
const openUrl = (url) => {
  fileUrl.value = url;
  dialogVisible.value = true;
}
const handleClose = () => {
  dialogVisible.value = false;
};
@@ -182,7 +187,8 @@
// 暴露open方法供外部调用
defineExpose({
  open
  open,
  openUrl
})
</script>