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

@@ -157,7 +157,7 @@ onMounted(() => {
<VBtn icon @click="shareWorkflow">
<VIcon size="large" color="white" icon="mdi-share" />
</VBtn>
<VBtn icon @click="updateWorkflow" class="me-5">
<VBtn icon @click="updateWorkflow" class="mx-5">
<VIcon size="large" color="white" icon="mdi-content-save" />
</VBtn>
</VToolbarItems>
@@ -171,9 +171,11 @@ onMounted(() => {
:edges="edges"
:nodeTypes="nodeTypes"
:default-edge-options="{ type: 'animation', animated: true }"
:edge-updater-radius="10"
@dragover="onDragOver"
@dragleave="onDragLeave"
@keydown="handleKeyDown"
auto-connect
>
<MiniMap />
<DropzoneBackground
@@ -286,8 +288,9 @@ onMounted(() => {
border-radius: 4px;
}
.vue-flow__edges {
filter: invert(100%);
.vue-flow__edge-path,
.vue-flow__connection-path {
stroke-width: 3;
}
.vue-flow__handle-left {

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>