mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
save
This commit is contained in:
19
src/data/VTsuruTypes.ts
Normal file
19
src/data/VTsuruTypes.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { VNode } from 'vue'
|
||||
|
||||
export type TemplateConfig<T> = {
|
||||
name: string
|
||||
items: (TemplateConfigItem<T> | TemplateConfigImageItem<T>)[]
|
||||
onConfirm?: (arg0: T) => void
|
||||
}
|
||||
interface TemplateConfigBase {
|
||||
name: string
|
||||
}
|
||||
export type TemplateConfigItem<T> = TemplateConfigBase & {
|
||||
type: 'default'
|
||||
render: (arg0: T) => VNode
|
||||
}
|
||||
export type TemplateConfigImageItem<T> = TemplateConfigBase & {
|
||||
type: 'image'
|
||||
imageLimit: number
|
||||
onUploaded: (arg0: string | string[], arg1: T) => void
|
||||
}
|
||||
Reference in New Issue
Block a user