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
@@ -157,7 +157,7 @@ onMounted(() => {
<VBtn icon @click="shareWorkflow"> <VBtn icon @click="shareWorkflow">
<VIcon size="large" color="white" icon="mdi-share" /> <VIcon size="large" color="white" icon="mdi-share" />
</VBtn> </VBtn>
<VBtn icon @click="updateWorkflow" class="me-5"> <VBtn icon @click="updateWorkflow" class="mx-5">
<VIcon size="large" color="white" icon="mdi-content-save" /> <VIcon size="large" color="white" icon="mdi-content-save" />
</VBtn> </VBtn>
</VToolbarItems> </VToolbarItems>
@@ -171,9 +171,11 @@ onMounted(() => {
:edges="edges" :edges="edges"
:nodeTypes="nodeTypes" :nodeTypes="nodeTypes"
:default-edge-options="{ type: 'animation', animated: true }" :default-edge-options="{ type: 'animation', animated: true }"
:edge-updater-radius="10"
@dragover="onDragOver" @dragover="onDragOver"
@dragleave="onDragLeave" @dragleave="onDragLeave"
@keydown="handleKeyDown" @keydown="handleKeyDown"
auto-connect
> >
<MiniMap /> <MiniMap />
<DropzoneBackground <DropzoneBackground
@@ -286,8 +288,9 @@ onMounted(() => {
border-radius: 4px; border-radius: 4px;
} }
.vue-flow__edges { .vue-flow__edge-path,
filter: invert(100%); .vue-flow__connection-path {
stroke-width: 3;
} }
.vue-flow__handle-left { .vue-flow__handle-left {
+24 -1
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)) const sourceOptions = computed(() => innerList.map(item => item.name))
@@ -113,11 +119,16 @@ onMounted(() => {
<VDivider /> <VDivider />
<VCardText> <VCardText>
<VRow> <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"> <VCol cols="12">
<VSelect <VSelect
v-model="data.sources" v-model="data.sources"
:items="sourceOptions" :items="sourceOptions"
label="榜单" label="选择榜单"
chips chips
multiple multiple
outlined outlined
@@ -126,6 +137,18 @@ onMounted(() => {
/> />
</VCol> </VCol>
</VRow> </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> </VCardText>
<Handle id="edge_out" type="source" :position="Position.Right" /> <Handle id="edge_out" type="source" :position="Position.Right" />
</VCard> </VCard>