vue hello world项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
24 KiB

2 years ago
{"ast":null,"code":"require(\"core-js/modules/es.array.map.js\");\n\nrequire(\"core-js/modules/es.regexp.exec.js\");\n\nrequire(\"core-js/modules/es.string.split.js\");\n\nrequire(\"core-js/modules/es.number.constructor.js\");\n\nrequire(\"core-js/modules/es.array.splice.js\");\n\nrequire(\"core-js/modules/es.array.concat.js\");\n\nrequire(\"core-js/modules/es.object.to-string.js\");\n\nrequire(\"core-js/modules/web.dom-collections.for-each.js\");\n\nrequire(\"core-js/modules/es.array.slice.js\");\n\nrequire(\"core-js/modules/es.object.keys.js\");\n\nvar Vue; // late bind\n\nvar version;\nvar map = Object.create(null);\n\nif (typeof window !== 'undefined') {\n window.__VUE_HOT_MAP__ = map;\n}\n\nvar installed = false;\nvar isBrowserify = false;\nvar initHookName = 'beforeCreate';\n\nexports.install = function (vue, browserify) {\n if (installed) {\n return;\n }\n\n installed = true;\n Vue = vue.__esModule ? vue.default : vue;\n version = Vue.version.split('.').map(Number);\n isBrowserify = browserify; // compat with < 2.0.0-alpha.7\n\n if (Vue.config._lifecycleHooks.indexOf('init') > -1) {\n initHookName = 'init';\n }\n\n exports.compatible = version[0] >= 2;\n\n if (!exports.compatible) {\n console.warn('[HMR] You are using a version of vue-hot-reload-api that is ' + 'only compatible with Vue.js core ^2.0.0.');\n return;\n }\n};\n/**\n * Create a record for a hot module, which keeps track of its constructor\n * and instances\n *\n * @param {String} id\n * @param {Object} options\n */\n\n\nexports.createRecord = function (id, options) {\n if (map[id]) {\n return;\n }\n\n var Ctor = null;\n\n if (typeof options === 'function') {\n Ctor = options;\n options = Ctor.options;\n }\n\n makeOptionsHot(id, options);\n map[id] = {\n Ctor: Ctor,\n options: options,\n instances: []\n };\n};\n/**\n * Check if module is recorded\n *\n * @param {String} id\n */\n\n\nexports.isRecorded = function (id) {\n return typeof map[id] !== 'undefined';\n};\n/**\n * Make a Component options object hot.\n *\n * @param {String} id\n * @param {Object} options\n */\n\n\nfunction makeOptionsHot(id, options) {\n if (options.functional) {\n var render = options.render;\n\n options.render = function (h, ctx) {\n var instances = map[id].instances;\n\n if (ctx && instances.indexOf(ctx.parent) < 0) {\n instances.push(ctx.parent);\n }\n\n return render(h, ctx);\n };\n } else {\n injectHook(options, initHookName, function () {\n var record = map[id];\n\n if (!record.Ctor) {\n record.Ctor = this.constructor;\n }\n\n record.instances.push(this);\n });\n injectHook(options, 'beforeDestroy', function () {\n var instances = map[id].instances;\n instances.splice(instances.indexOf(this), 1);\n });\n }\n}\n/**\n * Inject a hook to a hot reloadable component so that\n * we can keep track of it.\n *\n * @param {Object} options\n * @param {String} name\n * @param {Function} hook\n */\n\n\nfunction injectHook(options, name, hook) {\n var existing = options[name];\n options[name] = existing ? Array.isArray(existing) ? existing.concat(hook) : [existing, hook] : [hook];\n}\n\nfunction tryWrap(fn) {\n return function (id, arg) {\n try {\n fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn('Something went wrong during Vue component hot-reload. Full reload required.');\n }\n };\n}\n\nfunction updateOptions(oldOptions, newOptions) {\n for (var key in oldOptions) {\n if (!(key in newOptions)) {\n delete oldOptions[key];\n }\n }\n\n for (var key$1 in newOptions) {\n oldOptions[key$1] = newOptions[key$1];\n }\n}\n\nexports.rerender = tryWrap(function (id, options) {\n var record = map[id];\n\n if (!options) {\n record.instances.slice().forEach(function (instance) {\n instance.$forceUpdate();\n });\n return;\n }\n\n if (typeof options === 'function') {\n options = options.options;\n }\n\n if (record.Ctor) {\n record.Ctor.options.render = options.render;\n re