diff --git a/initializer-ui/src/components/starter.vue b/initializer-ui/src/components/starter.vue
index 0a8aa96c3cc5eb39f41132f5cc882c3f7efe9c1d..16dfbfa7b2a2848991fcca5286f393deb5c2d07c 100644
--- a/initializer-ui/src/components/starter.vue
+++ b/initializer-ui/src/components/starter.vue
@@ -29,7 +29,7 @@
-
+
@@ -40,6 +40,7 @@ import type {TreeProps} from 'ant-design-vue';
import {FormInstance, message} from "ant-design-vue";
import request, {isLoading} from "../utils/request";
import BaseResponse from "../models/BaseResponse";
+import {TreeDataNode} from "ant-design-vue/es/vc-tree-select/interface";
interface FormState {
groupId: string,
@@ -61,6 +62,7 @@ const id = ref(-1)
const structPreviewVisible = ref(false)
const contentPreviewVisible = ref(false)
const fileContent = ref()
+const fileExtension = ref()
const loading = computed(() => isLoading.value)
const downloadForm = ref();
@@ -104,9 +106,10 @@ const onDownload = async (id: number) => {
downloadGeneratedProject(data, fileName)
}
-const onSelect = async (selectedKeys: string[], event: { node: FileNode }) => {
+const onSelect = async (selectedKeys: string[], event: { node: TreeDataNode }) => {
const {node} = event
fileContent.value = node.fileContent
+ fileExtension.value = node.title.substring(node.title.lastIndexOf('.') + 1)
contentPreviewVisible.value = true
}