新增:开发者中心功能、md编辑器等。

This commit is contained in:
2025-02-17 15:25:24 +08:00
parent 9081e41188
commit d61e683d41
40 changed files with 5036 additions and 591 deletions

View File

@@ -8,26 +8,26 @@
</template>
<template #extra>
<el-space class="flex items-center">
<!-- <el-select v-model="value" clearable placeholder="筛选" style="width: 240px">-->
<!-- <el-option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"-->
<!-- />-->
<!-- </el-select>-->
<el-select v-model="value" clearable placeholder="类型" style="width: 180px" @change="onTypes">
<el-option
v-for="item in types"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- <el-button-group v-model:value="where" @tab-click="handleClick" @change="reload">-->
<!-- <el-button>综合</el-button>-->
<!-- <el-button>最新</el-button>-->
<!-- <el-button>免费</el-button>-->
<!-- <el-button>付费</el-button>-->
<!-- </el-button-group>-->
<el-input v-model="where.keywords" style="width: 400px" :placeholder="`插件ID | 插件名称 | 域名`" :suffix-icon="Search" @change="reload"/>
<el-button-group v-model:value="where" @tab-click="handleClick" @change="reload">
<el-button>综合</el-button>
<el-button>最新</el-button>
<el-button>免费</el-button>
<el-button>付费</el-button>
</el-button-group>
</el-space>
</template>
<el-row :gutter="24" id="container" class="clearfix">
<el-col v-for="(item,index) in list" :key="index" :span="8" class="left mb-8">
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" @click="navigateTo(`/market/${item.websiteId}.html`)">
<el-card shadow="hover" :body-style="{ padding: '0px' }" class="cursor-pointer" @mouseover="showDomain(item)" @mouseleave="hideDomain" @click="navigateTo(`/market/${item.websiteId}.html`)">
<div class="flex-1 px-4 py-5 sm:p-4 !p-4">
<div class="text-gray-700 dark:text-white text-base font-semibold flex gap-1.5">
<el-avatar
@@ -35,13 +35,15 @@
<div class="flex-1 text-lg cursor-pointer flex flex-col">
{{ item.websiteName }}
<div class="flex justify-between items-center">
<sapn class="text-xs text-gray-400 font-normal line-clamp-1">{{ item.comments || '暂无描述' }}</sapn>
<sapn class="text-xs text-gray-400 font-normal line-clamp-1">
{{ id == item.websiteId ? item.domain : item.comments || '暂无描述' }}
</sapn>
<el-button size="small" round>获取</el-button>
</div>
</div>
</div>
<div class="item-image pt-3">
<el-image v-if="item.files" :src="`${JSON.parse(item.files)[0].url}`" class="w-full h-1/2 max-h-[220px]" />
<el-image v-if="item.files" :src="`${JSON.parse(item.files)[0]}`" class="w-full h-1/2 max-h-[220px]" />
<el-image v-else class="w-full h-[220px]" />
</div>
</div>
@@ -80,6 +82,7 @@ const i18n = useI18n();
const category = ref<CmsNavigation[]>([]);
const total = ref(0);
const activeName = ref('2839');
const id = ref<number>();
// 获取状态
const page = usePage();
@@ -92,13 +95,45 @@ const where = reactive<CmsWebsiteParam>({
limit: 12,
status: undefined,
recommend: undefined,
market: true,
websiteType: undefined,
categoryId: undefined,
lang: undefined
});
const types = [
{
value: '网站',
label: '网站',
},
{
value: '小程序',
label: '小程序',
},
{
value: 'MacOS',
label: 'MacOS',
},
{
value: 'Windows',
label: 'Windows',
},
{
value: 'App',
label: 'App',
},
]
const goBack = () => {
router.back();
}
const showDomain = (item: CmsWebsite) => {
id.value = Number(item.websiteId);
};
const hideDomain = () => {
id.value = 0;
};
// 加载页面数据
const reload = async () => {
@@ -157,28 +192,11 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
console.log(tab, event)
}
const value = ref('')
const options = [
{
value: 'Option1',
label: 'Option1',
},
{
value: 'Option2',
label: 'Option2',
},
{
value: 'Option3',
label: 'Option3',
},
{
value: 'Option4',
label: 'Option4',
},
{
value: 'Option5',
label: 'Option5',
},
]
const onTypes = (value: string) => {
where.websiteType = value;
reload();
}
watch(
() => route.params.id,
@@ -200,3 +218,5 @@ watch(
font-weight: 600;
}
</style>