@dt-frames/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/README.md +15 -0
- package/es/assets/app-antd-dark-theme-style.e3b0c442.css +0 -0
- package/es/assets/app-theme-style.e3b0c442.css +0 -0
- package/es/assets/data/icon.d.ts +4 -0
- package/es/assets/data/icon.ts +69 -0
- package/es/assets/data/icon11.ts +69 -0
- package/es/assets/data/icons/actions.d.ts +1 -0
- package/es/assets/data/icons/actions.ts +427 -0
- package/es/assets/data/icons/code.d.ts +1 -0
- package/es/assets/data/icons/code.ts +10 -0
- package/es/assets/data/icons/commuticate.d.ts +1 -0
- package/es/assets/data/icons/commuticate.ts +190 -0
- package/es/assets/data/icons/currency.d.ts +1 -0
- package/es/assets/data/icons/currency.ts +46 -0
- package/es/assets/data/icons/devices.d.ts +1 -0
- package/es/assets/data/icons/devices.ts +128 -0
- package/es/assets/data/icons/edit.d.ts +1 -0
- package/es/assets/data/icons/edit.ts +165 -0
- package/es/assets/data/icons/file.d.ts +1 -0
- package/es/assets/data/icons/file.ts +104 -0
- package/es/assets/data/icons/math.d.ts +1 -0
- package/es/assets/data/icons/math.ts +53 -0
- package/es/assets/data/icons/message.d.ts +1 -0
- package/es/assets/data/icons/message.ts +75 -0
- package/es/assets/data/icons/navigate.d.ts +1 -0
- package/es/assets/data/icons/navigate.ts +181 -0
- package/es/assets/data/icons/other.d.ts +1 -0
- package/es/assets/data/icons/other.ts +333 -0
- package/es/assets/data/icons.d.ts +4 -0
- package/es/assets/data/icons.ts +58 -0
- package/es/assets/imgs/logo/logo.png +0 -0
- package/es/assets/locales/en_US.json +3 -0
- package/es/assets/locales/zh_CN.json +3 -0
- package/es/assets/style/index.less +10 -0
- package/es/assets/style/reset.less +20 -0
- package/es/assets/style/var.less +42 -0
- package/es/components/container/index.d.ts +3 -0
- package/es/components/container/src/bar.d.ts +14 -0
- package/es/components/container/src/scroll-bar.d.ts +93 -0
- package/es/components/container/src/scroll-container.d.ts +99 -0
- package/es/components/curd/index.d.ts +2 -0
- package/es/components/curd/src/components/dialog.d.ts +1494 -0
- package/es/components/curd/src/components/props.d.ts +33 -0
- package/es/components/curd/src/hooks/useCurd.d.ts +11 -0
- package/es/components/curd/src/types/curd.type.d.ts +19 -0
- package/es/components/excel/index.d.ts +2 -0
- package/es/components/excel/src/export2Excel.d.ts +3 -0
- package/es/components/forms/index.d.ts +5 -0
- package/es/components/forms/src/componentMap.d.ts +4 -0
- package/es/components/forms/src/components/formButton.d.ts +75 -0
- package/es/components/forms/src/components/formIcon.d.ts +2845 -0
- package/es/components/forms/src/components/formItem.d.ts +59 -0
- package/es/components/forms/src/components/radioButton.d.ts +33 -0
- package/es/components/forms/src/const/form.const.d.ts +7 -0
- package/es/components/forms/src/hooks/helper.d.ts +6 -0
- package/es/components/forms/src/hooks/useForm.d.ts +5 -0
- package/es/components/forms/src/hooks/useFormActions.d.ts +13 -0
- package/es/components/forms/src/hooks/useFormEvents.d.ts +26 -0
- package/es/components/forms/src/hooks/useFormValue.d.ts +3 -0
- package/es/components/forms/src/hooks/useFormValues.d.ts +14 -0
- package/es/components/forms/src/hooks/useLabelWidth.d.ts +35 -0
- package/es/components/forms/src/index.d.ts +186 -0
- package/es/components/forms/src/prop.d.ts +79 -0
- package/es/components/forms/src/types/form.type.d.ts +124 -0
- package/es/components/icons/index.d.ts +3 -0
- package/es/components/icons/pick-icon.d.ts +529 -0
- package/es/components/icons/src/pick-icon.d.ts +432 -0
- package/es/components/icons/src/svg-icon.d.ts +44 -0
- package/es/components/icons/svg-icon.d.ts +44 -0
- package/es/components/iframe/index.d.ts +2 -0
- package/es/components/iframe/src/index.d.ts +967 -0
- package/es/components/index.d.ts +14 -0
- package/es/components/modal/index.d.ts +3 -0
- package/es/components/modal/src/components/close-icon.d.ts +344 -0
- package/es/components/modal/src/components/modal-wrap.d.ts +236 -0
- package/es/components/modal/src/components/modal.d.ts +194 -0
- package/es/components/modal/src/components/modalFooter.d.ts +102 -0
- package/es/components/modal/src/hooks/useDrag.d.ts +7 -0
- package/es/components/modal/src/hooks/useFullScreen.d.ts +12 -0
- package/es/components/modal/src/hooks/useModal.d.ts +4 -0
- package/es/components/modal/src/index.d.ts +1187 -0
- package/es/components/modal/src/props.d.ts +89 -0
- package/es/components/modal/src/types/modal.type.d.ts +22 -0
- package/es/components/router/base-router.d.ts +2 -0
- package/es/components/router/index.d.ts +2 -0
- package/es/components/source/index.d.ts +1 -0
- package/es/components/source/src/hooks/useFetch.d.ts +5 -0
- package/es/components/source/src/hooks/useSource.d.ts +33 -0
- package/es/components/source/src/index.d.ts +2 -0
- package/es/components/source/src/types/source.type.d.ts +31 -0
- package/es/components/source/src/types/table.type.d.ts +7 -0
- package/es/components/table/index.d.ts +3 -0
- package/es/components/table/src/components/TableActions.d.ts +1279 -0
- package/es/components/table/src/components/TableHeader.d.ts +28 -0
- package/es/components/table/src/components/TableRender.d.ts +25 -0
- package/es/components/table/src/components/setting/Column.d.ts +1349 -0
- package/es/components/table/src/components/setting/Download.d.ts +1144 -0
- package/es/components/table/src/components/setting/Fullscreen.d.ts +270 -0
- package/es/components/table/src/components/setting/Size.d.ts +1145 -0
- package/es/components/table/src/components/setting/index.d.ts +26 -0
- package/es/components/table/src/const.d.ts +12 -0
- package/es/components/table/src/hooks/useColumns.d.ts +12 -0
- package/es/components/table/src/hooks/useDataSource.d.ts +16 -0
- package/es/components/table/src/hooks/useFormat.d.ts +2 -0
- package/es/components/table/src/hooks/useLoading.d.ts +6 -0
- package/es/components/table/src/hooks/usePagination.d.ts +122 -0
- package/es/components/table/src/hooks/useRowSelection.d.ts +13 -0
- package/es/components/table/src/hooks/useRows.d.ts +5 -0
- package/es/components/table/src/hooks/useTable.d.ts +5 -0
- package/es/components/table/src/hooks/useTableHeader.d.ts +8 -0
- package/es/components/table/src/hooks/useTableInstance.d.ts +13 -0
- package/es/components/table/src/hooks/useTableScroll.d.ts +12 -0
- package/es/components/table/src/hooks/useVirtualScroll.d.ts +5 -0
- package/es/components/table/src/index.d.ts +565 -0
- package/es/components/table/src/props.d.ts +192 -0
- package/es/components/table/src/types/table.type.d.ts +89 -0
- package/es/components/table/src/types/tableHeader.type.d.ts +23 -0
- package/es/components/table/src/utils/format.d.ts +1 -0
- package/es/directives/icon.d.ts +2 -0
- package/es/directives/index.d.ts +6 -0
- package/es/directives/permission.d.ts +2 -0
- package/es/global.d.ts +8 -0
- package/es/index.css +1 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +8867 -0
- package/es/style/assets/style/index.less +10 -0
- package/es/style/assets/style/reset.less +20 -0
- package/es/style/assets/style/var.less +42 -0
- package/es/style/components/container/index.less +85 -0
- package/es/style/components/forms/src/index.less +82 -0
- package/es/style/components/icons/index.less +96 -0
- package/es/style/components/icons/src/index.less +96 -0
- package/es/style/components/iframe/src/index.less +3 -0
- package/es/style/components/modal/src/index.less +60 -0
- package/es/style/components/table/src/index.less +162 -0
- package/es/style/theme/footer/index.less +16 -0
- package/es/style/theme/header/index.less +438 -0
- package/es/style/theme/header/set-theme.less +68 -0
- package/es/style/theme/sider/index.less +203 -0
- package/es/style/theme/tabs/index.less +165 -0
- package/es/style/theme/theme.less +66 -0
- package/es/style/theme/transition.less +99 -0
- package/es/theme/content/index.d.ts +29 -0
- package/es/theme/feature/back-top.d.ts +105 -0
- package/es/theme/feature/index.d.ts +107 -0
- package/es/theme/footer/index.d.ts +30 -0
- package/es/theme/header/components/bread-crumb.d.ts +127 -0
- package/es/theme/header/components/fullscreen.d.ts +5 -0
- package/es/theme/header/components/handler.d.ts +2 -0
- package/es/theme/header/components/index.d.ts +10 -0
- package/es/theme/header/components/lang-picker.d.ts +290 -0
- package/es/theme/header/components/logo.d.ts +40 -0
- package/es/theme/header/components/menu-search.d.ts +528 -0
- package/es/theme/header/components/notify.d.ts +269 -0
- package/es/theme/header/components/setting-theme.d.ts +2550 -0
- package/es/theme/header/components/theme-drawer/enum.d.ts +5 -0
- package/es/theme/header/components/theme-drawer/feature.d.ts +1096 -0
- package/es/theme/header/components/theme-drawer/index.d.ts +3 -0
- package/es/theme/header/components/theme-drawer/menu-type.d.ts +273 -0
- package/es/theme/header/components/theme-drawer/select-item.d.ts +778 -0
- package/es/theme/header/components/theme-drawer/switch-item.d.ts +289 -0
- package/es/theme/header/components/trigger.d.ts +14 -0
- package/es/theme/header/components/user-info.d.ts +452 -0
- package/es/theme/header/const/index.d.ts +20 -0
- package/es/theme/header/helper/menu-tree.d.ts +3 -0
- package/es/theme/header/index.d.ts +4369 -0
- package/es/theme/header/multiple-header.d.ts +2001 -0
- package/es/theme/index.d.ts +2 -0
- package/es/theme/sider/components/basic-menu/basic-menu-item.d.ts +121 -0
- package/es/theme/sider/components/basic-menu/basic-menu.d.ts +752 -0
- package/es/theme/sider/components/basic-menu/basic-sub-menu-item.d.ts +250 -0
- package/es/theme/sider/components/basic-menu/menu-item-content.d.ts +34 -0
- package/es/theme/sider/components/drag-bar.d.ts +14 -0
- package/es/theme/sider/components/layout-menu.d.ts +22 -0
- package/es/theme/sider/components/props.d.ts +69 -0
- package/es/theme/sider/components/sider-trigger.d.ts +68 -0
- package/es/theme/sider/helper/sider.d.ts +12 -0
- package/es/theme/sider/helper/split-menu.d.ts +10 -0
- package/es/theme/sider/hooks/useDragLine.d.ts +2 -0
- package/es/theme/sider/hooks/useOpenKeys.d.ts +13 -0
- package/es/theme/sider/index.d.ts +152 -0
- package/es/theme/styles/hooks/changeTheme.d.ts +1 -0
- package/es/theme/styles/hooks/generate.d.ts +13 -0
- package/es/theme/styles/index.d.ts +2 -0
- package/es/theme/tabs/components/TabContent.d.ts +887 -0
- package/es/theme/tabs/components/TabRedo.d.ts +49 -0
- package/es/theme/tabs/hooks/useMultifyTabs.d.ts +7 -0
- package/es/theme/tabs/hooks/useTabDropdown.d.ts +6 -0
- package/es/theme/tabs/index.d.ts +1399 -0
- package/es/theme/tabs/types/tabs.type.d.ts +7 -0
- package/es/theme/theme/initTheme.d.ts +3 -0
- package/es/theme/theme/util.d.ts +5 -0
- package/es/theme/theme.d.ts +4911 -0
- package/es/themes/generate.ts +74 -0
- package/es/themes/index.ts +10 -0
- package/es/themes/modifyVars.ts +33 -0
- package/es/themes/themePlugiin.ts +74 -0
- package/package.json +49 -0
- package/src/assets/data/icons/actions.ts +427 -0
- package/src/assets/data/icons/code.ts +10 -0
- package/src/assets/data/icons/commuticate.ts +190 -0
- package/src/assets/data/icons/currency.ts +46 -0
- package/src/assets/data/icons/devices.ts +128 -0
- package/src/assets/data/icons/edit.ts +165 -0
- package/src/assets/data/icons/file.ts +104 -0
- package/src/assets/data/icons/math.ts +53 -0
- package/src/assets/data/icons/message.ts +75 -0
- package/src/assets/data/icons/navigate.ts +181 -0
- package/src/assets/data/icons/other.ts +333 -0
- package/src/assets/data/icons.ts +58 -0
- package/src/assets/imgs/logo/logo.png +0 -0
- package/src/assets/locales/en_US.json +3 -0
- package/src/assets/locales/zh_CN.json +3 -0
- package/src/assets/style/index.less +10 -0
- package/src/assets/style/reset.less +20 -0
- package/src/components/container/index.less +85 -0
- package/src/components/container/index.ts +8 -0
- package/src/components/container/src/bar.ts +107 -0
- package/src/components/container/src/lazy-container.vue +9 -0
- package/src/components/container/src/scroll-bar.vue +117 -0
- package/src/components/container/src/scroll-container.vue +61 -0
- package/src/components/curd/index.ts +5 -0
- package/src/components/curd/src/components/dialog.vue +65 -0
- package/src/components/curd/src/components/props.ts +32 -0
- package/src/components/curd/src/hooks/useCurd.tsx +72 -0
- package/src/components/curd/src/types/curd.type.ts +29 -0
- package/src/components/excel/index.ts +6 -0
- package/src/components/excel/src/export2Excel.ts +44 -0
- package/src/components/forms/index.ts +12 -0
- package/src/components/forms/src/componentMap.ts +44 -0
- package/src/components/forms/src/components/formButton.vue +150 -0
- package/src/components/forms/src/components/formIcon.vue +50 -0
- package/src/components/forms/src/components/formItem.vue +407 -0
- package/src/components/forms/src/components/radioButton.vue +58 -0
- package/src/components/forms/src/const/form.const.ts +7 -0
- package/src/components/forms/src/hooks/helper.ts +70 -0
- package/src/components/forms/src/hooks/useForm.ts +130 -0
- package/src/components/forms/src/hooks/useFormActions.ts +63 -0
- package/src/components/forms/src/hooks/useFormEvents.ts +247 -0
- package/src/components/forms/src/hooks/useFormValue.ts +49 -0
- package/src/components/forms/src/hooks/useFormValues.ts +131 -0
- package/src/components/forms/src/hooks/useLabelWidth.ts +57 -0
- package/src/components/forms/src/index.less +82 -0
- package/src/components/forms/src/index.vue +306 -0
- package/src/components/forms/src/prop.ts +80 -0
- package/src/components/forms/src/types/form.type.ts +269 -0
- package/src/components/icons/index.ts +7 -0
- package/src/components/icons/src/index.less +96 -0
- package/src/components/icons/src/pick-icon.vue +117 -0
- package/src/components/icons/src/svg-icon.vue +117 -0
- package/src/components/iframe/index.ts +5 -0
- package/src/components/iframe/src/index.less +3 -0
- package/src/components/iframe/src/index.vue +38 -0
- package/src/components/index.ts +46 -0
- package/src/components/modal/index.ts +8 -0
- package/src/components/modal/src/components/close-icon.vue +47 -0
- package/src/components/modal/src/components/modal-wrap.vue +118 -0
- package/src/components/modal/src/components/modal.tsx +30 -0
- package/src/components/modal/src/components/modalFooter.vue +38 -0
- package/src/components/modal/src/hooks/useDrag.ts +107 -0
- package/src/components/modal/src/hooks/useFullScreen.ts +27 -0
- package/src/components/modal/src/hooks/useModal.ts +177 -0
- package/src/components/modal/src/index.less +60 -0
- package/src/components/modal/src/index.vue +173 -0
- package/src/components/modal/src/props.ts +43 -0
- package/src/components/modal/src/types/modal.type.ts +27 -0
- package/src/components/router/base-router.vue +11 -0
- package/src/components/router/index.ts +3 -0
- package/src/components/source/index.ts +1 -0
- package/src/components/source/src/hooks/useFetch.ts +70 -0
- package/src/components/source/src/hooks/usePage.ts +3 -0
- package/src/components/source/src/hooks/useSource.ts +178 -0
- package/src/components/source/src/index.ts +5 -0
- package/src/components/source/src/types/source.type.ts +68 -0
- package/src/components/source/src/types/table.type.ts +8 -0
- package/src/components/table/index.ts +7 -0
- package/src/components/table/src/components/TableActions.vue +108 -0
- package/src/components/table/src/components/TableHeader.vue +77 -0
- package/src/components/table/src/components/TableRender.vue +76 -0
- package/src/components/table/src/components/setting/Column.vue +355 -0
- package/src/components/table/src/components/setting/Download.vue +55 -0
- package/src/components/table/src/components/setting/Fullscreen.vue +43 -0
- package/src/components/table/src/components/setting/Size.vue +42 -0
- package/src/components/table/src/components/setting/index.vue +64 -0
- package/src/components/table/src/const.ts +13 -0
- package/src/components/table/src/hooks/useColumns.ts +319 -0
- package/src/components/table/src/hooks/useCustomRow.ts +0 -0
- package/src/components/table/src/hooks/useDataSource.ts +99 -0
- package/src/components/table/src/hooks/useLoading.ts +29 -0
- package/src/components/table/src/hooks/usePagination.ts +76 -0
- package/src/components/table/src/hooks/useRowSelection.ts +146 -0
- package/src/components/table/src/hooks/useRows.ts +30 -0
- package/src/components/table/src/hooks/useTable.ts +77 -0
- package/src/components/table/src/hooks/useTableHeader.ts +48 -0
- package/src/components/table/src/hooks/useTableInstance.ts +29 -0
- package/src/components/table/src/hooks/useTableScroll.ts +227 -0
- package/src/components/table/src/index.less +162 -0
- package/src/components/table/src/index.vue +198 -0
- package/src/components/table/src/props.ts +152 -0
- package/src/components/table/src/types/table.type.ts +133 -0
- package/src/components/table/src/types/tableHeader.type.ts +27 -0
- package/src/components/type.ts +0 -0
- package/src/directives/icon.ts +36 -0
- package/src/directives/index.ts +26 -0
- package/src/directives/permission.ts +21 -0
- package/src/global.d.ts +8 -0
- package/src/index.ts +4 -0
- package/src/theme/content/index.vue +37 -0
- package/src/theme/feature/back-top.vue +11 -0
- package/src/theme/feature/index.vue +7 -0
- package/src/theme/footer/index.less +16 -0
- package/src/theme/footer/index.vue +24 -0
- package/src/theme/header/components/bread-crumb.vue +26 -0
- package/src/theme/header/components/fullscreen.vue +14 -0
- package/src/theme/header/components/handler.ts +81 -0
- package/src/theme/header/components/index.ts +21 -0
- package/src/theme/header/components/lang-picker.vue +36 -0
- package/src/theme/header/components/logo.vue +33 -0
- package/src/theme/header/components/menu-search.vue +62 -0
- package/src/theme/header/components/notify.vue +23 -0
- package/src/theme/header/components/setting-theme.vue +123 -0
- package/src/theme/header/components/theme-drawer/enum.ts +12 -0
- package/src/theme/header/components/theme-drawer/feature.vue +75 -0
- package/src/theme/header/components/theme-drawer/index.ts +7 -0
- package/src/theme/header/components/theme-drawer/menu-type.vue +40 -0
- package/src/theme/header/components/theme-drawer/select-item.vue +46 -0
- package/src/theme/header/components/theme-drawer/switch-item.vue +39 -0
- package/src/theme/header/components/theme-drawer/theme-color.vue +26 -0
- package/src/theme/header/components/trigger.vue +14 -0
- package/src/theme/header/components/user-info.vue +43 -0
- package/src/theme/header/const/index.ts +40 -0
- package/src/theme/header/helper/menu-tree.ts +67 -0
- package/src/theme/header/index.less +438 -0
- package/src/theme/header/index.ts +0 -0
- package/src/theme/header/index.vue +96 -0
- package/src/theme/header/multiple-header.vue +67 -0
- package/src/theme/header/set-theme.less +68 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/sider/components/basic-menu/basic-menu-item.vue +14 -0
- package/src/theme/sider/components/basic-menu/basic-menu.vue +122 -0
- package/src/theme/sider/components/basic-menu/basic-sub-menu-item.vue +46 -0
- package/src/theme/sider/components/basic-menu/menu-item-content.vue +13 -0
- package/src/theme/sider/components/drag-bar.vue +26 -0
- package/src/theme/sider/components/layout-menu.vue +132 -0
- package/src/theme/sider/components/props.ts +97 -0
- package/src/theme/sider/components/sider-trigger.vue +24 -0
- package/src/theme/sider/helper/sider.ts +52 -0
- package/src/theme/sider/helper/split-menu.ts +147 -0
- package/src/theme/sider/hooks/useDragLine.ts +86 -0
- package/src/theme/sider/hooks/useOpenKeys.ts +57 -0
- package/src/theme/sider/index.less +203 -0
- package/src/theme/sider/index.vue +88 -0
- package/src/theme/tabs/components/TabContent.vue +37 -0
- package/src/theme/tabs/components/TabRedo.vue +18 -0
- package/src/theme/tabs/hooks/useMultifyTabs.ts +96 -0
- package/src/theme/tabs/hooks/useTabDropdown.ts +89 -0
- package/src/theme/tabs/index.less +165 -0
- package/src/theme/tabs/index.vue +98 -0
- package/src/theme/tabs/types/tabs.type.ts +8 -0
- package/src/theme/theme.less +66 -0
- package/src/theme/theme.vue +89 -0
- package/src/theme/transition.less +99 -0
- package/tsconfig.json +28 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
import { Recordable } from "@dt-frames/core";
|
|
3
|
+
import { FormSchema, FormProps, FormActionType } from '../types/form.type';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
schema: {
|
|
6
|
+
type: PropType<FormSchema>;
|
|
7
|
+
};
|
|
8
|
+
formProps: {
|
|
9
|
+
type: PropType<FormProps>;
|
|
10
|
+
default: () => {};
|
|
11
|
+
};
|
|
12
|
+
defaultValues: {
|
|
13
|
+
type: PropType<Recordable<any>>;
|
|
14
|
+
default: () => {};
|
|
15
|
+
};
|
|
16
|
+
formModel: {
|
|
17
|
+
type: PropType<Recordable<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
setFormModel: {
|
|
21
|
+
type: PropType<(key: string, value: any) => void>;
|
|
22
|
+
};
|
|
23
|
+
formActionType: {
|
|
24
|
+
type: PropType<FormActionType>;
|
|
25
|
+
};
|
|
26
|
+
style: {
|
|
27
|
+
type: PropType<Recordable<any>>;
|
|
28
|
+
};
|
|
29
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
schema: {
|
|
31
|
+
type: PropType<FormSchema>;
|
|
32
|
+
};
|
|
33
|
+
formProps: {
|
|
34
|
+
type: PropType<FormProps>;
|
|
35
|
+
default: () => {};
|
|
36
|
+
};
|
|
37
|
+
defaultValues: {
|
|
38
|
+
type: PropType<Recordable<any>>;
|
|
39
|
+
default: () => {};
|
|
40
|
+
};
|
|
41
|
+
formModel: {
|
|
42
|
+
type: PropType<Recordable<any>>;
|
|
43
|
+
default: () => {};
|
|
44
|
+
};
|
|
45
|
+
setFormModel: {
|
|
46
|
+
type: PropType<(key: string, value: any) => void>;
|
|
47
|
+
};
|
|
48
|
+
formActionType: {
|
|
49
|
+
type: PropType<FormActionType>;
|
|
50
|
+
};
|
|
51
|
+
style: {
|
|
52
|
+
type: PropType<Recordable<any>>;
|
|
53
|
+
};
|
|
54
|
+
}>>, {
|
|
55
|
+
formProps: {};
|
|
56
|
+
defaultValues: {};
|
|
57
|
+
formModel: {};
|
|
58
|
+
}>;
|
|
59
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
declare type OptionsItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number | boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare type RadioItem = string | OptionsItem;
|
|
8
|
+
declare const _default: import("vue").DefineComponent<{
|
|
9
|
+
value: {
|
|
10
|
+
type: PropType<string | number | boolean>;
|
|
11
|
+
};
|
|
12
|
+
options: {
|
|
13
|
+
type: PropType<RadioItem[]>;
|
|
14
|
+
default: () => any[];
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
attrs: {
|
|
18
|
+
[x: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
getOptions: import("vue").ComputedRef<OptionsItem[]>;
|
|
21
|
+
state: any;
|
|
22
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
value: {
|
|
24
|
+
type: PropType<string | number | boolean>;
|
|
25
|
+
};
|
|
26
|
+
options: {
|
|
27
|
+
type: PropType<RadioItem[]>;
|
|
28
|
+
default: () => any[];
|
|
29
|
+
};
|
|
30
|
+
}>>, {
|
|
31
|
+
options: RadioItem[];
|
|
32
|
+
}>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentType } from "../types/form.type";
|
|
2
|
+
import type { ValidationRule } from 'ant-design-vue/lib/form/Form';
|
|
3
|
+
export declare function createPlaceholder(component: ComponentType): "" | "请输入" | "请选择" | "请设置图标";
|
|
4
|
+
export declare function setComponentRuleType(rule: ValidationRule, component: ComponentType, valueFormat: string): void;
|
|
5
|
+
export declare function handleInputNumberValue(component?: ComponentType, val?: any): any;
|
|
6
|
+
export declare const datePickerType: string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FormActionType, FormProps } from "../types/form.type";
|
|
2
|
+
declare type RegisterFn = (formInstance: FormActionType) => void;
|
|
3
|
+
declare type UseFormReturnType = [RegisterFn, FormActionType];
|
|
4
|
+
export declare function useForm(props: FormProps): UseFormReturnType;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { ComputedRef, Ref } from "vue";
|
|
3
|
+
import { ButtonProps, FormProps, FormSchema } from "../types/form.type";
|
|
4
|
+
declare type FormOpt = {
|
|
5
|
+
updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
|
|
6
|
+
getProps: ComputedRef<FormProps>;
|
|
7
|
+
getSchema: ComputedRef<FormSchema[]>;
|
|
8
|
+
defaultValue: Ref<Recordable>;
|
|
9
|
+
getFormValues: () => Recordable;
|
|
10
|
+
setFormValues: (values: Recordable) => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
export declare function useFormActions(opt: FormOpt): ((params: boolean | ButtonProps) => void)[];
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { ComputedRef, Ref } from "vue";
|
|
3
|
+
import { FormActionType, FormProps, FormSchema } from "../types/form.type";
|
|
4
|
+
declare type FormEventsType = {
|
|
5
|
+
emit: (event: string, ...args: any[]) => void;
|
|
6
|
+
getProps: ComputedRef<FormProps>;
|
|
7
|
+
getSchema: ComputedRef<FormSchema[]>;
|
|
8
|
+
formModel: Recordable;
|
|
9
|
+
defaultValue: Ref<Recordable>;
|
|
10
|
+
formElRef: Ref<FormActionType>;
|
|
11
|
+
schemaRef: Ref<FormSchema[]>;
|
|
12
|
+
handleFormValues: Function;
|
|
13
|
+
};
|
|
14
|
+
export declare function useFormEvents({ emit, getSchema, formModel, defaultValue, formElRef, schemaRef, handleFormValues }: FormEventsType): {
|
|
15
|
+
updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
|
|
16
|
+
resetSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
|
|
17
|
+
clearValidate: (name?: string | string[]) => Promise<void>;
|
|
18
|
+
resetForms: () => void;
|
|
19
|
+
removeFormByName: (names: string | string[]) => void;
|
|
20
|
+
setFormValues: (values: Recordable | null) => Promise<void>;
|
|
21
|
+
appendFormItems: (schema: FormSchema, prefixName?: string, first?: boolean) => void;
|
|
22
|
+
getFormValues: () => any;
|
|
23
|
+
validate: (nameList: (string | number)[]) => Promise<any>;
|
|
24
|
+
validateFields: (nameList: (string | number)[]) => Promise<any>;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { ComputedRef, Ref } from "vue";
|
|
3
|
+
import { FormProps, FormSchema } from "../types/form.type";
|
|
4
|
+
declare type FormValueOptions = {
|
|
5
|
+
getProps: ComputedRef<FormProps>;
|
|
6
|
+
defaultValue: Ref<any>;
|
|
7
|
+
getSchema: ComputedRef<FormSchema[]>;
|
|
8
|
+
formModel: Recordable;
|
|
9
|
+
};
|
|
10
|
+
export declare function useFormValues({ defaultValue, getSchema, formModel, getProps }: FormValueOptions): {
|
|
11
|
+
handleFormValues: (values: Recordable) => Recordable<any>;
|
|
12
|
+
initDefault: () => void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
import { FormProps, FormSchema } from "../types/form.type";
|
|
3
|
+
export declare function useLabelWidth(schemaItemRef: Ref<FormSchema>, propsRef: Ref<FormProps>): import("vue").ComputedRef<{
|
|
4
|
+
labelCol: {
|
|
5
|
+
style: {
|
|
6
|
+
textAlign: string;
|
|
7
|
+
};
|
|
8
|
+
span?: string | number;
|
|
9
|
+
order?: string | number;
|
|
10
|
+
offset?: string | number;
|
|
11
|
+
md?: string | number;
|
|
12
|
+
xl?: string | number;
|
|
13
|
+
xxl?: string | number;
|
|
14
|
+
};
|
|
15
|
+
wrapperCol: Partial<import("../types/form.type").ColEx>;
|
|
16
|
+
} | {
|
|
17
|
+
labelCol: {
|
|
18
|
+
style: any;
|
|
19
|
+
span?: string | number;
|
|
20
|
+
order?: string | number;
|
|
21
|
+
offset?: string | number;
|
|
22
|
+
md?: string | number;
|
|
23
|
+
xl?: string | number;
|
|
24
|
+
xxl?: string | number;
|
|
25
|
+
};
|
|
26
|
+
wrapperCol: {
|
|
27
|
+
style: any;
|
|
28
|
+
span?: string | number;
|
|
29
|
+
order?: string | number;
|
|
30
|
+
offset?: string | number;
|
|
31
|
+
md?: string | number;
|
|
32
|
+
xl?: string | number;
|
|
33
|
+
xxl?: string | number;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Recordable } from '@dt-frames/core';
|
|
3
|
+
import { ButtonProps, FormActionType, FormProps, FormSchema } from './types/form.type';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
mode: {
|
|
6
|
+
type: import("vue").PropType<"search" | "dialog">;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
autoFetch: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
model: {
|
|
14
|
+
type: import("vue").PropType<Recordable<any>>;
|
|
15
|
+
default: {};
|
|
16
|
+
};
|
|
17
|
+
labelWidth: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
String: StringConstructor;
|
|
20
|
+
default: number;
|
|
21
|
+
};
|
|
22
|
+
schemas: {
|
|
23
|
+
type: import("vue").PropType<FormSchema[]>;
|
|
24
|
+
default: () => any[];
|
|
25
|
+
};
|
|
26
|
+
compact: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: any;
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
type: import("vue").PropType<"small" | "default" | "large">;
|
|
32
|
+
};
|
|
33
|
+
formActions: {
|
|
34
|
+
type: import("vue").PropType<FormActionType>;
|
|
35
|
+
};
|
|
36
|
+
labelAlign: {
|
|
37
|
+
type: import("vue").PropType<"left" | "right">;
|
|
38
|
+
};
|
|
39
|
+
rowProps: import("vue").PropType<Partial<import("vue").ExtractPropTypes<{
|
|
40
|
+
align: import("vue").PropType<"top" | "bottom" | "middle" | "stretch">;
|
|
41
|
+
justify: import("vue").PropType<"space-around" | "space-between" | "center" | "end" | "start">;
|
|
42
|
+
prefixCls: StringConstructor;
|
|
43
|
+
gutter: {
|
|
44
|
+
type: import("vue").PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
|
|
45
|
+
default: import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter];
|
|
46
|
+
};
|
|
47
|
+
wrap: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: any;
|
|
50
|
+
};
|
|
51
|
+
}>>>;
|
|
52
|
+
colProps: import("vue").PropType<import("./types/form.type").ColEx>;
|
|
53
|
+
}, {
|
|
54
|
+
getFormBindValue: import("vue").ComputedRef<Recordable<any>>;
|
|
55
|
+
getFormClass: import("vue").ComputedRef<(string | {
|
|
56
|
+
'basic-form--compact': boolean;
|
|
57
|
+
'basic-form--search': boolean;
|
|
58
|
+
})[]>;
|
|
59
|
+
formModel: {
|
|
60
|
+
[x: string]: any;
|
|
61
|
+
};
|
|
62
|
+
getLayout: import("vue").ComputedRef<"vertical" | "horizontal" | "inline">;
|
|
63
|
+
getProps: import("vue").ComputedRef<FormProps>;
|
|
64
|
+
getSchema: import("vue").ComputedRef<FormSchema[]>;
|
|
65
|
+
defaultValue: Ref<{
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
}>;
|
|
68
|
+
formActionMethods: FormActionType;
|
|
69
|
+
formElRef: any;
|
|
70
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
71
|
+
mode: {
|
|
72
|
+
type: import("vue").PropType<"search" | "dialog">;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
autoFetch: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
model: {
|
|
80
|
+
type: import("vue").PropType<Recordable<any>>;
|
|
81
|
+
default: {};
|
|
82
|
+
};
|
|
83
|
+
labelWidth: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
String: StringConstructor;
|
|
86
|
+
default: number;
|
|
87
|
+
};
|
|
88
|
+
schemas: {
|
|
89
|
+
type: import("vue").PropType<FormSchema[]>;
|
|
90
|
+
default: () => any[];
|
|
91
|
+
};
|
|
92
|
+
compact: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
default: any;
|
|
95
|
+
};
|
|
96
|
+
size: {
|
|
97
|
+
type: import("vue").PropType<"small" | "default" | "large">;
|
|
98
|
+
};
|
|
99
|
+
formActions: {
|
|
100
|
+
type: import("vue").PropType<FormActionType>;
|
|
101
|
+
};
|
|
102
|
+
labelAlign: {
|
|
103
|
+
type: import("vue").PropType<"left" | "right">;
|
|
104
|
+
};
|
|
105
|
+
rowProps: import("vue").PropType<Partial<import("vue").ExtractPropTypes<{
|
|
106
|
+
align: import("vue").PropType<"top" | "bottom" | "middle" | "stretch">;
|
|
107
|
+
justify: import("vue").PropType<"space-around" | "space-between" | "center" | "end" | "start">;
|
|
108
|
+
prefixCls: StringConstructor;
|
|
109
|
+
gutter: {
|
|
110
|
+
type: import("vue").PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
|
|
111
|
+
default: import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter];
|
|
112
|
+
};
|
|
113
|
+
wrap: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: any;
|
|
116
|
+
};
|
|
117
|
+
}>>>;
|
|
118
|
+
colProps: import("vue").PropType<import("./types/form.type").ColEx>;
|
|
119
|
+
}>> & {
|
|
120
|
+
onRegister?: (...args: any[]) => any;
|
|
121
|
+
onReset?: (...args: any[]) => any;
|
|
122
|
+
}>>;
|
|
123
|
+
setFormModel: (key: string, value: any) => void;
|
|
124
|
+
handleMethod: (params: boolean | ButtonProps) => void;
|
|
125
|
+
getActionsProps: import("vue").ComputedRef<Recordable<any>>;
|
|
126
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("register" | "reset")[], "register" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
127
|
+
mode: {
|
|
128
|
+
type: import("vue").PropType<"search" | "dialog">;
|
|
129
|
+
default: string;
|
|
130
|
+
};
|
|
131
|
+
autoFetch: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: boolean;
|
|
134
|
+
};
|
|
135
|
+
model: {
|
|
136
|
+
type: import("vue").PropType<Recordable<any>>;
|
|
137
|
+
default: {};
|
|
138
|
+
};
|
|
139
|
+
labelWidth: {
|
|
140
|
+
type: NumberConstructor;
|
|
141
|
+
String: StringConstructor;
|
|
142
|
+
default: number;
|
|
143
|
+
};
|
|
144
|
+
schemas: {
|
|
145
|
+
type: import("vue").PropType<FormSchema[]>;
|
|
146
|
+
default: () => any[];
|
|
147
|
+
};
|
|
148
|
+
compact: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: any;
|
|
151
|
+
};
|
|
152
|
+
size: {
|
|
153
|
+
type: import("vue").PropType<"small" | "default" | "large">;
|
|
154
|
+
};
|
|
155
|
+
formActions: {
|
|
156
|
+
type: import("vue").PropType<FormActionType>;
|
|
157
|
+
};
|
|
158
|
+
labelAlign: {
|
|
159
|
+
type: import("vue").PropType<"left" | "right">;
|
|
160
|
+
};
|
|
161
|
+
rowProps: import("vue").PropType<Partial<import("vue").ExtractPropTypes<{
|
|
162
|
+
align: import("vue").PropType<"top" | "bottom" | "middle" | "stretch">;
|
|
163
|
+
justify: import("vue").PropType<"space-around" | "space-between" | "center" | "end" | "start">;
|
|
164
|
+
prefixCls: StringConstructor;
|
|
165
|
+
gutter: {
|
|
166
|
+
type: import("vue").PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
|
|
167
|
+
default: import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter];
|
|
168
|
+
};
|
|
169
|
+
wrap: {
|
|
170
|
+
type: BooleanConstructor;
|
|
171
|
+
default: any;
|
|
172
|
+
};
|
|
173
|
+
}>>>;
|
|
174
|
+
colProps: import("vue").PropType<import("./types/form.type").ColEx>;
|
|
175
|
+
}>> & {
|
|
176
|
+
onRegister?: (...args: any[]) => any;
|
|
177
|
+
onReset?: (...args: any[]) => any;
|
|
178
|
+
}, {
|
|
179
|
+
mode: "search" | "dialog";
|
|
180
|
+
model: {};
|
|
181
|
+
labelWidth: number;
|
|
182
|
+
autoFetch: boolean;
|
|
183
|
+
schemas: FormSchema[];
|
|
184
|
+
compact: boolean;
|
|
185
|
+
}>;
|
|
186
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
import { ColEx, FormActionType, FormProps, FormSchema } from "./types/form.type";
|
|
4
|
+
export declare const BasicProps: {
|
|
5
|
+
mode: {
|
|
6
|
+
type: PropType<"search" | "dialog">;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
autoFetch: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
model: {
|
|
14
|
+
type: PropType<Recordable<any>>;
|
|
15
|
+
default: {};
|
|
16
|
+
};
|
|
17
|
+
labelWidth: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
String: StringConstructor;
|
|
20
|
+
default: number;
|
|
21
|
+
};
|
|
22
|
+
schemas: {
|
|
23
|
+
type: PropType<FormSchema[]>;
|
|
24
|
+
default: () => any[];
|
|
25
|
+
};
|
|
26
|
+
compact: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: any;
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
type: PropType<"small" | "default" | "large">;
|
|
32
|
+
};
|
|
33
|
+
formActions: {
|
|
34
|
+
type: PropType<FormActionType>;
|
|
35
|
+
};
|
|
36
|
+
labelAlign: {
|
|
37
|
+
type: PropType<"left" | "right">;
|
|
38
|
+
};
|
|
39
|
+
rowProps: PropType<Partial<import("vue").ExtractPropTypes<{
|
|
40
|
+
align: PropType<"top" | "bottom" | "middle" | "stretch">;
|
|
41
|
+
justify: PropType<"space-around" | "space-between" | "center" | "end" | "start">;
|
|
42
|
+
prefixCls: StringConstructor;
|
|
43
|
+
gutter: {
|
|
44
|
+
type: PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
|
|
45
|
+
default: import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter];
|
|
46
|
+
};
|
|
47
|
+
wrap: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: any;
|
|
50
|
+
};
|
|
51
|
+
}>>>;
|
|
52
|
+
colProps: PropType<ColEx>;
|
|
53
|
+
};
|
|
54
|
+
export declare const FormItemProps: {
|
|
55
|
+
schema: {
|
|
56
|
+
type: PropType<FormSchema>;
|
|
57
|
+
};
|
|
58
|
+
formProps: {
|
|
59
|
+
type: PropType<FormProps>;
|
|
60
|
+
default: () => {};
|
|
61
|
+
};
|
|
62
|
+
defaultValues: {
|
|
63
|
+
type: PropType<Recordable<any>>;
|
|
64
|
+
default: () => {};
|
|
65
|
+
};
|
|
66
|
+
formModel: {
|
|
67
|
+
type: PropType<Recordable<any>>;
|
|
68
|
+
default: () => {};
|
|
69
|
+
};
|
|
70
|
+
setFormModel: {
|
|
71
|
+
type: PropType<(key: string, value: any) => void>;
|
|
72
|
+
};
|
|
73
|
+
formActionType: {
|
|
74
|
+
type: PropType<FormActionType>;
|
|
75
|
+
};
|
|
76
|
+
style: {
|
|
77
|
+
type: PropType<Recordable<any>>;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { VNode } from "vue";
|
|
3
|
+
import { RuleObject } from 'ant-design-vue/lib/form/interface';
|
|
4
|
+
import type { RowProps } from 'ant-design-vue/lib/grid/Row';
|
|
5
|
+
export declare type Rule = RuleObject & {
|
|
6
|
+
trigger?: 'blur' | 'change' | ['change', 'blur'];
|
|
7
|
+
};
|
|
8
|
+
export declare type ButtonFlag = 'OK' | 'CANCEL';
|
|
9
|
+
export declare type FormCallBackParams = {
|
|
10
|
+
schema: Omit<FormSchema, 'props'>;
|
|
11
|
+
values: Recordable;
|
|
12
|
+
model: Recordable;
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
export declare type ComponentType = 'Input' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'InputCountDown' | 'Select' | 'TreeSelect' | 'ApiTree' | 'ApiTreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'IconPicker' | 'Render' | 'Slider' | 'Rate' | 'Divider' | 'Icon';
|
|
16
|
+
export declare type ColEx = {
|
|
17
|
+
style?: any;
|
|
18
|
+
span?: number | string;
|
|
19
|
+
order?: number | string;
|
|
20
|
+
offset?: number | string;
|
|
21
|
+
md?: number | string;
|
|
22
|
+
xl?: number | string;
|
|
23
|
+
xxl?: number | string;
|
|
24
|
+
};
|
|
25
|
+
export declare type ToolTipProps = {
|
|
26
|
+
color: string;
|
|
27
|
+
placement: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
28
|
+
};
|
|
29
|
+
export declare type ButtonProps = {
|
|
30
|
+
name?: string;
|
|
31
|
+
color?: 'error' | 'warning' | 'success' | '';
|
|
32
|
+
type?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default' | undefined;
|
|
33
|
+
class?: string;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
show?: boolean;
|
|
36
|
+
preIcon?: string;
|
|
37
|
+
postIcon?: string;
|
|
38
|
+
auth?: string;
|
|
39
|
+
flag?: ButtonFlag;
|
|
40
|
+
loading?: boolean;
|
|
41
|
+
onClick?: (...args: any[]) => any;
|
|
42
|
+
};
|
|
43
|
+
export declare type FormProps = {
|
|
44
|
+
mode?: 'search' | 'dialog';
|
|
45
|
+
autoFetch?: boolean;
|
|
46
|
+
layout?: 'vertical' | 'inline' | 'horizontal';
|
|
47
|
+
model?: Recordable;
|
|
48
|
+
labelWidth?: number | string;
|
|
49
|
+
labelAlign?: 'left' | 'right';
|
|
50
|
+
labelCol?: Partial<ColEx>;
|
|
51
|
+
wrapperCol?: Partial<ColEx>;
|
|
52
|
+
rowProps?: RowProps;
|
|
53
|
+
colProps?: Partial<ColEx>;
|
|
54
|
+
schemas?: FormSchema[];
|
|
55
|
+
size?: 'default' | 'small' | 'large';
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
autoSubmitOnEnter?: boolean;
|
|
58
|
+
alwaysShowLines?: number;
|
|
59
|
+
compact?: boolean;
|
|
60
|
+
onSearch?: Function;
|
|
61
|
+
onReset?: Function;
|
|
62
|
+
minShowColumn?: number;
|
|
63
|
+
showAdvancedButton?: boolean;
|
|
64
|
+
enterToSearch?: boolean;
|
|
65
|
+
buttons?: ButtonProps[];
|
|
66
|
+
loading?: Recordable;
|
|
67
|
+
style?: Recordable;
|
|
68
|
+
};
|
|
69
|
+
export declare type FormSchema = {
|
|
70
|
+
name: string | string[];
|
|
71
|
+
changeEvent?: string;
|
|
72
|
+
valueField?: string;
|
|
73
|
+
label?: string | VNode;
|
|
74
|
+
subLabel?: string;
|
|
75
|
+
labelWidth?: string | number;
|
|
76
|
+
labelAlign?: 'left' | 'right';
|
|
77
|
+
toolTip?: string | ((parms: FormCallBackParams) => string | string[]);
|
|
78
|
+
toolTipProps?: ToolTipProps;
|
|
79
|
+
component: ComponentType;
|
|
80
|
+
props?: ((opt: {
|
|
81
|
+
schema?: FormSchema;
|
|
82
|
+
formActions?: any;
|
|
83
|
+
formActionType?: FormActionType;
|
|
84
|
+
formModel?: Recordable;
|
|
85
|
+
}) => Recordable) | object;
|
|
86
|
+
required?: boolean | ((parms: FormCallBackParams) => boolean);
|
|
87
|
+
suffix?: string | number | ((parms: FormCallBackParams) => boolean);
|
|
88
|
+
rules?: Rule[];
|
|
89
|
+
rulesMessageJoinLabel?: boolean;
|
|
90
|
+
defaultValue?: any;
|
|
91
|
+
span?: number;
|
|
92
|
+
show?: boolean | ((parms: FormCallBackParams) => boolean);
|
|
93
|
+
render?: (parms: FormCallBackParams) => VNode | VNode[] | string;
|
|
94
|
+
renderCol?: (parms: FormCallBackParams) => VNode | VNode[] | string;
|
|
95
|
+
colProps?: Partial<ColEx>;
|
|
96
|
+
renderComponent?: ((parms: FormCallBackParams) => Recordable) | VNode | VNode[] | string;
|
|
97
|
+
slot?: string;
|
|
98
|
+
colSlot?: string;
|
|
99
|
+
dynamicDisabled?: boolean | ((parms: FormCallBackParams) => boolean);
|
|
100
|
+
dynamicRules?: (parms: FormCallBackParams) => Rule[];
|
|
101
|
+
colon?: boolean;
|
|
102
|
+
labelCol?: Partial<ColEx>;
|
|
103
|
+
wrapperCol?: Partial<ColEx>;
|
|
104
|
+
isAdvanced?: boolean;
|
|
105
|
+
};
|
|
106
|
+
export declare type FormActionType = {
|
|
107
|
+
setProps: (props: FormProps) => Promise<void>;
|
|
108
|
+
updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
|
|
109
|
+
resetSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
|
|
110
|
+
clearValidate: (name?: string | string[]) => Promise<void>;
|
|
111
|
+
resetForms: (data: Partial<FormSchema> | Partial<FormSchema>[]) => void;
|
|
112
|
+
removeFormByName: (name: string | string[]) => void;
|
|
113
|
+
setFormValues: (values: Recordable) => Promise<void>;
|
|
114
|
+
appendFormItems: (schema: FormSchema, prefixField: string | undefined, first?: boolean | undefined) => void;
|
|
115
|
+
validate: (nameList?: (string | number)[]) => Promise<any>;
|
|
116
|
+
validateFields: (nameList?: (string | number)[]) => Promise<any>;
|
|
117
|
+
getFormValues: () => Recordable;
|
|
118
|
+
};
|
|
119
|
+
export declare type AdvanceState = {
|
|
120
|
+
isAdvanced: boolean;
|
|
121
|
+
hideAdvanceBtn: boolean;
|
|
122
|
+
isLoad: boolean;
|
|
123
|
+
actionSpan: number;
|
|
124
|
+
};
|