naive.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /*
  2. * Copyright (c) 2024 LangChat. TyCoding All Rights Reserved.
  3. *
  4. * Licensed under the GNU Affero General Public License, Version 3 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * https://www.gnu.org/licenses/agpl-3.0.html
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. import type { App } from 'vue';
  17. import {
  18. create,
  19. NAlert,
  20. NAutoComplete,
  21. NAvatar,
  22. NBackTop,
  23. NBadge,
  24. NBreadcrumb,
  25. NBreadcrumbItem,
  26. NButton,
  27. NCard,
  28. NCascader,
  29. NCheckbox,
  30. NCheckboxGroup,
  31. NCol,
  32. NCollapse,
  33. NCollapseItem,
  34. NColorPicker,
  35. NConfigProvider,
  36. NCountdown,
  37. NDataTable,
  38. NDatePicker,
  39. NDescriptions,
  40. NDescriptionsItem,
  41. NDialogProvider,
  42. NDivider,
  43. NDrawer,
  44. NDrawerContent,
  45. NDropdown,
  46. NElement,
  47. NEllipsis,
  48. NEmpty,
  49. NForm,
  50. NFormItem,
  51. NGradientText,
  52. NGrid,
  53. NGridItem,
  54. NIcon,
  55. NInput,
  56. NInputGroup,
  57. NInputNumber,
  58. NLayout,
  59. NLayoutContent,
  60. NLayoutFooter,
  61. NLayoutHeader,
  62. NLayoutSider,
  63. NList,
  64. NListItem,
  65. NLoadingBarProvider,
  66. NMenu,
  67. NMessageProvider,
  68. NModal,
  69. NNotificationProvider,
  70. NP,
  71. NPagination,
  72. NPopconfirm,
  73. NPopover,
  74. NPopselect,
  75. NProgress,
  76. NRadio,
  77. NRadioGroup,
  78. NResult,
  79. NRow,
  80. NScrollbar,
  81. NSelect,
  82. NSkeleton,
  83. NSlider,
  84. NSpace,
  85. NSpin,
  86. NSplit,
  87. NStep,
  88. NSteps,
  89. NSwitch,
  90. NTab,
  91. NTable,
  92. NTabPane,
  93. NTabs,
  94. NTag,
  95. NText,
  96. NThing,
  97. NTimePicker,
  98. NTooltip,
  99. NTree,
  100. NUpload,
  101. NUploadDragger,
  102. } from 'naive-ui';
  103. // https://www.naiveui.com/en-US/os-theme/docs/import-on-demand
  104. const naive = create({
  105. components: [
  106. NMessageProvider,
  107. NDialogProvider,
  108. NConfigProvider,
  109. NInput,
  110. NButton,
  111. NForm,
  112. NFormItem,
  113. NCheckboxGroup,
  114. NCheckbox,
  115. NIcon,
  116. NLayout,
  117. NLayoutHeader,
  118. NLayoutContent,
  119. NLayoutFooter,
  120. NLayoutSider,
  121. NMenu,
  122. NBreadcrumb,
  123. NBreadcrumbItem,
  124. NDropdown,
  125. NSpace,
  126. NTooltip,
  127. NAvatar,
  128. NTabs,
  129. NTab,
  130. NTabPane,
  131. NCard,
  132. NRow,
  133. NCol,
  134. NDrawer,
  135. NDrawerContent,
  136. NDivider,
  137. NSwitch,
  138. NBadge,
  139. NAlert,
  140. NElement,
  141. NTag,
  142. NNotificationProvider,
  143. NProgress,
  144. NDatePicker,
  145. NGrid,
  146. NGridItem,
  147. NList,
  148. NListItem,
  149. NThing,
  150. NDataTable,
  151. NPopover,
  152. NPagination,
  153. NSelect,
  154. NRadioGroup,
  155. NRadio,
  156. NSteps,
  157. NStep,
  158. NInputGroup,
  159. NResult,
  160. NDescriptions,
  161. NDescriptionsItem,
  162. NTable,
  163. NInputNumber,
  164. NLoadingBarProvider,
  165. NModal,
  166. NUpload,
  167. NUploadDragger,
  168. NTree,
  169. NSpin,
  170. NTimePicker,
  171. NBackTop,
  172. NSkeleton,
  173. NCascader,
  174. NGradientText,
  175. NEllipsis,
  176. NSlider,
  177. NPopconfirm,
  178. NScrollbar,
  179. NAutoComplete,
  180. NCountdown,
  181. NText,
  182. NP,
  183. NCollapse,
  184. NCollapseItem,
  185. NColorPicker,
  186. NEmpty,
  187. NPopselect,
  188. NSplit,
  189. ],
  190. });
  191. export function setupNaive(app: App<Element>) {
  192. app.use(naive);
  193. }