mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
27 lines
652 B
TypeScript
27 lines
652 B
TypeScript
import type { DownloadVideoInputItem } from '../types'
|
|
import EpisodesPicker from './EpisodesPicker.vue'
|
|
|
|
export interface EpisodeItem {
|
|
key: string
|
|
title: string
|
|
isChecked: boolean
|
|
inputItem: DownloadVideoInputItem
|
|
durationText?: string
|
|
}
|
|
export const createEpisodesPicker = (
|
|
fetchEpisodeItems: (instance: any) => Promise<EpisodeItem[]>,
|
|
) =>
|
|
Vue.extend({
|
|
computed: {
|
|
checkedInputItems() {
|
|
return (this.$refs.picker as any).checkedInputItems
|
|
},
|
|
},
|
|
render(createElement) {
|
|
return createElement(EpisodesPicker, {
|
|
props: { api: fetchEpisodeItems },
|
|
ref: 'picker',
|
|
})
|
|
},
|
|
})
|