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.
- package/.env +11 -0
- package/.env.development +5 -0
- package/.env.production +5 -0
- package/.eslintignore +18 -0
- package/.eslintrc.js +104 -0
- package/.prettierrc.js +39 -0
- package/.vite/deps_temp_3669a513/chunk-FVXAE7ZR.js +11400 -0
- package/.vite/deps_temp_3669a513/chunk-ZS7NZCD4.js +36 -0
- package/.vite/deps_temp_3669a513/default-passive-events.js +25 -0
- package/.vite/deps_temp_3669a513/element-plus.js +65013 -0
- package/.vite/deps_temp_3669a513/lodash.js +5497 -0
- package/.vite/deps_temp_3669a513/package.json +3 -0
- package/.vite/deps_temp_3669a513/vue.js +324 -0
- package/.vite/deps_temp_3669a513/vxe-table.js +32336 -0
- package/CHANGELOG.md +1 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/directoryList.md +180 -0
- package/package.json +78 -0
- package/postcss.config.js +7 -0
- package/src/App.vue +88 -0
- package/src/api/fieldConfigController/index.ts +76 -0
- package/src/api/fieldConfigController/type.ts +44 -0
- package/src/api/login/index.ts +78 -0
- package/src/api/loginController/index.ts +74 -0
- package/src/api/menu/index.ts +34 -0
- package/src/api/menu/index2.ts +291 -0
- package/src/api/menuController/index.ts +189 -0
- package/src/api/systemController/index.ts +26 -0
- package/src/api/systemController/type.ts +16 -0
- package/src/api/test/index.ts +22 -0
- package/src/api/user/index.ts +30 -0
- package/src/assets/404.png +0 -0
- package/src/assets/logo-main.svg +12 -0
- package/src/assets/logo-mini.svg +12 -0
- package/src/components/base/hsAffix/src/hsAffix.vue +22 -0
- package/src/components/base/hsAlert/src/hsAlert.vue +15 -0
- package/src/components/base/hsAutocomplete/src/hsAutocomplete.vue +36 -0
- package/src/components/base/hsButton/src/hsButton.vue +26 -0
- package/src/components/base/hsButton/src/hsButtonGroup.vue +8 -0
- package/src/components/base/hsButton/useButtonEvents.ts +19 -0
- package/src/components/base/hsCalendar/src/hsCalendar.vue +36 -0
- package/src/components/base/hsCarousel/src/hsCarousel.vue +15 -0
- package/src/components/base/hsCarousel/src/hsCarouselItem.vue +15 -0
- package/src/components/base/hsCascader/src/hsCascader.vue +36 -0
- package/src/components/base/hsCascader/src/hsCascaderPanel.vue +29 -0
- package/src/components/base/hsCheckbox/src/hsCheckbox.vue +32 -0
- package/src/components/base/hsCheckbox/src/hsCheckboxButton.vue +18 -0
- package/src/components/base/hsCheckbox/src/hsCheckboxGroup.vue +32 -0
- package/src/components/base/hsCol/src/hsCol.vue +20 -0
- package/src/components/base/hsCollapse/src/hsCollapse.vue +36 -0
- package/src/components/base/hsCollapse/src/hsCollapseItem.vue +22 -0
- package/src/components/base/hsColorPicker/src/hsColorPicker.vue +32 -0
- package/src/components/base/hsDatePicker/src/hsDatePicker.vue +40 -0
- package/src/components/base/hsDialog/src/hsDialog.vue +36 -0
- package/src/components/base/hsDrawer/src/hsDrawer.vue +29 -0
- package/src/components/base/hsDropdown/src/hsDropdown.vue +15 -0
- package/src/components/base/hsDropdown/src/hsDropdownItem.vue +15 -0
- package/src/components/base/hsDropdown/src/hsDropdownMenu.vue +15 -0
- package/src/components/base/hsForm/src/hsForm.vue +23 -0
- package/src/components/base/hsForm/src/hsFormItem.vue +22 -0
- package/src/components/base/hsGetApi/src/hsGetApis.vue +231 -0
- package/src/components/base/hsGetApi/useGetApis.ts +158 -0
- package/src/components/base/hsInput/src/hsInput.vue +40 -0
- package/src/components/base/hsInput/useInputEvents.ts +52 -0
- package/src/components/base/hsInputNumber/src/hsInputNumber.vue +31 -0
- package/src/components/base/hsPopconfirm/src/hsPopconfirm.vue +15 -0
- package/src/components/base/hsPopover/src/hsPopover.vue +22 -0
- package/src/components/base/hsProgress/src/hsProgress.vue +15 -0
- package/src/components/base/hsRadio/src/hsRadio.vue +32 -0
- package/src/components/base/hsRadio/src/hsRadioButton.vue +18 -0
- package/src/components/base/hsRadio/src/hsRadioGroup.vue +32 -0
- package/src/components/base/hsRate/src/hsRate.vue +33 -0
- package/src/components/base/hsResult/src/hsResult.vue +15 -0
- package/src/components/base/hsRow/src/hsRow.vue +20 -0
- package/src/components/base/hsScrollbar/src/hsScrollbar.vue +22 -0
- package/src/components/base/hsSelect/src/hsOption.vue +8 -0
- package/src/components/base/hsSelect/src/hsOptionGroup.vue +8 -0
- package/src/components/base/hsSelect/src/hsSelect.vue +42 -0
- package/src/components/base/hsSelect/useSelectEvents.ts +60 -0
- package/src/components/base/hsSlider/src/hsSlider.vue +25 -0
- package/src/components/base/hsSteps/src/hsStep.vue +15 -0
- package/src/components/base/hsSteps/src/hsSteps.vue +15 -0
- package/src/components/base/hsSwitch/src/hsSwitch.vue +35 -0
- package/src/components/base/hsTable/hsBCTable.vue +116 -0
- package/src/components/base/hsTable/hsTable copy.vue +226 -0
- package/src/components/base/hsTable/hsTable.vue +213 -0
- package/src/components/base/hsTable/useHsTableConfig.ts +95 -0
- package/src/components/base/hsTable/useTableEvents.ts +118 -0
- package/src/components/base/hsTabs/src/hsTabPane.vue +15 -0
- package/src/components/base/hsTabs/src/hsTabs.vue +29 -0
- package/src/components/base/hsTag/src/hsCheckTag.vue +16 -0
- package/src/components/base/hsTag/src/hsTag.vue +15 -0
- package/src/components/base/hsTest/HsTest.vue +320 -0
- package/src/components/base/hsTooltip/src/hsTooltip.vue +22 -0
- package/src/components/base/hsTour/src/hsTour.vue +31 -0
- package/src/components/base/hsTour/src/hsTourStep.vue +15 -0
- package/src/components/base/hsTransfer/src/hsTransfer.vue +36 -0
- package/src/components/base/hsTree/src/hsTree.vue +24 -0
- package/src/components/base/hsTreeSelect/src/hsTreeSelect.vue +39 -0
- package/src/components/base/hsUpload/src/hsUpload.vue +32 -0
- package/src/components/base/hsWatermark/src/hsWatermark.vue +15 -0
- package/src/components/business/bcAutoComplete/bcAutoComplete.vue +38 -0
- package/src/components/business/bcAutoComplete/defaultData.ts +25 -0
- package/src/components/business/bcAutoComplete/useAutoComplete.ts +65 -0
- package/src/components/business/bcBtn/bcBtn.vue +40 -0
- package/src/components/business/bcForm/bcForm.vue +113 -0
- package/src/components/business/bcForm/bcFormDrag.vue +104 -0
- package/src/components/business/bcForm/bcFormSearch.vue +154 -0
- package/src/components/business/bcForm/components/sortForm/index.ts +18 -0
- package/src/components/business/bcForm/components/sortForm/sortForm.vue +92 -0
- package/src/components/business/bcFormConfig/bcFormConfig.vue +196 -0
- package/src/components/business/bcFormTable/bcFormTable.vue +91 -0
- package/src/components/business/bcFormTable/components/bcTabs/bcTabs.vue +53 -0
- package/src/components/business/bcFormTable/components/contextBody/contextBody.vue +67 -0
- package/src/components/business/bcFormTable/components/contextBody/useContextMenu.ts +53 -0
- package/src/components/business/bcFormTable/components/formSearchBtn/formSearchBtn.vue +21 -0
- package/src/components/business/bcFormTable/methods/cellDetailMethod.ts +5 -0
- package/src/components/business/bcFormTable/methods/filterAgeMethod.ts +5 -0
- package/src/components/business/bcFormTable/methods/footerMethod.ts +25 -0
- package/src/components/business/bcFormTable/methods/index.ts +10 -0
- package/src/components/business/bcFormTable/utils/onFormKey.ts +121 -0
- package/src/components/business/bcFormTable/utils/onTableKey.ts +119 -0
- package/src/components/business/bcFormTable/utils/parseTable.ts +201 -0
- package/src/components/business/bcFormTable/utils/useButon.ts +20 -0
- package/src/components/business/bcFormTable/utils/useTableHeight.ts +44 -0
- package/src/components/business/bcPageConfig/bcPageConfig.vue +79 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsAttrBtn.vue +39 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnItemConfig.vue +32 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnPanel.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useAttrBtn.ts +58 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useBtnConfigList.ts +71 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useBtnItemConfig.ts +35 -0
- package/src/components/business/bcPageConfig/components/hsExpand/src/hsExpand.vue +33 -0
- package/src/components/business/bcPageConfig/components/hsExpand/useExpand.ts +9 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsAttrForm.vue +54 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormPanel.vue +64 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormParse.vue +24 -0
- package/src/components/business/bcPageConfig/components/hsForm/useAttrForm.ts +108 -0
- package/src/components/business/bcPageConfig/components/hsForm/useFormListConfig.ts +69 -0
- package/src/components/business/bcPageConfig/components/hsForm/useFormParse.ts +120 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/src/saveForm.vue +48 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/useSaveForm.ts +148 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsAttrTable.vue +122 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfig.vue +51 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfigList.vue +46 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTablePanel.vue +68 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableParse.vue +24 -0
- package/src/components/business/bcPageConfig/components/hsTables/useAttrTable.ts +218 -0
- package/src/components/business/bcPageConfig/components/hsTables/useTableConfigList.ts +77 -0
- package/src/components/business/bcPageConfig/components/hsTables/useTableParse.ts +78 -0
- package/src/components/business/bcPageConfig/default/apis.json +24712 -0
- package/src/components/business/bcPageConfig/default/baseBtnConfig.ts +256 -0
- package/src/components/business/bcPageConfig/default/baseFormConfig.ts +380 -0
- package/src/components/business/bcPageConfig/default/baseTableConfig.ts +2399 -0
- package/src/components/business/bcPageConfig/usePageConfig.ts +469 -0
- package/src/components/business/bcSelect/bcSelect.vue +50 -0
- package/src/components/business/bcSwitchSystems/bcSwitchSystems.vue +36 -0
- package/src/components/business/bcSwitchSystems/useSwitchSystems.ts +74 -0
- package/src/components/business/bcTable/bcTable.vue +63 -0
- package/src/components/business/bcTable/components/sortColumn/index.ts +19 -0
- package/src/components/business/bcTable/components/sortColumn/sortColumn.vue +107 -0
- package/src/components/business/bcTable/useTable.ts +51 -0
- package/src/components/business/bcTable/useTableHeight.ts +24 -0
- package/src/components/business/bcTreeSelect/bcTreeSelect.vue +12 -0
- package/src/components/business/cardID/cardID.vue +24 -0
- package/src/components/business/cardID/type.ts +0 -0
- package/src/components/business/cardID/useCardID.ts +0 -0
- package/src/components/component.ts +188 -0
- package/src/components/config/autocompleteAttrConfig/autocompleteAttrConfig.vue +26 -0
- package/src/components/config/autocompleteAttrConfig/config.ts +170 -0
- package/src/components/config/baseForm.vue +175 -0
- package/src/components/config/buttonAttrConfig/buttonAttrConfig.vue +26 -0
- package/src/components/config/buttonAttrConfig/config.ts +261 -0
- package/src/components/config/cascaderAttrConfig/cascaderAttrConfig.vue +26 -0
- package/src/components/config/cascaderAttrConfig/config.ts +287 -0
- package/src/components/config/cascaderPanelAttrConfig/cascaderPanelAttrConfig.vue +26 -0
- package/src/components/config/cascaderPanelAttrConfig/config.ts +278 -0
- package/src/components/config/checkboxAttrConfig/checkboxAttrConfig.vue +26 -0
- package/src/components/config/checkboxAttrConfig/config.ts +301 -0
- package/src/components/config/datePickerAttrConfig/config.ts +256 -0
- package/src/components/config/datePickerAttrConfig/datePickerAttrConfig.vue +26 -0
- package/src/components/config/inputAttrConfig/config.ts +322 -0
- package/src/components/config/inputAttrConfig/inputAttrConfig.vue +33 -0
- package/src/components/config/inputAttrConfig/inputEventConfig.vue +35 -0
- package/src/components/config/inputNumberAttrConfig/config.ts +177 -0
- package/src/components/config/inputNumberAttrConfig/inputNumberAttrConfig.vue +26 -0
- package/src/components/config/radioAttrConfig/config.ts +212 -0
- package/src/components/config/radioAttrConfig/radioAttrConfig.vue +26 -0
- package/src/components/config/selectAttrConfig/config.ts +478 -0
- package/src/components/config/selectAttrConfig/selectAttrConfig.vue +26 -0
- package/src/components/config/switchAttrConfig/config.ts +195 -0
- package/src/components/config/switchAttrConfig/switchAttrConfig.vue +26 -0
- package/src/components/config/treeSelectAttrConfig/config.ts +625 -0
- package/src/components/config/treeSelectAttrConfig/treeSelectAttrConfig.vue +26 -0
- package/src/components/config/type/formType.ts +25 -0
- package/src/components/config/uploadAttrConfig/config.ts +250 -0
- package/src/components/config/uploadAttrConfig/uploadAttrConfig.vue +26 -0
- package/src/components/iconSelector/index.vue +247 -0
- package/src/components/iconSelector/list.vue +84 -0
- package/src/components/svgIcon/index.vue +61 -0
- package/src/directive/authDirective.ts +40 -0
- package/src/directive/customDirective.ts +178 -0
- package/src/directive/index.ts +18 -0
- package/src/hooks/useCrypto.ts +36 -0
- package/src/hooks/useExpose.ts +60 -0
- package/src/layout/component/aside.vue +160 -0
- package/src/layout/component/columnsAside.vue +299 -0
- package/src/layout/component/header.vue +18 -0
- package/src/layout/component/main.vue +65 -0
- package/src/layout/footer/index.vue +25 -0
- package/src/layout/index.vue +53 -0
- package/src/layout/lockScreen/index.vue +352 -0
- package/src/layout/logo/index.vue +75 -0
- package/src/layout/main/classic.vue +73 -0
- package/src/layout/main/columns.vue +73 -0
- package/src/layout/main/defaults.vue +73 -0
- package/src/layout/main/transverse.vue +60 -0
- package/src/layout/navBars/index.vue +35 -0
- package/src/layout/navBars/tagsView/contextmenu.vue +133 -0
- package/src/layout/navBars/tagsView/tagsView.vue +737 -0
- package/src/layout/navBars/topBar/breadcrumb.vue +146 -0
- package/src/layout/navBars/topBar/closeFull.vue +53 -0
- package/src/layout/navBars/topBar/index.vue +107 -0
- package/src/layout/navBars/topBar/search.vue +123 -0
- package/src/layout/navBars/topBar/setings.vue +789 -0
- package/src/layout/navBars/topBar/user.vue +222 -0
- package/src/layout/navBars/topBar/userNews.vue +107 -0
- package/src/layout/navMenu/horizontal.vue +138 -0
- package/src/layout/navMenu/subItem.vue +49 -0
- package/src/layout/navMenu/vertical.vue +100 -0
- package/src/layout/routerView/iframes.vue +101 -0
- package/src/layout/routerView/link.vue +93 -0
- package/src/layout/routerView/parent.vue +104 -0
- package/src/layout/upgrade/index.vue +147 -0
- package/src/main.ts +70 -0
- package/src/router/backEnd.ts +173 -0
- package/src/router/frontEnd.ts +155 -0
- package/src/router/index.ts +138 -0
- package/src/router/route.ts +94 -0
- package/src/stores/index.ts +8 -0
- package/src/stores/keepAliveNames.ts +38 -0
- package/src/stores/requestOldRoutes.ts +16 -0
- package/src/stores/routesList.ts +26 -0
- package/src/stores/tagsViewRoutes.ts +23 -0
- package/src/stores/themeConfig.ts +142 -0
- package/src/stores/userInfo.ts +65 -0
- package/src/style/index.scss +0 -0
- package/src/style/tailwind.css +29 -0
- package/src/theme/app.scss +333 -0
- package/src/theme/common/transition.scss +147 -0
- package/src/theme/dark.scss +255 -0
- package/src/theme/element.scss +321 -0
- package/src/theme/iconSelector.scss +31 -0
- package/src/theme/index.scss +8 -0
- package/src/theme/loading.scss +51 -0
- package/src/theme/media/chart.scss +94 -0
- package/src/theme/media/cityLinkage.scss +10 -0
- package/src/theme/media/date.scss +25 -0
- package/src/theme/media/dialog.scss +12 -0
- package/src/theme/media/error.scss +45 -0
- package/src/theme/media/form.scss +31 -0
- package/src/theme/media/home.scss +23 -0
- package/src/theme/media/index.scss +15 -0
- package/src/theme/media/layout.scss +63 -0
- package/src/theme/media/login.scss +74 -0
- package/src/theme/media/media.scss +13 -0
- package/src/theme/media/pagination.scss +15 -0
- package/src/theme/media/personal.scss +16 -0
- package/src/theme/media/scrollbar.scss +56 -0
- package/src/theme/media/tagsView.scss +11 -0
- package/src/theme/mixins/index.scss +56 -0
- package/src/theme/other.scss +36 -0
- package/src/theme/tableTool.scss +27 -0
- package/src/theme/waves.scss +101 -0
- package/src/types/auth.d.ts +44 -0
- package/src/types/axios.d.ts +13 -0
- package/src/types/components.d.ts +30 -0
- package/src/types/customData.d.ts +163 -0
- package/src/types/form.ts +68 -0
- package/src/types/formItem/autocomplete.ts +43 -0
- package/src/types/formItem/button.ts +39 -0
- package/src/types/formItem/input.ts +66 -0
- package/src/types/formItem/inputNumber.ts +42 -0
- package/src/types/formItem/selelct.ts +54 -0
- package/src/types/formItem/treeSelect.ts +37 -0
- package/src/types/formTable.d.ts +210 -0
- package/src/types/global.d.ts +118 -0
- package/src/types/layout.d.ts +59 -0
- package/src/types/mitt.d.ts +38 -0
- package/src/types/pinia.d.ts +92 -0
- package/src/types/views.d.ts +331 -0
- package/src/utils/arrayOperation.ts +65 -0
- package/src/utils/authFunction.ts +38 -0
- package/src/utils/build.ts +124 -0
- package/src/utils/commonFunction.ts +64 -0
- package/src/utils/formatTime.ts +137 -0
- package/src/utils/getDataType.ts +136 -0
- package/src/utils/getStyleSheets.ts +101 -0
- package/src/utils/loading.ts +44 -0
- package/src/utils/mitt.ts +8 -0
- package/src/utils/other.ts +214 -0
- package/src/utils/request.ts +82 -0
- package/src/utils/setIconfont.ts +48 -0
- package/src/utils/showMessage.ts +57 -0
- package/src/utils/showMessageBox.ts +39 -0
- package/src/utils/showNotification.ts +50 -0
- package/src/utils/showPopup.ts +81 -0
- package/src/utils/storage.ts +137 -0
- package/src/utils/theme.ts +65 -0
- package/src/utils/toolsValidate.ts +370 -0
- package/src/utils/watermark.ts +47 -0
- package/src/views/error/401.vue +88 -0
- package/src/views/error/404.vue +89 -0
- package/src/views/home/index.vue +62 -0
- package/src/views/login/component/account.vue +172 -0
- package/src/views/login/component/mobile.vue +72 -0
- package/src/views/login/component/scan.vue +63 -0
- package/src/views/login/index.vue +254 -0
- package/src/views/system/auth/index.vue +48 -0
- package/src/views/system/auth/list.ts +50 -0
- package/src/views/system/auth/useAuth.ts +34 -0
- package/src/views/system/dept/dialog.vue +167 -0
- package/src/views/system/dept/index.vue +135 -0
- package/src/views/system/dic/dialog.vue +150 -0
- package/src/views/system/dic/index.vue +132 -0
- package/src/views/system/form/data.json +360 -0
- package/src/views/system/form/index.vue +24 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsAttrBtn.vue +58 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsBtnPanel.vue +51 -0
- package/src/views/system/formSetting/components/hsBtn/useAttrBtn.ts +129 -0
- package/src/views/system/formSetting/components/hsBtn/useBtnConfigList.ts +73 -0
- package/src/views/system/formSetting/components/hsExpand/src/hsExpand.vue +27 -0
- package/src/views/system/formSetting/components/hsExpand/useExpand.ts +9 -0
- package/src/views/system/formSetting/components/hsForm/src/hsAttrForm.vue +124 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormPanel.vue +152 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormParse.vue +33 -0
- package/src/views/system/formSetting/components/hsForm/useAttrForm.ts +109 -0
- package/src/views/system/formSetting/components/hsForm/useFormListConfig.ts +70 -0
- package/src/views/system/formSetting/components/hsPageTree/configData.ts +3700 -0
- package/src/views/system/formSetting/components/hsPageTree/src/hsPageTree.vue +30 -0
- package/src/views/system/formSetting/components/hsPageTree/usePageTree.ts +50 -0
- package/src/views/system/formSetting/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/views/system/formSetting/components/hsSaveForm/src/saveForm.vue +47 -0
- package/src/views/system/formSetting/components/hsSaveForm/useSaveForm.ts +122 -0
- package/src/views/system/formSetting/components/hsTables/src/hsAttrTable.vue +91 -0
- package/src/views/system/formSetting/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableConfig.vue +39 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTablePanel.vue +56 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableParse.vue +29 -0
- package/src/views/system/formSetting/components/hsTables/useAttrTable.ts +125 -0
- package/src/views/system/formSetting/components/hsTables/useTableConfigList.ts +77 -0
- package/src/views/system/formSetting/components/selectConfig/config.ts +476 -0
- package/src/views/system/formSetting/components/selectConfig/selectConfig.vue +30 -0
- package/src/views/system/formSetting/data.json +360 -0
- package/src/views/system/formSetting/default/baseBtnConfig.ts +216 -0
- package/src/views/system/formSetting/default/baseFormConfig.ts +567 -0
- package/src/views/system/formSetting/default/baseTableConfig.ts +2353 -0
- package/src/views/system/formSetting/formConfig.vue +108 -0
- package/src/views/system/formSetting/index.vue +35 -0
- package/src/views/system/formSetting/menuType.d.ts +12 -0
- package/src/views/system/formSetting/panelConfig.json +164 -0
- package/src/views/system/formSetting/useForm.ts +89 -0
- package/src/views/system/formSetting/useFormConfig.ts +192 -0
- package/src/views/system/menu/dialog.vue +285 -0
- package/src/views/system/menu/index.vue +180 -0
- package/src/views/system/page/components/hsPageTree/configData.ts +3700 -0
- package/src/views/system/page/components/hsPageTree/src/hsPageTree.vue +30 -0
- package/src/views/system/page/components/hsPageTree/usePageTree.ts +49 -0
- package/src/views/system/page/index.vue +32 -0
- package/src/views/system/page/menuType.d.ts +12 -0
- package/src/views/system/page/usePage.ts +125 -0
- package/src/views/system/role/dialog.vue +236 -0
- package/src/views/system/role/index.vue +146 -0
- package/src/views/system/table/data.json +747 -0
- package/src/views/system/table/formate.js +49 -0
- package/src/views/system/table/index.vue +53 -0
- package/src/views/system/user/dialog.vue +187 -0
- package/src/views/system/user/index.vue +161 -0
- package/src/views/test/test/components/hsBtn/src/hsAttrBtn.vue +58 -0
- package/src/views/test/test/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/views/test/test/components/hsBtn/src/hsBtnPanel.vue +51 -0
- package/src/views/test/test/components/hsBtn/useAttrBtn.ts +129 -0
- package/src/views/test/test/components/hsBtn/useBtnConfigList.ts +73 -0
- package/src/views/test/test/components/hsExpand/src/hsExpand.vue +27 -0
- package/src/views/test/test/components/hsExpand/useExpand.ts +9 -0
- package/src/views/test/test/components/hsForm/src/hsAttrForm.vue +124 -0
- package/src/views/test/test/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/views/test/test/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/views/test/test/components/hsForm/src/hsFormPanel.vue +152 -0
- package/src/views/test/test/components/hsForm/src/hsFormParse.vue +33 -0
- package/src/views/test/test/components/hsForm/useAttrForm.ts +109 -0
- package/src/views/test/test/components/hsForm/useFormListConfig.ts +70 -0
- package/src/views/test/test/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/views/test/test/components/hsSaveForm/src/saveForm.vue +47 -0
- package/src/views/test/test/components/hsSaveForm/useSaveForm.ts +122 -0
- package/src/views/test/test/components/hsTables/src/hsAttrTable.vue +91 -0
- package/src/views/test/test/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/views/test/test/components/hsTables/src/hsTableConfig.vue +39 -0
- package/src/views/test/test/components/hsTables/src/hsTableConfigList.vue +45 -0
- package/src/views/test/test/components/hsTables/src/hsTablePanel.vue +56 -0
- package/src/views/test/test/components/hsTables/src/hsTableParse.vue +29 -0
- package/src/views/test/test/components/hsTables/useAttrTable.ts +125 -0
- package/src/views/test/test/components/hsTables/useTableConfigList.ts +77 -0
- package/src/views/test/test/components/selectConfig/config.ts +476 -0
- package/src/views/test/test/components/selectConfig/selectConfig.vue +30 -0
- package/src/views/test/test/data.json +360 -0
- package/src/views/test/test/default/baseBtnConfig.ts +216 -0
- package/src/views/test/test/default/baseFormConfig.ts +567 -0
- package/src/views/test/test/default/baseTableConfig.ts +2353 -0
- package/src/views/test/test/formConfig.vue +102 -0
- package/src/views/test/test/test.vue +28 -0
- package/src/views/test/test/test3.vue +24 -0
- package/src/views/test/test/test4.vue +107 -0
- package/src/views/test/test/test/345/211/257/346/234/254.vue +2424 -0
- package/src/views/test/test/useFormConfig.ts +192 -0
- package/src/views/test/test2/test2.vue +17 -0
- package/src/views/test/test3/test.vue +20 -0
- package/tailwind.config.js +12 -0
- package/tsconfig.json +75 -0
- package/vite.config.ts +123 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { showPopup } from '/@/utils/showPopup';
|
|
2
|
+
import SortColumn from './sortColumn.vue';
|
|
3
|
+
|
|
4
|
+
/** 自定义列排序 */
|
|
5
|
+
export function setSortPopup<T>(uniqueId: string, id: string): Promise<T> {
|
|
6
|
+
return new Promise((reslove) => {
|
|
7
|
+
showPopup(
|
|
8
|
+
SortColumn,
|
|
9
|
+
{ uniqueId, id },
|
|
10
|
+
{
|
|
11
|
+
id,
|
|
12
|
+
title: '表格配置',
|
|
13
|
+
success: (res: T) => {
|
|
14
|
+
reslove(res);
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="h-full flex flex-col">
|
|
3
|
+
<div class="flex-1 overflow-hidden border-bottom-1">
|
|
4
|
+
<div class="w-full h-full">
|
|
5
|
+
<ul class="head flex items-center list-none">
|
|
6
|
+
<li class="w-[50px] px-2">拖动</li>
|
|
7
|
+
<li class="flex-1 pl-6">列名称</li>
|
|
8
|
+
<li class="flex-1 px-2">显示状态</li>
|
|
9
|
+
<li class="flex-1 px-2">排序值</li>
|
|
10
|
+
</ul>
|
|
11
|
+
<VueDraggable
|
|
12
|
+
v-model="list"
|
|
13
|
+
ghostClass="ghost"
|
|
14
|
+
handle=".sort-target"
|
|
15
|
+
animation="150"
|
|
16
|
+
class="overflow-y-auto border-1"
|
|
17
|
+
style="height: calc(100% - 34px)"
|
|
18
|
+
>
|
|
19
|
+
<div v-for="(item, index) in list" :key="item.id" class="flex items-center w-full px-2 border-bottom-1">
|
|
20
|
+
<span class="sort-target w-[50px] cursor-move px-2">
|
|
21
|
+
<el-icon class="rotate-90" size="14"><MoreFilled /></el-icon>
|
|
22
|
+
</span>
|
|
23
|
+
<span class="flex-1 px-2"><hs-input v-model="item.data.title" /></span>
|
|
24
|
+
<span class="flex-1 px-2"><hs-switch v-model="item.data.isShow" /></span>
|
|
25
|
+
<span class="flex-1 px-2">{{ index + 1 }}</span>
|
|
26
|
+
</div>
|
|
27
|
+
</VueDraggable>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="footer h-12 mt-2 flex items-center justify-between">
|
|
31
|
+
<hs-button type="primary" size="small" @click="reset">重置设置</hs-button>
|
|
32
|
+
<div class="flex items-center">
|
|
33
|
+
<hs-button size="small" @click="$emit('success')">取消</hs-button>
|
|
34
|
+
<hs-button type="primary" size="small" @click="submit">保存</hs-button>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
<script lang="ts" setup name="sortColumn">
|
|
40
|
+
import { MoreFilled } from '@element-plus/icons-vue';
|
|
41
|
+
import ICustomData from '/@/types/customData';
|
|
42
|
+
import { ref } from 'vue';
|
|
43
|
+
import { formStore } from '/@/utils/storage';
|
|
44
|
+
import { VueDraggable } from 'vue-draggable-plus';
|
|
45
|
+
|
|
46
|
+
interface Props {
|
|
47
|
+
uniqueId: string;
|
|
48
|
+
id: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const props = defineProps<Props>();
|
|
52
|
+
const emit = defineEmits(['success']);
|
|
53
|
+
const list = ref<ICustomData.TableItem[]>([]);
|
|
54
|
+
|
|
55
|
+
getList(props.uniqueId);
|
|
56
|
+
|
|
57
|
+
function getList(uniqueId: string) {
|
|
58
|
+
return formStore.get<ICustomData.FormTable>(uniqueId).then((res) => {
|
|
59
|
+
const { tableConfig } = res.tables.find((i) => i.id === props.id)!;
|
|
60
|
+
list.value = tableConfig.filter((i) => !i.data.type);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function reset() {
|
|
65
|
+
formStore.get<ICustomData.FormTable>(`${props.uniqueId}_origin`).then((res) => {
|
|
66
|
+
const cache = res.tables.find((i) => i.id === props.id)!;
|
|
67
|
+
list.value = cache.tableConfig.filter((i) => !i.data.type);
|
|
68
|
+
formStore.set(props.uniqueId, res);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function submit() {
|
|
73
|
+
formStore.get<ICustomData.FormTable>(props.uniqueId).then((res) => {
|
|
74
|
+
const cache = res.tables.find((i) => i.id === props.id)!;
|
|
75
|
+
const typeData = cache.tableConfig.filter((i) => i.data.type);
|
|
76
|
+
// 序列化掉代理数据,获取源数据
|
|
77
|
+
cache.tableConfig = JSON.parse(JSON.stringify([...typeData, ...list.value]));
|
|
78
|
+
formStore.set(props.uniqueId, res).then(() => {
|
|
79
|
+
emit('success', cache);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
<style scoped lang="scss">
|
|
85
|
+
.ghost {
|
|
86
|
+
opacity: 0.5;
|
|
87
|
+
background: #48c9b0;
|
|
88
|
+
}
|
|
89
|
+
:deep(.el-input__wrapper) {
|
|
90
|
+
box-shadow: none;
|
|
91
|
+
background-color: transparent;
|
|
92
|
+
}
|
|
93
|
+
:deep(.el-input__wrapper.is-focus) {
|
|
94
|
+
box-shadow: 0 0 0 1px var(--el-input-focus-border-color) inset;
|
|
95
|
+
}
|
|
96
|
+
ul {
|
|
97
|
+
&.head {
|
|
98
|
+
background-color: #f5f5f5;
|
|
99
|
+
border: 1px solid #f5f5f5;
|
|
100
|
+
}
|
|
101
|
+
li {
|
|
102
|
+
height: 34px;
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
</style>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Ref, toValue, nextTick } from 'vue';
|
|
2
|
+
import { VxeTableDefines, VxeTableInstance, VxePagerDefines } from 'vxe-table';
|
|
3
|
+
import ICustomData from '/@/types/customData';
|
|
4
|
+
import ComponentAttr from '/@/types/components';
|
|
5
|
+
import BcTable from './bcTable.vue';
|
|
6
|
+
import { setSortPopup } from './components/sortColumn';
|
|
7
|
+
import { tableIndex } from '../bcFormTable/utils/onTableKey';
|
|
8
|
+
import { setPropertyData } from '/@parseTable';
|
|
9
|
+
|
|
10
|
+
export type EmitEvent = 'ready' | 'cell-click' | 'header-cell-click' | 'page-change';
|
|
11
|
+
export function useTable(
|
|
12
|
+
props: ComponentAttr.Props<typeof BcTable>,
|
|
13
|
+
tableApi: Ref<VxeTableInstance | undefined>,
|
|
14
|
+
emit: (event: EmitEvent, ...args: ICustomData.ANY[]) => void
|
|
15
|
+
) {
|
|
16
|
+
/** 单元格点击 */
|
|
17
|
+
function handleCellClick(params: VxeTableDefines.CellClickEventParams) {
|
|
18
|
+
tableIndex.rowIndex = params.rowIndex;
|
|
19
|
+
tableIndex.columnIndex = params.columnIndex;
|
|
20
|
+
emit('cell-click', params);
|
|
21
|
+
}
|
|
22
|
+
/** 表头点击 */
|
|
23
|
+
function headerCellClick(params: VxeTableDefines.HeaderCellClickParams) {
|
|
24
|
+
if (params.columnIndex === 0) {
|
|
25
|
+
setSortPopup<ICustomData.Table>(props.uniqueId, props.id).then((res) => {
|
|
26
|
+
const columns = res.tableConfig.map((i) => setPropertyData(i.data));
|
|
27
|
+
nextTick(() => {
|
|
28
|
+
toValue(tableApi)
|
|
29
|
+
?.reloadColumn(columns)
|
|
30
|
+
.then(() => {
|
|
31
|
+
// 问题描述:重加载列配置后,数据编辑功能失效,待解决。。。
|
|
32
|
+
toValue(tableApi)?.refreshColumn();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
} else {
|
|
37
|
+
emit('header-cell-click', params);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** 分页改变 */
|
|
42
|
+
function pageChange(params: VxePagerDefines.PageChangeEventParams) {
|
|
43
|
+
emit('page-change', params);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
handleCellClick,
|
|
48
|
+
headerCellClick,
|
|
49
|
+
pageChange,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { computed, ref } from 'vue';
|
|
2
|
+
import { VxeTableInstance } from 'vxe-table';
|
|
3
|
+
import { useElementSize } from '@vueuse/core';
|
|
4
|
+
|
|
5
|
+
export function useTableHeight() {
|
|
6
|
+
const wrapRef = ref();
|
|
7
|
+
const pagerRef = ref();
|
|
8
|
+
const tableRef = ref<VxeTableInstance>();
|
|
9
|
+
const { height: wrapHeight } = useElementSize(wrapRef);
|
|
10
|
+
const { height: pageHeight } = useElementSize(pagerRef, { height: 0, width: 0 });
|
|
11
|
+
|
|
12
|
+
const style = computed(() => {
|
|
13
|
+
return {
|
|
14
|
+
height: `${wrapHeight.value - pageHeight.value}px`,
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
wrapRef,
|
|
20
|
+
pagerRef,
|
|
21
|
+
tableRef,
|
|
22
|
+
style,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<hs-tree-select class="bc-tree-select" v-bind="$attrs">
|
|
3
|
+
<template #default="{ data }"> {{ data.label }}<span style="color: gray">(suffix)</span></template>
|
|
4
|
+
</hs-tree-select>
|
|
5
|
+
</template>
|
|
6
|
+
<script lang="ts" setup name="bcTreeSelect"></script>
|
|
7
|
+
<style scoped lang="scss"></style>
|
|
8
|
+
<style>
|
|
9
|
+
.bc-tree-select .el-tree-node__content {
|
|
10
|
+
height: 36px !important;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-button text @click="dialogVisible = true">
|
|
3
|
+
Click to open Dialog
|
|
4
|
+
</el-button>
|
|
5
|
+
<div>111111111111111</div>
|
|
6
|
+
<el-dialog v-model="dialogVisible" title="Tips" width="30%" draggable :modal="false" :close-on-click-modal="false" append-to-body>
|
|
7
|
+
<span>It's a draggable Dialog</span>
|
|
8
|
+
<template #footer>
|
|
9
|
+
<span class="dialog-footer">
|
|
10
|
+
<el-button>Cancel</el-button>
|
|
11
|
+
<el-button type="primary" @click="dialogVisible = false">
|
|
12
|
+
Confirm
|
|
13
|
+
</el-button>
|
|
14
|
+
</span>
|
|
15
|
+
</template>
|
|
16
|
+
</el-dialog>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { ref } from 'vue';
|
|
21
|
+
import type { FormInstance, FormRules } from 'element-plus';
|
|
22
|
+
|
|
23
|
+
const dialogVisible = ref(false)
|
|
24
|
+
</script>
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import hsTest from '/@/components/base/hsTest/HsTest.vue';
|
|
3
|
+
import hsTable from '/@/components/base/hsTable/hsTable.vue';
|
|
4
|
+
import hsBCTable from '/@/components/base/hsTable/hsBCTable.vue';
|
|
5
|
+
import hsButton from '/@/components/base/hsButton/src/hsButton.vue';
|
|
6
|
+
import hsButtonGroup from '/@/components/base/hsButton/src/hsButtonGroup.vue';
|
|
7
|
+
import hsInput from '/@/components/base/hsInput/src/hsInput.vue';
|
|
8
|
+
import hsSelect from '/@/components/base/hsSelect/src/hsSelect.vue';
|
|
9
|
+
import hsOption from '/@/components/base/hsSelect/src/hsOption.vue';
|
|
10
|
+
import hsOptionGroup from '/@/components/base/hsSelect/src/hsOptionGroup.vue';
|
|
11
|
+
import hsForm from '/@/components/base/hsForm/src/hsForm.vue';
|
|
12
|
+
import hsFormItem from '/@/components/base/hsForm/src/hsFormItem.vue';
|
|
13
|
+
import hsRow from '/@/components/base/hsRow/src/hsRow.vue';
|
|
14
|
+
import hsCol from '/@/components/base/hsCol/src/hsCol.vue';
|
|
15
|
+
import hsTree from '/@/components/base/hsTree/src/hsTree.vue';
|
|
16
|
+
import hsInputNumber from '/@/components/base/hsInputNumber/src/hsInputNumber.vue';
|
|
17
|
+
import hsSwitch from '/@/components/base/hsSwitch/src/hsSwitch.vue';
|
|
18
|
+
import hsRadio from '/@/components/base/hsRadio/src/hsRadio.vue';
|
|
19
|
+
import hsRadioGroup from '/@/components/base/hsRadio/src/hsRadioGroup.vue';
|
|
20
|
+
import hsRadioButton from '/@/components/base/hsRadio/src/hsRadioButton.vue';
|
|
21
|
+
import hsCheckbox from '/@/components/base/hsCheckbox/src/hsCheckbox.vue';
|
|
22
|
+
import hsCheckboxGroup from '/@/components/base/hsCheckbox/src/hsCheckboxGroup.vue';
|
|
23
|
+
import hsCheckboxButton from '/@/components/base/hsCheckbox/src/hsCheckboxButton.vue';
|
|
24
|
+
import hsRate from '/@/components/base/hsRate/src/hsRate.vue';
|
|
25
|
+
import hsAutocomplete from '/@/components/base/hsAutocomplete/src/hsAutocomplete.vue';
|
|
26
|
+
import hsSlider from '/@/components/base/hsSlider/src/hsSlider.vue';
|
|
27
|
+
import hsCascader from '/@/components/base/hsCascader/src/hsCascader.vue';
|
|
28
|
+
import hsCascaderPanel from '/@/components/base/hsCascader/src/hsCascaderPanel.vue';
|
|
29
|
+
import hsColorPicker from '/@/components/base/hsColorPicker/src/hsColorPicker.vue';
|
|
30
|
+
import hsUpload from '/@/components/base/hsUpload/src/hsUpload.vue';
|
|
31
|
+
import hsTransfer from '/@/components/base/hsTransfer/src/hsTransfer.vue';
|
|
32
|
+
import hsDatePicker from '/@/components/base/hsDatePicker/src/hsDatePicker.vue';
|
|
33
|
+
import hsScrollbar from '/@/components/base/hsScrollbar/src/hsScrollbar.vue';
|
|
34
|
+
import hsCalendar from '/@/components/base/hsCalendar/src/hsCalendar.vue';
|
|
35
|
+
import hsCarousel from '/@/components/base/hsCarousel/src/hsCarousel.vue';
|
|
36
|
+
import hsCarouselItem from '/@/components/base/hsCarousel/src/hsCarouselItem.vue';
|
|
37
|
+
import hsCollapse from '/@/components/base/hsCollapse/src/hsCollapse.vue';
|
|
38
|
+
import hsCollapseItem from '/@/components/base/hsCollapse/src/hsCollapseItem.vue';
|
|
39
|
+
import hsProgress from '/@/components/base/hsProgress/src/hsProgress.vue';
|
|
40
|
+
import hsResult from '/@/components/base/hsResult/src/hsResult.vue';
|
|
41
|
+
import hsTour from '/@/components/base/hsTour/src/hsTour.vue';
|
|
42
|
+
import hsTourStep from '/@/components/base/hsTour/src/hsTourStep.vue';
|
|
43
|
+
import hsTag from '/@/components/base/hsTag/src/hsTag.vue';
|
|
44
|
+
import hsCheckTag from '/@/components/base/hsTag/src/hsCheckTag.vue';
|
|
45
|
+
import hsAffix from '/@/components/base/hsAffix/src/hsAffix.vue';
|
|
46
|
+
import hsTabs from '/@/components/base/hsTabs/src/hsTabs.vue';
|
|
47
|
+
import hsTabPane from '/@/components/base/hsTabs/src/hsTabPane.vue';
|
|
48
|
+
import hsSteps from '/@/components/base/hsSteps/src/hsSteps.vue';
|
|
49
|
+
import hsStep from '/@/components/base/hsSteps/src/hsStep.vue';
|
|
50
|
+
import hsAlert from '/@/components/base/hsAlert/src/hsAlert.vue';
|
|
51
|
+
import hsDialog from '/@/components/base/hsDialog/src/hsDialog.vue';
|
|
52
|
+
import hsDrawer from '/@/components/base/hsDrawer/src/hsDrawer.vue';
|
|
53
|
+
import hsPopconfirm from '/@/components/base/hsPopconfirm/src/hsPopconfirm.vue';
|
|
54
|
+
import hsPopover from '/@/components/base/hsPopover/src/hsPopover.vue';
|
|
55
|
+
import hsTooltip from '/@/components/base/hsTooltip/src/hsTooltip.vue';
|
|
56
|
+
import hsWatermark from '/@/components/base/hsWatermark/src/hsWatermark.vue';
|
|
57
|
+
import hsDropdown from '/@/components/base/hsDropdown/src/hsDropdown.vue';
|
|
58
|
+
import hsDropdownMenu from '/@/components/base/hsDropdown/src/hsDropdownMenu.vue';
|
|
59
|
+
import hsDropdownItem from '/@/components/base/hsDropdown/src/hsDropdownItem.vue';
|
|
60
|
+
import hsTreeSelect from '/@/components/base/hsTreeSelect/src/hsTreeSelect.vue';
|
|
61
|
+
|
|
62
|
+
import BcBtn from '/@/components/business/bcBtn/bcBtn.vue';
|
|
63
|
+
import BcForm from '/@/components/business/bcForm/bcForm.vue';
|
|
64
|
+
import BcFormSearch from '/@/components/business/bcForm/bcFormSearch.vue';
|
|
65
|
+
import BcTable from '/@/components/business/bcTable/bcTable.vue';
|
|
66
|
+
import BcFormTable from '/@/components/business/bcFormTable/bcFormTable.vue';
|
|
67
|
+
import BcSelect from '/@/components/business/bcSelect/bcSelect.vue';
|
|
68
|
+
import BcFormConfig from '/@/components/business/bcFormConfig/bcFormConfig.vue';
|
|
69
|
+
import BcTreeSelect from '/@/components/business/bcTreeSelect/bcTreeSelect.vue';
|
|
70
|
+
import BcPageConfig from '/@/components/business/bcPageConfig/bcPageConfig.vue';
|
|
71
|
+
import bcSwitchSystems from '/@/components/business/bcSwitchSystems/bcSwitchSystems.vue';
|
|
72
|
+
import bcAutoComplete from './business/bcAutoComplete/bcAutoComplete.vue';
|
|
73
|
+
// 配置组件
|
|
74
|
+
import inputAttrConfig from '/@/components/config/inputAttrConfig/inputAttrConfig.vue';
|
|
75
|
+
import inputEventConfig from '/@/components/config/inputAttrConfig/inputEventConfig.vue';
|
|
76
|
+
import selectAttrConfig from '/@/components/config/selectAttrConfig/selectAttrConfig.vue';
|
|
77
|
+
import datePickerAttrConfig from '/@/components/config/datePickerAttrConfig/datePickerAttrConfig.vue';
|
|
78
|
+
import buttonAttrConfig from '/@/components/config/buttonAttrConfig/buttonAttrConfig.vue';
|
|
79
|
+
import autocompleteAttrConfig from '/@/components/config/autocompleteAttrConfig/autocompleteAttrConfig.vue';
|
|
80
|
+
import switchAttrConfig from '/@/components/config/switchAttrConfig/switchAttrConfig.vue';
|
|
81
|
+
import uploadAttrConfig from '/@/components/config/uploadAttrConfig/uploadAttrConfig.vue';
|
|
82
|
+
import checkboxAttrConfig from '/@/components/config/checkboxAttrConfig/checkboxAttrConfig.vue';
|
|
83
|
+
import radioAttrConfig from '/@/components/config/radioAttrConfig/radioAttrConfig.vue';
|
|
84
|
+
import inputNumberAttrConfig from '/@/components/config/inputNumberAttrConfig/inputNumberAttrConfig.vue';
|
|
85
|
+
import cascaderAttrConfig from '/@/components/config/cascaderAttrConfig/cascaderAttrConfig.vue';
|
|
86
|
+
import cascaderPanelAttrConfig from '/@/components/config/cascaderPanelAttrConfig/cascaderPanelAttrConfig.vue';
|
|
87
|
+
import treeSelectAttrConfig from '/@/components/config/treeSelectAttrConfig/treeSelectAttrConfig.vue';
|
|
88
|
+
const components = [
|
|
89
|
+
{ title: 'hs-test', componentName: hsTest },
|
|
90
|
+
{ title: 'hs-table', componentName: hsTable },
|
|
91
|
+
{ title: 'hs-bc-table', componentName: hsBCTable },
|
|
92
|
+
{ title: 'hs-button', componentName: hsButton },
|
|
93
|
+
{ title: 'hs-button-group', componentName: hsButtonGroup },
|
|
94
|
+
{ title: 'hs-input', componentName: hsInput },
|
|
95
|
+
{ title: 'hs-select', componentName: hsSelect },
|
|
96
|
+
{ title: 'hs-option', componentName: hsOption },
|
|
97
|
+
{ title: 'hs-option-group', componentName: hsOptionGroup },
|
|
98
|
+
{ title: 'hs-form', componentName: hsForm },
|
|
99
|
+
{ title: 'hs-form-item', componentName: hsFormItem },
|
|
100
|
+
{ title: 'hs-row', componentName: hsRow },
|
|
101
|
+
{ title: 'hs-col', componentName: hsCol },
|
|
102
|
+
{ title: 'hs-tree', componentName: hsTree },
|
|
103
|
+
{ title: 'hs-input-number', componentName: hsInputNumber },
|
|
104
|
+
{ title: 'hs-switch', componentName: hsSwitch },
|
|
105
|
+
{ title: 'hs-radio', componentName: hsRadio },
|
|
106
|
+
{ title: 'hs-radio-group', componentName: hsRadioGroup },
|
|
107
|
+
{ title: 'hs-radio-button', componentName: hsRadioButton },
|
|
108
|
+
{ title: 'hs-checkbox', componentName: hsCheckbox },
|
|
109
|
+
{ title: 'hs-checkbox-group', componentName: hsCheckboxGroup },
|
|
110
|
+
{ title: 'hs-checkbox-button', componentName: hsCheckboxButton },
|
|
111
|
+
{ title: 'hs-rate', componentName: hsRate },
|
|
112
|
+
{ title: 'hs-autocomplete', componentName: hsAutocomplete },
|
|
113
|
+
{ title: 'hs-slider', componentName: hsSlider },
|
|
114
|
+
{ title: 'hs-cascader', componentName: hsCascader },
|
|
115
|
+
{ title: 'hs-cascader-panel', componentName: hsCascaderPanel },
|
|
116
|
+
{ title: 'hs-color-picker', componentName: hsColorPicker },
|
|
117
|
+
{ title: 'hs-upload', componentName: hsUpload },
|
|
118
|
+
{ title: 'hs-transfer', componentName: hsTransfer },
|
|
119
|
+
{ title: 'hs-date-picker', componentName: hsDatePicker },
|
|
120
|
+
{ title: 'hs-scrollbar', componentName: hsScrollbar },
|
|
121
|
+
{ title: 'hs-calendar', componentName: hsCalendar },
|
|
122
|
+
{ title: 'hs-carousel', componentName: hsCarousel },
|
|
123
|
+
{ title: 'hs-carousel-item', componentName: hsCarouselItem },
|
|
124
|
+
{ title: 'hs-collapse', componentName: hsCollapse },
|
|
125
|
+
{ title: 'hs-collapse-item', componentName: hsCollapseItem },
|
|
126
|
+
{ title: 'hs-progress', componentName: hsProgress },
|
|
127
|
+
{ title: 'hs-result', componentName: hsResult },
|
|
128
|
+
{ title: 'hs-tour', componentName: hsTour },
|
|
129
|
+
{ title: 'hs-tour-step', componentName: hsTourStep },
|
|
130
|
+
{ title: 'hs-tag', componentName: hsTag },
|
|
131
|
+
{ title: 'hs-check-tag', componentName: hsCheckTag },
|
|
132
|
+
{ title: 'hs-affix', componentName: hsAffix },
|
|
133
|
+
{ title: 'hs-tabs', componentName: hsTabs },
|
|
134
|
+
{ title: 'hs-tab-pane', componentName: hsTabPane },
|
|
135
|
+
{ title: 'hs-steps', componentName: hsSteps },
|
|
136
|
+
{ title: 'hs-step', componentName: hsStep },
|
|
137
|
+
{ title: 'hs-alert', componentName: hsAlert },
|
|
138
|
+
{ title: 'hs-dialog', componentName: hsDialog },
|
|
139
|
+
{ title: 'hs-drawer', componentName: hsDrawer },
|
|
140
|
+
{ title: 'hs-popconfirm', componentName: hsPopconfirm },
|
|
141
|
+
{ title: 'hs-popover', componentName: hsPopover },
|
|
142
|
+
{ title: 'hs-tooltip', componentName: hsTooltip },
|
|
143
|
+
{ title: 'hs-watermark', componentName: hsWatermark },
|
|
144
|
+
{ title: 'hs-dropdown', componentName: hsDropdown },
|
|
145
|
+
{ title: 'hs-dropdown-menu', componentName: hsDropdownMenu },
|
|
146
|
+
{ title: 'hs-dropdown-item', componentName: hsDropdownItem },
|
|
147
|
+
{ title: 'hs-tree-select', componentName: hsTreeSelect },
|
|
148
|
+
|
|
149
|
+
// 业务组件
|
|
150
|
+
{ title: 'bc-btn', componentName: BcBtn },
|
|
151
|
+
{ title: 'bc-form', componentName: BcForm },
|
|
152
|
+
{ title: 'bc-form-search', componentName: BcFormSearch },
|
|
153
|
+
{ title: 'bc-table', componentName: BcTable },
|
|
154
|
+
{ title: 'bc-form-table', componentName: BcFormTable },
|
|
155
|
+
{ title: 'bc-form-config', componentName: BcFormConfig },
|
|
156
|
+
{ title: 'bc-select', componentName: BcSelect },
|
|
157
|
+
{ title: 'bc-tree-select', componentName: BcTreeSelect },
|
|
158
|
+
{ title: 'bc-page-config', componentName: BcPageConfig },
|
|
159
|
+
{ title: 'bc-switch-systems', componentName: bcSwitchSystems },
|
|
160
|
+
{ title: 'bc-auto-complete', componentName: bcAutoComplete },
|
|
161
|
+
|
|
162
|
+
// 配置组件
|
|
163
|
+
{ title: 'hs-config-input', componentName: inputAttrConfig },
|
|
164
|
+
{ title: 'hs-config-event', componentName: inputEventConfig },
|
|
165
|
+
{ title: 'hs-config-select', componentName: selectAttrConfig },
|
|
166
|
+
{ title: 'hs-config-date-picker', componentName: datePickerAttrConfig },
|
|
167
|
+
{ title: 'hs-config-button', componentName: buttonAttrConfig },
|
|
168
|
+
{ title: 'hs-config-autocomplete', componentName: autocompleteAttrConfig },
|
|
169
|
+
{ title: 'hs-config-switch', componentName: switchAttrConfig },
|
|
170
|
+
{ title: 'hs-config-upload', componentName: uploadAttrConfig },
|
|
171
|
+
{ title: 'hs-config-checkbox', componentName: checkboxAttrConfig },
|
|
172
|
+
{ title: 'hs-config-radio', componentName: radioAttrConfig },
|
|
173
|
+
{ title: 'hs-config-input-number', componentName: inputNumberAttrConfig },
|
|
174
|
+
{ title: 'hs-config-cascader', componentName: cascaderAttrConfig },
|
|
175
|
+
{ title: 'hs-config-cascader-panel', componentName: cascaderPanelAttrConfig },
|
|
176
|
+
{ title: 'hs-config-tree-select', componentName: treeSelectAttrConfig },
|
|
177
|
+
] as const;
|
|
178
|
+
|
|
179
|
+
export type Component = Student<typeof components, 'title'>;
|
|
180
|
+
|
|
181
|
+
export default {
|
|
182
|
+
install(app: App) {
|
|
183
|
+
components.forEach((item) => {
|
|
184
|
+
// 通过循环遍历数据批量注册组件
|
|
185
|
+
app.component(item.title, item.componentName);
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="p-[10px] h-full">
|
|
3
|
+
<base-form v-model:data="data" :config="autocompleteAttrConfig" :isVModel="isVModel"></base-form>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts" name="autocompleteAttrConfig">
|
|
8
|
+
import baseForm from '../baseForm.vue';
|
|
9
|
+
import { ref } from 'vue';
|
|
10
|
+
import { autocompleteAttrConfig, autocompleteAttrConfigMap } 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(autocompleteAttrConfigMap)) : props.data);
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export const autocompleteAttrConfig = [
|
|
2
|
+
{
|
|
3
|
+
prop: 'attrs',
|
|
4
|
+
label: 'autocompleteAttrs',
|
|
5
|
+
tooltip: 'autocompleteAttrs',
|
|
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: 'placeholder',
|
|
18
|
+
label: '占位符',
|
|
19
|
+
tooltip: '占位符',
|
|
20
|
+
type: 'string',
|
|
21
|
+
el: 'hs-input',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
prop: 'fetch-suggestions',
|
|
25
|
+
label: '远程搜索方法',
|
|
26
|
+
tooltip: '获取输入建议的方法, 仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它',
|
|
27
|
+
type: 'Function',
|
|
28
|
+
el: 'hs-input',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
prop: 'fetch-url',
|
|
32
|
+
label: '远程搜索地址',
|
|
33
|
+
tooltip: '远程搜索地址',
|
|
34
|
+
type: 'string',
|
|
35
|
+
el: 'hs-input',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
prop: 'clearable',
|
|
39
|
+
label: '是否可清空',
|
|
40
|
+
tooltip: '是否可清空',
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
el: 'hs-switch',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
prop: 'disabled',
|
|
46
|
+
label: '是否禁用',
|
|
47
|
+
tooltip: '自动补全组件是否被禁用',
|
|
48
|
+
type: 'boolean',
|
|
49
|
+
el: 'hs-switch',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
prop: 'value-key',
|
|
53
|
+
label: '用于显示的键名',
|
|
54
|
+
tooltip: '输入建议对象中用于显示的键名',
|
|
55
|
+
type: 'string',
|
|
56
|
+
el: 'hs-input',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
prop: 'debounce',
|
|
60
|
+
label: '防抖延时',
|
|
61
|
+
tooltip: '获取输入建议的防抖延时,单位为毫秒',
|
|
62
|
+
type: 'number',
|
|
63
|
+
el: 'hs-input-number',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
prop: 'placement',
|
|
67
|
+
label: '菜单弹出位置',
|
|
68
|
+
tooltip: '菜单弹出位置',
|
|
69
|
+
type: 'enum',
|
|
70
|
+
el: 'hs-select',
|
|
71
|
+
op: [
|
|
72
|
+
{ label: 'bottom', value: 'bottom' },
|
|
73
|
+
{ label: 'bottom-start', value: 'bottom-start' },
|
|
74
|
+
{ label: 'bottom-end', value: 'bottom-end' },
|
|
75
|
+
{ label: 'top', value: 'top' },
|
|
76
|
+
{ label: 'top-start', value: 'top-start' },
|
|
77
|
+
{ label: 'top-end', value: 'top-end' },
|
|
78
|
+
],
|
|
79
|
+
cel: 'hs-option',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
prop: 'trigger-on-focus',
|
|
83
|
+
label: 'trigger-on-focus',
|
|
84
|
+
tooltip: 'whether show suggestions when input focus',
|
|
85
|
+
type: 'boolean',
|
|
86
|
+
el: 'hs-switch',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
prop: 'select-when-unmatched',
|
|
90
|
+
label: '回车触发select',
|
|
91
|
+
tooltip: '在输入没有任何匹配建议的情况下,按下回车是否触发 select 事件',
|
|
92
|
+
type: 'boolean',
|
|
93
|
+
el: 'hs-switch',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
prop: 'name',
|
|
97
|
+
label: 'name',
|
|
98
|
+
tooltip: '等价于原生 input name 属性',
|
|
99
|
+
type: 'string',
|
|
100
|
+
el: 'hs-input',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
prop: 'label',
|
|
104
|
+
label: '关联的label',
|
|
105
|
+
tooltip: '输入框关联的 label 文字',
|
|
106
|
+
type: 'string',
|
|
107
|
+
el: 'hs-input',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
prop: 'hide-loading',
|
|
111
|
+
label: '隐藏加载图标',
|
|
112
|
+
tooltip: '是否隐藏远程加载时的加载图标',
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
el: 'hs-switch',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
prop: 'popper-class',
|
|
118
|
+
label: '下拉列表的类名',
|
|
119
|
+
tooltip: '下拉列表的类名',
|
|
120
|
+
type: 'string',
|
|
121
|
+
el: 'hs-input',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
prop: 'popper-append-to-body',
|
|
125
|
+
label: '列表插入body',
|
|
126
|
+
tooltip: '是否将下拉列表插入至 body 元素。 在下拉列表的定位出现问题时,可将该属性设置为 false',
|
|
127
|
+
type: 'boolean',
|
|
128
|
+
el: 'hs-switch',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
prop: 'teleported',
|
|
132
|
+
label: '传送',
|
|
133
|
+
tooltip: '是否将下拉列表元素插入 append-to 指向的元素下',
|
|
134
|
+
type: 'boolean',
|
|
135
|
+
el: 'hs-switch',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
prop: 'highlight-first-item',
|
|
139
|
+
label: '高亮结果第一项',
|
|
140
|
+
tooltip: '是否默认高亮远程搜索结果的第一项',
|
|
141
|
+
type: 'boolean',
|
|
142
|
+
el: 'hs-switch',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
prop: 'fit-input-width',
|
|
146
|
+
label: '宽度与输入框相同',
|
|
147
|
+
tooltip: '下拉框的宽度是否与输入框相同',
|
|
148
|
+
type: 'boolean',
|
|
149
|
+
el: 'hs-switch',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
];
|
|
154
|
+
export const autocompleteAttrConfigMap = {
|
|
155
|
+
// 默认配置项
|
|
156
|
+
attrs: {
|
|
157
|
+
size: 'small',
|
|
158
|
+
clearable: false, // 是否可清空
|
|
159
|
+
disabled: false, // 是否禁用
|
|
160
|
+
'value-key': 'value', // 用于显示的键名
|
|
161
|
+
debounce: 300, // 防抖延时
|
|
162
|
+
placement: 'bottom-start', // 菜单弹出位置
|
|
163
|
+
'trigger-on-focus': true, // whether show suggestions when input focus
|
|
164
|
+
'select-when-unmatched': false, // 在输入没有任何匹配建议的情况下,按下回车是否触发 select 事件
|
|
165
|
+
'hide-loading': false, // 是否隐藏远程加载时的加载图标
|
|
166
|
+
teleported: true, // 是否将下拉列表元素插入 append-to 指向的元素下
|
|
167
|
+
'highlight-first-item': false, // 是否默认高亮远程搜索结果的第一项
|
|
168
|
+
'fit-input-width': false, // 下拉框的宽度是否与输入框相同
|
|
169
|
+
},
|
|
170
|
+
};
|