This commit is contained in:
Megghy
2023-12-19 11:42:49 +08:00
parent 283f3e11f4
commit 971af73e19
3 changed files with 95 additions and 4 deletions

19
src/data/VTsuruTypes.ts Normal file
View 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
}