all.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. import XEUtils from 'xe-utils'
  2. import { VXETable } from './v-x-e-table'
  3. import { Icon } from './icon'
  4. import { Filter } from './filter'
  5. import { Menu } from './menu'
  6. import { Edit } from './edit'
  7. import { Export } from './export'
  8. import { Keyboard } from './keyboard'
  9. import { Validator } from './validator'
  10. import { Header } from './header'
  11. import { Footer } from './footer'
  12. import { Column } from './column'
  13. import { Colgroup } from './colgroup'
  14. import { Grid } from './grid'
  15. import { Toolbar } from './toolbar'
  16. import { Pager } from './pager'
  17. import { Checkbox } from './checkbox'
  18. import { CheckboxGroup } from './checkbox-group'
  19. import { Radio } from './radio'
  20. import { RadioGroup } from './radio-group'
  21. import { RadioButton } from './radio-button'
  22. import { Input } from './input'
  23. import { Textarea } from './textarea'
  24. import { Button } from './button'
  25. import { Modal } from './modal'
  26. import { Tooltip } from './tooltip'
  27. import { Form } from './form'
  28. import { FormItem } from './form-item'
  29. import { FormGather } from './form-gather'
  30. import { Select } from './select'
  31. import { Optgroup } from './optgroup'
  32. import { Option } from './option'
  33. import { Switch } from './switch'
  34. import { List } from './list'
  35. import { Pulldown } from './pulldown'
  36. import { Table } from './table'
  37. import zhCN from './locale/lang/zh-CN'
  38. // 按需加载的组件
  39. const components = [
  40. // 功能模块
  41. Header,
  42. Footer,
  43. Icon,
  44. Filter,
  45. Menu,
  46. Edit,
  47. Export,
  48. Keyboard,
  49. Validator,
  50. // 可选组件
  51. Column,
  52. Colgroup,
  53. Grid,
  54. Toolbar,
  55. Pager,
  56. Checkbox,
  57. CheckboxGroup,
  58. Radio,
  59. RadioGroup,
  60. RadioButton,
  61. Input,
  62. Textarea,
  63. Button,
  64. Modal,
  65. Tooltip,
  66. Form,
  67. FormItem,
  68. FormGather,
  69. Select,
  70. Optgroup,
  71. Option,
  72. Switch,
  73. List,
  74. Pulldown,
  75. // 核心
  76. Table
  77. ]
  78. // 默认安装
  79. export function install (Vue, options) {
  80. if (XEUtils.isPlainObject(options)) {
  81. VXETable.setup(options)
  82. }
  83. components.map(component => component.install(Vue))
  84. }
  85. // 默认中文
  86. VXETable.setup({
  87. i18n: (key, args) => XEUtils.toFormatString(XEUtils.get(zhCN, key), args)
  88. })
  89. export * from './v-x-e-table'
  90. export * from './icon'
  91. export * from './filter'
  92. export * from './edit'
  93. export * from './export'
  94. export * from './keyboard'
  95. export * from './validator'
  96. export * from './header'
  97. export * from './footer'
  98. export * from './column'
  99. export * from './colgroup'
  100. export * from './grid'
  101. export * from './menu'
  102. export * from './toolbar'
  103. export * from './pager'
  104. export * from './checkbox'
  105. export * from './checkbox-group'
  106. export * from './radio'
  107. export * from './radio-group'
  108. export * from './radio-button'
  109. export * from './input'
  110. export * from './textarea'
  111. export * from './button'
  112. export * from './modal'
  113. export * from './tooltip'
  114. export * from './form'
  115. export * from './form-item'
  116. export * from './form-gather'
  117. export * from './select'
  118. export * from './optgroup'
  119. export * from './option'
  120. export * from './switch'
  121. export * from './list'
  122. export * from './pulldown'
  123. export * from './table'