hz-zhhq-web/node_modules/.cache/babel-loader/f129ab9f97d0bdbeb1c4e329346...

1 line
7.9 KiB
JSON

{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\src\\store\\modules\\tagsView.js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\store\\modules\\tagsView.js","mtime":1737610069397},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000}],"contextDependencies":[],"result":["import _toConsumableArray from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport _slicedToArray from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _createForOfIteratorHelper from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nvar state = {\n visitedViews: [],\n cachedViews: []\n};\nvar mutations = {\n ADD_VISITED_VIEW: function ADD_VISITED_VIEW(state, view) {\n if (state.visitedViews.some(function (v) {\n return v.path === view.path;\n })) return;\n state.visitedViews.push(Object.assign({}, view, {\n title: view.meta.title || 'no-name'\n }));\n },\n ADD_CACHED_VIEW: function ADD_CACHED_VIEW(state, view) {\n if (state.cachedViews.includes(view.name)) return;\n if (!view.meta.noCache) {\n state.cachedViews.push(view.name);\n }\n },\n DEL_VISITED_VIEW: function DEL_VISITED_VIEW(state, view) {\n var _iterator = _createForOfIteratorHelper(state.visitedViews.entries()),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n i = _step$value[0],\n v = _step$value[1];\n if (v.path === view.path) {\n state.visitedViews.splice(i, 1);\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n DEL_CACHED_VIEW: function DEL_CACHED_VIEW(state, view) {\n var _iterator2 = _createForOfIteratorHelper(state.cachedViews),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var i = _step2.value;\n if (i === view.name) {\n var index = state.cachedViews.indexOf(i);\n state.cachedViews.splice(index, 1);\n break;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n },\n DEL_OTHERS_VISITED_VIEWS: function DEL_OTHERS_VISITED_VIEWS(state, view) {\n state.visitedViews = state.visitedViews.filter(function (v) {\n return v.meta.affix || v.path === view.path;\n });\n },\n DEL_OTHERS_CACHED_VIEWS: function DEL_OTHERS_CACHED_VIEWS(state, view) {\n var _iterator3 = _createForOfIteratorHelper(state.cachedViews),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var i = _step3.value;\n if (i === view.name) {\n var index = state.cachedViews.indexOf(i);\n state.cachedViews = state.cachedViews.slice(index, index + 1);\n break;\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n },\n DEL_ALL_VISITED_VIEWS: function DEL_ALL_VISITED_VIEWS(state) {\n // keep affix tags\n var affixTags = state.visitedViews.filter(function (tag) {\n return tag.meta.affix;\n });\n state.visitedViews = affixTags;\n },\n DEL_ALL_CACHED_VIEWS: function DEL_ALL_CACHED_VIEWS(state) {\n state.cachedViews = [];\n },\n UPDATE_VISITED_VIEW: function UPDATE_VISITED_VIEW(state, view) {\n var _iterator4 = _createForOfIteratorHelper(state.visitedViews),\n _step4;\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var v = _step4.value;\n if (v.path === view.path) {\n v = Object.assign(v, view);\n break;\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n};\nvar actions = {\n addView: function addView(_ref, view) {\n var dispatch = _ref.dispatch;\n dispatch('addVisitedView', view);\n dispatch('addCachedView', view);\n },\n addVisitedView: function addVisitedView(_ref2, view) {\n var commit = _ref2.commit;\n commit('ADD_VISITED_VIEW', view);\n },\n addCachedView: function addCachedView(_ref3, view) {\n var commit = _ref3.commit;\n commit('ADD_CACHED_VIEW', view);\n },\n delView: function delView(_ref4, view) {\n var dispatch = _ref4.dispatch,\n state = _ref4.state;\n return new Promise(function (resolve) {\n dispatch('delVisitedView', view);\n dispatch('delCachedView', view);\n resolve({\n visitedViews: _toConsumableArray(state.visitedViews),\n cachedViews: _toConsumableArray(state.cachedViews)\n });\n });\n },\n delVisitedView: function delVisitedView(_ref5, view) {\n var commit = _ref5.commit,\n state = _ref5.state;\n return new Promise(function (resolve) {\n commit('DEL_VISITED_VIEW', view);\n resolve(_toConsumableArray(state.visitedViews));\n });\n },\n delCachedView: function delCachedView(_ref6, view) {\n var commit = _ref6.commit,\n state = _ref6.state;\n return new Promise(function (resolve) {\n commit('DEL_CACHED_VIEW', view);\n resolve(_toConsumableArray(state.cachedViews));\n });\n },\n delOthersViews: function delOthersViews(_ref7, view) {\n var dispatch = _ref7.dispatch,\n state = _ref7.state;\n return new Promise(function (resolve) {\n dispatch('delOthersVisitedViews', view);\n dispatch('delOthersCachedViews', view);\n resolve({\n visitedViews: _toConsumableArray(state.visitedViews),\n cachedViews: _toConsumableArray(state.cachedViews)\n });\n });\n },\n delOthersVisitedViews: function delOthersVisitedViews(_ref8, view) {\n var commit = _ref8.commit,\n state = _ref8.state;\n return new Promise(function (resolve) {\n commit('DEL_OTHERS_VISITED_VIEWS', view);\n resolve(_toConsumableArray(state.visitedViews));\n });\n },\n delOthersCachedViews: function delOthersCachedViews(_ref9, view) {\n var commit = _ref9.commit,\n state = _ref9.state;\n return new Promise(function (resolve) {\n commit('DEL_OTHERS_CACHED_VIEWS', view);\n resolve(_toConsumableArray(state.cachedViews));\n });\n },\n delAllViews: function delAllViews(_ref10, view) {\n var dispatch = _ref10.dispatch,\n state = _ref10.state;\n return new Promise(function (resolve) {\n dispatch('delAllVisitedViews', view);\n dispatch('delAllCachedViews', view);\n resolve({\n visitedViews: _toConsumableArray(state.visitedViews),\n cachedViews: _toConsumableArray(state.cachedViews)\n });\n });\n },\n delAllVisitedViews: function delAllVisitedViews(_ref11) {\n var commit = _ref11.commit,\n state = _ref11.state;\n return new Promise(function (resolve) {\n commit('DEL_ALL_VISITED_VIEWS');\n resolve(_toConsumableArray(state.visitedViews));\n });\n },\n delAllCachedViews: function delAllCachedViews(_ref12) {\n var commit = _ref12.commit,\n state = _ref12.state;\n return new Promise(function (resolve) {\n commit('DEL_ALL_CACHED_VIEWS');\n resolve(_toConsumableArray(state.cachedViews));\n });\n },\n updateVisitedView: function updateVisitedView(_ref13, view) {\n var commit = _ref13.commit;\n commit('UPDATE_VISITED_VIEW', view);\n }\n};\nexport default {\n namespaced: true,\n state: state,\n mutations: mutations,\n actions: actions\n};",null]}