ra-element 0.1.11 → 0.1.16

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/docs/ra-upload.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  | name | type | desc | default | required |
6
6
  | ---- | ---- | ---- | ------- | -------- |
7
- | action | String | 上传地址 | '' | |
8
- | fileList | Array as PropType<UploadUserFile[]> | 默认文件列表 | [] | |
7
+ | action | String | 上传地址 | 'http://10.168.150.66:50283/api/file/upload?filePathPrefix=roadPlan&cjr=1' | |
8
+ | modelValue | Array as PropType<UploadFileGroup[]> | 默认文件列表 | [] | |
9
9
  | limit | Number | 最大上传数量 | 5 | |
10
10
  | multiple | Boolean | 是否支持多选 | false | |
11
11
  | disabled | Boolean | 是否禁用 | false | |
@@ -15,7 +15,7 @@
15
15
  | buttonText | String | 按钮文本 | '点击上传' | |
16
16
  | dragText | String | 拖拽区域文本 | '点击或拖拽文件到这里上传' | |
17
17
  | tipText | String | 提示文本 | '' | |
18
- | autoUpload | Boolean | 是否自动上传 | true | |
18
+ | autoUpload | Boolean | 是否自动上传 | false | |
19
19
  | showFileList | Boolean | 是否显示文件列表 | true | |
20
20
  | maxSize | Number | 最大文件大小(MB) | 10 | |
21
21
 
@@ -23,9 +23,10 @@
23
23
 
24
24
  | name | desc |
25
25
  | ---- | ---- |
26
- | update:fileList | fileList双向绑定 |
26
+ | update:modelValue | fileList双向绑定 |
27
27
  | success | 上传成功事件 |
28
28
  | error | 上传失败事件 |
29
29
  | change | 文件改变事件 |
30
30
  | remove | 文件移除事件 |
31
31
  | exceed | 文件超出限制事件 |
32
+ | download | 文件下载事件 |
@@ -20,3 +20,25 @@ import { default as RaUpload } from './ra-upload/index.vue';
20
20
  declare const install: (app: App) => void;
21
21
  export { RaAutoScroll, RaButton, RaCheckboxGroup, RaDatePicker, RaDialog, RaDialogSelect, RaForm, RaHelpTip, RaInput, RaPagination, RaRadioGroup, RaSelect, RaSvg, RaTable, RaTextarea, RaToolTip, RaTreeSelect, RaUpload, };
22
22
  export default install;
23
+ declare module 'vue' {
24
+ interface GlobalComponents {
25
+ RaAutoScroll: typeof RaAutoScroll;
26
+ RaButton: typeof RaButton;
27
+ RaCheckboxGroup: typeof RaCheckboxGroup;
28
+ RaDatePicker: typeof RaDatePicker;
29
+ RaDialog: typeof RaDialog;
30
+ RaDialogSelect: typeof RaDialogSelect;
31
+ RaForm: typeof RaForm;
32
+ RaHelpTip: typeof RaHelpTip;
33
+ RaInput: typeof RaInput;
34
+ RaPagination: typeof RaPagination;
35
+ RaRadioGroup: typeof RaRadioGroup;
36
+ RaSelect: typeof RaSelect;
37
+ RaSvg: typeof RaSvg;
38
+ RaTable: typeof RaTable;
39
+ RaTextarea: typeof RaTextarea;
40
+ RaToolTip: typeof RaToolTip;
41
+ RaTreeSelect: typeof RaTreeSelect;
42
+ RaUpload: typeof RaUpload;
43
+ }
44
+ }
@@ -1,11 +1,15 @@
1
1
  import { UploadUserFile } from 'element-plus';
2
+ type UploadFileGroup = UploadUserFile & {
3
+ fileName: string;
4
+ raId: string;
5
+ };
2
6
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
7
  action: {
4
8
  type: StringConstructor;
5
9
  default: string;
6
10
  };
7
- fileList: {
8
- type: PropType<UploadUserFile[]>;
11
+ modelValue: {
12
+ type: PropType<UploadFileGroup[]>;
9
13
  default: () => never[];
10
14
  };
11
15
  limit: {
@@ -64,16 +68,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
64
68
  change: (...args: any[]) => void;
65
69
  error: (...args: any[]) => void;
66
70
  success: (...args: any[]) => void;
67
- "update:fileList": (...args: any[]) => void;
71
+ "update:modelValue": (...args: any[]) => void;
68
72
  remove: (...args: any[]) => void;
69
73
  exceed: (...args: any[]) => void;
74
+ download: (...args: any[]) => void;
70
75
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
71
76
  action: {
72
77
  type: StringConstructor;
73
78
  default: string;
74
79
  };
75
- fileList: {
76
- type: PropType<UploadUserFile[]>;
80
+ modelValue: {
81
+ type: PropType<UploadFileGroup[]>;
77
82
  default: () => never[];
78
83
  };
79
84
  limit: {
@@ -129,23 +134,26 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
129
134
  onChange?: ((...args: any[]) => any) | undefined;
130
135
  onError?: ((...args: any[]) => any) | undefined;
131
136
  onSuccess?: ((...args: any[]) => any) | undefined;
132
- "onUpdate:fileList"?: ((...args: any[]) => any) | undefined;
137
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
133
138
  onRemove?: ((...args: any[]) => any) | undefined;
134
139
  onExceed?: ((...args: any[]) => any) | undefined;
140
+ onDownload?: ((...args: any[]) => any) | undefined;
135
141
  }>, {
136
142
  disabled: boolean;
137
143
  drag: boolean;
144
+ modelValue: any;
138
145
  multiple: boolean;
139
146
  tipText: string;
140
147
  action: string;
141
- fileList: any;
142
- limit: number;
148
+ showFileList: boolean;
143
149
  accept: string;
150
+ autoUpload: boolean;
144
151
  listType: any;
152
+ limit: number;
145
153
  buttonText: string;
146
154
  dragText: string;
147
- autoUpload: boolean;
148
- showFileList: boolean;
149
155
  maxSize: number;
150
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
156
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
157
+ uploadRef: unknown;
158
+ }, HTMLDivElement>;
151
159
  export default _default;