symbol.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import type { ToolBtn, Header } from "@@@/table/models"
  2. import type { VbFormItem, VbFormRowItem } from "@@@/form/models"
  3. export default {
  4. tableBox: Symbol("tableBox") as InjectionKey<Ref<HTMLElement>>,
  5. table: Symbol("table") as InjectionKey<Ref<HTMLElement>>,
  6. //loading: Symbol("loading") as InjectionKey<Ref<boolean>>,
  7. searchFrom: Symbol("searchFrom") as InjectionKey<{
  8. searchFormRowItems: Ref<VbFormRowItem[]>
  9. searchFormItems: Ref<VbFormItem[]>
  10. queryParams: Ref<any>
  11. searchFormSpan?: number
  12. tableSearchBtnSpan?: number
  13. }>,
  14. toolBtns: Symbol("toolBtns") as InjectionKey<Ref<ToolBtn[]>>,
  15. selectedRowCount: Symbol("selectedRowCount") as InjectionKey<Ref<number>>,
  16. rightToolbar: Symbol("rightToolbar") as InjectionKey<{
  17. columns: Ref<Header[]>
  18. showSearchBtn: boolean
  19. showColumnBtn: boolean
  20. gutter: number
  21. }>,
  22. content: Symbol("content") as InjectionKey<{
  23. loading: Ref<boolean>
  24. tableClass: string
  25. tableStyle: string
  26. }>,
  27. checkAll: Symbol("checkAll") as InjectionKey<Ref<boolean>>,
  28. header: Symbol("header") as InjectionKey<{
  29. columns: Ref<Header[]>
  30. hasCheckbox: boolean // 是否有选择框
  31. isMultipleCheck: boolean // 是否多选
  32. sortField: string // 排序字段
  33. sortOrder: string
  34. headerClass: string
  35. thTrClass: string
  36. }>,
  37. body: Symbol("body") as InjectionKey<{
  38. isTree: boolean
  39. childrenField: string
  40. bodyClass: string
  41. }>,
  42. bodyTr: Symbol("bodyTr") as InjectionKey<{
  43. selectedIds: Ref<any[]>
  44. isTree: boolean
  45. keyField: string
  46. hasCheckbox?: boolean
  47. isMultipleCheck?: boolean
  48. parentField: string
  49. expandDepth: number
  50. intervalLeft: number
  51. iconField: string
  52. childrenField: string
  53. leafField: string
  54. isLazy: boolean
  55. lazySearch: boolean
  56. tdTrClass?: string
  57. }>,
  58. bodyTds: Symbol("bodyTds") as InjectionKey<{
  59. columns: Ref<Header[]>
  60. rowSpanSuffix: string
  61. colSpanSuffix: string
  62. expandDepth: number
  63. intervalLeft: number
  64. iconField: string
  65. parentField: string
  66. childrenField: string
  67. leafField: string
  68. isLazy: boolean
  69. }>,
  70. bodyTd: Symbol("bodyTd") as InjectionKey<{
  71. isExpand: boolean
  72. hasChildren: boolean
  73. expandDepth: number
  74. intervalLeft: number
  75. iconField: string
  76. parentField: string
  77. childrenField: string
  78. leafField: string
  79. isLazy: boolean
  80. }>,
  81. displayData: Symbol("displayData") as InjectionKey<any>,
  82. fixedColumn: Symbol("fixedColumn") as InjectionKey<{
  83. tableClass: string
  84. showBody: boolean
  85. }>,
  86. pagination: Symbol("pagination") as InjectionKey<{
  87. total: Ref<number>
  88. currentPage: Ref<number>
  89. pageSize: Ref<number>
  90. maxPageBtnCount: number
  91. }>,
  92. pagePerItems: Symbol("pagePerItems") as InjectionKey<{
  93. total: Ref<number>
  94. currentPage: Ref<number>
  95. pageSize: Ref<number>
  96. pageSizeArray: number[]
  97. pageSizeChange: boolean
  98. }>,
  99. formSlotSuffix: Symbol("formSlotSuffix") as InjectionKey<string>
  100. }