zy-react-library 2.0.11 → 2.0.13

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 CHANGED
@@ -167,19 +167,19 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
167
167
 
168
168
  ### OptionItem
169
169
 
170
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
171
- | --- | --- | --- | --- | --- |
172
- | `bianma` | `any` | 否 | - | 默认选项值字段。 |
173
- | `name` | `string \| ReactNode` | 否 | - | 默认选项标签字段。 |
174
- | `disabled` | `boolean` | 否 | `false` | 是否禁用当前选项。 |
175
- | `[key: string]` | `any` | 否 | - | 允许携带业务自定义字段。 |
170
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
171
+ | --- | --- | --- | --- | --- |
172
+ | `bianma` | `any` | 否 | - | 默认选项值字段。 |
173
+ | `name` | `string \| ReactNode` | 否 | - | 默认选项标签字段。 |
174
+ | `disabled` | `boolean` | 否 | `false` | 是否禁用当前选项。 |
175
+ | `[key: string]` | `any` | 否 | - | 允许携带业务自定义字段。 |
176
176
 
177
177
  ### ItemsFieldConfig
178
178
 
179
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
180
- | --- | --- | --- | --- | --- |
181
- | `valueKey` | `string` | 否 | `"bianma"` | 选项值字段名。 |
182
- | `labelKey` | `string \| ((item) => ReactNode)` | 否 | `"name"` | 选项标签字段名或自定义标签渲染函数。 |
179
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
180
+ | --- | --- | --- | --- | --- |
181
+ | `valueKey` | `string` | 否 | `"bianma"` | 选项值字段名。 |
182
+ | `labelKey` | `string \| ((item) => ReactNode)` | 否 | `"name"` | 选项标签字段名或自定义标签渲染函数。 |
183
183
 
184
184
  ### FormListUniqueProps
185
185
 
@@ -218,41 +218,41 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
218
218
  | `Page` | `isShowHeader=true`、`headerPrevious=true`、`isShowFooter=true`、`isShowAllAction=true`、`loading=false`、`backButtonText="关闭"`、`contentPadding="20px"`。 |
219
219
  | `HeaderBack` | `previous=true`。 |
220
220
  | `Upload` | `value=[]`、`ratio=""`、`showTip=true`、`multiple=true`;未传 `fileType` 时根据 `accept` 推断,默认按图片;图片默认 `accept=".jpg,.jpeg,.png"`、`maxCount=4`、`size=10`;视频默认 `accept=".mp4"`、`maxCount=1`、`size=100`;文档默认 `accept=".pdf,.doc,.docx"`、`maxCount=4`、`size=10`。 |
221
- | `ImportFile` | `title="导入"`、`labelCol={ span: 4 }`、`exportTemplateButtonText="导出模板"`;弹窗宽度 `600`,内置附件上传 `accept=".xls,.xlsx"`、`listType="text"`、`maxCount=1`。 |
222
- | `PreviewImg` | `files=[]`、`fileUrlKey="filePath"`;图片固定 `width=100`、`height=100`,图片间距 `marginRight=10`、`marginBottom=10`。 |
223
- | `PreviewPdf` | `files=[]`、`nameKey=""`、`urlKey=""`、`name=""`、`url=""`。 |
224
- | `Pdf` | `visible=false`、`inline=false`、`title="PDF预览"`、`style={}`。 |
225
- | `PreviewExcel` | `files=[]`、`nameKey=""`、`urlKey=""`、`name=""`、`url=""`。 |
226
- | `Excel` | `visible=false`、`inline=false`、`title="Excel预览"`、`style={}`;弹窗宽度 `1000`,内容高度 `72vh`。 |
227
- | `PreviewWord` | `files=[]`、`nameKey=""`、`urlKey=""`、`name=""`、`url=""`。 |
228
- | `Word` | `visible=false`、`inline=false`、`title="Word预览"`、`style={}`;弹窗宽度 `900`,内容高度 `72vh`,默认背景 `#f5f5f5`、内边距 `24px`。 |
229
- | `Video` | `source=""`、`vid=""`、`playAuth=""`、`cover=""`、`autoplay=true`、`showProgress=true`、`playTime=0`、`inline=false`、`isLive=false`、`width="100%"`、`height="600px"`、`title="视频"`、`visible=false`、`aliPlayerProps={}`;弹窗宽度 `800`。 |
230
- | `AliPlayer` | `source=""`、`vid=""`、`playAuth=""`、`cover=""`、`width="100%"`、`height="600px"`、`autoplay=true`、`showProgress=true`、`isLive=false`、`playTime=0`。 |
231
- | `Signature` | `width=752`、`height=300`、`url=""`;签名弹窗宽度 `800`,画笔颜色 `black`,画布背景 `rgb(255,255,255)`。 |
232
- | `TooltipPreviewImg` | `files=[]`、`fileUrlKey="filePath"`。 |
233
- | `SelectCreate` | `showDelete=true`、`label=""`、`maxCount=1`,内部固定 `mode="tags"`。 |
234
- | `BasicSelect` | `placeholder=""`、`data=[]`、`nameKey="name"`、`idKey="id"`,内置 `showSearch=true`、`allowClear=true`、`optionFilterProp="children"`。 |
235
- | `DictionarySelect` | `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
236
- | `PersonnelSelect` | `params={}`、`placeholder="人员"`、`isNeedCorpInfoId=false`、`isNeedDepartmentId=true`、`isNeedPostId=false`、`extraParams={}`,内部默认额外参数 `{ noMain: "", eqEmploymentFlag: 1 }`。 |
237
- | `BasicSelectTree` | `getNodePathsIsIncludeOneself=true`、`placeholder=""`、`treeData=[]`、`nameKey="name"`、`idKey="id"`、`childrenKey="children"`、`onlyLastLevel=false`,内置 `showSearch=true`、`allowClear=true`、`style={ width: "100%" }`。 |
238
- | `AreaSelectTree` | 内部使用 `area.json`,默认 `nameKey="label"`、`idKey="value"`。 |
239
- | `IndustrySelectTree` | 内部使用 `industry.json`,默认 `nameKey="dict_label"`、`idKey="dict_value"`、`childrenKey="childrenList"`。 |
240
- | `DepartmentSelectTree` | `params={}`、`placeholder="部门"`、`isNeedCorpInfoId=false`、`isNeedParentId=false`、`searchType="current"`,内部固定 `childrenKey="childrenList"`。 |
241
- | `DictionarySelectTree` | `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
242
- | `HiddenLevelSelectTree` | `isShowNeglect=true`、`isShowLarger=true`、`isShowMajor=true`,内部固定 `placeholder="隐患级别"`、`onlyLastLevel=true`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
243
- | `HiddenPartSelectTree` | `params={}`、`isNeedCorpInfoId=false`,内部固定 `placeholder="隐患部位"`、`nameKey="hiddenregion"`、`idKey="hiddenregionId"`。 |
244
- | `BasicCascader` | `getNodePathsIsIncludeOneself=true`、`placeholder=""`、`data=[]`、`nameKey="name"`、`idKey="id"`、`childrenKey="children"`。 |
245
- | `AreaCascader` | 内部使用 `area.json`,默认 `nameKey="label"`、`idKey="value"`。 |
246
- | `IndustryCascader` | 内部使用 `industry.json`,默认 `nameKey="dict_label"`、`idKey="dict_value"`、`childrenKey="childrenList"`。 |
247
- | `DictionaryCascader` | `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
248
- | `BasicLeftTree` | `getNodePathsIsIncludeOneself=true`、`treeData=[]`、`nameKey="name"`、`idKey="id"`、`childrenKey="children"`,搜索框固定宽度容器 `300`。 |
249
- | `AreaLeftTree` | 内部使用 `area.json`,默认 `nameKey="label"`、`idKey="value"`。 |
250
- | `DictionaryLeftTree` | `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
251
- | `DepartmentLeftTree` | `params={}`、`searchType="current"`,内部固定 `childrenKey="childrenList"`。 |
252
- | `Map` | `longitudeProps="longitude"`、`latitudeProps="latitude"`、`required=true`、`area=""`、`showArea=false`、`disable=false`、`type="baidu"`。 |
253
- | `MapSelector` | `area=""`、`showArea=false`、`disable=false`、`type="baidu"`;弹窗宽度 `1000`、`maskClosable=false`、地图容器高度 `500px`。 |
254
- | `SeamlessScroll` | `value=true`、`list=[]`、`step=1`、`limitScrollNum=3`、`hover=true`、`direction="up"`、`singleHeight=0`、`singleWidth=0`、`singleWaitTime=1000`、`isRemUnit=false`、`isWatch=true`、`delay=0`、`ease="ease-in"`、`count=-1`、`copyNum=1`、`wheel=false`、`singleLine=false`。 |
255
- | `HiddenInfo` | `id=""`、`idKey="id"`、`hiddenId=""`、`hiddenIdKey="hiddenId"`、`history=false`。 |
221
+ | `ImportFile` | `title="导入"`、`labelCol={ span: 4 }`、`exportTemplateButtonText="导出模板"`;弹窗宽度 `600`,内置附件上传 `accept=".xls,.xlsx"`、`listType="text"`、`maxCount=1`。 |
222
+ | `PreviewImg` | `files=[]`、`fileUrlKey="filePath"`;图片固定 `width=100`、`height=100`,图片间距 `marginRight=10`、`marginBottom=10`。 |
223
+ | `PreviewPdf` | `files=[]`、`nameKey=""`、`urlKey=""`、`name=""`、`url=""`。 |
224
+ | `Pdf` | `visible=false`、`inline=false`、`title="PDF预览"`、`style={}`。 |
225
+ | `PreviewExcel` | `files=[]`、`nameKey=""`、`urlKey=""`、`name=""`、`url=""`。 |
226
+ | `Excel` | `visible=false`、`inline=false`、`title="Excel预览"`、`style={}`;弹窗宽度 `1000`,内容高度 `72vh`。 |
227
+ | `PreviewWord` | `files=[]`、`nameKey=""`、`urlKey=""`、`name=""`、`url=""`。 |
228
+ | `Word` | `visible=false`、`inline=false`、`title="Word预览"`、`style={}`;弹窗宽度 `900`,内容高度 `72vh`,默认背景 `#f5f5f5`、内边距 `24px`。 |
229
+ | `Video` | `source=""`、`vid=""`、`playAuth=""`、`cover=""`、`autoplay=true`、`showProgress=true`、`playTime=0`、`inline=false`、`isLive=false`、`width="100%"`、`height="600px"`、`title="视频"`、`visible=false`、`aliPlayerProps={}`;弹窗宽度 `800`。 |
230
+ | `AliPlayer` | `source=""`、`vid=""`、`playAuth=""`、`cover=""`、`width="100%"`、`height="600px"`、`autoplay=true`、`showProgress=true`、`isLive=false`、`playTime=0`。 |
231
+ | `Signature` | `width=752`、`height=300`、`url=""`;签名弹窗宽度 `800`,画笔颜色 `black`,画布背景 `rgb(255,255,255)`。 |
232
+ | `TooltipPreviewImg` | `files=[]`、`fileUrlKey="filePath"`。 |
233
+ | `SelectCreate` | `showDelete=true`、`label=""`、`maxCount=1`,内部固定 `mode="tags"`。 |
234
+ | `BasicSelect` | `placeholder=""`、`data=[]`、`nameKey="name"`、`idKey="id"`,内置 `showSearch=true`、`allowClear=true`、`optionFilterProp="children"`。 |
235
+ | `DictionarySelect` | `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
236
+ | `PersonnelSelect` | `params={}`、`placeholder="人员"`、`isNeedCorpInfoId=false`、`isNeedDepartmentId=true`、`isNeedPostId=false`、`extraParams={}`,内部默认额外参数 `{ noMain: "", eqEmploymentFlag: 1 }`。 |
237
+ | `BasicSelectTree` | `getNodePathsIsIncludeOneself=true`、`placeholder=""`、`treeData=[]`、`nameKey="name"`、`idKey="id"`、`childrenKey="children"`、`onlyLastLevel=false`,内置 `showSearch=true`、`allowClear=true`、`style={ width: "100%" }`。 |
238
+ | `AreaSelectTree` | 内部使用 `area.json`,默认 `nameKey="label"`、`idKey="value"`。 |
239
+ | `IndustrySelectTree` | 内部使用 `industry.json`,默认 `nameKey="dict_label"`、`idKey="dict_value"`、`childrenKey="childrenList"`。 |
240
+ | `DepartmentSelectTree` | `params={}`、`placeholder="部门"`、`isNeedCorpInfoId=false`、`isNeedParentId=false`、`searchType="current"`,内部固定 `childrenKey="childrenList"`。 |
241
+ | `DictionarySelectTree` | `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
242
+ | `HiddenLevelSelectTree` | `isShowNeglect=true`、`isShowLarger=true`、`isShowMajor=true`,内部固定 `placeholder="隐患级别"`、`onlyLastLevel=true`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
243
+ | `HiddenPartSelectTree` | `params={}`、`isNeedCorpInfoId=false`,内部固定 `placeholder="隐患部位"`、`nameKey="hiddenregion"`、`idKey="hiddenregionId"`。 |
244
+ | `BasicCascader` | `getNodePathsIsIncludeOneself=true`、`placeholder=""`、`data=[]`、`nameKey="name"`、`idKey="id"`、`childrenKey="children"`。 |
245
+ | `AreaCascader` | 内部使用 `area.json`,默认 `nameKey="label"`、`idKey="value"`。 |
246
+ | `IndustryCascader` | 内部使用 `industry.json`,默认 `nameKey="dict_label"`、`idKey="dict_value"`、`childrenKey="childrenList"`。 |
247
+ | `DictionaryCascader` | `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
248
+ | `BasicLeftTree` | `getNodePathsIsIncludeOneself=true`、`treeData=[]`、`nameKey="name"`、`idKey="id"`、`childrenKey="children"`,搜索框固定宽度容器 `300`。 |
249
+ | `AreaLeftTree` | 内部使用 `area.json`,默认 `nameKey="label"`、`idKey="value"`。 |
250
+ | `DictionaryLeftTree` | `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
251
+ | `DepartmentLeftTree` | `params={}`、`searchType="current"`,内部固定 `childrenKey="childrenList"`。 |
252
+ | `Map` | `longitudeProps="longitude"`、`latitudeProps="latitude"`、`required=true`、`area=""`、`showArea=false`、`disable=false`、`type="baidu"`。 |
253
+ | `MapSelector` | `area=""`、`showArea=false`、`disable=false`、`type="baidu"`;弹窗宽度 `1000`、`maskClosable=false`、地图容器高度 `500px`。 |
254
+ | `SeamlessScroll` | `value=true`、`list=[]`、`step=1`、`limitScrollNum=3`、`hover=true`、`direction="up"`、`singleHeight=0`、`singleWidth=0`、`singleWaitTime=1000`、`isRemUnit=false`、`isWatch=true`、`delay=0`、`ease="ease-in"`、`count=-1`、`copyNum=1`、`wheel=false`、`singleLine=false`。 |
255
+ | `HiddenInfo` | `id=""`、`idKey="id"`、`hiddenId=""`、`hiddenIdKey="hiddenId"`、`history=false`。 |
256
256
 
257
257
  ### Table
258
258
 
@@ -360,20 +360,20 @@ import Page from "zy-react-library/components/Page";
360
360
 
361
361
  页面容器组件。
362
362
 
363
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
364
- | --- | --- | --- | --- | --- |
365
- | `headerTitle` | `ReactNode` | 否 | - | 页头标题。 |
366
- | `history` | `{ goBack?: () => void; [key: string]: any }` | 否 | `window.history.back` | 路由历史对象,用于返回;没有 `history.goBack` 时使用浏览器返回。 |
367
- | `isShowHeader` | `boolean` | 否 | `true` | 是否显示头部。 |
368
- | `headerPrevious` | `boolean` | 否 | `true` | 头部是否显示返回能力。 |
369
- | `isShowFooter` | `boolean` | 否 | `true` | 是否显示底部操作区。 |
370
- | `isShowAllAction` | `boolean` | 否 | `true` | 是否显示默认全部操作。 |
371
- | `loading` | `boolean` | 否 | `false` | 页面加载状态,控制外层 `Spin`。 |
372
- | `backButtonText` | `string` | 否 | `"关闭"` | 返回按钮文案。 |
373
- | `contentPadding` | `string` | 否 | `"20px"` | 内容区内边距。 |
374
- | `customActionButtons` | `ReactNode` | 否 | - | 自定义底部操作按钮;传入后替换默认底部按钮组。 |
375
- | `extraActionButtons` | `ReactNode` | 否 | - | 额外底部操作按钮,插入默认关闭按钮前。 |
376
- | `children` | `ReactNode \| (() => ReactNode)` | 是 | - | 页面内容。 |
363
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
364
+ | --- | --- | --- | --- | --- |
365
+ | `headerTitle` | `ReactNode` | 否 | - | 页头标题。 |
366
+ | `history` | `{ goBack?: () => void; [key: string]: any }` | 否 | `window.history.back` | 路由历史对象,用于返回;没有 `history.goBack` 时使用浏览器返回。 |
367
+ | `isShowHeader` | `boolean` | 否 | `true` | 是否显示头部。 |
368
+ | `headerPrevious` | `boolean` | 否 | `true` | 头部是否显示返回能力。 |
369
+ | `isShowFooter` | `boolean` | 否 | `true` | 是否显示底部操作区。 |
370
+ | `isShowAllAction` | `boolean` | 否 | `true` | 是否显示默认全部操作。 |
371
+ | `loading` | `boolean` | 否 | `false` | 页面加载状态,控制外层 `Spin`。 |
372
+ | `backButtonText` | `string` | 否 | `"关闭"` | 返回按钮文案。 |
373
+ | `contentPadding` | `string` | 否 | `"20px"` | 内容区内边距。 |
374
+ | `customActionButtons` | `ReactNode` | 否 | - | 自定义底部操作按钮;传入后替换默认底部按钮组。 |
375
+ | `extraActionButtons` | `ReactNode` | 否 | - | 额外底部操作按钮,插入默认关闭按钮前。 |
376
+ | `children` | `ReactNode \| (() => ReactNode)` | 是 | - | 页面内容。 |
377
377
 
378
378
  ### HeaderBack
379
379
 
@@ -385,11 +385,11 @@ import HeaderBack from "zy-react-library/components/HeaderBack";
385
385
 
386
386
  页头返回组件。
387
387
 
388
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
389
- | --- | --- | --- | --- | --- |
390
- | `title` | `ReactNode` | 是 | - | 标题内容。 |
391
- | `history` | `{ goBack?: () => void; [key: string]: any }` | 否 | `window.history.back` | 路由历史对象;没有 `history.goBack` 时使用浏览器返回。 |
392
- | `previous` | `boolean` | 否 | `true` | 是否显示返回操作。 |
388
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
389
+ | --- | --- | --- | --- | --- |
390
+ | `title` | `ReactNode` | 是 | - | 标题内容。 |
391
+ | `history` | `{ goBack?: () => void; [key: string]: any }` | 否 | `window.history.back` | 路由历史对象;没有 `history.goBack` 时使用浏览器返回。 |
392
+ | `previous` | `boolean` | 否 | `true` | 是否显示返回操作。 |
393
393
 
394
394
  ### Upload
395
395
 
@@ -401,20 +401,20 @@ import Upload from "zy-react-library/components/Upload";
401
401
 
402
402
  上传组件,继承 `Omit<AntUploadProps, "fileList">`。
403
403
 
404
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
405
- | --- | --- | --- | --- | --- |
406
- | `value` | `UploadFile[]` | 否 | `[]` | 当前文件列表。 |
407
- | `ratio` | `` `${number}*${number}` `` | 否 | `""` | 图片宽高比例提示,例如 `"16*9"`。 |
408
- | `showTip` | `boolean` | 否 | `true` | 是否显示上传提示。 |
409
- | `size` | `number` | 否 | 图片/文档 `10`,视频 `100` | 文件大小限制,单位 MB。 |
410
- | `tipContent` | `ReactNode` | 否 | 自动生成提示文案 | 自定义提示内容。 |
411
- | `uploadButtonText` | `string` | 否 | 视频 `"上传视频"`,其他 `"上传附件"` | 上传按钮文案。 |
412
- | `fileType` | `"image" \| "video" \| "document"` | 否 | 根据 `accept` 推断,默认 `"image"` | 文件类型。 |
413
- | `onGetRemoveFile` | `(file: Omit<UploadFile, "originFileObj">) => void` | 否 | - | 删除文件时返回被移除的文件。 |
414
- | `multiple` | `boolean` | 否 | `true` | 是否允许多选,继承自 antd Upload。 |
415
- | `maxCount` | `number` | 否 | 图片/文档 `4`,视频 `1` | 最大上传数量,继承自 antd Upload。 |
416
- | `accept` | `string` | 否 | 图片 `.jpg,.jpeg,.png`;视频 `.mp4`;文档 `.pdf,.doc,.docx` | 允许的文件类型,继承自 antd Upload。 |
417
- | `listType` | `string` | 否 | 图片 `"picture-card"`,其他 `"text"` | 上传列表样式,继承自 antd Upload。 |
404
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
405
+ | --- | --- | --- | --- | --- |
406
+ | `value` | `UploadFile[]` | 否 | `[]` | 当前文件列表。 |
407
+ | `ratio` | `` `${number}*${number}` `` | 否 | `""` | 图片宽高比例提示,例如 `"16*9"`。 |
408
+ | `showTip` | `boolean` | 否 | `true` | 是否显示上传提示。 |
409
+ | `size` | `number` | 否 | 图片/文档 `10`,视频 `100` | 文件大小限制,单位 MB。 |
410
+ | `tipContent` | `ReactNode` | 否 | 自动生成提示文案 | 自定义提示内容。 |
411
+ | `uploadButtonText` | `string` | 否 | 视频 `"上传视频"`,其他 `"上传附件"` | 上传按钮文案。 |
412
+ | `fileType` | `"image" \| "video" \| "document"` | 否 | 根据 `accept` 推断,默认 `"image"` | 文件类型。 |
413
+ | `onGetRemoveFile` | `(file: Omit<UploadFile, "originFileObj">) => void` | 否 | - | 删除文件时返回被移除的文件。 |
414
+ | `multiple` | `boolean` | 否 | `true` | 是否允许多选,继承自 antd Upload。 |
415
+ | `maxCount` | `number` | 否 | 图片/文档 `4`,视频 `1` | 最大上传数量,继承自 antd Upload。 |
416
+ | `accept` | `string` | 否 | 图片 `.jpg,.jpeg,.png`;视频 `.mp4`;文档 `.pdf,.doc,.docx` | 允许的文件类型,继承自 antd Upload。 |
417
+ | `listType` | `string` | 否 | 图片 `"picture-card"`,其他 `"text"` | 上传列表样式,继承自 antd Upload。 |
418
418
 
419
419
  ### ImportFile
420
420
 
@@ -426,17 +426,17 @@ import ImportFile from "zy-react-library/components/ImportFile";
426
426
 
427
427
  文件导入弹窗,继承 `Omit<FormProps, "form">`。
428
428
 
429
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
430
- | --- | --- | --- | --- | --- |
431
- | `visible` | `boolean` | 是 | - | 是否显示弹窗。 |
432
- | `title` | `string` | 否 | `"导入"` | 弹窗标题。 |
433
- | `templateUrl` | `string` | 否 | - | 导入模板下载地址。 |
434
- | `children` | `ReactNode \| ((props: { form: FormInstance }) => ReactNode)` | 否 | - | 自定义弹窗内容;函数形式可拿到内部表单实例。 |
435
- | `onConfirm` | `(values: { file?: UploadFile[]; [key: string]: any }) => void` | 是 | - | 确认导入回调。 |
436
- | `onCancel` | `() => void` | 是 | - | 取消回调。 |
437
- | `exportTemplateButtonText` | `ReactNode` | 否 | `"导出模板"` | 下载模板按钮文案。 |
438
- | `extraButtons` | `ReactNode` | 否 | - | 额外按钮。 |
439
- | `labelCol` | `ColProps` | 否 | `{ span: 4 }` | 表单标签栅格,继承自 `FormProps`。 |
429
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
430
+ | --- | --- | --- | --- | --- |
431
+ | `visible` | `boolean` | 是 | - | 是否显示弹窗。 |
432
+ | `title` | `string` | 否 | `"导入"` | 弹窗标题。 |
433
+ | `templateUrl` | `string` | 否 | - | 导入模板下载地址。 |
434
+ | `children` | `ReactNode \| ((props: { form: FormInstance }) => ReactNode)` | 否 | - | 自定义弹窗内容;函数形式可拿到内部表单实例。 |
435
+ | `onConfirm` | `(values: { file?: UploadFile[]; [key: string]: any }) => void` | 是 | - | 确认导入回调。 |
436
+ | `onCancel` | `() => void` | 是 | - | 取消回调。 |
437
+ | `exportTemplateButtonText` | `ReactNode` | 否 | `"导出模板"` | 下载模板按钮文案。 |
438
+ | `extraButtons` | `ReactNode` | 否 | - | 额外按钮。 |
439
+ | `labelCol` | `ColProps` | 否 | `{ span: 4 }` | 表单标签栅格,继承自 `FormProps`。 |
440
440
 
441
441
  ### PreviewImg
442
442
 
@@ -448,10 +448,10 @@ import PreviewImg from "zy-react-library/components/PreviewImg";
448
448
 
449
449
  图片预览组件。
450
450
 
451
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
452
- | --- | --- | --- | --- | --- |
453
- | `files` | `string[] \| { filePath?: string; [key: string]: string }[]` | 是 | `[]` | 图片地址数组,或包含图片地址字段的对象数组。 |
454
- | `fileUrlKey` | `string` | 否 | `"filePath"` | 对象数组中图片地址字段名。 |
451
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
452
+ | --- | --- | --- | --- | --- |
453
+ | `files` | `string[] \| { filePath?: string; [key: string]: string }[]` | 是 | `[]` | 图片地址数组,或包含图片地址字段的对象数组。 |
454
+ | `fileUrlKey` | `string` | 否 | `"filePath"` | 对象数组中图片地址字段名。 |
455
455
 
456
456
  ### TooltipPreviewImg
457
457
 
@@ -473,17 +473,17 @@ import PreviewPdf from "zy-react-library/components/PreviewPdf";
473
473
 
474
474
  PDF 预览入口组件。
475
475
 
476
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
477
- | --- | --- | --- | --- | --- |
478
- | `files` | `{ filePath?: string; fileName?: string; name?: string; [key: string]: string }[]` | 否 | `[]` | PDF 文件对象数组。 |
479
- | `nameKey` | `string` | 否 | `""` | 文件名字段名;不传时优先取 `name`、`fileName`。 |
480
- | `urlKey` | `string` | 否 | `""` | 文件地址字段名;不传时优先取 `filePath`。 |
481
- | `name` | `string` | 否 | `""` | 单文件文件名。 |
482
- | `url` | `string` | 否 | `""` | 单文件地址。 |
476
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
477
+ | --- | --- | --- | --- | --- |
478
+ | `files` | `{ filePath?: string; fileName?: string; name?: string; [key: string]: string }[]` | 否 | `[]` | PDF 文件对象数组。 |
479
+ | `nameKey` | `string` | 否 | `""` | 文件名字段名;不传时优先取 `name`、`fileName`。 |
480
+ | `urlKey` | `string` | 否 | `""` | 文件地址字段名;不传时优先取 `filePath`。 |
481
+ | `name` | `string` | 否 | `""` | 单文件文件名。 |
482
+ | `url` | `string` | 否 | `""` | 单文件地址。 |
483
+
484
+ ### Pdf
483
485
 
484
- ### Pdf
485
-
486
- 引入:
486
+ 引入:
487
487
 
488
488
  ```tsx
489
489
  import Pdf from "zy-react-library/components/Pdf";
@@ -491,95 +491,95 @@ import Pdf from "zy-react-library/components/Pdf";
491
491
 
492
492
  PDF 展示组件。
493
493
 
494
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
495
- | --- | --- | --- | --- | --- |
496
- | `file` | `string` | 是 | - | PDF 文件地址。 |
497
- | `name` | `string` | 否 | - | 文件名。 |
498
- | `visible` | `boolean` | 否 | `false` | 是否以弹窗形式显示。 |
499
- | `title` | `string` | 否 | `"PDF预览"` | 弹窗标题。 |
500
- | `onCancel` | `() => void` | 否 | - | 关闭弹窗回调。 |
501
- | `inline` | `boolean` | 否 | `false` | 是否内联展示。 |
502
- | `style` | `CSSProperties` | 否 | `{}` | 外层样式。 |
503
-
504
- ### PreviewExcel
505
-
506
- 引入:
507
-
508
- ```tsx
509
- import PreviewExcel from "zy-react-library/components/PreviewExcel";
510
- ```
511
-
512
- Excel 预览入口组件,使用方式和 `PreviewPdf` 一致,负责展示文件名和预览按钮。
513
-
514
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
515
- | --- | --- | --- | --- | --- |
516
- | `files` | `{ filePath?: string; fileName?: string; name?: string; url?: string; [key: string]: string }[]` | 否 | `[]` | Excel 文件对象数组;和 `name`、`url` 单文件模式互斥。 |
517
- | `nameKey` | `string` | 否 | `""` | 文件名字段名;不传时优先取 `name`、`fileName`。 |
518
- | `urlKey` | `string` | 否 | `""` | 文件地址字段名;不传时优先取 `filePath`、`url`。 |
519
- | `name` | `string` | 否 | `""` | 单文件文件名;和 `files` 互斥。 |
520
- | `url` | `string` | 否 | `""` | 单文件地址;和 `files` 互斥。 |
521
-
522
- ### Excel
523
-
524
- 引入:
525
-
526
- ```tsx
527
- import Excel from "zy-react-library/components/Excel";
528
- ```
529
-
530
- Excel 展示组件,使用 `exceljs` 解析 `xlsx`,再通过 `x-data-spreadsheet` 渲染表格预览。
531
-
532
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
533
- | --- | --- | --- | --- | --- |
534
- | `visible` | `boolean` | 否 | `false` | 是否以弹窗形式显示。 |
535
- | `onCancel` | `() => void` | 否 | - | 关闭弹窗回调。 |
536
- | `file` | `string` | 否 | - | `xlsx` 文件地址;非完整文件服务地址时会自动拼接 `getFileUrl()`。 |
537
- | `name` | `string` | 否 | - | 文件名,用于下载。 |
538
- | `inline` | `boolean` | 否 | `false` | 是否内联展示。 |
539
- | `title` | `string` | 否 | `"Excel预览"` | 弹窗标题。 |
540
- | `style` | `Record<string, any>` | 否 | `{}` | 内容区域样式,会合并到高度为 `72vh` 的外层容器。 |
541
-
542
- ### PreviewWord
543
-
544
- 引入:
545
-
546
- ```tsx
547
- import PreviewWord from "zy-react-library/components/PreviewWord";
548
- ```
549
-
550
- Word 预览入口组件,使用方式和 `PreviewPdf` 一致,负责展示文件名和预览按钮。
551
-
552
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
553
- | --- | --- | --- | --- | --- |
554
- | `files` | `{ filePath?: string; fileName?: string; name?: string; url?: string; [key: string]: string }[]` | 否 | `[]` | Word 文件对象数组;和 `name`、`url` 单文件模式互斥。 |
555
- | `nameKey` | `string` | 否 | `""` | 文件名字段名;不传时优先取 `name`、`fileName`。 |
556
- | `urlKey` | `string` | 否 | `""` | 文件地址字段名;不传时优先取 `filePath`、`url`。 |
557
- | `name` | `string` | 否 | `""` | 单文件文件名;和 `files` 互斥。 |
558
- | `url` | `string` | 否 | `""` | 单文件地址;和 `files` 互斥。 |
559
-
560
- ### Word
561
-
562
- 引入:
563
-
564
- ```tsx
565
- import Word from "zy-react-library/components/Word";
566
- ```
567
-
568
- Word 展示组件,使用 `docx-preview` 渲染 `docx` 文件。
569
-
570
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
571
- | --- | --- | --- | --- | --- |
572
- | `visible` | `boolean` | 否 | `false` | 是否以弹窗形式显示。 |
573
- | `onCancel` | `() => void` | 否 | - | 关闭弹窗回调。 |
574
- | `file` | `string` | 否 | - | `docx` 文件地址;非完整文件服务地址时会自动拼接 `getFileUrl()`。 |
575
- | `name` | `string` | 否 | - | 文件名,用于下载。 |
576
- | `inline` | `boolean` | 否 | `false` | 是否内联展示。 |
577
- | `title` | `string` | 否 | `"Word预览"` | 弹窗标题。 |
578
- | `style` | `Record<string, any>` | 否 | `{}` | 内容区域样式,会合并到默认高度 `72vh`、背景 `#f5f5f5`、内边距 `24px` 的外层容器。 |
579
-
580
- ### Video
581
-
582
- 引入:
494
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
495
+ | --- | --- | --- | --- | --- |
496
+ | `file` | `string` | 是 | - | PDF 文件地址。 |
497
+ | `name` | `string` | 否 | - | 文件名。 |
498
+ | `visible` | `boolean` | 否 | `false` | 是否以弹窗形式显示。 |
499
+ | `title` | `string` | 否 | `"PDF预览"` | 弹窗标题。 |
500
+ | `onCancel` | `() => void` | 否 | - | 关闭弹窗回调。 |
501
+ | `inline` | `boolean` | 否 | `false` | 是否内联展示。 |
502
+ | `style` | `CSSProperties` | 否 | `{}` | 外层样式。 |
503
+
504
+ ### PreviewExcel
505
+
506
+ 引入:
507
+
508
+ ```tsx
509
+ import PreviewExcel from "zy-react-library/components/PreviewExcel";
510
+ ```
511
+
512
+ Excel 预览入口组件,使用方式和 `PreviewPdf` 一致,负责展示文件名和预览按钮。
513
+
514
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
515
+ | --- | --- | --- | --- | --- |
516
+ | `files` | `{ filePath?: string; fileName?: string; name?: string; url?: string; [key: string]: string }[]` | 否 | `[]` | Excel 文件对象数组;和 `name`、`url` 单文件模式互斥。 |
517
+ | `nameKey` | `string` | 否 | `""` | 文件名字段名;不传时优先取 `name`、`fileName`。 |
518
+ | `urlKey` | `string` | 否 | `""` | 文件地址字段名;不传时优先取 `filePath`、`url`。 |
519
+ | `name` | `string` | 否 | `""` | 单文件文件名;和 `files` 互斥。 |
520
+ | `url` | `string` | 否 | `""` | 单文件地址;和 `files` 互斥。 |
521
+
522
+ ### Excel
523
+
524
+ 引入:
525
+
526
+ ```tsx
527
+ import Excel from "zy-react-library/components/Excel";
528
+ ```
529
+
530
+ Excel 展示组件,使用 `exceljs` 解析 `xlsx`,再通过 `x-data-spreadsheet` 渲染表格预览。
531
+
532
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
533
+ | --- | --- | --- | --- | --- |
534
+ | `visible` | `boolean` | 否 | `false` | 是否以弹窗形式显示。 |
535
+ | `onCancel` | `() => void` | 否 | - | 关闭弹窗回调。 |
536
+ | `file` | `string` | 否 | - | `xlsx` 文件地址;非完整文件服务地址时会自动拼接 `getFileUrl()`。 |
537
+ | `name` | `string` | 否 | - | 文件名,用于下载。 |
538
+ | `inline` | `boolean` | 否 | `false` | 是否内联展示。 |
539
+ | `title` | `string` | 否 | `"Excel预览"` | 弹窗标题。 |
540
+ | `style` | `Record<string, any>` | 否 | `{}` | 内容区域样式,会合并到高度为 `72vh` 的外层容器。 |
541
+
542
+ ### PreviewWord
543
+
544
+ 引入:
545
+
546
+ ```tsx
547
+ import PreviewWord from "zy-react-library/components/PreviewWord";
548
+ ```
549
+
550
+ Word 预览入口组件,使用方式和 `PreviewPdf` 一致,负责展示文件名和预览按钮。
551
+
552
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
553
+ | --- | --- | --- | --- | --- |
554
+ | `files` | `{ filePath?: string; fileName?: string; name?: string; url?: string; [key: string]: string }[]` | 否 | `[]` | Word 文件对象数组;和 `name`、`url` 单文件模式互斥。 |
555
+ | `nameKey` | `string` | 否 | `""` | 文件名字段名;不传时优先取 `name`、`fileName`。 |
556
+ | `urlKey` | `string` | 否 | `""` | 文件地址字段名;不传时优先取 `filePath`、`url`。 |
557
+ | `name` | `string` | 否 | `""` | 单文件文件名;和 `files` 互斥。 |
558
+ | `url` | `string` | 否 | `""` | 单文件地址;和 `files` 互斥。 |
559
+
560
+ ### Word
561
+
562
+ 引入:
563
+
564
+ ```tsx
565
+ import Word from "zy-react-library/components/Word";
566
+ ```
567
+
568
+ Word 展示组件,使用 `docx-preview` 渲染 `docx` 文件。
569
+
570
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
571
+ | --- | --- | --- | --- | --- |
572
+ | `visible` | `boolean` | 否 | `false` | 是否以弹窗形式显示。 |
573
+ | `onCancel` | `() => void` | 否 | - | 关闭弹窗回调。 |
574
+ | `file` | `string` | 否 | - | `docx` 文件地址;非完整文件服务地址时会自动拼接 `getFileUrl()`。 |
575
+ | `name` | `string` | 否 | - | 文件名,用于下载。 |
576
+ | `inline` | `boolean` | 否 | `false` | 是否内联展示。 |
577
+ | `title` | `string` | 否 | `"Word预览"` | 弹窗标题。 |
578
+ | `style` | `Record<string, any>` | 否 | `{}` | 内容区域样式,会合并到默认高度 `72vh`、背景 `#f5f5f5`、内边距 `24px` 的外层容器。 |
579
+
580
+ ### Video
581
+
582
+ 引入:
583
583
 
584
584
  ```tsx
585
585
  import Video from "zy-react-library/components/Video";
@@ -587,12 +587,12 @@ import Video from "zy-react-library/components/Video";
587
587
 
588
588
  视频播放组件,继承 `AliPlayerProps`。
589
589
 
590
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
591
- | --- | --- | --- | --- | --- |
592
- | `title` | `string` | 否 | `"视频"` | 弹窗标题。 |
593
- | `visible` | `boolean` | 否 | `false` | 是否显示弹窗;传 `onCancel` 时由外部控制。 |
594
- | `inline` | `boolean` | 否 | `false` | 是否内联展示。 |
595
- | `onCancel` | `() => void` | 否 | 内部状态关闭 | 关闭回调;不传时组件内部维护弹窗显隐。 |
590
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
591
+ | --- | --- | --- | --- | --- |
592
+ | `title` | `string` | 否 | `"视频"` | 弹窗标题。 |
593
+ | `visible` | `boolean` | 否 | `false` | 是否显示弹窗;传 `onCancel` 时由外部控制。 |
594
+ | `inline` | `boolean` | 否 | `false` | 是否内联展示。 |
595
+ | `onCancel` | `() => void` | 否 | 内部状态关闭 | 关闭回调;不传时组件内部维护弹窗显隐。 |
596
596
 
597
597
  ### AliPlayer
598
598
 
@@ -604,22 +604,22 @@ import AliPlayer from "zy-react-library/components/Video/AliPlayer";
604
604
 
605
605
  阿里云播放器封装,支持 `ref`。
606
606
 
607
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
608
- | --- | --- | --- | --- | --- |
609
- | `source` | `string \| string[]` | 否 | `""` | 视频播放地址。 |
610
- | `vid` | `string` | 否 | `""` | 阿里云视频 ID。 |
611
- | `playAuth` | `string` | 否 | `""` | 阿里云播放凭证。 |
612
- | `cover` | `string` | 否 | `""` | 封面地址。 |
613
- | `width` | `string` | 否 | `"100%"` | 播放器宽度。 |
614
- | `height` | `string` | 否 | `"600px"` | 播放器高度。 |
615
- | `autoplay` | `boolean` | 否 | `true` | 是否自动播放。 |
616
- | `showProgress` | `boolean` | 否 | `true` | 是否显示进度条。 |
617
- | `isLive` | `boolean` | 否 | `false` | 是否为直播。 |
618
- | `playTime` | `number` | 否 | `0` | 初始播放时间,大于 0 时会 seek 到该时间。 |
619
- | `onEnded` | `() => void` | 否 | - | 播放结束回调。 |
620
- | `onTimeupdate` | `(currentTime: number) => void` | 否 | - | 播放时间更新回调。 |
621
- | `onGetPlayerInstance` | `(player: any) => void` | 否 | - | 获取播放器实例。 |
622
- | `aliPlayerProps` | `Record<string, any>` | 否 | - | 透传给 AliPlayer 的额外属性。 |
607
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
608
+ | --- | --- | --- | --- | --- |
609
+ | `source` | `string \| string[]` | 否 | `""` | 视频播放地址。 |
610
+ | `vid` | `string` | 否 | `""` | 阿里云视频 ID。 |
611
+ | `playAuth` | `string` | 否 | `""` | 阿里云播放凭证。 |
612
+ | `cover` | `string` | 否 | `""` | 封面地址。 |
613
+ | `width` | `string` | 否 | `"100%"` | 播放器宽度。 |
614
+ | `height` | `string` | 否 | `"600px"` | 播放器高度。 |
615
+ | `autoplay` | `boolean` | 否 | `true` | 是否自动播放。 |
616
+ | `showProgress` | `boolean` | 否 | `true` | 是否显示进度条。 |
617
+ | `isLive` | `boolean` | 否 | `false` | 是否为直播。 |
618
+ | `playTime` | `number` | 否 | `0` | 初始播放时间,大于 0 时会 seek 到该时间。 |
619
+ | `onEnded` | `() => void` | 否 | - | 播放结束回调。 |
620
+ | `onTimeupdate` | `(currentTime: number) => void` | 否 | - | 播放时间更新回调。 |
621
+ | `onGetPlayerInstance` | `(player: any) => void` | 否 | - | 获取播放器实例。 |
622
+ | `aliPlayerProps` | `Record<string, any>` | 否 | - | 透传给 AliPlayer 的额外属性。 |
623
623
 
624
624
  Ref 方法:
625
625
 
@@ -639,11 +639,11 @@ import Editor from "zy-react-library/components/Editor";
639
639
 
640
640
  富文本编辑器组件,支持 `ref`。
641
641
 
642
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
643
- | --- | --- | --- | --- | --- |
644
- | `value` | `string` | 否 | - | HTML 内容。 |
645
- | `onChange` | `(html: string) => void` | 否 | - | 内容变化回调。 |
646
- | `disabled` | `boolean` | 否 | - | 是否禁用编辑。 |
642
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
643
+ | --- | --- | --- | --- | --- |
644
+ | `value` | `string` | 否 | - | HTML 内容。 |
645
+ | `onChange` | `(html: string) => void` | 否 | - | 内容变化回调。 |
646
+ | `disabled` | `boolean` | 否 | - | 是否禁用编辑。 |
647
647
 
648
648
  Ref 方法:
649
649
 
@@ -664,12 +664,12 @@ import Signature from "zy-react-library/components/Signature";
664
664
 
665
665
  手写签名组件。
666
666
 
667
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
668
- | --- | --- | --- | --- | --- |
669
- | `onConfirm` | `(value: SignatureValue) => void` | 是 | - | 确认签名回调。 |
670
- | `width` | `number` | 否 | `752` | 签名画布宽度。 |
671
- | `height` | `number` | 否 | `300` | 签名画布高度,也用于已签名图片预览高度。 |
672
- | `url` | `string` | 否 | `""` | 已有签名图片地址。 |
667
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
668
+ | --- | --- | --- | --- | --- |
669
+ | `onConfirm` | `(value: SignatureValue) => void` | 是 | - | 确认签名回调。 |
670
+ | `width` | `number` | 否 | `752` | 签名画布宽度。 |
671
+ | `height` | `number` | 否 | `300` | 签名画布高度,也用于已签名图片预览高度。 |
672
+ | `url` | `string` | 否 | `""` | 已有签名图片地址。 |
673
673
 
674
674
  `SignatureValue`:
675
675
 
@@ -689,16 +689,16 @@ import Map from "zy-react-library/components/Map";
689
689
 
690
690
  地图选择组件。
691
691
 
692
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
693
- | --- | --- | --- | --- | --- |
694
- | `longitudeProps` | `string` | 否 | `"longitude"` | 经度字段名。 |
695
- | `latitudeProps` | `string` | 否 | `"latitude"` | 纬度字段名。 |
696
- | `required` | `boolean` | 否 | `true` | 是否必填。 |
697
- | `area` | `string` | 否 | `""` | 区域文本。 |
698
- | `showArea` | `boolean` | 否 | `false` | 是否显示区域。 |
699
- | `disable` | `boolean` | 否 | `false` | 是否禁用选择。 |
700
- | `onConfirm` | `(longitude, latitude, extra: { area: string }) => void` | 否 | - | 确认选择回调。 |
701
- | `type` | `"baidu" \| "cesium"` | 否 | `"baidu"` | 地图类型。 |
692
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
693
+ | --- | --- | --- | --- | --- |
694
+ | `longitudeProps` | `string` | 否 | `"longitude"` | 经度字段名。 |
695
+ | `latitudeProps` | `string` | 否 | `"latitude"` | 纬度字段名。 |
696
+ | `required` | `boolean` | 否 | `true` | 是否必填。 |
697
+ | `area` | `string` | 否 | `""` | 区域文本。 |
698
+ | `showArea` | `boolean` | 否 | `false` | 是否显示区域。 |
699
+ | `disable` | `boolean` | 否 | `false` | 是否禁用选择。 |
700
+ | `onConfirm` | `(longitude, latitude, extra: { area: string }) => void` | 否 | - | 确认选择回调。 |
701
+ | `type` | `"baidu" \| "cesium"` | 否 | `"baidu"` | 地图类型。 |
702
702
 
703
703
  ### MapSelector
704
704
 
@@ -710,17 +710,17 @@ import MapSelector from "zy-react-library/components/Map/MapSelector";
710
710
 
711
711
  地图选择弹窗。
712
712
 
713
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
714
- | --- | --- | --- | --- | --- |
715
- | `visible` | `boolean` | 是 | - | 是否显示弹窗。 |
716
- | `onClose` | `() => void` | 是 | - | 关闭回调。 |
717
- | `longitude` | `number \| string` | 否 | `""` | 初始经度;不传时使用 `window.mapLongitude` 初始化地图中心。 |
718
- | `latitude` | `number \| string` | 否 | `""` | 初始纬度;不传时使用 `window.mapLatitude` 初始化地图中心。 |
719
- | `area` | `string` | 否 | `""` | 初始区域文本。 |
720
- | `showArea` | `boolean` | 否 | `false` | 是否显示区域。 |
721
- | `disable` | `boolean` | 否 | `false` | 是否禁用选择。 |
722
- | `onConfirm` | `(longitude, latitude, extra: { area: string }) => void` | 否 | - | 确认选择回调。 |
723
- | `type` | `"baidu" \| "cesium"` | 否 | `"baidu"` | 地图类型。 |
713
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
714
+ | --- | --- | --- | --- | --- |
715
+ | `visible` | `boolean` | 是 | - | 是否显示弹窗。 |
716
+ | `onClose` | `() => void` | 是 | - | 关闭回调。 |
717
+ | `longitude` | `number \| string` | 否 | `""` | 初始经度;不传时使用 `window.mapLongitude` 初始化地图中心。 |
718
+ | `latitude` | `number \| string` | 否 | `""` | 初始纬度;不传时使用 `window.mapLatitude` 初始化地图中心。 |
719
+ | `area` | `string` | 否 | `""` | 初始区域文本。 |
720
+ | `showArea` | `boolean` | 否 | `false` | 是否显示区域。 |
721
+ | `disable` | `boolean` | 否 | `false` | 是否禁用选择。 |
722
+ | `onConfirm` | `(longitude, latitude, extra: { area: string }) => void` | 否 | - | 确认选择回调。 |
723
+ | `type` | `"baidu" \| "cesium"` | 否 | `"baidu"` | 地图类型。 |
724
724
 
725
725
  ### SeamlessScroll
726
726
 
@@ -732,26 +732,26 @@ import SeamlessScroll from "zy-react-library/components/SeamlessScroll";
732
732
 
733
733
  无缝滚动组件,支持 `ref.reset()`。
734
734
 
735
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
736
- | --- | --- | --- | --- | --- |
737
- | `value` | `boolean` | 否 | `true` | 是否启用滚动。 |
738
- | `list` | `unknown[]` | 是 | `[]` | 滚动数据列表。 |
739
- | `step` | `number` | 否 | `1` | 滚动步长。 |
740
- | `limitScrollNum` | `number` | 否 | `3` | 触发滚动的最小数据条数。 |
741
- | `hover` | `boolean` | 否 | `true` | 鼠标悬浮时是否暂停。 |
742
- | `direction` | `"up" \| "down" \| "left" \| "right"` | 否 | `"up"` | 滚动方向。 |
743
- | `singleHeight` | `number` | 否 | `0` | 单条高度;大于 0 时按单条高度做停顿。 |
744
- | `singleWidth` | `number` | 否 | `0` | 单条宽度;横向滚动时可用于单步停顿。 |
745
- | `singleWaitTime` | `number` | 否 | `1000` | 单步滚动等待时间。 |
746
- | `isRemUnit` | `boolean` | 否 | `false` | 尺寸是否使用 rem 单位。 |
747
- | `isWatch` | `boolean` | 否 | `true` | 是否监听数据变化并重置滚动。 |
748
- | `delay` | `number` | 否 | `0` | 动画延迟。 |
749
- | `ease` | `string \| { x1: number; y1: number; x2: number; y2: number }` | 否 | `"ease-in"` | 动画缓动函数。 |
750
- | `count` | `number` | 否 | `-1` | 滚动次数;`-1` 表示不限制次数。 |
751
- | `copyNum` | `number` | 否 | `1` | 复制列表份数。 |
752
- | `wheel` | `boolean` | 否 | `false` | 是否支持滚轮。 |
753
- | `singleLine` | `boolean` | 否 | `false` | 是否单行滚动。 |
754
- | `className` | `string` | 否 | - | 自定义类名。 |
735
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
736
+ | --- | --- | --- | --- | --- |
737
+ | `value` | `boolean` | 否 | `true` | 是否启用滚动。 |
738
+ | `list` | `unknown[]` | 是 | `[]` | 滚动数据列表。 |
739
+ | `step` | `number` | 否 | `1` | 滚动步长。 |
740
+ | `limitScrollNum` | `number` | 否 | `3` | 触发滚动的最小数据条数。 |
741
+ | `hover` | `boolean` | 否 | `true` | 鼠标悬浮时是否暂停。 |
742
+ | `direction` | `"up" \| "down" \| "left" \| "right"` | 否 | `"up"` | 滚动方向。 |
743
+ | `singleHeight` | `number` | 否 | `0` | 单条高度;大于 0 时按单条高度做停顿。 |
744
+ | `singleWidth` | `number` | 否 | `0` | 单条宽度;横向滚动时可用于单步停顿。 |
745
+ | `singleWaitTime` | `number` | 否 | `1000` | 单步滚动等待时间。 |
746
+ | `isRemUnit` | `boolean` | 否 | `false` | 尺寸是否使用 rem 单位。 |
747
+ | `isWatch` | `boolean` | 否 | `true` | 是否监听数据变化并重置滚动。 |
748
+ | `delay` | `number` | 否 | `0` | 动画延迟。 |
749
+ | `ease` | `string \| { x1: number; y1: number; x2: number; y2: number }` | 否 | `"ease-in"` | 动画缓动函数。 |
750
+ | `count` | `number` | 否 | `-1` | 滚动次数;`-1` 表示不限制次数。 |
751
+ | `copyNum` | `number` | 否 | `1` | 复制列表份数。 |
752
+ | `wheel` | `boolean` | 否 | `false` | 是否支持滚轮。 |
753
+ | `singleLine` | `boolean` | 否 | `false` | 是否单行滚动。 |
754
+ | `className` | `string` | 否 | - | 自定义类名。 |
755
755
 
756
756
  ### SelectCreate
757
757
 
@@ -763,13 +763,13 @@ import SelectCreate from "zy-react-library/components/SelectCreate";
763
763
 
764
764
  可创建/删除选项的选择器,继承 `antd SelectProps`。
765
765
 
766
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
767
- | --- | --- | --- | --- | --- |
768
- | `items` | `SelectCreateOption[]` | 是 | - | 选项列表。 |
769
- | `showDelete` | `boolean` | 否 | `true` | 是否显示删除选项能力。 |
770
- | `label` | `string` | 否 | `""` | 创建项标签文案,会拼到默认 placeholder 中。 |
771
- | `maxCount` | `number` | 否 | `1` | 最大选择数量,继承自 antd Select。 |
772
- | `onDelete` | `(option: SelectCreateOption) => void` | 否 | - | 删除选项回调。 |
766
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
767
+ | --- | --- | --- | --- | --- |
768
+ | `items` | `SelectCreateOption[]` | 是 | - | 选项列表。 |
769
+ | `showDelete` | `boolean` | 否 | `true` | 是否显示删除选项能力。 |
770
+ | `label` | `string` | 否 | `""` | 创建项标签文案,会拼到默认 placeholder 中。 |
771
+ | `maxCount` | `number` | 否 | `1` | 最大选择数量,继承自 antd Select。 |
772
+ | `onDelete` | `(option: SelectCreateOption) => void` | 否 | - | 删除选项回调。 |
773
773
 
774
774
  `SelectCreateOption`:
775
775
 
@@ -788,14 +788,14 @@ import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
788
788
 
789
789
  隐患信息展示组件。
790
790
 
791
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
792
- | --- | --- | --- | --- | --- |
793
- | `id` | `string` | 否 | `""` | 业务 ID。 |
794
- | `idKey` | `string` | 否 | `"id"` | URL 查询参数中的业务 ID 字段名。 |
795
- | `hiddenId` | `string` | 否 | `""` | 隐患 ID。 |
796
- | `hiddenIdKey` | `string` | 否 | `"hiddenId"` | URL 查询参数中的隐患 ID 字段名。 |
797
- | `history` | `boolean` | 否 | `false` | 是否请求历史详情接口。 |
798
- | `onGetData` | `(data: Record<string, any>) => void` | 否 | - | 获取详情数据后的回调。 |
791
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
792
+ | --- | --- | --- | --- | --- |
793
+ | `id` | `string` | 否 | `""` | 业务 ID。 |
794
+ | `idKey` | `string` | 否 | `"id"` | URL 查询参数中的业务 ID 字段名。 |
795
+ | `hiddenId` | `string` | 否 | `""` | 隐患 ID。 |
796
+ | `hiddenIdKey` | `string` | 否 | `"hiddenId"` | URL 查询参数中的隐患 ID 字段名。 |
797
+ | `history` | `boolean` | 否 | `false` | 是否请求历史详情接口。 |
798
+ | `onGetData` | `(data: Record<string, any>) => void` | 否 | - | 获取详情数据后的回调。 |
799
799
 
800
800
  ## Select 选择器
801
801
 
@@ -809,16 +809,16 @@ import BasicSelect from "zy-react-library/components/Select/Basic";
809
809
 
810
810
  基础选择器,继承 `antd SelectProps`。
811
811
 
812
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
813
- | --- | --- | --- | --- | --- |
814
- | `data` | `Record<string, any>[]` | 是 | `[]` | 选项数据。 |
815
- | `nameKey` | `string` | 否 | `"name"` | 标签字段名。 |
816
- | `idKey` | `string` | 否 | `"id"` | 值字段名。 |
817
- | `placeholder` | `string` | 否 | `""` | 占位文案,最终显示为 `请选择${placeholder}`。 |
818
- | `onGetLabel` | `(label: string \| string[]) => void` | 否 | - | 选择后返回标签。 |
819
- | `onGetOption` | `(option: Record<string, any> \| Record<string, any>[]) => void` | 否 | - | 选择后返回选项对象。 |
820
- | `onGetData` | `(data: Record<string, any>[]) => void` | 否 | - | 返回处理后的选项数据。 |
821
- | `labelRender` | `(item: Record<string, any>) => ReactNode` | 否 | - | 自定义选项标签渲染。 |
812
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
813
+ | --- | --- | --- | --- | --- |
814
+ | `data` | `Record<string, any>[]` | 是 | `[]` | 选项数据。 |
815
+ | `nameKey` | `string` | 否 | `"name"` | 标签字段名。 |
816
+ | `idKey` | `string` | 否 | `"id"` | 值字段名。 |
817
+ | `placeholder` | `string` | 否 | `""` | 占位文案,最终显示为 `请选择${placeholder}`。 |
818
+ | `onGetLabel` | `(label: string \| string[]) => void` | 否 | - | 选择后返回标签。 |
819
+ | `onGetOption` | `(option: Record<string, any> \| Record<string, any>[]) => void` | 否 | - | 选择后返回选项对象。 |
820
+ | `onGetData` | `(data: Record<string, any>[]) => void` | 否 | - | 返回处理后的选项数据。 |
821
+ | `labelRender` | `(item: Record<string, any>) => ReactNode` | 否 | - | 自定义选项标签渲染。 |
822
822
 
823
823
  ### DictionarySelect
824
824
 
@@ -830,14 +830,14 @@ import DictionarySelect from "zy-react-library/components/Select/Dictionary";
830
830
 
831
831
  字典选择器,继承 `BasicSelectProps`,但内部接管 `data`、默认字段和部分回调。
832
832
 
833
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
834
- | --- | --- | --- | --- | --- |
835
- | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
836
- | `dictValue` | `string` | 是 | `""` | 字典类型值;为空会输出缺少参数错误。 |
837
- | `nameKey` | `string` | 否 | `"dictLabel"` | 标签字段名。 |
838
- | `idKey` | `string` | 否 | `"dictValue"` | 值字段名。 |
839
- | `onGetOption` | `(option: DictionarySelectItem \| DictionarySelectItem[]) => void` | 否 | - | 选择后返回字典项。 |
840
- | `onGetData` | `(data: DictionarySelectItem[]) => void` | 否 | - | 返回字典数据。 |
833
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
834
+ | --- | --- | --- | --- | --- |
835
+ | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
836
+ | `dictValue` | `string` | 是 | `""` | 字典类型值;为空会输出缺少参数错误。 |
837
+ | `nameKey` | `string` | 否 | `"dictLabel"` | 标签字段名。 |
838
+ | `idKey` | `string` | 否 | `"dictValue"` | 值字段名。 |
839
+ | `onGetOption` | `(option: DictionarySelectItem \| DictionarySelectItem[]) => void` | 否 | - | 选择后返回字典项。 |
840
+ | `onGetData` | `(data: DictionarySelectItem[]) => void` | 否 | - | 返回字典数据。 |
841
841
 
842
842
  `DictionarySelectItem`:
843
843
 
@@ -856,16 +856,16 @@ import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
856
856
 
857
857
  人员选择器,继承 `BasicSelectProps`,内部接管人员数据源和默认字段。
858
858
 
859
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
860
- | --- | --- | --- | --- | --- |
861
- | `params` | `Params` | 否 | `{}` | 人员查询基础参数。 |
862
- | `placeholder` | `string` | 否 | `"人员"` | 占位文案,最终显示为 `请选择人员`。 |
863
- | `isNeedCorpInfoId` | `boolean` | 否 | `false` | 是否需要企业 ID。 |
864
- | `isNeedPostId` | `boolean` | 否 | `false` | 是否需要岗位 ID。 |
865
- | `isNeedDepartmentId` | `boolean` | 否 | `true` | 是否需要部门 ID。 |
866
- | `extraParams` | `ExtraParams` | 否 | `{}`,内部再合并 `{ noMain: "", eqEmploymentFlag: 1 }` | 人员查询额外参数。 |
867
- | `onGetOption` | `(option: PersonnelSelectItem \| PersonnelSelectItem[]) => void` | 否 | - | 选择后返回人员项。 |
868
- | `onGetData` | `(data: PersonnelSelectItem[]) => void` | 否 | - | 返回人员数据。 |
859
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
860
+ | --- | --- | --- | --- | --- |
861
+ | `params` | `Params` | 否 | `{}` | 人员查询基础参数。 |
862
+ | `placeholder` | `string` | 否 | `"人员"` | 占位文案,最终显示为 `请选择人员`。 |
863
+ | `isNeedCorpInfoId` | `boolean` | 否 | `false` | 是否需要企业 ID。 |
864
+ | `isNeedPostId` | `boolean` | 否 | `false` | 是否需要岗位 ID。 |
865
+ | `isNeedDepartmentId` | `boolean` | 否 | `true` | 是否需要部门 ID。 |
866
+ | `extraParams` | `ExtraParams` | 否 | `{}`,内部再合并 `{ noMain: "", eqEmploymentFlag: 1 }` | 人员查询额外参数。 |
867
+ | `onGetOption` | `(option: PersonnelSelectItem \| PersonnelSelectItem[]) => void` | 否 | - | 选择后返回人员项。 |
868
+ | `onGetData` | `(data: PersonnelSelectItem[]) => void` | 否 | - | 返回人员数据。 |
869
869
 
870
870
  `Params`:
871
871
 
@@ -911,18 +911,18 @@ import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
911
911
 
912
912
  基础树选择器,继承 `Omit<TreeSelectProps, "fieldNames">`。
913
913
 
914
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
915
- | --- | --- | --- | --- | --- |
916
- | `nameKey` | `string` | 否 | `"name"` | 节点标签字段名。 |
917
- | `idKey` | `string` | 否 | `"id"` | 节点值字段名。 |
918
- | `childrenKey` | `string` | 否 | `"children"` | 子节点字段名。 |
919
- | `getNodePathsIsIncludeOneself` | `boolean` | 否 | `true` | 获取节点路径时是否包含当前节点。 |
920
- | `onGetNodePaths` | `(nodes: Record<string, any>[]) => void` | 否 | - | 返回当前节点路径。 |
921
- | `placeholder` | `string` | 否 | `""` | 占位文案,最终显示为 `请选择${placeholder}`。 |
922
- | `level` | `number` | 否 | - | 限制展示层级。 |
923
- | `onGetLabel` | `(label: string \| string[]) => void` | 否 | - | 返回选中标签。 |
924
- | `onGetData` | `(data, processedData) => void` | 否 | - | 返回原始数据和处理后的数据。 |
925
- | `onlyLastLevel` | `boolean` | 否 | `false` | 是否只允许选择最后一级。 |
914
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
915
+ | --- | --- | --- | --- | --- |
916
+ | `nameKey` | `string` | 否 | `"name"` | 节点标签字段名。 |
917
+ | `idKey` | `string` | 否 | `"id"` | 节点值字段名。 |
918
+ | `childrenKey` | `string` | 否 | `"children"` | 子节点字段名。 |
919
+ | `getNodePathsIsIncludeOneself` | `boolean` | 否 | `true` | 获取节点路径时是否包含当前节点。 |
920
+ | `onGetNodePaths` | `(nodes: Record<string, any>[]) => void` | 否 | - | 返回当前节点路径。 |
921
+ | `placeholder` | `string` | 否 | `""` | 占位文案,最终显示为 `请选择${placeholder}`。 |
922
+ | `level` | `number` | 否 | - | 限制展示层级。 |
923
+ | `onGetLabel` | `(label: string \| string[]) => void` | 否 | - | 返回选中标签。 |
924
+ | `onGetData` | `(data, processedData) => void` | 否 | - | 返回原始数据和处理后的数据。 |
925
+ | `onlyLastLevel` | `boolean` | 否 | `false` | 是否只允许选择最后一级。 |
926
926
 
927
927
  ### AreaSelectTree
928
928
 
@@ -934,10 +934,10 @@ import AreaSelectTree from "zy-react-library/components/SelectTree/Area";
934
934
 
935
935
  地区树选择器,继承 `BasicSelectTree` 能力,内部接管地区数据、默认字段和占位文案。
936
936
 
937
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
938
- | --- | --- | --- | --- | --- |
939
- | `onGetNodePaths` | `(nodes: AreaSelectTreeItem[]) => void` | 否 | - | 返回地区节点路径。 |
940
- | `onGetData` | `(data: AreaSelectTreeItem[], processedData: AreaSelectTreeItem[]) => void` | 否 | - | 返回原始地区数据和处理后的地区数据。 |
937
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
938
+ | --- | --- | --- | --- | --- |
939
+ | `onGetNodePaths` | `(nodes: AreaSelectTreeItem[]) => void` | 否 | - | 返回地区节点路径。 |
940
+ | `onGetData` | `(data: AreaSelectTreeItem[], processedData: AreaSelectTreeItem[]) => void` | 否 | - | 返回原始地区数据和处理后的地区数据。 |
941
941
 
942
942
  `AreaSelectTreeItem`:`value: string`、`label: string`、`children: AreaSelectTreeItem[]`。
943
943
 
@@ -951,10 +951,10 @@ import IndustrySelectTree from "zy-react-library/components/SelectTree/Industry"
951
951
 
952
952
  行业树选择器。
953
953
 
954
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
955
- | --- | --- | --- | --- | --- |
956
- | `onGetNodePaths` | `(nodes: IndustrySelectTreeItem[]) => void` | 否 | - | 返回行业节点路径。 |
957
- | `onGetData` | `(data: IndustrySelectTreeItem[], processedData: IndustrySelectTreeItem[]) => void` | 否 | - | 返回原始行业数据和处理后的行业数据。 |
954
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
955
+ | --- | --- | --- | --- | --- |
956
+ | `onGetNodePaths` | `(nodes: IndustrySelectTreeItem[]) => void` | 否 | - | 返回行业节点路径。 |
957
+ | `onGetData` | `(data: IndustrySelectTreeItem[], processedData: IndustrySelectTreeItem[]) => void` | 否 | - | 返回原始行业数据和处理后的行业数据。 |
958
958
 
959
959
  `IndustrySelectTreeItem`:`dict_value: string`、`dict_label: string`、`childrenList: IndustrySelectTreeItem[]`。
960
960
 
@@ -968,10 +968,10 @@ import DictionarySelectTree from "zy-react-library/components/SelectTree/Diction
968
968
 
969
969
  字典树选择器。
970
970
 
971
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
972
- | --- | --- | --- | --- | --- |
973
- | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
974
- | `dictValue` | `string` | 是 | - | 字典类型值。 |
971
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
972
+ | --- | --- | --- | --- | --- |
973
+ | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
974
+ | `dictValue` | `string` | 是 | - | 字典类型值。 |
975
975
  | `nameKey` | `string` | 否 | 节点标签字段名。 |
976
976
  | `idKey` | `string` | 否 | 节点值字段名。 |
977
977
  | `onGetNodePaths` | `(nodes: DictionarySelectTreeItem[]) => void` | 否 | 返回字典节点路径。 |
@@ -989,15 +989,15 @@ import DepartmentSelectTree from "zy-react-library/components/SelectTree/Departm
989
989
 
990
990
  部门树选择器。
991
991
 
992
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
993
- | --- | --- | --- | --- | --- |
994
- | `params` | `Params` | 否 | `{}` | 部门查询参数。 |
995
- | `placeholder` | `string` | 否 | `"部门"` | 占位文案。 |
996
- | `isNeedCorpInfoId` | `boolean` | 否 | `false` | 是否需要企业 ID。 |
997
- | `isNeedParentId` | `boolean` | 否 | `false` | 是否需要父级 ID。 |
998
- | `searchType` | `"current" \| "all" \| "inType"` | 否 | `"current"` | 查询范围类型。 |
999
- | `onGetNodePaths` | `(nodes: DepartmentSelectTreeItem[]) => void` | 否 | - | 返回部门节点路径。 |
1000
- | `onGetData` | `(data: DepartmentSelectTreeItem[], processedData: DepartmentSelectTreeItem[]) => void` | 否 | - | 返回原始部门数据和处理后的部门数据。 |
992
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
993
+ | --- | --- | --- | --- | --- |
994
+ | `params` | `Params` | 否 | `{}` | 部门查询参数。 |
995
+ | `placeholder` | `string` | 否 | `"部门"` | 占位文案。 |
996
+ | `isNeedCorpInfoId` | `boolean` | 否 | `false` | 是否需要企业 ID。 |
997
+ | `isNeedParentId` | `boolean` | 否 | `false` | 是否需要父级 ID。 |
998
+ | `searchType` | `"current" \| "all" \| "inType"` | 否 | `"current"` | 查询范围类型。 |
999
+ | `onGetNodePaths` | `(nodes: DepartmentSelectTreeItem[]) => void` | 否 | - | 返回部门节点路径。 |
1000
+ | `onGetData` | `(data: DepartmentSelectTreeItem[], processedData: DepartmentSelectTreeItem[]) => void` | 否 | - | 返回原始部门数据和处理后的部门数据。 |
1001
1001
 
1002
1002
  `Params`:
1003
1003
 
@@ -1020,13 +1020,13 @@ import HiddenLevelSelectTree from "zy-react-library/components/SelectTree/Hidden
1020
1020
 
1021
1021
  隐患等级树选择器。
1022
1022
 
1023
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1024
- | --- | --- | --- | --- | --- |
1025
- | `isShowNeglect` | `boolean` | 否 | `true` | 是否显示可忽略等级。 |
1026
- | `isShowLarger` | `boolean` | 否 | `true` | 是否显示较大等级。 |
1027
- | `isShowMajor` | `boolean` | 否 | `true` | 是否显示重大等级。 |
1028
- | `onGetNodePaths` | `(nodes: HiddenLevelSelectTreeItem[]) => void` | 否 | - | 返回隐患等级节点路径。 |
1029
- | `onGetData` | `(data: HiddenLevelSelectTreeItem[], processedData: HiddenLevelSelectTreeItem[]) => void` | 否 | - | 返回原始数据和处理后的数据。 |
1023
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1024
+ | --- | --- | --- | --- | --- |
1025
+ | `isShowNeglect` | `boolean` | 否 | `true` | 是否显示可忽略等级。 |
1026
+ | `isShowLarger` | `boolean` | 否 | `true` | 是否显示较大等级。 |
1027
+ | `isShowMajor` | `boolean` | 否 | `true` | 是否显示重大等级。 |
1028
+ | `onGetNodePaths` | `(nodes: HiddenLevelSelectTreeItem[]) => void` | 否 | - | 返回隐患等级节点路径。 |
1029
+ | `onGetData` | `(data: HiddenLevelSelectTreeItem[], processedData: HiddenLevelSelectTreeItem[]) => void` | 否 | - | 返回原始数据和处理后的数据。 |
1030
1030
 
1031
1031
  `HiddenLevelSelectTreeItem`:`dictValue: string`、`dictLabel: string`、`children: HiddenLevelSelectTreeItem[]`。
1032
1032
 
@@ -1040,12 +1040,12 @@ import HiddenPartSelectTree from "zy-react-library/components/SelectTree/HiddenP
1040
1040
 
1041
1041
  隐患部位树选择器。
1042
1042
 
1043
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1044
- | --- | --- | --- | --- | --- |
1045
- | `params` | `{ eqCorpinfoId?: string }` | 否 | `{}` | 查询参数。 |
1046
- | `isNeedCorpInfoId` | `boolean` | 否 | `false` | 是否需要企业 ID。 |
1047
- | `onGetNodePaths` | `(nodes: HiddenPartSelectTreeItem[]) => void` | 否 | - | 返回隐患部位节点路径。 |
1048
- | `onGetData` | `(data: HiddenPartSelectTreeItem[], processedData: HiddenPartSelectTreeItem[]) => void` | 否 | - | 返回原始数据和处理后的数据。 |
1043
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1044
+ | --- | --- | --- | --- | --- |
1045
+ | `params` | `{ eqCorpinfoId?: string }` | 否 | `{}` | 查询参数。 |
1046
+ | `isNeedCorpInfoId` | `boolean` | 否 | `false` | 是否需要企业 ID。 |
1047
+ | `onGetNodePaths` | `(nodes: HiddenPartSelectTreeItem[]) => void` | 否 | - | 返回隐患部位节点路径。 |
1048
+ | `onGetData` | `(data: HiddenPartSelectTreeItem[], processedData: HiddenPartSelectTreeItem[]) => void` | 否 | - | 返回原始数据和处理后的数据。 |
1049
1049
 
1050
1050
  `HiddenPartSelectTreeItem`:`hiddenregionId: string`、`hiddenregion: string`、`children: HiddenPartSelectTreeItem[]`。
1051
1051
 
@@ -1061,16 +1061,16 @@ import BasicCascader from "zy-react-library/components/Cascader/Basic";
1061
1061
 
1062
1062
  基础级联选择器,继承 `Omit<CascaderProps, "fieldNames">`。
1063
1063
 
1064
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1065
- | --- | --- | --- | --- | --- |
1066
- | `nameKey` | `string` | 否 | `"name"` | 节点标签字段名。 |
1067
- | `idKey` | `string` | 否 | `"id"` | 节点值字段名。 |
1068
- | `childrenKey` | `string` | 否 | `"children"` | 子节点字段名。 |
1069
- | `getNodePathsIsIncludeOneself` | `boolean` | 否 | `true` | 获取节点路径时是否包含当前节点。 |
1070
- | `onGetNodePaths` | `(nodes: Record<string, any>[]) => void` | 否 | - | 返回当前节点路径。 |
1071
- | `placeholder` | `string` | 否 | `""` | 占位文案,最终显示为 `请选择${placeholder}`。 |
1072
- | `level` | `number` | 否 | - | 限制展示层级。 |
1073
- | `onGetData` | `(data, processedData) => void` | 否 | - | 返回原始数据和处理后的数据。 |
1064
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1065
+ | --- | --- | --- | --- | --- |
1066
+ | `nameKey` | `string` | 否 | `"name"` | 节点标签字段名。 |
1067
+ | `idKey` | `string` | 否 | `"id"` | 节点值字段名。 |
1068
+ | `childrenKey` | `string` | 否 | `"children"` | 子节点字段名。 |
1069
+ | `getNodePathsIsIncludeOneself` | `boolean` | 否 | `true` | 获取节点路径时是否包含当前节点。 |
1070
+ | `onGetNodePaths` | `(nodes: Record<string, any>[]) => void` | 否 | - | 返回当前节点路径。 |
1071
+ | `placeholder` | `string` | 否 | `""` | 占位文案,最终显示为 `请选择${placeholder}`。 |
1072
+ | `level` | `number` | 否 | - | 限制展示层级。 |
1073
+ | `onGetData` | `(data, processedData) => void` | 否 | - | 返回原始数据和处理后的数据。 |
1074
1074
 
1075
1075
  ### AreaCascader
1076
1076
 
@@ -1082,10 +1082,10 @@ import AreaCascader from "zy-react-library/components/Cascader/Area";
1082
1082
 
1083
1083
  地区级联选择器。
1084
1084
 
1085
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1086
- | --- | --- | --- | --- | --- |
1087
- | `onGetNodePaths` | `(nodes: AreaCascaderItem[]) => void` | 否 | - | 返回地区节点路径。 |
1088
- | `onGetData` | `(data: AreaCascaderItem[], processedData: AreaCascaderItem[]) => void` | 否 | - | 返回原始地区数据和处理后的地区数据。 |
1085
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1086
+ | --- | --- | --- | --- | --- |
1087
+ | `onGetNodePaths` | `(nodes: AreaCascaderItem[]) => void` | 否 | - | 返回地区节点路径。 |
1088
+ | `onGetData` | `(data: AreaCascaderItem[], processedData: AreaCascaderItem[]) => void` | 否 | - | 返回原始地区数据和处理后的地区数据。 |
1089
1089
 
1090
1090
  `AreaCascaderItem`:`value: string`、`label: string`、`children: AreaCascaderItem[]`。
1091
1091
 
@@ -1099,10 +1099,10 @@ import IndustryCascader from "zy-react-library/components/Cascader/Industry";
1099
1099
 
1100
1100
  行业级联选择器。
1101
1101
 
1102
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1103
- | --- | --- | --- | --- | --- |
1104
- | `onGetNodePaths` | `(nodes: IndustryCascaderItem[]) => void` | 否 | - | 返回行业节点路径。 |
1105
- | `onGetData` | `(data: IndustryCascaderItem[], processedData: IndustryCascaderItem[]) => void` | 否 | - | 返回原始行业数据和处理后的行业数据。 |
1102
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1103
+ | --- | --- | --- | --- | --- |
1104
+ | `onGetNodePaths` | `(nodes: IndustryCascaderItem[]) => void` | 否 | - | 返回行业节点路径。 |
1105
+ | `onGetData` | `(data: IndustryCascaderItem[], processedData: IndustryCascaderItem[]) => void` | 否 | - | 返回原始行业数据和处理后的行业数据。 |
1106
1106
 
1107
1107
  `IndustryCascaderItem`:`dict_value: string`、`dict_label: string`、`childrenList: IndustryCascaderItem[]`。
1108
1108
 
@@ -1116,10 +1116,10 @@ import DictionaryCascader from "zy-react-library/components/Cascader/Dictionary"
1116
1116
 
1117
1117
  字典级联选择器。
1118
1118
 
1119
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1120
- | --- | --- | --- | --- | --- |
1121
- | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
1122
- | `dictValue` | `string` | 是 | - | 字典类型值。 |
1119
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1120
+ | --- | --- | --- | --- | --- |
1121
+ | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
1122
+ | `dictValue` | `string` | 是 | - | 字典类型值。 |
1123
1123
  | `nameKey` | `string` | 否 | 节点标签字段名。 |
1124
1124
  | `idKey` | `string` | 否 | 节点值字段名。 |
1125
1125
  | `onGetNodePaths` | `(nodes: DictionaryCascaderItem[]) => void` | 否 | 返回字典节点路径。 |
@@ -1139,14 +1139,14 @@ import BasicLeftTree from "zy-react-library/components/LeftTree/Basic";
1139
1139
 
1140
1140
  基础树组件,继承 `Omit<TreeProps, "fieldNames">`。
1141
1141
 
1142
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1143
- | --- | --- | --- | --- | --- |
1144
- | `nameKey` | `string` | 否 | `"name"` | 节点标题字段名。 |
1145
- | `idKey` | `string` | 否 | `"id"` | 节点 key 字段名。 |
1146
- | `childrenKey` | `string` | 否 | `"children"` | 子节点字段名。 |
1147
- | `getNodePathsIsIncludeOneself` | `boolean` | 否 | `true` | 获取节点路径时是否包含当前节点。 |
1148
- | `onGetNodePaths` | `(nodes: Record<string, any>[]) => void` | 否 | - | 返回当前节点路径。 |
1149
- | `onGetData` | `(data: Record<string, any>[]) => void` | 否 | - | 返回树数据。 |
1142
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1143
+ | --- | --- | --- | --- | --- |
1144
+ | `nameKey` | `string` | 否 | `"name"` | 节点标题字段名。 |
1145
+ | `idKey` | `string` | 否 | `"id"` | 节点 key 字段名。 |
1146
+ | `childrenKey` | `string` | 否 | `"children"` | 子节点字段名。 |
1147
+ | `getNodePathsIsIncludeOneself` | `boolean` | 否 | `true` | 获取节点路径时是否包含当前节点。 |
1148
+ | `onGetNodePaths` | `(nodes: Record<string, any>[]) => void` | 否 | - | 返回当前节点路径。 |
1149
+ | `onGetData` | `(data: Record<string, any>[]) => void` | 否 | - | 返回树数据。 |
1150
1150
 
1151
1151
  ### AreaLeftTree
1152
1152
 
@@ -1158,10 +1158,10 @@ import AreaLeftTree from "zy-react-library/components/LeftTree/Area";
1158
1158
 
1159
1159
  地区左侧树。
1160
1160
 
1161
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1162
- | --- | --- | --- | --- | --- |
1163
- | `onGetNodePaths` | `(nodes: AreaLeftTreeItem[]) => void` | 否 | - | 返回地区节点路径。 |
1164
- | `onGetData` | `(data: AreaLeftTreeItem[], processedData: AreaLeftTreeItem[]) => void` | 否 | - | 返回原始地区数据和处理后的地区数据。 |
1161
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1162
+ | --- | --- | --- | --- | --- |
1163
+ | `onGetNodePaths` | `(nodes: AreaLeftTreeItem[]) => void` | 否 | - | 返回地区节点路径。 |
1164
+ | `onGetData` | `(data: AreaLeftTreeItem[], processedData: AreaLeftTreeItem[]) => void` | 否 | - | 返回原始地区数据和处理后的地区数据。 |
1165
1165
 
1166
1166
  `AreaLeftTreeItem`:`value: string`、`label: string`、`children: AreaLeftTreeItem[]`。
1167
1167
 
@@ -1175,14 +1175,14 @@ import DictionaryLeftTree from "zy-react-library/components/LeftTree/Dictionary"
1175
1175
 
1176
1176
  字典左侧树。
1177
1177
 
1178
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1179
- | --- | --- | --- | --- | --- |
1180
- | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
1181
- | `dictValue` | `string` | 是 | `""` | 字典类型值;为空会输出缺少参数错误。 |
1182
- | `nameKey` | `string` | 否 | `"dictLabel"` | 节点标题字段名。 |
1183
- | `idKey` | `string` | 否 | `"dictValue"` | 节点 key 字段名。 |
1184
- | `onGetNodePaths` | `(nodes: DictionaryLeftTreeItem[]) => void` | 否 | - | 返回字典节点路径。 |
1185
- | `onGetData` | `(data: DictionaryLeftTreeItem[], processedData: DictionaryLeftTreeItem[]) => void` | 否 | - | 返回原始字典数据和处理后的字典数据。 |
1178
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1179
+ | --- | --- | --- | --- | --- |
1180
+ | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
1181
+ | `dictValue` | `string` | 是 | `""` | 字典类型值;为空会输出缺少参数错误。 |
1182
+ | `nameKey` | `string` | 否 | `"dictLabel"` | 节点标题字段名。 |
1183
+ | `idKey` | `string` | 否 | `"dictValue"` | 节点 key 字段名。 |
1184
+ | `onGetNodePaths` | `(nodes: DictionaryLeftTreeItem[]) => void` | 否 | - | 返回字典节点路径。 |
1185
+ | `onGetData` | `(data: DictionaryLeftTreeItem[], processedData: DictionaryLeftTreeItem[]) => void` | 否 | - | 返回原始字典数据和处理后的字典数据。 |
1186
1186
 
1187
1187
  `DictionaryLeftTreeItem`:`dictValue: string`、`dictLabel: string`、`children: DictionaryLeftTreeItem[]`。
1188
1188
 
@@ -1196,12 +1196,12 @@ import DepartmentLeftTree from "zy-react-library/components/LeftTree/Department/
1196
1196
 
1197
1197
  部门左侧树。
1198
1198
 
1199
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1200
- | --- | --- | --- | --- | --- |
1201
- | `params` | `DepartmentSelectTreeProps["params"]` | 否 | `{}` | 部门查询参数。 |
1202
- | `searchType` | `DepartmentSelectTreeProps["searchType"]` | 否 | `"current"` | 查询范围类型。 |
1203
- | `onGetNodePaths` | `(nodes: DepartmentLeftTreeItem[]) => void` | 否 | - | 返回部门节点路径。 |
1204
- | `onGetData` | `(data: DepartmentLeftTreeItem[], processedData: DepartmentLeftTreeItem[]) => void` | 否 | - | 返回原始部门数据和处理后的部门数据。 |
1199
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1200
+ | --- | --- | --- | --- | --- |
1201
+ | `params` | `DepartmentSelectTreeProps["params"]` | 否 | `{}` | 部门查询参数。 |
1202
+ | `searchType` | `DepartmentSelectTreeProps["searchType"]` | 否 | `"current"` | 查询范围类型。 |
1203
+ | `onGetNodePaths` | `(nodes: DepartmentLeftTreeItem[]) => void` | 否 | - | 返回部门节点路径。 |
1204
+ | `onGetData` | `(data: DepartmentLeftTreeItem[], processedData: DepartmentLeftTreeItem[]) => void` | 否 | - | 返回原始部门数据和处理后的部门数据。 |
1205
1205
 
1206
1206
  `DepartmentLeftTreeItem`:`id: string`、`name: string`、`childrenList: DepartmentLeftTreeItem[]`。
1207
1207
 
@@ -1225,28 +1225,28 @@ import DepartmentLeftTree from "zy-react-library/components/LeftTree/Department/
1225
1225
  | `VideoIcon` | `zy-react-library/components/Icon/VideoIcon` |
1226
1226
  | `ViewIcon` | `zy-react-library/components/Icon/ViewIcon` |
1227
1227
 
1228
- ## Hooks
1229
-
1230
- ### Hook 默认值速查
1231
-
1232
- | Hook | 默认值 |
1233
- | --- | --- |
1234
- | `useTable` | `usePagination=true`、`useStorageQueryCriteria=true`、`usePermission=true`、`defaultType="advance"`、`defaultPagination={ current: 1, pageSize: 20 }`。 |
1235
- | `useUploadFile` | `returnType="object"`;执行上传时 `files=[]`、`single=true`。 |
1236
- | `useGetFile` | `returnType="object"`;执行获取时 `single=true`。 |
1237
- | `useDeleteFile` | `returnType="object"`;执行删除时 `files=[]`、`single=true`。 |
1238
- | `useImportFile` | `returnType="object"`;执行导入时 `options.files=[]`、`options.params={}`。 |
1239
- | `useDownloadBlob` | `returnType="object"`;执行下载时 `options.name=""`、`options.type=""`、`options.params={}`,未传 `type` 时使用 `application/vnd.ms-excel`,未传 `name` 时使用当前时间 `YYYY-MM-DD HH:mm:ss`。 |
1240
- | `useDownloadFile` | `returnType="object"`;未传 `name` 时从 `url` 中截取文件名。 |
1241
- | `useDictionary` | `returnType="object"`;执行获取时 `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`。 |
1242
- | `useGetUserInfo` | `returnType="object"`。 |
1243
- | `useIdle` | `timeout=10000`、`events=["mousemove","mousedown","resize","keydown","touchstart","wheel"]`。 |
1244
- | `useIsExistenceDuplicateSelection` | `message="存在重复项,请勿重复选择"`。 |
1245
- | `useUrlQueryCriteria` | URL 状态初始值 `{ searchFormKeys: "", searchFormValues: "", paginationKeys: "", paginationValues: "" }`,`navigateMode="replace"`。 |
1246
-
1247
- ### useTable
1248
-
1249
- 引入:
1228
+ ## Hooks
1229
+
1230
+ ### Hook 默认值速查
1231
+
1232
+ | Hook | 默认值 |
1233
+ | --- | --- |
1234
+ | `useTable` | `usePagination=true`、`useStorageQueryCriteria=true`、`usePermission=true`、`defaultType="advance"`、`defaultPagination={ current: 1, pageSize: 20 }`。 |
1235
+ | `useUploadFile` | `returnType="object"`;执行上传时 `files=[]`、`single=true`。 |
1236
+ | `useGetFile` | `returnType="object"`;执行获取时 `single=true`。 |
1237
+ | `useDeleteFile` | `returnType="object"`;执行删除时 `files=[]`、`single=true`。 |
1238
+ | `useImportFile` | `returnType="object"`;执行导入时 `options.files=[]`、`options.params={}`。 |
1239
+ | `useDownloadBlob` | `returnType="object"`;执行下载时 `options.name=""`、`options.type=""`、`options.params={}`,未传 `type` 时使用 `application/vnd.ms-excel`,未传 `name` 时使用当前时间 `YYYY-MM-DD HH:mm:ss`。 |
1240
+ | `useDownloadFile` | `returnType="object"`;未传 `name` 时从 `url` 中截取文件名。 |
1241
+ | `useDictionary` | `returnType="object"`;执行获取时 `appKey=DICTIONARY_APP_KEY_ENUM.DEFAULT`。 |
1242
+ | `useGetUserInfo` | `returnType="object"`。 |
1243
+ | `useIdle` | `timeout=10000`、`events=["mousemove","mousedown","resize","keydown","touchstart","wheel"]`。 |
1244
+ | `useIsExistenceDuplicateSelection` | `message="存在重复项,请勿重复选择"`。 |
1245
+ | `useUrlQueryCriteria` | URL 状态初始值 `{ searchFormKeys: "", searchFormValues: "", paginationKeys: "", paginationValues: "" }`,`navigateMode="replace"`。 |
1246
+
1247
+ ### useTable
1248
+
1249
+ 引入:
1250
1250
 
1251
1251
  ```tsx
1252
1252
  import useTable from "zy-react-library/hooks/useTable";
@@ -1311,21 +1311,21 @@ useUploadFile("object"): { loading: boolean; uploadFile: UploadFileFunction }
1311
1311
 
1312
1312
  单文件上传参数:
1313
1313
 
1314
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1315
- | --- | --- | --- | --- | --- |
1316
- | `files` | `UploadFile[]` | 是 | `[]` | 待上传文件;为空时直接返回空文件结果。 |
1317
- | `single` | `true` | 否 | `true` | 单文件上传标识。 |
1318
- | `params` | `SingleParams` | 是 | - | 上传参数。 |
1314
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1315
+ | --- | --- | --- | --- | --- |
1316
+ | `files` | `UploadFile[]` | 是 | `[]` | 待上传文件;为空时直接返回空文件结果。 |
1317
+ | `single` | `true` | 否 | `true` | 单文件上传标识。 |
1318
+ | `params` | `SingleParams` | 是 | - | 上传参数。 |
1319
1319
 
1320
1320
  `SingleParams`:`type: number`、`corpinfoId?: string`、`foreignKey?: string`。
1321
1321
 
1322
1322
  多文件上传参数:
1323
1323
 
1324
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1325
- | --- | --- | --- | --- | --- |
1326
- | `files` | `UploadFile[]` | 是 | `[]` | 待上传文件;为空时直接返回原 `foreignKey`。 |
1327
- | `single` | `false` | 是 | - | 多文件上传标识。 |
1328
- | `params` | `MultipleParams` | 是 | - | 上传参数。 |
1324
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1325
+ | --- | --- | --- | --- | --- |
1326
+ | `files` | `UploadFile[]` | 是 | `[]` | 待上传文件;为空时直接返回原 `foreignKey`。 |
1327
+ | `single` | `false` | 是 | - | 多文件上传标识。 |
1328
+ | `params` | `MultipleParams` | 是 | - | 上传参数。 |
1329
1329
 
1330
1330
  `MultipleParams`:`type: number`、`corpinfoId?: string`、`foreignKey: string`。
1331
1331
 
@@ -1348,20 +1348,20 @@ useGetFile("object"): { loading: boolean; getFile: GetFileFunction }
1348
1348
 
1349
1349
  单文件获取参数:
1350
1350
 
1351
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1352
- | --- | --- | --- | --- | --- |
1353
- | `eqType` | `number` | 是 | - | 文件类型。 |
1354
- | `eqForeignKey` | `string` | 是 | - | 外键 ID。 |
1355
- | `single` | `true` | 否 | `true` | 单文件获取标识。 |
1351
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1352
+ | --- | --- | --- | --- | --- |
1353
+ | `eqType` | `number` | 是 | - | 文件类型。 |
1354
+ | `eqForeignKey` | `string` | 是 | - | 外键 ID。 |
1355
+ | `single` | `true` | 否 | `true` | 单文件获取标识。 |
1356
1356
 
1357
1357
  多文件获取参数:
1358
1358
 
1359
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1360
- | --- | --- | --- | --- | --- |
1361
- | `eqType` | `number` | 是 | - | 文件类型。 |
1362
- | `foreignKey` | `string` | 是 | - | `dataSource` 中外键 ID 的字段名。 |
1363
- | `single` | `false` | 是 | - | 多文件获取标识。 |
1364
- | `dataSource` | `Record<string, any>[]` | 是 | - | 原始数据源;空数组时直接返回空数组。 |
1359
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1360
+ | --- | --- | --- | --- | --- |
1361
+ | `eqType` | `number` | 是 | - | 文件类型。 |
1362
+ | `foreignKey` | `string` | 是 | - | `dataSource` 中外键 ID 的字段名。 |
1363
+ | `single` | `false` | 是 | - | 多文件获取标识。 |
1364
+ | `dataSource` | `Record<string, any>[]` | 是 | - | 原始数据源;空数组时直接返回空数组。 |
1365
1365
 
1366
1366
  `GetFileItem`:
1367
1367
 
@@ -1389,10 +1389,10 @@ useDeleteFile("array"): [boolean, DeleteFileFunction]
1389
1389
  useDeleteFile("object"): { loading: boolean; deleteFile: DeleteFileFunction }
1390
1390
  ```
1391
1391
 
1392
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1393
- | --- | --- | --- | --- | --- |
1394
- | `files` | `DeleteFileItem[]` | 是 | `[]` | 待删除文件;为空时直接结束。 |
1395
- | `single` | `boolean` | 否 | `true` | 是否按单文件删除。 |
1392
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1393
+ | --- | --- | --- | --- | --- |
1394
+ | `files` | `DeleteFileItem[]` | 是 | `[]` | 待删除文件;为空时直接结束。 |
1395
+ | `single` | `boolean` | 否 | `true` | 是否按单文件删除。 |
1396
1396
 
1397
1397
  `DeleteFileItem`:`filePath?: string`、`id?: string`。
1398
1398
 
@@ -1413,13 +1413,11 @@ useImportFile("object"): { loading: boolean; importFile: ImportFileFunction }
1413
1413
 
1414
1414
  `importFile(url, options)` 参数:
1415
1415
 
1416
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1417
- | --- | --- | --- | --- | --- |
1418
- | `url` | `string` | 是 | - | 导入接口地址。 |
1419
- | `options.files` | `UploadFile[]` | 是 | `[]` | 上传文件数组。 |
1420
- | `options.params` | `Record<string, any>` | 否 | `{}` | 额外提交参数。 |
1421
-
1422
- `UploadFile`:`originFileObj?: File`,并支持业务扩展字段。
1416
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1417
+ | --- | --- | --- | --- | --- |
1418
+ | `url` | `string` | 是 | - | 导入接口地址。 |
1419
+ | `options.files` | `UploadFile[]` | 是 | `[]` | 上传文件数组。 |
1420
+ | `options.params` | `Record<string, any>` | 否 | `{}` | 额外提交参数。 |
1423
1421
 
1424
1422
  ### useDownloadFile
1425
1423
 
@@ -1436,10 +1434,10 @@ useDownloadFile("array"): [boolean, DownloadFileFunction]
1436
1434
  useDownloadFile("object"): { loading: boolean; downloadFile: DownloadFileFunction }
1437
1435
  ```
1438
1436
 
1439
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1440
- | --- | --- | --- | --- | --- |
1441
- | `url` | `string` | 是 | - | 下载地址。 |
1442
- | `name` | `string` | 否 | 从 `url` 截取文件名 | 下载文件名;传入无后缀文件名时会尝试使用 `url` 后缀补齐。 |
1437
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1438
+ | --- | --- | --- | --- | --- |
1439
+ | `url` | `string` | 是 | - | 下载地址。 |
1440
+ | `name` | `string` | 否 | 从 `url` 截取文件名 | 下载文件名;传入无后缀文件名时会尝试使用 `url` 后缀补齐。 |
1443
1441
 
1444
1442
  ### useDownloadBlob
1445
1443
 
@@ -1458,12 +1456,12 @@ useDownloadBlob("object"): { loading: boolean; downloadBlob: DownloadBlobFunctio
1458
1456
 
1459
1457
  `downloadBlob(url, options?)` 参数:
1460
1458
 
1461
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1462
- | --- | --- | --- | --- | --- |
1463
- | `url` | `string` | 是 | - | 下载接口地址。 |
1464
- | `options.name` | `string` | 否 | 当前时间 `YYYY-MM-DD HH:mm:ss` | 自定义文件名,不含后缀。 |
1465
- | `options.type` | `string` | 否 | `"application/vnd.ms-excel"` | Blob MIME 类型。 |
1466
- | `options.params` | `Record<string, any>` | 否 | `{}` | 请求查询参数。 |
1459
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1460
+ | --- | --- | --- | --- | --- |
1461
+ | `url` | `string` | 是 | - | 下载接口地址。 |
1462
+ | `options.name` | `string` | 否 | 当前时间 `YYYY-MM-DD HH:mm:ss` | 自定义文件名,不含后缀。 |
1463
+ | `options.type` | `string` | 否 | `"application/vnd.ms-excel"` | Blob MIME 类型。 |
1464
+ | `options.params` | `Record<string, any>` | 否 | `{}` | 请求查询参数。 |
1467
1465
 
1468
1466
  返回:`Promise<{ data: Blob }>`。
1469
1467
 
@@ -1482,12 +1480,12 @@ useDictionary("array"): [boolean, getDictionaryFunction]
1482
1480
  useDictionary("object"): { loading: boolean; getDictionary: getDictionaryFunction }
1483
1481
  ```
1484
1482
 
1485
- `getDictionary(options)` 参数:
1486
-
1487
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1488
- | --- | --- | --- | --- | --- |
1489
- | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
1490
- | `dictValue` | `string` | 是 | - | 字典类型值。 |
1483
+ `getDictionary(options)` 参数:
1484
+
1485
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1486
+ | --- | --- | --- | --- | --- |
1487
+ | `appKey` | `string` | 否 | `DICTIONARY_APP_KEY_ENUM.DEFAULT` | 字典应用 key。 |
1488
+ | `dictValue` | `string` | 是 | - | 字典类型值。 |
1491
1489
 
1492
1490
  返回 `Promise<DictionaryItem[]>`。
1493
1491
 
@@ -1568,10 +1566,10 @@ import useIdle from "zy-react-library/hooks/useIdle";
1568
1566
 
1569
1567
  检测用户是否空闲。
1570
1568
 
1571
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1572
- | --- | --- | --- | --- | --- |
1573
- | `timeout` | `number` | 否 | `10000` | 空闲超时时间,单位毫秒。 |
1574
- | `events` | `string[]` | 否 | `["mousemove","mousedown","resize","keydown","touchstart","wheel"]` | 用于判断活跃状态的事件名列表。 |
1569
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1570
+ | --- | --- | --- | --- | --- |
1571
+ | `timeout` | `number` | 否 | `10000` | 空闲超时时间,单位毫秒。 |
1572
+ | `events` | `string[]` | 否 | `["mousemove","mousedown","resize","keydown","touchstart","wheel"]` | 用于判断活跃状态的事件名列表。 |
1575
1573
 
1576
1574
  返回:`boolean`,表示是否处于空闲状态。
1577
1575
 
@@ -1587,11 +1585,11 @@ import useIsExistenceDuplicateSelection from "zy-react-library/hooks/useIsExiste
1587
1585
 
1588
1586
  `isExistenceDuplicateSelection(options)` 参数:
1589
1587
 
1590
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
1591
- | --- | --- | --- | --- | --- |
1592
- | `data` | `T[]` | 是 | - | 需要检查重复项的目标数组。 |
1593
- | `key` | `keyof T \| string` | 是 | - | 用于判断重复的对象属性名。 |
1594
- | `message` | `string` | 否 | `"存在重复项,请勿重复选择"` | 存在重复项时的错误提示。 |
1588
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
1589
+ | --- | --- | --- | --- | --- |
1590
+ | `data` | `T[]` | 是 | - | 需要检查重复项的目标数组。 |
1591
+ | `key` | `keyof T \| string` | 是 | - | 用于判断重复的对象属性名。 |
1592
+ | `message` | `string` | 否 | `"存在重复项,请勿重复选择"` | 存在重复项时的错误提示。 |
1595
1593
 
1596
1594
  返回:`Promise<void>`。
1597
1595