giime 0.7.10 → 0.7.12

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 (93) hide show
  1. package/dist/index.css +143 -143
  2. package/es/components/index.mjs +2 -0
  3. package/es/components/index.mjs.map +1 -1
  4. package/es/components/src/base/carousel/Carousel.vue.d.ts +1 -0
  5. package/es/components/src/base/carousel/Carousel.vue2.mjs +1 -1
  6. package/es/components/src/base/carousel/Carousel.vue2.mjs.map +1 -1
  7. package/es/components/src/base/carousel/index.d.ts +3 -0
  8. package/es/components/src/composite/fileComponent/FileComponent.vue.d.ts +41 -5
  9. package/es/components/src/composite/fileComponent/FileComponent.vue2.mjs +47 -28
  10. package/es/components/src/composite/fileComponent/FileComponent.vue2.mjs.map +1 -1
  11. package/es/components/src/composite/fileComponent/fileComponent.d.ts +13 -1
  12. package/es/components/src/composite/fileComponent/fileComponent.mjs +12 -0
  13. package/es/components/src/composite/fileComponent/fileComponent.mjs.map +1 -1
  14. package/es/components/src/composite/fileComponent/index.d.ts +190 -31
  15. package/es/components/src/composite/fileList2/FileList.vue.d.ts +158 -0
  16. package/es/components/src/composite/fileList2/FileList.vue.mjs +6 -0
  17. package/es/components/src/composite/fileList2/FileList.vue.mjs.map +1 -0
  18. package/es/components/src/composite/fileList2/FileList.vue2.mjs +93 -0
  19. package/es/components/src/composite/fileList2/FileList.vue2.mjs.map +1 -0
  20. package/es/components/src/composite/fileList2/fileList.d.ts +71 -0
  21. package/es/components/src/composite/fileList2/fileList.mjs +40 -0
  22. package/es/components/src/composite/fileList2/fileList.mjs.map +1 -0
  23. package/es/components/src/composite/fileList2/index.d.ts +334 -0
  24. package/es/components/src/composite/fileList2/index.mjs +10 -0
  25. package/es/components/src/composite/fileList2/index.mjs.map +1 -0
  26. package/es/components/src/composite/index.d.ts +1 -0
  27. package/es/components/src/composite/index.mjs +2 -0
  28. package/es/components/src/composite/index.mjs.map +1 -1
  29. package/es/components/src/composite/previewFile/PreviewFile.vue.d.ts +42 -6
  30. package/es/components/src/composite/previewFile/PreviewFile.vue2.mjs +8 -6
  31. package/es/components/src/composite/previewFile/PreviewFile.vue2.mjs.map +1 -1
  32. package/es/components/src/composite/previewFile/index.d.ts +42 -6
  33. package/es/components/src/composite/previewFile/previewFile.d.ts +19 -2
  34. package/es/components/src/composite/previewFile/previewFile.mjs +6 -1
  35. package/es/components/src/composite/previewFile/previewFile.mjs.map +1 -1
  36. package/es/components/src/composite/uploadFile/UploadFile.vue.d.ts +48 -3
  37. package/es/components/src/composite/uploadFile/index.d.ts +102 -7
  38. package/es/components/src/composite/uploadFile/uploadFile.d.ts +22 -2
  39. package/es/giime/component.mjs +4 -0
  40. package/es/giime/component.mjs.map +1 -1
  41. package/es/giime/index.mjs +2 -0
  42. package/es/giime/index.mjs.map +1 -1
  43. package/es/giime/version.d.ts +1 -1
  44. package/es/giime/version.mjs +1 -1
  45. package/es/giime/version.mjs.map +1 -1
  46. package/es/index.css +143 -143
  47. package/global.d.ts +2 -0
  48. package/lib/components/index.js +18 -14
  49. package/lib/components/index.js.map +1 -1
  50. package/lib/components/src/base/carousel/Carousel.vue.d.ts +1 -0
  51. package/lib/components/src/base/carousel/Carousel.vue2.js +1 -1
  52. package/lib/components/src/base/carousel/Carousel.vue2.js.map +1 -1
  53. package/lib/components/src/base/carousel/index.d.ts +3 -0
  54. package/lib/components/src/composite/fileComponent/FileComponent.vue.d.ts +41 -5
  55. package/lib/components/src/composite/fileComponent/FileComponent.vue2.js +46 -27
  56. package/lib/components/src/composite/fileComponent/FileComponent.vue2.js.map +1 -1
  57. package/lib/components/src/composite/fileComponent/fileComponent.d.ts +13 -1
  58. package/lib/components/src/composite/fileComponent/fileComponent.js +12 -0
  59. package/lib/components/src/composite/fileComponent/fileComponent.js.map +1 -1
  60. package/lib/components/src/composite/fileComponent/index.d.ts +190 -31
  61. package/lib/components/src/composite/fileList2/FileList.vue.d.ts +158 -0
  62. package/lib/components/src/composite/fileList2/FileList.vue.js +10 -0
  63. package/lib/components/src/composite/fileList2/FileList.vue.js.map +1 -0
  64. package/lib/components/src/composite/fileList2/FileList.vue2.js +97 -0
  65. package/lib/components/src/composite/fileList2/FileList.vue2.js.map +1 -0
  66. package/lib/components/src/composite/fileList2/fileList.d.ts +71 -0
  67. package/lib/components/src/composite/fileList2/fileList.js +42 -0
  68. package/lib/components/src/composite/fileList2/fileList.js.map +1 -0
  69. package/lib/components/src/composite/fileList2/index.d.ts +334 -0
  70. package/lib/components/src/composite/fileList2/index.js +16 -0
  71. package/lib/components/src/composite/fileList2/index.js.map +1 -0
  72. package/lib/components/src/composite/index.d.ts +1 -0
  73. package/lib/components/src/composite/index.js +4 -0
  74. package/lib/components/src/composite/index.js.map +1 -1
  75. package/lib/components/src/composite/previewFile/PreviewFile.vue.d.ts +42 -6
  76. package/lib/components/src/composite/previewFile/PreviewFile.vue2.js +7 -5
  77. package/lib/components/src/composite/previewFile/PreviewFile.vue2.js.map +1 -1
  78. package/lib/components/src/composite/previewFile/index.d.ts +42 -6
  79. package/lib/components/src/composite/previewFile/previewFile.d.ts +19 -2
  80. package/lib/components/src/composite/previewFile/previewFile.js +6 -1
  81. package/lib/components/src/composite/previewFile/previewFile.js.map +1 -1
  82. package/lib/components/src/composite/uploadFile/UploadFile.vue.d.ts +48 -3
  83. package/lib/components/src/composite/uploadFile/index.d.ts +102 -7
  84. package/lib/components/src/composite/uploadFile/uploadFile.d.ts +22 -2
  85. package/lib/giime/component.js +32 -28
  86. package/lib/giime/component.js.map +1 -1
  87. package/lib/giime/index.js +80 -76
  88. package/lib/giime/index.js.map +1 -1
  89. package/lib/giime/version.d.ts +1 -1
  90. package/lib/giime/version.js +1 -1
  91. package/lib/giime/version.js.map +1 -1
  92. package/lib/index.css +143 -143
  93. package/package.json +1 -1
package/dist/index.css CHANGED
@@ -873,44 +873,6 @@ video {
873
873
  .gm-group:hover .group-hover\:gm-block {
874
874
  display: block;
875
875
  }
876
- .gm-flex-center[data-v-c17deec9] {
877
- align-items: center;
878
- }
879
-
880
- .gm-flex-justify-between[data-v-c17deec9] {
881
- justify-content: space-between;
882
- }
883
- .circular[data-v-d7b04fae] {
884
- animation: loading-rotate-d7b04fae 2s linear infinite;
885
- }
886
-
887
- .path[data-v-d7b04fae] {
888
- animation: loading-dash-d7b04fae 1.5s ease-in-out infinite;
889
- stroke-dasharray: 90, 150;
890
- stroke-dashoffset: 0;
891
- stroke: var(--el-color-primary);
892
- stroke-linecap: round;
893
- }
894
-
895
- @keyframes loading-rotate-d7b04fae {
896
- to {
897
- transform: rotate(360deg);
898
- }
899
- }
900
- @keyframes loading-dash-d7b04fae {
901
- 0% {
902
- stroke-dasharray: 1, 200;
903
- stroke-dashoffset: 0;
904
- }
905
- 50% {
906
- stroke-dasharray: 90, 150;
907
- stroke-dashoffset: -40px;
908
- }
909
- 100% {
910
- stroke-dasharray: 90, 150;
911
- stroke-dashoffset: -120px;
912
- }
913
- }
914
876
 
915
877
  .gm-range-number .el-form-item[data-v-1ae16d96] {
916
878
  margin: 0;
@@ -962,42 +924,48 @@ video {
962
924
  .gm-upload-pro-file-disabled .el-upload-list__item-status-label {
963
925
  display: none;
964
926
  }
965
- [data-v-488ca110] .gmSearchForm .el-form-item {
966
- margin-right: 0;
967
- margin-bottom: 4px;
968
- }
969
- [data-v-2c351ff8] .gmTableNoBorder .el-table__body .el-table__cell {
970
- border-right: none;
927
+ .circular[data-v-d7b04fae] {
928
+ animation: loading-rotate-d7b04fae 2s linear infinite;
971
929
  }
972
930
 
973
- [data-v-2c351ff8] .gmTableNoBorder .el-table__inner-wrapper:before {
974
- height: 0;
931
+ .path[data-v-d7b04fae] {
932
+ animation: loading-dash-d7b04fae 1.5s ease-in-out infinite;
933
+ stroke-dasharray: 90, 150;
934
+ stroke-dashoffset: 0;
935
+ stroke: var(--el-color-primary);
936
+ stroke-linecap: round;
975
937
  }
976
938
 
977
- [data-v-2c351ff8] .gmTableNoBorder.el-table--border .el-table__inner-wrapper:after {
978
- height: 0;
939
+ @keyframes loading-rotate-d7b04fae {
940
+ to {
941
+ transform: rotate(360deg);
942
+ }
979
943
  }
980
-
981
- [data-v-2c351ff8] .gmTableNoBorder.el-table--border:after {
982
- height: 0;
944
+ @keyframes loading-dash-d7b04fae {
945
+ 0% {
946
+ stroke-dasharray: 1, 200;
947
+ stroke-dashoffset: 0;
948
+ }
949
+ 50% {
950
+ stroke-dasharray: 90, 150;
951
+ stroke-dashoffset: -40px;
952
+ }
953
+ 100% {
954
+ stroke-dasharray: 90, 150;
955
+ stroke-dashoffset: -120px;
956
+ }
983
957
  }
984
-
985
- [data-v-2c351ff8] .gmTableNoBorder.el-table--border:before {
986
- height: 0;
958
+ [data-v-488ca110] .gmSearchForm .el-form-item {
959
+ margin-right: 0;
960
+ margin-bottom: 4px;
987
961
  }
988
-
989
- [data-v-2c351ff8] .gmTableNoBorder .el-table__border-left-patch {
990
- height: 0;
962
+ .gm-flex-center[data-v-c17deec9] {
963
+ align-items: center;
991
964
  }
992
965
 
993
- .pagination-container[data-v-47d35e7b] {
994
- background: #fff;
995
- padding-top: 12px;
996
- }
997
- .pagination-container.hidden[data-v-47d35e7b] {
998
- display: none;
966
+ .gm-flex-justify-between[data-v-c17deec9] {
967
+ justify-content: space-between;
999
968
  }
1000
-
1001
969
  .gm-number-interval-single[data-v-4e6f4d6f] {
1002
970
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
1003
971
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
@@ -1016,61 +984,36 @@ video {
1016
984
  .gm-number-interval-single[data-v-4e6f4d6f]:hover .gm-number-interval-close[data-v-4e6f4d6f] {
1017
985
  display: flex;
1018
986
  }
1019
- @charset "UTF-8";
1020
- .custom-operate-drawer .el-drawer__header {
1021
- padding: 10px 15px;
1022
- margin: 0;
1023
- border-bottom: 1px solid #ebeef5;
1024
- }
1025
- .custom-operate-drawer .el-drawer__title {
1026
- font-size: 14px;
1027
- color: #333;
1028
- }
1029
- .custom-operate-drawer .el-drawer__body {
1030
- padding: 15px;
1031
- }
1032
- .custom-operate-drawer .el-drawer__footer {
1033
- padding: 10px 15px;
1034
- border-top: 1px solid #ebeef5;
1035
- }
1036
- .custom-operate-drawer .el-checkbox {
1037
- display: flex;
1038
- align-items: center;
987
+ .gm-upload-preview-dialog[data-v-312f9322] [data-v-312f9322] .el-dialog__body {
988
+ padding: 0;
1039
989
  }
1040
- .custom-operate-drawer .el-input__inner {
1041
- text-align: center;
990
+
991
+ .gm-upload-file-picture-card[data-v-312f9322] [data-v-312f9322] .el-upload-list__item, .gm-upload-file-picture-card[data-v-312f9322] [data-v-312f9322] .el-upload--picture-card {
992
+ width: auto;
993
+ height: auto;
1042
994
  }
1043
- .custom-operate-drawer .el-input__suffix {
1044
- position: absolute;
1045
- right: 10px;
995
+ [data-v-2c351ff8] .gmTableNoBorder .el-table__body .el-table__cell {
996
+ border-right: none;
1046
997
  }
1047
- .custom-operate-drawer .custom-content li {
1048
- display: flex;
1049
- align-items: center;
1050
- justify-content: center;
1051
- height: 44px;
998
+
999
+ [data-v-2c351ff8] .gmTableNoBorder .el-table__inner-wrapper:before {
1000
+ height: 0;
1052
1001
  }
1053
- .custom-operate-drawer .custom-group {
1054
- max-height: calc(100vh - 226px);
1055
- overflow-y: auto;
1002
+
1003
+ [data-v-2c351ff8] .gmTableNoBorder.el-table--border .el-table__inner-wrapper:after {
1004
+ height: 0;
1056
1005
  }
1057
- .custom-operate-drawer .custom-group::-webkit-scrollbar {
1058
- /*滚动条整体样式*/
1059
- width: 4px;
1060
- /*高宽分别对应横竖滚动条的尺寸*/
1061
- height: 1px;
1006
+
1007
+ [data-v-2c351ff8] .gmTableNoBorder.el-table--border:after {
1008
+ height: 0;
1062
1009
  }
1063
- .custom-operate-drawer .custom-group::-webkit-scrollbar-thumb {
1064
- /*滚动条里面小方块*/
1065
- border-radius: 10px;
1066
- box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
1067
- background: #999;
1010
+
1011
+ [data-v-2c351ff8] .gmTableNoBorder.el-table--border:before {
1012
+ height: 0;
1068
1013
  }
1069
- .custom-operate-drawer .custom-group::-webkit-scrollbar-track {
1070
- /*滚动条里面轨道*/
1071
- box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
1072
- border-radius: 10px;
1073
- background: #eee;
1014
+
1015
+ [data-v-2c351ff8] .gmTableNoBorder .el-table__border-left-patch {
1016
+ height: 0;
1074
1017
  }
1075
1018
  [data-v-98c2e804] .gmTableNoBorder .el-table__body .el-table__cell {
1076
1019
  border-right: none;
@@ -1095,6 +1038,50 @@ video {
1095
1038
  [data-v-98c2e804] .gmTableNoBorder .el-table__border-left-patch {
1096
1039
  height: 0;
1097
1040
  }
1041
+ .gm-upload-file {
1042
+ line-height: normal;
1043
+ }
1044
+ .gm-upload-file .el-checkbox {
1045
+ position: absolute;
1046
+ left: 10px;
1047
+ top: 0;
1048
+ z-index: 9;
1049
+ }
1050
+ .gm-upload-file .el-upload-list--picture-card {
1051
+ gap: 10px;
1052
+ }
1053
+ .gm-upload-file .el-upload-list__item {
1054
+ margin: 0;
1055
+ }
1056
+ .gm-upload-file .el-upload-list__item-file-name {
1057
+ line-height: normal;
1058
+ }
1059
+ .gm-upload-file .el-upload-dragger {
1060
+ padding: 0;
1061
+ border: none;
1062
+ width: 100%;
1063
+ height: 100%;
1064
+ display: flex;
1065
+ }
1066
+ .gm-upload-file .el-upload--picture-card {
1067
+ border: none;
1068
+ }
1069
+
1070
+ .gm-upload-file-disabled .el-upload--picture-card {
1071
+ display: none;
1072
+ }
1073
+ .gm-upload-file-disabled .el-upload-list__item-status-label {
1074
+ display: none;
1075
+ }
1076
+
1077
+ .pagination-container[data-v-47d35e7b] {
1078
+ background: #fff;
1079
+ padding-top: 12px;
1080
+ }
1081
+ .pagination-container.hidden[data-v-47d35e7b] {
1082
+ display: none;
1083
+ }
1084
+
1098
1085
  @charset "UTF-8";
1099
1086
  .table-custom-header-drawer .el-drawer__header {
1100
1087
  padding: 10px 15px;
@@ -1151,46 +1138,59 @@ video {
1151
1138
  border-radius: 10px;
1152
1139
  background: #eee;
1153
1140
  }
1154
- .gm-upload-preview-dialog[data-v-312f9322] [data-v-312f9322] .el-dialog__body {
1155
- padding: 0;
1141
+ @charset "UTF-8";
1142
+ .custom-operate-drawer .el-drawer__header {
1143
+ padding: 10px 15px;
1144
+ margin: 0;
1145
+ border-bottom: 1px solid #ebeef5;
1156
1146
  }
1157
-
1158
- .gm-upload-file-picture-card[data-v-312f9322] [data-v-312f9322] .el-upload-list__item, .gm-upload-file-picture-card[data-v-312f9322] [data-v-312f9322] .el-upload--picture-card {
1159
- width: auto;
1160
- height: auto;
1147
+ .custom-operate-drawer .el-drawer__title {
1148
+ font-size: 14px;
1149
+ color: #333;
1161
1150
  }
1162
- .gm-upload-file {
1163
- line-height: normal;
1151
+ .custom-operate-drawer .el-drawer__body {
1152
+ padding: 15px;
1164
1153
  }
1165
- .gm-upload-file .el-checkbox {
1166
- position: absolute;
1167
- left: 10px;
1168
- top: 0;
1169
- z-index: 9;
1154
+ .custom-operate-drawer .el-drawer__footer {
1155
+ padding: 10px 15px;
1156
+ border-top: 1px solid #ebeef5;
1170
1157
  }
1171
- .gm-upload-file .el-upload-list--picture-card {
1172
- gap: 10px;
1158
+ .custom-operate-drawer .el-checkbox {
1159
+ display: flex;
1160
+ align-items: center;
1173
1161
  }
1174
- .gm-upload-file .el-upload-list__item {
1175
- margin: 0;
1162
+ .custom-operate-drawer .el-input__inner {
1163
+ text-align: center;
1176
1164
  }
1177
- .gm-upload-file .el-upload-list__item-file-name {
1178
- line-height: normal;
1165
+ .custom-operate-drawer .el-input__suffix {
1166
+ position: absolute;
1167
+ right: 10px;
1179
1168
  }
1180
- .gm-upload-file .el-upload-dragger {
1181
- padding: 0;
1182
- border: none;
1183
- width: 100%;
1184
- height: 100%;
1169
+ .custom-operate-drawer .custom-content li {
1185
1170
  display: flex;
1171
+ align-items: center;
1172
+ justify-content: center;
1173
+ height: 44px;
1186
1174
  }
1187
- .gm-upload-file .el-upload--picture-card {
1188
- border: none;
1175
+ .custom-operate-drawer .custom-group {
1176
+ max-height: calc(100vh - 226px);
1177
+ overflow-y: auto;
1189
1178
  }
1190
-
1191
- .gm-upload-file-disabled .el-upload--picture-card {
1192
- display: none;
1179
+ .custom-operate-drawer .custom-group::-webkit-scrollbar {
1180
+ /*滚动条整体样式*/
1181
+ width: 4px;
1182
+ /*高宽分别对应横竖滚动条的尺寸*/
1183
+ height: 1px;
1193
1184
  }
1194
- .gm-upload-file-disabled .el-upload-list__item-status-label {
1195
- display: none;
1185
+ .custom-operate-drawer .custom-group::-webkit-scrollbar-thumb {
1186
+ /*滚动条里面小方块*/
1187
+ border-radius: 10px;
1188
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
1189
+ background: #999;
1190
+ }
1191
+ .custom-operate-drawer .custom-group::-webkit-scrollbar-track {
1192
+ /*滚动条里面轨道*/
1193
+ box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
1194
+ border-radius: 10px;
1195
+ background: #eee;
1196
1196
  }
@@ -277,6 +277,8 @@ export { ruleEditorEmits, ruleEditorProps } from './src/composite/ruleEditor/rul
277
277
  export { GmRuleEditor } from './src/composite/ruleEditor/index.mjs';
278
278
  export { uploadFileProps } from './src/composite/uploadFile/uploadFile.mjs';
279
279
  export { GmUploadFile } from './src/composite/uploadFile/index.mjs';
280
+ export { fileProProps } from './src/composite/fileList2/fileList.mjs';
281
+ export { GmFileList } from './src/composite/fileList2/index.mjs';
280
282
  export { messageTypes, normalizeMessageOptions } from './src/plugins/message/method.mjs';
281
283
  export { GmMessage } from './src/plugins/message/index.mjs';
282
284
  export { GmLoading } from './src/plugins/loading/index.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -14,6 +14,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
14
14
  motionBlur: BooleanConstructor;
15
15
  }, {
16
16
  next: () => void;
17
+ activeIndex: number;
17
18
  setActiveItem: (index: string | number) => void;
18
19
  prev: () => void;
19
20
  elRef: import("vue").Ref<({
@@ -18,7 +18,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  const emit = __emit;
19
19
  const elEvents = getGmEvent(carouselEmits$1, emit);
20
20
  const elRef = ref();
21
- const exposeEvents = ["setActiveItem", "prev", "next"];
21
+ const exposeEvents = ["activeIndex", "setActiveItem", "prev", "next"];
22
22
  const { exposeFns } = getGmExports(elRef, exposeEvents);
23
23
  __expose({
24
24
  elRef,
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.vue2.mjs","sources":["../../../../../../../packages/components/src/base/carousel/Carousel.vue"],"sourcesContent":["<template>\n <el-carousel ref=\"elRef\" v-bind=\"props\" v-on=\"elEvents\">\n <template v-if=\"slots.default\">\n <slot />\n </template>\n </el-carousel>\n</template>\n<script lang=\"ts\" setup>\nimport { ref, useSlots } from 'vue';\nimport { getGmEvent, getGmExports } from '@giime/utils';\nimport { carouselEmits as elCarouselEmits } from 'element-plus';\nimport { carouselEmits, carouselProps } from './carousel';\nimport type { CarouselInstance } from 'element-plus';\n\ndefineOptions({\n name: 'GmCarousel',\n});\nconst slots = useSlots();\nconst props = defineProps(carouselProps);\nconst emit = defineEmits(carouselEmits);\n// 重发el的事件\nconst elEvents = getGmEvent(elCarouselEmits, emit);\n\nconst elRef = ref<CarouselInstance>();\nconst exposeEvents = ['setActiveItem', 'prev', 'next'] as const;\n\nconst { exposeFns } = getGmExports(elRef, exposeEvents);\ndefineExpose({\n elRef,\n ...exposeFns,\n});\n</script>\n"],"names":["elCarouselEmits"],"mappings":";;;;;;;;;;;;;;;AAiBA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,QAAA,GAAW,UAAW,CAAAA,eAAA,EAAiB,IAAI,CAAA,CAAA;AAEjD,IAAA,MAAM,QAAQ,GAAsB,EAAA,CAAA;AACpC,IAAA,MAAM,YAAe,GAAA,CAAC,eAAiB,EAAA,MAAA,EAAQ,MAAM,CAAA,CAAA;AAErD,IAAA,MAAM,EAAE,SAAA,EAAc,GAAA,YAAA,CAAa,OAAO,YAAY,CAAA,CAAA;AACtD,IAAa,QAAA,CAAA;AAAA,MACX,KAAA;AAAA,MACA,GAAG,SAAA;AAAA,KACJ,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Carousel.vue2.mjs","sources":["../../../../../../../packages/components/src/base/carousel/Carousel.vue"],"sourcesContent":["<template>\n <el-carousel ref=\"elRef\" v-bind=\"props\" v-on=\"elEvents\">\n <template v-if=\"slots.default\">\n <slot />\n </template>\n </el-carousel>\n</template>\n<script lang=\"ts\" setup>\nimport { ref, useSlots } from 'vue';\nimport { getGmEvent, getGmExports } from '@giime/utils';\nimport { carouselEmits as elCarouselEmits } from 'element-plus';\nimport { carouselEmits, carouselProps } from './carousel';\nimport type { CarouselInstance } from 'element-plus';\n\ndefineOptions({\n name: 'GmCarousel',\n});\nconst slots = useSlots();\nconst props = defineProps(carouselProps);\nconst emit = defineEmits(carouselEmits);\n// 重发el的事件\nconst elEvents = getGmEvent(elCarouselEmits, emit);\n\nconst elRef = ref<CarouselInstance>();\nconst exposeEvents = ['activeIndex', 'setActiveItem', 'prev', 'next'] as const;\n\nconst { exposeFns } = getGmExports(elRef, exposeEvents);\ndefineExpose({\n elRef,\n ...exposeFns,\n});\n</script>\n"],"names":["elCarouselEmits"],"mappings":";;;;;;;;;;;;;;;AAiBA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,QAAA,GAAW,UAAW,CAAAA,eAAA,EAAiB,IAAI,CAAA,CAAA;AAEjD,IAAA,MAAM,QAAQ,GAAsB,EAAA,CAAA;AACpC,IAAA,MAAM,YAAe,GAAA,CAAC,aAAe,EAAA,eAAA,EAAiB,QAAQ,MAAM,CAAA,CAAA;AAEpE,IAAA,MAAM,EAAE,SAAA,EAAc,GAAA,YAAA,CAAa,OAAO,YAAY,CAAA,CAAA;AACtD,IAAa,QAAA,CAAA;AAAA,MACX,KAAA;AAAA,MACA,GAAG,SAAA;AAAA,KACJ,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -18,6 +18,7 @@ export declare const GmCarousel: import("../../../../utils").SFCWithInstall<{
18
18
  onChange?: ((current: number, prev: number) => any) | undefined;
19
19
  }, {
20
20
  next: () => void;
21
+ activeIndex: number;
21
22
  setActiveItem: (index: string | number) => void;
22
23
  prev: () => void;
23
24
  elRef: import("vue").Ref<({
@@ -222,6 +223,7 @@ export declare const GmCarousel: import("../../../../utils").SFCWithInstall<{
222
223
  onChange?: ((current: number, prev: number) => any) | undefined;
223
224
  }, {
224
225
  next: () => void;
226
+ activeIndex: number;
225
227
  setActiveItem: (index: string | number) => void;
226
228
  prev: () => void;
227
229
  elRef: import("vue").Ref<({
@@ -405,6 +407,7 @@ export declare const GmCarousel: import("../../../../utils").SFCWithInstall<{
405
407
  onChange?: ((current: number, prev: number) => any) | undefined;
406
408
  }, {
407
409
  next: () => void;
410
+ activeIndex: number;
408
411
  setActiveItem: (index: string | number) => void;
409
412
  prev: () => void;
410
413
  elRef: import("vue").Ref<({
@@ -1,5 +1,5 @@
1
1
  import type { UploadFile } from 'element-plus';
2
- declare const _default: import("vue").DefineComponent<{
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
3
  file: {
4
4
  type: import("vue").PropType<Partial<UploadFile>>;
5
5
  default: () => {};
@@ -8,12 +8,24 @@ declare const _default: import("vue").DefineComponent<{
8
8
  type: StringConstructor;
9
9
  default: string;
10
10
  };
11
+ fileWidth: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ fileHeight: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ fileStyle: {
20
+ type: ObjectConstructor;
21
+ default: () => {};
22
+ };
11
23
  size: {
12
24
  type: NumberConstructor;
13
25
  default: number;
14
26
  };
15
27
  field: {
16
- type: import("vue").PropType<keyof UploadFile>;
28
+ type: StringConstructor;
17
29
  default: string;
18
30
  };
19
31
  controls: {
@@ -41,12 +53,24 @@ declare const _default: import("vue").DefineComponent<{
41
53
  type: StringConstructor;
42
54
  default: string;
43
55
  };
56
+ fileWidth: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ fileHeight: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ fileStyle: {
65
+ type: ObjectConstructor;
66
+ default: () => {};
67
+ };
44
68
  size: {
45
69
  type: NumberConstructor;
46
70
  default: number;
47
71
  };
48
72
  field: {
49
- type: import("vue").PropType<keyof UploadFile>;
73
+ type: StringConstructor;
50
74
  default: string;
51
75
  };
52
76
  controls: {
@@ -71,8 +95,20 @@ declare const _default: import("vue").DefineComponent<{
71
95
  file: Partial<UploadFile>;
72
96
  showIcon: boolean;
73
97
  controls: boolean;
74
- field: keyof UploadFile;
98
+ field: string;
99
+ fileWidth: string;
100
+ fileHeight: string;
101
+ fileStyle: Record<string, any>;
75
102
  controlslist: string;
76
103
  oncontextmenu: boolean;
77
- }, {}>;
104
+ }, {}>, {
105
+ default?(_: {
106
+ file: Partial<UploadFile>;
107
+ }): any;
108
+ }>;
78
109
  export default _default;
110
+ type __VLS_WithTemplateSlots<T, S> = T & {
111
+ new (): {
112
+ $slots: S;
113
+ };
114
+ };
@@ -1,8 +1,8 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, createBlock, normalizeStyle } from 'vue';
1
+ import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, createBlock, renderSlot } from 'vue';
2
2
  import { isImageUrl, isVideoUrl, isPDF, isText, isWord, isExcel, isPPT, isZip, isPSD } from '../../../../utils/src/is.mjs';
3
3
  import { fileComponentProps } from './fileComponent.mjs';
4
4
 
5
- const _hoisted_1 = { class: "gm-flex gm-h-full gm-items-center gm-justify-center" };
5
+ const _hoisted_1 = { class: "gm-flex gm-h-full gm-w-full gm-flex-col gm-items-center gm-justify-center" };
6
6
  const _hoisted_2 = ["src"];
7
7
  const _hoisted_3 = ["src", "controls", "controlslist", "oncontextmenu"];
8
8
  const _hoisted_4 = ["src"];
@@ -20,6 +20,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  height: `${props.size}px`
21
21
  };
22
22
  });
23
+ const fileStyle = computed(() => {
24
+ return {
25
+ width: props.fileWidth,
26
+ height: props.fileHeight,
27
+ ...props.fileStyle
28
+ };
29
+ });
23
30
  const fileURL = computed(() => {
24
31
  return props.file[props.url];
25
32
  });
@@ -57,37 +64,49 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
57
64
  return (_ctx, _cache) => {
58
65
  const _component_el_image = resolveComponent("el-image");
59
66
  return openBlock(), createElementBlock("div", _hoisted_1, [
60
- isImageFile.value ? (openBlock(), createElementBlock("img", {
61
- key: 0,
62
- src: fileURL.value,
63
- fit: "contain",
64
- style: { "max-width": "100%", "max-height": "100%" }
65
- }, null, 8, _hoisted_2)) : isVideoFile.value ? (openBlock(), createElementBlock("video", {
66
- key: 1,
67
- src: fileURL.value,
68
- controls: _ctx.controls,
69
- controlslist: _ctx.controlslist,
70
- oncontextmenu: () => _ctx.oncontextmenu,
71
- style: { "width": "100%", "height": "100%" }
72
- }, null, 8, _hoisted_3)) : (openBlock(), createElementBlock(
73
- Fragment,
74
- { key: 2 },
67
+ createElementVNode(
68
+ "div",
69
+ {
70
+ class: "gm-flex gm-items-center gm-justify-center",
71
+ style: normalizeStyle(fileStyle.value)
72
+ },
75
73
  [
76
- _ctx.showIcon || !showIframe.value ? (openBlock(), createBlock(_component_el_image, {
74
+ isImageFile.value ? (openBlock(), createElementBlock("img", {
77
75
  key: 0,
78
- style: normalizeStyle(iconStyle.value),
79
- src: iconURL.value
80
- }, null, 8, ["style", "src"])) : (openBlock(), createElementBlock("iframe", {
76
+ src: fileURL.value,
77
+ fit: "contain",
78
+ style: { "max-width": "100%", "max-height": "100%" }
79
+ }, null, 8, _hoisted_2)) : isVideoFile.value ? (openBlock(), createElementBlock("video", {
81
80
  key: 1,
82
81
  src: fileURL.value,
83
- width: "850px",
84
- height: "100%",
85
- frameborder: "0"
86
- }, null, 8, _hoisted_4))
82
+ controls: _ctx.controls,
83
+ controlslist: _ctx.controlslist,
84
+ oncontextmenu: () => _ctx.oncontextmenu,
85
+ style: { "max-width": "100%", "max-height": "100%" }
86
+ }, null, 8, _hoisted_3)) : (openBlock(), createElementBlock(
87
+ Fragment,
88
+ { key: 2 },
89
+ [
90
+ _ctx.showIcon || !showIframe.value ? (openBlock(), createBlock(_component_el_image, {
91
+ key: 0,
92
+ style: normalizeStyle(iconStyle.value),
93
+ src: iconURL.value
94
+ }, null, 8, ["style", "src"])) : (openBlock(), createElementBlock("iframe", {
95
+ key: 1,
96
+ src: fileURL.value,
97
+ width: "850px",
98
+ height: "100%",
99
+ frameborder: "0"
100
+ }, null, 8, _hoisted_4))
101
+ ],
102
+ 64
103
+ /* STABLE_FRAGMENT */
104
+ ))
87
105
  ],
88
- 64
89
- /* STABLE_FRAGMENT */
90
- ))
106
+ 4
107
+ /* STYLE */
108
+ ),
109
+ renderSlot(_ctx.$slots, "default", { file: _ctx.file })
91
110
  ]);
92
111
  };
93
112
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FileComponent.vue2.mjs","sources":["../../../../../../../packages/components/src/composite/fileComponent/FileComponent.vue"],"sourcesContent":["<template>\n <div class=\"gm-flex gm-h-full gm-items-center gm-justify-center\">\n <img v-if=\"isImageFile\" :src=\"fileURL\" fit=\"contain\" style=\"max-width: 100%; max-height: 100%\" />\n <video\n v-else-if=\"isVideoFile\"\n :src=\"fileURL\"\n :controls=\"controls\"\n :controlslist=\"controlslist\"\n :oncontextmenu=\"() => oncontextmenu\"\n style=\"width: 100%; height: 100%\"\n />\n <template v-else>\n <el-image v-if=\"showIcon || !showIframe\" :style=\"iconStyle\" :src=\"iconURL\" />\n <iframe v-else :src=\"fileURL\" width=\"850px\" height=\"100%\" frameborder=\"0\" />\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { isExcel, isImageUrl, isPDF, isPPT, isPSD, isText, isVideoUrl, isWord, isZip } from '@giime/utils/src/is';\nimport { fileComponentProps } from './fileComponent';\n// import PDF from './assets/image/pdf.svg';\n// import WORD from './assets/image/word.svg';\n// import EXCEL from './assets/image/excel.svg';\n// import PPT from './assets/image/ppt.svg';\n// import PSD from './assets/image/psd.svg';\n// import TEXT from './assets/image/text.svg';\n// import ZIP from './assets/image/zip.svg';\n// import UNKNOWN from './assets/image/unknown.svg';\nimport type { UploadFile } from 'element-plus';\n\ndefineOptions({\n name: 'GmFileComponent',\n});\n\nconst props = defineProps(fileComponentProps);\n\nconst iconStyle = computed(() => {\n return {\n width: `${props.size}px`,\n height: `${props.size}px`,\n };\n});\n\n/** 文件链接地址 */\nconst fileURL = computed(() => {\n return props.file[props.url as keyof UploadFile] as string;\n});\n\n/** 验证文件类型的字段 */\nconst verifyFile = computed(() => {\n return props.file[props.field as keyof UploadFile] as string;\n});\n\nconst isImageFile = computed(() => isImageUrl(fileURL.value) || isImageUrl(verifyFile.value));\nconst isVideoFile = computed(() => isVideoUrl(fileURL.value) || isVideoUrl(verifyFile.value));\n\n/** 显示iframe */\nconst showIframe = computed(() => {\n return isPDF(fileURL.value) || isPDF(verifyFile.value) || isText(fileURL.value) || isText(verifyFile.value);\n});\n\n/** 图标 */\nconst iconList = {\n excel: 'https://sucai.giikin.cn/workflow/material-refer-1739947054012-1213-335.svg',\n pdf: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-5462-586.svg',\n word: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1540-625.svg',\n txt: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1700-90.svg',\n zip: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-2639-507.svg',\n psd: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-5026-760.svg',\n ppt: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-2867-970.svg',\n unknown: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1448-736.svg',\n};\n\nconst iconURL = computed<string>(() => {\n // 文件类型检查器映射\n const typeCheckers = [\n { check: () => isPDF(fileURL.value) || isPDF(verifyFile.value), icon: iconList.pdf },\n { check: () => isWord(fileURL.value) || isWord(verifyFile.value), icon: iconList.word },\n { check: () => isExcel(fileURL.value) || isExcel(verifyFile.value), icon: iconList.excel },\n { check: () => isText(fileURL.value) || isText(verifyFile.value), icon: iconList.txt },\n { check: () => isPPT(fileURL.value) || isPPT(verifyFile.value), icon: iconList.ppt },\n { check: () => isZip(fileURL.value) || isZip(verifyFile.value), icon: iconList.zip },\n { check: () => isPSD(fileURL.value) || isPSD(verifyFile.value), icon: iconList.psd },\n ];\n\n // 查找匹配的文件类型\n const matchedType = typeCheckers.find(({ check }) => check());\n\n return matchedType?.icon || iconList.unknown;\n});\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoCA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAO,OAAA;AAAA,QACL,KAAA,EAAO,CAAG,EAAA,KAAA,CAAM,IAAI,CAAA,EAAA,CAAA;AAAA,QACpB,MAAA,EAAQ,CAAG,EAAA,KAAA,CAAM,IAAI,CAAA,EAAA,CAAA;AAAA,OACvB,CAAA;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAC7B,MAAO,OAAA,KAAA,CAAM,IAAK,CAAA,KAAA,CAAM,GAAuB,CAAA,CAAA;AAAA,KAChD,CAAA,CAAA;AAGD,IAAM,MAAA,UAAA,GAAa,SAAS,MAAM;AAChC,MAAO,OAAA,KAAA,CAAM,IAAK,CAAA,KAAA,CAAM,KAAyB,CAAA,CAAA;AAAA,KAClD,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,QAAS,CAAA,MAAM,UAAW,CAAA,OAAA,CAAQ,KAAK,CAAK,IAAA,UAAA,CAAW,UAAW,CAAA,KAAK,CAAC,CAAA,CAAA;AAC5F,IAAM,MAAA,WAAA,GAAc,QAAS,CAAA,MAAM,UAAW,CAAA,OAAA,CAAQ,KAAK,CAAK,IAAA,UAAA,CAAW,UAAW,CAAA,KAAK,CAAC,CAAA,CAAA;AAG5F,IAAM,MAAA,UAAA,GAAa,SAAS,MAAM;AAChC,MAA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AK,IAAA,KAAA,CAAM,UAAW,CAAA,KAAK,CAAG,EAAA,IAAA,EAAM,SAAS,GAAI,EAAA;AAAA,QACnF,EAAE,KAAA,EAAO,MAAM,KAAA,CAAM,OAAQ,CAAA,KAAK,CAAK,IAAA,KAAA,CAAM,UAAW,CAAA,KAAK,CAAG,EAAA,IAAA,EAAM,SAAS,GAAI,EAAA;AAAA,QACnF,EAAE,KAAA,EAAO,MAAM,KAAA,CAAM,OAAQ,CAAA,KAAK,CAAK,IAAA,KAAA,CAAM,UAAW,CAAA,KAAK,CAAG,EAAA,IAAA,EAAM,SAAS,GAAI,EAAA;AAAA,OACrF,CAAA;AAGA,MAAM,MAAA,WAAA,GAAc,aAAa,IAAK,CAAA,CAAC,EAAE,KAAM,EAAA,KAAM,OAAO,CAAA,CAAA;AAE5D,MAAO,OAAA,WAAA,EAAa,QAAQ,QAAS,CAAA,OAAA,CAAA;AAAA,KACtC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"FileComponent.vue2.mjs","sources":["../../../../../../../packages/components/src/composite/fileComponent/FileComponent.vue"],"sourcesContent":["<template>\n <div class=\"gm-flex gm-h-full gm-w-full gm-flex-col gm-items-center gm-justify-center\">\n <div class=\"gm-flex gm-items-center gm-justify-center\" :style=\"fileStyle\">\n <img v-if=\"isImageFile\" :src=\"fileURL\" fit=\"contain\" style=\"max-width: 100%; max-height: 100%\" />\n <video\n v-else-if=\"isVideoFile\"\n :src=\"fileURL\"\n :controls=\"controls\"\n :controlslist=\"controlslist\"\n :oncontextmenu=\"() => oncontextmenu\"\n style=\"max-width: 100%; max-height: 100%\"\n />\n <template v-else>\n <el-image v-if=\"showIcon || !showIframe\" :style=\"iconStyle\" :src=\"iconURL\" />\n <iframe v-else :src=\"fileURL\" width=\"850px\" height=\"100%\" frameborder=\"0\" />\n </template>\n </div>\n <slot :file=\"file\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { isExcel, isImageUrl, isPDF, isPPT, isPSD, isText, isVideoUrl, isWord, isZip } from '@giime/utils/src/is';\nimport { fileComponentProps } from './fileComponent';\n// import PDF from './assets/image/pdf.svg';\n// import WORD from './assets/image/word.svg';\n// import EXCEL from './assets/image/excel.svg';\n// import PPT from './assets/image/ppt.svg';\n// import PSD from './assets/image/psd.svg';\n// import TEXT from './assets/image/text.svg';\n// import ZIP from './assets/image/zip.svg';\n// import UNKNOWN from './assets/image/unknown.svg';\nimport type { UploadFile } from 'element-plus';\n\ndefineOptions({\n name: 'GmFileComponent',\n});\n\nconst props = defineProps(fileComponentProps);\n\nconst iconStyle = computed(() => {\n return {\n width: `${props.size}px`,\n height: `${props.size}px`,\n };\n});\n\nconst fileStyle = computed(() => {\n return {\n width: props.fileWidth,\n height: props.fileHeight,\n ...props.fileStyle,\n };\n});\n\n/** 文件链接地址 */\nconst fileURL = computed(() => {\n return props.file[props.url as keyof UploadFile] as string;\n});\n\n/** 验证文件类型的字段 */\nconst verifyFile = computed(() => {\n return props.file[props.field as keyof UploadFile] as string;\n});\n\nconst isImageFile = computed(() => isImageUrl(fileURL.value) || isImageUrl(verifyFile.value));\nconst isVideoFile = computed(() => isVideoUrl(fileURL.value) || isVideoUrl(verifyFile.value));\n\n/** 显示iframe */\nconst showIframe = computed(() => {\n return isPDF(fileURL.value) || isPDF(verifyFile.value) || isText(fileURL.value) || isText(verifyFile.value);\n});\n\n/** 图标 */\nconst iconList = {\n excel: 'https://sucai.giikin.cn/workflow/material-refer-1739947054012-1213-335.svg',\n pdf: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-5462-586.svg',\n word: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1540-625.svg',\n txt: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1700-90.svg',\n zip: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-2639-507.svg',\n psd: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-5026-760.svg',\n ppt: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-2867-970.svg',\n unknown: 'https://sucai.giikin.cn/workflow/material-refer-1739947288698-1448-736.svg',\n};\n\nconst iconURL = computed<string>(() => {\n // 文件类型检查器映射\n const typeCheckers = [\n { check: () => isPDF(fileURL.value) || isPDF(verifyFile.value), icon: iconList.pdf },\n { check: () => isWord(fileURL.value) || isWord(verifyFile.value), icon: iconList.word },\n { check: () => isExcel(fileURL.value) || isExcel(verifyFile.value), icon: iconList.excel },\n { check: () => isText(fileURL.value) || isText(verifyFile.value), icon: iconList.txt },\n { check: () => isPPT(fileURL.value) || isPPT(verifyFile.value), icon: iconList.ppt },\n { check: () => isZip(fileURL.value) || isZip(verifyFile.value), icon: iconList.zip },\n { check: () => isPSD(fileURL.value) || isPSD(verifyFile.value), icon: iconList.psd },\n ];\n\n // 查找匹配的文件类型\n const matchedType = typeCheckers.find(({ check }) => check());\n\n return matchedType?.icon || iconList.unknown;\n});\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuCA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAO,OAAA;AAAA,QACL,KAAA,EAAO,CAAG,EAAA,KAAA,CAAM,IAAI,CAAA,EAAA,CAAA;AAAA,QACpB,MAAA,EAAQ,CAAG,EAAA,KAAA,CAAM,IAAI,CAAA,EAAA,CAAA;AAAA,OACvB,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAO,OAAA;AAAA,QACL,OAAO,KAAM,CAAA,SAAA;AAAA,QACb,QAAQ,KAAM,CAAA,UAAA;AAAA,QACd,GAAG,KAAM,CAAA,SAAA;AAAA,OACX,CAAA;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAC7B,MAAO,OAAA,KAAA,CAAM,IAAK,CAAA,KAAA,CA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default: string;
15
15
  };
16
+ fileWidth: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ fileHeight: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ fileStyle: {
25
+ type: ObjectConstructor;
26
+ default: () => {};
27
+ };
16
28
  /** 图标大小 */
17
29
  size: {
18
30
  type: NumberConstructor;
@@ -20,7 +32,7 @@ export declare const fileComponentProps: {
20
32
  };
21
33
  /** 文件类型判断字段 */
22
34
  field: {
23
- type: PropType<keyof UploadFile>;
35
+ type: StringConstructor;
24
36
  default: string;
25
37
  };
26
38
  /** 视频是否显示操作按钮 */