cancel no payment

This commit is contained in:
2024-10-21 18:02:22 +08:00
parent 60b609ac26
commit c07257bb44
16 changed files with 337 additions and 227 deletions

23
src/data/TemplateTypes.ts Normal file
View File

@@ -0,0 +1,23 @@
import {
ScheduleWeekInfo,
Setting_LiveRequest,
SongRequestInfo,
SongsInfo,
UserInfo
} from '@/api/api-models'
export interface SongListConfigType {
userInfo: UserInfo | undefined
biliInfo: any | undefined
songRequestSettings: Setting_LiveRequest
songRequestActive: SongRequestInfo[]
data: SongsInfo[] | undefined
}
export interface SongListConfigTypeWithConfig<T> extends SongListConfigType {
config?: T
}
export interface ScheduleConfigType {
userInfo: UserInfo | undefined
biliInfo: any | undefined
data: ScheduleWeekInfo[] | undefined
}

View File

@@ -23,10 +23,11 @@ type DataAccessor<T, V> = {
}
// 扩展 CommonProps 以包含额外的共有属性
export type TemplateConfigItemWithType<T, V> = CommonProps & { data: DataAccessor<T, V> }
export type TemplateConfigItemWithType<T, V> = CommonProps & { data?: DataAccessor<T, V> }
export type TemplateConfigStringItem<T> = TemplateConfigItemWithType<T, string> & {
type: 'string'
key: string //将被保存到指定key中
}
export type TemplateConfigStringArrayItem<T> = TemplateConfigItemWithType<T, string[]> & {
type: 'stringArray'
@@ -42,8 +43,19 @@ export type TemplateConfigRenderItem<T> = TemplateConfigBase & {
type: 'render'
render: (arg0: T) => VNode
}
/**
*
* @template T - The type of the associated data model.
*/
export type TemplateConfigImageItem<T> = TemplateConfigBase & {
type: 'image'
imageLimit: number
onUploaded: (arg0: string | string[], arg1: T) => void
type: 'image' // Specifies the type of configuration item as 'image'.
imageLimit: number // The maximum number of images allowed.
key: string //图片将被保存到指定key中, 类型为字符串数组
/**
* Callback function triggered upon image upload.
* @param {string[]} uploadedImages - The uploaded image or array of images.
* @param {T} config - The configuration data model.
*/
onUploaded?: (uploadedImages: string[], config: T) => void
}

View File

@@ -70,6 +70,10 @@ export const SongListTemplateMap = {
name: '简单',
compoent: defineAsyncComponent(() => import('@/views/view/songListTemplate/SimpleSongListTemplate.vue')),
},
traditional: {
name: '传统',
compoent: defineAsyncComponent(() => import('@/views/view/songListTemplate/TraditionalSongListTemplate.vue')),
},
} as { [key: string]: { name: string; compoent: any } }
export const IndexTemplateMap = {
'': { name: '默认', compoent: DefaultIndexTemplateVue },