feat: 添加来源类型下拉框,优化媒体获取操作界面

This commit is contained in:
jxxghp
2025-03-01 14:07:07 +08:00
parent 2845a889ed
commit 5a8b183c0f
2 changed files with 30 additions and 4 deletions

View File

@@ -90,6 +90,12 @@ async function loadExtraRecommendSources() {
}
}
// 来源类型下拉框
const sourceTypeOptions = [
{ value: 'ranking', title: '推荐榜单' },
{ value: 'api', title: 'API' },
]
// 计算下拉框
const sourceOptions = computed(() => innerList.map(item => item.name))
@@ -113,11 +119,16 @@ onMounted(() => {
<VDivider />
<VCardText>
<VRow>
<VCol cols="12">
<VSelect v-model="data.source_type" :items="sourceTypeOptions" label="来源" outlined dense />
</VCol>
</VRow>
<VRow v-if="data.source_type === 'ranking'">
<VCol cols="12">
<VSelect
v-model="data.sources"
:items="sourceOptions"
label="榜单"
label="选择榜单"
chips
multiple
outlined
@@ -126,6 +137,18 @@ onMounted(() => {
/>
</VCol>
</VRow>
<VRow v-else>
<VCol cols="12">
<VTextField
v-model="data.api_path"
label="API地址"
placeholder="/api/v1/plugin/xxx/xxxx"
outlined
dense
clearable
/>
</VCol>
</VRow>
</VCardText>
<Handle id="edge_out" type="source" :position="Position.Right" />
</VCard>