easy-elplus 1.0.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.
- package/LICENSE +21 -0
- package/README.md +69 -0
- package/dist/index.full.js +4431 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/index.mjs +35 -0
- package/es/node_modules/.pnpm/@vue_shared@3.5.27/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +13 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.mjs +7 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.mjs +32 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.mjs +32 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.mjs +7 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.mjs +32 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.mjs +7 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.mjs +7 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.mjs +27 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.mjs +6 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.mjs +6 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.mjs +7 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_apply.mjs +21 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.mjs +22 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.mjs +25 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.mjs +42 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.mjs +21 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.mjs +20 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.mjs +28 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.mjs +21 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.mjs +25 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.mjs +140 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.mjs +35 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.mjs +24 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.mjs +20 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.mjs +28 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.mjs +47 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.mjs +60 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.mjs +33 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.mjs +22 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSlice.mjs +31 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.mjs +20 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.mjs +34 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.mjs +14 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnset.mjs +65 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_castPath.mjs +21 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.mjs +30 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.mjs +17 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.mjs +38 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.mjs +6 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customOmitClone.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.mjs +11 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_flatRest.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.mjs +4 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.mjs +17 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.mjs +17 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.mjs +6 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.mjs +46 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.mjs +30 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.mjs +25 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.mjs +58 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.mjs +13 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.mjs +15 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.mjs +17 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.mjs +30 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.mjs +23 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.mjs +23 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.mjs +26 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.mjs +77 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.mjs +20 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.mjs +25 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKey.mjs +29 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.mjs +15 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.mjs +20 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.mjs +13 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.mjs +35 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.mjs +19 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.mjs +26 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.mjs +21 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.mjs +22 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.mjs +26 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.mjs +6 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.mjs +20 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.mjs +30 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.mjs +22 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.mjs +15 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overRest.mjs +36 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_parent.mjs +16 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.mjs +9 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToString.mjs +14 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.mjs +37 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.mjs +15 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.mjs +14 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.mjs +14 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.mjs +34 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.mjs +27 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toKey.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.mjs +26 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/constant.mjs +26 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.mjs +37 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.mjs +22 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/identity.mjs +21 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.mjs +36 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.mjs +26 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.mjs +33 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.mjs +38 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.mjs +37 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.mjs +35 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isMap.mjs +27 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.mjs +31 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.mjs +29 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.mjs +62 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSet.mjs +27 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.mjs +29 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.mjs +27 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keysIn.mjs +32 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.mjs +20 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/memoize.mjs +73 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omit.mjs +57 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.mjs +23 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.mjs +18 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toString.mjs +28 -0
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
- package/es/packages/components/FileUpload/index.mjs +6 -0
- package/es/packages/components/FileUpload/src/FileUpload.vue.mjs +332 -0
- package/es/packages/components/FileUpload/src/FileUpload.vue2.mjs +4 -0
- package/es/packages/components/ImageUpload/index.mjs +6 -0
- package/es/packages/components/ImageUpload/src/ImageUpload.vue.mjs +258 -0
- package/es/packages/components/ImageUpload/src/ImageUpload.vue2.mjs +4 -0
- package/es/packages/components/button/index.mjs +10 -0
- package/es/packages/components/button/src/button.vue.mjs +42 -0
- package/es/packages/components/descriptions/index.mjs +10 -0
- package/es/packages/components/descriptions/src/comp.vue.mjs +51 -0
- package/es/packages/components/descriptions/src/descriptions.vue.mjs +178 -0
- package/es/packages/components/dialog/index.mjs +11 -0
- package/es/packages/components/dialog/src/appContext.mjs +25 -0
- package/es/packages/components/dialog/src/dialog.mjs +130 -0
- package/es/packages/components/dialog/src/useDialog.mjs +183 -0
- package/es/packages/components/table/index.mjs +10 -0
- package/es/packages/components/table/src/scrollTo.mjs +69 -0
- package/es/packages/components/table/src/table.vue.mjs +357 -0
- package/es/packages/components/table/src/table.vue2.mjs +4 -0
- package/es/packages/components/table/src/tableColumn.vue.mjs +72 -0
- package/es/packages/constants/event.mjs +3 -0
- package/es/packages/hooks/src/useDynamicComponent.mjs +53 -0
- package/es/packages/utils/type.mjs +5 -0
- package/es/packages/utils/vue/appContext.mjs +25 -0
- package/es/packages/utils/vue/install.mjs +22 -0
- package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
- package/lib/index.js +46 -0
- package/lib/node_modules/.pnpm/@vue_shared@3.5.27/node_modules/@vue/shared/dist/shared.esm-bundler.js +16 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +11 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +36 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +36 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +11 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +36 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +11 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +11 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +31 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +10 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +10 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +11 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +25 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +26 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +29 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +46 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +25 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +24 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +32 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +25 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +29 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +144 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.js +39 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +28 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +24 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +32 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +51 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +64 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +37 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +26 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSlice.js +35 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +24 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +38 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +18 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnset.js +69 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +25 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +34 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +21 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +42 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +10 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customOmitClone.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +15 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_flatRest.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +8 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +21 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +21 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +10 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +50 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +34 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +29 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +60 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +17 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +19 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +21 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +34 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +27 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +27 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +30 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +81 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.js +24 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +29 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +33 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +19 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +24 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +17 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +39 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +23 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +30 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +25 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +26 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +30 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +10 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +24 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +34 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +26 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +19 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +40 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_parent.js +20 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.js +13 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +18 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +41 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +19 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +18 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +18 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +38 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +31 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +30 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/constant.js +30 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.js +41 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.js +26 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/identity.js +25 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +40 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +30 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +37 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +42 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +41 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +39 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +31 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +35 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +33 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +66 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +31 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +33 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +31 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +36 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.js +24 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +77 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omit.js +61 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +27 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +22 -0
- package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toString.js +32 -0
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
- package/lib/packages/components/FileUpload/index.js +11 -0
- package/lib/packages/components/FileUpload/src/FileUpload.vue.js +336 -0
- package/lib/packages/components/FileUpload/src/FileUpload.vue2.js +6 -0
- package/lib/packages/components/ImageUpload/index.js +11 -0
- package/lib/packages/components/ImageUpload/src/ImageUpload.vue.js +262 -0
- package/lib/packages/components/ImageUpload/src/ImageUpload.vue2.js +6 -0
- package/lib/packages/components/button/index.js +15 -0
- package/lib/packages/components/button/src/button.vue.js +46 -0
- package/lib/packages/components/descriptions/index.js +15 -0
- package/lib/packages/components/descriptions/src/comp.vue.js +55 -0
- package/lib/packages/components/descriptions/src/descriptions.vue.js +182 -0
- package/lib/packages/components/dialog/index.js +14 -0
- package/lib/packages/components/dialog/src/appContext.js +28 -0
- package/lib/packages/components/dialog/src/dialog.js +132 -0
- package/lib/packages/components/dialog/src/useDialog.js +185 -0
- package/lib/packages/components/table/index.js +15 -0
- package/lib/packages/components/table/src/scrollTo.js +71 -0
- package/lib/packages/components/table/src/table.vue.js +361 -0
- package/lib/packages/components/table/src/table.vue2.js +6 -0
- package/lib/packages/components/table/src/tableColumn.vue.js +76 -0
- package/lib/packages/constants/event.js +5 -0
- package/lib/packages/hooks/src/useDynamicComponent.js +55 -0
- package/lib/packages/utils/type.js +9 -0
- package/lib/packages/utils/vue/appContext.js +28 -0
- package/lib/packages/utils/vue/install.js +24 -0
- package/package.json +62 -0
- package/public/qq.jpg +0 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var elementPlus = require('element-plus');
|
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
+
var type = require('../../../utils/type.js');
|
|
9
|
+
var event = require('../../../constants/event.js');
|
|
10
|
+
require('./FileUpload.vue2.js');
|
|
11
|
+
var _pluginVue_exportHelper = require('../../../../_virtual/_plugin-vue_export-helper.js');
|
|
12
|
+
|
|
13
|
+
const _hoisted_1 = { class: "component-upload-file" };
|
|
14
|
+
const _hoisted_2 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "el-upload__tip"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_3 = { style: {"color":"#f56c6c"} };
|
|
19
|
+
const _hoisted_4 = { style: {"color":"#f56c6c"} };
|
|
20
|
+
const _hoisted_5 = { class: "ele-upload-list__item-content-action" };
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const _sfc_main = /*@__PURE__*/Object.assign({ name: "EasyFileUpload" }, {
|
|
24
|
+
__name: 'FileUpload',
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: [String, Object, Array],
|
|
27
|
+
// 数量限制
|
|
28
|
+
limit: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 5
|
|
31
|
+
},
|
|
32
|
+
// 大小限制(MB)
|
|
33
|
+
fileSize: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 5
|
|
36
|
+
},
|
|
37
|
+
// 文件类型, 例如['doc', 'xls', 'ppt', 'txt', 'pdf']
|
|
38
|
+
fileType: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: () => ["doc", "xls", "ppt", "txt", "pdf"]
|
|
41
|
+
},
|
|
42
|
+
// 是否显示提示
|
|
43
|
+
isShowTip: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
46
|
+
},
|
|
47
|
+
// 上传地址
|
|
48
|
+
action: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
// 请求头
|
|
53
|
+
headers: {
|
|
54
|
+
type: Object,
|
|
55
|
+
default: () => ({})
|
|
56
|
+
},
|
|
57
|
+
// 基础路径
|
|
58
|
+
baseUrl: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ""
|
|
61
|
+
},
|
|
62
|
+
// 自定义成功校验函数
|
|
63
|
+
checkSuccess: {
|
|
64
|
+
type: Function,
|
|
65
|
+
default: res => res.code === 200 || res.success === true
|
|
66
|
+
},
|
|
67
|
+
// 自定义提取文件地址的路径,支持 "data.url" 这种深层嵌套
|
|
68
|
+
responsePath: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: "data"
|
|
71
|
+
},
|
|
72
|
+
// 错误消息提取字段
|
|
73
|
+
errorField: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: "msg"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
emits: [event.UPDATE_MODEL_EVENT],
|
|
79
|
+
setup(__props, { emit: __emit }) {
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
const props = __props;
|
|
84
|
+
|
|
85
|
+
const emit = __emit;
|
|
86
|
+
|
|
87
|
+
const number = vue.ref(0);
|
|
88
|
+
const uploadList = vue.ref([]);
|
|
89
|
+
const fileList = vue.ref([]);
|
|
90
|
+
const fileUploadRef = vue.ref(null);
|
|
91
|
+
|
|
92
|
+
const showTip = vue.computed(() => props.isShowTip && (props.fileType || props.fileSize));
|
|
93
|
+
|
|
94
|
+
// 深度解析对象属性 (例如把 res["data.url"] 转为 res.data.url)
|
|
95
|
+
const getDeepValue = (obj, path) => {
|
|
96
|
+
if (!path) return obj
|
|
97
|
+
return path.split(".").reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
vue.watch(
|
|
101
|
+
() => props.modelValue,
|
|
102
|
+
val => {
|
|
103
|
+
if (val) {
|
|
104
|
+
const list = Array.isArray(val) ? val : val.split(",");
|
|
105
|
+
fileList.value = list.map((item, index) => {
|
|
106
|
+
if (type.isString(item)) {
|
|
107
|
+
item = { name: getFileName(item), url: item, uid: new Date().getTime() + index };
|
|
108
|
+
}
|
|
109
|
+
return item
|
|
110
|
+
});
|
|
111
|
+
} else {
|
|
112
|
+
fileList.value = [];
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{ deep: true, immediate: true }
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
// 上传前校检格式和大小
|
|
119
|
+
function handleBeforeUpload(file) {
|
|
120
|
+
// 校检文件类型
|
|
121
|
+
if (props.fileType && props.fileType.length) {
|
|
122
|
+
const fileName = file.name.split(".");
|
|
123
|
+
const fileExt = fileName[fileName.length - 1].toLowerCase();
|
|
124
|
+
const isTypeOk = props.fileType.map(t => t.toLowerCase()).includes(fileExt);
|
|
125
|
+
if (!isTypeOk) {
|
|
126
|
+
elementPlus.ElMessage.error(`文件格式不正确, 请上传${props.fileType.join("/")}格式文件!`);
|
|
127
|
+
return false
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// 校检文件大小
|
|
131
|
+
if (props.fileSize && file.size / 1024 / 1024 > props.fileSize) {
|
|
132
|
+
elementPlus.ElMessage.error(`上传文件大小不能超过 ${props.fileSize} MB!`);
|
|
133
|
+
return false
|
|
134
|
+
}
|
|
135
|
+
number.value++;
|
|
136
|
+
return true
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// 文件个数超出
|
|
140
|
+
function handleExceed() {
|
|
141
|
+
elementPlus.ElMessage.error(`上传文件数量不能超过 ${props.limit} 个!`);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// 上传失败
|
|
145
|
+
function handleUploadError(err) {
|
|
146
|
+
number.value--;
|
|
147
|
+
elementPlus.ElMessage.error(type.isString(err) ? err : "上传文件失败");
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 上传成功回调
|
|
151
|
+
function handleUploadSuccess(res, file) {
|
|
152
|
+
// 使用传入的校验函数
|
|
153
|
+
if (props.checkSuccess(res)) {
|
|
154
|
+
// 动态提取 URL
|
|
155
|
+
const url = getDeepValue(res, props.responsePath);
|
|
156
|
+
|
|
157
|
+
if (url) {
|
|
158
|
+
uploadList.value.push({ name: getFileName(url), url: url, uid: file.uid });
|
|
159
|
+
uploadedSuccessfully();
|
|
160
|
+
} else {
|
|
161
|
+
handleUploadError(`无法从响应中解析文件路径: ${props.responsePath}`);
|
|
162
|
+
}
|
|
163
|
+
} else {
|
|
164
|
+
number.value--;
|
|
165
|
+
const errorMsg = getDeepValue(res, props.errorField) || "上传失败";
|
|
166
|
+
elementPlus.ElMessage.error(errorMsg);
|
|
167
|
+
fileUploadRef.value?.handleRemove(file);
|
|
168
|
+
uploadedSuccessfully();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// 删除文件
|
|
173
|
+
function handleDelete(index) {
|
|
174
|
+
fileList.value.splice(index, 1);
|
|
175
|
+
emit(event.UPDATE_MODEL_EVENT, listToString(fileList.value));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 移除文件
|
|
179
|
+
function handleRemove(file) {
|
|
180
|
+
const findex = fileList.value.findIndex(f => f.uid === file.uid);
|
|
181
|
+
if (findex > -1) {
|
|
182
|
+
fileList.value.splice(findex, 1);
|
|
183
|
+
emit(event.UPDATE_MODEL_EVENT, listToString(fileList.value));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 上传结束处理
|
|
188
|
+
function uploadedSuccessfully() {
|
|
189
|
+
if (number.value > 0 && uploadList.value.length === number.value) {
|
|
190
|
+
fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
|
|
191
|
+
uploadList.value = [];
|
|
192
|
+
number.value = 0;
|
|
193
|
+
emit(event.UPDATE_MODEL_EVENT, listToString(fileList.value));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// 获取文件名称
|
|
198
|
+
function getFileName(name) {
|
|
199
|
+
if (!type.isString(name)) return ""
|
|
200
|
+
return name.slice(name.lastIndexOf("/") + 1)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// 获取文件完整 URL
|
|
204
|
+
function getFileUrl(url) {
|
|
205
|
+
if (!url) return ""
|
|
206
|
+
if (/^https?:\/\//.test(url)) return url
|
|
207
|
+
return props.baseUrl ? props.baseUrl + url : url
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// 对象转成指定字符串分隔
|
|
211
|
+
function listToString(list, separator = ",") {
|
|
212
|
+
return list
|
|
213
|
+
.filter(item => item.url && item.url.indexOf("blob:") !== 0)
|
|
214
|
+
.map(item => {
|
|
215
|
+
let url = item.url;
|
|
216
|
+
// 如果设置了 baseUrl,保存时去除它
|
|
217
|
+
if (props.baseUrl && url.indexOf(props.baseUrl) === 0) {
|
|
218
|
+
url = url.replace(props.baseUrl, "");
|
|
219
|
+
}
|
|
220
|
+
return url
|
|
221
|
+
})
|
|
222
|
+
.join(separator)
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return (_ctx, _cache) => {
|
|
226
|
+
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
227
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
228
|
+
const _component_el_upload = vue.resolveComponent("el-upload");
|
|
229
|
+
const _component_el_link = vue.resolveComponent("el-link");
|
|
230
|
+
|
|
231
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
232
|
+
vue.createVNode(_component_el_upload, {
|
|
233
|
+
ref_key: "fileUploadRef",
|
|
234
|
+
ref: fileUploadRef,
|
|
235
|
+
multiple: "",
|
|
236
|
+
action: __props.action,
|
|
237
|
+
"before-upload": handleBeforeUpload,
|
|
238
|
+
"file-list": fileList.value,
|
|
239
|
+
limit: __props.limit,
|
|
240
|
+
"on-error": handleUploadError,
|
|
241
|
+
"on-exceed": handleExceed,
|
|
242
|
+
"on-success": handleUploadSuccess,
|
|
243
|
+
"on-remove": handleRemove,
|
|
244
|
+
"show-file-list": false,
|
|
245
|
+
headers: __props.headers,
|
|
246
|
+
class: "upload-file-uploader"
|
|
247
|
+
}, {
|
|
248
|
+
default: vue.withCtx(() => [
|
|
249
|
+
vue.createCommentVNode(" 上传按钮 "),
|
|
250
|
+
vue.createVNode(_component_el_button, { type: "primary" }, {
|
|
251
|
+
default: vue.withCtx(() => [
|
|
252
|
+
vue.createVNode(_component_el_icon, { class: "el-icon--left" }, {
|
|
253
|
+
default: vue.withCtx(() => [
|
|
254
|
+
vue.createVNode(vue.unref(iconsVue.Upload))
|
|
255
|
+
]),
|
|
256
|
+
_: 1 /* STABLE */
|
|
257
|
+
}),
|
|
258
|
+
_cache[0] || (_cache[0] = vue.createTextVNode(" 选取文件 ", -1 /* CACHED */))
|
|
259
|
+
]),
|
|
260
|
+
_: 1 /* STABLE */
|
|
261
|
+
})
|
|
262
|
+
]),
|
|
263
|
+
_: 1 /* STABLE */
|
|
264
|
+
}, 8 /* PROPS */, ["action", "file-list", "limit", "headers"]),
|
|
265
|
+
vue.createCommentVNode(" 上传提示 "),
|
|
266
|
+
(showTip.value)
|
|
267
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
268
|
+
_cache[3] || (_cache[3] = vue.createTextVNode(" 请上传 ", -1 /* CACHED */)),
|
|
269
|
+
(__props.fileSize)
|
|
270
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
271
|
+
_cache[1] || (_cache[1] = vue.createTextVNode(" 大小不超过 ", -1 /* CACHED */)),
|
|
272
|
+
vue.createElementVNode("b", _hoisted_3, vue.toDisplayString(__props.fileSize) + "MB", 1 /* TEXT */)
|
|
273
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
274
|
+
: vue.createCommentVNode("v-if", true),
|
|
275
|
+
(__props.fileType && __props.fileType.length)
|
|
276
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
277
|
+
_cache[2] || (_cache[2] = vue.createTextVNode(" 格式为 ", -1 /* CACHED */)),
|
|
278
|
+
vue.createElementVNode("b", _hoisted_4, vue.toDisplayString(__props.fileType.join("/")), 1 /* TEXT */)
|
|
279
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
280
|
+
: vue.createCommentVNode("v-if", true),
|
|
281
|
+
_cache[4] || (_cache[4] = vue.createTextVNode(" 的文件 ", -1 /* CACHED */))
|
|
282
|
+
]))
|
|
283
|
+
: vue.createCommentVNode("v-if", true),
|
|
284
|
+
vue.createCommentVNode(" 文件列表 "),
|
|
285
|
+
vue.createVNode(vue.TransitionGroup, {
|
|
286
|
+
class: "upload-file-list el-upload-list el-upload-list--text",
|
|
287
|
+
name: "el-fade-in-linear",
|
|
288
|
+
tag: "ul"
|
|
289
|
+
}, {
|
|
290
|
+
default: vue.withCtx(() => [
|
|
291
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fileList.value, (file, index) => {
|
|
292
|
+
return (vue.openBlock(), vue.createElementBlock("li", {
|
|
293
|
+
key: file.uid || index,
|
|
294
|
+
class: "el-upload-list__item ele-upload-list__item-content"
|
|
295
|
+
}, [
|
|
296
|
+
vue.createVNode(_component_el_link, {
|
|
297
|
+
href: getFileUrl(file.url),
|
|
298
|
+
underline: "never",
|
|
299
|
+
target: "_blank"
|
|
300
|
+
}, {
|
|
301
|
+
default: vue.withCtx(() => [
|
|
302
|
+
vue.createVNode(_component_el_icon, { class: "el-icon--left" }, {
|
|
303
|
+
default: vue.withCtx(() => [
|
|
304
|
+
vue.createVNode(vue.unref(iconsVue.Document))
|
|
305
|
+
]),
|
|
306
|
+
_: 1 /* STABLE */
|
|
307
|
+
}),
|
|
308
|
+
vue.createElementVNode("span", null, vue.toDisplayString(getFileName(file.name)), 1 /* TEXT */)
|
|
309
|
+
]),
|
|
310
|
+
_: 2 /* DYNAMIC */
|
|
311
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["href"]),
|
|
312
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
313
|
+
vue.createVNode(_component_el_link, {
|
|
314
|
+
underline: "never",
|
|
315
|
+
onClick: $event => (handleDelete(index)),
|
|
316
|
+
type: "danger"
|
|
317
|
+
}, {
|
|
318
|
+
default: vue.withCtx(() => [...(_cache[5] || (_cache[5] = [
|
|
319
|
+
vue.createTextVNode("删除", -1 /* CACHED */)
|
|
320
|
+
]))]),
|
|
321
|
+
_: 1 /* STABLE */
|
|
322
|
+
}, 8 /* PROPS */, ["onClick"])
|
|
323
|
+
])
|
|
324
|
+
]))
|
|
325
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
326
|
+
]),
|
|
327
|
+
_: 1 /* STABLE */
|
|
328
|
+
})
|
|
329
|
+
]))
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
});
|
|
334
|
+
var FileUpload = /*#__PURE__*/_pluginVue_exportHelper.default(_sfc_main, [['__scopeId',"data-v-cc8b9b13"]]);
|
|
335
|
+
|
|
336
|
+
exports.default = FileUpload;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styleInject_es = require('../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js');
|
|
4
|
+
|
|
5
|
+
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}";
|
|
6
|
+
styleInject_es.default(css_248z);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var install = require('../../utils/vue/install.js');
|
|
6
|
+
var ImageUpload = require('./src/ImageUpload.vue.js');
|
|
7
|
+
|
|
8
|
+
const EasyImageUpload = install.withInstall(ImageUpload.default);
|
|
9
|
+
|
|
10
|
+
exports.EasyImageUpload = EasyImageUpload;
|
|
11
|
+
exports.default = EasyImageUpload;
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var elementPlus = require('element-plus');
|
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
+
var type = require('../../../utils/type.js');
|
|
9
|
+
var event = require('../../../constants/event.js');
|
|
10
|
+
require('./ImageUpload.vue2.js');
|
|
11
|
+
var _pluginVue_exportHelper = require('../../../../_virtual/_plugin-vue_export-helper.js');
|
|
12
|
+
|
|
13
|
+
const _hoisted_1 = { class: "component-upload-image" };
|
|
14
|
+
const _hoisted_2 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "el-upload__tip"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_3 = { style: {"color":"#f56c6c"} };
|
|
19
|
+
const _hoisted_4 = { style: {"color":"#f56c6c"} };
|
|
20
|
+
const _hoisted_5 = ["src"];
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const _sfc_main = /*@__PURE__*/Object.assign({ name: "EasyImageUpload" }, {
|
|
24
|
+
__name: 'ImageUpload',
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: [String, Object, Array],
|
|
27
|
+
limit: { type: Number, default: 5 },
|
|
28
|
+
fileSize: { type: Number, default: 5 },
|
|
29
|
+
fileType: { type: Array, default: () => ["png", "jpg", "jpeg"] },
|
|
30
|
+
isShowTip: { type: Boolean, default: true },
|
|
31
|
+
action: { type: String, required: true },
|
|
32
|
+
headers: { type: Object, default: () => ({}) },
|
|
33
|
+
baseUrl: { type: String, default: "" },
|
|
34
|
+
|
|
35
|
+
checkSuccess: {
|
|
36
|
+
type: Function,
|
|
37
|
+
default: res => res.code === 200 || res.success === true
|
|
38
|
+
},
|
|
39
|
+
// 自定义提取图片地址的路径,支持 "data.url" 这种深层嵌套
|
|
40
|
+
responsePath: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "data"
|
|
43
|
+
},
|
|
44
|
+
// 错误消息提取字段
|
|
45
|
+
errorField: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "msg"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: [event.UPDATE_MODEL_EVENT],
|
|
51
|
+
setup(__props, { emit: __emit }) {
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
const props = __props;
|
|
56
|
+
|
|
57
|
+
const emit = __emit;
|
|
58
|
+
|
|
59
|
+
const number = vue.ref(0);
|
|
60
|
+
const uploadList = vue.ref([]);
|
|
61
|
+
const dialogImageUrl = vue.ref("");
|
|
62
|
+
const dialogVisible = vue.ref(false);
|
|
63
|
+
const fileList = vue.ref([]);
|
|
64
|
+
const imageUploadRef = vue.ref(null);
|
|
65
|
+
|
|
66
|
+
const showTip = vue.computed(() => props.isShowTip && (props.fileType || props.fileSize));
|
|
67
|
+
|
|
68
|
+
// 深度解析对象属性 (例如把 res["data.imgUrl"] 转为 res.data.imgUrl)
|
|
69
|
+
const getDeepValue = (obj, path) => {
|
|
70
|
+
if (!path) return obj
|
|
71
|
+
return path.split(".").reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
vue.watch(
|
|
75
|
+
() => props.modelValue,
|
|
76
|
+
val => {
|
|
77
|
+
if (val) {
|
|
78
|
+
const list = Array.isArray(val) ? val : val.split(",");
|
|
79
|
+
fileList.value = list.map(item => {
|
|
80
|
+
if (type.isString(item)) {
|
|
81
|
+
let url = item;
|
|
82
|
+
if (!/^https?:\/\//.test(url) && props.baseUrl) {
|
|
83
|
+
url = props.baseUrl + item;
|
|
84
|
+
}
|
|
85
|
+
item = { name: getFileName(item), url: url };
|
|
86
|
+
}
|
|
87
|
+
return item
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
fileList.value = [];
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{ deep: true, immediate: true }
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
function handleBeforeUpload(file) {
|
|
97
|
+
let isImg = false;
|
|
98
|
+
if (props.fileType.length) {
|
|
99
|
+
const fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1).toLowerCase();
|
|
100
|
+
isImg = props.fileType.map(t => t.toLowerCase()).includes(fileExtension);
|
|
101
|
+
} else {
|
|
102
|
+
isImg = file.type.indexOf("image") > -1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!isImg) {
|
|
106
|
+
elementPlus.ElMessage.error(`格式不正确, 请上传${props.fileType.join("/")}图片!`);
|
|
107
|
+
return false
|
|
108
|
+
}
|
|
109
|
+
if (props.fileSize && file.size / 1024 / 1024 > props.fileSize) {
|
|
110
|
+
elementPlus.ElMessage.error(`大小不能超过 ${props.fileSize} MB!`);
|
|
111
|
+
return false
|
|
112
|
+
}
|
|
113
|
+
number.value++;
|
|
114
|
+
return true
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function handleExceed() {
|
|
118
|
+
elementPlus.ElMessage.error(`上传数量不能超过 ${props.limit} 个!`);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// 修改后的核心逻辑
|
|
122
|
+
function handleUploadSuccess(res, file) {
|
|
123
|
+
// 1. 使用传入的校验函数
|
|
124
|
+
if (props.checkSuccess(res)) {
|
|
125
|
+
// 2. 动态提取 URL
|
|
126
|
+
const url = getDeepValue(res, props.responsePath);
|
|
127
|
+
|
|
128
|
+
if (url) {
|
|
129
|
+
uploadList.value.push({ name: getFileName(url), url: url });
|
|
130
|
+
uploadedSuccessfully();
|
|
131
|
+
} else {
|
|
132
|
+
handleUploadError(`无法从响应中解析图片路径: ${props.responsePath}`);
|
|
133
|
+
}
|
|
134
|
+
} else {
|
|
135
|
+
number.value--;
|
|
136
|
+
const errorMsg = getDeepValue(res, props.errorField) || "上传失败";
|
|
137
|
+
elementPlus.ElMessage.error(errorMsg);
|
|
138
|
+
imageUploadRef.value.handleRemove(file);
|
|
139
|
+
uploadedSuccessfully();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function handleRemove(file) {
|
|
144
|
+
const findex = fileList.value.findIndex(f => f.name === file.name);
|
|
145
|
+
if (findex > -1) {
|
|
146
|
+
fileList.value.splice(findex, 1);
|
|
147
|
+
emit(event.UPDATE_MODEL_EVENT, listToString(fileList.value));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function uploadedSuccessfully() {
|
|
152
|
+
if (number.value > 0 && uploadList.value.length === number.value) {
|
|
153
|
+
fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
|
|
154
|
+
uploadList.value = [];
|
|
155
|
+
number.value = 0;
|
|
156
|
+
emit(event.UPDATE_MODEL_EVENT, listToString(fileList.value));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function handleUploadError(msg) {
|
|
161
|
+
elementPlus.ElMessage.error(type.isString(msg) ? msg : "上传图片失败");
|
|
162
|
+
number.value--;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function handlePictureCardPreview(file) {
|
|
166
|
+
dialogImageUrl.value = file.url;
|
|
167
|
+
dialogVisible.value = true;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function getFileName(name) {
|
|
171
|
+
if (!type.isString(name)) return ""
|
|
172
|
+
return name.slice(name.lastIndexOf("/") + 1)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function listToString(list, separator = ",") {
|
|
176
|
+
return list
|
|
177
|
+
.filter(item => item.url && item.url.indexOf("blob:") !== 0)
|
|
178
|
+
.map(item => {
|
|
179
|
+
let url = item.url;
|
|
180
|
+
if (props.baseUrl && url.indexOf(props.baseUrl) === 0) {
|
|
181
|
+
url = url.replace(props.baseUrl, "");
|
|
182
|
+
}
|
|
183
|
+
return url
|
|
184
|
+
})
|
|
185
|
+
.join(separator)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return (_ctx, _cache) => {
|
|
189
|
+
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
190
|
+
const _component_el_upload = vue.resolveComponent("el-upload");
|
|
191
|
+
const _component_el_dialog = vue.resolveComponent("el-dialog");
|
|
192
|
+
|
|
193
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
194
|
+
vue.createVNode(_component_el_upload, {
|
|
195
|
+
ref_key: "imageUploadRef",
|
|
196
|
+
ref: imageUploadRef,
|
|
197
|
+
multiple: "",
|
|
198
|
+
action: __props.action,
|
|
199
|
+
"list-type": "picture-card",
|
|
200
|
+
"on-success": handleUploadSuccess,
|
|
201
|
+
"before-upload": handleBeforeUpload,
|
|
202
|
+
limit: __props.limit,
|
|
203
|
+
"on-error": handleUploadError,
|
|
204
|
+
"on-exceed": handleExceed,
|
|
205
|
+
"on-remove": handleRemove,
|
|
206
|
+
"show-file-list": true,
|
|
207
|
+
headers: __props.headers,
|
|
208
|
+
"file-list": fileList.value,
|
|
209
|
+
"on-preview": handlePictureCardPreview,
|
|
210
|
+
class: vue.normalizeClass({ hide: fileList.value.length >= __props.limit })
|
|
211
|
+
}, {
|
|
212
|
+
default: vue.withCtx(() => [
|
|
213
|
+
vue.createVNode(_component_el_icon, { class: "avatar-uploader-icon" }, {
|
|
214
|
+
default: vue.withCtx(() => [
|
|
215
|
+
vue.createVNode(vue.unref(iconsVue.Plus))
|
|
216
|
+
]),
|
|
217
|
+
_: 1 /* STABLE */
|
|
218
|
+
})
|
|
219
|
+
]),
|
|
220
|
+
_: 1 /* STABLE */
|
|
221
|
+
}, 8 /* PROPS */, ["action", "limit", "headers", "file-list", "class"]),
|
|
222
|
+
(showTip.value)
|
|
223
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
224
|
+
_cache[3] || (_cache[3] = vue.createTextVNode(" 请上传 ", -1 /* CACHED */)),
|
|
225
|
+
(__props.fileSize)
|
|
226
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
227
|
+
_cache[1] || (_cache[1] = vue.createTextVNode(" 大小不超过 ", -1 /* CACHED */)),
|
|
228
|
+
vue.createElementVNode("b", _hoisted_3, vue.toDisplayString(__props.fileSize) + "MB", 1 /* TEXT */)
|
|
229
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
230
|
+
: vue.createCommentVNode("v-if", true),
|
|
231
|
+
(__props.fileType)
|
|
232
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
233
|
+
_cache[2] || (_cache[2] = vue.createTextVNode(" 格式为 ", -1 /* CACHED */)),
|
|
234
|
+
vue.createElementVNode("b", _hoisted_4, vue.toDisplayString(__props.fileType.join("/")), 1 /* TEXT */)
|
|
235
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
236
|
+
: vue.createCommentVNode("v-if", true),
|
|
237
|
+
_cache[4] || (_cache[4] = vue.createTextVNode(" 的文件 ", -1 /* CACHED */))
|
|
238
|
+
]))
|
|
239
|
+
: vue.createCommentVNode("v-if", true),
|
|
240
|
+
vue.createVNode(_component_el_dialog, {
|
|
241
|
+
modelValue: dialogVisible.value,
|
|
242
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((dialogVisible).value = $event)),
|
|
243
|
+
title: "预览",
|
|
244
|
+
width: "800px",
|
|
245
|
+
"append-to-body": ""
|
|
246
|
+
}, {
|
|
247
|
+
default: vue.withCtx(() => [
|
|
248
|
+
vue.createElementVNode("img", {
|
|
249
|
+
src: dialogImageUrl.value,
|
|
250
|
+
style: {"display":"block","max-width":"100%","margin":"0 auto"}
|
|
251
|
+
}, null, 8 /* PROPS */, _hoisted_5)
|
|
252
|
+
]),
|
|
253
|
+
_: 1 /* STABLE */
|
|
254
|
+
}, 8 /* PROPS */, ["modelValue"])
|
|
255
|
+
]))
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
});
|
|
260
|
+
var ImageUpload = /*#__PURE__*/_pluginVue_exportHelper.default(_sfc_main, [['__scopeId',"data-v-9ac7dd1b"]]);
|
|
261
|
+
|
|
262
|
+
exports.default = ImageUpload;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styleInject_es = require('../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js');
|
|
4
|
+
|
|
5
|
+
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";
|
|
6
|
+
styleInject_es.default(css_248z);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var install = require('../../utils/vue/install.js');
|
|
6
|
+
var button = require('./src/button.vue.js');
|
|
7
|
+
|
|
8
|
+
// 用来整合组件的,最终实现导出组件
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// 通过 withInstall 方法给 button 添加了一个 Vue3 插件所需的 install 方法
|
|
12
|
+
const EasyButton = install.withInstall(button.default);
|
|
13
|
+
|
|
14
|
+
exports.EasyButton = EasyButton;
|
|
15
|
+
exports.default = EasyButton;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var elementPlus = require('element-plus');
|
|
7
|
+
var shared_esmBundler = require('../../../../node_modules/.pnpm/@vue_shared@3.5.27/node_modules/@vue/shared/dist/shared.esm-bundler.js');
|
|
8
|
+
var omit = require('../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omit.js');
|
|
9
|
+
|
|
10
|
+
const _sfc_main = /*@__PURE__*/Object.assign({
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
name: "EasyButton"
|
|
13
|
+
}, {
|
|
14
|
+
__name: 'button',
|
|
15
|
+
setup(__props) {
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
const loading = vue.ref(false);
|
|
20
|
+
|
|
21
|
+
const attrs = vue.useAttrs();
|
|
22
|
+
const onClick = async () => {
|
|
23
|
+
try {
|
|
24
|
+
loading.value = true;
|
|
25
|
+
|
|
26
|
+
if (shared_esmBundler.isFunction(attrs.onClick)) {
|
|
27
|
+
await attrs.onClick();
|
|
28
|
+
}
|
|
29
|
+
} finally {
|
|
30
|
+
loading.value = false;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElButton), vue.mergeProps({ loading: loading.value }, vue.unref(omit.default)(vue.unref(attrs), 'onClick'), { onClick: onClick }), {
|
|
36
|
+
default: vue.withCtx(() => [
|
|
37
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
38
|
+
]),
|
|
39
|
+
_: 3 /* FORWARDED */
|
|
40
|
+
}, 16 /* FULL_PROPS */, ["loading"]))
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
exports.default = _sfc_main;
|