yuang-framework-ui-pc 1.1.51 → 1.1.53

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.
Files changed (110) hide show
  1. package/es/core-components.d.ts +4 -2
  2. package/es/core-components.js +9 -5
  3. package/es/ele-admin-layout/components/layout-tabs.d.ts +4 -4
  4. package/es/ele-dropdown/components/pro-dropdown.d.ts +2 -2
  5. package/es/ele-pro-layout/index.d.ts +4 -4
  6. package/es/ele-tab-wrap/components/tab-dropdown.d.ts +4 -4
  7. package/es/ele-upload-list/components/list-item.d.ts +1 -0
  8. package/es/ele-upload-list/components/list-item.js +11 -3
  9. package/es/ele-upload-list/index.d.ts +2 -0
  10. package/es/ele-upload-list/index.js +16 -3
  11. package/es/ele-upload-list/types.d.ts +2 -0
  12. package/es/icons/ApiItem.d.ts +2 -0
  13. package/es/icons/ApiItem.js +32 -0
  14. package/es/icons/ApiTeam.d.ts +2 -0
  15. package/es/icons/ApiTeam.js +42 -0
  16. package/es/icons/OrganizationDept.d.ts +2 -0
  17. package/es/icons/OrganizationDept.js +33 -0
  18. package/es/icons/OrganizationOrg.d.ts +2 -0
  19. package/es/icons/OrganizationOrg.js +32 -0
  20. package/es/icons/OrganizationUnit.d.ts +2 -0
  21. package/es/icons/OrganizationUnit.js +32 -0
  22. package/es/icons/index.d.ts +5 -0
  23. package/es/icons/index.js +10 -0
  24. package/{lib/yu-framework-attachment-image-upload → es/yu-framework-attachment-upload}/index.d.ts +0 -1
  25. package/es/{yu-framework-attachment-image-upload → yu-framework-attachment-upload}/index.js +43 -64
  26. package/es/yu-framework-slider-captcha-dialog/{SliderCaptcha.js → components/SliderCaptcha.js} +1 -1
  27. package/es/yu-framework-slider-captcha-dialog/index.js +1 -1
  28. package/es/yu-uims-organization-dialog/components/organization-dialog.d.ts +20 -0
  29. package/es/yu-uims-organization-dialog/components/organization-dialog.js +327 -0
  30. package/es/yu-uims-organization-dialog/index.d.ts +45 -0
  31. package/es/yu-uims-organization-dialog/index.js +68 -0
  32. package/es/yu-uims-role-dialog/components/role-dialog.d.ts +20 -0
  33. package/es/yu-uims-role-dialog/components/role-dialog.js +224 -0
  34. package/es/yu-uims-role-dialog/components/role-list.d.ts +54 -0
  35. package/es/yu-uims-role-dialog/components/role-list.js +188 -0
  36. package/es/yu-uims-role-dialog/components/role-query.d.ts +28 -0
  37. package/es/yu-uims-role-dialog/components/role-query.js +132 -0
  38. package/es/yu-uims-role-dialog/index.d.ts +23 -0
  39. package/es/yu-uims-role-dialog/index.js +42 -0
  40. package/es/yu-uims-user-dialog/components/user-dialog.d.ts +20 -0
  41. package/es/yu-uims-user-dialog/components/user-dialog.js +247 -0
  42. package/es/yu-uims-user-dialog/components/user-list.d.ts +84 -0
  43. package/es/yu-uims-user-dialog/components/user-list.js +232 -0
  44. package/es/yu-uims-user-dialog/components/user-query.d.ts +30 -0
  45. package/es/yu-uims-user-dialog/components/user-query.js +167 -0
  46. package/es/yu-uims-user-dialog/index.d.ts +23 -0
  47. package/es/yu-uims-user-dialog/index.js +42 -0
  48. package/lib/core-components.cjs +8 -4
  49. package/lib/core-components.d.ts +4 -2
  50. package/lib/ele-admin-layout/components/layout-tabs.d.ts +4 -4
  51. package/lib/ele-dropdown/components/pro-dropdown.d.ts +2 -2
  52. package/lib/ele-pro-layout/index.d.ts +4 -4
  53. package/lib/ele-tab-wrap/components/tab-dropdown.d.ts +4 -4
  54. package/lib/ele-upload-list/components/list-item.cjs +11 -3
  55. package/lib/ele-upload-list/components/list-item.d.ts +1 -0
  56. package/lib/ele-upload-list/index.cjs +16 -3
  57. package/lib/ele-upload-list/index.d.ts +2 -0
  58. package/lib/ele-upload-list/types.d.ts +2 -0
  59. package/lib/icons/ApiItem.cjs +31 -0
  60. package/lib/icons/ApiItem.d.ts +2 -0
  61. package/lib/icons/ApiTeam.cjs +41 -0
  62. package/lib/icons/ApiTeam.d.ts +2 -0
  63. package/lib/icons/OrganizationDept.cjs +32 -0
  64. package/lib/icons/OrganizationDept.d.ts +2 -0
  65. package/lib/icons/OrganizationOrg.cjs +31 -0
  66. package/lib/icons/OrganizationOrg.d.ts +2 -0
  67. package/lib/icons/OrganizationUnit.cjs +31 -0
  68. package/lib/icons/OrganizationUnit.d.ts +2 -0
  69. package/lib/icons/index.cjs +10 -0
  70. package/lib/icons/index.d.ts +5 -0
  71. package/lib/{yu-framework-attachment-image-upload → yu-framework-attachment-upload}/index.cjs +42 -63
  72. package/{es/yu-framework-attachment-image-upload → lib/yu-framework-attachment-upload}/index.d.ts +0 -1
  73. package/lib/yu-framework-slider-captcha-dialog/{SliderCaptcha.cjs → components/SliderCaptcha.cjs} +1 -1
  74. package/lib/yu-framework-slider-captcha-dialog/index.cjs +1 -1
  75. package/lib/yu-uims-organization-dialog/components/organization-dialog.cjs +326 -0
  76. package/lib/yu-uims-organization-dialog/components/organization-dialog.d.ts +20 -0
  77. package/lib/yu-uims-organization-dialog/index.cjs +67 -0
  78. package/lib/yu-uims-organization-dialog/index.d.ts +45 -0
  79. package/lib/yu-uims-role-dialog/components/role-dialog.cjs +223 -0
  80. package/lib/yu-uims-role-dialog/components/role-dialog.d.ts +20 -0
  81. package/lib/yu-uims-role-dialog/components/role-list.cjs +187 -0
  82. package/lib/yu-uims-role-dialog/components/role-list.d.ts +54 -0
  83. package/lib/yu-uims-role-dialog/components/role-query.cjs +131 -0
  84. package/lib/yu-uims-role-dialog/components/role-query.d.ts +28 -0
  85. package/lib/yu-uims-role-dialog/index.cjs +41 -0
  86. package/lib/yu-uims-role-dialog/index.d.ts +23 -0
  87. package/lib/yu-uims-user-dialog/components/user-dialog.cjs +246 -0
  88. package/lib/yu-uims-user-dialog/components/user-dialog.d.ts +20 -0
  89. package/lib/yu-uims-user-dialog/components/user-list.cjs +231 -0
  90. package/lib/yu-uims-user-dialog/components/user-list.d.ts +84 -0
  91. package/lib/yu-uims-user-dialog/components/user-query.cjs +166 -0
  92. package/lib/yu-uims-user-dialog/components/user-query.d.ts +30 -0
  93. package/lib/yu-uims-user-dialog/index.cjs +41 -0
  94. package/lib/yu-uims-user-dialog/index.d.ts +23 -0
  95. package/package.json +2 -2
  96. package/typings/global.d.ts +4 -2
  97. package/es/yu-framework-attachment-file-upload/CommonUpload/index.d.ts +0 -161
  98. package/es/yu-framework-attachment-file-upload/CommonUpload/index.js +0 -173
  99. package/es/yu-framework-attachment-file-upload/FileUpload/index.d.ts +0 -143
  100. package/es/yu-framework-attachment-file-upload/FileUpload/index.js +0 -219
  101. package/es/yu-framework-attachment-file-upload/index.d.ts +0 -16
  102. package/es/yu-framework-attachment-file-upload/index.js +0 -55
  103. package/lib/yu-framework-attachment-file-upload/CommonUpload/index.cjs +0 -172
  104. package/lib/yu-framework-attachment-file-upload/CommonUpload/index.d.ts +0 -161
  105. package/lib/yu-framework-attachment-file-upload/FileUpload/index.cjs +0 -218
  106. package/lib/yu-framework-attachment-file-upload/FileUpload/index.d.ts +0 -143
  107. package/lib/yu-framework-attachment-file-upload/index.cjs +0 -54
  108. package/lib/yu-framework-attachment-file-upload/index.d.ts +0 -16
  109. /package/es/yu-framework-slider-captcha-dialog/{SliderCaptcha.d.ts → components/SliderCaptcha.d.ts} +0 -0
  110. /package/lib/yu-framework-slider-captcha-dialog/{SliderCaptcha.d.ts → components/SliderCaptcha.d.ts} +0 -0
@@ -1,161 +0,0 @@
1
- import { CSSProperties } from 'vue';
2
- import { ElProgressProps, ElImageProps } from '../../ele-app/el';
3
- import { EleImageViewerProps } from '../../ele-app/plus';
4
- import { UploadItem, ListType, BeforeUploadClick, BeforeItemEdit, UploadLocale } from '../../ele-upload-list/types';
5
-
6
- declare function __VLS_template(): Partial<Record<string, (_: any) => any>>;
7
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
8
- modelValue: import('vue').PropType<UploadItem[]>;
9
- drag: {
10
- type: import('vue').PropType<boolean>;
11
- default: boolean;
12
- };
13
- disabled: {
14
- type: import('vue').PropType<boolean>;
15
- };
16
- readonly: {
17
- type: import('vue').PropType<boolean>;
18
- };
19
- sortable: {
20
- type: import('vue').PropType<boolean | Record<string | number | symbol, any>>;
21
- default: () => {
22
- forceFallback: boolean;
23
- };
24
- };
25
- multiple: {
26
- type: import('vue').PropType<boolean>;
27
- };
28
- preview: {
29
- type: import('vue').PropType<boolean>;
30
- default: boolean;
31
- };
32
- accept: {
33
- type: import('vue').PropType<string>;
34
- default: string;
35
- };
36
- tools: {
37
- type: import('vue').PropType<boolean>;
38
- default: boolean;
39
- };
40
- beforeUploadClick: {
41
- type: import('vue').PropType<BeforeUploadClick>;
42
- };
43
- locale: {
44
- type: import('vue').PropType<Partial<UploadLocale>>;
45
- };
46
- imageProps: {
47
- type: import('vue').PropType<ElImageProps>;
48
- };
49
- progressProps: {
50
- type: import('vue').PropType<ElProgressProps>;
51
- };
52
- listType: {
53
- type: import('vue').PropType<ListType>;
54
- };
55
- limit: {
56
- type: import('vue').PropType<number>;
57
- };
58
- itemStyle: {
59
- type: import('vue').PropType<CSSProperties>;
60
- };
61
- buttonStyle: {
62
- type: import('vue').PropType<CSSProperties>;
63
- };
64
- previewProps: {
65
- type: import('vue').PropType<EleImageViewerProps>;
66
- };
67
- beforeItemEdit: {
68
- type: import('vue').PropType<BeforeItemEdit>;
69
- };
70
- fileLimit: {
71
- type: import('vue').PropType<number>;
72
- default: number;
73
- };
74
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
75
- itemClick: (item: UploadItem) => void;
76
- preview: (item: UploadItem) => void;
77
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
78
- modelValue: import('vue').PropType<UploadItem[]>;
79
- drag: {
80
- type: import('vue').PropType<boolean>;
81
- default: boolean;
82
- };
83
- disabled: {
84
- type: import('vue').PropType<boolean>;
85
- };
86
- readonly: {
87
- type: import('vue').PropType<boolean>;
88
- };
89
- sortable: {
90
- type: import('vue').PropType<boolean | Record<string | number | symbol, any>>;
91
- default: () => {
92
- forceFallback: boolean;
93
- };
94
- };
95
- multiple: {
96
- type: import('vue').PropType<boolean>;
97
- };
98
- preview: {
99
- type: import('vue').PropType<boolean>;
100
- default: boolean;
101
- };
102
- accept: {
103
- type: import('vue').PropType<string>;
104
- default: string;
105
- };
106
- tools: {
107
- type: import('vue').PropType<boolean>;
108
- default: boolean;
109
- };
110
- beforeUploadClick: {
111
- type: import('vue').PropType<BeforeUploadClick>;
112
- };
113
- locale: {
114
- type: import('vue').PropType<Partial<UploadLocale>>;
115
- };
116
- imageProps: {
117
- type: import('vue').PropType<ElImageProps>;
118
- };
119
- progressProps: {
120
- type: import('vue').PropType<ElProgressProps>;
121
- };
122
- listType: {
123
- type: import('vue').PropType<ListType>;
124
- };
125
- limit: {
126
- type: import('vue').PropType<number>;
127
- };
128
- itemStyle: {
129
- type: import('vue').PropType<CSSProperties>;
130
- };
131
- buttonStyle: {
132
- type: import('vue').PropType<CSSProperties>;
133
- };
134
- previewProps: {
135
- type: import('vue').PropType<EleImageViewerProps>;
136
- };
137
- beforeItemEdit: {
138
- type: import('vue').PropType<BeforeItemEdit>;
139
- };
140
- fileLimit: {
141
- type: import('vue').PropType<number>;
142
- default: number;
143
- };
144
- }>> & Readonly<{
145
- onItemClick?: ((item: UploadItem) => any) | undefined;
146
- onPreview?: ((item: UploadItem) => any) | undefined;
147
- }>, {
148
- drag: boolean;
149
- sortable: boolean | Record<keyof any, any>;
150
- preview: boolean;
151
- accept: string;
152
- tools: boolean;
153
- fileLimit: number;
154
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
155
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
156
- export default _default;
157
- type __VLS_WithTemplateSlots<T, S> = T & {
158
- new (): {
159
- $slots: S;
160
- };
161
- };
@@ -1,218 +0,0 @@
1
- "use strict";
2
- const vue = require("vue");
3
- const CommonUpload = require("../CommonUpload/index");
4
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
5
- ...{ name: "FileUpload" },
6
- __name: "index",
7
- props: {
8
- modelValue: {},
9
- fileLimit: { default: 100 },
10
- readonly: { type: Boolean },
11
- disabled: { type: Boolean },
12
- preview: { type: Boolean, default: true },
13
- limit: {},
14
- multiple: { type: Boolean },
15
- drag: { type: Boolean, default: true },
16
- accept: { default: "" },
17
- itemStyle: {},
18
- buttonStyle: {},
19
- sortable: { type: [Boolean, Object], default: () => ({ forceFallback: true }) },
20
- imageProps: {},
21
- progressProps: {},
22
- previewProps: {},
23
- tools: { type: Boolean, default: true },
24
- listType: { default: "file" },
25
- beforeUploadClick: {},
26
- beforeItemEdit: {},
27
- locale: {}
28
- },
29
- emits: ["update:modelValue", "change"],
30
- setup(__props, { expose: __expose, emit: __emit }) {
31
- const props = __props;
32
- const emit = __emit;
33
- const files = vue.ref([]);
34
- const isImage = (url) => {
35
- var _a, _b;
36
- const parts = url ? url.split(".") : [];
37
- const suffix = parts.length <= 1 || parts[0] === "" && parts.length === 2 ? "" : (_b = (_a = parts.pop()) == null ? void 0 : _a.toLowerCase) == null ? void 0 : _b.call(_a);
38
- return suffix && ["png", "jpg", "jpeg", "gif", "svg"].includes(suffix);
39
- };
40
- const getItemFileUrl = (item) => {
41
- return item.fileUrl;
42
- };
43
- const handleItemClick = (item) => {
44
- handleItemPreview(item);
45
- };
46
- const handleItemPreview = (item) => {
47
- if (!item.url) {
48
- const fileUrl = getItemFileUrl(item);
49
- if (fileUrl) {
50
- window.open(fileUrl);
51
- } else if (item.file && !item.file.type.startsWith("image")) {
52
- window.open(URL.createObjectURL(item.file));
53
- }
54
- }
55
- };
56
- const updateModelValue = (value) => {
57
- if (props.modelValue !== value) {
58
- emit("update:modelValue", value);
59
- emit("change", value);
60
- }
61
- };
62
- const clearData = () => {
63
- files.value = [];
64
- };
65
- const isDone = () => {
66
- return !files.value.some((d) => d.status !== "done");
67
- };
68
- const getDataValue = (filesValue) => {
69
- const result = [];
70
- filesValue.forEach((item) => {
71
- const fileUrl = getItemFileUrl(item);
72
- if (item.status === "done" && fileUrl != null) {
73
- result.push({ url: fileUrl, name: item.name });
74
- }
75
- });
76
- return result;
77
- };
78
- const getFilesValue = (dataValue, filesValue) => {
79
- if (!dataValue) {
80
- return filesValue.filter((item) => item.status !== "done");
81
- }
82
- const result = [];
83
- if (props.limit === 1) {
84
- try {
85
- const temp2 = JSON.parse(dataValue);
86
- if (temp2) {
87
- const url = temp2.url ?? "";
88
- result.push({
89
- key: temp2.key ?? `0-${url}`,
90
- id: temp2.id ?? ``,
91
- name: temp2.name ?? "",
92
- url: isImage(url) ? url : void 0,
93
- fileUrl: url,
94
- status: "done"
95
- });
96
- return result;
97
- }
98
- } catch (e) {
99
- console.error(e);
100
- }
101
- const temp = filesValue.find((item) => item.status !== "done");
102
- if (temp != null) {
103
- result.push(temp);
104
- }
105
- return result;
106
- }
107
- try {
108
- const temps = JSON.parse(dataValue);
109
- filesValue.forEach((item) => {
110
- const fileUrl = getItemFileUrl(item);
111
- if (fileUrl && temps.some((temp) => temp.url === fileUrl) || item.status !== "done") {
112
- result.push(item);
113
- }
114
- });
115
- temps.forEach((temp, index) => {
116
- const url = (temp == null ? void 0 : temp.url) ?? "";
117
- if (url && !result.some((item) => getItemFileUrl(item) === url)) {
118
- const key = `${index}-${url}`;
119
- const oldIndex = result.findIndex((item) => item.key === key);
120
- if (oldIndex !== -1) {
121
- result.splice(oldIndex, 1);
122
- }
123
- result.push({
124
- key,
125
- id: temp.id ?? "",
126
- name: temp.name ?? "",
127
- url: isImage(url) ? url : void 0,
128
- fileUrl: url,
129
- status: "done"
130
- });
131
- }
132
- });
133
- if (props.limit != null && result.length > props.limit) {
134
- const temp = result.filter((item) => item.status !== "done");
135
- for (const t of temp) {
136
- const i = result.indexOf(t);
137
- result.splice(i, 1);
138
- if (result.length <= props.limit) {
139
- break;
140
- }
141
- }
142
- }
143
- } catch (e) {
144
- console.error(e);
145
- filesValue.forEach((item) => {
146
- if (item.status !== "done") {
147
- result.push(item);
148
- }
149
- });
150
- }
151
- return result;
152
- };
153
- const filesIsChanged = (newFiles, oldFiles) => {
154
- if (newFiles.length !== oldFiles.length) {
155
- return true;
156
- }
157
- for (let i = 0; i < newFiles.length; i++) {
158
- const newItem = newFiles[i];
159
- const oldItem = oldFiles[i];
160
- if (newItem.key !== oldItem.key || newItem.name !== oldItem.name || getItemFileUrl(newItem) !== getItemFileUrl(oldItem) || newItem.status !== oldItem.status) {
161
- return true;
162
- }
163
- }
164
- return false;
165
- };
166
- vue.watch(
167
- files,
168
- (filesValue) => {
169
- const dataValue = getDataValue(filesValue);
170
- if (props.limit === 1) {
171
- updateModelValue(dataValue.length ? JSON.stringify(dataValue[0]) : "");
172
- return;
173
- }
174
- updateModelValue(dataValue.length ? JSON.stringify(dataValue) : "");
175
- },
176
- { deep: true }
177
- );
178
- vue.watch(
179
- () => props.modelValue,
180
- (dataValue) => {
181
- const filesValue = getFilesValue(dataValue, files.value);
182
- if (filesIsChanged(filesValue, files.value)) {
183
- files.value = filesValue;
184
- }
185
- },
186
- { immediate: true }
187
- );
188
- __expose({ clearData, isDone });
189
- return (_ctx, _cache) => {
190
- return vue.openBlock(), vue.createBlock(CommonUpload, {
191
- modelValue: files.value,
192
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => files.value = $event),
193
- fileLimit: _ctx.fileLimit,
194
- readonly: _ctx.readonly,
195
- disabled: _ctx.disabled,
196
- preview: _ctx.preview,
197
- limit: _ctx.limit,
198
- multiple: _ctx.multiple,
199
- drag: _ctx.drag,
200
- accept: _ctx.accept,
201
- itemStyle: _ctx.itemStyle,
202
- buttonStyle: _ctx.buttonStyle,
203
- sortable: _ctx.sortable,
204
- imageProps: _ctx.imageProps,
205
- progressProps: _ctx.progressProps,
206
- previewProps: _ctx.previewProps,
207
- tools: _ctx.tools,
208
- listType: _ctx.listType,
209
- beforeUploadClick: _ctx.beforeUploadClick,
210
- beforeItemEdit: _ctx.beforeItemEdit,
211
- locale: _ctx.locale,
212
- onItemClick: handleItemClick,
213
- onPreview: handleItemPreview
214
- }, null, 8, ["modelValue", "fileLimit", "readonly", "disabled", "preview", "limit", "multiple", "drag", "accept", "itemStyle", "buttonStyle", "sortable", "imageProps", "progressProps", "previewProps", "tools", "listType", "beforeUploadClick", "beforeItemEdit", "locale"]);
215
- };
216
- }
217
- });
218
- module.exports = _sfc_main;
@@ -1,143 +0,0 @@
1
- import { CSSProperties } from 'vue';
2
- import { ElProgressProps, ElImageProps } from '../../ele-app/el';
3
- import { EleImageViewerProps } from '../../ele-app/plus';
4
- import { ListType, BeforeUploadClick, BeforeItemEdit, UploadLocale } from '../../ele-upload-list/types';
5
-
6
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
7
- /** 绑定值 */
8
- modelValue?: string;
9
- /** 文件大小限制, 单位MB */
10
- fileLimit?: number;
11
- /** 是否只读 */
12
- readonly?: boolean;
13
- /** 是否禁用 */
14
- disabled?: boolean;
15
- /** 是否支持点击预览 */
16
- preview?: boolean;
17
- /** 最大上传数量 */
18
- limit?: number;
19
- /** 是否支持多选文件 */
20
- multiple?: boolean;
21
- /** 是否启用拖拽上传 */
22
- drag?: boolean;
23
- /** 接受上传的文件类型 */
24
- accept?: string;
25
- /** 自定义样式 */
26
- itemStyle?: CSSProperties;
27
- /** 自定义上传按钮样式 */
28
- buttonStyle?: CSSProperties;
29
- /** 是否开启拖拽排序 */
30
- sortable?: boolean | Record<keyof any, any>;
31
- /** 自定义图片属性 */
32
- imageProps?: ElImageProps;
33
- /** 自定义进度条属性 */
34
- progressProps?: ElProgressProps;
35
- /** 自定义图片预览属性 */
36
- previewProps?: EleImageViewerProps;
37
- /** 是否开启底部预览和修改的操作按钮 */
38
- tools?: boolean;
39
- /** 列表显示样式 */
40
- listType?: ListType;
41
- /** 上传按钮点击前的钩子 */
42
- beforeUploadClick?: BeforeUploadClick;
43
- /** 修改按钮点击前的钩子 */
44
- beforeItemEdit?: BeforeItemEdit;
45
- /** 国际化 */
46
- locale?: Partial<UploadLocale>;
47
- }>, {
48
- fileLimit: number;
49
- preview: boolean;
50
- drag: boolean;
51
- accept: string;
52
- sortable: () => {
53
- forceFallback: boolean;
54
- };
55
- tools: boolean;
56
- listType: string;
57
- }>>, {
58
- clearData: () => void;
59
- isDone: () => boolean;
60
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
61
- "update:modelValue": (value?: string | undefined) => void;
62
- change: (value?: string | undefined) => void;
63
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
64
- /** 绑定值 */
65
- modelValue?: string;
66
- /** 文件大小限制, 单位MB */
67
- fileLimit?: number;
68
- /** 是否只读 */
69
- readonly?: boolean;
70
- /** 是否禁用 */
71
- disabled?: boolean;
72
- /** 是否支持点击预览 */
73
- preview?: boolean;
74
- /** 最大上传数量 */
75
- limit?: number;
76
- /** 是否支持多选文件 */
77
- multiple?: boolean;
78
- /** 是否启用拖拽上传 */
79
- drag?: boolean;
80
- /** 接受上传的文件类型 */
81
- accept?: string;
82
- /** 自定义样式 */
83
- itemStyle?: CSSProperties;
84
- /** 自定义上传按钮样式 */
85
- buttonStyle?: CSSProperties;
86
- /** 是否开启拖拽排序 */
87
- sortable?: boolean | Record<keyof any, any>;
88
- /** 自定义图片属性 */
89
- imageProps?: ElImageProps;
90
- /** 自定义进度条属性 */
91
- progressProps?: ElProgressProps;
92
- /** 自定义图片预览属性 */
93
- previewProps?: EleImageViewerProps;
94
- /** 是否开启底部预览和修改的操作按钮 */
95
- tools?: boolean;
96
- /** 列表显示样式 */
97
- listType?: ListType;
98
- /** 上传按钮点击前的钩子 */
99
- beforeUploadClick?: BeforeUploadClick;
100
- /** 修改按钮点击前的钩子 */
101
- beforeItemEdit?: BeforeItemEdit;
102
- /** 国际化 */
103
- locale?: Partial<UploadLocale>;
104
- }>, {
105
- fileLimit: number;
106
- preview: boolean;
107
- drag: boolean;
108
- accept: string;
109
- sortable: () => {
110
- forceFallback: boolean;
111
- };
112
- tools: boolean;
113
- listType: string;
114
- }>>> & Readonly<{
115
- onChange?: ((value?: string | undefined) => any) | undefined;
116
- "onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
117
- }>, {
118
- sortable: boolean | Record<keyof any, any>;
119
- drag: boolean;
120
- preview: boolean;
121
- accept: string;
122
- tools: boolean;
123
- listType: ListType;
124
- fileLimit: number;
125
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
126
- export default _default;
127
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
128
- type __VLS_TypePropsToRuntimeProps<T> = {
129
- [K in keyof T]-?: {} extends Pick<T, K> ? {
130
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
131
- } : {
132
- type: import('vue').PropType<T[K]>;
133
- required: true;
134
- };
135
- };
136
- type __VLS_WithDefaults<P, D> = {
137
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
138
- default: D[K];
139
- }> : P[K];
140
- };
141
- type __VLS_Prettify<T> = {
142
- [K in keyof T]: T[K];
143
- } & {};
@@ -1,54 +0,0 @@
1
- "use strict";
2
- const vue = require("vue");
3
- require("../utils/message");
4
- const FileUpload = require("./FileUpload/index");
5
- const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
6
- const uuidUtils = require("yuang-framework-ui-common/lib/utils/uuidUtils");
7
- const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
8
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
9
- ...{ name: "YuFrameworkAttachmentFileUpload" },
10
- __name: "index",
11
- props: /* @__PURE__ */ vue.mergeModels({
12
- modelValue: {},
13
- param: {}
14
- }, {
15
- "modelValue": {},
16
- "modelModifiers": {}
17
- }),
18
- emits: ["update:modelValue"],
19
- setup(__props) {
20
- const files = vue.ref("");
21
- vue.ref(false);
22
- const model = vue.useModel(__props, "modelValue");
23
- debugger;
24
- model.value = model.value ?? uuidUtils.getShortUuid();
25
- vue.onMounted(() => {
26
- httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { code: model.value, pageSize: 100 }).then((res) => {
27
- let attachemtList = res.data.data.records;
28
- let fileList = [];
29
- for (let i = 0; i < attachemtList.length; i++) {
30
- fileList.push({
31
- key: attachemtList[i].id,
32
- id: attachemtList[i].id,
33
- // 需要传递name,否则表单上显示url
34
- name: attachemtList[i].name,
35
- url: attachemtList[i].fullUrl,
36
- status: "done"
37
- });
38
- }
39
- files.value = JSON.stringify(fileList);
40
- });
41
- });
42
- return (_ctx, _cache) => {
43
- return vue.openBlock(), vue.createElementBlock("div", null, [
44
- vue.createVNode(FileUpload, {
45
- ref: "filesUploadRef",
46
- limit: 8,
47
- modelValue: files.value,
48
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => files.value = $event)
49
- }, null, 8, ["modelValue"])
50
- ]);
51
- };
52
- }
53
- });
54
- module.exports = _sfc_main;
@@ -1,16 +0,0 @@
1
- import { ComponentParam } from '@/model/component/param';
2
-
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
- modelValue: import('vue').PropType<any>;
5
- param: {
6
- type: import('vue').PropType<ComponentParam>;
7
- required: true;
8
- };
9
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
- modelValue: import('vue').PropType<any>;
11
- param: {
12
- type: import('vue').PropType<ComponentParam>;
13
- required: true;
14
- };
15
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
- export default _default;