http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43564f3b/android/playground/app/src/main/assets/vue-web/vue/style/style-item.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/style/style-item.js b/android/playground/app/src/main/assets/vue-web/vue/style/style-item.js deleted file mode 100644 index eb1e39d..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/style/style-item.js +++ /dev/null @@ -1,607 +0,0 @@ -// NOTE: for vue2.0 and platform:web only. - -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - - var App = __webpack_require__(297) - App.el = '#root' - new Vue(App) - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - */ - // css base code, injected by the css-loader - module.exports = function() { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - var result = []; - for(var i = 0; i < this.length; i++) { - var item = this[i]; - if(item[2]) { - result.push("@media " + item[2] + "{" + item[1] + "}"); - } else { - result.push(item[1]); - } - } - return result.join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; - }; - - -/***/ }), - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - Modified by Evan You @yyx990803 - */ - - var hasDocument = typeof document !== 'undefined' - - if (false) { - if (!hasDocument) { - throw new Error( - 'vue-style-loader cannot be used in a non-browser environment. ' + - "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." - ) } - } - - var listToStyles = __webpack_require__(6) - - /* - type StyleObject = { - id: number; - parts: Array<StyleObjectPart> - } - - type StyleObjectPart = { - css: string; - media: string; - sourceMap: ?string - } - */ - - var stylesInDom = {/* - [id: number]: { - id: number, - refs: number, - parts: Array<(obj?: StyleObjectPart) => void> - } - */} - - var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) - var singletonElement = null - var singletonCounter = 0 - var isProduction = false - var noop = function () {} - - // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> - // tags it will allow on a page - var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) - - module.exports = function (parentId, list, _isProduction) { - isProduction = _isProduction - - var styles = listToStyles(parentId, list) - addStylesToDom(styles) - - return function update (newList) { - var mayRemove = [] - for (var i = 0; i < styles.length; i++) { - var item = styles[i] - var domStyle = stylesInDom[item.id] - domStyle.refs-- - mayRemove.push(domStyle) - } - if (newList) { - styles = listToStyles(parentId, newList) - addStylesToDom(styles) - } else { - styles = [] - } - for (var i = 0; i < mayRemove.length; i++) { - var domStyle = mayRemove[i] - if (domStyle.refs === 0) { - for (var j = 0; j < domStyle.parts.length; j++) { - domStyle.parts[j]() - } - delete stylesInDom[domStyle.id] - } - } - } - } - - function addStylesToDom (styles /* Array<StyleObject> */) { - for (var i = 0; i < styles.length; i++) { - var item = styles[i] - var domStyle = stylesInDom[item.id] - if (domStyle) { - domStyle.refs++ - for (var j = 0; j < domStyle.parts.length; j++) { - domStyle.parts[j](item.parts[j]) - } - for (; j < item.parts.length; j++) { - domStyle.parts.push(addStyle(item.parts[j])) - } - if (domStyle.parts.length > item.parts.length) { - domStyle.parts.length = item.parts.length - } - } else { - var parts = [] - for (var j = 0; j < item.parts.length; j++) { - parts.push(addStyle(item.parts[j])) - } - stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } - } - } - } - - function createStyleElement () { - var styleElement = document.createElement('style') - styleElement.type = 'text/css' - head.appendChild(styleElement) - return styleElement - } - - function addStyle (obj /* StyleObjectPart */) { - var update, remove - var styleElement = document.querySelector('style[data-vue-ssr-id~="' + obj.id + '"]') - - if (styleElement) { - if (isProduction) { - // has SSR styles and in production mode. - // simply do nothing. - return noop - } else { - // has SSR styles but in dev mode. - // for some reason Chrome can't handle source map in server-rendered - // style tags - source maps in <style> only works if the style tag is - // created and inserted dynamically. So we remove the server rendered - // styles and inject new ones. - styleElement.parentNode.removeChild(styleElement) - } - } - - if (isOldIE) { - // use singleton mode for IE9. - var styleIndex = singletonCounter++ - styleElement = singletonElement || (singletonElement = createStyleElement()) - update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) - remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) - } else { - // use multi-style-tag mode in all other cases - styleElement = createStyleElement() - update = applyToTag.bind(null, styleElement) - remove = function () { - styleElement.parentNode.removeChild(styleElement) - } - } - - update(obj) - - return function updateStyle (newObj /* StyleObjectPart */) { - if (newObj) { - if (newObj.css === obj.css && - newObj.media === obj.media && - newObj.sourceMap === obj.sourceMap) { - return - } - update(obj = newObj) - } else { - remove() - } - } - } - - var replaceText = (function () { - var textStore = [] - - return function (index, replacement) { - textStore[index] = replacement - return textStore.filter(Boolean).join('\n') - } - })() - - function applyToSingletonTag (styleElement, index, remove, obj) { - var css = remove ? '' : obj.css - - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = replaceText(index, css) - } else { - var cssNode = document.createTextNode(css) - var childNodes = styleElement.childNodes - if (childNodes[index]) styleElement.removeChild(childNodes[index]) - if (childNodes.length) { - styleElement.insertBefore(cssNode, childNodes[index]) - } else { - styleElement.appendChild(cssNode) - } - } - } - - function applyToTag (styleElement, obj) { - var css = obj.css - var media = obj.media - var sourceMap = obj.sourceMap - - if (media) { - styleElement.setAttribute('media', media) - } - - if (sourceMap) { - // https://developer.chrome.com/devtools/docs/javascript-debugging - // this makes source maps inside style tags work properly in Chrome - css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' - // http://stackoverflow.com/a/26603875 - css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' - } - - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = css - } else { - while (styleElement.firstChild) { - styleElement.removeChild(styleElement.firstChild) - } - styleElement.appendChild(document.createTextNode(css)) - } - } - - -/***/ }), - -/***/ 6: -/***/ (function(module, exports) { - - /** - * Translates the list format produced by css-loader into something - * easier to manipulate. - */ - module.exports = function listToStyles (parentId, list) { - var styles = [] - var newStyles = {} - for (var i = 0; i < list.length; i++) { - var item = list[i] - var id = item[0] - var css = item[1] - var media = item[2] - var sourceMap = item[3] - var part = { - id: parentId + ':' + i, - css: css, - media: media, - sourceMap: sourceMap - } - if (!newStyles[id]) { - styles.push(newStyles[id] = { id: id, parts: [part] }) - } else { - newStyles[id].parts.push(part) - } - } - return styles - } - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports) { - - /* globals __VUE_SSR_CONTEXT__ */ - - // this module is a runtime utility for cleaner component module output and will - // be included in the final webpack user bundle - - module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ - ) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } - } - - -/***/ }), - -/***/ 297: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(298) - } - var Component = __webpack_require__(7)( - /* script */ - __webpack_require__(300), - /* template */ - __webpack_require__(301), - /* styles */ - injectStyle, - /* scopeId */ - "data-v-d7c66270", - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/style/style-item.vue" - if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")} - if (Component.options.functional) {console.error("[vue-loader] style-item.vue: functional components are not supported with templates, they should use render functions.")} - - /* hot reload */ - if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-d7c66270", Component.options) - } else { - hotAPI.reload("data-v-d7c66270", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 298: -/***/ (function(module, exports, __webpack_require__) { - - // style-loader: Adds some css to the DOM by adding a <style> tag - - // load the styles - var content = __webpack_require__(299); - if(typeof content === 'string') content = [[module.id, content, '']]; - if(content.locals) module.exports = content.locals; - // add the styles to the DOM - var update = __webpack_require__(5)("189a7392", content, false); - // Hot Module Replacement - if(false) { - // When the styles change, update the <style> tags - if(!content.locals) { - module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-d7c66270\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./style-item.vue", function() { - var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-d7c66270\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./style-item.vue"); - if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; - update(newContent); - }); - } - // When the module is disposed, remove the <style> tags - module.hot.dispose(function() { update(); }); - } - -/***/ }), - -/***/ 299: -/***/ (function(module, exports, __webpack_require__) { - - exports = module.exports = __webpack_require__(4)(); - // imports - - - // module - exports.push([module.id, "\n.item[data-v-d7c66270] {\n margin-right: 10px;\n /*margin-bottom: 10px;*/\n width: 160px;\n height: 75px;\n padding-left: 8px;\n padding-right: 8px;\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.txt[data-v-d7c66270] {\n color: #eee;\n}\n", ""]); - - // exports - - -/***/ }), - -/***/ 300: -/***/ (function(module, exports) { - - 'use strict'; - - // - // - // - // - // - // - // - - module.exports = { - props: { - value: { default: '' }, - type: { default: '0' // 0, 1 - } }, - computed: { - bgColor: function bgColor() { - return this.type == '1' ? '#7BA3A8' : '#BEAD92'; - } - } - }; - -/***/ }), - -/***/ 301: -/***/ (function(module, exports, __webpack_require__) { - - module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('text', { - staticClass: "item txt", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle({ - backgroundColor: _vm.bgColor - })), - attrs: { - "value": _vm.value - } - }) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-d7c66270", module.exports) - } - } - -/***/ }) - -/******/ }); \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43564f3b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-1.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-1.js b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-1.js deleted file mode 100644 index 05e2c43..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-1.js +++ /dev/null @@ -1,212 +0,0 @@ -// NOTE: for vue2.0 and platform:web only. - -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - - var App = __webpack_require__(314) - App.el = '#root' - new Vue(App) - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports) { - - /* globals __VUE_SSR_CONTEXT__ */ - - // this module is a runtime utility for cleaner component module output and will - // be included in the final webpack user bundle - - module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ - ) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } - } - - -/***/ }), - -/***/ 314: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - var Component = __webpack_require__(7)( - /* script */ - null, - /* template */ - __webpack_require__(315), - /* styles */ - null, - /* scopeId */ - null, - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/syntax/hello-world-1.vue" - if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")} - if (Component.options.functional) {console.error("[vue-loader] hello-world-1.vue: functional components are not supported with templates, they should use render functions.")} - - /* hot reload */ - if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-006d4dec", Component.options) - } else { - hotAPI.reload("data-v-006d4dec", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 315: -/***/ (function(module, exports, __webpack_require__) { - - module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('div', [_c('text', [_vm._v("Hello World")])]) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-006d4dec", module.exports) - } - } - -/***/ }) - -/******/ }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43564f3b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-2.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-2.js b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-2.js deleted file mode 100644 index 2c345b9..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-2.js +++ /dev/null @@ -1,232 +0,0 @@ -// NOTE: for vue2.0 and platform:web only. - -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - - var App = __webpack_require__(316) - App.el = '#root' - new Vue(App) - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports) { - - /* globals __VUE_SSR_CONTEXT__ */ - - // this module is a runtime utility for cleaner component module output and will - // be included in the final webpack user bundle - - module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ - ) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } - } - - -/***/ }), - -/***/ 316: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - var Component = __webpack_require__(7)( - /* script */ - null, - /* template */ - __webpack_require__(317), - /* styles */ - null, - /* scopeId */ - null, - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/syntax/hello-world-2.vue" - if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")} - if (Component.options.functional) {console.error("[vue-loader] hello-world-2.vue: functional components are not supported with templates, they should use render functions.")} - - /* hot reload */ - if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-00511eea", Component.options) - } else { - hotAPI.reload("data-v-00511eea", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 317: -/***/ (function(module, exports, __webpack_require__) { - - module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('div', { - staticStyle: _vm.$processStyle({ - "align-items": "center", - "margin-top": "120px" - }), - style: (_vm.$processStyle(undefined)) - }, [_c('image', { - staticStyle: _vm.$processStyle({ - "width": "360px", - "height": "82px" - }), - style: (_vm.$processStyle(undefined)), - attrs: { - "src": "https://alibaba.github.io/weex/img/[email protected]" - } - }), _vm._v(" "), _c('text', { - staticStyle: _vm.$processStyle({ - "font-size": "48px" - }), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello World")])]) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-00511eea", module.exports) - } - } - -/***/ }) - -/******/ }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43564f3b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-3.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-3.js b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-3.js deleted file mode 100644 index 2fb50a5..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-3.js +++ /dev/null @@ -1,586 +0,0 @@ -// NOTE: for vue2.0 and platform:web only. - -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - - var App = __webpack_require__(318) - App.el = '#root' - new Vue(App) - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - */ - // css base code, injected by the css-loader - module.exports = function() { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - var result = []; - for(var i = 0; i < this.length; i++) { - var item = this[i]; - if(item[2]) { - result.push("@media " + item[2] + "{" + item[1] + "}"); - } else { - result.push(item[1]); - } - } - return result.join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; - }; - - -/***/ }), - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - Modified by Evan You @yyx990803 - */ - - var hasDocument = typeof document !== 'undefined' - - if (false) { - if (!hasDocument) { - throw new Error( - 'vue-style-loader cannot be used in a non-browser environment. ' + - "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." - ) } - } - - var listToStyles = __webpack_require__(6) - - /* - type StyleObject = { - id: number; - parts: Array<StyleObjectPart> - } - - type StyleObjectPart = { - css: string; - media: string; - sourceMap: ?string - } - */ - - var stylesInDom = {/* - [id: number]: { - id: number, - refs: number, - parts: Array<(obj?: StyleObjectPart) => void> - } - */} - - var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) - var singletonElement = null - var singletonCounter = 0 - var isProduction = false - var noop = function () {} - - // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> - // tags it will allow on a page - var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) - - module.exports = function (parentId, list, _isProduction) { - isProduction = _isProduction - - var styles = listToStyles(parentId, list) - addStylesToDom(styles) - - return function update (newList) { - var mayRemove = [] - for (var i = 0; i < styles.length; i++) { - var item = styles[i] - var domStyle = stylesInDom[item.id] - domStyle.refs-- - mayRemove.push(domStyle) - } - if (newList) { - styles = listToStyles(parentId, newList) - addStylesToDom(styles) - } else { - styles = [] - } - for (var i = 0; i < mayRemove.length; i++) { - var domStyle = mayRemove[i] - if (domStyle.refs === 0) { - for (var j = 0; j < domStyle.parts.length; j++) { - domStyle.parts[j]() - } - delete stylesInDom[domStyle.id] - } - } - } - } - - function addStylesToDom (styles /* Array<StyleObject> */) { - for (var i = 0; i < styles.length; i++) { - var item = styles[i] - var domStyle = stylesInDom[item.id] - if (domStyle) { - domStyle.refs++ - for (var j = 0; j < domStyle.parts.length; j++) { - domStyle.parts[j](item.parts[j]) - } - for (; j < item.parts.length; j++) { - domStyle.parts.push(addStyle(item.parts[j])) - } - if (domStyle.parts.length > item.parts.length) { - domStyle.parts.length = item.parts.length - } - } else { - var parts = [] - for (var j = 0; j < item.parts.length; j++) { - parts.push(addStyle(item.parts[j])) - } - stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } - } - } - } - - function createStyleElement () { - var styleElement = document.createElement('style') - styleElement.type = 'text/css' - head.appendChild(styleElement) - return styleElement - } - - function addStyle (obj /* StyleObjectPart */) { - var update, remove - var styleElement = document.querySelector('style[data-vue-ssr-id~="' + obj.id + '"]') - - if (styleElement) { - if (isProduction) { - // has SSR styles and in production mode. - // simply do nothing. - return noop - } else { - // has SSR styles but in dev mode. - // for some reason Chrome can't handle source map in server-rendered - // style tags - source maps in <style> only works if the style tag is - // created and inserted dynamically. So we remove the server rendered - // styles and inject new ones. - styleElement.parentNode.removeChild(styleElement) - } - } - - if (isOldIE) { - // use singleton mode for IE9. - var styleIndex = singletonCounter++ - styleElement = singletonElement || (singletonElement = createStyleElement()) - update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) - remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) - } else { - // use multi-style-tag mode in all other cases - styleElement = createStyleElement() - update = applyToTag.bind(null, styleElement) - remove = function () { - styleElement.parentNode.removeChild(styleElement) - } - } - - update(obj) - - return function updateStyle (newObj /* StyleObjectPart */) { - if (newObj) { - if (newObj.css === obj.css && - newObj.media === obj.media && - newObj.sourceMap === obj.sourceMap) { - return - } - update(obj = newObj) - } else { - remove() - } - } - } - - var replaceText = (function () { - var textStore = [] - - return function (index, replacement) { - textStore[index] = replacement - return textStore.filter(Boolean).join('\n') - } - })() - - function applyToSingletonTag (styleElement, index, remove, obj) { - var css = remove ? '' : obj.css - - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = replaceText(index, css) - } else { - var cssNode = document.createTextNode(css) - var childNodes = styleElement.childNodes - if (childNodes[index]) styleElement.removeChild(childNodes[index]) - if (childNodes.length) { - styleElement.insertBefore(cssNode, childNodes[index]) - } else { - styleElement.appendChild(cssNode) - } - } - } - - function applyToTag (styleElement, obj) { - var css = obj.css - var media = obj.media - var sourceMap = obj.sourceMap - - if (media) { - styleElement.setAttribute('media', media) - } - - if (sourceMap) { - // https://developer.chrome.com/devtools/docs/javascript-debugging - // this makes source maps inside style tags work properly in Chrome - css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' - // http://stackoverflow.com/a/26603875 - css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' - } - - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = css - } else { - while (styleElement.firstChild) { - styleElement.removeChild(styleElement.firstChild) - } - styleElement.appendChild(document.createTextNode(css)) - } - } - - -/***/ }), - -/***/ 6: -/***/ (function(module, exports) { - - /** - * Translates the list format produced by css-loader into something - * easier to manipulate. - */ - module.exports = function listToStyles (parentId, list) { - var styles = [] - var newStyles = {} - for (var i = 0; i < list.length; i++) { - var item = list[i] - var id = item[0] - var css = item[1] - var media = item[2] - var sourceMap = item[3] - var part = { - id: parentId + ':' + i, - css: css, - media: media, - sourceMap: sourceMap - } - if (!newStyles[id]) { - styles.push(newStyles[id] = { id: id, parts: [part] }) - } else { - newStyles[id].parts.push(part) - } - } - return styles - } - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports) { - - /* globals __VUE_SSR_CONTEXT__ */ - - // this module is a runtime utility for cleaner component module output and will - // be included in the final webpack user bundle - - module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ - ) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } - } - - -/***/ }), - -/***/ 318: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(319) - } - var Component = __webpack_require__(7)( - /* script */ - null, - /* template */ - __webpack_require__(321), - /* styles */ - injectStyle, - /* scopeId */ - "data-v-0034efe8", - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/syntax/hello-world-3.vue" - if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")} - if (Component.options.functional) {console.error("[vue-loader] hello-world-3.vue: functional components are not supported with templates, they should use render functions.")} - - /* hot reload */ - if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-0034efe8", Component.options) - } else { - hotAPI.reload("data-v-0034efe8", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 319: -/***/ (function(module, exports, __webpack_require__) { - - // style-loader: Adds some css to the DOM by adding a <style> tag - - // load the styles - var content = __webpack_require__(320); - if(typeof content === 'string') content = [[module.id, content, '']]; - if(content.locals) module.exports = content.locals; - // add the styles to the DOM - var update = __webpack_require__(5)("ed29fc52", content, false); - // Hot Module Replacement - if(false) { - // When the styles change, update the <style> tags - if(!content.locals) { - module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0034efe8\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./hello-world-3.vue", function() { - var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0034efe8\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./hello-world-3.vue"); - if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; - update(newContent); - }); - } - // When the module is disposed, remove the <style> tags - module.hot.dispose(function() { update(); }); - } - -/***/ }), - -/***/ 320: -/***/ (function(module, exports, __webpack_require__) { - - exports = module.exports = __webpack_require__(4)(); - // imports - - - // module - exports.push([module.id, "\n.wrapper[data-v-0034efe8] {align-items: center; margin-top: 120px;\n}\n.title[data-v-0034efe8] {font-size: 48px;\n}\n.logo[data-v-0034efe8] {width: 360px; height: 82px;\n}\n", ""]); - - // exports - - -/***/ }), - -/***/ 321: -/***/ (function(module, exports, __webpack_require__) { - - module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('div', { - staticClass: "wrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('image', { - staticClass: "logo", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - attrs: { - "src": "https://alibaba.github.io/weex/img/[email protected]" - } - }), _vm._v(" "), _c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello World")])]) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-0034efe8", module.exports) - } - } - -/***/ }) - -/******/ }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43564f3b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-4.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-4.js b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-4.js deleted file mode 100644 index e919216..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-4.js +++ /dev/null @@ -1,625 +0,0 @@ -// NOTE: for vue2.0 and platform:web only. - -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - - var App = __webpack_require__(322) - App.el = '#root' - new Vue(App) - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - */ - // css base code, injected by the css-loader - module.exports = function() { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - var result = []; - for(var i = 0; i < this.length; i++) { - var item = this[i]; - if(item[2]) { - result.push("@media " + item[2] + "{" + item[1] + "}"); - } else { - result.push(item[1]); - } - } - return result.join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; - }; - - -/***/ }), - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - Modified by Evan You @yyx990803 - */ - - var hasDocument = typeof document !== 'undefined' - - if (false) { - if (!hasDocument) { - throw new Error( - 'vue-style-loader cannot be used in a non-browser environment. ' + - "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." - ) } - } - - var listToStyles = __webpack_require__(6) - - /* - type StyleObject = { - id: number; - parts: Array<StyleObjectPart> - } - - type StyleObjectPart = { - css: string; - media: string; - sourceMap: ?string - } - */ - - var stylesInDom = {/* - [id: number]: { - id: number, - refs: number, - parts: Array<(obj?: StyleObjectPart) => void> - } - */} - - var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) - var singletonElement = null - var singletonCounter = 0 - var isProduction = false - var noop = function () {} - - // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> - // tags it will allow on a page - var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) - - module.exports = function (parentId, list, _isProduction) { - isProduction = _isProduction - - var styles = listToStyles(parentId, list) - addStylesToDom(styles) - - return function update (newList) { - var mayRemove = [] - for (var i = 0; i < styles.length; i++) { - var item = styles[i] - var domStyle = stylesInDom[item.id] - domStyle.refs-- - mayRemove.push(domStyle) - } - if (newList) { - styles = listToStyles(parentId, newList) - addStylesToDom(styles) - } else { - styles = [] - } - for (var i = 0; i < mayRemove.length; i++) { - var domStyle = mayRemove[i] - if (domStyle.refs === 0) { - for (var j = 0; j < domStyle.parts.length; j++) { - domStyle.parts[j]() - } - delete stylesInDom[domStyle.id] - } - } - } - } - - function addStylesToDom (styles /* Array<StyleObject> */) { - for (var i = 0; i < styles.length; i++) { - var item = styles[i] - var domStyle = stylesInDom[item.id] - if (domStyle) { - domStyle.refs++ - for (var j = 0; j < domStyle.parts.length; j++) { - domStyle.parts[j](item.parts[j]) - } - for (; j < item.parts.length; j++) { - domStyle.parts.push(addStyle(item.parts[j])) - } - if (domStyle.parts.length > item.parts.length) { - domStyle.parts.length = item.parts.length - } - } else { - var parts = [] - for (var j = 0; j < item.parts.length; j++) { - parts.push(addStyle(item.parts[j])) - } - stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } - } - } - } - - function createStyleElement () { - var styleElement = document.createElement('style') - styleElement.type = 'text/css' - head.appendChild(styleElement) - return styleElement - } - - function addStyle (obj /* StyleObjectPart */) { - var update, remove - var styleElement = document.querySelector('style[data-vue-ssr-id~="' + obj.id + '"]') - - if (styleElement) { - if (isProduction) { - // has SSR styles and in production mode. - // simply do nothing. - return noop - } else { - // has SSR styles but in dev mode. - // for some reason Chrome can't handle source map in server-rendered - // style tags - source maps in <style> only works if the style tag is - // created and inserted dynamically. So we remove the server rendered - // styles and inject new ones. - styleElement.parentNode.removeChild(styleElement) - } - } - - if (isOldIE) { - // use singleton mode for IE9. - var styleIndex = singletonCounter++ - styleElement = singletonElement || (singletonElement = createStyleElement()) - update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) - remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) - } else { - // use multi-style-tag mode in all other cases - styleElement = createStyleElement() - update = applyToTag.bind(null, styleElement) - remove = function () { - styleElement.parentNode.removeChild(styleElement) - } - } - - update(obj) - - return function updateStyle (newObj /* StyleObjectPart */) { - if (newObj) { - if (newObj.css === obj.css && - newObj.media === obj.media && - newObj.sourceMap === obj.sourceMap) { - return - } - update(obj = newObj) - } else { - remove() - } - } - } - - var replaceText = (function () { - var textStore = [] - - return function (index, replacement) { - textStore[index] = replacement - return textStore.filter(Boolean).join('\n') - } - })() - - function applyToSingletonTag (styleElement, index, remove, obj) { - var css = remove ? '' : obj.css - - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = replaceText(index, css) - } else { - var cssNode = document.createTextNode(css) - var childNodes = styleElement.childNodes - if (childNodes[index]) styleElement.removeChild(childNodes[index]) - if (childNodes.length) { - styleElement.insertBefore(cssNode, childNodes[index]) - } else { - styleElement.appendChild(cssNode) - } - } - } - - function applyToTag (styleElement, obj) { - var css = obj.css - var media = obj.media - var sourceMap = obj.sourceMap - - if (media) { - styleElement.setAttribute('media', media) - } - - if (sourceMap) { - // https://developer.chrome.com/devtools/docs/javascript-debugging - // this makes source maps inside style tags work properly in Chrome - css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' - // http://stackoverflow.com/a/26603875 - css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' - } - - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = css - } else { - while (styleElement.firstChild) { - styleElement.removeChild(styleElement.firstChild) - } - styleElement.appendChild(document.createTextNode(css)) - } - } - - -/***/ }), - -/***/ 6: -/***/ (function(module, exports) { - - /** - * Translates the list format produced by css-loader into something - * easier to manipulate. - */ - module.exports = function listToStyles (parentId, list) { - var styles = [] - var newStyles = {} - for (var i = 0; i < list.length; i++) { - var item = list[i] - var id = item[0] - var css = item[1] - var media = item[2] - var sourceMap = item[3] - var part = { - id: parentId + ':' + i, - css: css, - media: media, - sourceMap: sourceMap - } - if (!newStyles[id]) { - styles.push(newStyles[id] = { id: id, parts: [part] }) - } else { - newStyles[id].parts.push(part) - } - } - return styles - } - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports) { - - /* globals __VUE_SSR_CONTEXT__ */ - - // this module is a runtime utility for cleaner component module output and will - // be included in the final webpack user bundle - - module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ - ) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } - } - - -/***/ }), - -/***/ 322: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(323) - } - var Component = __webpack_require__(7)( - /* script */ - __webpack_require__(325), - /* template */ - __webpack_require__(326), - /* styles */ - injectStyle, - /* scopeId */ - "data-v-0018c0e6", - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/syntax/hello-world-4.vue" - if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")} - if (Component.options.functional) {console.error("[vue-loader] hello-world-4.vue: functional components are not supported with templates, they should use render functions.")} - - /* hot reload */ - if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-0018c0e6", Component.options) - } else { - hotAPI.reload("data-v-0018c0e6", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 323: -/***/ (function(module, exports, __webpack_require__) { - - // style-loader: Adds some css to the DOM by adding a <style> tag - - // load the styles - var content = __webpack_require__(324); - if(typeof content === 'string') content = [[module.id, content, '']]; - if(content.locals) module.exports = content.locals; - // add the styles to the DOM - var update = __webpack_require__(5)("f74871b4", content, false); - // Hot Module Replacement - if(false) { - // When the styles change, update the <style> tags - if(!content.locals) { - module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0018c0e6\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./hello-world-4.vue", function() { - var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0018c0e6\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./hello-world-4.vue"); - if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; - update(newContent); - }); - } - // When the module is disposed, remove the <style> tags - module.hot.dispose(function() { update(); }); - } - -/***/ }), - -/***/ 324: -/***/ (function(module, exports, __webpack_require__) { - - exports = module.exports = __webpack_require__(4)(); - // imports - - - // module - exports.push([module.id, "\n.wrapper[data-v-0018c0e6] {align-items: center; margin-top: 120px;\n}\n.title[data-v-0018c0e6] {font-size: 48px;\n}\n.logo[data-v-0018c0e6] {width: 360px; height: 82px;\n}\n", ""]); - - // exports - - -/***/ }), - -/***/ 325: -/***/ (function(module, exports) { - - 'use strict'; - - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - - module.exports = { - data: { - logoUrl: 'https://alibaba.github.io/weex/img/[email protected]', - target: 'World' - } - }; - -/***/ }), - -/***/ 326: -/***/ (function(module, exports, __webpack_require__) { - - module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('div', { - staticClass: "wrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('image', { - staticClass: "logo", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - attrs: { - "src": _vm.logoUrl - } - }), _vm._v(" "), _c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello " + _vm._s(_vm.target))])]) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-0018c0e6", module.exports) - } - } - -/***/ }) - -/******/ }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43564f3b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-5.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-5.js b/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-5.js deleted file mode 100644 index 6693d89..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/syntax/hello-world-5.js +++ /dev/null @@ -1,631 +0,0 @@ -// NOTE: for vue2.0 and platform:web only. - -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - - var App = __webpack_require__(327) - App.el = '#root' - new Vue(App) - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - */ - // css base code, injected by the css-loader - module.exports = function() { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - var result = []; - for(var i = 0; i < this.length; i++) { - var item = this[i]; - if(item[2]) { - result.push("@media " + item[2] + "{" + item[1] + "}"); - } else { - result.push(item[1]); - } - } - return result.join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; - }; - - -/***/ }), - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - Modified by Evan You @yyx990803 - */ - - var hasDocument = typeof document !== 'undefined' - - if (false) { - if (!hasDocument) { - throw new Error( - 'vue-style-loader cannot be used in a non-browser environment. ' + - "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." - ) } - } - - var listToStyles = __webpack_require__(6) - - /* - type StyleObject = { - id: number; - parts: Array<StyleObjectPart> - } - - type StyleObjectPart = { - css: string; - media: string; - sourceMap: ?string - } - */ - - var stylesInDom = {/* - [id: number]: { - id: number, - refs: number, - parts: Array<(obj?: StyleObjectPart) => void> - } - */} - - var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) - var singletonElement = null - var singletonCounter = 0 - var isProduction = false - var noop = function () {} - - // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> - // tags it will allow on a page - var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) - - module.exports = function (parentId, list, _isProduction) { - isProduction = _isProduction - - var styles = listToStyles(parentId, list) - addStylesToDom(styles) - - return function update (newList) { - var mayRemove = [] - for (var i = 0; i < styles.length; i++) { - var item = styles[i] - var domStyle = stylesInDom[item.id] - domStyle.refs-- - mayRemove.push(domStyle) - } - if (newList) { - styles = listToStyles(parentId, newList) - addStylesToDom(styles) - } else { - styles = [] - } - for (var i = 0; i < mayRemove.length; i++) { - var domStyle = mayRemove[i] - if (domStyle.refs === 0) { - for (var j = 0; j < domStyle.parts.length; j++) { - domStyle.parts[j]() - } - delete stylesInDom[domStyle.id] - } - } - } - } - - function addStylesToDom (styles /* Array<StyleObject> */) { - for (var i = 0; i < styles.length; i++) { - var item = styles[i] - var domStyle = stylesInDom[item.id] - if (domStyle) { - domStyle.refs++ - for (var j = 0; j < domStyle.parts.length; j++) { - domStyle.parts[j](item.parts[j]) - } - for (; j < item.parts.length; j++) { - domStyle.parts.push(addStyle(item.parts[j])) - } - if (domStyle.parts.length > item.parts.length) { - domStyle.parts.length = item.parts.length - } - } else { - var parts = [] - for (var j = 0; j < item.parts.length; j++) { - parts.push(addStyle(item.parts[j])) - } - stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } - } - } - } - - function createStyleElement () { - var styleElement = document.createElement('style') - styleElement.type = 'text/css' - head.appendChild(styleElement) - return styleElement - } - - function addStyle (obj /* StyleObjectPart */) { - var update, remove - var styleElement = document.querySelector('style[data-vue-ssr-id~="' + obj.id + '"]') - - if (styleElement) { - if (isProduction) { - // has SSR styles and in production mode. - // simply do nothing. - return noop - } else { - // has SSR styles but in dev mode. - // for some reason Chrome can't handle source map in server-rendered - // style tags - source maps in <style> only works if the style tag is - // created and inserted dynamically. So we remove the server rendered - // styles and inject new ones. - styleElement.parentNode.removeChild(styleElement) - } - } - - if (isOldIE) { - // use singleton mode for IE9. - var styleIndex = singletonCounter++ - styleElement = singletonElement || (singletonElement = createStyleElement()) - update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) - remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) - } else { - // use multi-style-tag mode in all other cases - styleElement = createStyleElement() - update = applyToTag.bind(null, styleElement) - remove = function () { - styleElement.parentNode.removeChild(styleElement) - } - } - - update(obj) - - return function updateStyle (newObj /* StyleObjectPart */) { - if (newObj) { - if (newObj.css === obj.css && - newObj.media === obj.media && - newObj.sourceMap === obj.sourceMap) { - return - } - update(obj = newObj) - } else { - remove() - } - } - } - - var replaceText = (function () { - var textStore = [] - - return function (index, replacement) { - textStore[index] = replacement - return textStore.filter(Boolean).join('\n') - } - })() - - function applyToSingletonTag (styleElement, index, remove, obj) { - var css = remove ? '' : obj.css - - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = replaceText(index, css) - } else { - var cssNode = document.createTextNode(css) - var childNodes = styleElement.childNodes - if (childNodes[index]) styleElement.removeChild(childNodes[index]) - if (childNodes.length) { - styleElement.insertBefore(cssNode, childNodes[index]) - } else { - styleElement.appendChild(cssNode) - } - } - } - - function applyToTag (styleElement, obj) { - var css = obj.css - var media = obj.media - var sourceMap = obj.sourceMap - - if (media) { - styleElement.setAttribute('media', media) - } - - if (sourceMap) { - // https://developer.chrome.com/devtools/docs/javascript-debugging - // this makes source maps inside style tags work properly in Chrome - css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' - // http://stackoverflow.com/a/26603875 - css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' - } - - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = css - } else { - while (styleElement.firstChild) { - styleElement.removeChild(styleElement.firstChild) - } - styleElement.appendChild(document.createTextNode(css)) - } - } - - -/***/ }), - -/***/ 6: -/***/ (function(module, exports) { - - /** - * Translates the list format produced by css-loader into something - * easier to manipulate. - */ - module.exports = function listToStyles (parentId, list) { - var styles = [] - var newStyles = {} - for (var i = 0; i < list.length; i++) { - var item = list[i] - var id = item[0] - var css = item[1] - var media = item[2] - var sourceMap = item[3] - var part = { - id: parentId + ':' + i, - css: css, - media: media, - sourceMap: sourceMap - } - if (!newStyles[id]) { - styles.push(newStyles[id] = { id: id, parts: [part] }) - } else { - newStyles[id].parts.push(part) - } - } - return styles - } - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports) { - - /* globals __VUE_SSR_CONTEXT__ */ - - // this module is a runtime utility for cleaner component module output and will - // be included in the final webpack user bundle - - module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ - ) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } - } - - -/***/ }), - -/***/ 327: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(328) - } - var Component = __webpack_require__(7)( - /* script */ - __webpack_require__(330), - /* template */ - __webpack_require__(331), - /* styles */ - injectStyle, - /* scopeId */ - "data-v-0001b70e", - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/syntax/hello-world-5.vue" - if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")} - if (Component.options.functional) {console.error("[vue-loader] hello-world-5.vue: functional components are not supported with templates, they should use render functions.")} - - /* hot reload */ - if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-0001b70e", Component.options) - } else { - hotAPI.reload("data-v-0001b70e", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 328: -/***/ (function(module, exports, __webpack_require__) { - - // style-loader: Adds some css to the DOM by adding a <style> tag - - // load the styles - var content = __webpack_require__(329); - if(typeof content === 'string') content = [[module.id, content, '']]; - if(content.locals) module.exports = content.locals; - // add the styles to the DOM - var update = __webpack_require__(5)("08161a7f", content, false); - // Hot Module Replacement - if(false) { - // When the styles change, update the <style> tags - if(!content.locals) { - module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0001b70e\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./hello-world-5.vue", function() { - var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0001b70e\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./hello-world-5.vue"); - if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; - update(newContent); - }); - } - // When the module is disposed, remove the <style> tags - module.hot.dispose(function() { update(); }); - } - -/***/ }), - -/***/ 329: -/***/ (function(module, exports, __webpack_require__) { - - exports = module.exports = __webpack_require__(4)(); - // imports - - - // module - exports.push([module.id, "\n.wrapper[data-v-0001b70e] {align-items: center; margin-top: 120px;\n}\n.title[data-v-0001b70e] {font-size: 48px;\n}\n.logo[data-v-0001b70e] {width: 360px; height: 82px;\n}\n", ""]); - - // exports - - -/***/ }), - -/***/ 330: -/***/ (function(module, exports) { - - 'use strict'; - - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - - module.exports = { - data: { - logoUrl: 'https://alibaba.github.io/weex/img/[email protected]', - target: 'World' - }, - methods: { - update: function update(e) { - this.target = 'Weex'; - } - } - }; - -/***/ }), - -/***/ 331: -/***/ (function(module, exports, __webpack_require__) { - - module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('div', { - staticClass: "wrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.update - } - }, [_c('image', { - staticClass: "logo", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - attrs: { - "src": _vm.logoUrl - } - }), _vm._v(" "), _c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello " + _vm._s(_vm.target))])]) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-0001b70e", module.exports) - } - } - -/***/ }) - -/******/ }); \ No newline at end of file
