hs-admin-ui 1.0.0 → 1.0.2

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 (433) hide show
  1. package/dist/favicon.ico +0 -0
  2. package/dist/style.css +1 -0
  3. package/dist/style.css.gz +0 -0
  4. package/dist/umd/index.js +175 -0
  5. package/dist/umd/index.js.gz +0 -0
  6. package/package.json +5 -2
  7. package/.env +0 -11
  8. package/.env.development +0 -5
  9. package/.env.production +0 -5
  10. package/.eslintignore +0 -18
  11. package/.eslintrc.js +0 -104
  12. package/.prettierrc.js +0 -39
  13. package/.vite/deps_temp_3669a513/chunk-FVXAE7ZR.js +0 -11400
  14. package/.vite/deps_temp_3669a513/chunk-ZS7NZCD4.js +0 -36
  15. package/.vite/deps_temp_3669a513/default-passive-events.js +0 -25
  16. package/.vite/deps_temp_3669a513/element-plus.js +0 -65013
  17. package/.vite/deps_temp_3669a513/lodash.js +0 -5497
  18. package/.vite/deps_temp_3669a513/package.json +0 -3
  19. package/.vite/deps_temp_3669a513/vue.js +0 -324
  20. package/.vite/deps_temp_3669a513/vxe-table.js +0 -32336
  21. package/CHANGELOG.md +0 -1
  22. package/directoryList.md +0 -180
  23. package/postcss.config.js +0 -7
  24. package/src/App.vue +0 -88
  25. package/src/api/fieldConfigController/index.ts +0 -76
  26. package/src/api/fieldConfigController/type.ts +0 -44
  27. package/src/api/login/index.ts +0 -78
  28. package/src/api/loginController/index.ts +0 -74
  29. package/src/api/menu/index.ts +0 -34
  30. package/src/api/menu/index2.ts +0 -291
  31. package/src/api/menuController/index.ts +0 -189
  32. package/src/api/systemController/index.ts +0 -26
  33. package/src/api/systemController/type.ts +0 -16
  34. package/src/api/test/index.ts +0 -22
  35. package/src/api/user/index.ts +0 -30
  36. package/src/assets/404.png +0 -0
  37. package/src/assets/logo-main.svg +0 -12
  38. package/src/assets/logo-mini.svg +0 -12
  39. package/src/components/base/hsAffix/src/hsAffix.vue +0 -22
  40. package/src/components/base/hsAlert/src/hsAlert.vue +0 -15
  41. package/src/components/base/hsAutocomplete/src/hsAutocomplete.vue +0 -36
  42. package/src/components/base/hsButton/src/hsButton.vue +0 -26
  43. package/src/components/base/hsButton/src/hsButtonGroup.vue +0 -8
  44. package/src/components/base/hsButton/useButtonEvents.ts +0 -19
  45. package/src/components/base/hsCalendar/src/hsCalendar.vue +0 -36
  46. package/src/components/base/hsCarousel/src/hsCarousel.vue +0 -15
  47. package/src/components/base/hsCarousel/src/hsCarouselItem.vue +0 -15
  48. package/src/components/base/hsCascader/src/hsCascader.vue +0 -36
  49. package/src/components/base/hsCascader/src/hsCascaderPanel.vue +0 -29
  50. package/src/components/base/hsCheckbox/src/hsCheckbox.vue +0 -32
  51. package/src/components/base/hsCheckbox/src/hsCheckboxButton.vue +0 -18
  52. package/src/components/base/hsCheckbox/src/hsCheckboxGroup.vue +0 -32
  53. package/src/components/base/hsCol/src/hsCol.vue +0 -20
  54. package/src/components/base/hsCollapse/src/hsCollapse.vue +0 -36
  55. package/src/components/base/hsCollapse/src/hsCollapseItem.vue +0 -22
  56. package/src/components/base/hsColorPicker/src/hsColorPicker.vue +0 -32
  57. package/src/components/base/hsDatePicker/src/hsDatePicker.vue +0 -40
  58. package/src/components/base/hsDialog/src/hsDialog.vue +0 -36
  59. package/src/components/base/hsDrawer/src/hsDrawer.vue +0 -29
  60. package/src/components/base/hsDropdown/src/hsDropdown.vue +0 -15
  61. package/src/components/base/hsDropdown/src/hsDropdownItem.vue +0 -15
  62. package/src/components/base/hsDropdown/src/hsDropdownMenu.vue +0 -15
  63. package/src/components/base/hsForm/src/hsForm.vue +0 -23
  64. package/src/components/base/hsForm/src/hsFormItem.vue +0 -22
  65. package/src/components/base/hsGetApi/src/hsGetApis.vue +0 -231
  66. package/src/components/base/hsGetApi/useGetApis.ts +0 -158
  67. package/src/components/base/hsInput/src/hsInput.vue +0 -40
  68. package/src/components/base/hsInput/useInputEvents.ts +0 -52
  69. package/src/components/base/hsInputNumber/src/hsInputNumber.vue +0 -31
  70. package/src/components/base/hsPopconfirm/src/hsPopconfirm.vue +0 -15
  71. package/src/components/base/hsPopover/src/hsPopover.vue +0 -22
  72. package/src/components/base/hsProgress/src/hsProgress.vue +0 -15
  73. package/src/components/base/hsRadio/src/hsRadio.vue +0 -32
  74. package/src/components/base/hsRadio/src/hsRadioButton.vue +0 -18
  75. package/src/components/base/hsRadio/src/hsRadioGroup.vue +0 -32
  76. package/src/components/base/hsRate/src/hsRate.vue +0 -33
  77. package/src/components/base/hsResult/src/hsResult.vue +0 -15
  78. package/src/components/base/hsRow/src/hsRow.vue +0 -20
  79. package/src/components/base/hsScrollbar/src/hsScrollbar.vue +0 -22
  80. package/src/components/base/hsSelect/src/hsOption.vue +0 -8
  81. package/src/components/base/hsSelect/src/hsOptionGroup.vue +0 -8
  82. package/src/components/base/hsSelect/src/hsSelect.vue +0 -42
  83. package/src/components/base/hsSelect/useSelectEvents.ts +0 -60
  84. package/src/components/base/hsSlider/src/hsSlider.vue +0 -25
  85. package/src/components/base/hsSteps/src/hsStep.vue +0 -15
  86. package/src/components/base/hsSteps/src/hsSteps.vue +0 -15
  87. package/src/components/base/hsSwitch/src/hsSwitch.vue +0 -35
  88. package/src/components/base/hsTable/hsBCTable.vue +0 -116
  89. package/src/components/base/hsTable/hsTable copy.vue +0 -226
  90. package/src/components/base/hsTable/hsTable.vue +0 -213
  91. package/src/components/base/hsTable/useHsTableConfig.ts +0 -95
  92. package/src/components/base/hsTable/useTableEvents.ts +0 -118
  93. package/src/components/base/hsTabs/src/hsTabPane.vue +0 -15
  94. package/src/components/base/hsTabs/src/hsTabs.vue +0 -29
  95. package/src/components/base/hsTag/src/hsCheckTag.vue +0 -16
  96. package/src/components/base/hsTag/src/hsTag.vue +0 -15
  97. package/src/components/base/hsTest/HsTest.vue +0 -320
  98. package/src/components/base/hsTooltip/src/hsTooltip.vue +0 -22
  99. package/src/components/base/hsTour/src/hsTour.vue +0 -31
  100. package/src/components/base/hsTour/src/hsTourStep.vue +0 -15
  101. package/src/components/base/hsTransfer/src/hsTransfer.vue +0 -36
  102. package/src/components/base/hsTree/src/hsTree.vue +0 -24
  103. package/src/components/base/hsTreeSelect/src/hsTreeSelect.vue +0 -39
  104. package/src/components/base/hsUpload/src/hsUpload.vue +0 -32
  105. package/src/components/base/hsWatermark/src/hsWatermark.vue +0 -15
  106. package/src/components/business/bcAutoComplete/bcAutoComplete.vue +0 -38
  107. package/src/components/business/bcAutoComplete/defaultData.ts +0 -25
  108. package/src/components/business/bcAutoComplete/useAutoComplete.ts +0 -65
  109. package/src/components/business/bcBtn/bcBtn.vue +0 -40
  110. package/src/components/business/bcForm/bcForm.vue +0 -113
  111. package/src/components/business/bcForm/bcFormDrag.vue +0 -104
  112. package/src/components/business/bcForm/bcFormSearch.vue +0 -154
  113. package/src/components/business/bcForm/components/sortForm/index.ts +0 -18
  114. package/src/components/business/bcForm/components/sortForm/sortForm.vue +0 -92
  115. package/src/components/business/bcFormConfig/bcFormConfig.vue +0 -196
  116. package/src/components/business/bcFormTable/bcFormTable.vue +0 -91
  117. package/src/components/business/bcFormTable/components/bcTabs/bcTabs.vue +0 -53
  118. package/src/components/business/bcFormTable/components/contextBody/contextBody.vue +0 -67
  119. package/src/components/business/bcFormTable/components/contextBody/useContextMenu.ts +0 -53
  120. package/src/components/business/bcFormTable/components/formSearchBtn/formSearchBtn.vue +0 -21
  121. package/src/components/business/bcFormTable/methods/cellDetailMethod.ts +0 -5
  122. package/src/components/business/bcFormTable/methods/filterAgeMethod.ts +0 -5
  123. package/src/components/business/bcFormTable/methods/footerMethod.ts +0 -25
  124. package/src/components/business/bcFormTable/methods/index.ts +0 -10
  125. package/src/components/business/bcFormTable/utils/onFormKey.ts +0 -121
  126. package/src/components/business/bcFormTable/utils/onTableKey.ts +0 -119
  127. package/src/components/business/bcFormTable/utils/parseTable.ts +0 -201
  128. package/src/components/business/bcFormTable/utils/useButon.ts +0 -20
  129. package/src/components/business/bcFormTable/utils/useTableHeight.ts +0 -44
  130. package/src/components/business/bcPageConfig/bcPageConfig.vue +0 -79
  131. package/src/components/business/bcPageConfig/components/hsBtn/src/hsAttrBtn.vue +0 -39
  132. package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnConfigList.vue +0 -45
  133. package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnItemConfig.vue +0 -32
  134. package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnPanel.vue +0 -45
  135. package/src/components/business/bcPageConfig/components/hsBtn/useAttrBtn.ts +0 -58
  136. package/src/components/business/bcPageConfig/components/hsBtn/useBtnConfigList.ts +0 -71
  137. package/src/components/business/bcPageConfig/components/hsBtn/useBtnItemConfig.ts +0 -35
  138. package/src/components/business/bcPageConfig/components/hsExpand/src/hsExpand.vue +0 -33
  139. package/src/components/business/bcPageConfig/components/hsExpand/useExpand.ts +0 -9
  140. package/src/components/business/bcPageConfig/components/hsForm/src/hsAttrForm.vue +0 -54
  141. package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfig.vue +0 -180
  142. package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfigList.vue +0 -45
  143. package/src/components/business/bcPageConfig/components/hsForm/src/hsFormPanel.vue +0 -64
  144. package/src/components/business/bcPageConfig/components/hsForm/src/hsFormParse.vue +0 -24
  145. package/src/components/business/bcPageConfig/components/hsForm/useAttrForm.ts +0 -108
  146. package/src/components/business/bcPageConfig/components/hsForm/useFormListConfig.ts +0 -69
  147. package/src/components/business/bcPageConfig/components/hsForm/useFormParse.ts +0 -120
  148. package/src/components/business/bcPageConfig/components/hsSaveForm/saveFormConfig.ts +0 -66
  149. package/src/components/business/bcPageConfig/components/hsSaveForm/src/saveForm.vue +0 -48
  150. package/src/components/business/bcPageConfig/components/hsSaveForm/useSaveForm.ts +0 -148
  151. package/src/components/business/bcPageConfig/components/hsTables/src/hsAttrTable.vue +0 -122
  152. package/src/components/business/bcPageConfig/components/hsTables/src/hsRecursionConfig.vue +0 -36
  153. package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfig.vue +0 -51
  154. package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfigList.vue +0 -46
  155. package/src/components/business/bcPageConfig/components/hsTables/src/hsTablePanel.vue +0 -68
  156. package/src/components/business/bcPageConfig/components/hsTables/src/hsTableParse.vue +0 -24
  157. package/src/components/business/bcPageConfig/components/hsTables/useAttrTable.ts +0 -218
  158. package/src/components/business/bcPageConfig/components/hsTables/useTableConfigList.ts +0 -77
  159. package/src/components/business/bcPageConfig/components/hsTables/useTableParse.ts +0 -78
  160. package/src/components/business/bcPageConfig/default/apis.json +0 -24712
  161. package/src/components/business/bcPageConfig/default/baseBtnConfig.ts +0 -256
  162. package/src/components/business/bcPageConfig/default/baseFormConfig.ts +0 -380
  163. package/src/components/business/bcPageConfig/default/baseTableConfig.ts +0 -2399
  164. package/src/components/business/bcPageConfig/usePageConfig.ts +0 -469
  165. package/src/components/business/bcSelect/bcSelect.vue +0 -50
  166. package/src/components/business/bcSwitchSystems/bcSwitchSystems.vue +0 -36
  167. package/src/components/business/bcSwitchSystems/useSwitchSystems.ts +0 -74
  168. package/src/components/business/bcTable/bcTable.vue +0 -63
  169. package/src/components/business/bcTable/components/sortColumn/index.ts +0 -19
  170. package/src/components/business/bcTable/components/sortColumn/sortColumn.vue +0 -107
  171. package/src/components/business/bcTable/useTable.ts +0 -51
  172. package/src/components/business/bcTable/useTableHeight.ts +0 -24
  173. package/src/components/business/bcTreeSelect/bcTreeSelect.vue +0 -12
  174. package/src/components/business/cardID/cardID.vue +0 -24
  175. package/src/components/business/cardID/type.ts +0 -0
  176. package/src/components/business/cardID/useCardID.ts +0 -0
  177. package/src/components/component.ts +0 -188
  178. package/src/components/config/autocompleteAttrConfig/autocompleteAttrConfig.vue +0 -26
  179. package/src/components/config/autocompleteAttrConfig/config.ts +0 -170
  180. package/src/components/config/baseForm.vue +0 -175
  181. package/src/components/config/buttonAttrConfig/buttonAttrConfig.vue +0 -26
  182. package/src/components/config/buttonAttrConfig/config.ts +0 -261
  183. package/src/components/config/cascaderAttrConfig/cascaderAttrConfig.vue +0 -26
  184. package/src/components/config/cascaderAttrConfig/config.ts +0 -287
  185. package/src/components/config/cascaderPanelAttrConfig/cascaderPanelAttrConfig.vue +0 -26
  186. package/src/components/config/cascaderPanelAttrConfig/config.ts +0 -278
  187. package/src/components/config/checkboxAttrConfig/checkboxAttrConfig.vue +0 -26
  188. package/src/components/config/checkboxAttrConfig/config.ts +0 -301
  189. package/src/components/config/datePickerAttrConfig/config.ts +0 -256
  190. package/src/components/config/datePickerAttrConfig/datePickerAttrConfig.vue +0 -26
  191. package/src/components/config/inputAttrConfig/config.ts +0 -322
  192. package/src/components/config/inputAttrConfig/inputAttrConfig.vue +0 -33
  193. package/src/components/config/inputAttrConfig/inputEventConfig.vue +0 -35
  194. package/src/components/config/inputNumberAttrConfig/config.ts +0 -177
  195. package/src/components/config/inputNumberAttrConfig/inputNumberAttrConfig.vue +0 -26
  196. package/src/components/config/radioAttrConfig/config.ts +0 -212
  197. package/src/components/config/radioAttrConfig/radioAttrConfig.vue +0 -26
  198. package/src/components/config/selectAttrConfig/config.ts +0 -478
  199. package/src/components/config/selectAttrConfig/selectAttrConfig.vue +0 -26
  200. package/src/components/config/switchAttrConfig/config.ts +0 -195
  201. package/src/components/config/switchAttrConfig/switchAttrConfig.vue +0 -26
  202. package/src/components/config/treeSelectAttrConfig/config.ts +0 -625
  203. package/src/components/config/treeSelectAttrConfig/treeSelectAttrConfig.vue +0 -26
  204. package/src/components/config/type/formType.ts +0 -25
  205. package/src/components/config/uploadAttrConfig/config.ts +0 -250
  206. package/src/components/config/uploadAttrConfig/uploadAttrConfig.vue +0 -26
  207. package/src/components/iconSelector/index.vue +0 -247
  208. package/src/components/iconSelector/list.vue +0 -84
  209. package/src/components/svgIcon/index.vue +0 -61
  210. package/src/directive/authDirective.ts +0 -40
  211. package/src/directive/customDirective.ts +0 -178
  212. package/src/directive/index.ts +0 -18
  213. package/src/hooks/useCrypto.ts +0 -36
  214. package/src/hooks/useExpose.ts +0 -60
  215. package/src/layout/component/aside.vue +0 -160
  216. package/src/layout/component/columnsAside.vue +0 -299
  217. package/src/layout/component/header.vue +0 -18
  218. package/src/layout/component/main.vue +0 -65
  219. package/src/layout/footer/index.vue +0 -25
  220. package/src/layout/index.vue +0 -53
  221. package/src/layout/lockScreen/index.vue +0 -352
  222. package/src/layout/logo/index.vue +0 -75
  223. package/src/layout/main/classic.vue +0 -73
  224. package/src/layout/main/columns.vue +0 -73
  225. package/src/layout/main/defaults.vue +0 -73
  226. package/src/layout/main/transverse.vue +0 -60
  227. package/src/layout/navBars/index.vue +0 -35
  228. package/src/layout/navBars/tagsView/contextmenu.vue +0 -133
  229. package/src/layout/navBars/tagsView/tagsView.vue +0 -737
  230. package/src/layout/navBars/topBar/breadcrumb.vue +0 -146
  231. package/src/layout/navBars/topBar/closeFull.vue +0 -53
  232. package/src/layout/navBars/topBar/index.vue +0 -107
  233. package/src/layout/navBars/topBar/search.vue +0 -123
  234. package/src/layout/navBars/topBar/setings.vue +0 -789
  235. package/src/layout/navBars/topBar/user.vue +0 -222
  236. package/src/layout/navBars/topBar/userNews.vue +0 -107
  237. package/src/layout/navMenu/horizontal.vue +0 -138
  238. package/src/layout/navMenu/subItem.vue +0 -49
  239. package/src/layout/navMenu/vertical.vue +0 -100
  240. package/src/layout/routerView/iframes.vue +0 -101
  241. package/src/layout/routerView/link.vue +0 -93
  242. package/src/layout/routerView/parent.vue +0 -104
  243. package/src/layout/upgrade/index.vue +0 -147
  244. package/src/main.ts +0 -70
  245. package/src/router/backEnd.ts +0 -173
  246. package/src/router/frontEnd.ts +0 -155
  247. package/src/router/index.ts +0 -138
  248. package/src/router/route.ts +0 -94
  249. package/src/stores/index.ts +0 -8
  250. package/src/stores/keepAliveNames.ts +0 -38
  251. package/src/stores/requestOldRoutes.ts +0 -16
  252. package/src/stores/routesList.ts +0 -26
  253. package/src/stores/tagsViewRoutes.ts +0 -23
  254. package/src/stores/themeConfig.ts +0 -142
  255. package/src/stores/userInfo.ts +0 -65
  256. package/src/style/index.scss +0 -0
  257. package/src/style/tailwind.css +0 -29
  258. package/src/theme/app.scss +0 -333
  259. package/src/theme/common/transition.scss +0 -147
  260. package/src/theme/dark.scss +0 -255
  261. package/src/theme/element.scss +0 -321
  262. package/src/theme/iconSelector.scss +0 -31
  263. package/src/theme/index.scss +0 -8
  264. package/src/theme/loading.scss +0 -51
  265. package/src/theme/media/chart.scss +0 -94
  266. package/src/theme/media/cityLinkage.scss +0 -10
  267. package/src/theme/media/date.scss +0 -25
  268. package/src/theme/media/dialog.scss +0 -12
  269. package/src/theme/media/error.scss +0 -45
  270. package/src/theme/media/form.scss +0 -31
  271. package/src/theme/media/home.scss +0 -23
  272. package/src/theme/media/index.scss +0 -15
  273. package/src/theme/media/layout.scss +0 -63
  274. package/src/theme/media/login.scss +0 -74
  275. package/src/theme/media/media.scss +0 -13
  276. package/src/theme/media/pagination.scss +0 -15
  277. package/src/theme/media/personal.scss +0 -16
  278. package/src/theme/media/scrollbar.scss +0 -56
  279. package/src/theme/media/tagsView.scss +0 -11
  280. package/src/theme/mixins/index.scss +0 -56
  281. package/src/theme/other.scss +0 -36
  282. package/src/theme/tableTool.scss +0 -27
  283. package/src/theme/waves.scss +0 -101
  284. package/src/types/auth.d.ts +0 -44
  285. package/src/types/axios.d.ts +0 -13
  286. package/src/types/components.d.ts +0 -30
  287. package/src/types/customData.d.ts +0 -163
  288. package/src/types/form.ts +0 -68
  289. package/src/types/formItem/autocomplete.ts +0 -43
  290. package/src/types/formItem/button.ts +0 -39
  291. package/src/types/formItem/input.ts +0 -66
  292. package/src/types/formItem/inputNumber.ts +0 -42
  293. package/src/types/formItem/selelct.ts +0 -54
  294. package/src/types/formItem/treeSelect.ts +0 -37
  295. package/src/types/formTable.d.ts +0 -210
  296. package/src/types/global.d.ts +0 -118
  297. package/src/types/layout.d.ts +0 -59
  298. package/src/types/mitt.d.ts +0 -38
  299. package/src/types/pinia.d.ts +0 -92
  300. package/src/types/views.d.ts +0 -331
  301. package/src/utils/arrayOperation.ts +0 -65
  302. package/src/utils/authFunction.ts +0 -38
  303. package/src/utils/build.ts +0 -124
  304. package/src/utils/commonFunction.ts +0 -64
  305. package/src/utils/formatTime.ts +0 -137
  306. package/src/utils/getDataType.ts +0 -136
  307. package/src/utils/getStyleSheets.ts +0 -101
  308. package/src/utils/loading.ts +0 -44
  309. package/src/utils/mitt.ts +0 -8
  310. package/src/utils/other.ts +0 -214
  311. package/src/utils/request.ts +0 -82
  312. package/src/utils/setIconfont.ts +0 -48
  313. package/src/utils/showMessage.ts +0 -57
  314. package/src/utils/showMessageBox.ts +0 -39
  315. package/src/utils/showNotification.ts +0 -50
  316. package/src/utils/showPopup.ts +0 -81
  317. package/src/utils/storage.ts +0 -137
  318. package/src/utils/theme.ts +0 -65
  319. package/src/utils/toolsValidate.ts +0 -370
  320. package/src/utils/watermark.ts +0 -47
  321. package/src/views/error/401.vue +0 -88
  322. package/src/views/error/404.vue +0 -89
  323. package/src/views/home/index.vue +0 -62
  324. package/src/views/login/component/account.vue +0 -172
  325. package/src/views/login/component/mobile.vue +0 -72
  326. package/src/views/login/component/scan.vue +0 -63
  327. package/src/views/login/index.vue +0 -254
  328. package/src/views/system/auth/index.vue +0 -48
  329. package/src/views/system/auth/list.ts +0 -50
  330. package/src/views/system/auth/useAuth.ts +0 -34
  331. package/src/views/system/dept/dialog.vue +0 -167
  332. package/src/views/system/dept/index.vue +0 -135
  333. package/src/views/system/dic/dialog.vue +0 -150
  334. package/src/views/system/dic/index.vue +0 -132
  335. package/src/views/system/form/data.json +0 -360
  336. package/src/views/system/form/index.vue +0 -24
  337. package/src/views/system/formSetting/components/hsBtn/src/hsAttrBtn.vue +0 -58
  338. package/src/views/system/formSetting/components/hsBtn/src/hsBtnConfigList.vue +0 -45
  339. package/src/views/system/formSetting/components/hsBtn/src/hsBtnPanel.vue +0 -51
  340. package/src/views/system/formSetting/components/hsBtn/useAttrBtn.ts +0 -129
  341. package/src/views/system/formSetting/components/hsBtn/useBtnConfigList.ts +0 -73
  342. package/src/views/system/formSetting/components/hsExpand/src/hsExpand.vue +0 -27
  343. package/src/views/system/formSetting/components/hsExpand/useExpand.ts +0 -9
  344. package/src/views/system/formSetting/components/hsForm/src/hsAttrForm.vue +0 -124
  345. package/src/views/system/formSetting/components/hsForm/src/hsFormConfig.vue +0 -180
  346. package/src/views/system/formSetting/components/hsForm/src/hsFormConfigList.vue +0 -45
  347. package/src/views/system/formSetting/components/hsForm/src/hsFormPanel.vue +0 -152
  348. package/src/views/system/formSetting/components/hsForm/src/hsFormParse.vue +0 -33
  349. package/src/views/system/formSetting/components/hsForm/useAttrForm.ts +0 -109
  350. package/src/views/system/formSetting/components/hsForm/useFormListConfig.ts +0 -70
  351. package/src/views/system/formSetting/components/hsPageTree/configData.ts +0 -3700
  352. package/src/views/system/formSetting/components/hsPageTree/src/hsPageTree.vue +0 -30
  353. package/src/views/system/formSetting/components/hsPageTree/usePageTree.ts +0 -50
  354. package/src/views/system/formSetting/components/hsSaveForm/saveFormConfig.ts +0 -66
  355. package/src/views/system/formSetting/components/hsSaveForm/src/saveForm.vue +0 -47
  356. package/src/views/system/formSetting/components/hsSaveForm/useSaveForm.ts +0 -122
  357. package/src/views/system/formSetting/components/hsTables/src/hsAttrTable.vue +0 -91
  358. package/src/views/system/formSetting/components/hsTables/src/hsRecursionConfig.vue +0 -36
  359. package/src/views/system/formSetting/components/hsTables/src/hsTableConfig.vue +0 -39
  360. package/src/views/system/formSetting/components/hsTables/src/hsTableConfigList.vue +0 -45
  361. package/src/views/system/formSetting/components/hsTables/src/hsTablePanel.vue +0 -56
  362. package/src/views/system/formSetting/components/hsTables/src/hsTableParse.vue +0 -29
  363. package/src/views/system/formSetting/components/hsTables/useAttrTable.ts +0 -125
  364. package/src/views/system/formSetting/components/hsTables/useTableConfigList.ts +0 -77
  365. package/src/views/system/formSetting/components/selectConfig/config.ts +0 -476
  366. package/src/views/system/formSetting/components/selectConfig/selectConfig.vue +0 -30
  367. package/src/views/system/formSetting/data.json +0 -360
  368. package/src/views/system/formSetting/default/baseBtnConfig.ts +0 -216
  369. package/src/views/system/formSetting/default/baseFormConfig.ts +0 -567
  370. package/src/views/system/formSetting/default/baseTableConfig.ts +0 -2353
  371. package/src/views/system/formSetting/formConfig.vue +0 -108
  372. package/src/views/system/formSetting/index.vue +0 -35
  373. package/src/views/system/formSetting/menuType.d.ts +0 -12
  374. package/src/views/system/formSetting/panelConfig.json +0 -164
  375. package/src/views/system/formSetting/useForm.ts +0 -89
  376. package/src/views/system/formSetting/useFormConfig.ts +0 -192
  377. package/src/views/system/menu/dialog.vue +0 -285
  378. package/src/views/system/menu/index.vue +0 -180
  379. package/src/views/system/page/components/hsPageTree/configData.ts +0 -3700
  380. package/src/views/system/page/components/hsPageTree/src/hsPageTree.vue +0 -30
  381. package/src/views/system/page/components/hsPageTree/usePageTree.ts +0 -49
  382. package/src/views/system/page/index.vue +0 -32
  383. package/src/views/system/page/menuType.d.ts +0 -12
  384. package/src/views/system/page/usePage.ts +0 -125
  385. package/src/views/system/role/dialog.vue +0 -236
  386. package/src/views/system/role/index.vue +0 -146
  387. package/src/views/system/table/data.json +0 -747
  388. package/src/views/system/table/formate.js +0 -49
  389. package/src/views/system/table/index.vue +0 -53
  390. package/src/views/system/user/dialog.vue +0 -187
  391. package/src/views/system/user/index.vue +0 -161
  392. package/src/views/test/test/components/hsBtn/src/hsAttrBtn.vue +0 -58
  393. package/src/views/test/test/components/hsBtn/src/hsBtnConfigList.vue +0 -45
  394. package/src/views/test/test/components/hsBtn/src/hsBtnPanel.vue +0 -51
  395. package/src/views/test/test/components/hsBtn/useAttrBtn.ts +0 -129
  396. package/src/views/test/test/components/hsBtn/useBtnConfigList.ts +0 -73
  397. package/src/views/test/test/components/hsExpand/src/hsExpand.vue +0 -27
  398. package/src/views/test/test/components/hsExpand/useExpand.ts +0 -9
  399. package/src/views/test/test/components/hsForm/src/hsAttrForm.vue +0 -124
  400. package/src/views/test/test/components/hsForm/src/hsFormConfig.vue +0 -180
  401. package/src/views/test/test/components/hsForm/src/hsFormConfigList.vue +0 -45
  402. package/src/views/test/test/components/hsForm/src/hsFormPanel.vue +0 -152
  403. package/src/views/test/test/components/hsForm/src/hsFormParse.vue +0 -33
  404. package/src/views/test/test/components/hsForm/useAttrForm.ts +0 -109
  405. package/src/views/test/test/components/hsForm/useFormListConfig.ts +0 -70
  406. package/src/views/test/test/components/hsSaveForm/saveFormConfig.ts +0 -66
  407. package/src/views/test/test/components/hsSaveForm/src/saveForm.vue +0 -47
  408. package/src/views/test/test/components/hsSaveForm/useSaveForm.ts +0 -122
  409. package/src/views/test/test/components/hsTables/src/hsAttrTable.vue +0 -91
  410. package/src/views/test/test/components/hsTables/src/hsRecursionConfig.vue +0 -36
  411. package/src/views/test/test/components/hsTables/src/hsTableConfig.vue +0 -39
  412. package/src/views/test/test/components/hsTables/src/hsTableConfigList.vue +0 -45
  413. package/src/views/test/test/components/hsTables/src/hsTablePanel.vue +0 -56
  414. package/src/views/test/test/components/hsTables/src/hsTableParse.vue +0 -29
  415. package/src/views/test/test/components/hsTables/useAttrTable.ts +0 -125
  416. package/src/views/test/test/components/hsTables/useTableConfigList.ts +0 -77
  417. package/src/views/test/test/components/selectConfig/config.ts +0 -476
  418. package/src/views/test/test/components/selectConfig/selectConfig.vue +0 -30
  419. package/src/views/test/test/data.json +0 -360
  420. package/src/views/test/test/default/baseBtnConfig.ts +0 -216
  421. package/src/views/test/test/default/baseFormConfig.ts +0 -567
  422. package/src/views/test/test/default/baseTableConfig.ts +0 -2353
  423. package/src/views/test/test/formConfig.vue +0 -102
  424. package/src/views/test/test/test.vue +0 -28
  425. package/src/views/test/test/test3.vue +0 -24
  426. package/src/views/test/test/test4.vue +0 -107
  427. package/src/views/test/test/test/345/211/257/346/234/254.vue +0 -2424
  428. package/src/views/test/test/useFormConfig.ts +0 -192
  429. package/src/views/test/test2/test2.vue +0 -17
  430. package/src/views/test/test3/test.vue +0 -20
  431. package/tailwind.config.js +0 -12
  432. package/tsconfig.json +0 -75
  433. package/vite.config.ts +0 -123
@@ -1,331 +0,0 @@
1
- /**
2
- * views personal
3
- */
4
- type NewInfo = {
5
- title: string;
6
- date: string;
7
- link: string;
8
- };
9
- type Recommend = {
10
- title: string;
11
- msg: string;
12
- icon: string;
13
- bg: string;
14
- iconColor: string;
15
- };
16
- declare type PersonalState = {
17
- newsInfoList: NewInfo[];
18
- recommendList: Recommend[];
19
- personalForm: {
20
- name: string;
21
- email: string;
22
- autograph: string;
23
- occupation: string;
24
- phone: string;
25
- sex: string;
26
- };
27
- };
28
-
29
- /**
30
- * views visualizing
31
- */
32
- declare type Demo2State<T = any> = {
33
- time: {
34
- txt: string;
35
- fun: number;
36
- };
37
- dropdownList: T[];
38
- dropdownActive: string;
39
- skyList: T[];
40
- dBtnList: T[];
41
- chartData4Index: number;
42
- dBtnActive: number;
43
- earth3DBtnList: T[];
44
- chartData4List: T[];
45
- myCharts: T[];
46
- };
47
-
48
- /**
49
- * views params
50
- */
51
- declare type ParamsState = {
52
- value: string;
53
- tagsViewName: string;
54
- tagsViewNameIsI18n: boolean;
55
- };
56
-
57
- /**
58
- * views system
59
- */
60
- // role
61
- declare interface RowRoleType {
62
- roleName: string;
63
- roleSign: string;
64
- describe: string;
65
- sort: number;
66
- status: boolean;
67
- createTime: string;
68
- }
69
-
70
- interface SysRoleTableType extends TableType {
71
- data: RowRoleType[];
72
- }
73
-
74
- declare interface SysRoleState {
75
- tableData: SysRoleTableType;
76
- }
77
-
78
- declare type TreeType = {
79
- id: number;
80
- label: string;
81
- children?: TreeType[];
82
- };
83
-
84
- // user
85
- declare type RowUserType<T = any> = {
86
- userName: string;
87
- userNickname: string;
88
- roleSign: string;
89
- department: string[];
90
- phone: string;
91
- email: string;
92
- sex: string;
93
- password: string;
94
- overdueTime: T;
95
- status: boolean;
96
- describe: string;
97
- createTime: T;
98
- };
99
-
100
- interface SysUserTableType extends TableType {
101
- data: RowUserType[];
102
- }
103
-
104
- declare interface SysUserState {
105
- columns: Array;
106
- tableData: SysUserTableType;
107
- }
108
-
109
- declare type DeptTreeType = {
110
- deptName: string;
111
- createTime: string;
112
- status: boolean;
113
- sort: number;
114
- describe: string;
115
- id: number | string;
116
- children?: DeptTreeType[];
117
- };
118
-
119
- // dept
120
- declare interface RowDeptType extends DeptTreeType {
121
- deptLevel: string[];
122
- person: string;
123
- phone: string;
124
- email: string;
125
- }
126
-
127
- interface SysDeptTableType extends TableType {
128
- data: DeptTreeType[];
129
- }
130
-
131
- declare interface SysDeptState {
132
- tableData: SysDeptTableType;
133
- }
134
-
135
- // dic
136
- type ListType = {
137
- id: number;
138
- label: string;
139
- value: string;
140
- };
141
-
142
- declare interface RowDicType {
143
- dicName: string;
144
- fieldName: string;
145
- describe: string;
146
- status: boolean;
147
- createTime: string;
148
- list: ListType[];
149
- }
150
-
151
- interface SysDicTableType extends TableType {
152
- data: RowDicType[];
153
- }
154
-
155
- declare interface SysDicState {
156
- tableData: SysDicTableType;
157
- }
158
-
159
- /**
160
- * views pages
161
- */
162
- // filtering
163
- declare type FilteringChilType = {
164
- id: number | string;
165
- label: string;
166
- active: boolean;
167
- };
168
-
169
- declare type FilterListType = {
170
- img: string;
171
- title: string;
172
- evaluate: string;
173
- collection: string;
174
- price: string;
175
- monSales: string;
176
- id: number | string;
177
- loading?: boolean;
178
- };
179
-
180
- declare type FilteringRowType = {
181
- title: string;
182
- isMore: boolean;
183
- isShowMore: boolean;
184
- id: number | string;
185
- children: FilteringChilType[];
186
- };
187
-
188
- // tableRules
189
- declare type TableRulesHeaderType = {
190
- prop: string;
191
- width: string | number;
192
- label: string;
193
- isRequired?: boolean;
194
- isTooltip?: boolean;
195
- type: string;
196
- };
197
-
198
- declare type TableRulesState = {
199
- tableData: {
200
- data: EmptyObjectType[];
201
- header: TableRulesHeaderType[];
202
- option: SelectOptionType[];
203
- };
204
- };
205
-
206
- declare type TableRulesOneProps = {
207
- name: string;
208
- email: string;
209
- autograph: string;
210
- occupation: string;
211
- };
212
-
213
- // tree
214
- declare type RowTreeType = {
215
- id: number;
216
- label: string;
217
- label1: string;
218
- label2: string;
219
- isShow: boolean;
220
- children?: RowTreeType[];
221
- };
222
-
223
- // workflow index
224
- declare type NodeListState = {
225
- id: string | number;
226
- nodeId: string | undefined;
227
- class: HTMLElement | string;
228
- left: number | string;
229
- top: number | string;
230
- icon: string;
231
- name: string;
232
- };
233
-
234
- declare type LineListState = {
235
- sourceId: string;
236
- targetId: string;
237
- label: string;
238
- };
239
-
240
- declare type XyState = {
241
- x: string | number;
242
- y: string | number;
243
- };
244
-
245
- declare type WorkflowState<T = any> = {
246
- leftNavList: T[];
247
- dropdownNode: XyState;
248
- dropdownLine: XyState;
249
- isShow: boolean;
250
- jsPlumb: T;
251
- jsPlumbNodeIndex: null | number;
252
- jsplumbDefaults: T;
253
- jsplumbMakeSource: T;
254
- jsplumbMakeTarget: T;
255
- jsplumbConnect: T;
256
- jsplumbData: {
257
- nodeList: NodeListState[];
258
- lineList: LineListState[];
259
- };
260
- };
261
-
262
- // workflow drawer
263
- declare type WorkflowDrawerNodeState<T = any> = {
264
- node: { [key: string]: T };
265
- nodeRules: T;
266
- form: T;
267
- tabsActive: string;
268
- loading: {
269
- extend: boolean;
270
- };
271
- };
272
-
273
- declare type WorkflowDrawerLabelType = {
274
- type: string;
275
- label: string;
276
- };
277
-
278
- declare type WorkflowDrawerState<T = any> = {
279
- isOpen: boolean;
280
- nodeData: {
281
- type: string;
282
- };
283
- jsplumbConn: T;
284
- };
285
-
286
- /**
287
- * views make
288
- */
289
- // tableDemo
290
- declare type TableDemoPageType = {
291
- pageNum: number;
292
- pageSize: number;
293
- };
294
-
295
- declare type TableHeaderType = {
296
- key: string;
297
- width: string;
298
- title: string;
299
- type: string | number;
300
- colWidth: string;
301
- width?: string | number;
302
- height?: string | number;
303
- isCheck: boolean;
304
- };
305
-
306
- declare type TableSearchType = {
307
- label: string;
308
- prop: string;
309
- placeholder: string;
310
- required: boolean;
311
- type: string;
312
- options?: SelectOptionType[];
313
- };
314
-
315
- declare type TableDemoState = {
316
- tableData: {
317
- data: EmptyObjectType[];
318
- header: TableHeaderType[];
319
- config: {
320
- total: number;
321
- loading: boolean;
322
- isBorder: boolean;
323
- isSelection: boolean;
324
- isSerialNo: boolean;
325
- isOperate: boolean;
326
- };
327
- search: TableSearchType[];
328
- param: EmptyObjectType;
329
- printName: string;
330
- };
331
- };
@@ -1,65 +0,0 @@
1
- /**
2
- * 判断两数组字符串是否相同(用于按钮权限验证),数组字符串中存在相同时会自动去重(按钮权限标识不会重复)
3
- * @param news 新数据
4
- * @param old 源数据
5
- * @returns 两数组相同返回 `true`,反之则反
6
- */
7
- export function judementSameArr(newArr: unknown[] | string[], oldArr: string[]): boolean {
8
- const news = removeDuplicate(newArr);
9
- const olds = removeDuplicate(oldArr);
10
- let count = 0;
11
- const leng = news.length;
12
- for (let i in olds) {
13
- for (let j in news) {
14
- if (olds[i] === news[j]) count++;
15
- }
16
- }
17
- return count === leng ? true : false;
18
- }
19
-
20
- /**
21
- * 判断两个对象是否相同
22
- * @param a 要比较的对象一
23
- * @param b 要比较的对象二
24
- * @returns 相同返回 true,反之则反
25
- */
26
- export function isObjectValueEqual<T>(a: T, b: T): boolean {
27
- if (!a || !b) return false;
28
- let aProps = Object.getOwnPropertyNames(a);
29
- let bProps = Object.getOwnPropertyNames(b);
30
- if (aProps.length != bProps.length) return false;
31
- for (let i = 0; i < aProps.length; i++) {
32
- let propName = aProps[i];
33
- let propA = a[propName];
34
- let propB = b[propName];
35
- if (!b.hasOwnProperty(propName)) return false;
36
- if (propA instanceof Object) {
37
- if (!isObjectValueEqual(propA, propB)) return false;
38
- } else if (propA !== propB) {
39
- return false;
40
- }
41
- }
42
- return true;
43
- }
44
-
45
- /**
46
- * 数组、数组对象去重
47
- * @param arr 数组内容
48
- * @param attr 需要去重的键值(数组对象)
49
- * @returns
50
- */
51
- export function removeDuplicate(arr: EmptyArrayType, attr?: string) {
52
- if (!Object.keys(arr).length) {
53
- return arr;
54
- } else {
55
- if (attr) {
56
- const obj: EmptyObjectType = {};
57
- return arr.reduce((cur: EmptyArrayType[], item: EmptyArrayType) => {
58
- obj[item[attr]] ? '' : (obj[item[attr]] = true && item[attr] && cur.push(item));
59
- return cur;
60
- }, []);
61
- } else {
62
- return [...new Set(arr)];
63
- }
64
- }
65
- }
@@ -1,38 +0,0 @@
1
- import { useUserInfo } from '/@/stores/userInfo';
2
- import { judementSameArr } from '/@/utils/arrayOperation';
3
-
4
- /**
5
- * 单个权限验证
6
- * @param value 权限值
7
- * @returns 有权限,返回 `true`,反之则反
8
- */
9
- export function auth(value: string): boolean {
10
- const stores = useUserInfo();
11
- return stores.userInfos.authBtnList.some((v: string) => v === value);
12
- }
13
-
14
- /**
15
- * 多个权限验证,满足一个则为 true
16
- * @param value 权限值
17
- * @returns 有权限,返回 `true`,反之则反
18
- */
19
- export function auths(value: Array<string>): boolean {
20
- let flag = false;
21
- const stores = useUserInfo();
22
- stores.userInfos.authBtnList.map((val: string) => {
23
- value.map((v: string) => {
24
- if (val === v) flag = true;
25
- });
26
- });
27
- return flag;
28
- }
29
-
30
- /**
31
- * 多个权限验证,全部满足则为 true
32
- * @param value 权限值
33
- * @returns 有权限,返回 `true`,反之则反
34
- */
35
- export function authAll(value: Array<string>): boolean {
36
- const stores = useUserInfo();
37
- return judementSameArr(value, stores.userInfos.authBtnList);
38
- }
@@ -1,124 +0,0 @@
1
- import importToCDN from 'vite-plugin-cdn-import';
2
-
3
- /**
4
- * 打包相关
5
- * 注意 prodUrl:使用的是 jsdelivr 还是 unpkg。它们的 path 可能不一致
6
- * @description importToCDN https://github.com/mmf-fe/vite-plugin-cdn-import
7
- * @description cdn 在线引入的 cdn 地址配置。path:https://www.jsdelivr.com/ || https://unpkg.com/
8
- * @description external 打包时,过滤包导入。参考:https://rollupjs.org/configuration-options/#external
9
- */
10
- export const buildConfig = {
11
- cdn() {
12
- return importToCDN({
13
- prodUrl: 'https://unpkg.com/{name}@{version}/{path}',
14
- modules: [
15
- // autoComplete('vue'),
16
- // autoComplete('axios'),
17
- {
18
- name: 'vue',
19
- var: 'Vue',
20
- path: 'dist/vue.global.js',
21
- },
22
- {
23
- name: 'vue-demi',
24
- var: 'VueDemi',
25
- path: 'lib/index.iife.js',
26
- },
27
- {
28
- name: 'vue-router',
29
- var: 'VueRouter',
30
- path: 'dist/vue-router.global.js',
31
- },
32
- {
33
- name: 'element-plus',
34
- var: 'ElementPlus',
35
- path: 'dist/index.full.js',
36
- },
37
- // {
38
- // name: '/@element-plus/icons-vue',
39
- // var: 'ElementPlusIconsVue',
40
- // path: 'dist/index.iife.min.js',
41
- // },
42
- // {
43
- // name: 'echarts',
44
- // var: 'echarts',
45
- // path: 'dist/echarts.min.js',
46
- // },
47
- // {
48
- // name: 'echarts-gl',
49
- // var: 'echarts-gl',
50
- // path: 'dist/echarts-gl.min.js',
51
- // },
52
- // {
53
- // name: 'echarts-wordcloud',
54
- // var: 'echarts-wordcloud',
55
- // path: 'dist/echarts-wordcloud.min.js',
56
- // },
57
- // {
58
- // name: 'vue-i18n',
59
- // var: 'VueI18n',
60
- // path: 'dist/vue-i18n.global.min.js',
61
- // },
62
- // {
63
- // name: 'jsplumb',
64
- // var: 'jsPlumb',
65
- // path: 'dist/js/jsplumb.min.js',
66
- // },
67
- // {
68
- // name: 'cropperjs',
69
- // var: 'Cropper',
70
- // path: 'dist/cropper.min.js',
71
- // },
72
- // {
73
- // name: 'sortablejs',
74
- // var: 'Sortable',
75
- // path: 'Sortable.min.js',
76
- // },
77
- // {
78
- // name: 'qrcodejs2-fixes',
79
- // var: 'QRCode',
80
- // path: 'qrcode.min.js',
81
- // },
82
- // {
83
- // name: 'print-js',
84
- // var: 'printJS',
85
- // path: 'dist/print.min.js',
86
- // },
87
- // {
88
- // name: '/@wangeditor/editor',
89
- // var: 'wangEditor',
90
- // path: 'dist/index.min.js',
91
- // },
92
- // {
93
- // name: '/@wangeditor/editor-for-vue',
94
- // var: 'WangEditorForVue',
95
- // path: 'dist/index.min.js',
96
- // },
97
- // {
98
- // name: 'vue-grid-layout',
99
- // var: 'VueGridLayout',
100
- // path: 'https://cdn.jsdelivr.net/npm/vue-grid-layout@3.0.0-beta1/dist/vue-grid-layout.umd.min.js',
101
- // },
102
- ],
103
- });
104
- },
105
- external: [
106
- 'vue',
107
- // 'axios',
108
- 'vue-router',
109
- 'element-plus',
110
- // '/@element-plus/icons-vue',
111
- // 'echarts',
112
- // 'echarts-gl',
113
- // 'echarts-wordcloud',
114
- // 'vue-i18n',
115
- // 'jsplumb',
116
- // 'cropperjs',
117
- // 'sortablejs',
118
- // 'qrcodejs2-fixes',
119
- // 'print-js',
120
- // '/@wangeditor/editor',
121
- // '/@wangeditor/editor-for-vue',
122
- // 'vue-grid-layout',
123
- ],
124
- };
@@ -1,64 +0,0 @@
1
- // 通用函数
2
- import useClipboard from 'vue-clipboard3';
3
- import { ElMessage } from 'element-plus';
4
- import { formatDate } from '/@/utils/formatTime';
5
-
6
- export default function () {
7
- const { toClipboard } = useClipboard();
8
-
9
- // 百分比格式化
10
- const percentFormat = (row: EmptyArrayType, column: number, cellValue: string) => {
11
- return cellValue ? `${cellValue}%` : '-';
12
- };
13
- // 列表日期时间格式化
14
- const dateFormatYMD = (row: EmptyArrayType, column: number, cellValue: string) => {
15
- if (!cellValue) return '-';
16
- return formatDate(new Date(cellValue), 'YYYY-mm-dd');
17
- };
18
- // 列表日期时间格式化
19
- const dateFormatYMDHMS = (row: EmptyArrayType, column: number, cellValue: string) => {
20
- if (!cellValue) return '-';
21
- return formatDate(new Date(cellValue), 'YYYY-mm-dd HH:MM:SS');
22
- };
23
- // 列表日期时间格式化
24
- const dateFormatHMS = (row: EmptyArrayType, column: number, cellValue: string) => {
25
- if (!cellValue) return '-';
26
- let time = 0;
27
- if (typeof row === 'number') time = row;
28
- if (typeof cellValue === 'number') time = cellValue;
29
- return formatDate(new Date(time * 1000), 'HH:MM:SS');
30
- };
31
- // 小数格式化
32
- const scaleFormat = (value: string = '0', scale: number = 4) => {
33
- return Number.parseFloat(value).toFixed(scale);
34
- };
35
- // 小数格式化
36
- const scale2Format = (value: string = '0') => {
37
- return Number.parseFloat(value).toFixed(2);
38
- };
39
- // 点击复制文本
40
- const copyText = (text: string) => {
41
- return new Promise((resolve, reject) => {
42
- try {
43
- // 复制
44
- toClipboard(text);
45
- // 下面可以设置复制成功的提示框等操作
46
- ElMessage.success('复制成功!');
47
- resolve(text);
48
- } catch (e) {
49
- // 复制失败
50
- ElMessage.error('复制失败!');
51
- reject(e);
52
- }
53
- });
54
- };
55
- return {
56
- percentFormat,
57
- dateFormatYMD,
58
- dateFormatYMDHMS,
59
- dateFormatHMS,
60
- scaleFormat,
61
- scale2Format,
62
- copyText,
63
- };
64
- }