easy-elplus 1.0.1 → 1.2.0

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 (394) hide show
  1. package/README.md +2 -1
  2. package/dist/index.full.js +4430 -0
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  4. package/es/index.mjs +35 -0
  5. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.mjs +7 -0
  6. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.mjs +32 -0
  7. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.mjs +32 -0
  8. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.mjs +7 -0
  9. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.mjs +32 -0
  10. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.mjs +7 -0
  11. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.mjs +7 -0
  12. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.mjs +27 -0
  13. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.mjs +6 -0
  14. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.mjs +6 -0
  15. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.mjs +7 -0
  16. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_apply.mjs +21 -0
  17. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.mjs +22 -0
  18. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.mjs +25 -0
  19. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.mjs +42 -0
  20. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.mjs +21 -0
  21. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.mjs +20 -0
  22. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.mjs +28 -0
  23. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.mjs +21 -0
  24. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.mjs +25 -0
  25. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.mjs +140 -0
  26. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.mjs +35 -0
  27. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.mjs +24 -0
  28. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.mjs +20 -0
  29. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.mjs +28 -0
  30. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.mjs +18 -0
  31. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.mjs +18 -0
  32. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.mjs +47 -0
  33. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.mjs +18 -0
  34. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.mjs +60 -0
  35. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.mjs +33 -0
  36. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.mjs +22 -0
  37. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSlice.mjs +31 -0
  38. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.mjs +20 -0
  39. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.mjs +34 -0
  40. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.mjs +14 -0
  41. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnset.mjs +65 -0
  42. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_castPath.mjs +21 -0
  43. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.mjs +16 -0
  44. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.mjs +30 -0
  45. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.mjs +16 -0
  46. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.mjs +17 -0
  47. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.mjs +18 -0
  48. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.mjs +16 -0
  49. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.mjs +38 -0
  50. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.mjs +6 -0
  51. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customOmitClone.mjs +16 -0
  52. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.mjs +11 -0
  53. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_flatRest.mjs +16 -0
  54. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.mjs +4 -0
  55. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.mjs +17 -0
  56. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.mjs +18 -0
  57. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.mjs +17 -0
  58. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.mjs +6 -0
  59. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.mjs +46 -0
  60. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.mjs +30 -0
  61. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.mjs +25 -0
  62. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.mjs +58 -0
  63. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.mjs +13 -0
  64. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.mjs +15 -0
  65. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.mjs +17 -0
  66. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.mjs +30 -0
  67. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.mjs +23 -0
  68. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.mjs +23 -0
  69. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.mjs +26 -0
  70. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.mjs +77 -0
  71. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.mjs +20 -0
  72. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.mjs +25 -0
  73. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKey.mjs +29 -0
  74. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.mjs +15 -0
  75. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.mjs +20 -0
  76. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.mjs +18 -0
  77. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.mjs +13 -0
  78. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.mjs +35 -0
  79. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.mjs +19 -0
  80. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.mjs +16 -0
  81. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.mjs +26 -0
  82. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.mjs +21 -0
  83. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.mjs +18 -0
  84. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.mjs +16 -0
  85. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.mjs +16 -0
  86. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.mjs +22 -0
  87. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.mjs +26 -0
  88. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.mjs +6 -0
  89. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.mjs +20 -0
  90. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.mjs +30 -0
  91. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.mjs +22 -0
  92. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.mjs +15 -0
  93. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overRest.mjs +36 -0
  94. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_parent.mjs +16 -0
  95. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.mjs +9 -0
  96. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToString.mjs +14 -0
  97. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.mjs +37 -0
  98. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.mjs +15 -0
  99. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.mjs +18 -0
  100. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.mjs +14 -0
  101. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.mjs +14 -0
  102. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.mjs +34 -0
  103. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.mjs +27 -0
  104. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toKey.mjs +18 -0
  105. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.mjs +26 -0
  106. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/constant.mjs +26 -0
  107. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.mjs +37 -0
  108. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.mjs +22 -0
  109. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/identity.mjs +21 -0
  110. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.mjs +36 -0
  111. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.mjs +26 -0
  112. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.mjs +33 -0
  113. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.mjs +38 -0
  114. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.mjs +37 -0
  115. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.mjs +35 -0
  116. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isMap.mjs +27 -0
  117. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.mjs +31 -0
  118. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.mjs +29 -0
  119. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.mjs +62 -0
  120. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSet.mjs +27 -0
  121. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.mjs +29 -0
  122. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.mjs +27 -0
  123. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keysIn.mjs +32 -0
  124. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.mjs +20 -0
  125. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/memoize.mjs +73 -0
  126. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omit.mjs +57 -0
  127. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.mjs +23 -0
  128. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.mjs +18 -0
  129. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toString.mjs +28 -0
  130. package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
  131. package/es/packages/components/FileUpload/index.mjs +6 -0
  132. package/es/packages/components/FileUpload/src/FileUpload.vue.mjs +332 -0
  133. package/es/packages/components/FileUpload/src/FileUpload.vue2.mjs +4 -0
  134. package/es/packages/components/ImageUpload/index.mjs +6 -0
  135. package/es/packages/components/ImageUpload/src/ImageUpload.vue.mjs +258 -0
  136. package/es/packages/components/ImageUpload/src/ImageUpload.vue2.mjs +4 -0
  137. package/es/packages/components/button/index.mjs +10 -0
  138. package/es/packages/components/button/src/button.vue.mjs +42 -0
  139. package/es/packages/components/descriptions/index.mjs +10 -0
  140. package/es/packages/components/descriptions/src/comp.vue.mjs +58 -0
  141. package/es/packages/components/descriptions/src/descriptions.vue.mjs +178 -0
  142. package/es/packages/components/dialog/index.mjs +11 -0
  143. package/{packages/components/dialog/src/useDialog.js → es/packages/components/dialog/src/useDialog.mjs} +53 -50
  144. package/es/packages/components/table/index.mjs +10 -0
  145. package/es/packages/components/table/src/scrollTo.mjs +69 -0
  146. package/es/packages/components/table/src/table.vue.mjs +356 -0
  147. package/es/packages/components/table/src/table.vue2.mjs +4 -0
  148. package/es/packages/constants/event.mjs +3 -0
  149. package/{packages/hooks/src/useDynamicComponent.js → es/packages/hooks/src/useDynamicComponent.mjs} +11 -9
  150. package/es/packages/utils/type.mjs +9 -0
  151. package/{packages/utils/vue/appContext.js → es/packages/utils/vue/appContext.mjs} +6 -4
  152. package/es/packages/utils/vue/install.mjs +22 -0
  153. package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
  154. package/lib/index.js +46 -0
  155. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +11 -0
  156. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +36 -0
  157. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +36 -0
  158. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +11 -0
  159. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +36 -0
  160. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +11 -0
  161. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +11 -0
  162. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +31 -0
  163. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +10 -0
  164. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +10 -0
  165. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +11 -0
  166. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +25 -0
  167. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +26 -0
  168. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +29 -0
  169. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +46 -0
  170. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +25 -0
  171. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +24 -0
  172. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +32 -0
  173. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +25 -0
  174. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +29 -0
  175. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +144 -0
  176. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.js +39 -0
  177. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +28 -0
  178. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +24 -0
  179. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +32 -0
  180. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +22 -0
  181. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +22 -0
  182. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +51 -0
  183. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +22 -0
  184. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +64 -0
  185. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +37 -0
  186. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +26 -0
  187. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSlice.js +35 -0
  188. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +24 -0
  189. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +38 -0
  190. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +18 -0
  191. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnset.js +69 -0
  192. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +25 -0
  193. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +20 -0
  194. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +34 -0
  195. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +20 -0
  196. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +21 -0
  197. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +22 -0
  198. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +20 -0
  199. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +42 -0
  200. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +10 -0
  201. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customOmitClone.js +20 -0
  202. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +15 -0
  203. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_flatRest.js +20 -0
  204. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +8 -0
  205. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +21 -0
  206. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +22 -0
  207. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +21 -0
  208. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +10 -0
  209. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +50 -0
  210. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +34 -0
  211. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +29 -0
  212. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +60 -0
  213. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +17 -0
  214. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +19 -0
  215. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +21 -0
  216. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +34 -0
  217. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +27 -0
  218. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +27 -0
  219. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +30 -0
  220. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +81 -0
  221. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.js +24 -0
  222. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +29 -0
  223. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +33 -0
  224. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +19 -0
  225. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +24 -0
  226. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +22 -0
  227. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +17 -0
  228. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +39 -0
  229. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +23 -0
  230. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +20 -0
  231. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +30 -0
  232. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +25 -0
  233. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +22 -0
  234. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +20 -0
  235. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +20 -0
  236. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +26 -0
  237. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +30 -0
  238. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +10 -0
  239. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +24 -0
  240. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +34 -0
  241. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +26 -0
  242. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +19 -0
  243. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +40 -0
  244. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_parent.js +20 -0
  245. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.js +13 -0
  246. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +18 -0
  247. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +41 -0
  248. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +19 -0
  249. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +22 -0
  250. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +18 -0
  251. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +18 -0
  252. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +38 -0
  253. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +31 -0
  254. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +22 -0
  255. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +30 -0
  256. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/constant.js +30 -0
  257. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.js +41 -0
  258. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.js +26 -0
  259. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/identity.js +25 -0
  260. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +40 -0
  261. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +30 -0
  262. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +37 -0
  263. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +42 -0
  264. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +41 -0
  265. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +39 -0
  266. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +31 -0
  267. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +35 -0
  268. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +33 -0
  269. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +66 -0
  270. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +31 -0
  271. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +33 -0
  272. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +31 -0
  273. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +36 -0
  274. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.js +24 -0
  275. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +77 -0
  276. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omit.js +61 -0
  277. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +27 -0
  278. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +22 -0
  279. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toString.js +32 -0
  280. package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
  281. package/lib/packages/components/FileUpload/index.js +11 -0
  282. package/lib/packages/components/FileUpload/src/FileUpload.vue.js +336 -0
  283. package/lib/packages/components/FileUpload/src/FileUpload.vue2.js +6 -0
  284. package/lib/packages/components/ImageUpload/index.js +11 -0
  285. package/lib/packages/components/ImageUpload/src/ImageUpload.vue.js +262 -0
  286. package/lib/packages/components/ImageUpload/src/ImageUpload.vue2.js +6 -0
  287. package/lib/packages/components/button/index.js +15 -0
  288. package/lib/packages/components/button/src/button.vue.js +46 -0
  289. package/lib/packages/components/descriptions/index.js +15 -0
  290. package/lib/packages/components/descriptions/src/comp.vue.js +62 -0
  291. package/lib/packages/components/descriptions/src/descriptions.vue.js +182 -0
  292. package/{packages → lib/packages}/components/dialog/index.js +7 -7
  293. package/lib/packages/components/dialog/src/useDialog.js +184 -0
  294. package/lib/packages/components/table/index.js +15 -0
  295. package/{packages → lib/packages}/components/table/src/scrollTo.js +26 -27
  296. package/lib/packages/components/table/src/table.vue.js +360 -0
  297. package/lib/packages/components/table/src/table.vue2.js +6 -0
  298. package/lib/packages/constants/event.js +5 -0
  299. package/lib/packages/hooks/src/useDynamicComponent.js +54 -0
  300. package/lib/packages/utils/type.js +15 -0
  301. package/lib/packages/utils/vue/appContext.js +28 -0
  302. package/lib/packages/utils/vue/install.js +24 -0
  303. package/package.json +59 -48
  304. package/.github/workflows/deploy.yml +0 -21
  305. package/.husky/commit-msg +0 -1
  306. package/.husky/pre-commit +0 -1
  307. package/.release-it.cjs +0 -22
  308. package/.vscode/extensions.json +0 -3
  309. package/.vscode/settings.json +0 -7
  310. package/commitlint.config.js +0 -145
  311. package/docs/.vitepress/config.mjs +0 -100
  312. package/docs/.vitepress/sidebar.js +0 -48
  313. package/docs/.vitepress/theme/index.js +0 -23
  314. package/docs/api-examples.md +0 -55
  315. package/docs/components/button.md +0 -53
  316. package/docs/components/descriptions.md +0 -88
  317. package/docs/components/dialog.md +0 -61
  318. package/docs/components/file-upload.md +0 -43
  319. package/docs/components/image-upload.md +0 -43
  320. package/docs/components/table.md +0 -113
  321. package/docs/contact-me/index.md +0 -11
  322. package/docs/demo/DialogFormContent.vue +0 -54
  323. package/docs/demo/button-basic.vue +0 -48
  324. package/docs/demo/descriptions-basic.vue +0 -159
  325. package/docs/demo/dialog-basic.vue +0 -137
  326. package/docs/demo/file-upload-basic.vue +0 -25
  327. package/docs/demo/image-upload-basic.vue +0 -24
  328. package/docs/demo/table-basic.vue +0 -177
  329. package/docs/guide/index.md +0 -52
  330. package/docs/guide/installation.md +0 -86
  331. package/docs/guide/quickstart.md +0 -75
  332. package/docs/index.md +0 -28
  333. package/docs/markdown-examples.md +0 -85
  334. package/docs/package.json +0 -23
  335. package/docs/public/logo.png +0 -0
  336. package/docs/public/qq.jpg +0 -0
  337. package/docs/public/wx.jpg +0 -0
  338. package/eslint.config.js +0 -1
  339. package/internal/build/copyFiles.js +0 -26
  340. package/internal/build/full-bundle.js +0 -48
  341. package/internal/build/gulpfile.js +0 -6
  342. package/internal/build/modules.js +0 -64
  343. package/internal/build/package.json +0 -23
  344. package/internal/eslint-config/index.js +0 -35
  345. package/internal/eslint-config/package.json +0 -21
  346. package/packages/components/FileUpload/index.js +0 -8
  347. package/packages/components/FileUpload/src/FileUpload.vue +0 -308
  348. package/packages/components/ImageUpload/index.js +0 -8
  349. package/packages/components/ImageUpload/src/ImageUpload.vue +0 -221
  350. package/packages/components/button/index.js +0 -11
  351. package/packages/components/button/src/button.vue +0 -32
  352. package/packages/components/descriptions/index.js +0 -11
  353. package/packages/components/descriptions/src/comp.vue +0 -39
  354. package/packages/components/descriptions/src/descriptions.vue +0 -138
  355. package/packages/components/index.js +0 -6
  356. package/packages/components/package.json +0 -20
  357. package/packages/components/table/index.js +0 -11
  358. package/packages/components/table/src/table.vue +0 -300
  359. package/packages/constants/event.js +0 -3
  360. package/packages/constants/index.js +0 -1
  361. package/packages/constants/package.json +0 -13
  362. package/packages/easy-elplus/index.js +0 -36
  363. package/packages/easy-elplus/package.json +0 -62
  364. package/packages/hooks/index.js +0 -1
  365. package/packages/hooks/package.json +0 -13
  366. package/packages/utils/index.js +0 -3
  367. package/packages/utils/package.json +0 -16
  368. package/packages/utils/type.js +0 -6
  369. package/packages/utils/vue/install.js +0 -36
  370. package/play/README.md +0 -5
  371. package/play/index.html +0 -13
  372. package/play/package.json +0 -19
  373. package/play/public/vite.svg +0 -1
  374. package/play/src/App.vue +0 -151
  375. package/play/src/main.js +0 -13
  376. package/play/src/router/index.js +0 -45
  377. package/play/src/testComp/AgeComp.vue +0 -9
  378. package/play/src/testComp/AsyncDemo.vue +0 -43
  379. package/play/src/testComp/CustomFooter.vue +0 -34
  380. package/play/src/testComp/DialogContent.vue +0 -172
  381. package/play/src/testComp/HeaderComp.vue +0 -1
  382. package/play/src/testComp/HtmlContent.vue +0 -8
  383. package/play/src/testComp/NestedDemo.vue +0 -15
  384. package/play/src/views/button.vue +0 -18
  385. package/play/src/views/descriptions.vue +0 -194
  386. package/play/src/views/dialog.vue +0 -283
  387. package/play/src/views/file-upload.vue +0 -170
  388. package/play/src/views/image-upload.vue +0 -100
  389. package/play/src/views/table.vue +0 -185
  390. package/play/test/index.html +0 -31
  391. package/play/vite.config.js +0 -14
  392. package/pnpm-workspace.yaml +0 -11
  393. package/prettier.config.js +0 -39
  394. package/public/qq.jpg +0 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This method returns `false`.
3
+ *
4
+ * @static
5
+ * @memberOf _
6
+ * @since 4.13.0
7
+ * @category Util
8
+ * @returns {boolean} Returns `false`.
9
+ * @example
10
+ *
11
+ * _.times(2, _.stubFalse);
12
+ * // => [false, false]
13
+ */
14
+ function stubFalse() {
15
+ return false;
16
+ }
17
+
18
+ export { stubFalse as default };
@@ -0,0 +1,28 @@
1
+ import baseToString from './_baseToString.mjs';
2
+
3
+ /**
4
+ * Converts `value` to a string. An empty string is returned for `null`
5
+ * and `undefined` values. The sign of `-0` is preserved.
6
+ *
7
+ * @static
8
+ * @memberOf _
9
+ * @since 4.0.0
10
+ * @category Lang
11
+ * @param {*} value The value to convert.
12
+ * @returns {string} Returns the converted string.
13
+ * @example
14
+ *
15
+ * _.toString(null);
16
+ * // => ''
17
+ *
18
+ * _.toString(-0);
19
+ * // => '-0'
20
+ *
21
+ * _.toString([1, 2, 3]);
22
+ * // => '1,2,3'
23
+ */
24
+ function toString(value) {
25
+ return value == null ? '' : baseToString(value);
26
+ }
27
+
28
+ export { toString as default };
@@ -0,0 +1,28 @@
1
+ function styleInject(css, ref) {
2
+ if ( ref === void 0 ) ref = {};
3
+ var insertAt = ref.insertAt;
4
+
5
+ if (!css || typeof document === 'undefined') { return; }
6
+
7
+ var head = document.head || document.getElementsByTagName('head')[0];
8
+ var style = document.createElement('style');
9
+ style.type = 'text/css';
10
+
11
+ if (insertAt === 'top') {
12
+ if (head.firstChild) {
13
+ head.insertBefore(style, head.firstChild);
14
+ } else {
15
+ head.appendChild(style);
16
+ }
17
+ } else {
18
+ head.appendChild(style);
19
+ }
20
+
21
+ if (style.styleSheet) {
22
+ style.styleSheet.cssText = css;
23
+ } else {
24
+ style.appendChild(document.createTextNode(css));
25
+ }
26
+ }
27
+
28
+ export { styleInject as default };
@@ -0,0 +1,6 @@
1
+ import { withInstall } from '../../utils/vue/install.mjs';
2
+ import FileUpload from './src/FileUpload.vue.mjs';
3
+
4
+ const EasyFileUpload = withInstall(FileUpload);
5
+
6
+ export { EasyFileUpload, EasyFileUpload as default };
@@ -0,0 +1,332 @@
1
+ import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createCommentVNode, unref, createTextVNode, Fragment, createElementVNode, toDisplayString, TransitionGroup, renderList } from 'vue';
2
+ import { ElMessage } from 'element-plus';
3
+ import { Upload, Document } from '@element-plus/icons-vue';
4
+ import { isString } from '../../../utils/type.mjs';
5
+ import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
6
+ import './FileUpload.vue2.mjs';
7
+ import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
8
+
9
+ const _hoisted_1 = { class: "component-upload-file" };
10
+ const _hoisted_2 = {
11
+ key: 0,
12
+ class: "el-upload__tip"
13
+ };
14
+ const _hoisted_3 = { style: {"color":"#f56c6c"} };
15
+ const _hoisted_4 = { style: {"color":"#f56c6c"} };
16
+ const _hoisted_5 = { class: "ele-upload-list__item-content-action" };
17
+
18
+
19
+ const _sfc_main = /*@__PURE__*/Object.assign({ name: "EasyFileUpload" }, {
20
+ __name: 'FileUpload',
21
+ props: {
22
+ modelValue: [String, Object, Array],
23
+ // 数量限制
24
+ limit: {
25
+ type: Number,
26
+ default: 5
27
+ },
28
+ // 大小限制(MB)
29
+ fileSize: {
30
+ type: Number,
31
+ default: 5
32
+ },
33
+ // 文件类型, 例如['doc', 'xls', 'ppt', 'txt', 'pdf']
34
+ fileType: {
35
+ type: Array,
36
+ default: () => ["doc", "xls", "ppt", "txt", "pdf"]
37
+ },
38
+ // 是否显示提示
39
+ isShowTip: {
40
+ type: Boolean,
41
+ default: true
42
+ },
43
+ // 上传地址
44
+ action: {
45
+ type: String,
46
+ required: true
47
+ },
48
+ // 请求头
49
+ headers: {
50
+ type: Object,
51
+ default: () => ({})
52
+ },
53
+ // 基础路径
54
+ baseUrl: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ // 自定义成功校验函数
59
+ checkSuccess: {
60
+ type: Function,
61
+ default: res => res.code === 200 || res.success === true
62
+ },
63
+ // 自定义提取文件地址的路径,支持 "data.url" 这种深层嵌套
64
+ responsePath: {
65
+ type: String,
66
+ default: "data"
67
+ },
68
+ // 错误消息提取字段
69
+ errorField: {
70
+ type: String,
71
+ default: "msg"
72
+ }
73
+ },
74
+ emits: [UPDATE_MODEL_EVENT],
75
+ setup(__props, { emit: __emit }) {
76
+
77
+
78
+
79
+ const props = __props;
80
+
81
+ const emit = __emit;
82
+
83
+ const number = ref(0);
84
+ const uploadList = ref([]);
85
+ const fileList = ref([]);
86
+ const fileUploadRef = ref(null);
87
+
88
+ const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize));
89
+
90
+ // 深度解析对象属性 (例如把 res["data.url"] 转为 res.data.url)
91
+ const getDeepValue = (obj, path) => {
92
+ if (!path) return obj
93
+ return path.split(".").reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)
94
+ };
95
+
96
+ watch(
97
+ () => props.modelValue,
98
+ val => {
99
+ if (val) {
100
+ const list = Array.isArray(val) ? val : val.split(",");
101
+ fileList.value = list.map((item, index) => {
102
+ if (isString(item)) {
103
+ item = { name: getFileName(item), url: item, uid: new Date().getTime() + index };
104
+ }
105
+ return item
106
+ });
107
+ } else {
108
+ fileList.value = [];
109
+ }
110
+ },
111
+ { deep: true, immediate: true }
112
+ );
113
+
114
+ // 上传前校检格式和大小
115
+ function handleBeforeUpload(file) {
116
+ // 校检文件类型
117
+ if (props.fileType && props.fileType.length) {
118
+ const fileName = file.name.split(".");
119
+ const fileExt = fileName[fileName.length - 1].toLowerCase();
120
+ const isTypeOk = props.fileType.map(t => t.toLowerCase()).includes(fileExt);
121
+ if (!isTypeOk) {
122
+ ElMessage.error(`文件格式不正确, 请上传${props.fileType.join("/")}格式文件!`);
123
+ return false
124
+ }
125
+ }
126
+ // 校检文件大小
127
+ if (props.fileSize && file.size / 1024 / 1024 > props.fileSize) {
128
+ ElMessage.error(`上传文件大小不能超过 ${props.fileSize} MB!`);
129
+ return false
130
+ }
131
+ number.value++;
132
+ return true
133
+ }
134
+
135
+ // 文件个数超出
136
+ function handleExceed() {
137
+ ElMessage.error(`上传文件数量不能超过 ${props.limit} 个!`);
138
+ }
139
+
140
+ // 上传失败
141
+ function handleUploadError(err) {
142
+ number.value--;
143
+ ElMessage.error(isString(err) ? err : "上传文件失败");
144
+ }
145
+
146
+ // 上传成功回调
147
+ function handleUploadSuccess(res, file) {
148
+ // 使用传入的校验函数
149
+ if (props.checkSuccess(res)) {
150
+ // 动态提取 URL
151
+ const url = getDeepValue(res, props.responsePath);
152
+
153
+ if (url) {
154
+ uploadList.value.push({ name: getFileName(url), url: url, uid: file.uid });
155
+ uploadedSuccessfully();
156
+ } else {
157
+ handleUploadError(`无法从响应中解析文件路径: ${props.responsePath}`);
158
+ }
159
+ } else {
160
+ number.value--;
161
+ const errorMsg = getDeepValue(res, props.errorField) || "上传失败";
162
+ ElMessage.error(errorMsg);
163
+ fileUploadRef.value?.handleRemove(file);
164
+ uploadedSuccessfully();
165
+ }
166
+ }
167
+
168
+ // 删除文件
169
+ function handleDelete(index) {
170
+ fileList.value.splice(index, 1);
171
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
172
+ }
173
+
174
+ // 移除文件
175
+ function handleRemove(file) {
176
+ const findex = fileList.value.findIndex(f => f.uid === file.uid);
177
+ if (findex > -1) {
178
+ fileList.value.splice(findex, 1);
179
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
180
+ }
181
+ }
182
+
183
+ // 上传结束处理
184
+ function uploadedSuccessfully() {
185
+ if (number.value > 0 && uploadList.value.length === number.value) {
186
+ fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
187
+ uploadList.value = [];
188
+ number.value = 0;
189
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
190
+ }
191
+ }
192
+
193
+ // 获取文件名称
194
+ function getFileName(name) {
195
+ if (!isString(name)) return ""
196
+ return name.slice(name.lastIndexOf("/") + 1)
197
+ }
198
+
199
+ // 获取文件完整 URL
200
+ function getFileUrl(url) {
201
+ if (!url) return ""
202
+ if (/^https?:\/\//.test(url)) return url
203
+ return props.baseUrl ? props.baseUrl + url : url
204
+ }
205
+
206
+ // 对象转成指定字符串分隔
207
+ function listToString(list, separator = ",") {
208
+ return list
209
+ .filter(item => item.url && item.url.indexOf("blob:") !== 0)
210
+ .map(item => {
211
+ let url = item.url;
212
+ // 如果设置了 baseUrl,保存时去除它
213
+ if (props.baseUrl && url.indexOf(props.baseUrl) === 0) {
214
+ url = url.replace(props.baseUrl, "");
215
+ }
216
+ return url
217
+ })
218
+ .join(separator)
219
+ }
220
+
221
+ return (_ctx, _cache) => {
222
+ const _component_el_icon = resolveComponent("el-icon");
223
+ const _component_el_button = resolveComponent("el-button");
224
+ const _component_el_upload = resolveComponent("el-upload");
225
+ const _component_el_link = resolveComponent("el-link");
226
+
227
+ return (openBlock(), createElementBlock("div", _hoisted_1, [
228
+ createVNode(_component_el_upload, {
229
+ ref_key: "fileUploadRef",
230
+ ref: fileUploadRef,
231
+ multiple: "",
232
+ action: __props.action,
233
+ "before-upload": handleBeforeUpload,
234
+ "file-list": fileList.value,
235
+ limit: __props.limit,
236
+ "on-error": handleUploadError,
237
+ "on-exceed": handleExceed,
238
+ "on-success": handleUploadSuccess,
239
+ "on-remove": handleRemove,
240
+ "show-file-list": false,
241
+ headers: __props.headers,
242
+ class: "upload-file-uploader"
243
+ }, {
244
+ default: withCtx(() => [
245
+ createCommentVNode(" 上传按钮 "),
246
+ createVNode(_component_el_button, { type: "primary" }, {
247
+ default: withCtx(() => [
248
+ createVNode(_component_el_icon, { class: "el-icon--left" }, {
249
+ default: withCtx(() => [
250
+ createVNode(unref(Upload))
251
+ ]),
252
+ _: 1 /* STABLE */
253
+ }),
254
+ _cache[0] || (_cache[0] = createTextVNode(" 选取文件 ", -1 /* CACHED */))
255
+ ]),
256
+ _: 1 /* STABLE */
257
+ })
258
+ ]),
259
+ _: 1 /* STABLE */
260
+ }, 8 /* PROPS */, ["action", "file-list", "limit", "headers"]),
261
+ createCommentVNode(" 上传提示 "),
262
+ (showTip.value)
263
+ ? (openBlock(), createElementBlock("div", _hoisted_2, [
264
+ _cache[3] || (_cache[3] = createTextVNode(" 请上传 ", -1 /* CACHED */)),
265
+ (__props.fileSize)
266
+ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
267
+ _cache[1] || (_cache[1] = createTextVNode(" 大小不超过 ", -1 /* CACHED */)),
268
+ createElementVNode("b", _hoisted_3, toDisplayString(__props.fileSize) + "MB", 1 /* TEXT */)
269
+ ], 64 /* STABLE_FRAGMENT */))
270
+ : createCommentVNode("v-if", true),
271
+ (__props.fileType && __props.fileType.length)
272
+ ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
273
+ _cache[2] || (_cache[2] = createTextVNode(" 格式为 ", -1 /* CACHED */)),
274
+ createElementVNode("b", _hoisted_4, toDisplayString(__props.fileType.join("/")), 1 /* TEXT */)
275
+ ], 64 /* STABLE_FRAGMENT */))
276
+ : createCommentVNode("v-if", true),
277
+ _cache[4] || (_cache[4] = createTextVNode(" 的文件 ", -1 /* CACHED */))
278
+ ]))
279
+ : createCommentVNode("v-if", true),
280
+ createCommentVNode(" 文件列表 "),
281
+ createVNode(TransitionGroup, {
282
+ class: "upload-file-list el-upload-list el-upload-list--text",
283
+ name: "el-fade-in-linear",
284
+ tag: "ul"
285
+ }, {
286
+ default: withCtx(() => [
287
+ (openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (file, index) => {
288
+ return (openBlock(), createElementBlock("li", {
289
+ key: file.uid || index,
290
+ class: "el-upload-list__item ele-upload-list__item-content"
291
+ }, [
292
+ createVNode(_component_el_link, {
293
+ href: getFileUrl(file.url),
294
+ underline: "never",
295
+ target: "_blank"
296
+ }, {
297
+ default: withCtx(() => [
298
+ createVNode(_component_el_icon, { class: "el-icon--left" }, {
299
+ default: withCtx(() => [
300
+ createVNode(unref(Document))
301
+ ]),
302
+ _: 1 /* STABLE */
303
+ }),
304
+ createElementVNode("span", null, toDisplayString(getFileName(file.name)), 1 /* TEXT */)
305
+ ]),
306
+ _: 2 /* DYNAMIC */
307
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["href"]),
308
+ createElementVNode("div", _hoisted_5, [
309
+ createVNode(_component_el_link, {
310
+ underline: "never",
311
+ onClick: $event => (handleDelete(index)),
312
+ type: "danger"
313
+ }, {
314
+ default: withCtx(() => [...(_cache[5] || (_cache[5] = [
315
+ createTextVNode("删除", -1 /* CACHED */)
316
+ ]))]),
317
+ _: 1 /* STABLE */
318
+ }, 8 /* PROPS */, ["onClick"])
319
+ ])
320
+ ]))
321
+ }), 128 /* KEYED_FRAGMENT */))
322
+ ]),
323
+ _: 1 /* STABLE */
324
+ })
325
+ ]))
326
+ }
327
+ }
328
+
329
+ });
330
+ var FileUpload = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-cc8b9b13"]]);
331
+
332
+ export { FileUpload as default };
@@ -0,0 +1,4 @@
1
+ import styleInject from '../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs';
2
+
3
+ var css_248z = ".component-upload-file .upload-file-uploader[data-v-cc8b9b13] {\n margin-bottom: 5px;\n}\n.component-upload-file .el-upload__tip[data-v-cc8b9b13] {\n font-size: 12px;\n color: #606266;\n margin-top: 7px;\n}\n.component-upload-file .upload-file-list[data-v-cc8b9b13] {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.component-upload-file .upload-file-list .el-upload-list__item[data-v-cc8b9b13] {\n border: 1px solid #e4e7ed;\n line-height: 2;\n margin-bottom: 10px;\n position: relative;\n border-radius: 4px;\n padding: 8px 10px;\n transition: all 0.3s;\n}\n.component-upload-file .upload-file-list .el-upload-list__item[data-v-cc8b9b13]:hover {\n background-color: #f5f7fa;\n}\n.component-upload-file .upload-file-list .ele-upload-list__item-content[data-v-cc8b9b13] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: inherit;\n}\n.component-upload-file .upload-file-list .ele-upload-list__item-content .el-link[data-v-cc8b9b13] {\n flex: 1;\n margin-right: 10px;\n}\n.component-upload-file .upload-file-list .ele-upload-list__item-content-action .el-link[data-v-cc8b9b13] {\n margin-right: 10px;\n}";
4
+ styleInject(css_248z);
@@ -0,0 +1,6 @@
1
+ import { withInstall } from '../../utils/vue/install.mjs';
2
+ import ImageUpload from './src/ImageUpload.vue.mjs';
3
+
4
+ const EasyImageUpload = withInstall(ImageUpload);
5
+
6
+ export { EasyImageUpload, EasyImageUpload as default };
@@ -0,0 +1,258 @@
1
+ import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, withCtx, unref, createTextVNode, Fragment, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
2
+ import { ElMessage } from 'element-plus';
3
+ import { Plus } from '@element-plus/icons-vue';
4
+ import { isString } from '../../../utils/type.mjs';
5
+ import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
6
+ import './ImageUpload.vue2.mjs';
7
+ import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
8
+
9
+ const _hoisted_1 = { class: "component-upload-image" };
10
+ const _hoisted_2 = {
11
+ key: 0,
12
+ class: "el-upload__tip"
13
+ };
14
+ const _hoisted_3 = { style: {"color":"#f56c6c"} };
15
+ const _hoisted_4 = { style: {"color":"#f56c6c"} };
16
+ const _hoisted_5 = ["src"];
17
+
18
+
19
+ const _sfc_main = /*@__PURE__*/Object.assign({ name: "EasyImageUpload" }, {
20
+ __name: 'ImageUpload',
21
+ props: {
22
+ modelValue: [String, Object, Array],
23
+ limit: { type: Number, default: 5 },
24
+ fileSize: { type: Number, default: 5 },
25
+ fileType: { type: Array, default: () => ["png", "jpg", "jpeg"] },
26
+ isShowTip: { type: Boolean, default: true },
27
+ action: { type: String, required: true },
28
+ headers: { type: Object, default: () => ({}) },
29
+ baseUrl: { type: String, default: "" },
30
+
31
+ checkSuccess: {
32
+ type: Function,
33
+ default: res => res.code === 200 || res.success === true
34
+ },
35
+ // 自定义提取图片地址的路径,支持 "data.url" 这种深层嵌套
36
+ responsePath: {
37
+ type: String,
38
+ default: "data"
39
+ },
40
+ // 错误消息提取字段
41
+ errorField: {
42
+ type: String,
43
+ default: "msg"
44
+ }
45
+ },
46
+ emits: [UPDATE_MODEL_EVENT],
47
+ setup(__props, { emit: __emit }) {
48
+
49
+
50
+
51
+ const props = __props;
52
+
53
+ const emit = __emit;
54
+
55
+ const number = ref(0);
56
+ const uploadList = ref([]);
57
+ const dialogImageUrl = ref("");
58
+ const dialogVisible = ref(false);
59
+ const fileList = ref([]);
60
+ const imageUploadRef = ref(null);
61
+
62
+ const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize));
63
+
64
+ // 深度解析对象属性 (例如把 res["data.imgUrl"] 转为 res.data.imgUrl)
65
+ const getDeepValue = (obj, path) => {
66
+ if (!path) return obj
67
+ return path.split(".").reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)
68
+ };
69
+
70
+ watch(
71
+ () => props.modelValue,
72
+ val => {
73
+ if (val) {
74
+ const list = Array.isArray(val) ? val : val.split(",");
75
+ fileList.value = list.map(item => {
76
+ if (isString(item)) {
77
+ let url = item;
78
+ if (!/^https?:\/\//.test(url) && props.baseUrl) {
79
+ url = props.baseUrl + item;
80
+ }
81
+ item = { name: getFileName(item), url: url };
82
+ }
83
+ return item
84
+ });
85
+ } else {
86
+ fileList.value = [];
87
+ }
88
+ },
89
+ { deep: true, immediate: true }
90
+ );
91
+
92
+ function handleBeforeUpload(file) {
93
+ let isImg = false;
94
+ if (props.fileType.length) {
95
+ const fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1).toLowerCase();
96
+ isImg = props.fileType.map(t => t.toLowerCase()).includes(fileExtension);
97
+ } else {
98
+ isImg = file.type.indexOf("image") > -1;
99
+ }
100
+
101
+ if (!isImg) {
102
+ ElMessage.error(`格式不正确, 请上传${props.fileType.join("/")}图片!`);
103
+ return false
104
+ }
105
+ if (props.fileSize && file.size / 1024 / 1024 > props.fileSize) {
106
+ ElMessage.error(`大小不能超过 ${props.fileSize} MB!`);
107
+ return false
108
+ }
109
+ number.value++;
110
+ return true
111
+ }
112
+
113
+ function handleExceed() {
114
+ ElMessage.error(`上传数量不能超过 ${props.limit} 个!`);
115
+ }
116
+
117
+ // 修改后的核心逻辑
118
+ function handleUploadSuccess(res, file) {
119
+ // 1. 使用传入的校验函数
120
+ if (props.checkSuccess(res)) {
121
+ // 2. 动态提取 URL
122
+ const url = getDeepValue(res, props.responsePath);
123
+
124
+ if (url) {
125
+ uploadList.value.push({ name: getFileName(url), url: url });
126
+ uploadedSuccessfully();
127
+ } else {
128
+ handleUploadError(`无法从响应中解析图片路径: ${props.responsePath}`);
129
+ }
130
+ } else {
131
+ number.value--;
132
+ const errorMsg = getDeepValue(res, props.errorField) || "上传失败";
133
+ ElMessage.error(errorMsg);
134
+ imageUploadRef.value.handleRemove(file);
135
+ uploadedSuccessfully();
136
+ }
137
+ }
138
+
139
+ function handleRemove(file) {
140
+ const findex = fileList.value.findIndex(f => f.name === file.name);
141
+ if (findex > -1) {
142
+ fileList.value.splice(findex, 1);
143
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
144
+ }
145
+ }
146
+
147
+ function uploadedSuccessfully() {
148
+ if (number.value > 0 && uploadList.value.length === number.value) {
149
+ fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
150
+ uploadList.value = [];
151
+ number.value = 0;
152
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
153
+ }
154
+ }
155
+
156
+ function handleUploadError(msg) {
157
+ ElMessage.error(isString(msg) ? msg : "上传图片失败");
158
+ number.value--;
159
+ }
160
+
161
+ function handlePictureCardPreview(file) {
162
+ dialogImageUrl.value = file.url;
163
+ dialogVisible.value = true;
164
+ }
165
+
166
+ function getFileName(name) {
167
+ if (!isString(name)) return ""
168
+ return name.slice(name.lastIndexOf("/") + 1)
169
+ }
170
+
171
+ function listToString(list, separator = ",") {
172
+ return list
173
+ .filter(item => item.url && item.url.indexOf("blob:") !== 0)
174
+ .map(item => {
175
+ let url = item.url;
176
+ if (props.baseUrl && url.indexOf(props.baseUrl) === 0) {
177
+ url = url.replace(props.baseUrl, "");
178
+ }
179
+ return url
180
+ })
181
+ .join(separator)
182
+ }
183
+
184
+ return (_ctx, _cache) => {
185
+ const _component_el_icon = resolveComponent("el-icon");
186
+ const _component_el_upload = resolveComponent("el-upload");
187
+ const _component_el_dialog = resolveComponent("el-dialog");
188
+
189
+ return (openBlock(), createElementBlock("div", _hoisted_1, [
190
+ createVNode(_component_el_upload, {
191
+ ref_key: "imageUploadRef",
192
+ ref: imageUploadRef,
193
+ multiple: "",
194
+ action: __props.action,
195
+ "list-type": "picture-card",
196
+ "on-success": handleUploadSuccess,
197
+ "before-upload": handleBeforeUpload,
198
+ limit: __props.limit,
199
+ "on-error": handleUploadError,
200
+ "on-exceed": handleExceed,
201
+ "on-remove": handleRemove,
202
+ "show-file-list": true,
203
+ headers: __props.headers,
204
+ "file-list": fileList.value,
205
+ "on-preview": handlePictureCardPreview,
206
+ class: normalizeClass({ hide: fileList.value.length >= __props.limit })
207
+ }, {
208
+ default: withCtx(() => [
209
+ createVNode(_component_el_icon, { class: "avatar-uploader-icon" }, {
210
+ default: withCtx(() => [
211
+ createVNode(unref(Plus))
212
+ ]),
213
+ _: 1 /* STABLE */
214
+ })
215
+ ]),
216
+ _: 1 /* STABLE */
217
+ }, 8 /* PROPS */, ["action", "limit", "headers", "file-list", "class"]),
218
+ (showTip.value)
219
+ ? (openBlock(), createElementBlock("div", _hoisted_2, [
220
+ _cache[3] || (_cache[3] = createTextVNode(" 请上传 ", -1 /* CACHED */)),
221
+ (__props.fileSize)
222
+ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
223
+ _cache[1] || (_cache[1] = createTextVNode(" 大小不超过 ", -1 /* CACHED */)),
224
+ createElementVNode("b", _hoisted_3, toDisplayString(__props.fileSize) + "MB", 1 /* TEXT */)
225
+ ], 64 /* STABLE_FRAGMENT */))
226
+ : createCommentVNode("v-if", true),
227
+ (__props.fileType)
228
+ ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
229
+ _cache[2] || (_cache[2] = createTextVNode(" 格式为 ", -1 /* CACHED */)),
230
+ createElementVNode("b", _hoisted_4, toDisplayString(__props.fileType.join("/")), 1 /* TEXT */)
231
+ ], 64 /* STABLE_FRAGMENT */))
232
+ : createCommentVNode("v-if", true),
233
+ _cache[4] || (_cache[4] = createTextVNode(" 的文件 ", -1 /* CACHED */))
234
+ ]))
235
+ : createCommentVNode("v-if", true),
236
+ createVNode(_component_el_dialog, {
237
+ modelValue: dialogVisible.value,
238
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((dialogVisible).value = $event)),
239
+ title: "预览",
240
+ width: "800px",
241
+ "append-to-body": ""
242
+ }, {
243
+ default: withCtx(() => [
244
+ createElementVNode("img", {
245
+ src: dialogImageUrl.value,
246
+ style: {"display":"block","max-width":"100%","margin":"0 auto"}
247
+ }, null, 8 /* PROPS */, _hoisted_5)
248
+ ]),
249
+ _: 1 /* STABLE */
250
+ }, 8 /* PROPS */, ["modelValue"])
251
+ ]))
252
+ }
253
+ }
254
+
255
+ });
256
+ var ImageUpload = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-9ac7dd1b"]]);
257
+
258
+ export { ImageUpload as default };
@@ -0,0 +1,4 @@
1
+ import styleInject from '../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs';
2
+
3
+ var css_248z = "\n/* 保持原有样式 */\n.component-upload-image[data-v-9ac7dd1b] .el-upload--picture-card {\n width: 100px;\n height: 100px;\n line-height: 110px;\n}\n.component-upload-image[data-v-9ac7dd1b] .el-upload-list--picture-card .el-upload-list__item {\n width: 100px;\n height: 100px;\n}\n.component-upload-image[data-v-9ac7dd1b] .hide .el-upload--picture-card {\n display: none;\n}\n";
4
+ styleInject(css_248z);