优化组件开发的文件结构

This commit is contained in:
2025-08-28 09:49:54 +08:00
parent 0411816b2e
commit 08e79b0681
9 changed files with 18 additions and 21 deletions
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { useUploadImage } from "~/composables/draw/useUploadImage";
const props = withDefaults(
defineProps<{
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useUploadImage } from "~/composables/draw/useUploadImage";
const props = withDefaults(
defineProps<{
maxSizeMB?: number;
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { ref, computed, onMounted } from "vue";
import {
GlobalInjectKeyConst,
type GlobalInjectMaterials,
@@ -1,9 +1,9 @@
<script setup lang="ts">
import {
GlobalInjectKeyConst,
type GlobalInjectUploadFileToOSS,
} from "~/types/common";
import { ref } from "vue";
import {GlobalInjectKeyConst, type GlobalInjectUploadFileToOSS} from "~/types";
import ImagePreviewWithUpload from "./ImagePreviewWithUpload.vue";
import RecommendedImages from "./RecommendedImages.vue";
interface Props {
title?: string; //
@@ -57,7 +57,7 @@ defineExpose({
<div>
<div class="max-w-[460px] mt-1">
<div class="flex items-center py-1">
<icon name="icon-park:upload-picture" size="20" class="mr-1" />
<icon name="icon-park:upload-picture" size="20" class="mr-1 text-blue-500 dark:text-white" />
{{ title || "图片上传" }}
</div>
<div class="flex flex-col items-center border rounded">