vap1 0.0.1
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/basetype.d.ts +62 -0
- package/basetype.js +2 -0
- package/components/Box/Box.d.ts +118 -0
- package/components/Box/Box.js +150 -0
- package/components/Box/SelectBar.d.ts +90 -0
- package/components/Box/SelectBar.js +93 -0
- package/components/Box/_register.d.ts +49 -0
- package/components/Box/_register.js +29 -0
- package/components/Box/index.d.ts +9 -0
- package/components/Box/index.js +6 -0
- package/components/Lists/SList.d.ts +58 -0
- package/components/Lists/SList.js +167 -0
- package/components/SearchBar/ActionButtons.d.ts +49 -0
- package/components/SearchBar/ActionButtons.js +96 -0
- package/components/SearchBar/ByField.d.ts +3 -0
- package/components/SearchBar/ByField.js +193 -0
- package/components/SearchBar/ByKeyword.d.ts +3 -0
- package/components/SearchBar/ByKeyword.js +34 -0
- package/components/SearchBar/SearchField.d.ts +15 -0
- package/components/SearchBar/SearchField.js +25 -0
- package/components/SearchBar/SearchTags.d.ts +2 -0
- package/components/SearchBar/SearchTags.js +18 -0
- package/components/SearchBar/_FieldType.d.ts +8 -0
- package/components/SearchBar/_FieldType.js +45 -0
- package/components/SearchBar/_register.d.ts +65 -0
- package/components/SearchBar/_register.js +29 -0
- package/components/SearchBar/index.d.ts +134 -0
- package/components/SearchBar/index.js +33 -0
- package/components/Tables/ApiTable.d.ts +18 -0
- package/components/Tables/ApiTable.js +48 -0
- package/components/Tables/ApiTableModal.d.ts +22 -0
- package/components/Tables/ApiTableModal.js +73 -0
- package/components/Tables/Components/ActionBar.d.ts +56 -0
- package/components/Tables/Components/ActionBar.js +100 -0
- package/components/Tables/Components/Actions.d.ts +47 -0
- package/components/Tables/Components/Actions.js +91 -0
- package/components/Tables/Components/Summary.d.ts +11 -0
- package/components/Tables/Components/Summary.js +11 -0
- package/components/Tables/Components/index.d.ts +17 -0
- package/components/Tables/Components/index.js +19 -0
- package/components/Tables/STable.d.ts +5 -0
- package/components/Tables/STable.js +37 -0
- package/components/Tables/TopTable.d.ts +24 -0
- package/components/Tables/TopTable.js +157 -0
- package/components/Tables/TopTableModal.d.ts +5 -0
- package/components/Tables/TopTableModal.js +20 -0
- package/components/Tables/Util.d.ts +3 -0
- package/components/Tables/Util.js +41 -0
- package/components/Tables/VTable.d.ts +11 -0
- package/components/Tables/VTable.js +237 -0
- package/components/Tables/index.d.ts +81 -0
- package/components/Tables/index.js +20 -0
- package/components/TreeSelect/BaseTreeSelect.d.ts +33 -0
- package/components/TreeSelect/BaseTreeSelect.js +190 -0
- package/components/TreeSelect/DTreeSelect.d.ts +24 -0
- package/components/TreeSelect/DTreeSelect.js +66 -0
- package/components/TreeSelect/FTreeSelect.d.ts +11 -0
- package/components/TreeSelect/FTreeSelect.js +39 -0
- package/components/TreeSelect/STreeSelect.d.ts +14 -0
- package/components/TreeSelect/STreeSelect.js +52 -0
- package/components/TreeSelect/index.d.ts +94 -0
- package/components/TreeSelect/index.js +9 -0
- package/components/Trees/ActionTree.d.ts +54 -0
- package/components/Trees/ActionTree.js +657 -0
- package/components/Trees/BaseTree.d.ts +31 -0
- package/components/Trees/BaseTree.js +185 -0
- package/components/Trees/DTree.d.ts +48 -0
- package/components/Trees/DTree.js +142 -0
- package/components/Trees/FTree.d.ts +33 -0
- package/components/Trees/FTree.js +79 -0
- package/components/Trees/STree.d.ts +21 -0
- package/components/Trees/STree.js +92 -0
- package/components/Trees/index.d.ts +134 -0
- package/components/Trees/index.js +9 -0
- package/components/UForm/FormWrapper.d.ts +22 -0
- package/components/UForm/FormWrapper.js +270 -0
- package/components/UForm/UDescriptions.d.ts +5 -0
- package/components/UForm/UDescriptions.js +134 -0
- package/components/UForm/UForm.d.ts +33 -0
- package/components/UForm/UForm.js +484 -0
- package/components/UForm/UFormModal.d.ts +3 -0
- package/components/UForm/UFormModal.js +149 -0
- package/components/UForm/UInfo.d.ts +10 -0
- package/components/UForm/UInfo.js +75 -0
- package/components/UForm/UInfoModal.d.ts +3 -0
- package/components/UForm/UInfoModal.js +50 -0
- package/components/UForm/UModal.d.ts +3 -0
- package/components/UForm/UModal.js +24 -0
- package/components/UForm/_FieldType.d.ts +8 -0
- package/components/UForm/_FieldType.js +100 -0
- package/components/UForm/_FormUtils.d.ts +5 -0
- package/components/UForm/_FormUtils.js +75 -0
- package/components/UForm/_input.d.ts +59 -0
- package/components/UForm/_input.js +147 -0
- package/components/UForm/_register.d.ts +87 -0
- package/components/UForm/_register.js +44 -0
- package/components/UForm/index.d.ts +387 -0
- package/components/UForm/index.js +15 -0
- package/components/Upload/UploadFile.d.ts +3 -0
- package/components/Upload/UploadFile.js +40 -0
- package/components/Upload/UploadImage.d.ts +24 -0
- package/components/Upload/UploadImage.js +93 -0
- package/components/Upload/UploadModal.d.ts +50 -0
- package/components/Upload/UploadModal.js +140 -0
- package/components/Upload/index.d.ts +77 -0
- package/components/Upload/index.js +9 -0
- package/components/Upload/useUpload.d.ts +15 -0
- package/components/Upload/useUpload.js +93 -0
- package/components/_RegisterUtil.d.ts +1 -0
- package/components/_RegisterUtil.js +25 -0
- package/components/_adapt/Alert.d.ts +11 -0
- package/components/_adapt/Alert.js +43 -0
- package/components/_adapt/Button.d.ts +20 -0
- package/components/_adapt/Button.js +26 -0
- package/components/_adapt/Col.d.ts +53 -0
- package/components/_adapt/Col.js +90 -0
- package/components/_adapt/Collapse.d.ts +30 -0
- package/components/_adapt/Collapse.js +33 -0
- package/components/_adapt/Drawer.d.ts +12 -0
- package/components/_adapt/Drawer.js +11 -0
- package/components/_adapt/Dropdown.d.ts +15 -0
- package/components/_adapt/Dropdown.js +38 -0
- package/components/_adapt/Icon.d.ts +14 -0
- package/components/_adapt/Icon.js +34 -0
- package/components/_adapt/Image.d.ts +4 -0
- package/components/_adapt/Image.js +11 -0
- package/components/_adapt/Menu.d.ts +32 -0
- package/components/_adapt/Menu.js +25 -0
- package/components/_adapt/Modal.d.ts +23 -0
- package/components/_adapt/Modal.js +69 -0
- package/components/_adapt/Popconfirm.d.ts +5 -0
- package/components/_adapt/Popconfirm.js +34 -0
- package/components/_adapt/Popover.d.ts +5 -0
- package/components/_adapt/Popover.js +34 -0
- package/components/_adapt/Progress.d.ts +14 -0
- package/components/_adapt/Progress.js +56 -0
- package/components/_adapt/Row.d.ts +10 -0
- package/components/_adapt/Row.js +23 -0
- package/components/_adapt/Select.d.ts +14 -0
- package/components/_adapt/Select.js +47 -0
- package/components/_adapt/Tag.d.ts +7 -0
- package/components/_adapt/Tag.js +12 -0
- package/components/_adapt/Tooltip.d.ts +5 -0
- package/components/_adapt/Tooltip.js +11 -0
- package/components/_adapt/todo/ColorPicker.d.ts +3 -0
- package/components/_adapt/todo/ColorPicker.js +42 -0
- package/components/_adapt/todo/FloatButton.d.ts +2 -0
- package/components/_adapt/todo/FloatButton.js +6 -0
- package/components/_adapt/todo/Image.d.ts +2 -0
- package/components/_adapt/todo/Image.js +6 -0
- package/components/_adapt/todo/Segmented.d.ts +2 -0
- package/components/_adapt/todo/Segmented.js +6 -0
- package/components/_adapt/todo/Space.d.ts +2 -0
- package/components/_adapt/todo/Space.js +6 -0
- package/components/_adapt/utils.d.ts +12 -0
- package/components/_adapt/utils.js +93 -0
- package/components/_common/AutoComplete.d.ts +32 -0
- package/components/_common/AutoComplete.js +87 -0
- package/components/_common/CountUp.d.ts +38 -0
- package/components/_common/CountUp.js +60 -0
- package/components/_common/DateRange.d.ts +52 -0
- package/components/_common/DateRange.js +108 -0
- package/components/_common/HighLight.d.ts +15 -0
- package/components/_common/HighLight.js +37 -0
- package/components/_common/I18N.d.ts +7 -0
- package/components/_common/I18N.js +6 -0
- package/components/_common/Loading.d.ts +9 -0
- package/components/_common/Loading.js +52 -0
- package/components/_common/MonthRange.d.ts +46 -0
- package/components/_common/MonthRange.js +130 -0
- package/components/_common/PromiseLabel.d.ts +11 -0
- package/components/_common/PromiseLabel.js +34 -0
- package/components/_common/Role.d.ts +5 -0
- package/components/_common/Role.js +11 -0
- package/components/_common/Upagination.d.ts +21 -0
- package/components/_common/Upagination.js +106 -0
- package/components/_setup/Const.d.ts +205 -0
- package/components/_setup/Const.js +112 -0
- package/components/_setup/I18N/enUS.d.ts +1 -0
- package/components/_setup/I18N/enUS.js +106 -0
- package/components/_setup/I18N/index.d.ts +3 -0
- package/components/_setup/I18N/index.js +5 -0
- package/components/_setup/I18N/zhCN.d.ts +3 -0
- package/components/_setup/I18N/zhCN.js +109 -0
- package/components/_setup/I18N/zhHK.d.ts +1 -0
- package/components/_setup/I18N/zhHK.js +107 -0
- package/components/_setup/ICON/IconTypes.d.ts +1 -0
- package/components/_setup/ICON/IconTypes.js +10 -0
- package/components/_setup/SearchField/SearchFieldAdvance.d.ts +1 -0
- package/components/_setup/SearchField/SearchFieldAdvance.js +57 -0
- package/components/_setup/SearchField/SearchFieldDate.d.ts +1 -0
- package/components/_setup/SearchField/SearchFieldDate.js +186 -0
- package/components/_setup/SearchField/SearchFieldInput.d.ts +3 -0
- package/components/_setup/SearchField/SearchFieldInput.js +20 -0
- package/components/_setup/SearchField/SearchFieldSelect.d.ts +1 -0
- package/components/_setup/SearchField/SearchFieldSelect.js +106 -0
- package/components/_setup/SearchField/SearchFieldTree.d.ts +1 -0
- package/components/_setup/SearchField/SearchFieldTree.js +191 -0
- package/components/_setup/SelectBar/SelectList.d.ts +1 -0
- package/components/_setup/SelectBar/SelectList.js +21 -0
- package/components/_setup/SelectBar/SelectTree.d.ts +1 -0
- package/components/_setup/SelectBar/SelectTree.js +11 -0
- package/components/_setup/UForm/UFormAdvanceInput.d.ts +1 -0
- package/components/_setup/UForm/UFormAdvanceInput.js +300 -0
- package/components/_setup/UForm/UFormAdvanceSelect.d.ts +0 -0
- package/components/_setup/UForm/UFormAdvanceSelect.js +26 -0
- package/components/_setup/UForm/UFormCrontab.d.ts +1 -0
- package/components/_setup/UForm/UFormCrontab.js +199 -0
- package/components/_setup/UForm/UFormDate.d.ts +1 -0
- package/components/_setup/UForm/UFormDate.js +313 -0
- package/components/_setup/UForm/UFormInput.d.ts +1 -0
- package/components/_setup/UForm/UFormInput.js +159 -0
- package/components/_setup/UForm/UFormJSON.d.ts +1 -0
- package/components/_setup/UForm/UFormJSON.js +219 -0
- package/components/_setup/UForm/UFormOrg.d.ts +1 -0
- package/components/_setup/UForm/UFormOrg.js +121 -0
- package/components/_setup/UForm/UFormRole.d.ts +1 -0
- package/components/_setup/UForm/UFormRole.js +47 -0
- package/components/_setup/UForm/UFormSearch.d.ts +0 -0
- package/components/_setup/UForm/UFormSearch.js +35 -0
- package/components/_setup/UForm/UFormSelect.d.ts +1 -0
- package/components/_setup/UForm/UFormSelect.js +179 -0
- package/components/_setup/UForm/UFormTree.d.ts +0 -0
- package/components/_setup/UForm/UFormTree.js +134 -0
- package/components/_setup/UForm/UFormUpload.d.ts +1 -0
- package/components/_setup/UForm/UFormUpload.js +173 -0
- package/components/_setup/UForm/_utils.d.ts +11 -0
- package/components/_setup/UForm/_utils.js +41 -0
- package/components/_setup/index.d.ts +21 -0
- package/components/_setup/index.js +25 -0
- package/components/index.d.ts +7 -0
- package/components/index.js +16 -0
- package/deps/JsonView.d.ts +6 -0
- package/deps/JsonView.js +57 -0
- package/deps/SpringBoot.d.ts +4 -0
- package/deps/SpringBoot.js +18 -0
- package/deps/SpringCloud.d.ts +14 -0
- package/deps/SpringCloud.js +29 -0
- package/deps/_editor/advance/_Audio.d.ts +0 -0
- package/deps/_editor/advance/_Audio.js +1 -0
- package/deps/_editor/advance/_Image.d.ts +2 -0
- package/deps/_editor/advance/_Image.js +89 -0
- package/deps/_editor/advance/_Table.d.ts +0 -0
- package/deps/_editor/advance/_Table.js +1 -0
- package/deps/_editor/advance/_Video.d.ts +0 -0
- package/deps/_editor/advance/_Video.js +1 -0
- package/deps/_editor/base/Element.d.ts +5 -0
- package/deps/_editor/base/Element.js +43 -0
- package/deps/_editor/base/Leaf.d.ts +3 -0
- package/deps/_editor/base/Leaf.js +36 -0
- package/deps/_editor/base/Support.d.ts +2 -0
- package/deps/_editor/base/Support.js +78 -0
- package/deps/_editor/base/types.d.ts +156 -0
- package/deps/_editor/base/types.js +10 -0
- package/deps/_editor/i18n.d.ts +1 -0
- package/deps/_editor/i18n.js +31 -0
- package/deps/_editor/tools/Button.d.ts +6 -0
- package/deps/_editor/tools/Button.js +86 -0
- package/deps/_editor/tools/ToolBar.d.ts +8 -0
- package/deps/_editor/tools/ToolBar.js +10 -0
- package/deps/_editor/tools/_BlockButton.d.ts +4 -0
- package/deps/_editor/tools/_BlockButton.js +77 -0
- package/deps/_editor/tools/_InsertButton.d.ts +6 -0
- package/deps/_editor/tools/_InsertButton.js +65 -0
- package/deps/_editor/tools/_MarkButton.d.ts +6 -0
- package/deps/_editor/tools/_MarkButton.js +45 -0
- package/deps/_editor/tools/_TxtButton.d.ts +7 -0
- package/deps/_editor/tools/_TxtButton.js +187 -0
- package/deps/_editor/utils/ParseHtml.d.ts +0 -0
- package/deps/_editor/utils/ParseHtml.js +220 -0
- package/deps/api-audit.d.ts +1 -0
- package/deps/api-audit.js +6 -0
- package/deps/api-data.d.ts +0 -0
- package/deps/api-data.js +1 -0
- package/deps/apis/useSource.d.ts +0 -0
- package/deps/apis/useSource.js +152 -0
- package/deps/echarts.d.ts +26 -0
- package/deps/echarts.js +71 -0
- package/deps/editor.d.ts +34 -0
- package/deps/editor.js +111 -0
- package/deps/registerEditor.d.ts +1 -0
- package/deps/registerEditor.js +15 -0
- package/hooks/_list.d.ts +87 -0
- package/hooks/_list.js +13 -0
- package/hooks/index.d.ts +14 -0
- package/hooks/index.js +49 -0
- package/hooks/useAjax.d.ts +14 -0
- package/hooks/useAjax.js +43 -0
- package/hooks/useAjaxAction.d.ts +13 -0
- package/hooks/useAjaxAction.js +42 -0
- package/hooks/useAjaxQuery.d.ts +40 -0
- package/hooks/useAjaxQuery.js +81 -0
- package/hooks/useApi.d.ts +69 -0
- package/hooks/useApi.js +352 -0
- package/hooks/useApiGlobal.d.ts +0 -0
- package/hooks/useApiGlobal.js +5 -0
- package/hooks/useApp.d.ts +243 -0
- package/hooks/useApp.js +17 -0
- package/hooks/useArray.d.ts +21 -0
- package/hooks/useArray.js +182 -0
- package/hooks/useCounter.d.ts +0 -0
- package/hooks/useCounter.js +82 -0
- package/hooks/useDefault.d.ts +6 -0
- package/hooks/useDefault.js +16 -0
- package/hooks/useDoLoad.d.ts +17 -0
- package/hooks/useDoLoad.js +44 -0
- package/hooks/useEffectFunction.d.ts +8 -0
- package/hooks/useEffectFunction.js +16 -0
- package/hooks/useEffectOnce.d.ts +5 -0
- package/hooks/useEffectOnce.js +23 -0
- package/hooks/useError.d.ts +5 -0
- package/hooks/useError.js +21 -0
- package/hooks/useFirstMountState.d.ts +6 -0
- package/hooks/useFirstMountState.js +18 -0
- package/hooks/useGenkey.d.ts +2 -0
- package/hooks/useGenkey.js +16 -0
- package/hooks/useGetSet.d.ts +11 -0
- package/hooks/useGetSet.js +27 -0
- package/hooks/useGlobal.d.ts +19 -0
- package/hooks/useGlobal.js +62 -0
- package/hooks/useGlobal_back.d.ts +1 -0
- package/hooks/useGlobal_back.js +11 -0
- package/hooks/useHover.d.ts +8 -0
- package/hooks/useHover.js +49 -0
- package/hooks/useMemoPromise.d.ts +6 -0
- package/hooks/useMemoPromise.js +42 -0
- package/hooks/useModals.d.ts +40 -0
- package/hooks/useModals.js +98 -0
- package/hooks/useMountedState.d.ts +5 -0
- package/hooks/useMountedState.js +20 -0
- package/hooks/useOpenState.d.ts +28 -0
- package/hooks/useOpenState.js +23 -0
- package/hooks/usePromise.d.ts +7 -0
- package/hooks/usePromise.js +22 -0
- package/hooks/useQueue.d.ts +12 -0
- package/hooks/useQueue.js +34 -0
- package/hooks/useSetState.d.ts +9 -0
- package/hooks/useSetState.js +26 -0
- package/hooks/useStateList.d.ts +13 -0
- package/hooks/useStateList.js +59 -0
- package/hooks/useToggle.d.ts +6 -0
- package/hooks/useToggle.js +12 -0
- package/hooks/useUnmountPromise.d.ts +6 -0
- package/hooks/useUnmountPromise.js +36 -0
- package/hooks/useUpdate.d.ts +7 -0
- package/hooks/useUpdate.js +15 -0
- package/hooks/useUpdateEffect.d.ts +6 -0
- package/hooks/useUpdateEffect.js +18 -0
- package/index.d.ts +139 -0
- package/index.js +161 -0
- package/login/Base65.d.ts +8 -0
- package/login/Base65.js +65 -0
- package/login/Password.d.ts +61 -0
- package/login/Password.js +124 -0
- package/login/SM4.d.ts +20 -0
- package/login/SM4.js +193 -0
- package/login/cems/index.d.ts +10 -0
- package/login/cems/index.js +17 -0
- package/login/jit/index.d.ts +32 -0
- package/login/jit/index.js +180 -0
- package/login/jit/pnxclient.d.ts +54 -0
- package/login/jit/pnxclient.js +575 -0
- package/login/sso/index.d.ts +0 -0
- package/login/sso/index.js +0 -0
- package/login/vap/index.d.ts +1 -0
- package/login/vap/index.js +6 -0
- package/login/xrtx/index.d.ts +2 -0
- package/login/xrtx/index.js +33 -0
- package/package.json +1 -0
- package/screen/Comment.d.ts +31 -0
- package/screen/Comment.js +29 -0
- package/screen/EchartContent.d.ts +0 -0
- package/screen/EchartContent.js +63 -0
- package/screen/Page.d.ts +13 -0
- package/screen/Page.js +74 -0
- package/screen/index.d.ts +3 -0
- package/screen/index.js +9 -0
- package/screen/render.d.ts +5 -0
- package/screen/render.js +10 -0
- package/utils/Ajax.d.ts +85 -0
- package/utils/Ajax.js +147 -0
- package/utils/ArrayUtil.d.ts +22 -0
- package/utils/ArrayUtil.js +51 -0
- package/utils/CacheUtil.d.ts +20 -0
- package/utils/CacheUtil.js +86 -0
- package/utils/Const.d.ts +14 -0
- package/utils/Const.js +37 -0
- package/utils/CustomApp.d.ts +242 -0
- package/utils/CustomApp.js +18 -0
- package/utils/EventUtil.d.ts +22 -0
- package/utils/EventUtil.js +63 -0
- package/utils/Format.d.ts +28 -0
- package/utils/Format.js +206 -0
- package/utils/Global.d.ts +276 -0
- package/utils/Global.js +125 -0
- package/utils/Logger.d.ts +5 -0
- package/utils/Logger.js +32 -0
- package/utils/PageUtil.d.ts +24 -0
- package/utils/PageUtil.js +87 -0
- package/utils/Renders/ApiGetRender.d.ts +23 -0
- package/utils/Renders/ApiGetRender.js +192 -0
- package/utils/Renders/ApiPostRender.d.ts +17 -0
- package/utils/Renders/ApiPostRender.js +161 -0
- package/utils/Renders/DateRender.d.ts +8 -0
- package/utils/Renders/DateRender.js +35 -0
- package/utils/Renders/DictRender.d.ts +23 -0
- package/utils/Renders/DictRender.js +258 -0
- package/utils/Renders/FileRender.d.ts +3 -0
- package/utils/Renders/FileRender.js +46 -0
- package/utils/Renders/ListRender.d.ts +23 -0
- package/utils/Renders/ListRender.js +111 -0
- package/utils/Renders/NumberRender.d.ts +19 -0
- package/utils/Renders/NumberRender.js +65 -0
- package/utils/Renders/StatusRender.d.ts +12 -0
- package/utils/Renders/StatusRender.js +68 -0
- package/utils/Renders/StringRender.d.ts +14 -0
- package/utils/Renders/StringRender.js +194 -0
- package/utils/Renders/_define.d.ts +26 -0
- package/utils/Renders/_define.js +64 -0
- package/utils/Renders/index.d.ts +9 -0
- package/utils/Renders/index.js +42 -0
- package/utils/StringUtil.d.ts +124 -0
- package/utils/StringUtil.js +352 -0
- package/utils/TreeUtil.d.ts +42 -0
- package/utils/TreeUtil.js +69 -0
- package/utils/VAP.d.ts +16 -0
- package/utils/VAP.js +78 -0
- package/utils/XHR.d.ts +9 -0
- package/utils/XHR.js +53 -0
- package/utils/_AjaxUtil.d.ts +11 -0
- package/utils/_AjaxUtil.js +45 -0
- package/utils/_Support.d.ts +22 -0
- package/utils/_Support.js +106 -0
- package/utils/i18n.d.ts +60 -0
- package/utils/i18n.js +184 -0
- package/utils/index.d.ts +19 -0
- package/utils/index.js +54 -0
- package/utils/screenful.d.ts +15 -0
- package/utils/screenful.js +64 -0
- package/widget/index.d.ts +39 -0
- package/widget/index.js +21 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.COL_OPERACTION = exports.ACTION = exports.DELETE = exports.EDIT = exports.INFO = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
9
|
+
const antd_1 = require("antd");
|
|
10
|
+
const Icon_1 = require("../../_adapt/Icon");
|
|
11
|
+
const utils_1 = require("../../../utils");
|
|
12
|
+
const Const_1 = require("../../_setup/Const");
|
|
13
|
+
const DEFAULT_CLASS = {
|
|
14
|
+
INFO: 'c-oper-info',
|
|
15
|
+
EDIT: 'c-oper-edit',
|
|
16
|
+
DELETE: 'c-oper-delete',
|
|
17
|
+
};
|
|
18
|
+
const INFO = props => {
|
|
19
|
+
if (props.roleCode && !utils_1.PageUtil.hasRole(props.roleCode))
|
|
20
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
21
|
+
const title = utils_1.i18n.getText(props.ik, props.title, Const_1.V.BTN_INFO);
|
|
22
|
+
return react_1.default.createElement("span", { className: DEFAULT_CLASS.INFO, onClick: evt => utils_1.PageUtil.stopEvent(evt, props.onClick), title: `${title} ${props.name || ''}` },
|
|
23
|
+
react_1.default.createElement(Icon_1.Icon, { type: 'search' }),
|
|
24
|
+
react_1.default.createElement("span", null, title));
|
|
25
|
+
};
|
|
26
|
+
exports.INFO = INFO;
|
|
27
|
+
const EDIT = props => {
|
|
28
|
+
if (props.roleCode && !utils_1.PageUtil.hasRole(props.roleCode))
|
|
29
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
30
|
+
const title = utils_1.i18n.getText(props.ik, props.title, Const_1.V.ACT_UPDATE);
|
|
31
|
+
return react_1.default.createElement("span", { className: DEFAULT_CLASS.EDIT, onClick: evt => utils_1.PageUtil.stopEvent(evt, props.onClick), title: `${title} ${props.name || ''}` },
|
|
32
|
+
react_1.default.createElement(Icon_1.Icon, { type: 'edit' }),
|
|
33
|
+
react_1.default.createElement("span", null, title));
|
|
34
|
+
};
|
|
35
|
+
exports.EDIT = EDIT;
|
|
36
|
+
const DELETE = props => {
|
|
37
|
+
if (props.roleCode && !utils_1.PageUtil.hasRole(props.roleCode))
|
|
38
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
39
|
+
const title = utils_1.i18n.getText(props.ik, props.title, Const_1.V.ACT_DELETE);
|
|
40
|
+
let popTitle = utils_1.i18n.txt(Const_1.V.ACT_DELETE_CONFIRM, props.name || '');
|
|
41
|
+
return react_1.default.createElement(antd_1.Popconfirm, { onConfirm: e => utils_1.PageUtil.stopEvent(e, () => props.onClick()), placement: "right", title: react_1.default.createElement("span", null, popTitle), overlayClassName: 'c-table-action-confirm' },
|
|
42
|
+
react_1.default.createElement("span", { className: DEFAULT_CLASS.DELETE, title: `${title} ${props.name || ''}` },
|
|
43
|
+
react_1.default.createElement(Icon_1.Icon, { type: 'delete' }),
|
|
44
|
+
react_1.default.createElement("span", null, title)));
|
|
45
|
+
};
|
|
46
|
+
exports.DELETE = DELETE;
|
|
47
|
+
const ACTION = props => {
|
|
48
|
+
if (props.roleCode && !utils_1.PageUtil.hasRole(props.roleCode))
|
|
49
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
50
|
+
const title = utils_1.i18n.getText(props.ik, props.title);
|
|
51
|
+
let className = lodash_1.default.has(DEFAULT_CLASS, props.type) ? DEFAULT_CLASS[props.type] : DEFAULT_CLASS.EDIT;
|
|
52
|
+
if (!lodash_1.default.has(props, 'confrim')) {
|
|
53
|
+
return react_1.default.createElement("span", { className: className, onClick: evt => utils_1.PageUtil.stopEvent(evt, props.onClick), title: `${props.name || ''}` },
|
|
54
|
+
props.icon && react_1.default.createElement(Icon_1.Icon, { type: props.icon }),
|
|
55
|
+
react_1.default.createElement("span", null, title));
|
|
56
|
+
}
|
|
57
|
+
return react_1.default.createElement(antd_1.Popconfirm, { onConfirm: () => props.onClick(), title: props.confrim, placement: "right", overlayClassName: 'c-table-action-confirm' },
|
|
58
|
+
react_1.default.createElement("span", { className: className, title: props.name || undefined, onClick: utils_1.PageUtil.stopEvent },
|
|
59
|
+
props.icon && react_1.default.createElement(Icon_1.Icon, { type: props.icon }),
|
|
60
|
+
react_1.default.createElement("span", null, title)));
|
|
61
|
+
};
|
|
62
|
+
exports.ACTION = ACTION;
|
|
63
|
+
const RenderWidthMap = new Map();
|
|
64
|
+
const COL_OPERACTION = (props) => {
|
|
65
|
+
const clazz = ['c-table-actions'];
|
|
66
|
+
if (lodash_1.default.isFunction(props)) {
|
|
67
|
+
let len = 0;
|
|
68
|
+
if (RenderWidthMap.has(props)) {
|
|
69
|
+
len = RenderWidthMap.get(props);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
try {
|
|
73
|
+
let result = props('', {}, 0);
|
|
74
|
+
if (lodash_1.default.isArray(result) && result.length) {
|
|
75
|
+
len = result.length;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch (_a) { }
|
|
79
|
+
RenderWidthMap.set(props, len);
|
|
80
|
+
}
|
|
81
|
+
if (len > 0) {
|
|
82
|
+
clazz.push('c-table-actions-' + len);
|
|
83
|
+
}
|
|
84
|
+
return { align: 'center', title: utils_1.i18n.getText(Const_1.V.TXT_OPERATION), ellipsis: false, className: clazz.join(' '), render: props };
|
|
85
|
+
}
|
|
86
|
+
else if (props.className) {
|
|
87
|
+
clazz.push(props.className);
|
|
88
|
+
}
|
|
89
|
+
return Object.assign(Object.assign({ align: 'center' }, props), { title: utils_1.i18n.getText(props.ik, null, Const_1.V.TXT_OPERATION), ellipsis: false, className: clazz.join(' ') });
|
|
90
|
+
};
|
|
91
|
+
exports.COL_OPERACTION = COL_OPERACTION;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NumberFormat } from '../../../utils/Format';
|
|
3
|
+
type SummaryItem = {
|
|
4
|
+
field: string;
|
|
5
|
+
type: 'count' | 'max' | 'min' | 'avg' | 'text' | 'total';
|
|
6
|
+
title: string;
|
|
7
|
+
ik?: string;
|
|
8
|
+
format?: NumberFormat | ((num: number) => string);
|
|
9
|
+
};
|
|
10
|
+
export declare const Summary: (data: any, items: SummaryItem) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Summary = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const Summary = (data, items) => {
|
|
9
|
+
return react_1.default.createElement("div", null);
|
|
10
|
+
};
|
|
11
|
+
exports.Summary = Summary;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TableColumn } from '../index';
|
|
3
|
+
import type { ActionPorps, CustomAcitonProps } from './Actions';
|
|
4
|
+
import type { TableAction, TableActionButton } from './ActionBar';
|
|
5
|
+
export declare const defineTable: (table: TableDefined) => void;
|
|
6
|
+
export type TableDefined = {
|
|
7
|
+
INFO: React.FC<ActionPorps>;
|
|
8
|
+
EDIT: React.FC<ActionPorps>;
|
|
9
|
+
DELETE: React.FC<ActionPorps>;
|
|
10
|
+
ACTION: React.FC<CustomAcitonProps>;
|
|
11
|
+
COL_OPERACTION: (props: TableColumn | ((value: any, record: any, index: number) => React.ReactNode)) => TableColumn;
|
|
12
|
+
BUTTON_ADD: (onClick: TableAction, props?: Partial<TableActionButton>) => TableActionButton;
|
|
13
|
+
BUTTON_DELETE: (onClick: TableAction, props?: Partial<TableActionButton>) => TableActionButton;
|
|
14
|
+
BUTTON_IMPORT: (onClick: TableAction, props?: Partial<TableActionButton>) => TableActionButton;
|
|
15
|
+
BUTTON_EXPORT: (onClick: TableAction, props?: Partial<TableActionButton>) => TableActionButton;
|
|
16
|
+
BUTTON_MORE: (children: TableActionButton[]) => TableActionButton;
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import type { ForwardRefExoticComponent, ExoticComponent } from 'react';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.defineTable = void 0;
|
|
5
|
+
const Actions_1 = require("./Actions");
|
|
6
|
+
const ActionBar_1 = require("./ActionBar");
|
|
7
|
+
const defineTable = (table) => {
|
|
8
|
+
table.INFO = Actions_1.INFO;
|
|
9
|
+
table.ACTION = Actions_1.ACTION;
|
|
10
|
+
table.DELETE = Actions_1.DELETE;
|
|
11
|
+
table.EDIT = Actions_1.EDIT;
|
|
12
|
+
table.COL_OPERACTION = Actions_1.COL_OPERACTION;
|
|
13
|
+
table.BUTTON_ADD = ActionBar_1.BUTTON_ADD;
|
|
14
|
+
table.BUTTON_DELETE = ActionBar_1.BUTTON_DELETE;
|
|
15
|
+
table.BUTTON_IMPORT = ActionBar_1.BUTTON_IMPORT;
|
|
16
|
+
table.BUTTON_EXPORT = ActionBar_1.BUTTON_EXPORT;
|
|
17
|
+
table.BUTTON_MORE = ActionBar_1.BUTTON_MORE;
|
|
18
|
+
};
|
|
19
|
+
exports.defineTable = defineTable;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.STable = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const useArray_1 = require("../../hooks/useArray");
|
|
29
|
+
const VTable_1 = require("./VTable");
|
|
30
|
+
const STable = (props) => {
|
|
31
|
+
const model = (0, useArray_1.useArray)(props);
|
|
32
|
+
(0, react_1.useEffect)(() => {
|
|
33
|
+
model.setList(props.list);
|
|
34
|
+
}, [props.list]);
|
|
35
|
+
return react_1.default.createElement(VTable_1.VTable, Object.assign({}, props, { model: model }));
|
|
36
|
+
};
|
|
37
|
+
exports.STable = STable;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BaseTableProps } from './index';
|
|
3
|
+
import type { PlainObject } from '../../basetype';
|
|
4
|
+
import type { ListModel } from '../../hooks/_list';
|
|
5
|
+
import type { UseAjaxQueryHook } from '../../hooks/useAjaxQuery';
|
|
6
|
+
export type TopTableProps = Omit<BaseTableProps, 'mode' | 'select' | 'selectDisabled' | 'actionBar' | 'searchBar' | 'default'> & {
|
|
7
|
+
/**
|
|
8
|
+
* 说明: 在 TopTable list /model / ajaxQuery 必须 三选一
|
|
9
|
+
*
|
|
10
|
+
* list 为一个数组: 可以自行定义
|
|
11
|
+
*/
|
|
12
|
+
list?: PlainObject[];
|
|
13
|
+
/**
|
|
14
|
+
* model 为一个api 模型,可以使用 useApi, useArray 等生成
|
|
15
|
+
* */
|
|
16
|
+
model?: ListModel;
|
|
17
|
+
/**
|
|
18
|
+
* ajaxQuery 请求模型,可以由 useAjaxQuery 生成
|
|
19
|
+
* */
|
|
20
|
+
ajaxQuery?: UseAjaxQueryHook<any>;
|
|
21
|
+
mustSelect?: boolean;
|
|
22
|
+
onRowSelect?: (row: PlainObject) => void;
|
|
23
|
+
};
|
|
24
|
+
export declare const TopTable: React.FC<TopTableProps>;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.TopTable = void 0;
|
|
30
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
const antd_1 = require("antd");
|
|
33
|
+
const utils_1 = require("../../utils");
|
|
34
|
+
const Util_1 = require("./Util");
|
|
35
|
+
const VTable_1 = require("./VTable");
|
|
36
|
+
const TopTable = props => {
|
|
37
|
+
var _a;
|
|
38
|
+
const [columns, setColumns] = (0, react_1.useState)([]);
|
|
39
|
+
const tableRef = (0, react_1.useRef)(null);
|
|
40
|
+
let isQuerying = false;
|
|
41
|
+
let rowKey = 'id';
|
|
42
|
+
let list = [];
|
|
43
|
+
if (props.list) {
|
|
44
|
+
list = props.list.slice(0);
|
|
45
|
+
}
|
|
46
|
+
else if (props.ajaxQuery) {
|
|
47
|
+
if (lodash_1.default.isArray(props.ajaxQuery[1])) {
|
|
48
|
+
isQuerying = props.ajaxQuery[0];
|
|
49
|
+
list = props.ajaxQuery[1];
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
console.warn('ajaxQuery 数据必须返回一个数组');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else if (props.model) {
|
|
56
|
+
if (props.model.rowKey)
|
|
57
|
+
rowKey = props.model.rowKey;
|
|
58
|
+
list = props.model.list;
|
|
59
|
+
isQuerying = props.model.isQuerying;
|
|
60
|
+
}
|
|
61
|
+
if (props.rowKey)
|
|
62
|
+
rowKey = props.rowKey;
|
|
63
|
+
const [scroll, setScroll] = (0, react_1.useState)(undefined);
|
|
64
|
+
const [selected, setSelected] = (0, react_1.useState)(null);
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
66
|
+
let cols = [];
|
|
67
|
+
if (props.showIndex !== false) {
|
|
68
|
+
cols.push((0, Util_1.getIdxColumn)({ current: 0 }, props.showIndex, true));
|
|
69
|
+
}
|
|
70
|
+
props.columns.map(col => {
|
|
71
|
+
if (col.roleCode) {
|
|
72
|
+
if (!utils_1.PageUtil.hasRole(col.roleCode)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (col.ik) {
|
|
77
|
+
let title = utils_1.i18n.txt(col.ik);
|
|
78
|
+
cols.push(Object.assign(Object.assign({}, col), { title: title == '' ? col.title : title }));
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
cols.push(col);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
setColumns(cols);
|
|
85
|
+
}, [props.columns]);
|
|
86
|
+
const onRowSelect = (0, react_1.useCallback)((data) => {
|
|
87
|
+
if (selected == null || data[rowKey] != selected[rowKey]) {
|
|
88
|
+
setSelected(data);
|
|
89
|
+
props.onRowSelect(data);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (props.mustSelect)
|
|
93
|
+
return;
|
|
94
|
+
setSelected(null);
|
|
95
|
+
props.onRowSelect(null);
|
|
96
|
+
}, [selected]);
|
|
97
|
+
const resizePid = (0, react_1.useRef)(null);
|
|
98
|
+
const resize = () => {
|
|
99
|
+
if (props.scroll === null)
|
|
100
|
+
return;
|
|
101
|
+
clearTimeout(resizePid.current);
|
|
102
|
+
resizePid.current = setTimeout(() => {
|
|
103
|
+
const thead = (0, VTable_1.getHeightByTagName)(tableRef.current, 'thead') || 40;
|
|
104
|
+
tableRef.current.style.display = 'none';
|
|
105
|
+
let height = tableRef.current.parentElement.getBoundingClientRect().height;
|
|
106
|
+
if (height == 0) {
|
|
107
|
+
setScroll(undefined);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
setScroll({ y: Math.ceil(height - (thead || 40)), x: true });
|
|
111
|
+
}
|
|
112
|
+
tableRef.current.style.display = 'block';
|
|
113
|
+
}, 50);
|
|
114
|
+
};
|
|
115
|
+
(0, react_1.useEffect)(() => {
|
|
116
|
+
resize();
|
|
117
|
+
window.addEventListener('resize', resize, false);
|
|
118
|
+
return () => window.removeEventListener('resize', resize);
|
|
119
|
+
}, []);
|
|
120
|
+
(0, react_1.useEffect)(() => {
|
|
121
|
+
if (lodash_1.default.isArray(list) && list.length && props.mustSelect && props.onRowSelect) {
|
|
122
|
+
setSelected(list[0]);
|
|
123
|
+
props.onRowSelect(list[0]);
|
|
124
|
+
}
|
|
125
|
+
}, [props.list, (_a = props.model) === null || _a === void 0 ? void 0 : _a.list]);
|
|
126
|
+
const tableProps = {
|
|
127
|
+
tableLayout: 'fixed',
|
|
128
|
+
rowKey,
|
|
129
|
+
size: utils_1.GLOBAL.CONFIG.TABLE.SIZE,
|
|
130
|
+
// showSorterTooltip: false,
|
|
131
|
+
pagination: false,
|
|
132
|
+
};
|
|
133
|
+
if (lodash_1.default.isFunction(props.onRowSelect)) {
|
|
134
|
+
tableProps.onRow = row => ({
|
|
135
|
+
onClick: (event) => {
|
|
136
|
+
utils_1.PageUtil.stopEvent(event, () => onRowSelect(row));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return react_1.default.createElement(antd_1.Table, Object.assign({}, tableProps, props, {
|
|
141
|
+
// ref={tableRef}
|
|
142
|
+
rowClassName: (record, i) => {
|
|
143
|
+
let clazz = [];
|
|
144
|
+
if (i <= 3)
|
|
145
|
+
clazz.push('c-table-top-' + i);
|
|
146
|
+
if (lodash_1.default.isFunction(props.onRowSelect)) {
|
|
147
|
+
if (selected && selected[rowKey] == record[rowKey]) {
|
|
148
|
+
clazz.push('ant-table-row-selected');
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
clazz.push('c-table-top-cursor');
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return clazz.join(' ');
|
|
155
|
+
}, scroll: scroll, className: utils_1.StringUtil.className(['c-table', 'c-table-top'], props.className), columns: columns, dataSource: list, loading: isQuerying }));
|
|
156
|
+
};
|
|
157
|
+
exports.TopTable = TopTable;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TopTableModal = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
9
|
+
const Modal_1 = require("../_adapt/Modal");
|
|
10
|
+
const TopTable_1 = require("./TopTable");
|
|
11
|
+
const TOP_TABLE_PROPERTIES = [
|
|
12
|
+
'mode', 'columns', 'showIndex', 'rowKey', 'autoLoad', 'model', 'list', 'ajaxQuery', 'mustSelect', 'onRowSelect'
|
|
13
|
+
];
|
|
14
|
+
const TopTableModal = props => {
|
|
15
|
+
const modalProps = lodash_1.default.omit(props, TOP_TABLE_PROPERTIES);
|
|
16
|
+
const tableProps = lodash_1.default.pick(props, TOP_TABLE_PROPERTIES);
|
|
17
|
+
return react_1.default.createElement(Modal_1.Modal, Object.assign({}, modalProps),
|
|
18
|
+
react_1.default.createElement(TopTable_1.TopTable, Object.assign({}, tableProps)));
|
|
19
|
+
};
|
|
20
|
+
exports.TopTableModal = TopTableModal;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getIdxColumn = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
const Const_1 = require("../_setup/Const");
|
|
10
|
+
const getIdxColumn = (ref, showIndex = null, isRank = false) => {
|
|
11
|
+
const idxRender = (x, y, i) => ref.current + i + 1;
|
|
12
|
+
let title;
|
|
13
|
+
if (lodash_1.default.isString(showIndex)) {
|
|
14
|
+
if (utils_1.i18n.hasKey(showIndex)) {
|
|
15
|
+
title = utils_1.i18n.txt(showIndex);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
title = showIndex;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
title = utils_1.i18n.txt(isRank ? Const_1.V.TXT_RANK : Const_1.V.TXT_IDX);
|
|
23
|
+
}
|
|
24
|
+
let width = 48;
|
|
25
|
+
if (ref.current < 1000) {
|
|
26
|
+
width = 48;
|
|
27
|
+
}
|
|
28
|
+
else if (ref.current < 10000) {
|
|
29
|
+
width = 60;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
width = 72;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
className: '_index',
|
|
36
|
+
title,
|
|
37
|
+
width,
|
|
38
|
+
render: idxRender
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.getIdxColumn = getIdxColumn;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BaseTableProps } from './index';
|
|
3
|
+
import type { ListModel } from '../../hooks/_list';
|
|
4
|
+
export declare const getHeightByTagName: (root: HTMLElement, tagName: string) => number;
|
|
5
|
+
/**
|
|
6
|
+
* VTable 支持多种模型,内置模型有 API/DATA/STATIC,也支持模型规范的自定义模型
|
|
7
|
+
*/
|
|
8
|
+
export type VTableProps = BaseTableProps & {
|
|
9
|
+
model: ListModel;
|
|
10
|
+
};
|
|
11
|
+
export declare const VTable: React.FC<VTableProps>;
|