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
@@ -0,0 +1,167 @@
1
+ import { defineComponent, ref, resolveComponent, createBlock, openBlock, withModifiers, withKeys, withCtx, createVNode, unref, createTextVNode } from "vue";
2
+ import { Search, RefreshRight } from "@element-plus/icons-vue";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "user-query",
5
+ emits: ["query"],
6
+ setup(__props, { expose: __expose, emit: __emit }) {
7
+ const emit = __emit;
8
+ const getInitQueryForm = () => {
9
+ return {
10
+ account: "",
11
+ name: "",
12
+ isRecursiveOrganization: false
13
+ };
14
+ };
15
+ const queryForm = ref(getInitQueryForm());
16
+ const queryPage = () => {
17
+ emit("query");
18
+ };
19
+ const reset = () => {
20
+ queryForm.value = getInitQueryForm();
21
+ queryPage();
22
+ };
23
+ __expose({ queryForm });
24
+ return (_ctx, _cache) => {
25
+ const _component_el_input = resolveComponent("el-input");
26
+ const _component_el_form_item = resolveComponent("el-form-item");
27
+ const _component_el_col = resolveComponent("el-col");
28
+ const _component_el_radio = resolveComponent("el-radio");
29
+ const _component_el_radio_group = resolveComponent("el-radio-group");
30
+ const _component_el_button = resolveComponent("el-button");
31
+ const _component_el_row = resolveComponent("el-row");
32
+ const _component_el_form = resolveComponent("el-form");
33
+ return openBlock(), createBlock(_component_el_form, {
34
+ "label-width": "72px",
35
+ onKeyup: withKeys(withModifiers(queryPage, ["prevent"]), ["enter"]),
36
+ onSubmit: _cache[3] || (_cache[3] = withModifiers(() => {
37
+ }, ["prevent"]))
38
+ }, {
39
+ default: withCtx(() => [
40
+ createVNode(_component_el_row, { gutter: 8 }, {
41
+ default: withCtx(() => [
42
+ createVNode(_component_el_col, {
43
+ lg: 6,
44
+ md: 8,
45
+ sm: 12,
46
+ xs: 24
47
+ }, {
48
+ default: withCtx(() => [
49
+ createVNode(_component_el_form_item, { label: "用户账号" }, {
50
+ default: withCtx(() => [
51
+ createVNode(_component_el_input, {
52
+ clearable: "",
53
+ modelValue: queryForm.value.account,
54
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => queryForm.value.account = $event),
55
+ modelModifiers: { trim: true },
56
+ placeholder: "请输入用户账号"
57
+ }, null, 8, ["modelValue"])
58
+ ]),
59
+ _: 1
60
+ })
61
+ ]),
62
+ _: 1
63
+ }),
64
+ createVNode(_component_el_col, {
65
+ lg: 6,
66
+ md: 8,
67
+ sm: 12,
68
+ xs: 24
69
+ }, {
70
+ default: withCtx(() => [
71
+ createVNode(_component_el_form_item, { label: "用户名称" }, {
72
+ default: withCtx(() => [
73
+ createVNode(_component_el_input, {
74
+ clearable: "",
75
+ modelValue: queryForm.value.name,
76
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => queryForm.value.name = $event),
77
+ modelModifiers: { trim: true },
78
+ placeholder: "请输入用户名称"
79
+ }, null, 8, ["modelValue"])
80
+ ]),
81
+ _: 1
82
+ })
83
+ ]),
84
+ _: 1
85
+ }),
86
+ createVNode(_component_el_col, {
87
+ lg: 6,
88
+ md: 8,
89
+ sm: 12,
90
+ xs: 24
91
+ }, {
92
+ default: withCtx(() => [
93
+ createVNode(_component_el_form_item, { label: "递归机构" }, {
94
+ default: withCtx(() => [
95
+ createVNode(_component_el_radio_group, {
96
+ modelValue: queryForm.value.isRecursiveOrganization,
97
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => queryForm.value.isRecursiveOrganization = $event),
98
+ class: "yu-radio-group"
99
+ }, {
100
+ default: withCtx(() => [
101
+ createVNode(_component_el_radio, {
102
+ value: true,
103
+ label: "是"
104
+ }),
105
+ createVNode(_component_el_radio, {
106
+ value: false,
107
+ label: "否"
108
+ })
109
+ ]),
110
+ _: 1
111
+ }, 8, ["modelValue"])
112
+ ]),
113
+ _: 1
114
+ })
115
+ ]),
116
+ _: 1
117
+ }),
118
+ createVNode(_component_el_col, {
119
+ lg: 6,
120
+ md: 8,
121
+ sm: 24,
122
+ xs: 24
123
+ }, {
124
+ default: withCtx(() => [
125
+ createVNode(_component_el_form_item, { "label-width": "16px" }, {
126
+ default: withCtx(() => [
127
+ createVNode(_component_el_button, {
128
+ type: "primary",
129
+ icon: unref(Search),
130
+ class: "ele-btn-icon",
131
+ onClick: queryPage
132
+ }, {
133
+ default: withCtx(() => _cache[4] || (_cache[4] = [
134
+ createTextVNode("查询")
135
+ ])),
136
+ _: 1,
137
+ __: [4]
138
+ }, 8, ["icon"]),
139
+ createVNode(_component_el_button, {
140
+ icon: unref(RefreshRight),
141
+ class: "ele-btn-icon",
142
+ onClick: reset
143
+ }, {
144
+ default: withCtx(() => _cache[5] || (_cache[5] = [
145
+ createTextVNode("重置")
146
+ ])),
147
+ _: 1,
148
+ __: [5]
149
+ }, 8, ["icon"])
150
+ ]),
151
+ _: 1
152
+ })
153
+ ]),
154
+ _: 1
155
+ })
156
+ ]),
157
+ _: 1
158
+ })
159
+ ]),
160
+ _: 1
161
+ }, 8, ["onKeyup"]);
162
+ };
163
+ }
164
+ });
165
+ export {
166
+ _sfc_main as default
167
+ };
@@ -0,0 +1,23 @@
1
+ import { UimsUser } from 'yuang-framework-ui-common/lib/interface/uims/uimsUser';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ param: any;
5
+ }>>, {
6
+ showDialog: () => void;
7
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ change: (uimsUserList: UimsUser[]) => void;
9
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
+ param: any;
11
+ }>>> & Readonly<{
12
+ onChange?: ((uimsUserList: UimsUser[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent, ref, resolveComponent, createElementBlock, openBlock, Fragment, withDirectives, createBlock, createCommentVNode, createVNode, vShow } from "vue";
2
+ import UserDialog from "./components/user-dialog";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{ name: "YuUimsUserDialog" },
5
+ __name: "index",
6
+ props: {
7
+ param: {}
8
+ },
9
+ emits: ["change"],
10
+ setup(__props, { expose: __expose, emit: __emit }) {
11
+ const props = __props;
12
+ const emit = __emit;
13
+ const isShowDialog = ref(false);
14
+ const showDialog = () => {
15
+ isShowDialog.value = true;
16
+ };
17
+ const handleChange = (selections) => {
18
+ emit("change", selections);
19
+ };
20
+ __expose({
21
+ showDialog
22
+ });
23
+ return (_ctx, _cache) => {
24
+ const _component_el_input = resolveComponent("el-input");
25
+ return openBlock(), createElementBlock(Fragment, null, [
26
+ withDirectives(createVNode(_component_el_input, { onClick: showDialog }, null, 512), [
27
+ [vShow, false]
28
+ ]),
29
+ isShowDialog.value ? (openBlock(), createBlock(UserDialog, {
30
+ key: 0,
31
+ modelValue: isShowDialog.value,
32
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isShowDialog.value = $event),
33
+ param: props.param,
34
+ onChange: handleChange
35
+ }, null, 8, ["modelValue", "param"])) : createCommentVNode("", true)
36
+ ], 64);
37
+ };
38
+ }
39
+ });
40
+ export {
41
+ _sfc_main as default
42
+ };
@@ -55,8 +55,10 @@ const index$P = require("./ele-watermark/index");
55
55
  const index$Q = require("./ele-test/index");
56
56
  const index$R = require("./yu-test/index");
57
57
  const index$S = require("./yu-framework-slider-captcha-dialog/index");
58
- const index$T = require("./yu-framework-attachment-file-upload/index");
59
- const index$U = require("./yu-framework-attachment-image-upload/index");
58
+ const index$T = require("./yu-framework-attachment-upload/index");
59
+ const index$U = require("./yu-uims-user-dialog/index");
60
+ const index$V = require("./yu-uims-organization-dialog/index");
61
+ const index$W = require("./yu-uims-role-dialog/index");
60
62
  exports.EleAdminLayout = index;
61
63
  exports.EleAlert = index$1;
62
64
  exports.EleApp = index$2;
@@ -112,5 +114,7 @@ exports.EleWatermark = index$P;
112
114
  exports.EleTest = index$Q;
113
115
  exports.YuTest = index$R;
114
116
  exports.YuFrameworkSliderCaptchaDialog = index$S;
115
- exports.YuFrameworkAttachmentFileUpload = index$T;
116
- exports.YuFrameworkAttachmentImageUpload = index$U;
117
+ exports.YuFrameworkAttachmentUpload = index$T;
118
+ exports.YuUimsUserDialog = index$U;
119
+ exports.YuUimsOrganizationDialog = index$V;
120
+ exports.YuUimsRoleDialog = index$W;
@@ -53,5 +53,7 @@ export { default as EleWatermark } from './ele-watermark/index';
53
53
  export { default as EleTest } from './ele-test/index';
54
54
  export { default as YuTest } from './yu-test/index';
55
55
  export { default as YuFrameworkSliderCaptchaDialog } from './yu-framework-slider-captcha-dialog/index';
56
- export { default as YuFrameworkAttachmentFileUpload } from './yu-framework-attachment-file-upload/index';
57
- export { default as YuFrameworkAttachmentImageUpload } from './yu-framework-attachment-image-upload/index';
56
+ export { default as YuFrameworkAttachmentUpload } from './yu-framework-attachment-upload/index';
57
+ export { default as YuUimsUserDialog } from './yu-uims-user-dialog/index';
58
+ export { default as YuUimsOrganizationDialog } from './yu-uims-organization-dialog/index';
59
+ export { default as YuUimsRoleDialog } from './yu-uims-role-dialog/index';
@@ -813,6 +813,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
813
813
  preventContextmenu: BooleanConstructor;
814
814
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
815
815
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
816
+ id: StringConstructor;
816
817
  type: {
817
818
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
818
819
  readonly required: false;
@@ -875,7 +876,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
875
876
  } & {
876
877
  readonly default: () => {};
877
878
  };
878
- id: StringConstructor;
879
879
  splitButton: BooleanConstructor;
880
880
  hideOnClick: {
881
881
  readonly type: PropType<boolean>;
@@ -1049,6 +1049,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1049
1049
  preventContextmenu: BooleanConstructor;
1050
1050
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
1051
1051
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
1052
+ id: StringConstructor;
1052
1053
  type: {
1053
1054
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
1054
1055
  readonly required: false;
@@ -1111,7 +1112,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1111
1112
  } & {
1112
1113
  readonly default: () => {};
1113
1114
  };
1114
- id: StringConstructor;
1115
1115
  splitButton: BooleanConstructor;
1116
1116
  hideOnClick: {
1117
1117
  readonly type: PropType<boolean>;
@@ -2747,6 +2747,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2747
2747
  preventContextmenu: BooleanConstructor;
2748
2748
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
2749
2749
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
2750
+ id: StringConstructor;
2750
2751
  type: {
2751
2752
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
2752
2753
  readonly required: false;
@@ -2809,7 +2810,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2809
2810
  } & {
2810
2811
  readonly default: () => {};
2811
2812
  };
2812
- id: StringConstructor;
2813
2813
  splitButton: BooleanConstructor;
2814
2814
  hideOnClick: {
2815
2815
  readonly type: PropType<boolean>;
@@ -2990,6 +2990,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2990
2990
  preventContextmenu: BooleanConstructor;
2991
2991
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
2992
2992
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
2993
+ id: StringConstructor;
2993
2994
  type: {
2994
2995
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
2995
2996
  readonly required: false;
@@ -3052,7 +3053,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
3052
3053
  } & {
3053
3054
  readonly default: () => {};
3054
3055
  };
3055
- id: StringConstructor;
3056
3056
  splitButton: BooleanConstructor;
3057
3057
  hideOnClick: {
3058
3058
  readonly type: PropType<boolean>;
@@ -17,6 +17,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
17
17
  preventContextmenu: BooleanConstructor;
18
18
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
19
19
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
20
+ id: StringConstructor;
20
21
  type: {
21
22
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
22
23
  readonly required: false;
@@ -79,7 +80,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
79
80
  } & {
80
81
  readonly default: () => {};
81
82
  };
82
- id: StringConstructor;
83
83
  splitButton: BooleanConstructor;
84
84
  hideOnClick: {
85
85
  readonly type: PropType<boolean>;
@@ -261,6 +261,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
261
261
  preventContextmenu: BooleanConstructor;
262
262
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
263
263
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
264
+ id: StringConstructor;
264
265
  type: {
265
266
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
266
267
  readonly required: false;
@@ -323,7 +324,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
323
324
  } & {
324
325
  readonly default: () => {};
325
326
  };
326
- id: StringConstructor;
327
327
  splitButton: BooleanConstructor;
328
328
  hideOnClick: {
329
329
  readonly type: PropType<boolean>;
@@ -5845,6 +5845,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
5845
5845
  preventContextmenu: BooleanConstructor;
5846
5846
  splitButtonProps: import('vue').PropType<import('../ele-app/el').ElButtonProps>;
5847
5847
  caretButtonProps: import('vue').PropType<import('../ele-app/el').ElButtonProps>;
5848
+ id: StringConstructor;
5848
5849
  type: {
5849
5850
  readonly type: import('vue').PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
5850
5851
  readonly required: false;
@@ -5907,7 +5908,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
5907
5908
  } & {
5908
5909
  readonly default: () => {};
5909
5910
  };
5910
- id: StringConstructor;
5911
5911
  splitButton: BooleanConstructor;
5912
5912
  hideOnClick: {
5913
5913
  readonly type: import('vue').PropType<boolean>;
@@ -6081,6 +6081,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
6081
6081
  preventContextmenu: BooleanConstructor;
6082
6082
  splitButtonProps: import('vue').PropType<import('../ele-app/el').ElButtonProps>;
6083
6083
  caretButtonProps: import('vue').PropType<import('../ele-app/el').ElButtonProps>;
6084
+ id: StringConstructor;
6084
6085
  type: {
6085
6086
  readonly type: import('vue').PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
6086
6087
  readonly required: false;
@@ -6143,7 +6144,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
6143
6144
  } & {
6144
6145
  readonly default: () => {};
6145
6146
  };
6146
- id: StringConstructor;
6147
6147
  splitButton: BooleanConstructor;
6148
6148
  hideOnClick: {
6149
6149
  readonly type: import('vue').PropType<boolean>;
@@ -7779,6 +7779,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
7779
7779
  preventContextmenu: BooleanConstructor;
7780
7780
  splitButtonProps: import('vue').PropType<import('../ele-app/el').ElButtonProps>;
7781
7781
  caretButtonProps: import('vue').PropType<import('../ele-app/el').ElButtonProps>;
7782
+ id: StringConstructor;
7782
7783
  type: {
7783
7784
  readonly type: import('vue').PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
7784
7785
  readonly required: false;
@@ -7841,7 +7842,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
7841
7842
  } & {
7842
7843
  readonly default: () => {};
7843
7844
  };
7844
- id: StringConstructor;
7845
7845
  splitButton: BooleanConstructor;
7846
7846
  hideOnClick: {
7847
7847
  readonly type: import('vue').PropType<boolean>;
@@ -8022,6 +8022,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
8022
8022
  preventContextmenu: BooleanConstructor;
8023
8023
  splitButtonProps: import('vue').PropType<import('../ele-app/el').ElButtonProps>;
8024
8024
  caretButtonProps: import('vue').PropType<import('../ele-app/el').ElButtonProps>;
8025
+ id: StringConstructor;
8025
8026
  type: {
8026
8027
  readonly type: import('vue').PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
8027
8028
  readonly required: false;
@@ -8084,7 +8085,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
8084
8085
  } & {
8085
8086
  readonly default: () => {};
8086
8087
  };
8087
- id: StringConstructor;
8088
8088
  splitButton: BooleanConstructor;
8089
8089
  hideOnClick: {
8090
8090
  readonly type: import('vue').PropType<boolean>;
@@ -102,6 +102,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
102
102
  preventContextmenu: BooleanConstructor;
103
103
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
104
104
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
105
+ id: StringConstructor;
105
106
  type: {
106
107
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
107
108
  readonly required: false;
@@ -164,7 +165,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
164
165
  } & {
165
166
  readonly default: () => {};
166
167
  };
167
- id: StringConstructor;
168
168
  splitButton: BooleanConstructor;
169
169
  hideOnClick: {
170
170
  readonly type: PropType<boolean>;
@@ -338,6 +338,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
338
338
  preventContextmenu: BooleanConstructor;
339
339
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
340
340
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
341
+ id: StringConstructor;
341
342
  type: {
342
343
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
343
344
  readonly required: false;
@@ -400,7 +401,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
400
401
  } & {
401
402
  readonly default: () => {};
402
403
  };
403
- id: StringConstructor;
404
404
  splitButton: BooleanConstructor;
405
405
  hideOnClick: {
406
406
  readonly type: PropType<boolean>;
@@ -2036,6 +2036,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2036
2036
  preventContextmenu: BooleanConstructor;
2037
2037
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
2038
2038
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
2039
+ id: StringConstructor;
2039
2040
  type: {
2040
2041
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
2041
2042
  readonly required: false;
@@ -2098,7 +2099,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2098
2099
  } & {
2099
2100
  readonly default: () => {};
2100
2101
  };
2101
- id: StringConstructor;
2102
2102
  splitButton: BooleanConstructor;
2103
2103
  hideOnClick: {
2104
2104
  readonly type: PropType<boolean>;
@@ -2279,6 +2279,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2279
2279
  preventContextmenu: BooleanConstructor;
2280
2280
  splitButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
2281
2281
  caretButtonProps: PropType<import('../../ele-app/el').ElButtonProps>;
2282
+ id: StringConstructor;
2282
2283
  type: {
2283
2284
  readonly type: PropType<"" | "default" | "text" | "success" | "primary" | "warning" | "info" | "danger">;
2284
2285
  readonly required: false;
@@ -2341,7 +2342,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2341
2342
  } & {
2342
2343
  readonly default: () => {};
2343
2344
  };
2344
- id: StringConstructor;
2345
2345
  splitButton: BooleanConstructor;
2346
2346
  hideOnClick: {
2347
2347
  readonly type: PropType<boolean>;
@@ -82,6 +82,12 @@ const _sfc_main = vue.defineComponent({
82
82
  const handleRetry = () => {
83
83
  emit("retry", props.item);
84
84
  };
85
+ const isImage = (url) => {
86
+ var _a, _b;
87
+ const parts = url ? url.split(".") : [];
88
+ 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);
89
+ return suffix && ["png", "jpg", "jpeg", "gif", "svg"].includes(suffix);
90
+ };
85
91
  return {
86
92
  imageUrl,
87
93
  uploadProgress,
@@ -89,7 +95,8 @@ const _sfc_main = vue.defineComponent({
89
95
  handleRemove,
90
96
  handleEdit,
91
97
  handlePreview,
92
- handleRetry
98
+ handleRetry,
99
+ isImage
93
100
  };
94
101
  }
95
102
  });
@@ -183,7 +190,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
183
190
  ], 8, _hoisted_6)) : vue.createCommentVNode("", true)
184
191
  ])
185
192
  ])) : _ctx.tools && !_ctx.readonly && !_ctx.disabled && !_ctx.item.readonly ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
186
- vue.createElementVNode("div", {
193
+ _ctx.isImage(_ctx.item.url) ? (vue.openBlock(), vue.createElementBlock("div", {
194
+ key: 0,
187
195
  title: _ctx.locale.preview,
188
196
  class: "ele-upload-tool",
189
197
  onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.handlePreview && _ctx.handlePreview(...args), ["stop"]))
@@ -195,7 +203,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
195
203
  _: 1
196
204
  }),
197
205
  vue.createElementVNode("div", _hoisted_10, vue.toDisplayString(_ctx.locale.preview), 1)
198
- ], 8, _hoisted_9),
206
+ ], 8, _hoisted_9)) : vue.createCommentVNode("", true),
199
207
  vue.createElementVNode("div", {
200
208
  title: _ctx.locale.edit,
201
209
  class: "ele-upload-tool",
@@ -37,6 +37,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
37
37
  handleEdit: () => void;
38
38
  handlePreview: () => void;
39
39
  handleRetry: () => void;
40
+ isImage: (url?: string) => boolean | "" | undefined;
40
41
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
41
42
  itemClick: (_item: UploadItem) => true;
42
43
  remove: (_item: UploadItem) => true;
@@ -89,7 +89,11 @@ const _sfc_main = vue.defineComponent({
89
89
  };
90
90
  const handleItemClick = (item) => {
91
91
  if (props2.preview) {
92
- previewItem(item);
92
+ if (isImage(item.url)) {
93
+ previewItem(item);
94
+ } else {
95
+ window.open(item.url);
96
+ }
93
97
  }
94
98
  emit("itemClick", item);
95
99
  };
@@ -108,7 +112,9 @@ const _sfc_main = vue.defineComponent({
108
112
  }
109
113
  };
110
114
  const handleItemPreview = (item) => {
111
- previewItem(item);
115
+ if (isImage(item.url)) {
116
+ previewItem(item);
117
+ }
112
118
  emit("preview", item);
113
119
  };
114
120
  const handleItemRetry = (item) => {
@@ -129,6 +135,12 @@ const _sfc_main = vue.defineComponent({
129
135
  e.preventDefault();
130
136
  }
131
137
  };
138
+ const isImage = (url) => {
139
+ var _a, _b;
140
+ const parts = url ? url.split(".") : [];
141
+ 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);
142
+ return suffix && ["png", "jpg", "jpeg", "gif", "svg"].includes(suffix);
143
+ };
132
144
  vue.watch(
133
145
  () => props2.modelValue,
134
146
  () => {
@@ -167,7 +179,8 @@ const _sfc_main = vue.defineComponent({
167
179
  handleItemRetry,
168
180
  handleInputChange,
169
181
  handleUploadClick,
170
- openImagePreview
182
+ openImagePreview,
183
+ isImage
171
184
  };
172
185
  }
173
186
  });
@@ -79,6 +79,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
79
79
  handleInputChange: (e: Event) => void;
80
80
  handleUploadClick: (e: MouseEvent) => void;
81
81
  openImagePreview: (urls: string[], index: number) => void;
82
+ isImage: (url?: string) => boolean | "" | undefined;
82
83
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
83
84
  'update:modelValue': (_value: UploadItem[]) => boolean;
84
85
  itemClick: (_item: UploadItem) => boolean;
@@ -1594,6 +1595,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1594
1595
  handleEdit: () => void;
1595
1596
  handlePreview: () => void;
1596
1597
  handleRetry: () => void;
1598
+ isImage: (url?: string) => boolean | "" | undefined;
1597
1599
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
1598
1600
  itemClick: (_item: UploadItem) => true;
1599
1601
  remove: (_item: UploadItem) => true;
@@ -4,6 +4,8 @@
4
4
  export interface UploadItem extends Record<keyof any, any> {
5
5
  /** 唯一标识 */
6
6
  key: string | number | symbol;
7
+ /** id */
8
+ id: string;
7
9
  /** 显示的图片地址, 为空时显示文件图标 */
8
10
  url?: string;
9
11
  /** 文件名称 */
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const _export_sfc = (sfc, props) => {
4
+ const target = sfc.__vccOpts || sfc;
5
+ for (const [key, val] of props) {
6
+ target[key] = val;
7
+ }
8
+ return target;
9
+ };
10
+ const _sfc_main = {};
11
+ const _hoisted_1 = {
12
+ t: "1735465447092",
13
+ class: "icon",
14
+ viewBox: "0 0 1024 1024",
15
+ version: "1.1",
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ "p-id": "1499",
18
+ width: "200",
19
+ height: "200"
20
+ };
21
+ function _sfc_render(_ctx, _cache) {
22
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
23
+ vue.createElementVNode("path", {
24
+ d: "M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1 0.8-5.7 2.3l-76.1 76.1c-33.7-22.9-72.9-34.3-112.1-34.3-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7c-3.1 3.1-3.1 8.2 0 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-0.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zM578.9 546.7c-3.1-3.1-8.2-3.1-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6c-3.1-3.1-8.2-3.1-11.3 0L363 475.3l-43-43c-1.6-1.6-3.6-2.3-5.7-2.3-2 0-4.1 0.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1c-3.1 3.1-3.1 8.2 0 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-0.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1c-24.9 24.9-58.1 38.7-93.4 38.7-35.3 0-68.4-13.7-93.4-38.7-24.9-24.9-38.7-58.1-38.7-93.4 0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z",
25
+ "p-id": "1500",
26
+ fill: "#606267"
27
+ }, null, -1)
28
+ ]));
29
+ }
30
+ const ApiItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
31
+ module.exports = ApiItem;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;