mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
45 lines
954 B
Vue
45 lines
954 B
Vue
<template>
|
||
<div class="download-video-config-section">
|
||
<div class="download-video-config-item">
|
||
<div>元数据:</div>
|
||
<VDropdown v-model="type" :items="items">
|
||
<template #item="{ item }">
|
||
{{ item }}
|
||
</template>
|
||
</VDropdown>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<script lang="ts">
|
||
import { VDropdown } from '@/ui'
|
||
import { getComponentSettings } from '@/core/settings'
|
||
import { MetadataType } from './metadata'
|
||
|
||
interface Options {
|
||
metadataType: MetadataType | '无'
|
||
}
|
||
const options = getComponentSettings('downloadVideo').options as Options
|
||
|
||
export default Vue.extend({
|
||
components: {
|
||
VDropdown,
|
||
},
|
||
data() {
|
||
return {
|
||
type: options.metadataType ?? '无',
|
||
items: ['无', 'ffmetadata', 'ogm'],
|
||
}
|
||
},
|
||
computed: {
|
||
enabled() {
|
||
return this.type !== '无'
|
||
},
|
||
},
|
||
watch: {
|
||
type(value: MetadataType) {
|
||
options.metadataType = value
|
||
},
|
||
},
|
||
})
|
||
</script>
|