优化组件开发的文件结构
This commit is contained in:
-1
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { useUploadImage } from "~/composables/draw/useUploadImage";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
-2
@@ -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">
|
||||
Reference in New Issue
Block a user