ztxkui 4.3.32 → 10.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 +57 -57
- package/dist/App.js +4 -10
- package/dist/Demo.js +31 -2
- package/dist/DemoCom/CollapseDemo.js +1 -1
- package/dist/DemoCom/FormDemo.js +88 -43
- package/dist/DemoCom/FormDemo1.d.ts +3 -0
- package/dist/DemoCom/FormDemo1.js +95 -0
- package/dist/DemoCom/PrintContainerDemo.js +43 -121
- package/dist/DemoCom/SinaturesDemo.js +5 -1
- package/dist/DemoCom/TableDemo1.js +5 -0
- package/dist/DemoCom/TableDemo2.d.ts +14 -0
- package/dist/DemoCom/TableDemo2.js +550 -0
- package/dist/DemoCom/TestDemo.d.ts +3 -0
- package/dist/DemoCom/TestDemo.js +17 -0
- package/dist/DemoCom/diaobodan.d.ts +3 -0
- package/dist/DemoCom/diaobodan.js +310 -0
- package/dist/DemoCom/tidan.d.ts +5 -0
- package/dist/DemoCom/tidan.js +153 -0
- package/dist/TableDemo/BasicTable.js +75 -3
- package/dist/TableDemo/EditableTable.d.ts +1 -0
- package/dist/TableDemo/EditableTable.js +90 -44
- package/dist/TableDemo/ElseTable.d.ts +9 -0
- package/dist/TableDemo/ElseTable.js +58 -0
- package/dist/TableDemo/ModalTable.js +30 -33
- package/dist/TableDemo/VirtualTable.d.ts +9 -0
- package/dist/TableDemo/VirtualTable.js +127 -0
- package/dist/TableDemo/data.d.ts +29 -13
- package/dist/TableDemo/data.js +129 -17
- package/dist/TableDemo/index.js +6 -5
- package/dist/UI/Asr/index.d.ts +3 -0
- package/dist/UI/Asr/index.js +7 -0
- package/dist/UI/Basic/index.js +66 -5
- package/dist/UI/ChatRoom/data.d.ts +16 -0
- package/dist/UI/ChatRoom/data.js +52 -0
- package/dist/UI/ChatRoom/index.d.ts +3 -0
- package/dist/UI/ChatRoom/index.js +50 -0
- package/dist/UI/Form/index.js +139 -22
- package/dist/UI/OCR/index.d.ts +2 -0
- package/dist/UI/OCR/index.js +34 -0
- package/dist/UI/OCRCom/CommonOcr.d.ts +2 -0
- package/dist/UI/OCRCom/CommonOcr.js +34 -0
- package/dist/UI/OCRCom/ModalOcr.d.ts +2 -0
- package/dist/UI/OCRCom/ModalOcr.js +39 -0
- package/dist/UI/OCRCom/UserOcr.d.ts +2 -0
- package/dist/UI/OCRCom/UserOcr.js +39 -0
- package/dist/UI/OCRCom/index.d.ts +2 -0
- package/dist/UI/OCRCom/index.js +34 -0
- package/dist/UI/Table/CheckModal.d.ts +9 -0
- package/dist/UI/Table/CheckModal.js +28 -0
- package/dist/UI/Table/DefaultTable.js +71 -8
- package/dist/UI/Table/EditTable.js +2 -0
- package/dist/UI/Table/data.d.ts +1 -1
- package/dist/UI/Table/data.js +1 -1
- package/dist/UI/Table/hooks.d.ts +20 -0
- package/dist/UI/Table/hooks.js +48 -0
- package/dist/UI/index.js +29 -1
- package/dist/UploadDemo.js +4 -2
- package/dist/components/Asr/index.d.ts +7 -0
- package/dist/components/Asr/index.js +22 -0
- package/dist/components/Button/button.d.ts +4 -0
- package/dist/components/Button/button.js +66 -4
- package/dist/components/ChatRoom/components/AntModal.d.ts +8 -0
- package/dist/components/ChatRoom/components/AntModal.js +80 -0
- package/dist/components/ChatRoom/components/ChatIcon.d.ts +7 -0
- package/dist/components/ChatRoom/components/ChatIcon.js +6 -0
- package/dist/components/ChatRoom/components/ChatInput.d.ts +7 -0
- package/dist/components/ChatRoom/components/ChatInput.js +97 -0
- package/dist/components/ChatRoom/components/ChatItem.d.ts +15 -0
- package/dist/components/ChatRoom/components/ChatItem.js +13 -0
- package/dist/components/ChatRoom/components/ChatItemTime.d.ts +6 -0
- package/dist/components/ChatRoom/components/ChatItemTime.js +7 -0
- package/dist/components/ChatRoom/components/Room.d.ts +9 -0
- package/dist/components/ChatRoom/components/Room.js +15 -0
- package/dist/components/ChatRoom/components/RoomItem.d.ts +19 -0
- package/dist/components/ChatRoom/components/RoomItem.js +24 -0
- package/dist/components/ChatRoom/components/RoomOperation.d.ts +7 -0
- package/dist/components/ChatRoom/components/RoomOperation.js +6 -0
- package/dist/components/ChatRoom/components/RoomTitle.d.ts +7 -0
- package/dist/components/ChatRoom/components/RoomTitle.js +22 -0
- package/dist/components/ChatRoom/components/index.d.ts +5 -0
- package/dist/components/ChatRoom/components/index.js +5 -0
- package/dist/components/ChatRoom/hooks/index.d.ts +2 -0
- package/dist/components/ChatRoom/hooks/index.js +2 -0
- package/dist/components/ChatRoom/hooks/useRoomList.d.ts +10 -0
- package/dist/components/ChatRoom/hooks/useRoomList.js +23 -0
- package/dist/components/ChatRoom/hooks/useRoomOperation.d.ts +5 -0
- package/dist/components/ChatRoom/hooks/useRoomOperation.js +17 -0
- package/dist/components/ChatRoom/index.d.ts +4 -0
- package/dist/components/ChatRoom/index.js +42 -0
- package/dist/components/ChatRoom/interface.d.ts +44 -0
- package/dist/components/ChatRoom/interface.js +1 -0
- package/dist/components/ChatRoom/utils.d.ts +4 -0
- package/dist/components/ChatRoom/utils.js +7 -0
- package/dist/components/Collapse/collapse.d.ts +1 -0
- package/dist/components/Collapse/collapse.js +2 -2
- package/dist/components/EnhanceSelect/index.d.ts +2 -1
- package/dist/components/EnhanceSelect/index.js +262 -309
- package/dist/components/Form/form.js +32 -2
- package/dist/components/Input/input.d.ts +12 -0
- package/dist/components/Input/input.js +61 -9
- package/dist/components/InputNumber/input-number.d.ts +7 -5
- package/dist/components/InputNumber/input-number.js +46 -6
- package/dist/components/Modal/modal.d.ts +1 -0
- package/dist/components/Modal/modal.js +43 -3
- package/dist/components/OCR/Camera/Container.d.ts +4 -0
- package/dist/components/OCR/Camera/Container.js +40 -0
- package/dist/components/OCR/Camera/Item.d.ts +7 -0
- package/dist/components/OCR/Camera/Item.js +10 -0
- package/dist/components/OCR/Camera/camera.d.ts +61 -0
- package/dist/components/OCR/Camera/camera.js +166 -0
- package/dist/components/OCR/Camera/cameraUtils.d.ts +10 -0
- package/dist/components/OCR/Camera/cameraUtils.js +109 -0
- package/dist/components/OCR/Camera/constants.d.ts +3 -0
- package/dist/components/OCR/Camera/constants.js +3 -0
- package/dist/components/OCR/Camera/hooks.d.ts +20 -0
- package/dist/components/OCR/Camera/hooks.js +129 -0
- package/dist/components/OCR/Camera/index.d.ts +10 -0
- package/dist/components/OCR/Camera/index.js +28 -0
- package/dist/components/OCR/Camera/wsCamera.d.ts +22 -0
- package/dist/components/OCR/Camera/wsCamera.js +456 -0
- package/dist/components/OCR/CanvasCom.d.ts +8 -0
- package/dist/components/OCR/CanvasCom.js +28 -0
- package/dist/components/OCR/LoadPicture.d.ts +11 -0
- package/dist/components/OCR/LoadPicture.js +56 -0
- package/dist/components/OCR/SelectTemplate.d.ts +10 -0
- package/dist/components/OCR/SelectTemplate.js +14 -0
- package/dist/components/OCR/SettingCom.d.ts +14 -0
- package/dist/components/OCR/SettingCom.js +363 -0
- package/dist/components/OCR/constants.d.ts +1 -0
- package/dist/components/OCR/constants.js +2 -0
- package/dist/components/OCR/data.d.ts +6 -0
- package/dist/components/OCR/data.js +596 -0
- package/dist/components/OCR/hooks.d.ts +21 -0
- package/dist/components/OCR/hooks.js +270 -0
- package/dist/components/OCR/index.d.ts +11 -0
- package/dist/components/OCR/index.js +52 -0
- package/dist/components/OCR/selectTemplateHooks.d.ts +9 -0
- package/dist/components/OCR/selectTemplateHooks.js +74 -0
- package/dist/components/OCR/settingHooks.d.ts +5 -0
- package/dist/components/OCR/settingHooks.js +45 -0
- package/dist/components/OCR/utils.d.ts +6 -0
- package/dist/components/OCR/utils.js +153 -0
- package/dist/components/OCR_COM/Camera/Container.d.ts +4 -0
- package/dist/components/OCR_COM/Camera/Container.js +40 -0
- package/dist/components/OCR_COM/Camera/Item.d.ts +7 -0
- package/dist/components/OCR_COM/Camera/Item.js +10 -0
- package/dist/components/OCR_COM/Camera/camera.d.ts +61 -0
- package/dist/components/OCR_COM/Camera/camera.js +166 -0
- package/dist/components/OCR_COM/Camera/cameraUtils.d.ts +10 -0
- package/dist/components/OCR_COM/Camera/cameraUtils.js +109 -0
- package/dist/components/OCR_COM/Camera/constants.d.ts +3 -0
- package/dist/components/OCR_COM/Camera/constants.js +3 -0
- package/dist/components/OCR_COM/Camera/hooks.d.ts +20 -0
- package/dist/components/OCR_COM/Camera/hooks.js +129 -0
- package/dist/components/OCR_COM/Camera/index.d.ts +10 -0
- package/dist/components/OCR_COM/Camera/index.js +37 -0
- package/dist/components/OCR_COM/Camera/wsCamera.d.ts +22 -0
- package/dist/components/OCR_COM/Camera/wsCamera.js +456 -0
- package/dist/components/OCR_COM/DrawerOcr.d.ts +8 -0
- package/dist/components/OCR_COM/DrawerOcr.js +118 -0
- package/dist/components/OCR_COM/canvasUtils.d.ts +11 -0
- package/dist/components/OCR_COM/canvasUtils.js +31 -0
- package/dist/components/OCR_COM/components/OperationContainer.d.ts +9 -0
- package/dist/components/OCR_COM/components/OperationContainer.js +9 -0
- package/dist/components/OCR_COM/components/PaginationOcr.d.ts +9 -0
- package/dist/components/OCR_COM/components/PaginationOcr.js +10 -0
- package/dist/components/OCR_COM/components/Placeholder.d.ts +3 -0
- package/dist/components/OCR_COM/components/Placeholder.js +12 -0
- package/dist/components/OCR_COM/components/RectifyImg.d.ts +2 -0
- package/dist/components/OCR_COM/components/RectifyImg.js +97 -0
- package/dist/components/OCR_COM/components/SettingOcr.d.ts +12 -0
- package/dist/components/OCR_COM/components/SettingOcr.js +223 -0
- package/dist/components/OCR_COM/components/UploadOcr.d.ts +8 -0
- package/dist/components/OCR_COM/components/UploadOcr.js +105 -0
- package/dist/components/OCR_COM/components/UserList.d.ts +36 -0
- package/dist/components/OCR_COM/components/UserList.js +59 -0
- package/dist/components/OCR_COM/components/UserOcr.d.ts +14 -0
- package/dist/components/OCR_COM/components/UserOcr.js +85 -0
- package/dist/components/OCR_COM/components/UserOcrTable.d.ts +14 -0
- package/dist/components/OCR_COM/components/UserOcrTable.js +120 -0
- package/dist/components/OCR_COM/components/index.d.ts +8 -0
- package/dist/components/OCR_COM/components/index.js +8 -0
- package/dist/components/OCR_COM/constants.d.ts +1 -0
- package/dist/components/OCR_COM/constants.js +2 -0
- package/dist/components/OCR_COM/hooks/index.d.ts +12 -0
- package/dist/components/OCR_COM/hooks/index.js +12 -0
- package/dist/components/OCR_COM/hooks/useCamera.d.ts +2 -0
- package/dist/components/OCR_COM/hooks/useCamera.js +5 -0
- package/dist/components/OCR_COM/hooks/useDictionary.d.ts +11 -0
- package/dist/components/OCR_COM/hooks/useDictionary.js +56 -0
- package/dist/components/OCR_COM/hooks/useDrawImgFile.d.ts +28 -0
- package/dist/components/OCR_COM/hooks/useDrawImgFile.js +208 -0
- package/dist/components/OCR_COM/hooks/useFiles.d.ts +14 -0
- package/dist/components/OCR_COM/hooks/useFiles.js +57 -0
- package/dist/components/OCR_COM/hooks/useLoading.d.ts +8 -0
- package/dist/components/OCR_COM/hooks/useLoading.js +12 -0
- package/dist/components/OCR_COM/hooks/useOcrIdentify.d.ts +8 -0
- package/dist/components/OCR_COM/hooks/useOcrIdentify.js +42 -0
- package/dist/components/OCR_COM/hooks/usePrevious.d.ts +3 -0
- package/dist/components/OCR_COM/hooks/usePrevious.js +12 -0
- package/dist/components/OCR_COM/hooks/useRectify.d.ts +13 -0
- package/dist/components/OCR_COM/hooks/useRectify.js +173 -0
- package/dist/components/OCR_COM/hooks/useRectifyServer.d.ts +6 -0
- package/dist/components/OCR_COM/hooks/useRectifyServer.js +68 -0
- package/dist/components/OCR_COM/hooks/useSetting.d.ts +27 -0
- package/dist/components/OCR_COM/hooks/useSetting.js +288 -0
- package/dist/components/OCR_COM/hooks/useUser.d.ts +14 -0
- package/dist/components/OCR_COM/hooks/useUser.js +110 -0
- package/dist/components/OCR_COM/hooks/useUserClickItem.d.ts +7 -0
- package/dist/components/OCR_COM/hooks/useUserClickItem.js +35 -0
- package/dist/components/OCR_COM/hooks/useUserClickRow.d.ts +7 -0
- package/dist/components/OCR_COM/hooks/useUserClickRow.js +38 -0
- package/dist/components/OCR_COM/index.d.ts +30 -0
- package/dist/components/OCR_COM/index.js +120 -0
- package/dist/components/OCR_COM/utils.d.ts +10 -0
- package/dist/components/OCR_COM/utils.js +73 -0
- package/dist/components/PrintContainer/handle.js +117 -47
- package/dist/components/PrintContainer/kkJSBridge.d.ts +20 -0
- package/dist/components/PrintContainer/kkJSBridge.js +97 -0
- package/dist/components/PrintContainer/print-container.d.ts +11 -0
- package/dist/components/PrintContainer/print-container.js +373 -430
- package/dist/components/PrintContainer/sealHooks.d.ts +19 -0
- package/dist/components/PrintContainer/sealHooks.js +215 -0
- package/dist/components/PrintContainer/service.d.ts +14 -0
- package/dist/components/PrintContainer/service.js +238 -2
- package/dist/components/PrintContainer/useAboutExport.d.ts +7 -0
- package/dist/components/PrintContainer/useAboutExport.js +134 -0
- package/dist/components/PrintContainer/useFont.d.ts +5 -0
- package/dist/components/PrintContainer/useFont.js +74 -0
- package/dist/components/PrintContainer/utils.js +7 -6
- package/dist/components/ProForm/index.js +20 -5
- package/dist/components/ProForm/interface.d.ts +46 -2
- package/dist/components/ProForm/item.d.ts +13 -0
- package/dist/components/ProForm/item.js +175 -0
- package/dist/components/ProForm/items.js +19 -123
- package/dist/components/ProForm/search-drawer.js +1 -1
- package/dist/components/ProModal/index.js +0 -1
- package/dist/components/ProTable/hooks.js +7 -0
- package/dist/components/ProTable/index.js +1 -0
- package/dist/components/Table/hooks/useColumns.d.ts +5 -0
- package/dist/components/Table/hooks/useColumns.js +146 -35
- package/dist/components/Table/hooks/useDropRef.js +2 -1
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/table-dynamic.js +65 -9
- package/dist/components/Table/table-enhance-cell.js +38 -4
- package/dist/components/Table/table-enhance-row.d.ts +1 -0
- package/dist/components/Table/table-enhance-row.js +5 -2
- package/dist/components/Table/table-headTooltip.d.ts +6 -0
- package/dist/components/Table/table-headTooltip.js +13 -0
- package/dist/components/Table/table-sort.d.ts +10 -0
- package/dist/components/Table/table-sort.js +64 -0
- package/dist/components/Table/table.d.ts +4 -0
- package/dist/components/Table/table.js +153 -29
- package/dist/components/Table/utils/getSummaryData.js +2 -1
- package/dist/components/Table/utils/validate.d.ts +1 -1
- package/dist/components/Table/utils/validate.js +5 -2
- package/dist/components/TimePicker/time-picker.d.ts +1 -0
- package/dist/components/Upload/upload-table.js +1 -1
- package/dist/components/Upload/upload.d.ts +1 -0
- package/dist/components/Upload/upload.js +6 -1
- package/dist/components/basic/message.js +7 -6
- package/dist/components/business/Common/UserForgetPassword/index.js +16 -6
- package/dist/components/business/Common/UserPassword/index.js +17 -7
- package/dist/components/business/Container/operation-middle.js +1 -1
- package/dist/components/business/Footer/index.d.ts +1 -0
- package/dist/components/business/Footer/index.js +3 -3
- package/dist/components/business/SearchContainer/hooks/useDynamic.js +133 -27
- package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
- package/dist/components/business/SearchContainer/hooks/useToggle.js +11 -8
- package/dist/components/business/SearchContainer/search-container.d.ts +6 -0
- package/dist/components/business/SearchContainer/search-container.js +8 -2
- package/dist/components/business/SearchContainer/search-drawer.js +1 -1
- package/dist/components/business/SearchContainer/search-item.d.ts +0 -3
- package/dist/components/business/SearchContainer/search-item.js +17 -5
- package/dist/components/business/SearchContainer/search-left.d.ts +1 -0
- package/dist/components/business/SearchContainer/search-left.js +21 -51
- package/dist/components/business/SearchContainer/search-right.d.ts +2 -0
- package/dist/components/business/SearchContainer/search-right.js +56 -5
- package/dist/components/business/Signatures/components/DetailTable.d.ts +2 -0
- package/dist/components/business/Signatures/components/DetailTable.js +19 -10
- package/dist/components/business/Signatures/components/QunjSeal.js +2 -2
- package/dist/components/business/Signatures/components/SealCheckbox.js +1 -0
- package/dist/components/business/Signatures/hooks.js +7 -0
- package/dist/components/business/Signatures/index.js +70 -49
- package/dist/components/business/Signatures/props.d.ts +6 -0
- package/dist/components/utils/ZtxkContext.d.ts +7 -0
- package/dist/components/utils/ZtxkContext.js +7 -0
- package/dist/components/utils/isEqual.d.ts +2 -0
- package/dist/components/utils/isEqual.js +43 -0
- package/dist/components/utils/upload.js +1 -0
- package/dist/components/utils/useAsr.d.ts +90 -0
- package/dist/components/utils/useAsr.js +468 -0
- package/dist/components/utils/useBaseContext.d.ts +5 -0
- package/dist/components/utils/useBaseContext.js +10 -0
- package/dist/components/utils/useLastest.d.ts +2 -0
- package/dist/components/utils/useLastest.js +6 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/hooks/useFormatter.d.ts +4 -0
- package/dist/hooks/useFormatter.js +63 -3
- package/dist/index.css +658 -37
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +95 -93
- package/package.json +11 -5
- package/dist/speed.d.ts +0 -2
- package/dist/speed.js +0 -25
package/README.md
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
# 前端ui库
|
|
2
|
-
|
|
3
|
-
## 关于 typescript 相关配置说明
|
|
4
|
-
|
|
5
|
-
_[tsconfig.json](https://www.tslang.cn/docs/handbook/tsconfig-json.html) 如果一个目录下存在一个 tsconfig.json 文件,那么它意味着这个目录是 TypeScript 项目的根目录。tsconfig.json 文件中指定了用来编译这个项目的根文件和编译选现_
|
|
6
|
-
|
|
7
|
-
- compilerOptions 可以忽略,如果忽略 会使用默认值
|
|
8
|
-
- outDir 指定的目录下的文件永远会被编译器排除,除非使用 files 包含
|
|
9
|
-
- typeRoots 默认所有可见的 @types 包会在编译过程中被包含进来,如果指定了这个配置 只有他下面的包才会被包含进来
|
|
10
|
-
|
|
11
|
-
* files 指定一个包含相对或绝对文件路径的列表,优先级最高
|
|
12
|
-
* include 需要编译的文件 优先级最低
|
|
13
|
-
* exclude 不需要编译的文件 优先级中等
|
|
14
|
-
* extends 继承配置 继承的文件会覆盖源文件
|
|
15
|
-
|
|
16
|
-
_[eslint](https://eslint.bootcss.com/docs/user-guide/getting-started)ESLint 是在 ECMAScript/JavaScript 代码中识别和报告模式匹配的工具,它的目标是保证代码的一致性和避免错误_
|
|
17
|
-
|
|
18
|
-
- parser 解析器(eslint 默认使用 Espree 作为其解析器)
|
|
19
|
-
- parserOptions 解析器配置选项
|
|
20
|
-
- env 和 globals 环境和全局变量
|
|
21
|
-
|
|
22
|
-
* rules 规则(off 或 0,关闭规则;warn 或 1,开启规则;error 或 2,开启规则,并会出错阻止代码运行)
|
|
23
|
-
- semi 是否使用分号(当前不使用 错误级别 1)
|
|
24
|
-
- no-trailing-spaces 禁止行尾空格
|
|
25
|
-
- array-bracket-spacing 强制数组括号内的空格一致
|
|
26
|
-
- operator-linebreak 强制操作符使用一致的换行符
|
|
27
|
-
- function-paren-newline 强制函数括号内使用一致的换行
|
|
28
|
-
* no-magic-numbers 禁止使用魔术数字
|
|
29
|
-
- ignoreArrayIndexes 数字可否作为数组的索引
|
|
30
|
-
- block-spacing 禁止或强制在代码块中开括号前和闭括号后有空格
|
|
31
|
-
- brace-style 大括号风格要求
|
|
32
|
-
- no-multiple-empty-lines 最大换行数
|
|
33
|
-
- object-curly-spacing 强制在花括号中使用一致的空格
|
|
34
|
-
* comma-spacing 强制在逗号周围使用空格
|
|
35
|
-
- before false 禁止逗号前使用空格
|
|
36
|
-
- after true 要求逗号后使用一个或多个空格
|
|
37
|
-
* keyword-spacing 强制关键字周围空格的一致性
|
|
38
|
-
- before true (默认) 要求在关键字之前至少有一个空格
|
|
39
|
-
- after true (默认) 要求在关键字之后至少有一个空格
|
|
40
|
-
* comma-style 逗号风格
|
|
41
|
-
- last (默认) 要求逗号放在数组元素、对象属性或变量声明之后,且在同一行
|
|
42
|
-
- no-multi-spaces 禁止出现多个空格
|
|
43
|
-
|
|
44
|
-
- plugins 插件(插件可以提供处理器 配置在 processor 中 通过 pluginName/parserName)
|
|
45
|
-
- overrides 为特定类型的文件指定处理器,请使用 overrides 和 processor 的组合
|
|
46
|
-
- extends 拓展 一个配置文件可以被基础配置中的已启用的规则继承
|
|
47
|
-
- settings 提供给每一个将被执行的规则
|
|
48
|
-
- root 如果为 true 则项目中的 eslint 规则 在根目录中找
|
|
49
|
-
|
|
50
|
-
## 本地调试
|
|
51
|
-
|
|
52
|
-
```json
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"react": ">=16.9.0",
|
|
55
|
-
"react-dom": ">=16.9.0"
|
|
56
|
-
}
|
|
57
|
-
```
|
|
1
|
+
# 前端ui库
|
|
2
|
+
|
|
3
|
+
## 关于 typescript 相关配置说明
|
|
4
|
+
|
|
5
|
+
_[tsconfig.json](https://www.tslang.cn/docs/handbook/tsconfig-json.html) 如果一个目录下存在一个 tsconfig.json 文件,那么它意味着这个目录是 TypeScript 项目的根目录。tsconfig.json 文件中指定了用来编译这个项目的根文件和编译选现_
|
|
6
|
+
|
|
7
|
+
- compilerOptions 可以忽略,如果忽略 会使用默认值
|
|
8
|
+
- outDir 指定的目录下的文件永远会被编译器排除,除非使用 files 包含
|
|
9
|
+
- typeRoots 默认所有可见的 @types 包会在编译过程中被包含进来,如果指定了这个配置 只有他下面的包才会被包含进来
|
|
10
|
+
|
|
11
|
+
* files 指定一个包含相对或绝对文件路径的列表,优先级最高
|
|
12
|
+
* include 需要编译的文件 优先级最低
|
|
13
|
+
* exclude 不需要编译的文件 优先级中等
|
|
14
|
+
* extends 继承配置 继承的文件会覆盖源文件
|
|
15
|
+
|
|
16
|
+
_[eslint](https://eslint.bootcss.com/docs/user-guide/getting-started)ESLint 是在 ECMAScript/JavaScript 代码中识别和报告模式匹配的工具,它的目标是保证代码的一致性和避免错误_
|
|
17
|
+
|
|
18
|
+
- parser 解析器(eslint 默认使用 Espree 作为其解析器)
|
|
19
|
+
- parserOptions 解析器配置选项
|
|
20
|
+
- env 和 globals 环境和全局变量
|
|
21
|
+
|
|
22
|
+
* rules 规则(off 或 0,关闭规则;warn 或 1,开启规则;error 或 2,开启规则,并会出错阻止代码运行)
|
|
23
|
+
- semi 是否使用分号(当前不使用 错误级别 1)
|
|
24
|
+
- no-trailing-spaces 禁止行尾空格
|
|
25
|
+
- array-bracket-spacing 强制数组括号内的空格一致
|
|
26
|
+
- operator-linebreak 强制操作符使用一致的换行符
|
|
27
|
+
- function-paren-newline 强制函数括号内使用一致的换行
|
|
28
|
+
* no-magic-numbers 禁止使用魔术数字
|
|
29
|
+
- ignoreArrayIndexes 数字可否作为数组的索引
|
|
30
|
+
- block-spacing 禁止或强制在代码块中开括号前和闭括号后有空格
|
|
31
|
+
- brace-style 大括号风格要求
|
|
32
|
+
- no-multiple-empty-lines 最大换行数
|
|
33
|
+
- object-curly-spacing 强制在花括号中使用一致的空格
|
|
34
|
+
* comma-spacing 强制在逗号周围使用空格
|
|
35
|
+
- before false 禁止逗号前使用空格
|
|
36
|
+
- after true 要求逗号后使用一个或多个空格
|
|
37
|
+
* keyword-spacing 强制关键字周围空格的一致性
|
|
38
|
+
- before true (默认) 要求在关键字之前至少有一个空格
|
|
39
|
+
- after true (默认) 要求在关键字之后至少有一个空格
|
|
40
|
+
* comma-style 逗号风格
|
|
41
|
+
- last (默认) 要求逗号放在数组元素、对象属性或变量声明之后,且在同一行
|
|
42
|
+
- no-multi-spaces 禁止出现多个空格
|
|
43
|
+
|
|
44
|
+
- plugins 插件(插件可以提供处理器 配置在 processor 中 通过 pluginName/parserName)
|
|
45
|
+
- overrides 为特定类型的文件指定处理器,请使用 overrides 和 processor 的组合
|
|
46
|
+
- extends 拓展 一个配置文件可以被基础配置中的已启用的规则继承
|
|
47
|
+
- settings 提供给每一个将被执行的规则
|
|
48
|
+
- root 如果为 true 则项目中的 eslint 规则 在根目录中找
|
|
49
|
+
|
|
50
|
+
## 本地调试
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"react": ">=16.9.0",
|
|
55
|
+
"react-dom": ">=16.9.0"
|
|
56
|
+
}
|
|
57
|
+
```
|
package/dist/App.js
CHANGED
|
@@ -1209,7 +1209,7 @@ function App() {
|
|
|
1209
1209
|
React.createElement(DetailList, { records: inspectionDetail, labelWidth: 10, labelAlign: "center", apiBaseUrl: "http://192.168.0.83:8888", fileBaseUrl: "http://192.168.0.83:88", previewBtnDisable: true, hasManOrDate: true, hasSignArea: true }),
|
|
1210
1210
|
React.createElement(DetailList, { records: inspectionDetail, labelWidth: 10, labelAlign: "right", apiBaseUrl: "http://192.168.0.83:8888", fileBaseUrl: "http://192.168.0.83:88", previewBtnDisable: true, hasManOrDate: true, hasSignArea: true }),
|
|
1211
1211
|
React.createElement(DetailList, { apiBaseUrl: "http://192.168.0.83:8888", fileBaseUrl: "http://192.168.0.83:88", hasSignArea: true, isDark: true, labelWidth: 10 }),
|
|
1212
|
-
inspectionData.map(function (item
|
|
1212
|
+
inspectionData.map(function (item) {
|
|
1213
1213
|
var inspectionDesc = [
|
|
1214
1214
|
{ title: '巡检人', content: item.inspectionMan },
|
|
1215
1215
|
{ title: '上传时间', content: item.inspectionTime },
|
|
@@ -1228,7 +1228,7 @@ function App() {
|
|
|
1228
1228
|
return itemObj;
|
|
1229
1229
|
});
|
|
1230
1230
|
}
|
|
1231
|
-
return (React.createElement(DetailCard, { title: item.inspectionName, desc: inspectionDesc, records: records
|
|
1231
|
+
return (React.createElement(DetailCard, { title: item.inspectionName, desc: inspectionDesc, records: records }));
|
|
1232
1232
|
}),
|
|
1233
1233
|
React.createElement(Upload, { method: "post", headers: {
|
|
1234
1234
|
'Zmdms-Auth': 'bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJtZW1iZXJfdHlwZSI6MSwiaGFuZGxlX2hyX3Bob25lIjpudWxsLCJpbmR1Y3Rpb25fc291cmNlX3R5cGUiOm51bGwsInJlc3VtZV9kYXRlIjpudWxsLCJ1c2VyX25hbWUiOiJZRzIxMDE0IiwiaW10X2lkIjpudWxsLCJyZWFsX25hbWUiOiLpmYjkuprpm4QiLCJjbGllbnRfdHlwZSI6IndlYiIsImRhdGFfcm9sZV9pZCI6IjEzNDM0OTA2ODYyNjAyMjgwOTcsMTM0NTk3ODUwNTMwMjA1Njk2MiIsImNsaWVudF9pZCI6InN3b3JkIiwiZW1wbG95bWVudF9mb3JtX3R5cGUiOm51bGwsInVzZXJfdHlwZSI6IndlYiIsInJvbGVfaWQiOiIxMTIzNTk4ODE2NzM4Njc1MjAxLDEzNDM0OTA0MjUwMDEyMjYyNDIiLCJwb3N0X25hbWUiOm51bGwsInNjb3BlIjpbImFsbCJdLCJpbnRlcnZpZXdfaWQiOm51bGwsImV4cCI6MTYzMjQ2NzEyNSwianRpIjoiZmNiZTYwYWEtOTJjOC00ODhjLTgxYTUtOTQ2ZDJiYzJiNDM4IiwibWVtYmVyX2lkIjoxMzQ1OTkyODc4MTYyNjQ5MDkwLCJjb21wYW55X2lkIjoxMjk1OTA4NjI3OTg0NjcwNzIyLCJzeXN0ZW1faWQiOiIyIiwiZGVwdF9uYW1lIjoi5rWL6K-V6YOo6ZeoMjIxMjEyMTIiLCJhdmF0YXIiOiIiLCJkYXRhX3JvbGVfbmFtZSI6Im51bGwsbnVsbCIsImF1dGhvcml0aWVzIjpbIuWGheWLpCIsImFkbWluaXN0cmF0b3IiXSwicm9sZV9uYW1lIjoiYWRtaW5pc3RyYXRvcizlhoXli6QiLCJsaWNlbnNlIjoicG93ZXJlZCBieSB6bWRtcyIsInBvc3RfaWQiOiIiLCJ1c2VyX2lkIjoiMTM0NTk5OTc3MDM4NTU4MDAzNCIsIm5pY2tfbmFtZSI6IumZiOS6mumbhCIsImNvbXBhbnlfbmFtZSI6Iua1meWVhuS4reaLk-mbhuWbou-8iOmHjeW6hu-8ieaciemZkOWFrOWPuGxjeSIsImRlcHRfaWQiOiIxMjk1OTA5NDg4MDAxNTQwMDk3IiwiaGFuZGxlX2hyX25hbWUiOm51bGwsImFjY291bnQiOiJZRzIxMDE0IiwicmVzdW1lX2lkIjpudWxsfQ.uWW6lWQyAPWeQmTNw9w4PMYPNWHPGvhCxquaA958J5o',
|
|
@@ -1298,17 +1298,11 @@ function App() {
|
|
|
1298
1298
|
React.createElement(Checkbox, { value: "2" }, "\u5426"))),
|
|
1299
1299
|
React.createElement(SearchItem, { name: "sss", label: "", noLabelShowBg: true },
|
|
1300
1300
|
React.createElement(Checkbox, { value: "1" }, "\u662F")),
|
|
1301
|
-
React.createElement(SearchItem, { name: "
|
|
1302
|
-
React.createElement(Checkbox, { value: "1" }, "\u662Fsa")),
|
|
1303
|
-
React.createElement(SearchItem, { name: "sssd1", label: "", hiddenLabelName: "\u52A8\u6001\u8868\u5355\u914D\u7F6Esssd1", noLabelShowBg: true, dynamicdisabled: "1" },
|
|
1304
|
-
React.createElement(Checkbox, { value: "1" }, "\u662Fa")),
|
|
1305
|
-
React.createElement(SearchItem, { name: "sss1", label: "", hiddenLabelName: "\u52A8\u6001\u8868\u5355\u914D\u7F6E", noLabelShowBg: true, dynamicdisabled: "1" },
|
|
1306
|
-
React.createElement(Checkbox, { value: "1" }, "\u662F")),
|
|
1307
|
-
React.createElement(SearchItem, { name: "ssss1", label: "", hiddenLabelName: "\u52A8\u6001\u8868\u5355\u914D\u7F6Es1", noLabelShowBg: true, dynamicdisabled: "1" },
|
|
1301
|
+
React.createElement(SearchItem, { name: "sss1", label: "", hiddenLabelName: "\u52A8\u6001\u8868\u5355\u914D\u7F6E", noLabelShowBg: true },
|
|
1308
1302
|
React.createElement(Checkbox, { value: "1" }, "\u662F")),
|
|
1309
1303
|
React.createElement(SearchItem, { name: "sss2", label: "", hiddenLabelName: "\u52A8\u6001\u8868\u5355\u914D\u7F6E", noLabelShowBg: true },
|
|
1310
1304
|
React.createElement(Checkbox, { value: "1" }, "\u662F")),
|
|
1311
|
-
React.createElement(SearchItem, { name: "
|
|
1305
|
+
React.createElement(SearchItem, { name: "sss2", label: "", hiddenLabelName: "\u52A8\u6001\u8868\u5355\u914D\u7F6E", noLabelShowBg: true },
|
|
1312
1306
|
React.createElement(Radio, { value: "1" }, "\u662F")),
|
|
1313
1307
|
React.createElement(SearchItem, { name: "test2", label: "\u90E8\u95E8\u540D\u79F0", rules: [{ required: true, message: '请选择仓库名称' }] },
|
|
1314
1308
|
React.createElement(Radio.Group, null,
|
package/dist/Demo.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import EnhanceSelect from 'components/EnhanceSelect';
|
|
2
|
+
import { Button } from './';
|
|
2
3
|
import { useEffect, useState } from 'react';
|
|
3
4
|
import { stringify } from 'qs';
|
|
4
5
|
import { Link } from 'react-router-dom';
|
|
@@ -63,8 +64,14 @@ function Demo() {
|
|
|
63
64
|
}
|
|
64
65
|
};
|
|
65
66
|
}, []);
|
|
67
|
+
var _j = useState(1), num = _j[0], setNum = _j[1];
|
|
66
68
|
return (React.createElement("div", { style: { height: 2000 } },
|
|
67
69
|
React.createElement(Link, { to: "/test" }, "test"),
|
|
70
|
+
React.createElement("div", { onClick: function () {
|
|
71
|
+
setNum(num + 1);
|
|
72
|
+
} },
|
|
73
|
+
"\u8BBE\u7F6E",
|
|
74
|
+
num),
|
|
68
75
|
React.createElement("div", null,
|
|
69
76
|
React.createElement(EnhanceSelect, { style: selectStyle, list: list, isHandAddItem: true, value: value1, showAll: true, onChange: function (value) {
|
|
70
77
|
console.log(value, typeof value);
|
|
@@ -121,9 +128,31 @@ function Demo() {
|
|
|
121
128
|
// defaultList={defaultList}
|
|
122
129
|
isClickRequest: true }),
|
|
123
130
|
React.createElement("p", null, "\u4E00\u6B21\u6027\u52A0\u8F7D\u6570\u636E"),
|
|
124
|
-
React.createElement(EnhanceSelect, { style: selectStyle, placeholder: "\u4E00\u6B21\u6027\u52A0\u8F7D\u6570\u636E",
|
|
125
|
-
|
|
131
|
+
React.createElement(EnhanceSelect, { style: selectStyle, placeholder: "\u4E00\u6B21\u6027\u52A0\u8F7D\u6570\u636E",
|
|
132
|
+
// url="http://192.168.0.83:8000/api/zmdms-system/company/list"
|
|
133
|
+
request: request,
|
|
134
|
+
// dataKey="id"
|
|
135
|
+
// titleKey="name"
|
|
136
|
+
// isPaste
|
|
137
|
+
// mode="multiple"
|
|
138
|
+
value: value3, isCatch: true, onChange: function (value, option, fullData) {
|
|
139
|
+
console.log(value);
|
|
126
140
|
setValue3(value);
|
|
141
|
+
}, dataKey: "id", titleKey: "name", url: "http://192.168.0.83:8000/api/zmdms-scm-accounting/advancepaymentoverdue/getOveStatusEnum", method: "GET",
|
|
142
|
+
// isCatch
|
|
143
|
+
// request={request}
|
|
144
|
+
transformData: function (res) {
|
|
145
|
+
var dataList = [];
|
|
146
|
+
for (var item in res.data.data) {
|
|
147
|
+
dataList.push({ key: item, name: res.data.data[item] });
|
|
148
|
+
}
|
|
149
|
+
res.data.data = dataList;
|
|
150
|
+
return res;
|
|
151
|
+
}, dropdownRenderBtns: function () {
|
|
152
|
+
return (React.createElement(Button, { onClick: function (e) {
|
|
153
|
+
e.preventDefault();
|
|
154
|
+
console.log(111);
|
|
155
|
+
} }, "\u6D4B\u8BD5"));
|
|
127
156
|
} }),
|
|
128
157
|
React.createElement("p", null, "\u5F02\u6B65\u83B7\u53D6\u6570\u636E"),
|
|
129
158
|
React.createElement("button", { onClick: function () {
|
|
@@ -2,7 +2,7 @@ import Collapse from 'components/Collapse';
|
|
|
2
2
|
import GridList from 'components/business/NewList';
|
|
3
3
|
function CollapseDemo() {
|
|
4
4
|
return (React.createElement("div", { style: { padding: 20 } },
|
|
5
|
-
React.createElement(Collapse, { showBackground: true },
|
|
5
|
+
React.createElement(Collapse, { showBackground: true, collapsible: "icon" },
|
|
6
6
|
React.createElement(Collapse.Panel, { key: "1", header: "\u4E2A\u4EBA\u4FE1\u606F" },
|
|
7
7
|
React.createElement(GridList, null,
|
|
8
8
|
React.createElement(GridList.FormItem, { span: 8, title: "\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5", showDiff: true, isBlod: true }, "\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1\u518D\u89C1"),
|
package/dist/DemoCom/FormDemo.js
CHANGED
|
@@ -9,18 +9,32 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import React, { useState, useMemo, useRef } from 'react';
|
|
12
|
+
import React, { useState, useMemo, useRef, useEffect } from 'react';
|
|
13
13
|
import SearchContainer from '../components/business/SearchContainer';
|
|
14
14
|
import Form from '../components/Form';
|
|
15
15
|
import Input from '../components/Input';
|
|
16
16
|
import Select from '../components/Select';
|
|
17
|
-
import EnhanceSelect from '../components/EnhanceSelect';
|
|
18
17
|
import DatePicker from '../components/DatePicker';
|
|
19
18
|
import Checkbox from '../components/Checkbox';
|
|
20
19
|
import Radio from '../components/Radio';
|
|
21
20
|
import InputNumber from '../components/InputNumber';
|
|
21
|
+
import EnhanceSelect from '../components/EnhanceSelect';
|
|
22
|
+
import { stringify } from 'qs';
|
|
23
|
+
import { token } from '../constants';
|
|
22
24
|
var SearchItem = SearchContainer.SearchItem, SearchLeft = SearchContainer.SearchLeft, SearchRight = SearchContainer.SearchRight;
|
|
23
25
|
var RangePicker = DatePicker.RangePicker;
|
|
26
|
+
function request(options) {
|
|
27
|
+
return fetch(options.url + "?" + stringify(options.params), {
|
|
28
|
+
headers: {
|
|
29
|
+
'Zmdms-Auth': "bearer " + token,
|
|
30
|
+
},
|
|
31
|
+
method: options.method,
|
|
32
|
+
})
|
|
33
|
+
.then(function (response) { return response.json(); })
|
|
34
|
+
.then(function (res) {
|
|
35
|
+
return { status: 200, data: res };
|
|
36
|
+
});
|
|
37
|
+
}
|
|
24
38
|
var configInfo = {
|
|
25
39
|
pwNoCopy: {
|
|
26
40
|
isRequired: 1,
|
|
@@ -47,11 +61,6 @@ var configInfo = {
|
|
|
47
61
|
isChangeable: 1,
|
|
48
62
|
isDisplay: 1,
|
|
49
63
|
},
|
|
50
|
-
type77: {
|
|
51
|
-
isRequired: 1,
|
|
52
|
-
isChangeable: 1,
|
|
53
|
-
isDisplay: 1,
|
|
54
|
-
},
|
|
55
64
|
};
|
|
56
65
|
var getCustomDom = function () {
|
|
57
66
|
return (React.createElement(React.Fragment, { key: "search-form-fragment-id" },
|
|
@@ -60,38 +69,63 @@ var getCustomDom = function () {
|
|
|
60
69
|
React.createElement(SearchItem, { name: "type8", width: "half", label: "\u4F60\u597D811" },
|
|
61
70
|
React.createElement(Select, null)),
|
|
62
71
|
React.createElement(SearchItem, { name: "type5", width: "all", label: "\u4F60\u597D" },
|
|
63
|
-
React.createElement(Input.TextArea, {
|
|
72
|
+
React.createElement(Input.TextArea, { showCount: true, rows: 3, handleSize: true })),
|
|
73
|
+
React.createElement(SearchItem, { name: "type6", width: "all", label: "\u4F60\u597D" },
|
|
74
|
+
React.createElement(Input.TextArea, { showCount: {
|
|
75
|
+
formatter: function () { return '111'; },
|
|
76
|
+
}, maxLength: 10 }))));
|
|
64
77
|
};
|
|
65
78
|
var FormDemo = function () {
|
|
66
79
|
var form = Form.useForm()[0];
|
|
67
|
-
var _a = useState('
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
80
|
+
var _a = useState('1'), status = _a[0], setStatus = _a[1];
|
|
81
|
+
var _b = useState({}), formData = _b[0], setFormData = _b[1];
|
|
82
|
+
var _c = useState(1), num = _c[0], setNum = _c[1];
|
|
83
|
+
useEffect(function () {
|
|
84
|
+
form.setFieldsValue(formData);
|
|
85
|
+
}, [formData, form]);
|
|
72
86
|
var configInfoMemo = useMemo(function () {
|
|
73
87
|
return __assign(__assign({}, configInfo), { startTime: __assign(__assign({}, configInfo === null || configInfo === void 0 ? void 0 : configInfo.startTime), { isDisplay: status === '1' ? true : false }) });
|
|
74
88
|
}, [status]);
|
|
75
89
|
var handleRef = useRef(null);
|
|
76
90
|
return (React.createElement(React.Fragment, null,
|
|
77
|
-
React.createElement(Form, { name: "test-list", form: form
|
|
91
|
+
React.createElement(Form, { name: "test-list", form: form, onKeyDown: function (event) {
|
|
92
|
+
if (event.key === 'Enter') {
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
event.stopPropagation();
|
|
95
|
+
console.log('提交');
|
|
96
|
+
}
|
|
97
|
+
} },
|
|
78
98
|
React.createElement(SearchContainer, { dark: true },
|
|
79
|
-
React.createElement(SearchLeft
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
99
|
+
React.createElement(SearchLeft
|
|
100
|
+
// configInfo={configInfoMemo}
|
|
101
|
+
, {
|
|
102
|
+
// configInfo={configInfoMemo}
|
|
103
|
+
isDynamic: true, dynamicStorageKey: "symbol-key-00001", isToggle: true, toggleNum: 3, handleRef: handleRef },
|
|
83
104
|
React.createElement(SearchItem, { width: "half", name: "pwNo", configname: "pwNoCopy", label: "\u5165\u5E93\u5355\u53F7", disabled: true, rules: [
|
|
84
105
|
{
|
|
85
106
|
required: true,
|
|
86
107
|
message: '采购基本数据-请选择入库单号',
|
|
87
108
|
},
|
|
88
109
|
] },
|
|
89
|
-
React.createElement(Input.TextArea, { autoSize: true, allowClear: true, disabled: true,
|
|
90
|
-
|
|
110
|
+
React.createElement(Input.TextArea, { autoSize: true, allowClear: true, disabled: true, onBlur: function (e) {
|
|
111
|
+
setFormData(function (preState) {
|
|
112
|
+
return __assign(__assign({}, preState), { pwNo: e.target.value });
|
|
113
|
+
});
|
|
114
|
+
} })),
|
|
115
|
+
React.createElement(SearchItem, { width: "half", name: "pwNo2", configname: "pwNoCopy1", label: "\u5165\u5E93\u5355\u53F71", disabled: true, rules: [
|
|
116
|
+
{
|
|
117
|
+
required: true,
|
|
118
|
+
message: '采购基本数据-请选择入库单号',
|
|
119
|
+
},
|
|
120
|
+
] },
|
|
121
|
+
React.createElement(Input, { allowClear: true, disabled: true, onBlur: function (e) {
|
|
122
|
+
setFormData(function (preState) {
|
|
123
|
+
return __assign(__assign({}, preState), { pwNo: e.target.value });
|
|
124
|
+
});
|
|
91
125
|
} })),
|
|
92
|
-
React.createElement(SearchItem, { width: "half", name: "pwNo1", label: "\u5165\u5E93\u5355\u53F71",
|
|
126
|
+
React.createElement(SearchItem, { width: "half", name: "pwNo1", label: "\u5165\u5E93\u5355\u53F71", rules: [
|
|
93
127
|
{
|
|
94
|
-
required:
|
|
128
|
+
required: true,
|
|
95
129
|
message: '采购基本数据-请选择入库单号1',
|
|
96
130
|
},
|
|
97
131
|
] },
|
|
@@ -99,19 +133,39 @@ var FormDemo = function () {
|
|
|
99
133
|
React.createElement(SearchItem, { width: "half", name: "status", label: "\u5355\u636E\u72B6\u6001" },
|
|
100
134
|
React.createElement(Select, { onChange: function (value) {
|
|
101
135
|
setStatus(value);
|
|
136
|
+
setFormData(function (preState) {
|
|
137
|
+
return __assign(__assign({}, preState), { status: value });
|
|
138
|
+
});
|
|
102
139
|
} },
|
|
103
140
|
React.createElement(Select.Option, { value: "1" }, "\u662F"),
|
|
104
141
|
React.createElement(Select.Option, { value: "0" }, "\u5426"))),
|
|
105
|
-
React.createElement(SearchItem, { name: "intime",
|
|
142
|
+
React.createElement(SearchItem, { name: "intime", rules: [
|
|
143
|
+
{
|
|
144
|
+
required: true,
|
|
145
|
+
message: '采购基本数据-请选择入库单号1',
|
|
146
|
+
},
|
|
147
|
+
], configname: "startTime", label: "\u5165\u5E93\u65E5\u671F" },
|
|
106
148
|
React.createElement(RangePicker, null)),
|
|
107
|
-
React.createElement(SearchItem, { name: "intime1",
|
|
149
|
+
React.createElement(SearchItem, { name: "intime1", rules: [
|
|
150
|
+
{
|
|
151
|
+
required: true,
|
|
152
|
+
message: '采购基本数据-请选择入库单号1',
|
|
153
|
+
},
|
|
154
|
+
], configname: "startTime", label: "\u5165\u5E93\u65E5\u671F" },
|
|
108
155
|
React.createElement(DatePicker, null)),
|
|
109
156
|
React.createElement(SearchItem, { name: "warehouseId", label: "\u4ED3\u5E93\u540D\u79F0" },
|
|
110
157
|
React.createElement(Select, null)),
|
|
111
158
|
React.createElement(SearchItem, { name: "companyId", label: "\u516C\u53F8\u540D\u79F0" },
|
|
112
159
|
React.createElement(Select, null)),
|
|
113
160
|
React.createElement(SearchItem, { name: "companyId1", label: "\u516C\u53F8\u540D\u79F01" },
|
|
114
|
-
React.createElement(
|
|
161
|
+
React.createElement(EnhanceSelect, { placeholder: "\u4E00\u6B21\u6027\u52A0\u8F7D\u6570\u636E", request: request, isCatch: true, dataKey: "id", titleKey: "name", url: "http://192.168.0.83:8000/api/zmdms-scm-accounting/advancepaymentoverdue/getOveStatusEnum", method: "GET", transformData: function (res) {
|
|
162
|
+
var dataList = [];
|
|
163
|
+
for (var item in res.data.data) {
|
|
164
|
+
dataList.push({ key: item, name: res.data.data[item] });
|
|
165
|
+
}
|
|
166
|
+
res.data.data = dataList;
|
|
167
|
+
return res;
|
|
168
|
+
} })),
|
|
115
169
|
React.createElement(SearchItem, { name: "depId", label: "\u90E8\u95E8\u540D\u79F0", rules: [{ required: true, message: '请选择部门名称' }] },
|
|
116
170
|
React.createElement(Select, { allowClear: true },
|
|
117
171
|
React.createElement(Select.Option, { value: "1" }, "\u662F"),
|
|
@@ -139,27 +193,18 @@ var FormDemo = function () {
|
|
|
139
193
|
React.createElement(SearchItem, { name: "type44", width: "half", label: "\u4F60\u597D" },
|
|
140
194
|
React.createElement(Select, null)),
|
|
141
195
|
React.createElement(SearchItem, { name: "type6", width: "half", label: "\u4F60\u597D6" },
|
|
142
|
-
React.createElement(
|
|
143
|
-
{ id: '1', name: '小明' },
|
|
144
|
-
{ id: '2', name: '小红' },
|
|
145
|
-
] })),
|
|
146
|
-
React.createElement(SearchItem, { dependencies: ['type6'], noStyle: true, baseconfig: JSON.stringify({
|
|
147
|
-
name: 'type77',
|
|
148
|
-
label: '你好77',
|
|
149
|
-
}) }, function (_a) {
|
|
150
|
-
var getFieldValue = _a.getFieldValue;
|
|
151
|
-
console.log(getFieldValue('type6'));
|
|
152
|
-
return (React.createElement(SearchItem, { name: "type77", width: "all", label: "\u4F60\u597D77" },
|
|
153
|
-
React.createElement(EnhanceSelect, { list: [
|
|
154
|
-
{ id: '1', name: '小明' },
|
|
155
|
-
{ id: '2', name: '小红' },
|
|
156
|
-
] })));
|
|
157
|
-
}),
|
|
196
|
+
React.createElement(Select, null)),
|
|
158
197
|
getCustomDom()),
|
|
159
198
|
React.createElement(SearchRight, { onSearchHandle: function () {
|
|
160
199
|
var _a;
|
|
161
200
|
(_a = handleRef.current) === null || _a === void 0 ? void 0 : _a.setToggleHandle(false);
|
|
162
|
-
console.log(form.getFieldsValue());
|
|
163
|
-
}, onResetHandle: function () { } })))
|
|
201
|
+
console.log(form.getFieldsValue(), formData);
|
|
202
|
+
}, onResetHandle: function () { } }))),
|
|
203
|
+
React.createElement("button", { onClick: function () {
|
|
204
|
+
// setNum(num + 1);
|
|
205
|
+
form.validateFields();
|
|
206
|
+
} },
|
|
207
|
+
"\u8BBE\u7F6E",
|
|
208
|
+
num)));
|
|
164
209
|
};
|
|
165
210
|
export default FormDemo;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import React, { memo, useEffect } from 'react';
|
|
38
|
+
import SearchContainer from '../components/business/SearchContainer';
|
|
39
|
+
import Form from '../components/Form';
|
|
40
|
+
import Input from '../components/Input';
|
|
41
|
+
import EnhanceSelect from 'components/EnhanceSelect';
|
|
42
|
+
var SearchLeft = SearchContainer.SearchLeft, SearchRight = SearchContainer.SearchRight, Item = SearchContainer.SearchItem;
|
|
43
|
+
var options = [
|
|
44
|
+
{
|
|
45
|
+
label: '小金鱼',
|
|
46
|
+
value: '213',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: '周还会',
|
|
50
|
+
value: '333',
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
for (var i = 10; i < 1000; i++) {
|
|
54
|
+
options.push({
|
|
55
|
+
label: i.toString(36) + i,
|
|
56
|
+
value: i.toString(36) + i,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
var SearchForm = function () {
|
|
60
|
+
var form = Form.useForm()[0];
|
|
61
|
+
/**
|
|
62
|
+
* 搜索数据
|
|
63
|
+
*/
|
|
64
|
+
function onSearchHandle() {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
console.log(form.getFieldsValue());
|
|
68
|
+
return [2 /*return*/];
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 重置表单数据
|
|
74
|
+
*/
|
|
75
|
+
function onResetHandle() {
|
|
76
|
+
form.resetFields();
|
|
77
|
+
}
|
|
78
|
+
useEffect(function () {
|
|
79
|
+
form &&
|
|
80
|
+
form.setFieldsValue({
|
|
81
|
+
type123: 12323,
|
|
82
|
+
});
|
|
83
|
+
}, [form]);
|
|
84
|
+
return (React.createElement(Form, { name: "codeQuery-making", form: form },
|
|
85
|
+
React.createElement(SearchContainer, null,
|
|
86
|
+
React.createElement(SearchLeft, null,
|
|
87
|
+
React.createElement(Item, { name: "type123", label: "\u7F16\u7801\u7C7B\u578B", width: "double", disabled: true, rules: [{ required: true, message: '请填写编码类型' }] },
|
|
88
|
+
React.createElement(Input, null)),
|
|
89
|
+
React.createElement(Item, { name: "name", label: "\u63CF\u8FF0" },
|
|
90
|
+
React.createElement(Input, { allowClear: true })),
|
|
91
|
+
React.createElement(Item, { name: "selcet", label: "\u591A\u9009\u6846" },
|
|
92
|
+
React.createElement(EnhanceSelect, { mode: "multiple", list: options, dataKey: 'value', titleKey: 'label' }))),
|
|
93
|
+
React.createElement(SearchRight, { onSearchHandle: onSearchHandle, onResetHandle: onResetHandle }))));
|
|
94
|
+
};
|
|
95
|
+
export default memo(SearchForm);
|