初步完成了编辑器

This commit is contained in:
Sun
2024-01-05 13:27:29 +08:00
parent 1474f796fc
commit 0d0421c8eb
13 changed files with 520 additions and 163 deletions
+53
View File
@@ -0,0 +1,53 @@
<script setup lang="ts">
import { ref } from 'vue'
import { PanelPanelConfigStyleEnum } from '@/enums'
interface Prop {
cardTypeStyle: PanelPanelConfigStyleEnum
class?: string
backgroundColor?: string
iconTextIconHideTitle: boolean // 隐藏小图标标题
iconTextColor?: string // 小图标文字颜色
iconText?: string // 小图标文字
}
const props = withDefaults(defineProps<Prop>(), {})
const defaultBackground = '#2a2a2a6b'
const propClass = ref(props.class)
</script>
<template>
<div class="w-full">
<!-- 详情图标 -->
<div
v-if="cardTypeStyle === PanelPanelConfigStyleEnum.info"
class="w-full rounded-2xl transition-all duration-200 flex"
:class="propClass"
:style="{ backgroundColor: backgroundColor ?? defaultBackground }"
>
<slot name="info" />
</div>
<!-- 极简图标(APP) -->
<div
v-if="cardTypeStyle === PanelPanelConfigStyleEnum.icon"
>
<div
class="overflow-hidden rounded-2xl sunpanel w-[70px] h-[70px] mx-auto transition-all duration-200"
:class="propClass"
:style="{ backgroundColor: backgroundColor ?? defaultBackground }"
>
<slot name="small" />
</div>
<div
v-if="!iconTextIconHideTitle"
class="text-center app-icon-text-shadow cursor-pointer mt-[2px]"
:style="{ color: iconTextColor }"
>
{{ iconText }}
</div>
</div>
</div>
</template>
+2
View File
@@ -8,6 +8,7 @@ import RoundCardModal from './RoundCardModal/index.vue'
import SvgIconOnline from './SvgIconOnline/index.vue'
import JsonImportExport from './JsonImportExport/index.vue'
import AppLoader from './AppLoader/index.vue'
import ItemCard from './ItemCard/index.vue'
export {
Verification,
@@ -20,4 +21,5 @@ export {
SvgIconOnline,
JsonImportExport,
AppLoader,
ItemCard,
}