{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///vue-enum.js","webpack:///webpack/bootstrap 6f25feef1a3bc5d47926","webpack:///./src/lib/index.js"],"names":["root","factory","exports","module","define","amd","self","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","value","Constant","install","Vue","options","console","log","constantInfo","enumInfo","Enum","getDescByValue","constantName","constantItem","item","desc","getValueDescList","result","push","getValueDesc","$enum"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,KACC,mBAAAK,WAAAC,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAR,OAGA,IAAAC,GAAAQ,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAX,WAUA,OANAM,GAAAE,GAAAI,KAAAX,EAAAD,QAAAC,IAAAD,QAAAO,GAGAN,EAAAU,GAAA,EAGAV,EAAAD,QAvBA,GAAAS,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAf,EAAAgB,EAAAC,GACAV,EAAAW,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB,EAAAgB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAAvB,GACA,GAAAgB,GAAAhB,KAAAwB,WACA,WAA2B,MAAAxB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAM,GAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDpB,EAAAuB,EAAA,SAGAvB,IAAAwB,EAAA,KDgBM,SAAU9B,EAAQ+B,EAAqBzB,GAE7C,YE/EAY,QAAAC,eAAAY,EAAA,cAAAC,OAAA,OAAMC,KAENA,GAASC,QAAU,SAAUC,EAAKC,GAChCC,QAAQC,IAAIF,EAOZ,IAAMG,GAAaH,EAAQI,aACrBC,IACNA,GAAKC,eAAiB,SAAUC,EAAcX,GAC5C,IAAKO,EAAaX,eAAee,GAC/B,MAAO,EAET,IAAIC,GAAeL,EAAaI,EAChC,KAAK,GAAIE,KAAQD,GACf,GAAIA,EAAaC,GAAMb,QAAUA,EAC/B,MAAOY,GAAaC,GAAMC,MAShCL,EAAKM,iBAAmB,SAAUJ,GAChC,IAAKJ,EAAaX,eAAee,GAC/B,QAEF,IAAMK,MACFJ,EAAeL,EAAaI,EAChC,KAAK,GAAIE,KAAQD,GAAc,CAC7B,GAAIZ,GAAQY,EAAaC,GAAMb,MAC3Bc,EAAOF,EAAaC,GAAMC,IAC9BE,GAAOC,MACLjB,QACAc,SAGJ,MAAOE,IAQTP,EAAKS,aAAe,SAAUP,GAC5B,IAAKJ,EAAaX,eAAee,GAC/B,QAEF,IAAMK,MACFJ,EAAeL,EAAaI,EAChC,KAAK,GAAIE,KAAQD,GACfI,EAAOJ,EAAaC,GAAMb,OAASY,EAAaC,GAAMC,IAExD,OAAOE,IAETb,EAAIR,UAAUwB,MAAQV,GAGTR","file":"vue-enum.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"vueEnum\"] = factory();\n\telse\n\t\troot[\"vueEnum\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"vueEnum\"] = factory();\n\telse\n\t\troot[\"vueEnum\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\nvar Constant = {};\n\nConstant.install = function (Vue, options) {\n console.log(options);\n /**\r\n * 根据枚举值获取描述\r\n * @param {*} constantName 枚举名\r\n * @param {*} value 枚举值\r\n * @returns\r\n */\n var constantInfo = options.enumInfo || {};\n var Enum = {};\n Enum.getDescByValue = function (constantName, value) {\n if (!constantInfo.hasOwnProperty(constantName)) {\n return '';\n }\n var constantItem = constantInfo[constantName];\n for (var item in constantItem) {\n if (constantItem[item].value === value) {\n return constantItem[item].desc;\n }\n }\n };\n /**\r\n * 根据枚举名获取对应的描述键值对[{value:desc}]\r\n * @param {*} constantName 枚举名\r\n * @returns\r\n */\n Enum.getValueDescList = function (constantName) {\n if (!constantInfo.hasOwnProperty(constantName)) {\n return [];\n }\n var result = [];\n var constantItem = constantInfo[constantName];\n for (var item in constantItem) {\n var value = constantItem[item].value;\n var desc = constantItem[item].desc;\n result.push({\n value: value,\n desc: desc\n });\n }\n return result;\n };\n\n /**\r\n * 根据枚举名获取对应的value描述键值对{value:desc}\r\n * @param {*} constantName 枚举名\r\n * @returns\r\n */\n Enum.getValueDesc = function (constantName) {\n if (!constantInfo.hasOwnProperty(constantName)) {\n return {};\n }\n var result = {};\n var constantItem = constantInfo[constantName];\n for (var item in constantItem) {\n result[constantItem[item].value] = constantItem[item].desc;\n }\n return result;\n };\n Vue.prototype.$enum = Enum;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Constant);\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// vue-enum.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6f25feef1a3bc5d47926","const Constant={} \r\n\r\nConstant.install = function (Vue, options) {\r\n console.log(options)\r\n /**\r\n * 根据枚举值获取描述\r\n * @param {*} constantName 枚举名\r\n * @param {*} value 枚举值\r\n * @returns\r\n */\r\n const constantInfo=options.enumInfo||{}\r\n const Enum = {}\r\n Enum.getDescByValue = function (constantName, value) {\r\n if (!constantInfo.hasOwnProperty(constantName)) {\r\n return ''\r\n }\r\n let constantItem = constantInfo[constantName]\r\n for (let item in constantItem) {\r\n if (constantItem[item].value === value) {\r\n return constantItem[item].desc\r\n }\r\n }\r\n }\r\n /**\r\n * 根据枚举名获取对应的描述键值对[{value:desc}]\r\n * @param {*} constantName 枚举名\r\n * @returns\r\n */\r\n Enum.getValueDescList = function (constantName) {\r\n if (!constantInfo.hasOwnProperty(constantName)) {\r\n return []\r\n }\r\n const result = []\r\n let constantItem = constantInfo[constantName]\r\n for (let item in constantItem) {\r\n let value = constantItem[item].value\r\n let desc = constantItem[item].desc\r\n result.push({\r\n value,\r\n desc\r\n })\r\n }\r\n return result\r\n }\r\n\r\n /**\r\n * 根据枚举名获取对应的value描述键值对{value:desc}\r\n * @param {*} constantName 枚举名\r\n * @returns\r\n */\r\n Enum.getValueDesc = function (constantName) {\r\n if (!constantInfo.hasOwnProperty(constantName)) {\r\n return {}\r\n }\r\n const result = {}\r\n let constantItem = constantInfo[constantName]\r\n for (let item in constantItem) {\r\n result[constantItem[item].value] = constantItem[item].desc\r\n }\r\n return result\r\n }\r\n Vue.prototype.$enum = Enum\r\n}\r\n\r\nexport default Constant\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/index.js"],"sourceRoot":""}