hs-admin-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/.env +11 -0
  2. package/.env.development +5 -0
  3. package/.env.production +5 -0
  4. package/.eslintignore +18 -0
  5. package/.eslintrc.js +104 -0
  6. package/.prettierrc.js +39 -0
  7. package/.vite/deps_temp_3669a513/chunk-FVXAE7ZR.js +11400 -0
  8. package/.vite/deps_temp_3669a513/chunk-ZS7NZCD4.js +36 -0
  9. package/.vite/deps_temp_3669a513/default-passive-events.js +25 -0
  10. package/.vite/deps_temp_3669a513/element-plus.js +65013 -0
  11. package/.vite/deps_temp_3669a513/lodash.js +5497 -0
  12. package/.vite/deps_temp_3669a513/package.json +3 -0
  13. package/.vite/deps_temp_3669a513/vue.js +324 -0
  14. package/.vite/deps_temp_3669a513/vxe-table.js +32336 -0
  15. package/CHANGELOG.md +1 -0
  16. package/LICENSE +21 -0
  17. package/README.md +0 -0
  18. package/directoryList.md +180 -0
  19. package/package.json +78 -0
  20. package/postcss.config.js +7 -0
  21. package/src/App.vue +88 -0
  22. package/src/api/fieldConfigController/index.ts +76 -0
  23. package/src/api/fieldConfigController/type.ts +44 -0
  24. package/src/api/login/index.ts +78 -0
  25. package/src/api/loginController/index.ts +74 -0
  26. package/src/api/menu/index.ts +34 -0
  27. package/src/api/menu/index2.ts +291 -0
  28. package/src/api/menuController/index.ts +189 -0
  29. package/src/api/systemController/index.ts +26 -0
  30. package/src/api/systemController/type.ts +16 -0
  31. package/src/api/test/index.ts +22 -0
  32. package/src/api/user/index.ts +30 -0
  33. package/src/assets/404.png +0 -0
  34. package/src/assets/logo-main.svg +12 -0
  35. package/src/assets/logo-mini.svg +12 -0
  36. package/src/components/base/hsAffix/src/hsAffix.vue +22 -0
  37. package/src/components/base/hsAlert/src/hsAlert.vue +15 -0
  38. package/src/components/base/hsAutocomplete/src/hsAutocomplete.vue +36 -0
  39. package/src/components/base/hsButton/src/hsButton.vue +26 -0
  40. package/src/components/base/hsButton/src/hsButtonGroup.vue +8 -0
  41. package/src/components/base/hsButton/useButtonEvents.ts +19 -0
  42. package/src/components/base/hsCalendar/src/hsCalendar.vue +36 -0
  43. package/src/components/base/hsCarousel/src/hsCarousel.vue +15 -0
  44. package/src/components/base/hsCarousel/src/hsCarouselItem.vue +15 -0
  45. package/src/components/base/hsCascader/src/hsCascader.vue +36 -0
  46. package/src/components/base/hsCascader/src/hsCascaderPanel.vue +29 -0
  47. package/src/components/base/hsCheckbox/src/hsCheckbox.vue +32 -0
  48. package/src/components/base/hsCheckbox/src/hsCheckboxButton.vue +18 -0
  49. package/src/components/base/hsCheckbox/src/hsCheckboxGroup.vue +32 -0
  50. package/src/components/base/hsCol/src/hsCol.vue +20 -0
  51. package/src/components/base/hsCollapse/src/hsCollapse.vue +36 -0
  52. package/src/components/base/hsCollapse/src/hsCollapseItem.vue +22 -0
  53. package/src/components/base/hsColorPicker/src/hsColorPicker.vue +32 -0
  54. package/src/components/base/hsDatePicker/src/hsDatePicker.vue +40 -0
  55. package/src/components/base/hsDialog/src/hsDialog.vue +36 -0
  56. package/src/components/base/hsDrawer/src/hsDrawer.vue +29 -0
  57. package/src/components/base/hsDropdown/src/hsDropdown.vue +15 -0
  58. package/src/components/base/hsDropdown/src/hsDropdownItem.vue +15 -0
  59. package/src/components/base/hsDropdown/src/hsDropdownMenu.vue +15 -0
  60. package/src/components/base/hsForm/src/hsForm.vue +23 -0
  61. package/src/components/base/hsForm/src/hsFormItem.vue +22 -0
  62. package/src/components/base/hsGetApi/src/hsGetApis.vue +231 -0
  63. package/src/components/base/hsGetApi/useGetApis.ts +158 -0
  64. package/src/components/base/hsInput/src/hsInput.vue +40 -0
  65. package/src/components/base/hsInput/useInputEvents.ts +52 -0
  66. package/src/components/base/hsInputNumber/src/hsInputNumber.vue +31 -0
  67. package/src/components/base/hsPopconfirm/src/hsPopconfirm.vue +15 -0
  68. package/src/components/base/hsPopover/src/hsPopover.vue +22 -0
  69. package/src/components/base/hsProgress/src/hsProgress.vue +15 -0
  70. package/src/components/base/hsRadio/src/hsRadio.vue +32 -0
  71. package/src/components/base/hsRadio/src/hsRadioButton.vue +18 -0
  72. package/src/components/base/hsRadio/src/hsRadioGroup.vue +32 -0
  73. package/src/components/base/hsRate/src/hsRate.vue +33 -0
  74. package/src/components/base/hsResult/src/hsResult.vue +15 -0
  75. package/src/components/base/hsRow/src/hsRow.vue +20 -0
  76. package/src/components/base/hsScrollbar/src/hsScrollbar.vue +22 -0
  77. package/src/components/base/hsSelect/src/hsOption.vue +8 -0
  78. package/src/components/base/hsSelect/src/hsOptionGroup.vue +8 -0
  79. package/src/components/base/hsSelect/src/hsSelect.vue +42 -0
  80. package/src/components/base/hsSelect/useSelectEvents.ts +60 -0
  81. package/src/components/base/hsSlider/src/hsSlider.vue +25 -0
  82. package/src/components/base/hsSteps/src/hsStep.vue +15 -0
  83. package/src/components/base/hsSteps/src/hsSteps.vue +15 -0
  84. package/src/components/base/hsSwitch/src/hsSwitch.vue +35 -0
  85. package/src/components/base/hsTable/hsBCTable.vue +116 -0
  86. package/src/components/base/hsTable/hsTable copy.vue +226 -0
  87. package/src/components/base/hsTable/hsTable.vue +213 -0
  88. package/src/components/base/hsTable/useHsTableConfig.ts +95 -0
  89. package/src/components/base/hsTable/useTableEvents.ts +118 -0
  90. package/src/components/base/hsTabs/src/hsTabPane.vue +15 -0
  91. package/src/components/base/hsTabs/src/hsTabs.vue +29 -0
  92. package/src/components/base/hsTag/src/hsCheckTag.vue +16 -0
  93. package/src/components/base/hsTag/src/hsTag.vue +15 -0
  94. package/src/components/base/hsTest/HsTest.vue +320 -0
  95. package/src/components/base/hsTooltip/src/hsTooltip.vue +22 -0
  96. package/src/components/base/hsTour/src/hsTour.vue +31 -0
  97. package/src/components/base/hsTour/src/hsTourStep.vue +15 -0
  98. package/src/components/base/hsTransfer/src/hsTransfer.vue +36 -0
  99. package/src/components/base/hsTree/src/hsTree.vue +24 -0
  100. package/src/components/base/hsTreeSelect/src/hsTreeSelect.vue +39 -0
  101. package/src/components/base/hsUpload/src/hsUpload.vue +32 -0
  102. package/src/components/base/hsWatermark/src/hsWatermark.vue +15 -0
  103. package/src/components/business/bcAutoComplete/bcAutoComplete.vue +38 -0
  104. package/src/components/business/bcAutoComplete/defaultData.ts +25 -0
  105. package/src/components/business/bcAutoComplete/useAutoComplete.ts +65 -0
  106. package/src/components/business/bcBtn/bcBtn.vue +40 -0
  107. package/src/components/business/bcForm/bcForm.vue +113 -0
  108. package/src/components/business/bcForm/bcFormDrag.vue +104 -0
  109. package/src/components/business/bcForm/bcFormSearch.vue +154 -0
  110. package/src/components/business/bcForm/components/sortForm/index.ts +18 -0
  111. package/src/components/business/bcForm/components/sortForm/sortForm.vue +92 -0
  112. package/src/components/business/bcFormConfig/bcFormConfig.vue +196 -0
  113. package/src/components/business/bcFormTable/bcFormTable.vue +91 -0
  114. package/src/components/business/bcFormTable/components/bcTabs/bcTabs.vue +53 -0
  115. package/src/components/business/bcFormTable/components/contextBody/contextBody.vue +67 -0
  116. package/src/components/business/bcFormTable/components/contextBody/useContextMenu.ts +53 -0
  117. package/src/components/business/bcFormTable/components/formSearchBtn/formSearchBtn.vue +21 -0
  118. package/src/components/business/bcFormTable/methods/cellDetailMethod.ts +5 -0
  119. package/src/components/business/bcFormTable/methods/filterAgeMethod.ts +5 -0
  120. package/src/components/business/bcFormTable/methods/footerMethod.ts +25 -0
  121. package/src/components/business/bcFormTable/methods/index.ts +10 -0
  122. package/src/components/business/bcFormTable/utils/onFormKey.ts +121 -0
  123. package/src/components/business/bcFormTable/utils/onTableKey.ts +119 -0
  124. package/src/components/business/bcFormTable/utils/parseTable.ts +201 -0
  125. package/src/components/business/bcFormTable/utils/useButon.ts +20 -0
  126. package/src/components/business/bcFormTable/utils/useTableHeight.ts +44 -0
  127. package/src/components/business/bcPageConfig/bcPageConfig.vue +79 -0
  128. package/src/components/business/bcPageConfig/components/hsBtn/src/hsAttrBtn.vue +39 -0
  129. package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnConfigList.vue +45 -0
  130. package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnItemConfig.vue +32 -0
  131. package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnPanel.vue +45 -0
  132. package/src/components/business/bcPageConfig/components/hsBtn/useAttrBtn.ts +58 -0
  133. package/src/components/business/bcPageConfig/components/hsBtn/useBtnConfigList.ts +71 -0
  134. package/src/components/business/bcPageConfig/components/hsBtn/useBtnItemConfig.ts +35 -0
  135. package/src/components/business/bcPageConfig/components/hsExpand/src/hsExpand.vue +33 -0
  136. package/src/components/business/bcPageConfig/components/hsExpand/useExpand.ts +9 -0
  137. package/src/components/business/bcPageConfig/components/hsForm/src/hsAttrForm.vue +54 -0
  138. package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfig.vue +180 -0
  139. package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfigList.vue +45 -0
  140. package/src/components/business/bcPageConfig/components/hsForm/src/hsFormPanel.vue +64 -0
  141. package/src/components/business/bcPageConfig/components/hsForm/src/hsFormParse.vue +24 -0
  142. package/src/components/business/bcPageConfig/components/hsForm/useAttrForm.ts +108 -0
  143. package/src/components/business/bcPageConfig/components/hsForm/useFormListConfig.ts +69 -0
  144. package/src/components/business/bcPageConfig/components/hsForm/useFormParse.ts +120 -0
  145. package/src/components/business/bcPageConfig/components/hsSaveForm/saveFormConfig.ts +66 -0
  146. package/src/components/business/bcPageConfig/components/hsSaveForm/src/saveForm.vue +48 -0
  147. package/src/components/business/bcPageConfig/components/hsSaveForm/useSaveForm.ts +148 -0
  148. package/src/components/business/bcPageConfig/components/hsTables/src/hsAttrTable.vue +122 -0
  149. package/src/components/business/bcPageConfig/components/hsTables/src/hsRecursionConfig.vue +36 -0
  150. package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfig.vue +51 -0
  151. package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfigList.vue +46 -0
  152. package/src/components/business/bcPageConfig/components/hsTables/src/hsTablePanel.vue +68 -0
  153. package/src/components/business/bcPageConfig/components/hsTables/src/hsTableParse.vue +24 -0
  154. package/src/components/business/bcPageConfig/components/hsTables/useAttrTable.ts +218 -0
  155. package/src/components/business/bcPageConfig/components/hsTables/useTableConfigList.ts +77 -0
  156. package/src/components/business/bcPageConfig/components/hsTables/useTableParse.ts +78 -0
  157. package/src/components/business/bcPageConfig/default/apis.json +24712 -0
  158. package/src/components/business/bcPageConfig/default/baseBtnConfig.ts +256 -0
  159. package/src/components/business/bcPageConfig/default/baseFormConfig.ts +380 -0
  160. package/src/components/business/bcPageConfig/default/baseTableConfig.ts +2399 -0
  161. package/src/components/business/bcPageConfig/usePageConfig.ts +469 -0
  162. package/src/components/business/bcSelect/bcSelect.vue +50 -0
  163. package/src/components/business/bcSwitchSystems/bcSwitchSystems.vue +36 -0
  164. package/src/components/business/bcSwitchSystems/useSwitchSystems.ts +74 -0
  165. package/src/components/business/bcTable/bcTable.vue +63 -0
  166. package/src/components/business/bcTable/components/sortColumn/index.ts +19 -0
  167. package/src/components/business/bcTable/components/sortColumn/sortColumn.vue +107 -0
  168. package/src/components/business/bcTable/useTable.ts +51 -0
  169. package/src/components/business/bcTable/useTableHeight.ts +24 -0
  170. package/src/components/business/bcTreeSelect/bcTreeSelect.vue +12 -0
  171. package/src/components/business/cardID/cardID.vue +24 -0
  172. package/src/components/business/cardID/type.ts +0 -0
  173. package/src/components/business/cardID/useCardID.ts +0 -0
  174. package/src/components/component.ts +188 -0
  175. package/src/components/config/autocompleteAttrConfig/autocompleteAttrConfig.vue +26 -0
  176. package/src/components/config/autocompleteAttrConfig/config.ts +170 -0
  177. package/src/components/config/baseForm.vue +175 -0
  178. package/src/components/config/buttonAttrConfig/buttonAttrConfig.vue +26 -0
  179. package/src/components/config/buttonAttrConfig/config.ts +261 -0
  180. package/src/components/config/cascaderAttrConfig/cascaderAttrConfig.vue +26 -0
  181. package/src/components/config/cascaderAttrConfig/config.ts +287 -0
  182. package/src/components/config/cascaderPanelAttrConfig/cascaderPanelAttrConfig.vue +26 -0
  183. package/src/components/config/cascaderPanelAttrConfig/config.ts +278 -0
  184. package/src/components/config/checkboxAttrConfig/checkboxAttrConfig.vue +26 -0
  185. package/src/components/config/checkboxAttrConfig/config.ts +301 -0
  186. package/src/components/config/datePickerAttrConfig/config.ts +256 -0
  187. package/src/components/config/datePickerAttrConfig/datePickerAttrConfig.vue +26 -0
  188. package/src/components/config/inputAttrConfig/config.ts +322 -0
  189. package/src/components/config/inputAttrConfig/inputAttrConfig.vue +33 -0
  190. package/src/components/config/inputAttrConfig/inputEventConfig.vue +35 -0
  191. package/src/components/config/inputNumberAttrConfig/config.ts +177 -0
  192. package/src/components/config/inputNumberAttrConfig/inputNumberAttrConfig.vue +26 -0
  193. package/src/components/config/radioAttrConfig/config.ts +212 -0
  194. package/src/components/config/radioAttrConfig/radioAttrConfig.vue +26 -0
  195. package/src/components/config/selectAttrConfig/config.ts +478 -0
  196. package/src/components/config/selectAttrConfig/selectAttrConfig.vue +26 -0
  197. package/src/components/config/switchAttrConfig/config.ts +195 -0
  198. package/src/components/config/switchAttrConfig/switchAttrConfig.vue +26 -0
  199. package/src/components/config/treeSelectAttrConfig/config.ts +625 -0
  200. package/src/components/config/treeSelectAttrConfig/treeSelectAttrConfig.vue +26 -0
  201. package/src/components/config/type/formType.ts +25 -0
  202. package/src/components/config/uploadAttrConfig/config.ts +250 -0
  203. package/src/components/config/uploadAttrConfig/uploadAttrConfig.vue +26 -0
  204. package/src/components/iconSelector/index.vue +247 -0
  205. package/src/components/iconSelector/list.vue +84 -0
  206. package/src/components/svgIcon/index.vue +61 -0
  207. package/src/directive/authDirective.ts +40 -0
  208. package/src/directive/customDirective.ts +178 -0
  209. package/src/directive/index.ts +18 -0
  210. package/src/hooks/useCrypto.ts +36 -0
  211. package/src/hooks/useExpose.ts +60 -0
  212. package/src/layout/component/aside.vue +160 -0
  213. package/src/layout/component/columnsAside.vue +299 -0
  214. package/src/layout/component/header.vue +18 -0
  215. package/src/layout/component/main.vue +65 -0
  216. package/src/layout/footer/index.vue +25 -0
  217. package/src/layout/index.vue +53 -0
  218. package/src/layout/lockScreen/index.vue +352 -0
  219. package/src/layout/logo/index.vue +75 -0
  220. package/src/layout/main/classic.vue +73 -0
  221. package/src/layout/main/columns.vue +73 -0
  222. package/src/layout/main/defaults.vue +73 -0
  223. package/src/layout/main/transverse.vue +60 -0
  224. package/src/layout/navBars/index.vue +35 -0
  225. package/src/layout/navBars/tagsView/contextmenu.vue +133 -0
  226. package/src/layout/navBars/tagsView/tagsView.vue +737 -0
  227. package/src/layout/navBars/topBar/breadcrumb.vue +146 -0
  228. package/src/layout/navBars/topBar/closeFull.vue +53 -0
  229. package/src/layout/navBars/topBar/index.vue +107 -0
  230. package/src/layout/navBars/topBar/search.vue +123 -0
  231. package/src/layout/navBars/topBar/setings.vue +789 -0
  232. package/src/layout/navBars/topBar/user.vue +222 -0
  233. package/src/layout/navBars/topBar/userNews.vue +107 -0
  234. package/src/layout/navMenu/horizontal.vue +138 -0
  235. package/src/layout/navMenu/subItem.vue +49 -0
  236. package/src/layout/navMenu/vertical.vue +100 -0
  237. package/src/layout/routerView/iframes.vue +101 -0
  238. package/src/layout/routerView/link.vue +93 -0
  239. package/src/layout/routerView/parent.vue +104 -0
  240. package/src/layout/upgrade/index.vue +147 -0
  241. package/src/main.ts +70 -0
  242. package/src/router/backEnd.ts +173 -0
  243. package/src/router/frontEnd.ts +155 -0
  244. package/src/router/index.ts +138 -0
  245. package/src/router/route.ts +94 -0
  246. package/src/stores/index.ts +8 -0
  247. package/src/stores/keepAliveNames.ts +38 -0
  248. package/src/stores/requestOldRoutes.ts +16 -0
  249. package/src/stores/routesList.ts +26 -0
  250. package/src/stores/tagsViewRoutes.ts +23 -0
  251. package/src/stores/themeConfig.ts +142 -0
  252. package/src/stores/userInfo.ts +65 -0
  253. package/src/style/index.scss +0 -0
  254. package/src/style/tailwind.css +29 -0
  255. package/src/theme/app.scss +333 -0
  256. package/src/theme/common/transition.scss +147 -0
  257. package/src/theme/dark.scss +255 -0
  258. package/src/theme/element.scss +321 -0
  259. package/src/theme/iconSelector.scss +31 -0
  260. package/src/theme/index.scss +8 -0
  261. package/src/theme/loading.scss +51 -0
  262. package/src/theme/media/chart.scss +94 -0
  263. package/src/theme/media/cityLinkage.scss +10 -0
  264. package/src/theme/media/date.scss +25 -0
  265. package/src/theme/media/dialog.scss +12 -0
  266. package/src/theme/media/error.scss +45 -0
  267. package/src/theme/media/form.scss +31 -0
  268. package/src/theme/media/home.scss +23 -0
  269. package/src/theme/media/index.scss +15 -0
  270. package/src/theme/media/layout.scss +63 -0
  271. package/src/theme/media/login.scss +74 -0
  272. package/src/theme/media/media.scss +13 -0
  273. package/src/theme/media/pagination.scss +15 -0
  274. package/src/theme/media/personal.scss +16 -0
  275. package/src/theme/media/scrollbar.scss +56 -0
  276. package/src/theme/media/tagsView.scss +11 -0
  277. package/src/theme/mixins/index.scss +56 -0
  278. package/src/theme/other.scss +36 -0
  279. package/src/theme/tableTool.scss +27 -0
  280. package/src/theme/waves.scss +101 -0
  281. package/src/types/auth.d.ts +44 -0
  282. package/src/types/axios.d.ts +13 -0
  283. package/src/types/components.d.ts +30 -0
  284. package/src/types/customData.d.ts +163 -0
  285. package/src/types/form.ts +68 -0
  286. package/src/types/formItem/autocomplete.ts +43 -0
  287. package/src/types/formItem/button.ts +39 -0
  288. package/src/types/formItem/input.ts +66 -0
  289. package/src/types/formItem/inputNumber.ts +42 -0
  290. package/src/types/formItem/selelct.ts +54 -0
  291. package/src/types/formItem/treeSelect.ts +37 -0
  292. package/src/types/formTable.d.ts +210 -0
  293. package/src/types/global.d.ts +118 -0
  294. package/src/types/layout.d.ts +59 -0
  295. package/src/types/mitt.d.ts +38 -0
  296. package/src/types/pinia.d.ts +92 -0
  297. package/src/types/views.d.ts +331 -0
  298. package/src/utils/arrayOperation.ts +65 -0
  299. package/src/utils/authFunction.ts +38 -0
  300. package/src/utils/build.ts +124 -0
  301. package/src/utils/commonFunction.ts +64 -0
  302. package/src/utils/formatTime.ts +137 -0
  303. package/src/utils/getDataType.ts +136 -0
  304. package/src/utils/getStyleSheets.ts +101 -0
  305. package/src/utils/loading.ts +44 -0
  306. package/src/utils/mitt.ts +8 -0
  307. package/src/utils/other.ts +214 -0
  308. package/src/utils/request.ts +82 -0
  309. package/src/utils/setIconfont.ts +48 -0
  310. package/src/utils/showMessage.ts +57 -0
  311. package/src/utils/showMessageBox.ts +39 -0
  312. package/src/utils/showNotification.ts +50 -0
  313. package/src/utils/showPopup.ts +81 -0
  314. package/src/utils/storage.ts +137 -0
  315. package/src/utils/theme.ts +65 -0
  316. package/src/utils/toolsValidate.ts +370 -0
  317. package/src/utils/watermark.ts +47 -0
  318. package/src/views/error/401.vue +88 -0
  319. package/src/views/error/404.vue +89 -0
  320. package/src/views/home/index.vue +62 -0
  321. package/src/views/login/component/account.vue +172 -0
  322. package/src/views/login/component/mobile.vue +72 -0
  323. package/src/views/login/component/scan.vue +63 -0
  324. package/src/views/login/index.vue +254 -0
  325. package/src/views/system/auth/index.vue +48 -0
  326. package/src/views/system/auth/list.ts +50 -0
  327. package/src/views/system/auth/useAuth.ts +34 -0
  328. package/src/views/system/dept/dialog.vue +167 -0
  329. package/src/views/system/dept/index.vue +135 -0
  330. package/src/views/system/dic/dialog.vue +150 -0
  331. package/src/views/system/dic/index.vue +132 -0
  332. package/src/views/system/form/data.json +360 -0
  333. package/src/views/system/form/index.vue +24 -0
  334. package/src/views/system/formSetting/components/hsBtn/src/hsAttrBtn.vue +58 -0
  335. package/src/views/system/formSetting/components/hsBtn/src/hsBtnConfigList.vue +45 -0
  336. package/src/views/system/formSetting/components/hsBtn/src/hsBtnPanel.vue +51 -0
  337. package/src/views/system/formSetting/components/hsBtn/useAttrBtn.ts +129 -0
  338. package/src/views/system/formSetting/components/hsBtn/useBtnConfigList.ts +73 -0
  339. package/src/views/system/formSetting/components/hsExpand/src/hsExpand.vue +27 -0
  340. package/src/views/system/formSetting/components/hsExpand/useExpand.ts +9 -0
  341. package/src/views/system/formSetting/components/hsForm/src/hsAttrForm.vue +124 -0
  342. package/src/views/system/formSetting/components/hsForm/src/hsFormConfig.vue +180 -0
  343. package/src/views/system/formSetting/components/hsForm/src/hsFormConfigList.vue +45 -0
  344. package/src/views/system/formSetting/components/hsForm/src/hsFormPanel.vue +152 -0
  345. package/src/views/system/formSetting/components/hsForm/src/hsFormParse.vue +33 -0
  346. package/src/views/system/formSetting/components/hsForm/useAttrForm.ts +109 -0
  347. package/src/views/system/formSetting/components/hsForm/useFormListConfig.ts +70 -0
  348. package/src/views/system/formSetting/components/hsPageTree/configData.ts +3700 -0
  349. package/src/views/system/formSetting/components/hsPageTree/src/hsPageTree.vue +30 -0
  350. package/src/views/system/formSetting/components/hsPageTree/usePageTree.ts +50 -0
  351. package/src/views/system/formSetting/components/hsSaveForm/saveFormConfig.ts +66 -0
  352. package/src/views/system/formSetting/components/hsSaveForm/src/saveForm.vue +47 -0
  353. package/src/views/system/formSetting/components/hsSaveForm/useSaveForm.ts +122 -0
  354. package/src/views/system/formSetting/components/hsTables/src/hsAttrTable.vue +91 -0
  355. package/src/views/system/formSetting/components/hsTables/src/hsRecursionConfig.vue +36 -0
  356. package/src/views/system/formSetting/components/hsTables/src/hsTableConfig.vue +39 -0
  357. package/src/views/system/formSetting/components/hsTables/src/hsTableConfigList.vue +45 -0
  358. package/src/views/system/formSetting/components/hsTables/src/hsTablePanel.vue +56 -0
  359. package/src/views/system/formSetting/components/hsTables/src/hsTableParse.vue +29 -0
  360. package/src/views/system/formSetting/components/hsTables/useAttrTable.ts +125 -0
  361. package/src/views/system/formSetting/components/hsTables/useTableConfigList.ts +77 -0
  362. package/src/views/system/formSetting/components/selectConfig/config.ts +476 -0
  363. package/src/views/system/formSetting/components/selectConfig/selectConfig.vue +30 -0
  364. package/src/views/system/formSetting/data.json +360 -0
  365. package/src/views/system/formSetting/default/baseBtnConfig.ts +216 -0
  366. package/src/views/system/formSetting/default/baseFormConfig.ts +567 -0
  367. package/src/views/system/formSetting/default/baseTableConfig.ts +2353 -0
  368. package/src/views/system/formSetting/formConfig.vue +108 -0
  369. package/src/views/system/formSetting/index.vue +35 -0
  370. package/src/views/system/formSetting/menuType.d.ts +12 -0
  371. package/src/views/system/formSetting/panelConfig.json +164 -0
  372. package/src/views/system/formSetting/useForm.ts +89 -0
  373. package/src/views/system/formSetting/useFormConfig.ts +192 -0
  374. package/src/views/system/menu/dialog.vue +285 -0
  375. package/src/views/system/menu/index.vue +180 -0
  376. package/src/views/system/page/components/hsPageTree/configData.ts +3700 -0
  377. package/src/views/system/page/components/hsPageTree/src/hsPageTree.vue +30 -0
  378. package/src/views/system/page/components/hsPageTree/usePageTree.ts +49 -0
  379. package/src/views/system/page/index.vue +32 -0
  380. package/src/views/system/page/menuType.d.ts +12 -0
  381. package/src/views/system/page/usePage.ts +125 -0
  382. package/src/views/system/role/dialog.vue +236 -0
  383. package/src/views/system/role/index.vue +146 -0
  384. package/src/views/system/table/data.json +747 -0
  385. package/src/views/system/table/formate.js +49 -0
  386. package/src/views/system/table/index.vue +53 -0
  387. package/src/views/system/user/dialog.vue +187 -0
  388. package/src/views/system/user/index.vue +161 -0
  389. package/src/views/test/test/components/hsBtn/src/hsAttrBtn.vue +58 -0
  390. package/src/views/test/test/components/hsBtn/src/hsBtnConfigList.vue +45 -0
  391. package/src/views/test/test/components/hsBtn/src/hsBtnPanel.vue +51 -0
  392. package/src/views/test/test/components/hsBtn/useAttrBtn.ts +129 -0
  393. package/src/views/test/test/components/hsBtn/useBtnConfigList.ts +73 -0
  394. package/src/views/test/test/components/hsExpand/src/hsExpand.vue +27 -0
  395. package/src/views/test/test/components/hsExpand/useExpand.ts +9 -0
  396. package/src/views/test/test/components/hsForm/src/hsAttrForm.vue +124 -0
  397. package/src/views/test/test/components/hsForm/src/hsFormConfig.vue +180 -0
  398. package/src/views/test/test/components/hsForm/src/hsFormConfigList.vue +45 -0
  399. package/src/views/test/test/components/hsForm/src/hsFormPanel.vue +152 -0
  400. package/src/views/test/test/components/hsForm/src/hsFormParse.vue +33 -0
  401. package/src/views/test/test/components/hsForm/useAttrForm.ts +109 -0
  402. package/src/views/test/test/components/hsForm/useFormListConfig.ts +70 -0
  403. package/src/views/test/test/components/hsSaveForm/saveFormConfig.ts +66 -0
  404. package/src/views/test/test/components/hsSaveForm/src/saveForm.vue +47 -0
  405. package/src/views/test/test/components/hsSaveForm/useSaveForm.ts +122 -0
  406. package/src/views/test/test/components/hsTables/src/hsAttrTable.vue +91 -0
  407. package/src/views/test/test/components/hsTables/src/hsRecursionConfig.vue +36 -0
  408. package/src/views/test/test/components/hsTables/src/hsTableConfig.vue +39 -0
  409. package/src/views/test/test/components/hsTables/src/hsTableConfigList.vue +45 -0
  410. package/src/views/test/test/components/hsTables/src/hsTablePanel.vue +56 -0
  411. package/src/views/test/test/components/hsTables/src/hsTableParse.vue +29 -0
  412. package/src/views/test/test/components/hsTables/useAttrTable.ts +125 -0
  413. package/src/views/test/test/components/hsTables/useTableConfigList.ts +77 -0
  414. package/src/views/test/test/components/selectConfig/config.ts +476 -0
  415. package/src/views/test/test/components/selectConfig/selectConfig.vue +30 -0
  416. package/src/views/test/test/data.json +360 -0
  417. package/src/views/test/test/default/baseBtnConfig.ts +216 -0
  418. package/src/views/test/test/default/baseFormConfig.ts +567 -0
  419. package/src/views/test/test/default/baseTableConfig.ts +2353 -0
  420. package/src/views/test/test/formConfig.vue +102 -0
  421. package/src/views/test/test/test.vue +28 -0
  422. package/src/views/test/test/test3.vue +24 -0
  423. package/src/views/test/test/test4.vue +107 -0
  424. package/src/views/test/test/test/345/211/257/346/234/254.vue +2424 -0
  425. package/src/views/test/test/useFormConfig.ts +192 -0
  426. package/src/views/test/test2/test2.vue +17 -0
  427. package/src/views/test/test3/test.vue +20 -0
  428. package/tailwind.config.js +12 -0
  429. package/tsconfig.json +75 -0
  430. package/vite.config.ts +123 -0
@@ -0,0 +1,625 @@
1
+ export const treeSelectAttrConfig = [
2
+ {
3
+ prop: 'attrs',
4
+ label: 'treeSelectAttrs',
5
+ tooltip: 'treeSelectAttrs',
6
+ type: 'object',
7
+ el: 'title',
8
+ children: [
9
+ {
10
+ prop: 'defaultValue',
11
+ label: '默认值',
12
+ tooltip: '默认值',
13
+ type: 'string / number / boolean / object / array',
14
+ el: 'hs-input',
15
+ },
16
+ {
17
+ prop: 'multiple',
18
+ label: '是否多选',
19
+ tooltip: '是否多选',
20
+ type: 'boolean',
21
+ el: 'hs-switch',
22
+ },
23
+ {
24
+ prop: 'disabled',
25
+ label: '是否禁用',
26
+ tooltip: '是否禁用',
27
+ type: 'boolean',
28
+ el: 'hs-switch',
29
+ },
30
+ {
31
+ prop: 'value-key',
32
+ label: 'value 唯一标识',
33
+ tooltip: '作为 value 唯一标识的键名,绑定值为对象类型时必填',
34
+ type: 'string',
35
+ el: 'hs-input',
36
+ },
37
+ {
38
+ prop: 'placeholder',
39
+ label: '占位符',
40
+ tooltip: '占位符,默认为“Select”',
41
+ type: 'string',
42
+ el: 'hs-input',
43
+ },
44
+ {
45
+ prop: 'size',
46
+ label: '输入框尺寸',
47
+ tooltip: '输入框尺寸',
48
+ type: 'enum',
49
+ el: 'hs-select',
50
+ op: [
51
+ { label: 'large', value: 'large' },
52
+ { label: 'default', value: 'default' },
53
+ { label: 'small', value: 'small' },
54
+ ],
55
+ cel: 'hs-option',
56
+ },
57
+ {
58
+ prop: 'clearable',
59
+ label: '是否可以清空',
60
+ tooltip: '是否可以清空选项',
61
+ type: 'boolean',
62
+ el: 'hs-switch',
63
+ },
64
+ {
65
+ prop: 'collapse-tags',
66
+ label: '值按文字展示',
67
+ tooltip: '多选时是否将选中值按文字的形式展示',
68
+ type: 'boolean',
69
+ el: 'hs-switch',
70
+ },
71
+ {
72
+ prop: 'collapse-tags-tooltip',
73
+ label: '是否显示所选',
74
+ tooltip: '当鼠标悬停于折叠标签的文本时,是否显示所有选中的标签。 要使用此属性,collapse-tags属性必须设定为 true',
75
+ type: 'boolean',
76
+ el: 'hs-switch',
77
+ },
78
+ {
79
+ prop: 'multiple-limit',
80
+ label: '最多可选数',
81
+ tooltip: 'multiple 属性设置为 true 时,代表多选场景下用户最多可以选择的项目数, 为 0 则不限制',
82
+ type: 'number',
83
+ el: 'hs-input-number',
84
+ },
85
+ {
86
+ prop: 'name',
87
+ label: '原生name属性',
88
+ tooltip: 'Select 输入框的原生 name 属性',
89
+ type: 'string',
90
+ el: 'hs-input',
91
+ },
92
+ {
93
+ prop: 'effect',
94
+ label: 'tooltip 主题',
95
+ tooltip: 'tooltip 主题,内置了 dark / light 两种',
96
+ type: 'enum / string',
97
+ el: 'hs-select',
98
+ op: [
99
+ { label: 'dark', value: 'dark' },
100
+ { label: 'light', value: 'light' },
101
+ ],
102
+ cel: 'hs-option',
103
+ },
104
+ {
105
+ prop: 'autocomplete',
106
+ label: 'autocomplete',
107
+ tooltip: 'Select 输入框的原生 autocomplete 属性',
108
+ type: 'string',
109
+ el: 'hs-input',
110
+ },
111
+ {
112
+ prop: 'filterable',
113
+ label: '是否可筛选',
114
+ tooltip: 'Select 组件是否可筛选',
115
+ type: 'boolean',
116
+ el: 'hs-switch',
117
+ },
118
+ {
119
+ prop: 'allow-create',
120
+ label: '允许创建条目',
121
+ tooltip: '是否允许用户创建新条目, 只有当 filterable 设置为 true 时才会生效。',
122
+ type: 'boolean',
123
+ el: 'hs-switch',
124
+ },
125
+ {
126
+ prop: 'filter-method',
127
+ label: '筛选方法',
128
+ tooltip: '自定义筛选方法',
129
+ type: 'Function',
130
+ el: 'hs-input',
131
+ },
132
+ {
133
+ prop: 'remote',
134
+ label: '是否远程加载',
135
+ tooltip: '其中的选项是否从服务器远程加载',
136
+ type: 'boolean',
137
+ el: 'hs-switch',
138
+ },
139
+ {
140
+ prop: 'remote-method',
141
+ label: '远程搜索方法',
142
+ tooltip: '自定义远程搜索方法',
143
+ type: 'Function',
144
+ el: 'hs-input',
145
+ },
146
+ {
147
+ prop: 'remote-show-suffix',
148
+ label: '远程搜索图标',
149
+ tooltip: '远程搜索方法显示后缀图标',
150
+ type: 'boolean',
151
+ el: 'hs-switch',
152
+ },
153
+ {
154
+ prop: 'loading',
155
+ label: '是否正在获取',
156
+ tooltip: '是否正在从远程获取数据',
157
+ type: 'boolean',
158
+ el: 'hs-switch',
159
+ },
160
+ {
161
+ prop: 'loading-text',
162
+ label: '加载时文本',
163
+ tooltip: '从服务器加载数据时显示的文本,默认为“Loading”',
164
+ type: 'string',
165
+ el: 'hs-input',
166
+ },
167
+ {
168
+ prop: 'no-match-text',
169
+ label: '无匹配时显示',
170
+ tooltip: "搜索条件无匹配时显示的文字,也可以使用 empty 插槽设置,默认是 “No matching data'”",
171
+ type: 'string',
172
+ el: 'hs-input',
173
+ },
174
+ {
175
+ prop: 'no-data-text',
176
+ label: '无选项时显示',
177
+ tooltip: '无选项时显示的文字,也可以使用 empty 插槽设置自定义内容,默认是 “No data”',
178
+ type: 'string',
179
+ el: 'hs-input',
180
+ },
181
+ {
182
+ prop: 'popper-class',
183
+ label: '下拉菜单类名',
184
+ tooltip: '选择器下拉菜单的自定义类名',
185
+ type: 'string',
186
+ el: 'hs-input',
187
+ },
188
+ {
189
+ prop: 'reserve-keyword',
190
+ label: '保留关键词',
191
+ tooltip: '当 multiple 和 filterable被设置为 true 时,是否在选中一个选项后保留当前的搜索关键词',
192
+ type: 'boolean',
193
+ el: 'hs-switch',
194
+ },
195
+ {
196
+ prop: 'default-first-option',
197
+ label: '回车选择',
198
+ tooltip: '是否在输入框按下回车时,选择第一个匹配项。 需配合 filterable 或 remote 使用',
199
+ type: 'boolean',
200
+ el: 'hs-switch',
201
+ },
202
+ {
203
+ prop: 'teleported',
204
+ label: '是否插入至body',
205
+ tooltip: '是否将下拉列表插入至 body 元素',
206
+ type: 'boolean',
207
+ el: 'hs-switch',
208
+ },
209
+ {
210
+ prop: 'persistent',
211
+ label: '选择器未被激活',
212
+ tooltip: '当下拉选择器未被激活并且persistent设置为false,选择器会被删除。',
213
+ type: 'boolean',
214
+ el: 'hs-switch',
215
+ },
216
+ {
217
+ prop: 'automatic-dropdown',
218
+ label: '自动弹出选项',
219
+ tooltip: '对于不可搜索的 Select,是否在输入框获得焦点后自动弹出选项菜单',
220
+ type: 'boolean',
221
+ el: 'hs-switch',
222
+ },
223
+ {
224
+ prop: 'clear-icon',
225
+ label: '清除图标',
226
+ tooltip: '自定义清除图标',
227
+ type: 'string / object',
228
+ el: 'hs-input',
229
+ },
230
+ {
231
+ prop: 'fit-input-width',
232
+ label: '下拉框宽度',
233
+ tooltip: '下拉框的宽度是否与输入框相同',
234
+ type: 'boolean',
235
+ el: 'hs-switch',
236
+ },
237
+ {
238
+ prop: 'suffix-icon',
239
+ label: '后缀图标',
240
+ tooltip: '自定义后缀图标组件',
241
+ type: 'string / object',
242
+ el: 'hs-input',
243
+ },
244
+ {
245
+ prop: 'suffix-transition deprecated',
246
+ label: '下拉图标动画',
247
+ tooltip: '下拉菜单显示/消失时后缀图标的动画',
248
+ type: 'boolean',
249
+ el: 'hs-switch',
250
+ },
251
+ {
252
+ prop: 'tag-type',
253
+ label: '标签类型',
254
+ tooltip: '标签类型',
255
+ type: 'enum',
256
+ el: 'hs-select',
257
+ op: [
258
+ { label: 'success', value: 'success' },
259
+ { label: 'info', value: 'info' },
260
+ { label: 'warning', value: 'warning' },
261
+ { label: 'danger', value: 'danger' },
262
+ ],
263
+ cel: 'hs-option',
264
+ },
265
+ {
266
+ prop: 'validate-event',
267
+ label: '表单验证',
268
+ tooltip: '是否触发表单验证',
269
+ type: 'boolean',
270
+ el: 'hs-switch',
271
+ },
272
+ {
273
+ prop: 'placement',
274
+ label: '下拉框出现位置',
275
+ tooltip: '下拉框出现的位置',
276
+ type: 'enum',
277
+ el: 'hs-select',
278
+ op: [
279
+ { label: 'top', value: 'top' },
280
+ { label: 'top-start', value: 'top-start' },
281
+ { label: 'top-end', value: 'top-end' },
282
+ { label: 'bottom', value: 'bottom' },
283
+ { label: 'bottom-start', value: 'bottom-start' },
284
+ { label: 'bottom-end', value: 'bottom-end' },
285
+ { label: 'left', value: 'left' },
286
+ { label: 'left-start', value: 'left-start' },
287
+ { label: 'left-end', value: 'left-end' },
288
+ { label: 'right', value: 'right' },
289
+ { label: 'right-start', value: 'right-start' },
290
+ { label: 'right-end', value: 'right-end' },
291
+ ],
292
+ cel: 'hs-option',
293
+ },
294
+ {
295
+ prop: 'max-collapse-tags',
296
+ label: 'Tag最大数量',
297
+ tooltip: '需要显示的 Tag 的最大数量 只有当 collapse-tags 设置为 true 时才会生效。',
298
+ type: 'number',
299
+ el: 'hs-input-number',
300
+ },
301
+ {
302
+ prop: 'popper-options',
303
+ label: 'popper参数',
304
+ tooltip: 'popper.js 参数',
305
+ type: 'objectrefer to popper.js doc',
306
+ el: 'hs-input',
307
+ },
308
+ {
309
+ prop: 'aria-label',
310
+ label: 'aria-label',
311
+ tooltip: '等价于原生 input aria-label 属性',
312
+ type: 'string',
313
+ el: 'hs-input',
314
+ },
315
+ {
316
+ prop: 'treeAttrs',
317
+ label: 'treeAttrs',
318
+ tooltip: 'treeAttrs',
319
+ type: 'title',
320
+ el: 'title',
321
+ },
322
+ // tree属性
323
+ {
324
+ prop: 'data',
325
+ label: 'data展示数据',
326
+ tooltip: 'data展示数据',
327
+ type: 'string',
328
+ el: 'hs-input',
329
+ attrs: {
330
+ type: 'textarea',
331
+ },
332
+ },
333
+ {
334
+ prop: 'url',
335
+ label: 'url获取data数据',
336
+ tooltip: '通过url请求获取data展示数据',
337
+ type: 'string',
338
+ el: 'hs-input',
339
+ },
340
+ {
341
+ prop: 'paramKey',
342
+ label: '请求参数key',
343
+ tooltip: '请求参数key',
344
+ type: 'string',
345
+ el: 'hs-input',
346
+ },
347
+ {
348
+ prop: 'paramValue',
349
+ label: '请求参数Value',
350
+ tooltip: '请求参数Value',
351
+ type: 'string',
352
+ el: 'hs-input',
353
+ },
354
+ {
355
+ prop: 'empty-text',
356
+ label: '内容为空时的文本',
357
+ tooltip: '内容为空的时候展示的文本',
358
+ type: 'string',
359
+ el: 'hs-input',
360
+ },
361
+ {
362
+ prop: 'node-key',
363
+ label: '唯一标识',
364
+ tooltip: '每个树节点用来作为唯一标识的属性,整棵树应该是唯一的',
365
+ type: 'string',
366
+ el: 'hs-input',
367
+ },
368
+ {
369
+ prop: 'props',
370
+ label: 'props 配置选项',
371
+ tooltip: '配置选项,具体看下表',
372
+ type: 'title',
373
+ el: 'title',
374
+ children: [
375
+ {
376
+ prop: 'label',
377
+ label: 'label',
378
+ tooltip: '指定节点标签为节点对象的某个属性值',
379
+ type: 'string',
380
+ el: 'hs-input',
381
+ },
382
+ {
383
+ prop: 'children',
384
+ label: 'children',
385
+ tooltip: '指定子树为节点对象的某个属性值',
386
+ type: 'string',
387
+ el: 'hs-input',
388
+ },
389
+ {
390
+ prop: 'disabled',
391
+ label: 'disabled',
392
+ tooltip: '指定节点选择框是否禁用为节点对象的某个属性值',
393
+ type: 'string',
394
+ el: 'hs-input',
395
+ },
396
+ {
397
+ prop: 'isLeaf',
398
+ label: '是否为叶子节点',
399
+ tooltip: '指定节点是否为叶子节点,仅在指定了 lazy 属性的情况下生效',
400
+ type: 'string',
401
+ el: 'hs-input',
402
+ },
403
+ {
404
+ prop: 'class',
405
+ label: '节点类名',
406
+ tooltip: '自定义节点类名',
407
+ type: 'string',
408
+ el: 'hs-input',
409
+ },
410
+ ],
411
+ },
412
+ {
413
+ prop: 'render-after-expand',
414
+ label: '延迟渲染子节点',
415
+ tooltip: '是否在第一次展开某个树节点后才渲染其子节点',
416
+ type: 'boolean',
417
+ el: 'hs-switch',
418
+ },
419
+ {
420
+ prop: 'load',
421
+ label: 'load',
422
+ tooltip: '加载子树数据的方法,仅当 lazy 属性为true 时生效',
423
+ type: 'function(node, resolve),node为当前点击的节点,resolve为数据加载完成的回调(必须调用)',
424
+ el: 'hs-input',
425
+ },
426
+ {
427
+ prop: 'render-content',
428
+ label: '节点内容区的渲染',
429
+ tooltip: '树节点的内容区的渲染 Function',
430
+ type: 'Function(h, { node, data, store })',
431
+ el: 'hs-input',
432
+ },
433
+ {
434
+ prop: 'highlight-current',
435
+ label: '高亮当前选中节点',
436
+ tooltip: '是否高亮当前选中节点,默认值是 false。',
437
+ type: 'boolean',
438
+ el: 'hs-switch',
439
+ },
440
+ {
441
+ prop: 'default-expand-all',
442
+ label: '默认展开所有节点',
443
+ tooltip: '是否默认展开所有节点',
444
+ type: 'boolean',
445
+ el: 'hs-switch',
446
+ },
447
+ {
448
+ prop: 'expand-on-click-node',
449
+ label: '展开或收缩节点',
450
+ tooltip: '是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。',
451
+ type: 'boolean',
452
+ el: 'hs-switch',
453
+ },
454
+ {
455
+ prop: 'check-on-click-node',
456
+ label: '点击节点选中节点',
457
+ tooltip: '是否在点击节点的时候选中节点,默认值为 false,即只有在点击复选框时才会选中节点。',
458
+ type: 'boolean',
459
+ el: 'hs-switch',
460
+ },
461
+ {
462
+ prop: 'auto-expand-parent',
463
+ label: '自动展开父节点',
464
+ tooltip: '展开子节点的时候是否自动展开父节点',
465
+ type: 'boolean',
466
+ el: 'hs-switch',
467
+ },
468
+ {
469
+ prop: 'default-expanded-keys',
470
+ label: '默认展开数组',
471
+ tooltip: '默认展开的节点的 key 的数组',
472
+ type: 'array',
473
+ el: 'hs-input',
474
+ },
475
+ {
476
+ prop: 'show-checkbox',
477
+ label: '节点是否可被选择',
478
+ tooltip: '节点是否可被选择',
479
+ type: 'boolean',
480
+ el: 'hs-switch',
481
+ },
482
+ {
483
+ prop: 'check-strictly',
484
+ label: '父子不互相关联',
485
+ tooltip: '在显示复选框的情况下,是否严格的遵循父子不互相关联的做法,默认为 false',
486
+ type: 'boolean',
487
+ el: 'hs-switch',
488
+ },
489
+ {
490
+ prop: 'default-checked-keys',
491
+ label: '默认勾选的数组',
492
+ tooltip: '默认勾选的节点的 key 的数组',
493
+ type: 'array',
494
+ el: 'hs-input',
495
+ },
496
+ {
497
+ prop: 'current-node-key',
498
+ label: '当前选中的节点',
499
+ tooltip: '当前选中的节点',
500
+ type: 'string / number',
501
+ el: 'hs-input',
502
+ },
503
+ {
504
+ prop: 'filter-node-method',
505
+ label: '树节点的筛选方法',
506
+ tooltip: '对树节点进行筛选时执行的方法, 返回 false 则表示这个节点会被隐藏',
507
+ type: 'Function(value, data, node)',
508
+ el: 'hs-input',
509
+ },
510
+ {
511
+ prop: 'accordion',
512
+ label: 'accordion',
513
+ tooltip: '是否每次只打开一个同级树节点展开',
514
+ type: 'boolean',
515
+ el: 'hs-switch',
516
+ },
517
+ {
518
+ prop: 'indent',
519
+ label: '节点间的缩进',
520
+ tooltip: '相邻级节点间的水平缩进,单位为像素',
521
+ type: 'number',
522
+ el: 'hs-input',
523
+ },
524
+ {
525
+ prop: 'icon',
526
+ label: '树节点图标组件',
527
+ tooltip: '自定义树节点图标组件',
528
+ type: 'string | Component',
529
+ el: 'hs-input',
530
+ },
531
+ {
532
+ prop: 'lazy',
533
+ label: '是否懒加载子节点',
534
+ tooltip: '是否懒加载子节点,需与 load 方法结合使用',
535
+ type: 'boolean',
536
+ el: 'hs-switch',
537
+ },
538
+ {
539
+ prop: 'draggable',
540
+ label: '开启拖拽功能',
541
+ tooltip: '是否开启拖拽节点功能',
542
+ type: 'boolean',
543
+ el: 'hs-switch',
544
+ },
545
+ {
546
+ prop: 'allow-drag',
547
+ label: '节点能否被拖拽',
548
+ tooltip: '判断节点能否被拖拽 如果返回 false ,节点不能被拖动',
549
+ type: 'Function(node)',
550
+ el: 'hs-input',
551
+ },
552
+ {
553
+ prop: 'allow-drop',
554
+ label: 'allow-drop',
555
+ tooltip:
556
+ "拖拽时判定目标节点能否成为拖动目标位置。 如果返回 false ,拖动节点不能被拖放到目标节点。 type 参数有三种情况:'prev'、'inner' 和 'next',分别表示放置在目标节点前、插入至目标节点和放置在目标节点后",
557
+ type: 'Function(draggingNode, dropNode, type)',
558
+ el: 'hs-input',
559
+ },
560
+ ],
561
+ },
562
+ {
563
+ prop: 'rules',
564
+ label: 'rules',
565
+ tooltip: 'rules',
566
+ type: 'object',
567
+ el: 'title',
568
+ children: [
569
+ {
570
+ prop: 'required',
571
+ label: '是否必填',
572
+ tooltip: '是否必填',
573
+ type: 'boolean',
574
+ el: 'hs-switch',
575
+ },
576
+ // 必填项规则
577
+ {
578
+ prop: 'rules',
579
+ label: '必填项规则',
580
+ tooltip: '必填项规则',
581
+ type: 'array',
582
+ el: 'hs-input',
583
+ attrs: {
584
+ type: 'textarea',
585
+ },
586
+ },
587
+ ],
588
+ },
589
+ ];
590
+ export const treeSelectAttrConfigMap = {
591
+ // 默认配置项
592
+ attrs: {
593
+ size: 'small',
594
+ multiple: false, // 是否多选
595
+ disabled: false, // 是否禁用
596
+ 'value-key': 'value', // value 唯一标识
597
+ clearable: false, // 是否可以清空
598
+ 'collapse-tags': false, // 值按文字展示
599
+ 'collapse-tags-tooltip': false, // 是否显示所选
600
+ 'multiple-limit': 0, // 最多可选数
601
+ effect: 'light', // tooltip 主题
602
+ autocomplete: 'off', // autocomplete
603
+ filterable: true, // 是否可筛选
604
+ 'allow-create': false, // 允许创建条目
605
+ remote: false, // 是否远程加载
606
+ 'remote-show-suffix': false, // 远程搜索图标
607
+ loading: false, // 是否正在获取
608
+ 'reserve-keyword': true, // 保留关键词
609
+ 'default-first-option': false, // 是否在输入框按下回车时,选择第一个匹配项
610
+ teleported: true, // 是否插入至body
611
+ persistent: true, // 选择器未被激活
612
+ 'automatic-dropdown': true, // 自动弹出选项
613
+ 'clear-icon': '', // 清除图标
614
+ 'fit-input-width': false, // 下拉框宽度
615
+ 'suffix-icon': '', // 后缀图标
616
+ 'tag-type': 'info', // 标签类型
617
+ 'validate-event': true, // 表单验证
618
+ placement: 'bottom-start', // 下拉框出现的位置
619
+ 'max-collapse-tags': 1, // 需要显示的 Tag 的最大数量
620
+ // tree属性
621
+ props: {}, // 配置选项
622
+ data: 'string=', // data展示数据
623
+ },
624
+ rules: {},
625
+ };
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div class="p-[10px] h-full">
3
+ <base-form v-model:data="data" :config="treeSelectAttrConfig" :isVModel="isVModel"></base-form>
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts" name="treeSelectAttrConfig">
8
+ import baseForm from '../baseForm.vue';
9
+ import { ref } from 'vue';
10
+ import { treeSelectAttrConfig, treeSelectAttrConfigMap } from './config';
11
+ import _ from 'lodash';
12
+ const props = defineProps({
13
+ data: {
14
+ type: Object,
15
+ default: () => {},
16
+ },
17
+ isVModel: {
18
+ type: Boolean,
19
+ default: false,
20
+ },
21
+ });
22
+ // lodash判断对象是否为空
23
+ const data = ref(_.isEmpty(props.data) ? Object.assign(props.data, _.cloneDeep(treeSelectAttrConfigMap)) : props.data);
24
+ </script>
25
+
26
+ <style scoped lang="scss"></style>
@@ -0,0 +1,25 @@
1
+
2
+ interface option {
3
+ label: string,
4
+ value: string
5
+ }
6
+
7
+ export interface formConfigItemType {
8
+ prop: string,
9
+ label: string,
10
+ tooltip?: string,
11
+ type?: string,
12
+ el: string,
13
+ op?: Array<option>,
14
+ cel?: string,
15
+ required?: boolean,
16
+ multiple?: boolean,
17
+ size?: string,
18
+ attrs?: any,
19
+ clearable?: boolean,
20
+ children?: Array<formConfigItemType>
21
+ }
22
+
23
+
24
+
25
+