Files
ZERO_CODE/ZeroCodeProject/main/client/node_modules/.cache/babel-loader/d29a1859f592560845a21d35009e12ca139e65360bdb505f2c40b3eba42b912a.json

1 line
236 KiB
JSON
Raw Normal View History

2026-01-11 00:11:34 +08:00
{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\n/*!\n * vue-router v3.2.0\n * (c) 2020 Evan You\n * @license MIT\n */\n/* */\n\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(\"[vue-router] \" + message);\n }\n}\nfunction warn(condition, message) {\n if (process.env.NODE_ENV !== 'production' && !condition) {\n typeof console !== 'undefined' && console.warn(\"[vue-router] \" + message);\n }\n}\nfunction isError(err) {\n return Object.prototype.toString.call(err).indexOf('Error') > -1;\n}\nfunction isExtendedError(constructor, err) {\n return err instanceof constructor ||\n // _name is to support IE9 too\n err && (err.name === constructor.name || err._name === constructor._name);\n}\nfunction extend(a, b) {\n for (var key in b) {\n a[key] = b[key];\n }\n return a;\n}\nvar View = {\n name: 'RouterView',\n functional: true,\n props: {\n name: {\n type: String,\n default: 'default'\n }\n },\n render: function render(_, ref) {\n var props = ref.props;\n var children = ref.children;\n var parent = ref.parent;\n var data = ref.data;\n\n // used by devtools to display a router-view badge\n data.routerView = true;\n\n // directly use parent context's createElement() function\n // so that components rendered by router-view can resolve named slots\n var h = parent.$createElement;\n var name = props.name;\n var route = parent.$route;\n var cache = parent._routerViewCache || (parent._routerViewCache = {});\n\n // determine current view depth, also check to see if the tree\n // has been toggled inactive but kept-alive.\n var depth = 0;\n var inactive = false;\n while (parent && parent._routerRoot !== parent) {\n var vnodeData = parent.$vnode ? parent.$vnode.data : {};\n if (vnodeData.routerView) {\n depth++;\n }\n if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {\n inactive = true;\n }\n parent = parent.$parent;\n }\n data.routerViewDepth = depth;\n\n // render previous view if the tree is inactive and kept-alive\n if (inactive) {\n var cachedData = cache[name];\n var cachedComponent = cachedData && cachedData.component;\n if (cachedComponent) {\n // #2301\n // pass props\n if (cachedData.configProps) {\n fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);\n }\n return h(cachedComponent, data, children);\n } else {\n // render previous empty view\n return h();\n }\n }\n var matched = route.matched[depth];\n var component = matched && matched.components[name];\n\n // render empty node if no matched route or no config component\n if (!matched || !component) {\n cache[name] = null;\n return h();\n }\n\n // cache component\n cache[name] = {\n component: component\n };\n\n // attach instance registration hook\n // this will be called in the instance's injected lifecycle hooks\n data.registerRouteInstance = function (vm, val) {\n // val could be undefined for unregistration\n var current = matched.instances[name];\n if (val && current !== vm || !val && current === vm) {\n matched.instances[name] = val;\n }\n }\n\n // also register instance in prepatch hook\n // in case the same component instance is reused across different routes\n ;\n (data.hook || (data.hook = {})).prepatch = function (_, vnode) {\n matched.instances[name] = vnode.componentInstance;\n };\n\n // register instance in init hook\n // in case kept-alive component be actived when routes changed\n data.hook.init = function (vnode) {\n if (vnode.data.keepAlive && vnode.componentInstance && vnode.componentInstance !== matched.instances[name]) {\n matched.instances[name] = vnode.componentInstance;\n }\n };\n var configProps = matched.props && matched.props[name];\n // save route and configProps in cachce\n if (confi