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,2399 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import IFormTable from '/@/types/formTable';
|
|
3
|
+
// import ICustomData from '/@/types/customData';
|
|
4
|
+
|
|
5
|
+
import ComponentAttr from '/@/types/components';
|
|
6
|
+
// ============================ 表格table属性 start ==========================
|
|
7
|
+
// 默认table配置
|
|
8
|
+
let baseData = ref<ComponentAttr.RecursivePartial<IFormTable.TableBaseData>>({
|
|
9
|
+
id: '', // 表格唯一标识
|
|
10
|
+
tableName: '表格配置名称', // 表格配置名称
|
|
11
|
+
is_slot_loading: false, // 是否自定义加载中模板
|
|
12
|
+
is_slot_empty: false, // 是否自定义空数据模板
|
|
13
|
+
is_apply_page: true, // 是否分页
|
|
14
|
+
table_page_data: {
|
|
15
|
+
loading: false,
|
|
16
|
+
currentPage: 1,
|
|
17
|
+
pageSize: 10,
|
|
18
|
+
total: 0,
|
|
19
|
+
pagerCount: 7,
|
|
20
|
+
pageSizes: 'string=[10,15,20,50,100]',
|
|
21
|
+
align: 'right',
|
|
22
|
+
border: false,
|
|
23
|
+
background: false,
|
|
24
|
+
perfect: false,
|
|
25
|
+
autoHidden: false,
|
|
26
|
+
}, // 表格分页配置
|
|
27
|
+
// 'data': '', // 表格数据
|
|
28
|
+
height: 'auto', // 表格的高度
|
|
29
|
+
// 'min-height': '', // 表格最小高度
|
|
30
|
+
// 'max-height': '', // 表格的最大高度
|
|
31
|
+
// 'auto-resize': '', // 是否监听父元素变化重新计算表格
|
|
32
|
+
// 'sync-resize': '', // 是否随属性的变化重新计算表格
|
|
33
|
+
stripe: false, // 是否带有斑马纹
|
|
34
|
+
border: 'default', // 是否带有边框
|
|
35
|
+
round: false, // 是否为圆角边框
|
|
36
|
+
size: 'small', // 表格的尺寸
|
|
37
|
+
loading: false, //表格是否显示加载中
|
|
38
|
+
align: 'left', // 所有的列对齐方式
|
|
39
|
+
headerAlign: 'left', // 所有的表头列的对齐方式
|
|
40
|
+
footerAlign: 'left', //所有的表尾列的对齐方式
|
|
41
|
+
showHeader: true, // 是否显示表头
|
|
42
|
+
// rowClassName: '', // 给行附加样式类
|
|
43
|
+
// 'cell-class-name': '', // 给单元格附加样式类
|
|
44
|
+
// 'header-row-class-name': '', // 给表头的行附加样式类
|
|
45
|
+
// 'header-cell-class-name': '', // 给表头的单元格附加样式类
|
|
46
|
+
// 'footer-row-class-name': '', // 给表尾的行附加样式类
|
|
47
|
+
// 'footer-cell-class-name': '', // 给表尾的单元格附加样式类
|
|
48
|
+
showFooter: false, // 是否显示表尾
|
|
49
|
+
// 'footer-method': '', // 表尾的数据获取方法
|
|
50
|
+
// 'merge-cells': '', // 临时合并指定的单元格
|
|
51
|
+
// 'merge-footer-items': '', // 临时合并表尾
|
|
52
|
+
// 'show-overflow': '', // 设置所有内容溢出显示
|
|
53
|
+
// 'show-header-overflow': '', // 设置表头内容溢出显示
|
|
54
|
+
// 'show-footer-overflow': '', // 设置表尾内容溢出显示
|
|
55
|
+
// 'keep-source': '', // 保持原始值的状态
|
|
56
|
+
// 'empty-text': '', // 空数据时显示的内容
|
|
57
|
+
// 'params': '', // 自定义参数
|
|
58
|
+
columnConfig: { useKey: false, isCurrent: false, isHover: true, resizable: false, maxFixedSize: 4 }, // 列的默认参数
|
|
59
|
+
rowConfig: { useKey: false, keyField: '_X_ROW_KEY', isCurrent: true, isHover: true }, // 行配置信息
|
|
60
|
+
resizeConfig: { refreshDelay: 250 }, // 响应式布局配置项
|
|
61
|
+
resizableConfig: { minWidth: 'auto' }, // 列宽拖动配置项
|
|
62
|
+
seqConfig: {}, // 序号配置项
|
|
63
|
+
sortConfig: {
|
|
64
|
+
defaultSort: {},
|
|
65
|
+
multiple: false,
|
|
66
|
+
chronological: false,
|
|
67
|
+
remote: false,
|
|
68
|
+
showIcon: true,
|
|
69
|
+
}, // 排序配置项
|
|
70
|
+
filterConfig: { remote: false, filterMethod: '', showIcon: true }, // 筛选配置项
|
|
71
|
+
radioConfig: { strict: true, reserve: false, highlight: false }, // 单选框配置项
|
|
72
|
+
checkboxConfig: {}, // 复选框配置项
|
|
73
|
+
tooltipConfig: {}, // tooltip 配置项
|
|
74
|
+
expandConfig: { expandAll: false, accordion: false, trigger: 'default', lazy: false, reserve: false, showIcon: true }, //展开行配置项(不支持虚拟滚动)
|
|
75
|
+
treeConfig: {
|
|
76
|
+
transform: false,
|
|
77
|
+
rowField: 'id',
|
|
78
|
+
parentField: 'parentId',
|
|
79
|
+
childrenField: 'children',
|
|
80
|
+
indent: 20,
|
|
81
|
+
showLine: false,
|
|
82
|
+
expandAll: false,
|
|
83
|
+
accordion: false,
|
|
84
|
+
trigger: 'default',
|
|
85
|
+
lazy: false,
|
|
86
|
+
hasChildField: 'hasChild',
|
|
87
|
+
reserve: false,
|
|
88
|
+
showIcon: true,
|
|
89
|
+
}, // 树形结构配置项
|
|
90
|
+
editConfig: {
|
|
91
|
+
trigger: 'click',
|
|
92
|
+
enabled: true,
|
|
93
|
+
mode: 'cell',
|
|
94
|
+
showIcon: true,
|
|
95
|
+
showStatus: false,
|
|
96
|
+
showUpdateStatus: false,
|
|
97
|
+
showInsertStatus: false,
|
|
98
|
+
showAsterisk: true,
|
|
99
|
+
autoClear: true,
|
|
100
|
+
}, // 可编辑配置项
|
|
101
|
+
validConfig: { autoPos: true, showMessage: true }, // 校验配置项
|
|
102
|
+
editRules: {}, // 校验规则配置项
|
|
103
|
+
emptyRender: {}, // 空内容渲染配置项,empty-render 的优先级大于 empty-text
|
|
104
|
+
loadingConfig: {}, // 加载中配置项
|
|
105
|
+
customConfig: {},
|
|
106
|
+
scrollX: {},
|
|
107
|
+
scrollY: {},
|
|
108
|
+
});
|
|
109
|
+
// 表格基本配置
|
|
110
|
+
let baseTableConfig: ComponentAttr.RecursivePartial<IFormTable.FormItem[]> = [
|
|
111
|
+
{
|
|
112
|
+
prop: 'id',
|
|
113
|
+
label: '表格唯一标识',
|
|
114
|
+
type: '',
|
|
115
|
+
tooltip: '唯一标识(被某些特定的功能所依赖)',
|
|
116
|
+
disabled: true,
|
|
117
|
+
el: 'hs-input',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
prop: 'tableName',
|
|
121
|
+
label: '表格配置名称',
|
|
122
|
+
type: '',
|
|
123
|
+
el: 'hs-input',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
prop: 'data',
|
|
127
|
+
label: '表格数据',
|
|
128
|
+
tooltip: '表格数据(与 loadData 行为一致,更新数据是不会重置状态)',
|
|
129
|
+
type: '',
|
|
130
|
+
el: 'hs-input',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
prop: 'height',
|
|
134
|
+
label: '表格的高度',
|
|
135
|
+
type: '',
|
|
136
|
+
disabled: true,
|
|
137
|
+
tooltip: '表格的高度;支持铺满父容器或者固定高度,如果设置 auto 为铺满父容器(如果设置为 auto,则必须确保存在父节点且不允许存在相邻元素)',
|
|
138
|
+
el: 'hs-input',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
prop: 'minHeight',
|
|
142
|
+
label: '表格最小高度',
|
|
143
|
+
type: '',
|
|
144
|
+
el: 'hs-input',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
prop: 'maxHeight',
|
|
148
|
+
label: '表格的最大高度',
|
|
149
|
+
type: '',
|
|
150
|
+
el: 'hs-input',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
prop: 'border',
|
|
154
|
+
label: '是否带有边框',
|
|
155
|
+
type: '',
|
|
156
|
+
op: [
|
|
157
|
+
{ label: '默认', value: 'default' },
|
|
158
|
+
{ label: '完整边框', value: 'full' },
|
|
159
|
+
{ label: '外边框', value: 'outer' },
|
|
160
|
+
{ label: '内边框', value: 'inner' },
|
|
161
|
+
{ label: '无边框', value: 'none' },
|
|
162
|
+
],
|
|
163
|
+
el: 'hs-select',
|
|
164
|
+
cel: 'hs-option',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
prop: 'size',
|
|
168
|
+
label: '表格的尺寸',
|
|
169
|
+
type: '',
|
|
170
|
+
op: [
|
|
171
|
+
{ label: '中等', value: 'medium' },
|
|
172
|
+
{ label: '小', value: 'small' },
|
|
173
|
+
{ label: '超小', value: 'mini' },
|
|
174
|
+
{ label: '内边框', value: 'inner' },
|
|
175
|
+
{ label: '无边框', value: 'none' },
|
|
176
|
+
],
|
|
177
|
+
el: 'hs-select',
|
|
178
|
+
cel: 'hs-option',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
prop: 'align',
|
|
182
|
+
label: '所有的列对齐方式',
|
|
183
|
+
type: '',
|
|
184
|
+
op: [
|
|
185
|
+
{ label: '左对齐', value: 'left' },
|
|
186
|
+
{ label: '居中对齐', value: 'center' },
|
|
187
|
+
{ label: '右对齐', value: 'right' },
|
|
188
|
+
],
|
|
189
|
+
el: 'hs-select',
|
|
190
|
+
cel: 'hs-option',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
prop: 'headerAlign',
|
|
194
|
+
label: '所有的表头列的对齐方式',
|
|
195
|
+
tooltip: '所有的表头列的对齐方式',
|
|
196
|
+
type: '',
|
|
197
|
+
op: [
|
|
198
|
+
{ label: '左对齐', value: 'left' },
|
|
199
|
+
{ label: '居中对齐', value: 'center' },
|
|
200
|
+
{ label: '右对齐', value: 'right' },
|
|
201
|
+
],
|
|
202
|
+
el: 'hs-select',
|
|
203
|
+
cel: 'hs-option',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
prop: 'footerAlign',
|
|
207
|
+
label: '所有的表尾列的对齐方式',
|
|
208
|
+
type: '',
|
|
209
|
+
tooltip: '所有的表尾列的对齐方式',
|
|
210
|
+
op: [
|
|
211
|
+
{ label: '左对齐', value: 'left' },
|
|
212
|
+
{ label: '居中对齐', value: 'center' },
|
|
213
|
+
{ label: '右对齐', value: 'right' },
|
|
214
|
+
],
|
|
215
|
+
el: 'hs-select',
|
|
216
|
+
cel: 'hs-option',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
prop: 'emptyText',
|
|
220
|
+
label: '空数据时显示的内容',
|
|
221
|
+
type: '',
|
|
222
|
+
el: 'hs-input',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
prop: 'showOverflow',
|
|
226
|
+
label: '设置所有内容溢出显示',
|
|
227
|
+
tooltip: '设置所有内容过长时显示为省略号(如果是固定列建议设置该值,提升渲染速度)',
|
|
228
|
+
type: '',
|
|
229
|
+
op: [
|
|
230
|
+
{ label: '省略号', value: 'ellipsis' },
|
|
231
|
+
{ label: 'title', value: 'title' },
|
|
232
|
+
{ label: 'tooltip', value: 'tooltip' },
|
|
233
|
+
],
|
|
234
|
+
el: 'hs-select',
|
|
235
|
+
cel: 'hs-option',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
prop: 'showHeaderOverflow',
|
|
239
|
+
label: '设置表头内容溢出显示',
|
|
240
|
+
type: '',
|
|
241
|
+
tooltip: '设置表头所有内容过长时显示为省略号',
|
|
242
|
+
op: [
|
|
243
|
+
{ label: '省略号', value: 'ellipsis' },
|
|
244
|
+
{ label: 'title', value: 'title' },
|
|
245
|
+
{ label: 'tooltip', value: 'tooltip' },
|
|
246
|
+
],
|
|
247
|
+
el: 'hs-select',
|
|
248
|
+
cel: 'hs-option',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
prop: 'showFooterOverflow',
|
|
252
|
+
label: '设置表尾内容溢出显示',
|
|
253
|
+
type: '',
|
|
254
|
+
tooltip: '设置表尾所有内容过长时显示为省略号',
|
|
255
|
+
op: [
|
|
256
|
+
{ label: '省略号', value: 'ellipsis' },
|
|
257
|
+
{ label: 'title', value: 'title' },
|
|
258
|
+
{ label: 'tooltip', value: 'tooltip' },
|
|
259
|
+
],
|
|
260
|
+
el: 'hs-select',
|
|
261
|
+
cel: 'hs-option',
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
prop: 'showHeader',
|
|
265
|
+
label: '是否显示表头',
|
|
266
|
+
type: '',
|
|
267
|
+
el: 'hs-switch',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
prop: 'keepSource',
|
|
271
|
+
label: '保持原始值的状态',
|
|
272
|
+
type: '',
|
|
273
|
+
tooltip: '保持原始值的状态,被某些功能所依赖,比如编辑状态、还原数据等(开启后影响性能,具体取决于数据量)',
|
|
274
|
+
el: 'hs-switch',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
prop: 'loading',
|
|
278
|
+
label: '表格是否显示加载中',
|
|
279
|
+
type: '',
|
|
280
|
+
el: 'hs-switch',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
prop: 'round',
|
|
284
|
+
label: '是否为圆角边框',
|
|
285
|
+
type: '',
|
|
286
|
+
el: 'hs-switch',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
prop: 'stripe',
|
|
290
|
+
label: '是否带有斑马纹',
|
|
291
|
+
type: '',
|
|
292
|
+
tooltip: '是否带有斑马纹(需要注意的是,在可编辑表格场景下,临时插入的数据不会有斑马纹样式)',
|
|
293
|
+
el: 'hs-switch',
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
prop: 'autoResize',
|
|
297
|
+
label: '监听父元素变化重新计算表格',
|
|
298
|
+
tooltip: '自动监听父元素的变化去重新计算表格(对于父元素可能存在动态变化、显示隐藏的容器中、列宽异常等场景中的可能会用到)',
|
|
299
|
+
type: '',
|
|
300
|
+
el: 'hs-switch',
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
prop: 'syncResize',
|
|
304
|
+
label: '随属性的变化重新计算表格',
|
|
305
|
+
type: '',
|
|
306
|
+
tooltip: '自动跟随某个属性的变化去重新计算表格,和手动调用 recalculate 方法是一样的效果(对于通过某个属性来控制显示/隐藏切换时可能会用到)',
|
|
307
|
+
el: 'hs-switch',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
prop: 'showFooter',
|
|
311
|
+
label: '是否显示表尾',
|
|
312
|
+
el: 'hs-switch',
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
prop: 'is_slot_loading',
|
|
316
|
+
label: '自定义加载中模板',
|
|
317
|
+
el: 'hs-switch',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
prop: 'is_slot_empty',
|
|
321
|
+
label: '自定义空数据时显示模板',
|
|
322
|
+
el: 'hs-switch',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
prop: 'rowClassName',
|
|
326
|
+
label: '给行附加样式类',
|
|
327
|
+
tooltip: '给行附加 className',
|
|
328
|
+
type: 'textarea',
|
|
329
|
+
el: 'hs-input',
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
prop: 'cellClassName',
|
|
333
|
+
label: '给单元格附加样式类',
|
|
334
|
+
type: 'textarea',
|
|
335
|
+
tooltip: '给单元格附加 className',
|
|
336
|
+
el: 'hs-input',
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
prop: 'headerRowClassName',
|
|
340
|
+
label: '给表头的行附加样式类',
|
|
341
|
+
tooltip: '给表头的行附加 className',
|
|
342
|
+
type: 'textarea',
|
|
343
|
+
el: 'hs-input',
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
prop: 'headerCellClass-name',
|
|
347
|
+
label: '给表头的单元格附加样式类',
|
|
348
|
+
type: 'textarea',
|
|
349
|
+
tooltip: '给表头的单元格附加 className',
|
|
350
|
+
el: 'hs-input',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
prop: 'footerRowClassName',
|
|
354
|
+
label: '给表尾的行附加样式类',
|
|
355
|
+
tooltip: '给表尾的行附加 className',
|
|
356
|
+
type: 'textarea',
|
|
357
|
+
el: 'hs-input',
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
prop: 'footerCellClassName',
|
|
361
|
+
label: '给表尾的单元格附加样式类',
|
|
362
|
+
type: 'textarea',
|
|
363
|
+
el: 'hs-input',
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
prop: 'footerMethod',
|
|
367
|
+
label: '表尾的数据获取方法',
|
|
368
|
+
tooltip: '表尾的数据获取方法,返回一个二维数组',
|
|
369
|
+
type: 'textarea',
|
|
370
|
+
el: 'hs-input',
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
prop: 'mergeCells',
|
|
374
|
+
label: '临时合并指定的单元格',
|
|
375
|
+
tooltip: '临时合并指定的单元格 (不能用于展开行,不建议用于固定列、树形结构)',
|
|
376
|
+
type: 'textarea',
|
|
377
|
+
el: 'hs-input',
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
prop: 'mergeFooterItems',
|
|
381
|
+
label: '临时合并表尾',
|
|
382
|
+
tooltip: '临时合并表尾 (不能用于展开行,不建议用于固定列、树形结构)',
|
|
383
|
+
type: 'textarea',
|
|
384
|
+
el: 'hs-input',
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
prop: 'params',
|
|
388
|
+
label: '自定义参数',
|
|
389
|
+
type: 'textarea',
|
|
390
|
+
el: 'hs-input',
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
prop: 'is_apply_page',
|
|
394
|
+
label: '是否分页',
|
|
395
|
+
el: 'hs-switch',
|
|
396
|
+
},
|
|
397
|
+
];
|
|
398
|
+
// 表格配置项配置
|
|
399
|
+
const tableAttrConfig: IFormTable.Data[] = [
|
|
400
|
+
{
|
|
401
|
+
key: 'columnConfig',
|
|
402
|
+
visible: false,
|
|
403
|
+
title: '列的默认参数',
|
|
404
|
+
columnConfig: [
|
|
405
|
+
{
|
|
406
|
+
prop: 'useKey',
|
|
407
|
+
label: '是否为每列设置key属性',
|
|
408
|
+
tooltip: '是否需要为每一列的 VNode 设置 key 属性',
|
|
409
|
+
type: '',
|
|
410
|
+
el: 'hs-switch',
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
prop: 'isCurrent',
|
|
414
|
+
label: '点击列头当前列是否高亮',
|
|
415
|
+
tooltip: '当鼠标点击列头时,是否要高亮当前列',
|
|
416
|
+
type: '',
|
|
417
|
+
el: 'hs-switch',
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
prop: 'isHover',
|
|
421
|
+
label: '当鼠标移到列头时,是否要高亮当前头',
|
|
422
|
+
tooltip: '当鼠标移到列头时,是否要高亮当前列头',
|
|
423
|
+
type: '',
|
|
424
|
+
el: 'hs-switch',
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
prop: 'resizable',
|
|
428
|
+
label: '每一列是否启用列宽调整',
|
|
429
|
+
type: '',
|
|
430
|
+
tooltip: '每一列是否启用列宽调整',
|
|
431
|
+
el: 'hs-switch',
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
prop: 'width',
|
|
435
|
+
label: '每一列的宽度',
|
|
436
|
+
tooltip: '每一列的宽度',
|
|
437
|
+
type: '',
|
|
438
|
+
el: 'hs-input',
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
prop: 'minWidth',
|
|
442
|
+
label: '每一列的最小宽度',
|
|
443
|
+
tooltip: '每一列的最小宽度',
|
|
444
|
+
type: '',
|
|
445
|
+
el: 'hs-input',
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
prop: 'maxFixedSize',
|
|
449
|
+
label: '固定列允许设置的最大数量',
|
|
450
|
+
tooltip: '固定列允许设置的最大数量(如果是分组,则一个分组算一个',
|
|
451
|
+
type: 'number',
|
|
452
|
+
el: 'hs-input',
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
prop: 'header-export-method',
|
|
456
|
+
label: '每一列的自定义表头单元格数据导出方法',
|
|
457
|
+
tooltip: '每一列的自定义表头单元格数据导出方法,返回自定义的标题',
|
|
458
|
+
type: 'textarea',
|
|
459
|
+
el: 'hs-input',
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
prop: 'export-method',
|
|
463
|
+
label: '每一列的自定义单元格数据导出方法',
|
|
464
|
+
tooltip: '每一列的自定义单元格数据导出方法,返回自定义的值',
|
|
465
|
+
type: 'textarea',
|
|
466
|
+
el: 'hs-input',
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
prop: 'footer-export-method',
|
|
470
|
+
label: '每一列的自定义表尾单元格数据导出方法',
|
|
471
|
+
tooltip: '每一列的自定义表尾单元格数据导出方法,返回自定义的值',
|
|
472
|
+
type: 'textarea',
|
|
473
|
+
el: 'hs-input',
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
key: 'rowConfig',
|
|
479
|
+
visible: false,
|
|
480
|
+
title: '行配置信息',
|
|
481
|
+
rowConfig: [
|
|
482
|
+
{
|
|
483
|
+
prop: 'useKey',
|
|
484
|
+
label: '是否为每行设置key属性',
|
|
485
|
+
type: '',
|
|
486
|
+
tooltip: '是否需要为每一行的 VNode 设置 key 属性',
|
|
487
|
+
el: 'hs-switch',
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
prop: 'keyField',
|
|
491
|
+
label: '自定义行主键的字段名',
|
|
492
|
+
type: '',
|
|
493
|
+
tooltip: '自定义行数据唯一主键的字段名(默认自动生成)',
|
|
494
|
+
el: 'hs-input',
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
prop: 'isCurrent',
|
|
498
|
+
label: '点击行是否要高亮当前行',
|
|
499
|
+
tooltip: '当鼠标点击行时,是否要高亮当前行',
|
|
500
|
+
type: '',
|
|
501
|
+
el: 'hs-switch',
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
prop: 'isHover',
|
|
505
|
+
label: '鼠标悬浮行是否高亮显示',
|
|
506
|
+
tooltip: '当鼠标移到行时,是否要高亮当前行',
|
|
507
|
+
type: '',
|
|
508
|
+
el: 'hs-switch',
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
prop: 'height',
|
|
512
|
+
label: '每一行的高度',
|
|
513
|
+
tooltip: '只对 show-overflow 有效,每一行的高度',
|
|
514
|
+
type: 'number',
|
|
515
|
+
el: 'hs-input',
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
key: 'resizeConfig',
|
|
521
|
+
visible: false,
|
|
522
|
+
title: '响应式布局配置项',
|
|
523
|
+
resizeConfig: [
|
|
524
|
+
{
|
|
525
|
+
prop: 'refreshDelay',
|
|
526
|
+
label: '刷新延时时长(毫秒)',
|
|
527
|
+
type: 'number',
|
|
528
|
+
el: 'hs-input',
|
|
529
|
+
tooltip: '只对 auto-resize 有效,刷新延时,当父容器发生变化时,至少多少毫秒刷新布局',
|
|
530
|
+
},
|
|
531
|
+
],
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
key: 'resizableConfig',
|
|
535
|
+
visible: false,
|
|
536
|
+
title: '列宽拖动配置项',
|
|
537
|
+
resizableConfig: [
|
|
538
|
+
{
|
|
539
|
+
prop: 'minWidth',
|
|
540
|
+
label: '列宽拖动的最小宽度',
|
|
541
|
+
type: '',
|
|
542
|
+
tooltip: '列宽拖动的最小宽度',
|
|
543
|
+
el: 'hs-input',
|
|
544
|
+
},
|
|
545
|
+
],
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
key: 'seqConfig',
|
|
549
|
+
visible: false,
|
|
550
|
+
title: '序号配置项',
|
|
551
|
+
seqConfig: [
|
|
552
|
+
{
|
|
553
|
+
prop: 'seqMethod',
|
|
554
|
+
label: '自定义序号的方法',
|
|
555
|
+
type: 'textarea',
|
|
556
|
+
el: 'hs-input',
|
|
557
|
+
tooltip: '自定义序号的方法返回处理后的值',
|
|
558
|
+
},
|
|
559
|
+
],
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
key: 'sortConfig',
|
|
563
|
+
visible: false,
|
|
564
|
+
title: '排序配置项',
|
|
565
|
+
sortConfig: [
|
|
566
|
+
{
|
|
567
|
+
prop: 'orders',
|
|
568
|
+
label: '自定义序号的方法',
|
|
569
|
+
type: 'textarea',
|
|
570
|
+
tooltip: '自定义轮转顺序',
|
|
571
|
+
el: 'hs-input',
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
prop: 'sortMethod',
|
|
575
|
+
label: '全局排序方法',
|
|
576
|
+
type: 'textarea',
|
|
577
|
+
tooltip: '全局排序方法,当触发排序时会调用该函数返回排序后的列表',
|
|
578
|
+
el: 'hs-input',
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
prop: 'multiple',
|
|
582
|
+
label: '是否启用多列组合筛选',
|
|
583
|
+
type: '',
|
|
584
|
+
tooltip: '是否启用多列组合筛选',
|
|
585
|
+
el: 'hs-switch',
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
prop: 'chronological',
|
|
589
|
+
label: '是否按照触发顺序进行排序',
|
|
590
|
+
type: '',
|
|
591
|
+
tooltip: '只对 multiple 有效,是否按照先后触发顺序进行排序',
|
|
592
|
+
el: 'hs-switch',
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
prop: 'remote',
|
|
596
|
+
label: '所有列是否使用服务端排序',
|
|
597
|
+
type: '',
|
|
598
|
+
tooltip: '所有列是否使用服务端排序,如果设置为 true 则不会对数据进行处理',
|
|
599
|
+
el: 'hs-switch',
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
prop: 'trigger',
|
|
603
|
+
label: '触发方式',
|
|
604
|
+
type: '',
|
|
605
|
+
tooltip: '触发方式(注:当多种功能重叠时,会同时触发)',
|
|
606
|
+
el: 'hs-select',
|
|
607
|
+
cel: 'hs-option',
|
|
608
|
+
op: [
|
|
609
|
+
{
|
|
610
|
+
label: '点击按钮',
|
|
611
|
+
value: 'default',
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
label: '点击表头',
|
|
615
|
+
value: 'cell',
|
|
616
|
+
},
|
|
617
|
+
],
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
prop: 'showIcon',
|
|
621
|
+
label: '是否显示列头排序图标',
|
|
622
|
+
type: '',
|
|
623
|
+
tooltip: '是否显示列头排序图标',
|
|
624
|
+
el: 'hs-switch',
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
prop: 'iconAsc',
|
|
628
|
+
label: '自定义升序的图标',
|
|
629
|
+
tooltip: '自定义升序的图标',
|
|
630
|
+
type: '',
|
|
631
|
+
el: 'hs-input',
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
prop: 'iconDesc',
|
|
635
|
+
label: '自定义降序的图标',
|
|
636
|
+
tooltip: '自定义降序的图标',
|
|
637
|
+
type: '',
|
|
638
|
+
el: 'hs-input',
|
|
639
|
+
},
|
|
640
|
+
],
|
|
641
|
+
second_config: [
|
|
642
|
+
{
|
|
643
|
+
key: 'defaultSort',
|
|
644
|
+
visible: false,
|
|
645
|
+
title: '默认排序',
|
|
646
|
+
defaultSort: [
|
|
647
|
+
{
|
|
648
|
+
prop: 'field',
|
|
649
|
+
label: '列字段名',
|
|
650
|
+
el: 'hs-input',
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
prop: 'order',
|
|
654
|
+
label: '排序方式',
|
|
655
|
+
el: 'hs-input',
|
|
656
|
+
},
|
|
657
|
+
],
|
|
658
|
+
},
|
|
659
|
+
],
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
key: 'filterConfig',
|
|
663
|
+
visible: false,
|
|
664
|
+
title: '筛选配置项',
|
|
665
|
+
filterConfig: [
|
|
666
|
+
{
|
|
667
|
+
prop: 'remote',
|
|
668
|
+
label: '所有列是否使用服务端筛选',
|
|
669
|
+
type: '',
|
|
670
|
+
tooltip: '所有列是否使用服务端筛选,如果设置为 true 则不会对数据进行处理',
|
|
671
|
+
el: 'hs-switch',
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
prop: 'filterMethod',
|
|
675
|
+
label: '全局筛选方法',
|
|
676
|
+
type: 'textarea',
|
|
677
|
+
tooltip: '全局筛选方法,当触发筛选时会调用该函数返回是否有效',
|
|
678
|
+
el: 'hs-input',
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
prop: 'showIcon',
|
|
682
|
+
label: '是否显示列头筛选图标',
|
|
683
|
+
tooltip: '是否显示列头筛选图标',
|
|
684
|
+
type: '',
|
|
685
|
+
el: 'hs-switch',
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
prop: 'iconNone',
|
|
689
|
+
label: '自定义无条件时显示的图标',
|
|
690
|
+
type: '',
|
|
691
|
+
tooltip: '自定义无条件时显示的图标',
|
|
692
|
+
el: 'hs-input',
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
prop: 'iconMatch',
|
|
696
|
+
label: '自定义带条件时显示的图标',
|
|
697
|
+
tooltip: '自定义带条件时显示的图标',
|
|
698
|
+
type: '',
|
|
699
|
+
el: 'hs-input',
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
prop: 'confirmButtonText',
|
|
703
|
+
label: '自定义确认按钮文本',
|
|
704
|
+
tooltip: '自定义确认按钮文本',
|
|
705
|
+
type: '',
|
|
706
|
+
el: 'hs-input',
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
prop: 'resetButtonText',
|
|
710
|
+
label: '自定义重置按钮文本',
|
|
711
|
+
type: '',
|
|
712
|
+
el: 'hs-input',
|
|
713
|
+
},
|
|
714
|
+
],
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
key: 'radioConfig',
|
|
718
|
+
visible: false,
|
|
719
|
+
title: '单选框配置项',
|
|
720
|
+
radioConfig: [
|
|
721
|
+
{
|
|
722
|
+
prop: 'strict',
|
|
723
|
+
label: '严格模式,选中后不能取消',
|
|
724
|
+
tooltip: '严格模式,选中后不能取消',
|
|
725
|
+
type: '',
|
|
726
|
+
el: 'hs-switch',
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
prop: 'reserve',
|
|
730
|
+
label: '是否保留勾选状态',
|
|
731
|
+
tooltip: '是否保留勾选状态,例如:数据被刷新或者分页之后还保留之前选中的状态(需要有 rowConfig.keyField)',
|
|
732
|
+
type: '',
|
|
733
|
+
el: 'hs-switch',
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
prop: 'labelField',
|
|
737
|
+
label: '单选框显示的字段名',
|
|
738
|
+
tooltip: '单选框显示的字段名,可以直接显示在单选框中',
|
|
739
|
+
type: '',
|
|
740
|
+
el: 'hs-input',
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
prop: 'checkRowKey',
|
|
744
|
+
label: '默认选中指定行',
|
|
745
|
+
tooltip: '默认选中指定行(只会在初始化时被触发一次,需要有 rowConfig.keyField)',
|
|
746
|
+
type: '',
|
|
747
|
+
el: 'hs-input',
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
prop: 'visibleMethod',
|
|
751
|
+
label: '是否允许勾选的方法',
|
|
752
|
+
tooltip: '是否允许勾选的方法,该方法,的返回值用来决定这一行的 radio 是否显示',
|
|
753
|
+
type: 'textarea',
|
|
754
|
+
el: 'hs-input',
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
prop: 'checkMethod',
|
|
758
|
+
label: '是否允许选中的方法',
|
|
759
|
+
tooltip: '是否允许选中的方法,该方法的返回值用来决定这一行的 radio 是否可以选中',
|
|
760
|
+
type: 'textarea',
|
|
761
|
+
el: 'hs-input',
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
prop: 'trigger',
|
|
765
|
+
label: '触发方式',
|
|
766
|
+
type: '',
|
|
767
|
+
tooltip: '触发方式(注:当多种功能重叠时,会同时触发)',
|
|
768
|
+
el: 'hs-select',
|
|
769
|
+
cel: 'hs-option',
|
|
770
|
+
op: [
|
|
771
|
+
{ label: '默认', value: 'default' },
|
|
772
|
+
{ label: '点击单元格触发', value: 'cell' },
|
|
773
|
+
{ label: '点击行触发', value: 'row' },
|
|
774
|
+
],
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
prop: 'highlight',
|
|
778
|
+
label: '高亮选中行',
|
|
779
|
+
type: '',
|
|
780
|
+
el: 'hs-switch',
|
|
781
|
+
},
|
|
782
|
+
],
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
key: 'checkboxConfig',
|
|
786
|
+
visible: false,
|
|
787
|
+
title: '复选框配置项',
|
|
788
|
+
checkboxConfig: [
|
|
789
|
+
{
|
|
790
|
+
prop: 'labelField',
|
|
791
|
+
label: '复选框显示的字段名',
|
|
792
|
+
tooltip: '复选框显示的字段名,可以直接显示在复选框中',
|
|
793
|
+
type: '',
|
|
794
|
+
el: 'hs-input',
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
prop: 'checkField',
|
|
798
|
+
label: '绑定选中属性',
|
|
799
|
+
tooltip: '绑定选中属性(行数据中必须存在该字段,否则无效)',
|
|
800
|
+
type: '',
|
|
801
|
+
el: 'hs-input',
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
prop: 'indeterminateField',
|
|
805
|
+
label: '绑定半选属性',
|
|
806
|
+
tooltip: '绑定半选属性(行数据中必须存在该字段,否则无效)',
|
|
807
|
+
type: '',
|
|
808
|
+
el: 'hs-input',
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
prop: 'showHeader',
|
|
812
|
+
label: '是否显示全选按钮',
|
|
813
|
+
tooltip: '是否显示全选按钮(如果 checkStrictly=true 则默认为 false)',
|
|
814
|
+
type: '',
|
|
815
|
+
el: 'hs-switch',
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
prop: 'checkAll',
|
|
819
|
+
label: '默认勾选所有',
|
|
820
|
+
tooltip: '默认勾选所有(只会在初始化时被触发一次)',
|
|
821
|
+
type: '',
|
|
822
|
+
el: 'hs-switch',
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
prop: 'checkRowKeys',
|
|
826
|
+
label: '默认勾选指定行',
|
|
827
|
+
type: 'textarea',
|
|
828
|
+
tooltip: '默认勾选指定行(只会在初始化时被触发一次,需要有 rowConfig.keyField)',
|
|
829
|
+
el: 'hs-input',
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
prop: 'checkStrictly',
|
|
833
|
+
label: '是否严格的遵循父子不互相关联的做法',
|
|
834
|
+
type: '',
|
|
835
|
+
tooltip: '是否严格的遵循父子不互相关联的做法',
|
|
836
|
+
el: 'hs-switch',
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
prop: 'strict',
|
|
840
|
+
label: '严格模式',
|
|
841
|
+
type: '',
|
|
842
|
+
tooltip: '严格模式,当数据为空或全部禁用时,列头的复选框为禁用状态',
|
|
843
|
+
el: 'hs-switch',
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
prop: 'visibleMethod',
|
|
847
|
+
label: '是否允许勾选的方法',
|
|
848
|
+
tooltip: '是否允许勾选的方法,该方法,的返回值用来决定这一行的 checkbox 是否显示',
|
|
849
|
+
type: 'textarea',
|
|
850
|
+
el: 'hs-input',
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
prop: 'checkMethod',
|
|
854
|
+
label: '是否允许勾选的方法',
|
|
855
|
+
tooltip: '是否允许勾选的方法,该方法的返回值用来决定这一行的 checkbox 是否可以勾选',
|
|
856
|
+
type: 'textarea',
|
|
857
|
+
el: 'hs-input',
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
prop: 'trigger',
|
|
861
|
+
label: '触发方式',
|
|
862
|
+
type: '',
|
|
863
|
+
tooltip: '触发方式(注:当多种功能重叠时,会同时触发)',
|
|
864
|
+
el: 'hs-select',
|
|
865
|
+
cel: 'hs-option',
|
|
866
|
+
op: [
|
|
867
|
+
{ label: '默认', value: 'default' },
|
|
868
|
+
{ label: '点击单元格触发', value: 'cell' },
|
|
869
|
+
{ label: '点击行触发', value: 'row' },
|
|
870
|
+
],
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
prop: 'highlight',
|
|
874
|
+
label: '高亮勾选行',
|
|
875
|
+
type: '',
|
|
876
|
+
el: 'hs-switch',
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
prop: 'reserve',
|
|
880
|
+
label: '是否保留勾选状态',
|
|
881
|
+
tooltip: '是否保留勾选状态,对于某些场景可能会用到,比如数据被刷新之后还保留之前选中的状态(需要有 rowConfig.keyField)',
|
|
882
|
+
type: '',
|
|
883
|
+
el: 'hs-switch',
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
prop: 'range',
|
|
887
|
+
label: '开启复选框范围选择功能',
|
|
888
|
+
type: '',
|
|
889
|
+
tooltip: '开启复选框范围选择功能(启用后通过鼠标在复选框的列内滑动选中或取消指定行)',
|
|
890
|
+
el: 'hs-switch',
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
prop: 'isShiftKey',
|
|
894
|
+
label: '开启复选框指定行选择功能',
|
|
895
|
+
tooltip: '开启复选框指定行选择功能(启用后通过鼠标点击和 shift 键选取指定范围的行)',
|
|
896
|
+
type: '',
|
|
897
|
+
el: 'hs-switch',
|
|
898
|
+
},
|
|
899
|
+
],
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
key: 'tooltipConfig',
|
|
903
|
+
visible: false,
|
|
904
|
+
title: 'tooltip 配置项',
|
|
905
|
+
tooltipConfig: [
|
|
906
|
+
{
|
|
907
|
+
prop: 'showAll',
|
|
908
|
+
label: '所有单元格开启工具提示',
|
|
909
|
+
tooltip: '所有单元格开启工具提示',
|
|
910
|
+
type: '',
|
|
911
|
+
el: 'hs-switch',
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
prop: 'theme',
|
|
915
|
+
label: '主题颜色',
|
|
916
|
+
tooltip: 'tooltip 的主题颜色',
|
|
917
|
+
type: '',
|
|
918
|
+
el: 'hs-select',
|
|
919
|
+
cel: 'hs-option',
|
|
920
|
+
op: [
|
|
921
|
+
{ label: '暗黑', value: 'dark' },
|
|
922
|
+
{ label: '明亮', value: 'light' },
|
|
923
|
+
],
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
prop: 'enterable',
|
|
927
|
+
label: '鼠标是否可进入到工具提示中',
|
|
928
|
+
tooltip: '鼠标是否可进入到工具提示中',
|
|
929
|
+
type: '',
|
|
930
|
+
el: 'hs-switch',
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
prop: 'enterDelay',
|
|
934
|
+
label: '鼠标移入后延时多少才显示工具提示',
|
|
935
|
+
tooltip: '鼠标移入后延时多少才显示工具提示',
|
|
936
|
+
type: 'number',
|
|
937
|
+
el: 'hs-input',
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
prop: 'leaveDelay',
|
|
941
|
+
label: '鼠标移出后延时多少才隐藏工具提示',
|
|
942
|
+
type: 'number',
|
|
943
|
+
el: 'hs-input',
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
prop: 'contentMethod',
|
|
947
|
+
label: '通过返回值来重写默认的提示内容',
|
|
948
|
+
type: 'textarea',
|
|
949
|
+
el: 'hs-input',
|
|
950
|
+
tooltip: '该方法可以通过返回值来重写默认的提示内容,可以返回 null 使用默认的提示内容,可以返回空内容去掉指定单元格的提示内容',
|
|
951
|
+
},
|
|
952
|
+
],
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
key: 'expandConfig',
|
|
956
|
+
visible: false,
|
|
957
|
+
title: '展开行配置项(不支持虚拟滚动)',
|
|
958
|
+
expandConfig: [
|
|
959
|
+
{
|
|
960
|
+
prop: 'labelField',
|
|
961
|
+
label: '展开列显示的字段名',
|
|
962
|
+
type: '',
|
|
963
|
+
tooltip: '展开列显示的字段名,可以直接显示在单元格中',
|
|
964
|
+
el: 'hs-input',
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
prop: 'expandAll',
|
|
968
|
+
label: '默认展开所有行',
|
|
969
|
+
type: '',
|
|
970
|
+
tooltip: '默认展开所有行(只会在初始化时被触发一次)',
|
|
971
|
+
el: 'hs-switch',
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
prop: 'expandRowKeys',
|
|
975
|
+
label: '默认展开指定行',
|
|
976
|
+
type: 'textarea',
|
|
977
|
+
tooltip: '默认展开指定行(只会在初始化时被触发一次,需要有 rowConfig.keyField)',
|
|
978
|
+
el: 'hs-input',
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
prop: 'accordion',
|
|
982
|
+
label: '每次只能展开一行',
|
|
983
|
+
type: '',
|
|
984
|
+
el: 'hs-switch',
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
prop: 'height',
|
|
988
|
+
label: '展开内容的高度',
|
|
989
|
+
tooltip: '展开内容的高度,默认自适应高度',
|
|
990
|
+
type: '',
|
|
991
|
+
el: 'hs-input',
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
prop: 'trigger',
|
|
995
|
+
label: '触发方式',
|
|
996
|
+
type: '',
|
|
997
|
+
tooltip: '触发方式(注:当多种功能重叠时,会同时触发)',
|
|
998
|
+
el: 'hs-select',
|
|
999
|
+
cel: 'hs-option',
|
|
1000
|
+
op: [
|
|
1001
|
+
{ label: '默认', value: 'default' },
|
|
1002
|
+
{ label: '点击单元格触发', value: 'cell' },
|
|
1003
|
+
{ label: '点击行触发', value: 'row' },
|
|
1004
|
+
],
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
prop: 'lazy',
|
|
1008
|
+
label: '是否使用懒加载',
|
|
1009
|
+
type: '',
|
|
1010
|
+
el: 'hs-switch',
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
prop: 'loadMethod',
|
|
1014
|
+
label: '该方法用于异步加载展开后的内容',
|
|
1015
|
+
type: 'textarea',
|
|
1016
|
+
tooltip: '该方法用于异步加载展开后的内容(必须返回 Promise<any[]> 对象)',
|
|
1017
|
+
el: 'hs-input',
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
prop: 'toggleMethod',
|
|
1021
|
+
label: '该方法在展开或关闭触发之前调用',
|
|
1022
|
+
tooltip: '该方法在展开或关闭触发之前调用,可以通过返回值来决定是否允许继续执行',
|
|
1023
|
+
type: 'textarea',
|
|
1024
|
+
el: 'hs-input',
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
prop: 'visibleMethod',
|
|
1028
|
+
label: '是否允许显示展开按钮',
|
|
1029
|
+
tooltip: '该函数的返回值用来决定是否允许显示展开按钮',
|
|
1030
|
+
type: 'textarea',
|
|
1031
|
+
el: 'hs-input',
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
prop: 'reserve',
|
|
1035
|
+
label: '是否保留展开状态',
|
|
1036
|
+
type: '',
|
|
1037
|
+
tooltip: '是否保留展开状态,对于某些场景可能会用到,比如数据被刷新之后还保留之前展开的状态(需要有 rowConfig.keyField)',
|
|
1038
|
+
el: 'hs-switch',
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
prop: 'showIcon',
|
|
1042
|
+
label: '是否显示图标按钮',
|
|
1043
|
+
type: '',
|
|
1044
|
+
el: 'hs-switch',
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
prop: 'iconOpen',
|
|
1048
|
+
label: '自定义展开后显示的图标',
|
|
1049
|
+
type: '',
|
|
1050
|
+
el: 'hs-input',
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
prop: 'iconClose',
|
|
1054
|
+
label: '自定义收起后显示的图标',
|
|
1055
|
+
type: '',
|
|
1056
|
+
el: 'hs-input',
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
prop: 'iconLoaded',
|
|
1060
|
+
label: '自定义懒加载中显示的图标',
|
|
1061
|
+
type: '',
|
|
1062
|
+
el: 'hs-input',
|
|
1063
|
+
},
|
|
1064
|
+
],
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
key: 'treeConfig',
|
|
1068
|
+
visible: false,
|
|
1069
|
+
title: '树形结构配置项',
|
|
1070
|
+
treeConfig: [
|
|
1071
|
+
{
|
|
1072
|
+
prop: 'transform',
|
|
1073
|
+
label: '自动将列表转为树结构',
|
|
1074
|
+
tooltip: '自动将列表转为树结构(支持虚拟滚动)',
|
|
1075
|
+
type: '',
|
|
1076
|
+
el: 'hs-switch',
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
prop: 'rowField',
|
|
1080
|
+
label: '树节点的字段名',
|
|
1081
|
+
tooltip: '用于 treeConfig.transform,树节点的字段名',
|
|
1082
|
+
type: '',
|
|
1083
|
+
el: 'hs-input',
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
prop: 'parentField',
|
|
1087
|
+
label: '树父节点的字段名',
|
|
1088
|
+
tooltip: '用于 treeConfig.transform,树父节点的字段名',
|
|
1089
|
+
type: '',
|
|
1090
|
+
el: 'hs-input',
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
prop: 'childrenField',
|
|
1094
|
+
label: '树子节点的字段名',
|
|
1095
|
+
type: '',
|
|
1096
|
+
el: 'hs-input',
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
prop: 'indent',
|
|
1100
|
+
label: '树节点的缩进',
|
|
1101
|
+
type: 'number',
|
|
1102
|
+
el: 'hs-input',
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
prop: 'showLine',
|
|
1106
|
+
label: '树节点的连接线',
|
|
1107
|
+
type: '',
|
|
1108
|
+
tooltip: '树节点的连接线(启用连接线会降低渲染性能)',
|
|
1109
|
+
el: 'hs-switch',
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
prop: 'expandAll',
|
|
1113
|
+
label: '默认展开所有子孙树节点',
|
|
1114
|
+
type: '',
|
|
1115
|
+
tooltip: '默认展开所有子孙树节点(只会在初始化时被触发一次)',
|
|
1116
|
+
el: 'hs-switch',
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
prop: 'expandRowKeys',
|
|
1120
|
+
label: '默认展开指定树节点',
|
|
1121
|
+
type: 'textarea',
|
|
1122
|
+
el: 'hs-input',
|
|
1123
|
+
tooltip: '默认展开指定树节点(只会在初始化时被触发一次,需要有 rowConfig.keyField)',
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
prop: 'accordion',
|
|
1127
|
+
label: '同级节点每次只展开一个',
|
|
1128
|
+
tooltip: '对于同一级的节点,每次只能展开一个',
|
|
1129
|
+
type: '',
|
|
1130
|
+
el: 'hs-switch',
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
prop: 'trigger',
|
|
1134
|
+
label: '触发方式',
|
|
1135
|
+
type: '',
|
|
1136
|
+
tooltip: '触发方式(注:当多种功能重叠时,会同时触发)',
|
|
1137
|
+
el: 'hs-select',
|
|
1138
|
+
cel: 'hs-option',
|
|
1139
|
+
op: [
|
|
1140
|
+
{ label: '默认', value: 'default' },
|
|
1141
|
+
{ label: '点击单元格触发', value: 'cell' },
|
|
1142
|
+
{ label: '点击行触发', value: 'row' },
|
|
1143
|
+
],
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
prop: 'lazy',
|
|
1147
|
+
label: '是否使用懒加载',
|
|
1148
|
+
type: '',
|
|
1149
|
+
tooltip: '是否使用懒加载(启用后只有指定 hasChild 字段的节点才允许被点击)',
|
|
1150
|
+
el: 'hs-switch',
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
prop: 'hasChildField',
|
|
1154
|
+
label: '标识是否存在子节点',
|
|
1155
|
+
tooltip: '只对 lazy 启用后有效,标识是否存在子节点,从而控制是否允许被点击',
|
|
1156
|
+
type: '',
|
|
1157
|
+
el: 'hs-input',
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
prop: 'loadMethod',
|
|
1161
|
+
label: '该方法用于异步加载子节点',
|
|
1162
|
+
type: 'textarea',
|
|
1163
|
+
tooltip: '该方法用于异步加载子节点(必须返回 Promise<any[]> 对象)',
|
|
1164
|
+
el: 'hs-input',
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
prop: 'toggleMethod',
|
|
1168
|
+
label: '在展开或关闭触发判断是否继续执行',
|
|
1169
|
+
tooltip: '该方法在展开或关闭触发之前调用,可以通过返回值来决定是否允许继续执行',
|
|
1170
|
+
type: 'textarea',
|
|
1171
|
+
el: 'hs-input',
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
prop: 'reserve',
|
|
1175
|
+
label: '是否保留展开状态',
|
|
1176
|
+
type: '',
|
|
1177
|
+
tooltip: '是否保留展开状态,对于某些场景可能会用到,比如数据被刷新之后还保留之前展开的状态(需要有 rowConfig.keyField)',
|
|
1178
|
+
el: 'hs-switch',
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
prop: 'showIcon',
|
|
1182
|
+
label: '是否显示图标按钮',
|
|
1183
|
+
type: '',
|
|
1184
|
+
el: 'hs-switch',
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
prop: 'iconOpen',
|
|
1188
|
+
label: '自定义展开后显示的图标',
|
|
1189
|
+
type: '',
|
|
1190
|
+
el: 'hs-input',
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
prop: 'iconClose',
|
|
1194
|
+
label: '自定义收起后显示的图标',
|
|
1195
|
+
type: '',
|
|
1196
|
+
el: 'hs-input',
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
prop: 'iconLoaded',
|
|
1200
|
+
label: '自定义懒加载中显示的图标',
|
|
1201
|
+
type: '',
|
|
1202
|
+
el: 'hs-input',
|
|
1203
|
+
},
|
|
1204
|
+
],
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
key: 'editConfig',
|
|
1208
|
+
visible: false,
|
|
1209
|
+
title: '可编辑配置项',
|
|
1210
|
+
editConfig: [
|
|
1211
|
+
{
|
|
1212
|
+
prop: 'trigger',
|
|
1213
|
+
label: '触发方式',
|
|
1214
|
+
type: '',
|
|
1215
|
+
el: 'hs-select',
|
|
1216
|
+
cel: 'hs-option',
|
|
1217
|
+
op: [
|
|
1218
|
+
{ label: '手动触发(用于行编辑模式)', value: 'manual' },
|
|
1219
|
+
{ label: '点击触发编辑', value: 'click' },
|
|
1220
|
+
{ label: '双击触发编辑', value: 'dblclick' },
|
|
1221
|
+
],
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
prop: 'enabled',
|
|
1225
|
+
label: '是否启用',
|
|
1226
|
+
type: '',
|
|
1227
|
+
el: 'hs-switch',
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
prop: 'mode',
|
|
1231
|
+
label: '编辑模式',
|
|
1232
|
+
type: '',
|
|
1233
|
+
el: 'hs-select',
|
|
1234
|
+
cel: 'hs-option',
|
|
1235
|
+
op: [
|
|
1236
|
+
{ label: '单元格编辑模式', value: 'cell' },
|
|
1237
|
+
{ label: '行编辑模式', value: 'row' },
|
|
1238
|
+
],
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
prop: 'showIcon',
|
|
1242
|
+
label: '是否显示列头编辑图标',
|
|
1243
|
+
tooltip: '是否显示列头编辑图标',
|
|
1244
|
+
type: '',
|
|
1245
|
+
el: 'hs-switch',
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
prop: 'showStatus',
|
|
1249
|
+
label: '是否显示单元格新增与修改状态',
|
|
1250
|
+
type: '',
|
|
1251
|
+
tooltip: '只对 keep-source 开启有效,是否显示单元格新增与修改状态',
|
|
1252
|
+
el: 'hs-switch',
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
prop: 'showUpdateStatus',
|
|
1256
|
+
label: '是否显示单元格修改状态',
|
|
1257
|
+
type: '',
|
|
1258
|
+
tooltip: '只对 keep-source 开启有效,是否显示单元格修改状态',
|
|
1259
|
+
el: 'hs-switch',
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
prop: 'showInsertStatus',
|
|
1263
|
+
label: '是否显示单元格新增状态',
|
|
1264
|
+
tooltip: '只对 keep-source 开启有效,是否显示单元格新增状态',
|
|
1265
|
+
type: '',
|
|
1266
|
+
el: 'hs-switch',
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
prop: 'showAsterisk',
|
|
1270
|
+
label: '是否显示必填字段的红色星号',
|
|
1271
|
+
tooltip: '是否显示必填字段的红色星号',
|
|
1272
|
+
type: '',
|
|
1273
|
+
el: 'hs-switch',
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
prop: 'autoClear',
|
|
1277
|
+
label: '点空白处是否清除激活状态',
|
|
1278
|
+
type: '',
|
|
1279
|
+
tooltip: '当点击非编辑列之后,是否自动清除单元格的激活状态',
|
|
1280
|
+
el: 'hs-switch',
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
prop: 'beforeEditMethod',
|
|
1284
|
+
label: '该单元格是否允许编辑',
|
|
1285
|
+
tooltip: '该方法的返回值用来决定该单元格是否允许编辑',
|
|
1286
|
+
type: 'textarea',
|
|
1287
|
+
el: 'hs-input',
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
prop: 'icon',
|
|
1291
|
+
label: '自定义可编辑列的状态图标',
|
|
1292
|
+
type: '',
|
|
1293
|
+
el: 'hs-input',
|
|
1294
|
+
},
|
|
1295
|
+
],
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
key: 'validConfig',
|
|
1299
|
+
visible: false,
|
|
1300
|
+
title: '校验配置项',
|
|
1301
|
+
validConfig: [
|
|
1302
|
+
{
|
|
1303
|
+
prop: 'autoPos',
|
|
1304
|
+
label: '是否自动定位到校验不通过的单元格',
|
|
1305
|
+
tooltip: '是否自动定位到校验不通过的单元格',
|
|
1306
|
+
type: '',
|
|
1307
|
+
el: 'hs-switch',
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
prop: 'showMessage',
|
|
1311
|
+
label: '是否显示错误显示',
|
|
1312
|
+
type: '',
|
|
1313
|
+
el: 'hs-switch',
|
|
1314
|
+
},
|
|
1315
|
+
],
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
key: 'editRules',
|
|
1319
|
+
visible: false,
|
|
1320
|
+
title: '校验规则配置项',
|
|
1321
|
+
editRules: [
|
|
1322
|
+
{
|
|
1323
|
+
prop: 'required',
|
|
1324
|
+
label: '是否必填',
|
|
1325
|
+
type: '',
|
|
1326
|
+
el: 'hs-switch',
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
prop: 'min',
|
|
1330
|
+
label: '校验值最小长度',
|
|
1331
|
+
tooltip: '校验值最小长度(如果 type=number 则比较值大小)',
|
|
1332
|
+
type: 'number',
|
|
1333
|
+
el: 'hs-input',
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
prop: 'max',
|
|
1337
|
+
label: '校验值最大长度',
|
|
1338
|
+
tooltip: '校验值最大长度(如果 type=number 则比较值大小)',
|
|
1339
|
+
type: 'number',
|
|
1340
|
+
el: 'hs-input',
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
prop: 'type',
|
|
1344
|
+
label: '数据校验的类型',
|
|
1345
|
+
type: '',
|
|
1346
|
+
op: [
|
|
1347
|
+
{ label: '数值', value: 'number' },
|
|
1348
|
+
{ label: '字符串', value: 'string' },
|
|
1349
|
+
{ label: '数组', value: 'array' },
|
|
1350
|
+
],
|
|
1351
|
+
el: 'hs-select',
|
|
1352
|
+
cel: 'hs-option',
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
prop: 'pattern',
|
|
1356
|
+
label: '正则校验',
|
|
1357
|
+
type: 'textarea',
|
|
1358
|
+
el: 'hs-input',
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
prop: 'validator',
|
|
1362
|
+
label: '"自定义校验方法',
|
|
1363
|
+
tooltip: '自定义校验方法返回一个 Error 或者 Promise<new Error("提示消息")>',
|
|
1364
|
+
type: 'textarea',
|
|
1365
|
+
el: 'hs-input',
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
prop: 'message',
|
|
1369
|
+
label: '校验提示内容',
|
|
1370
|
+
tooltip: '校验提示内容(支持开启国际化)',
|
|
1371
|
+
type: '',
|
|
1372
|
+
el: 'hs-input',
|
|
1373
|
+
},
|
|
1374
|
+
],
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
key: 'emptyRender',
|
|
1378
|
+
visible: false,
|
|
1379
|
+
title: '空内容渲染配置项',
|
|
1380
|
+
emptyRender: [
|
|
1381
|
+
{
|
|
1382
|
+
prop: 'name',
|
|
1383
|
+
label: '渲染器名称',
|
|
1384
|
+
type: '',
|
|
1385
|
+
el: 'hs-input',
|
|
1386
|
+
},
|
|
1387
|
+
],
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
key: 'loadingConfig',
|
|
1391
|
+
visible: false,
|
|
1392
|
+
title: '加载中配置项',
|
|
1393
|
+
loadingConfig: [
|
|
1394
|
+
{
|
|
1395
|
+
prop: 'icon',
|
|
1396
|
+
label: '显示图标',
|
|
1397
|
+
type: '',
|
|
1398
|
+
el: 'hs-input',
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
prop: 'text',
|
|
1402
|
+
label: '显示文字',
|
|
1403
|
+
type: '',
|
|
1404
|
+
el: 'hs-input',
|
|
1405
|
+
},
|
|
1406
|
+
],
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
key: 'customConfig',
|
|
1410
|
+
visible: false,
|
|
1411
|
+
title: '个性化信息配置项',
|
|
1412
|
+
customConfig: [
|
|
1413
|
+
{
|
|
1414
|
+
prop: 'checkMethod',
|
|
1415
|
+
label: '自定义列是否允许列选中的方法',
|
|
1416
|
+
tooltip: '自定义列是否允许列选中的方法,该方法的返回值用来决定这一列的 checkbox 是否可以选中',
|
|
1417
|
+
type: 'textarea',
|
|
1418
|
+
el: 'hs-input',
|
|
1419
|
+
},
|
|
1420
|
+
],
|
|
1421
|
+
second_config: [
|
|
1422
|
+
{
|
|
1423
|
+
key: 'storage',
|
|
1424
|
+
visible: false,
|
|
1425
|
+
title: '是否启用缓存本地保存',
|
|
1426
|
+
storage: [
|
|
1427
|
+
{
|
|
1428
|
+
prop: 'visible',
|
|
1429
|
+
label: '启用显示/隐藏列状态缓存',
|
|
1430
|
+
tooltip: '启用显示/隐藏列状态缓存',
|
|
1431
|
+
type: '',
|
|
1432
|
+
el: 'hs-switch',
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
prop: 'resizable',
|
|
1436
|
+
label: '启用列宽状态缓存',
|
|
1437
|
+
type: '',
|
|
1438
|
+
el: 'hs-switch',
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
prop: 'fixed',
|
|
1442
|
+
label: '启用固定列状态缓存',
|
|
1443
|
+
type: '',
|
|
1444
|
+
el: 'hs-switch',
|
|
1445
|
+
},
|
|
1446
|
+
],
|
|
1447
|
+
},
|
|
1448
|
+
],
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
key: 'scrollX',
|
|
1452
|
+
visible: false,
|
|
1453
|
+
title: '横向虚拟滚动配置',
|
|
1454
|
+
scrollX: [
|
|
1455
|
+
{
|
|
1456
|
+
prop: 'enabled',
|
|
1457
|
+
label: '是否启用',
|
|
1458
|
+
el: 'hs-switch',
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
prop: 'gt',
|
|
1462
|
+
label: '指定大于指定列时自动启动横向虚拟滚动',
|
|
1463
|
+
tooltip: '指定大于指定列时自动启动横向虚拟滚动,如果为 0 则总是启用;如果需要关闭,可以设置 enabled 为 false',
|
|
1464
|
+
type: 'number',
|
|
1465
|
+
el: 'hs-input',
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
prop: 'oSize',
|
|
1469
|
+
label: '指定每次渲染的数据偏移量',
|
|
1470
|
+
tooltip: '指定每次渲染的数据偏移量,偏移量越大渲染次数就越少,但每次渲染耗时就越久(对于低性能浏览器可以设置大一点,减低渲染次数)',
|
|
1471
|
+
type: 'number',
|
|
1472
|
+
el: 'hs-input',
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
prop: 'scrollToLeftOnChange',
|
|
1476
|
+
label: '数据改变滚动条是否复位',
|
|
1477
|
+
tooltip: '当数据源被更改时,自动将横向滚动条滚动到左侧',
|
|
1478
|
+
type: '',
|
|
1479
|
+
el: 'hs-switch',
|
|
1480
|
+
},
|
|
1481
|
+
],
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
key: 'scrollY',
|
|
1485
|
+
visible: false,
|
|
1486
|
+
title: '纵向虚拟滚动配置',
|
|
1487
|
+
scrollY: [
|
|
1488
|
+
{
|
|
1489
|
+
prop: 'enabled',
|
|
1490
|
+
label: '是否启用',
|
|
1491
|
+
type: '',
|
|
1492
|
+
el: 'hs-switch',
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
prop: 'mode',
|
|
1496
|
+
label: '滚动模式',
|
|
1497
|
+
type: '',
|
|
1498
|
+
op: [
|
|
1499
|
+
{ label: '默认', value: 'default' },
|
|
1500
|
+
{ label: '无限滚动', value: 'wheel' },
|
|
1501
|
+
],
|
|
1502
|
+
el: 'hs-select',
|
|
1503
|
+
cel: 'hs-option',
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
prop: 'gt',
|
|
1507
|
+
label: '指定大于指定行时自动启动纵向虚拟滚动',
|
|
1508
|
+
tooltip:
|
|
1509
|
+
'指定大于指定行时自动启动纵向虚拟滚动,如果为 0 则总是启用;如果需要关闭,可以设置 enabled 为 false(注:启用纵向虚拟滚动之后将不能支持动态行高)',
|
|
1510
|
+
type: 'number',
|
|
1511
|
+
el: 'hs-input',
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
prop: 'oSize',
|
|
1515
|
+
label: '指定每次渲染的数据偏移量',
|
|
1516
|
+
tooltip: '指定每次渲染的数据偏移量,偏移量越大渲染次数就越少,但每次渲染耗时就越久(对于低性能浏览器可以设置大一点,减低渲染次数)',
|
|
1517
|
+
type: 'number',
|
|
1518
|
+
el: 'hs-input',
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
prop: 'scrollToTopOnChange',
|
|
1522
|
+
label: '数据改变滚动条是否复位',
|
|
1523
|
+
tooltip: '当数据源被更改时,自动将纵向滚动条滚动到顶部',
|
|
1524
|
+
type: '',
|
|
1525
|
+
el: 'hs-switch',
|
|
1526
|
+
},
|
|
1527
|
+
],
|
|
1528
|
+
},
|
|
1529
|
+
];
|
|
1530
|
+
|
|
1531
|
+
// 表格分页配置
|
|
1532
|
+
const tablePageConfig: IFormTable.Data[] = [
|
|
1533
|
+
{
|
|
1534
|
+
prop: 'size',
|
|
1535
|
+
label: '尺寸',
|
|
1536
|
+
el: 'hs-select',
|
|
1537
|
+
cel: 'hs-option',
|
|
1538
|
+
op: [
|
|
1539
|
+
{ label: '中等', value: 'medium' },
|
|
1540
|
+
{ label: '小号', value: 'small' },
|
|
1541
|
+
{ label: '迷你', value: 'mini' },
|
|
1542
|
+
],
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
prop: 'loading',
|
|
1546
|
+
label: '是否加载中',
|
|
1547
|
+
el: 'hs-switch',
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
prop: 'layouts',
|
|
1551
|
+
label: '自定义布局',
|
|
1552
|
+
type: 'textarea',
|
|
1553
|
+
el: 'hs-input',
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
prop: 'currentPage',
|
|
1557
|
+
label: '当前页',
|
|
1558
|
+
type: 'number',
|
|
1559
|
+
el: 'hs-input',
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
prop: 'pageSize',
|
|
1563
|
+
label: '每页大小',
|
|
1564
|
+
type: 'number',
|
|
1565
|
+
el: 'hs-input',
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
prop: 'total',
|
|
1569
|
+
label: '总条数',
|
|
1570
|
+
type: 'number',
|
|
1571
|
+
el: 'hs-input',
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
prop: 'pagerCount',
|
|
1575
|
+
label: '显示页码按钮的数量',
|
|
1576
|
+
type: 'number',
|
|
1577
|
+
el: 'hs-input',
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
prop: 'pageSizes',
|
|
1581
|
+
label: '每页大小选项列表',
|
|
1582
|
+
type: 'textarea',
|
|
1583
|
+
el: 'hs-input',
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
prop: 'align',
|
|
1587
|
+
label: '对齐方式',
|
|
1588
|
+
type: 'number',
|
|
1589
|
+
el: 'hs-select',
|
|
1590
|
+
cel: 'hs-option',
|
|
1591
|
+
op: [
|
|
1592
|
+
{ label: '左对齐', value: 'left' },
|
|
1593
|
+
{ label: '居中对齐', value: 'center' },
|
|
1594
|
+
{ label: '右对齐', value: 'right' },
|
|
1595
|
+
],
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
prop: 'border',
|
|
1599
|
+
label: '带边框',
|
|
1600
|
+
el: 'hs-switch',
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
prop: 'background',
|
|
1604
|
+
label: '带背景颜色',
|
|
1605
|
+
el: 'hs-switch',
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
prop: 'perfect',
|
|
1609
|
+
label: '配套的样式',
|
|
1610
|
+
el: 'hs-switch',
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
prop: 'className',
|
|
1614
|
+
label: '给分页附加 className',
|
|
1615
|
+
type: 'textarea',
|
|
1616
|
+
el: 'hs-input',
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
prop: 'autoHidden',
|
|
1620
|
+
label: '当只有一页时自动隐藏',
|
|
1621
|
+
el: 'hs-switch',
|
|
1622
|
+
},
|
|
1623
|
+
{
|
|
1624
|
+
prop: 'iconPrevPage',
|
|
1625
|
+
label: '自定义上一页图标',
|
|
1626
|
+
el: 'hs-input',
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
prop: 'iconJumpPrev',
|
|
1630
|
+
label: '自定义向上跳页图标',
|
|
1631
|
+
el: 'hs-input',
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
prop: 'iconJumpNext',
|
|
1635
|
+
label: '自定义向下跳页图标',
|
|
1636
|
+
el: 'hs-input',
|
|
1637
|
+
},
|
|
1638
|
+
{
|
|
1639
|
+
prop: 'iconnextPage',
|
|
1640
|
+
label: '自定义下一页图标',
|
|
1641
|
+
el: 'hs-input',
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
prop: 'iconJumpMore',
|
|
1645
|
+
label: '自定义跳页显示图标',
|
|
1646
|
+
el: 'hs-input',
|
|
1647
|
+
},
|
|
1648
|
+
];
|
|
1649
|
+
// ============================ 表格table属性 end ==========================
|
|
1650
|
+
|
|
1651
|
+
// 表格展示列配置默认值 【ICustomData.TableItemData】
|
|
1652
|
+
const tableColumnConfigData = ref<IFormTable.Data>({
|
|
1653
|
+
type: null, //列的类型
|
|
1654
|
+
field: '', // 列字段名
|
|
1655
|
+
title: '展示列名称', // 列标题
|
|
1656
|
+
isSlot: false, // 是否启用插槽
|
|
1657
|
+
isApply: true, // 是否启用
|
|
1658
|
+
isShow: true, // 是否显示
|
|
1659
|
+
returnValueType: '', // 返回值类型
|
|
1660
|
+
// width: '', //列宽度
|
|
1661
|
+
minWidth: '100', // 最小列宽度
|
|
1662
|
+
resizable: false, // 是否允许调整列宽
|
|
1663
|
+
visible: true, // 默认是否显示
|
|
1664
|
+
// fixed: '', //列固定位置
|
|
1665
|
+
// align: '', // 列对齐方式
|
|
1666
|
+
// headerAlign: '', // 表头列的对齐方式
|
|
1667
|
+
// footerAlign: '', // 表尾列的对齐方式
|
|
1668
|
+
// showOverflow: '', // 当内容过长时显示为省略号
|
|
1669
|
+
// showHeaderOverflow: '', // 当表头内容过长时显示为省略号
|
|
1670
|
+
// showFooterOverflow: '', // 当表尾内容过长时显示为省略号
|
|
1671
|
+
// className: '', // 给单元格附加 className
|
|
1672
|
+
// headerClassName: '', // 给表头的单元格附加 className
|
|
1673
|
+
// footerClassName: '', // 给表尾的单元格附加 className
|
|
1674
|
+
// formatter: '', // 格式化显示内容
|
|
1675
|
+
// sortable: false, // 数据排序,是否允许列排序
|
|
1676
|
+
// sortBy: '', // 指定排序的字段
|
|
1677
|
+
sortType: 'auto', // 排序的字段类型
|
|
1678
|
+
filterMultiple: true, // 筛选是否允许多选
|
|
1679
|
+
// filterMethod: '', // 方法的返回值用来决定该行是否显示
|
|
1680
|
+
// filterResetMethod: '', // 数据筛选,只对 filters 有效,自定义筛选重置方法
|
|
1681
|
+
// filterRecoverMethod: '', // 数据筛选,只对 filters 有效,自定义筛选复原方法(使用自定义筛选时可能会用到)
|
|
1682
|
+
cellType: 'auto', // 只对特定功能有效,单元格值类型(例如:导出数据类型设置)
|
|
1683
|
+
treeNode: false, // 只对 treeConfig 配置时有效,指定为树节点
|
|
1684
|
+
// params: '', // 额外的参数(可以用来存放一些私有参数)
|
|
1685
|
+
// colId: '', // 自定义列的唯一主键
|
|
1686
|
+
filters: [], // 数据筛选,配置筛选条件(注:筛选只能用于列表,如果是树结构则过滤根节点)
|
|
1687
|
+
filterRender: {}, // 数据筛选,筛选渲染器配置项
|
|
1688
|
+
titlePrefix: {}, // 标题前缀图标配置项
|
|
1689
|
+
cellRender: {}, // 默认的渲染器配置项
|
|
1690
|
+
editRender: {},
|
|
1691
|
+
// {
|
|
1692
|
+
// name: '',
|
|
1693
|
+
// enabled: true,
|
|
1694
|
+
// props: '',
|
|
1695
|
+
// attrs: '',
|
|
1696
|
+
// options: '',
|
|
1697
|
+
// optionProps: '{ value, label }',
|
|
1698
|
+
// optionGroups: '',
|
|
1699
|
+
// optionGroupProps: '{ options, label }',
|
|
1700
|
+
// events: '',
|
|
1701
|
+
// content: '',
|
|
1702
|
+
// autofocus: '.el-input__inner',
|
|
1703
|
+
// autoselect: true,
|
|
1704
|
+
// defaultValue: null,
|
|
1705
|
+
// immediate: false,
|
|
1706
|
+
// placeholder: '',
|
|
1707
|
+
// }, // 可编辑渲染器配置项
|
|
1708
|
+
contentRender: {}, // 内容渲染配置项
|
|
1709
|
+
// ===================================
|
|
1710
|
+
// 'filters':{'checked': false,}, // 数据筛选,配置筛选条件(注:筛选只能用于列表,如果是树结构则过滤根节点)
|
|
1711
|
+
// 'filter-render': {}, // 数据筛选,筛选渲染器配置项
|
|
1712
|
+
// 'title-prefix':{}, // 标题前缀图标配置项
|
|
1713
|
+
// 'cell-render':{'optionProps':"{ value, label }", 'optionGroupProps':'{ options, label }',}, // 默认的渲染器配置项
|
|
1714
|
+
// 'edit-render': {'enabled':true,'optionProps': '{ value, label }', 'optionGroupProps':'{ options, label }', 'autoselect':false, 'defaultValue':null, 'immediate':false,}, // 可编辑渲染器配置项
|
|
1715
|
+
// 'content-render': {}, // 内容渲染配置项
|
|
1716
|
+
});
|
|
1717
|
+
// 表格列类型字典
|
|
1718
|
+
const tableItemType = {
|
|
1719
|
+
seq: '序号',
|
|
1720
|
+
checkbox: '复选框',
|
|
1721
|
+
radio: '单选框',
|
|
1722
|
+
expand: '展开行',
|
|
1723
|
+
html: 'HTML 标签',
|
|
1724
|
+
};
|
|
1725
|
+
// 表格展示列配置
|
|
1726
|
+
const tableColumnConfig = ref<ComponentAttr.RecursivePartial<IFormTable.FormItem>[]>([
|
|
1727
|
+
{
|
|
1728
|
+
prop: 'type',
|
|
1729
|
+
label: '列的类型',
|
|
1730
|
+
tooltip: '列的类型(部分功能需要设置 columnConfig.useKey',
|
|
1731
|
+
type: '',
|
|
1732
|
+
el: 'hs-select',
|
|
1733
|
+
cel: 'hs-option',
|
|
1734
|
+
op: [
|
|
1735
|
+
{ label: '序号', value: 'seq' },
|
|
1736
|
+
{ label: '复选框', value: 'checkbox' },
|
|
1737
|
+
{ label: '单选框', value: 'radio' },
|
|
1738
|
+
{ label: '展开行', value: 'expand' },
|
|
1739
|
+
{ label: 'HTML 标签', value: 'html' },
|
|
1740
|
+
],
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
prop: 'title',
|
|
1744
|
+
label: '列标题',
|
|
1745
|
+
type: '',
|
|
1746
|
+
// required: true,
|
|
1747
|
+
tooltip: '列标题(支持开启国际化)',
|
|
1748
|
+
el: 'hs-input',
|
|
1749
|
+
slotValue: 'title',
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
prop: 'field',
|
|
1753
|
+
label: '列字段名',
|
|
1754
|
+
// required: true,
|
|
1755
|
+
tooltip: '列字段名(注:属性层级越深,渲染性能就越差,例如:aa.bb.cc.dd.ee)',
|
|
1756
|
+
type: '',
|
|
1757
|
+
el: 'hs-input',
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
prop: 'returnValueType',
|
|
1761
|
+
label: '返回值类型',
|
|
1762
|
+
el: 'hs-select',
|
|
1763
|
+
cel: 'hs-option',
|
|
1764
|
+
op: [
|
|
1765
|
+
{ label: 'String', value: 'string' },
|
|
1766
|
+
{ label: 'Number', value: 'number' },
|
|
1767
|
+
{ label: 'String|Number', value: 'string|number' },
|
|
1768
|
+
{ label: 'Boolean', value: 'boolean' },
|
|
1769
|
+
],
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
prop: 'isSlot',
|
|
1773
|
+
label: '是否自定义插槽',
|
|
1774
|
+
el: 'hs-switch',
|
|
1775
|
+
tooltip: '下拉选择,自定义模板,选择的名称就是模板名称',
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
prop: 'isApply',
|
|
1779
|
+
label: '是否启用',
|
|
1780
|
+
el: 'hs-switch',
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
prop: 'isShow',
|
|
1784
|
+
label: '是否显示',
|
|
1785
|
+
el: 'hs-switch',
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
prop: 'width',
|
|
1789
|
+
label: '列宽度',
|
|
1790
|
+
type: '',
|
|
1791
|
+
tooltip: '列宽度(如果为空则均匀分配剩余宽度,如果全部列固定了,可能会存在宽屏下不会铺满,可以配合 % 或者 min-width 布局)',
|
|
1792
|
+
el: 'hs-input',
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
prop: 'minWidth',
|
|
1796
|
+
label: '最小列宽度',
|
|
1797
|
+
type: '',
|
|
1798
|
+
tooltip: '最小列宽度;会自动将剩余空间按比例分配',
|
|
1799
|
+
el: 'hs-input',
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
prop: 'resizable',
|
|
1803
|
+
label: '是否允许调整列宽',
|
|
1804
|
+
type: '',
|
|
1805
|
+
tooltip: '列是否允许拖动列宽调整大小',
|
|
1806
|
+
el: 'hs-switch',
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
prop: 'visible',
|
|
1810
|
+
label: '默认是否显示',
|
|
1811
|
+
type: '',
|
|
1812
|
+
el: 'hs-switch',
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
prop: 'fixed',
|
|
1816
|
+
label: '列固定位置',
|
|
1817
|
+
tooltip: '将列固定在左侧或者右侧(注意:固定列应该放在左右两侧的位置)',
|
|
1818
|
+
type: '',
|
|
1819
|
+
el: 'hs-select',
|
|
1820
|
+
cel: 'hs-option',
|
|
1821
|
+
op: [
|
|
1822
|
+
{ label: '不固定', value: '' },
|
|
1823
|
+
{ label: '固定左侧', value: 'left' },
|
|
1824
|
+
{ label: '固定右侧', value: 'right' },
|
|
1825
|
+
],
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
prop: 'align',
|
|
1829
|
+
label: '列对齐方式',
|
|
1830
|
+
type: '',
|
|
1831
|
+
el: 'hs-select',
|
|
1832
|
+
cel: 'hs-option',
|
|
1833
|
+
op: [
|
|
1834
|
+
{ label: '左对齐', value: 'left' },
|
|
1835
|
+
{ label: '居中对齐', value: 'center' },
|
|
1836
|
+
{ label: '右对齐', value: 'right' },
|
|
1837
|
+
],
|
|
1838
|
+
},
|
|
1839
|
+
{
|
|
1840
|
+
prop: 'headerAlign',
|
|
1841
|
+
label: '表头列的对齐方式',
|
|
1842
|
+
el: 'hs-select',
|
|
1843
|
+
cel: 'hs-option',
|
|
1844
|
+
op: [
|
|
1845
|
+
{ label: '左对齐', value: 'left' },
|
|
1846
|
+
{ label: '居中对齐', value: 'center' },
|
|
1847
|
+
{ label: '右对齐', value: 'right' },
|
|
1848
|
+
],
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
prop: 'footerAlign',
|
|
1852
|
+
label: '表尾列的对齐方式',
|
|
1853
|
+
el: 'hs-select',
|
|
1854
|
+
cel: 'hs-option',
|
|
1855
|
+
op: [
|
|
1856
|
+
{ label: '左对齐', value: 'left' },
|
|
1857
|
+
{ label: '居中对齐', value: 'center' },
|
|
1858
|
+
{ label: '右对齐', value: 'right' },
|
|
1859
|
+
],
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
prop: 'showOverflow',
|
|
1863
|
+
label: '当内容过长时显示为省略号',
|
|
1864
|
+
el: 'hs-select',
|
|
1865
|
+
cel: 'hs-option',
|
|
1866
|
+
op: [
|
|
1867
|
+
{ label: '只显示省略号', value: 'ellipsis' },
|
|
1868
|
+
{ label: '显示原生title', value: 'title' },
|
|
1869
|
+
{ label: '显示tooltip提示', value: 'tooltip' },
|
|
1870
|
+
],
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
prop: 'showHeaderOverflow',
|
|
1874
|
+
label: '当表头内容过长时显示为省略号',
|
|
1875
|
+
el: 'hs-select',
|
|
1876
|
+
cel: 'hs-option',
|
|
1877
|
+
op: [
|
|
1878
|
+
{ label: '只显示省略号', value: 'ellipsis' },
|
|
1879
|
+
{ label: '显示原生title', value: 'title' },
|
|
1880
|
+
{ label: '显示tooltip提示', value: 'tooltip' },
|
|
1881
|
+
],
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
prop: 'showFooterOverflow',
|
|
1885
|
+
label: '当表尾内容过长时显示为省略号',
|
|
1886
|
+
el: 'hs-select',
|
|
1887
|
+
cel: 'hs-option',
|
|
1888
|
+
op: [
|
|
1889
|
+
{ label: '只显示省略号', value: 'ellipsis' },
|
|
1890
|
+
{ label: '显示原生title', value: 'title' },
|
|
1891
|
+
{ label: '显示tooltip提示', value: 'tooltip' },
|
|
1892
|
+
],
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
prop: 'className',
|
|
1896
|
+
label: '给单元格附加 className',
|
|
1897
|
+
type: 'textarea',
|
|
1898
|
+
el: 'hs-input',
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
prop: 'headerClassName',
|
|
1902
|
+
label: '给表头的单元格附加 className',
|
|
1903
|
+
type: 'textarea',
|
|
1904
|
+
el: 'hs-input',
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
prop: 'footerClassName',
|
|
1908
|
+
label: '给表尾的单元格附加 className',
|
|
1909
|
+
type: 'textarea',
|
|
1910
|
+
el: 'hs-input',
|
|
1911
|
+
},
|
|
1912
|
+
{
|
|
1913
|
+
prop: 'formatter',
|
|
1914
|
+
label: '格式化显示内容',
|
|
1915
|
+
type: 'textarea',
|
|
1916
|
+
el: 'hs-input',
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
prop: 'sortable',
|
|
1920
|
+
label: '是否允许列排序',
|
|
1921
|
+
tooltip: '数据排序,是否允许列排序',
|
|
1922
|
+
type: '',
|
|
1923
|
+
el: 'hs-switch',
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
prop: 'sortBy',
|
|
1927
|
+
label: '指定排序字段',
|
|
1928
|
+
tooltip: '数据排序,只对 sortable 有效,指定排序的字段(当值 formatter 格式化后,可以设置该字段,使用值进行排序)',
|
|
1929
|
+
type: 'textarea',
|
|
1930
|
+
el: 'hs-input',
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
prop: 'sortType',
|
|
1934
|
+
label: '排序的字段类型',
|
|
1935
|
+
tooltip: '数据排序,排序的字段类型,比如字符串转数值等',
|
|
1936
|
+
type: '',
|
|
1937
|
+
el: 'hs-select',
|
|
1938
|
+
cel: 'hs-option',
|
|
1939
|
+
op: [
|
|
1940
|
+
{ label: 'auto', value: 'auto' },
|
|
1941
|
+
{ label: '数值', value: 'number' },
|
|
1942
|
+
{ label: '字符串', value: 'string' },
|
|
1943
|
+
],
|
|
1944
|
+
},
|
|
1945
|
+
// ================================ 数据筛选 start ===============================
|
|
1946
|
+
{
|
|
1947
|
+
prop: 'filterMultiple',
|
|
1948
|
+
label: '筛选是否允许多选',
|
|
1949
|
+
tooltip: '数据筛选,只对 filters 有效,筛选是否允许多选',
|
|
1950
|
+
type: '',
|
|
1951
|
+
el: 'hs-switch',
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
prop: 'filterMethod',
|
|
1955
|
+
label: '列的筛选方法',
|
|
1956
|
+
tooltip: '数据筛选,只对 filters 有效,列的筛选方法,该方法的返回值用来决定该行是否显示',
|
|
1957
|
+
type: 'textarea',
|
|
1958
|
+
el: 'hs-input',
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
prop: 'filterResetMethod',
|
|
1962
|
+
label: '自定义筛选重置方法',
|
|
1963
|
+
tooltip: '数据筛选,只对 filters 有效,自定义筛选重置方法',
|
|
1964
|
+
type: 'textarea',
|
|
1965
|
+
el: 'hs-input',
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
prop: 'filterRecoverMethod',
|
|
1969
|
+
label: '自定义筛选复原方法',
|
|
1970
|
+
tooltip: '数据筛选,只对 filters 有效,自定义筛选复原方法(使用自定义筛选时可能会用到)',
|
|
1971
|
+
type: 'textarea',
|
|
1972
|
+
el: 'hs-input',
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
prop: 'cellType',
|
|
1976
|
+
label: '单元格值类型',
|
|
1977
|
+
tooltip: '只对特定功能有效,单元格值类型(例如:导出数据类型设置)',
|
|
1978
|
+
type: '',
|
|
1979
|
+
el: 'hs-select',
|
|
1980
|
+
cel: 'hs-option',
|
|
1981
|
+
op: [
|
|
1982
|
+
{ label: '默认自动转换', value: 'auto' },
|
|
1983
|
+
{ label: '数值', value: 'number' },
|
|
1984
|
+
{ label: '字符串', value: 'string' },
|
|
1985
|
+
],
|
|
1986
|
+
},
|
|
1987
|
+
{
|
|
1988
|
+
prop: 'treeNode',
|
|
1989
|
+
label: '是否指定为树节点',
|
|
1990
|
+
tooltip: '只对 treeConfig 配置时有效,指定为树节点',
|
|
1991
|
+
type: '',
|
|
1992
|
+
el: 'hs-switch',
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
prop: 'params',
|
|
1996
|
+
label: '额外的参数',
|
|
1997
|
+
tooltip: '额外的参数(可以用来存放一些私有参数)',
|
|
1998
|
+
type: '',
|
|
1999
|
+
el: 'hs-input',
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
prop: 'colId',
|
|
2003
|
+
label: '自定义列的唯一主键',
|
|
2004
|
+
tooltip: '自定义列的唯一主键(注:列主键必须确保唯一,操作不正确将导致出现问题)',
|
|
2005
|
+
type: '',
|
|
2006
|
+
el: 'hs-input',
|
|
2007
|
+
},
|
|
2008
|
+
]);
|
|
2009
|
+
// 表格展示列配置校验规则
|
|
2010
|
+
const tableColumnRule = {
|
|
2011
|
+
title: [{ required: true, message: '请输入列标题' }],
|
|
2012
|
+
field: [{ required: true, message: '请输入列字段名' }],
|
|
2013
|
+
returnValueType: [{ required: true, message: '请输入返回值类型' }],
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
// 表格展示列配置项配置
|
|
2017
|
+
const tableColumnConfigItem = ref([
|
|
2018
|
+
{
|
|
2019
|
+
key: 'filterRender',
|
|
2020
|
+
visible: false,
|
|
2021
|
+
title: '筛选渲染器配置项',
|
|
2022
|
+
filterRender: [
|
|
2023
|
+
{
|
|
2024
|
+
prop: 'name',
|
|
2025
|
+
label: '渲染器名称',
|
|
2026
|
+
type: '',
|
|
2027
|
+
el: 'hs-input',
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
prop: 'props',
|
|
2031
|
+
label: '渲染的参数',
|
|
2032
|
+
tooltip: '渲染的参数(请查看自定义的 Props)',
|
|
2033
|
+
type: '',
|
|
2034
|
+
el: 'hs-input',
|
|
2035
|
+
},
|
|
2036
|
+
{
|
|
2037
|
+
prop: 'events',
|
|
2038
|
+
label: '渲染组件的事件(请查看自定义的 Events)',
|
|
2039
|
+
type: 'textarea',
|
|
2040
|
+
el: 'hs-input',
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
prop: 'content',
|
|
2044
|
+
label: '渲染组件的内容(仅用于特殊组件)',
|
|
2045
|
+
type: '',
|
|
2046
|
+
el: 'hs-input',
|
|
2047
|
+
},
|
|
2048
|
+
],
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
key: 'titlePrefix',
|
|
2052
|
+
visible: false,
|
|
2053
|
+
title: '标题前缀图标配置项',
|
|
2054
|
+
titlePrefix: [
|
|
2055
|
+
{
|
|
2056
|
+
prop: 'content',
|
|
2057
|
+
label: '提示消息',
|
|
2058
|
+
tooltip: '提示消息(支持开启国际化)',
|
|
2059
|
+
el: 'hs-input',
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
prop: 'useHTML',
|
|
2063
|
+
label: '是否显示为HTML标签',
|
|
2064
|
+
tooltip: '是否显示为HTML标签(动态渲染任意 HTML 是非常危险的,很容易导致 XSS 攻击,请确保内容是可信的)',
|
|
2065
|
+
type: '',
|
|
2066
|
+
el: 'hs-input',
|
|
2067
|
+
},
|
|
2068
|
+
{
|
|
2069
|
+
prop: 'icon',
|
|
2070
|
+
label: '自定义图标',
|
|
2071
|
+
type: '',
|
|
2072
|
+
el: 'hs-input',
|
|
2073
|
+
},
|
|
2074
|
+
],
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
key: 'cellRender',
|
|
2078
|
+
visible: false,
|
|
2079
|
+
title: '默认的渲染器配置项',
|
|
2080
|
+
cellRender: [
|
|
2081
|
+
{
|
|
2082
|
+
prop: 'name',
|
|
2083
|
+
label: '渲染器名称',
|
|
2084
|
+
el: 'hs-input',
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
prop: 'props',
|
|
2088
|
+
label: '渲染的参数',
|
|
2089
|
+
tooltip: '渲染的参数(请查看自定义的 Props)',
|
|
2090
|
+
type: 'textarea',
|
|
2091
|
+
el: 'hs-input',
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
prop: 'options',
|
|
2095
|
+
label: '下拉选项列表',
|
|
2096
|
+
tooltip: '只对 name=select 有效,下拉选项列表',
|
|
2097
|
+
type: 'textarea',
|
|
2098
|
+
el: 'hs-input',
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
prop: 'optionProps',
|
|
2102
|
+
label: '下拉选项属性参数配置',
|
|
2103
|
+
tooltip: '只对 name=select 有效,下拉选项属性参数配置',
|
|
2104
|
+
type: 'textarea',
|
|
2105
|
+
el: 'hs-input',
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
prop: 'optionGroups',
|
|
2109
|
+
label: '下拉分组选项列表',
|
|
2110
|
+
tooltip: '只对 name=select 有效,下拉分组选项列表',
|
|
2111
|
+
type: 'textarea',
|
|
2112
|
+
el: 'hs-input',
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
prop: 'optionGroupProps',
|
|
2116
|
+
label: '下拉分组选项属性参数配置',
|
|
2117
|
+
tooltip: '只对 name=select 有效,下拉分组选项属性参数配置',
|
|
2118
|
+
type: 'textarea',
|
|
2119
|
+
el: 'hs-input',
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
prop: 'events',
|
|
2123
|
+
label: '渲染组件的事件',
|
|
2124
|
+
tooltip: '渲染组件的事件(请查看自定义的 Events)',
|
|
2125
|
+
type: 'textarea',
|
|
2126
|
+
el: 'hs-input',
|
|
2127
|
+
},
|
|
2128
|
+
{
|
|
2129
|
+
prop: 'content',
|
|
2130
|
+
label: '渲染组件的内容(仅用于特殊组件)',
|
|
2131
|
+
el: 'hs-input',
|
|
2132
|
+
},
|
|
2133
|
+
],
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
key: 'editRender',
|
|
2137
|
+
visible: false,
|
|
2138
|
+
title: '可编辑渲染器配置项',
|
|
2139
|
+
editRender: [
|
|
2140
|
+
{
|
|
2141
|
+
prop: 'name',
|
|
2142
|
+
label: '渲染器名称',
|
|
2143
|
+
el: 'hs-input',
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
prop: 'enabled',
|
|
2147
|
+
label: '是否启用',
|
|
2148
|
+
el: 'hs-switch',
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
prop: 'props',
|
|
2152
|
+
label: '渲染的参数',
|
|
2153
|
+
tooltip: '渲染的参数(请查看自定义的 Props)',
|
|
2154
|
+
type: 'textarea',
|
|
2155
|
+
el: 'hs-input',
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
prop: 'attrs',
|
|
2159
|
+
label: '渲染的属性',
|
|
2160
|
+
tooltip: '渲染的属性(请查看自定义的 Attribute)',
|
|
2161
|
+
type: 'textarea',
|
|
2162
|
+
el: 'hs-input',
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
prop: 'options',
|
|
2166
|
+
label: '下拉选项列表',
|
|
2167
|
+
tooltip: '只对 name=select 有效,下拉选项列表',
|
|
2168
|
+
type: 'textarea',
|
|
2169
|
+
el: 'hs-input',
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
prop: 'optionProps',
|
|
2173
|
+
label: '下拉选项属性参数配置',
|
|
2174
|
+
tooltip: '只对 name=select 有效,下拉选项属性参数配置',
|
|
2175
|
+
type: 'textarea',
|
|
2176
|
+
el: 'hs-input',
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
prop: 'optionGroups',
|
|
2180
|
+
label: '下拉分组选项列表',
|
|
2181
|
+
tooltip: '只对 name=select 有效,下拉分组选项列表',
|
|
2182
|
+
type: 'textarea',
|
|
2183
|
+
el: 'hs-input',
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
prop: 'optionGroupProps',
|
|
2187
|
+
label: '下拉分组选项属性参数配置',
|
|
2188
|
+
tooltip: '只对 name=select 有效,下拉分组选项属性参数配置',
|
|
2189
|
+
type: 'textarea',
|
|
2190
|
+
el: 'hs-input',
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
prop: 'events',
|
|
2194
|
+
label: '渲染组件的事件(请查看自定义的 Events)',
|
|
2195
|
+
type: '',
|
|
2196
|
+
default: '{row,rowIndex,$rowIndex,column,columnIndex,$columnIndex}, ...[自定义的 arguments]',
|
|
2197
|
+
param: '',
|
|
2198
|
+
el: 'hs-input',
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
prop: 'content',
|
|
2202
|
+
label: '渲染组件的内容',
|
|
2203
|
+
tooltip: '渲染组件的内容(仅用于特殊组件)',
|
|
2204
|
+
type: '',
|
|
2205
|
+
el: 'hs-input',
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
prop: 'autofocus',
|
|
2209
|
+
label: '指定聚焦的选择器',
|
|
2210
|
+
tooltip: '如果是自定义渲染可以指定聚焦的选择器,例如 .my-input',
|
|
2211
|
+
type: '',
|
|
2212
|
+
el: 'hs-input',
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
prop: 'autoselect',
|
|
2216
|
+
label: '自动选中内容',
|
|
2217
|
+
tooltip: '是否在激活编辑之后自动选中输入框内容',
|
|
2218
|
+
type: '',
|
|
2219
|
+
el: 'hs-input',
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
prop: 'defaultValue',
|
|
2223
|
+
label: '默认值',
|
|
2224
|
+
tooltip: '默认值(插入数据时列的默认值)',
|
|
2225
|
+
type: '',
|
|
2226
|
+
el: 'hs-input',
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
prop: 'immediate',
|
|
2230
|
+
label: '输入值实时更新',
|
|
2231
|
+
tooltip: '输入值实时同步更新(默认情况下单元格编辑的值只会在被触发时同步,如果需要实时同步可以设置为 true)',
|
|
2232
|
+
type: '',
|
|
2233
|
+
el: 'hs-input',
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
prop: 'placeholder',
|
|
2237
|
+
label: '单元格占位符',
|
|
2238
|
+
tooltip: '单元格占位符,但单元格为空值时显示的占位符',
|
|
2239
|
+
type: '',
|
|
2240
|
+
el: 'hs-input',
|
|
2241
|
+
},
|
|
2242
|
+
],
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
key: 'contentRender',
|
|
2246
|
+
visible: false,
|
|
2247
|
+
title: '内容渲染配置项',
|
|
2248
|
+
contentRender: [
|
|
2249
|
+
{
|
|
2250
|
+
prop: 'name',
|
|
2251
|
+
label: '渲染器名称',
|
|
2252
|
+
type: '',
|
|
2253
|
+
el: 'hs-input',
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
prop: 'props',
|
|
2257
|
+
label: '渲染的参数',
|
|
2258
|
+
tooltip: '渲染的参数(请查看自定义的 Props)',
|
|
2259
|
+
type: 'textarea',
|
|
2260
|
+
el: 'hs-input',
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
prop: 'attrs',
|
|
2264
|
+
tooltip: '渲染的属性',
|
|
2265
|
+
label: '渲染的属性(请查看自定义的 Attribute)',
|
|
2266
|
+
type: 'textarea',
|
|
2267
|
+
el: 'hs-input',
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
prop: 'events',
|
|
2271
|
+
label: '渲染组件的事件',
|
|
2272
|
+
tooltip: '渲染组件的事件(请查看自定义的 Events)',
|
|
2273
|
+
type: 'textarea',
|
|
2274
|
+
el: 'hs-input',
|
|
2275
|
+
},
|
|
2276
|
+
],
|
|
2277
|
+
},
|
|
2278
|
+
]);
|
|
2279
|
+
|
|
2280
|
+
// 过滤条件配置
|
|
2281
|
+
const filterItemConfig = ref({
|
|
2282
|
+
key: 'filters',
|
|
2283
|
+
visible: false,
|
|
2284
|
+
title: '配置数据筛选条件',
|
|
2285
|
+
filters: [
|
|
2286
|
+
{
|
|
2287
|
+
prop: 'label',
|
|
2288
|
+
label: '显示的值',
|
|
2289
|
+
type: '',
|
|
2290
|
+
el: 'hs-input',
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
prop: 'value',
|
|
2294
|
+
label: '实际的值',
|
|
2295
|
+
type: '',
|
|
2296
|
+
el: 'hs-input',
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
prop: 'checked',
|
|
2300
|
+
label: '默认是否选中',
|
|
2301
|
+
type: '',
|
|
2302
|
+
el: 'hs-switch',
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
prop: 'resetValue',
|
|
2306
|
+
label: '重置时的默认值',
|
|
2307
|
+
type: 'textarea',
|
|
2308
|
+
el: 'hs-input',
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
prop: 'data',
|
|
2312
|
+
label: '自定义渲染的数据值(当使用自定义模板时可能会用到)',
|
|
2313
|
+
type: 'textarea',
|
|
2314
|
+
el: 'hs-input',
|
|
2315
|
+
},
|
|
2316
|
+
],
|
|
2317
|
+
});
|
|
2318
|
+
|
|
2319
|
+
let tableItemConfig = ref<IFormTable.TableItem>({
|
|
2320
|
+
id: '',
|
|
2321
|
+
// 配置绑定的值
|
|
2322
|
+
data: tableColumnConfigData.value,
|
|
2323
|
+
// 按钮配置
|
|
2324
|
+
btnData: [],
|
|
2325
|
+
});
|
|
2326
|
+
// 表格项配置
|
|
2327
|
+
const tableConfig = {
|
|
2328
|
+
list: tableColumnConfig.value,
|
|
2329
|
+
second_config: tableColumnConfigItem.value,
|
|
2330
|
+
filterConfig: filterItemConfig.value,
|
|
2331
|
+
rules: {
|
|
2332
|
+
list: tableColumnRule,
|
|
2333
|
+
}, // 校验规则
|
|
2334
|
+
};
|
|
2335
|
+
// 表格列空配置
|
|
2336
|
+
let emptyTableItemData = ref<IFormTable.TableItem>({
|
|
2337
|
+
id: '',
|
|
2338
|
+
// 配置绑定的值
|
|
2339
|
+
data: {},
|
|
2340
|
+
list: [],
|
|
2341
|
+
});
|
|
2342
|
+
// 表格配置分类标题
|
|
2343
|
+
let tableTitleConfig = ref({
|
|
2344
|
+
code: {
|
|
2345
|
+
visible: false,
|
|
2346
|
+
subTitle: '表格配置代码',
|
|
2347
|
+
class: 'font-bold my-3',
|
|
2348
|
+
iconSize: 20,
|
|
2349
|
+
},
|
|
2350
|
+
table: {
|
|
2351
|
+
visible: false,
|
|
2352
|
+
subTitle: '表格配置',
|
|
2353
|
+
class: 'font-bold my-3',
|
|
2354
|
+
iconSize: 20,
|
|
2355
|
+
},
|
|
2356
|
+
tableItem: {
|
|
2357
|
+
visible: true,
|
|
2358
|
+
subTitle: '表格元素配置项集合',
|
|
2359
|
+
class: 'font-bold my-3',
|
|
2360
|
+
iconSize: 20,
|
|
2361
|
+
},
|
|
2362
|
+
});
|
|
2363
|
+
// 模拟通过类名调接口获取表格属性数据
|
|
2364
|
+
let fieldList = [
|
|
2365
|
+
{ field: 'create_time', title: '创建时间' },
|
|
2366
|
+
{ field: 'update_time', title: '更新时间' },
|
|
2367
|
+
{ field: 'company_id', title: '公司id' },
|
|
2368
|
+
{ field: 'page_id', title: '页面id' },
|
|
2369
|
+
{ field: 'menu_type', title: '菜单类型' },
|
|
2370
|
+
{ field: 'sort', title: '排序' },
|
|
2371
|
+
{ field: 'menu_name', title: '菜单名称' },
|
|
2372
|
+
];
|
|
2373
|
+
// 表格baseData的配置
|
|
2374
|
+
let baseConfig = {
|
|
2375
|
+
baseTableConfig,
|
|
2376
|
+
baseVisible: false,
|
|
2377
|
+
pageVisible: false,
|
|
2378
|
+
tableAttrConfig,
|
|
2379
|
+
tablePageConfig,
|
|
2380
|
+
};
|
|
2381
|
+
|
|
2382
|
+
export {
|
|
2383
|
+
baseTableConfig,
|
|
2384
|
+
baseData,
|
|
2385
|
+
tableAttrConfig,
|
|
2386
|
+
tableColumnConfig,
|
|
2387
|
+
tableColumnConfigData,
|
|
2388
|
+
tableColumnConfigItem,
|
|
2389
|
+
filterItemConfig,
|
|
2390
|
+
tablePageConfig,
|
|
2391
|
+
tableItemConfig,
|
|
2392
|
+
tableConfig,
|
|
2393
|
+
emptyTableItemData,
|
|
2394
|
+
tableTitleConfig,
|
|
2395
|
+
tableColumnRule,
|
|
2396
|
+
tableItemType,
|
|
2397
|
+
fieldList, // 模拟类名解析结果
|
|
2398
|
+
baseConfig, // 表格baseData配置
|
|
2399
|
+
};
|