@jnrs/vue-core 1.2.20 → 1.2.22
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/AGENTS.md +21 -21
- package/README.md +5 -1
- package/dist/components/JnImportAndExport.vue.d.ts +2 -2
- package/dist/components/index.js +420 -414
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -514,27 +514,27 @@ const handlePageChange = (newPagination) => {
|
|
|
514
514
|
|
|
515
515
|
**Props:**
|
|
516
516
|
|
|
517
|
-
| 属性名 | 类型
|
|
518
|
-
| --------------------------- |
|
|
519
|
-
| importTemplateApi | `() => Promise<
|
|
520
|
-
| importApi | `(data: FormData) => Promise<IFullResponse>`
|
|
521
|
-
| importFieldName | `string`
|
|
522
|
-
| importParams | `Record<string, unknown>`
|
|
523
|
-
| fileUploadConfig | `{ accept: string; limit: number }`
|
|
524
|
-
| importBtnName | `string`
|
|
525
|
-
| importDisabled | `boolean`
|
|
526
|
-
| exportApi | `(data: Record<string, unknown>) => Promise<
|
|
527
|
-
| exportParams | `Record<string, unknown>`
|
|
528
|
-
| exportDynamicParamsConfig | `{ label: string; prop: string }`
|
|
529
|
-
| messageBoxInputPattern | `RegExp`
|
|
530
|
-
| messageBoxInputErrorMessage | `string`
|
|
531
|
-
| exportBtnName | `string`
|
|
532
|
-
| exportDisabled | `boolean`
|
|
533
|
-
| size | `ElSize`
|
|
534
|
-
| buttonType | `ElButtonType`
|
|
535
|
-
| plain | `boolean`
|
|
536
|
-
| text | `boolean`
|
|
537
|
-
| icon | `boolean`
|
|
517
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
518
|
+
| --------------------------- | ------------------------------------------------------- | ------------------------------------ | --------------------------------- |
|
|
519
|
+
| importTemplateApi | `() => Promise<IBlobItem>` | — | 下载导入模板文件的 api 函数 |
|
|
520
|
+
| importApi | `(data: FormData) => Promise<IFullResponse>` | — | 数据导入 api 函数 |
|
|
521
|
+
| importFieldName | `string` | `'file'` | 数据导入的字段名 |
|
|
522
|
+
| importParams | `Record<string, unknown>` | — | 导入的参数 |
|
|
523
|
+
| fileUploadConfig | `{ accept: string; limit: number }` | `{ accept: '.xls,.xlsx', limit: 1 }` | 导入的文件上传配置 |
|
|
524
|
+
| importBtnName | `string` | `'导入'` | 导入的按钮名称 |
|
|
525
|
+
| importDisabled | `boolean` | `false` | 是否禁用导入按钮 |
|
|
526
|
+
| exportApi | `(data: Record<string, unknown>) => Promise<IBlobItem>` | — | 数据导出的 api 函数 |
|
|
527
|
+
| exportParams | `Record<string, unknown>` | — | 导出的参数 |
|
|
528
|
+
| exportDynamicParamsConfig | `{ label: string; prop: string }` | — | 导出操作时,MessageBox 的参数配置 |
|
|
529
|
+
| messageBoxInputPattern | `RegExp` | `/^\S+(?:\s+\S+)*$/` | MessageBox 中输入框的校验表达式 |
|
|
530
|
+
| messageBoxInputErrorMessage | `string` | `'请输入参数'` | 校验未通过时的提示文本 |
|
|
531
|
+
| exportBtnName | `string` | `'导出'` | 导出的按钮名称 |
|
|
532
|
+
| exportDisabled | `boolean` | `false` | 是否禁用导出按钮 |
|
|
533
|
+
| size | `ElSize` | `'default'` | 按钮尺寸 |
|
|
534
|
+
| buttonType | `ElButtonType` | `'primary'` | 按钮类型 |
|
|
535
|
+
| plain | `boolean` | `true` | 是否为朴素按钮 |
|
|
536
|
+
| text | `boolean` | `false` | 是否为文字按钮 |
|
|
537
|
+
| icon | `boolean` | `true` | 是否显示图标 |
|
|
538
538
|
|
|
539
539
|
**使用示例:**
|
|
540
540
|
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFullResponse } from '@jnrs/shared';
|
|
1
|
+
import { IFullResponse, IBlobItem } from '@jnrs/shared';
|
|
2
2
|
import { ElSize, ElButtonType } from '../types/base';
|
|
3
3
|
import { nextTick } from 'vue';
|
|
4
4
|
export interface Props {
|
|
@@ -42,7 +42,7 @@ export interface Props {
|
|
|
42
42
|
/**
|
|
43
43
|
* 数据导出的 api 函数
|
|
44
44
|
*/
|
|
45
|
-
exportApi?: (data:
|
|
45
|
+
exportApi?: (data: any) => Promise<IBlobItem>;
|
|
46
46
|
/**
|
|
47
47
|
* 导出的参数
|
|
48
48
|
*/
|