travel/admin/node_modules/.cache/babel-loader/65a8568fea4d0af084ece489f2f...

1 line
6.9 KiB
JSON
Raw Normal View History

2024-06-24 11:28:18 +08:00
{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js!D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\store\\modules\\permission.js","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\store\\modules\\permission.js","mtime":1718070786031},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\babel.config.js","mtime":1718070785981},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js","mtime":1718764959024},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\eslint-loader\\index.js","mtime":1718764957746}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:aW1wb3J0IF9vYmplY3RTcHJlYWQgZnJvbSAiRDovcGhwc3R1ZHlfcHJvL1dXVy90cmF2ZWwvYWRtaW4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL29iamVjdFNwcmVhZDIuanMiOwppbXBvcnQgImNvcmUtanMvbW9kdWxlcy9lcy5hcnJheS5jb25jYXQuanMiOwppbXBvcnQgImNvcmUtanMvbW9kdWxlcy9lcy5hcnJheS5pbmNsdWRlcy5qcyI7CmltcG9ydCAiY29yZS1qcy9tb2R1bGVzL2VzLm9iamVjdC50by1zdHJpbmcuanMiOwppbXBvcnQgImNvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuaW5jbHVkZXMuanMiOwppbXBvcnQgImNvcmUtanMvbW9kdWxlcy93ZWIuZG9tLWNvbGxlY3Rpb25zLmZvci1lYWNoLmpzIjs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ICByb3V0ZXM6IFtdLAogIGFkZFJvdXRlczogW10KfTsKdmFyIG11dGF0aW9ucyA9IHsKICBTRVRfUk9VVEVTOiBmdW5jdGlvbiBTRVRfUk9VVEVTKHN0YXRlLCByb3V0ZXMpIHsKICAgIHN0YXRlLmFkZFJvdXRlcyA9IHJvdXRlczsKICAgIHN0YXRlLnJvdXRlcyA9IGNvbnN0YW50Um91dGVzLmNvbmNhdChyb3V0ZXMpOwogIH0KfTsKdmFyIGFjdGlvbnMgPSB7CiAgZ2VuZXJhdGVSb3V0ZXM6IGZ1bmN0aW9uIGdlbmVyYXRlUm91dGVzKF9yZWYsIHJvbGVzKSB7CiAgICB2YXIgY29tbWl0ID0gX3JlZi5jb21taXQ7CiAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUpIHsKICAgICAgdmFyIGFjY2Vzc2VkUm91dGVzOwogICAgICBpZiAocm9sZXMuaW5jbHVkZXMoJ2FkbWluJykpIHsKICAgICAgICBhY2Nlc3NlZFJvdXRlcyA9IGFzeW5jUm91dGVzIHx8IFtdOwogICAgICB9IGVsc2UgewogICAgICAgIGFjY2Vzc2VkUm91dGVzID0gZmlsdGVyQXN5bmNSb3V0ZXMoYXN5bmNSb3V0ZXMsIHJvbGVzKTsKICAgICAgfQogICAgICBjb21taXQoJ1NFVF9ST1VURVMnLCBhY2Nlc3NlZFJvdXRlcyk7CiAgICAgIHJlc29sdmUoYWNjZXNzZWRSb3V0ZXMpOwogICAgfSk7CiAgfQp9OwpleHBvcnQgZGVmYXVsdCB7CiAgbmFtZXNwYWNlZDogdHJ1ZSwKICBzdGF0ZTogc3RhdGUsCiAgbXV0YXRpb25zOiBtdXRhdGlvbnMsCiAgYWN0aW9uczogYWN0aW9ucwp9Ow=="},{"version":3,"names":["asyncRoutes","constantRoutes","hasPermission","roles","route","meta","some","role","includes","filterAsyncRoutes","routes","res","forEach","tmp","_objectSpread","children","push","state","addRoutes","mutations","SET_ROUTES","concat","actions","generateRoutes","_ref","commit","Promise","resolve","accessedRoutes","namespaced"],"sources":["D:/phpstudy_pro/WWW/travel/admin/src/store/modules/permission.js"],"sourcesContent":["import { asyncRoutes, constantRoutes } from '@/router'\r\n\r\n/**\r\n * Use meta.role to determine if the current user has permission\r\n * @param roles\r\n * @param route\r\n */\r\nfunction hasPermission(roles, route) {\r\n i