http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43564f3b/android/playground/app/src/main/assets/vue-web/vue/showcase/boxshadow.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/showcase/boxshadow.js b/android/playground/app/src/main/assets/vue-web/vue/showcase/boxshadow.js deleted file mode 100644 index 2324d15..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/showcase/boxshadow.js +++ /dev/null @@ -1,710 +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__(202) - 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 - } - } - - -/***/ }), - -/***/ 202: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(203) - } - var Component = __webpack_require__(7)( - /* script */ - __webpack_require__(205), - /* template */ - __webpack_require__(206), - /* styles */ - injectStyle, - /* scopeId */ - "data-v-02c2c604", - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/showcase/boxshadow.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] boxshadow.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-02c2c604", Component.options) - } else { - hotAPI.reload("data-v-02c2c604", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 203: -/***/ (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__(204); - 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)("4e1becd6", 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-02c2c604\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./boxshadow.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-02c2c604\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./boxshadow.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(); }); - } - -/***/ }), - -/***/ 204: -/***/ (function(module, exports, __webpack_require__) { - - exports = module.exports = __webpack_require__(4)(); - // imports - - - // module - exports.push([module.id, "\n.wrapper[data-v-02c2c604] {align-items: center; margin-top: 120px;\n}\n.title[data-v-02c2c604] {font-size: 48px;\n}\n", ""]); - - // exports - - -/***/ }), - -/***/ 205: -/***/ (function(module, exports) { - - 'use strict'; - - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - - module.exports = { - data: function data() { - return { - logoUrl: 'https://alibaba.github.io/weex/img/[email protected]', - target: 'World' - }; - } - }; - -/***/ }), - -/***/ 206: -/***/ (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('div', { - staticStyle: _vm.$processStyle({ - "width": "400px", - "height": "60px", - "background-color": "#FFE4C4", - "box-shadow": "20px 10px rgb(255, 69, 0)" - }), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle({ - "text-align": "center" - }), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello " + _vm._s(_vm.target))])]), _vm._v(" "), _c('div', { - staticStyle: _vm.$processStyle({ - "margin-top": "80px", - "width": "400px", - "height": "60px", - "background-color": "#FFE4C4", - "box-shadow": "20px 10px 5px rgba(255, 69, 0, 0.8)" - }), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle({ - "text-align": "center" - }), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello " + _vm._s(_vm.target))])]), _vm._v(" "), _c('div', { - staticStyle: _vm.$processStyle({ - "margin-top": "80px", - "width": "400px", - "height": "60px", - "background-color": "#FFE4C4", - "box-shadow": "inset 20px 10px 5px rgba(255, 69, 0, 0.8)" - }), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle({ - "text-align": "center" - }), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello " + _vm._s(_vm.target))])]), _vm._v(" "), _c('div', { - staticStyle: _vm.$processStyle({ - "margin-top": "80px", - "width": "400px", - "height": "60px", - "background-color": "#FFE4C4", - "box-shadow": "inset 20px 10px 5px rgb(255, 69, 0)" - }), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle({ - "text-align": "center" - }), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello " + _vm._s(_vm.target))])]), _vm._v(" "), _c('div', { - staticStyle: _vm.$processStyle({ - "margin-top": "80px", - "width": "400px", - "height": "60px", - "background-color": "#FFE4C4", - "box-shadow": "20px 10px 5px black" - }), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle({ - "text-align": "center" - }), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Hello " + _vm._s(_vm.target))])]), _vm._v(" "), _c('div', { - staticStyle: _vm.$processStyle({ - "margin-top": "80px", - "width": "400px", - "height": "60px", - "background-color": "#FFE4C4", - "box-shadow": "20px 10px 5px #008B00" - }), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "title", - staticStyle: _vm.$processStyle({ - "text-align": "center" - }), - 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-02c2c604", 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/showcase/calculator.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/showcase/calculator.js b/android/playground/app/src/main/assets/vue-web/vue/showcase/calculator.js deleted file mode 100644 index 5083e1e..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/showcase/calculator.js +++ /dev/null @@ -1,820 +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__(207) - 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 - } - } - - -/***/ }), - -/***/ 207: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(208) - } - var Component = __webpack_require__(7)( - /* script */ - __webpack_require__(210), - /* template */ - __webpack_require__(211), - /* styles */ - injectStyle, - /* scopeId */ - "data-v-0f286679", - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/showcase/calculator.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] calculator.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-0f286679", Component.options) - } else { - hotAPI.reload("data-v-0f286679", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 208: -/***/ (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__(209); - 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)("e989c2f2", 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-0f286679\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./calculator.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-0f286679\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./calculator.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(); }); - } - -/***/ }), - -/***/ 209: -/***/ (function(module, exports, __webpack_require__) { - - exports = module.exports = __webpack_require__(4)(); - // imports - - - // module - exports.push([module.id, "\n.row[data-v-0f286679] {\n flex-direction: row;\n}\n.result[data-v-0f286679] {\n text-align: right;\n background-color: #666;\n font-size: 40px;\n color: white;\n}\n.btn[data-v-0f286679] {\n flex: 1;\n text-align: center;\n background-color: #eee;\n font-size: 36px;\n}\n.btn[data-v-0f286679], .result[data-v-0f286679] {\n height: 100px;\n padding: 30px;\n margin: 5px;\n}\n.btn-operator[data-v-0f286679] {\n background-color: #669;\n font-size: 40px;\n color: white;\n}\n", ""]); - - // exports - - -/***/ }), - -/***/ 210: -/***/ (function(module, exports) { - - 'use strict'; - - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - - var OP = ['+', '-', '*', '/']; - var modal = weex.requireModule('modal'); - module.exports = { - data: function data() { - return { - result: '', - inputs: [] - }; - }, - methods: { - input: function input(e) { - modal.toast({ message: 'input: ' + e.target.attr.value, duration: 1 }); - var value = e.target.attr['value']; - var inputs = this.inputs; - var lastOne = inputs.length ? inputs[inputs.length - 1] : ''; - if (OP.indexOf(lastOne) > -1 && OP.indexOf(value) > -1) { - return; - } - inputs.push(value); - var buf = [], - char; - for (var i = 0; i < inputs.length; i++) { - char = inputs[i]; - if (OP.indexOf(char) > -1) { - char = ' ' + char + ' '; - } - buf.push(char); - } - this.result = buf.join(''); - }, - calculate: function calculate() { - var result = eval(this.result); - this.inputs = [result]; - this.result = result; - }, - clear: function clear() { - this.inputs = []; - this.result = ''; - } - } - }; - -/***/ }), - -/***/ 211: -/***/ (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({ - "padding": "5px" - }), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "result", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_vm._v(_vm._s(_vm.result))]), _vm._v(" "), _c('div', { - staticClass: "row", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("1")]), _vm._v(" "), _c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("2")]), _vm._v(" "), _c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("3")]), _vm._v(" "), _c('text', { - staticClass: "btn btn-operator", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("+")])]), _vm._v(" "), _c('div', { - staticClass: "row", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("4")]), _vm._v(" "), _c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("5")]), _vm._v(" "), _c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("6")]), _vm._v(" "), _c('text', { - staticClass: "btn btn-operator", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("-")])]), _vm._v(" "), _c('div', { - staticClass: "row", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("7")]), _vm._v(" "), _c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("8")]), _vm._v(" "), _c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("9")]), _vm._v(" "), _c('text', { - staticClass: "btn btn-operator", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("*")])]), _vm._v(" "), _c('div', { - staticClass: "row", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v("0")]), _vm._v(" "), _c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.input - } - }, [_vm._v(".")]), _vm._v(" "), _c('text', { - staticClass: "btn", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.clear - } - }, [_vm._v("AC")]), _vm._v(" "), _c('text', { - staticClass: "btn btn-operator", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - on: { - "click": _vm.calculate - } - }, [_vm._v("=")])])]) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-0f286679", 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/showcase/compositing.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/showcase/compositing.js b/android/playground/app/src/main/assets/vue-web/vue/showcase/compositing.js deleted file mode 100644 index a07d66a..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/showcase/compositing.js +++ /dev/null @@ -1,740 +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__(212) - 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 - } - } - - -/***/ }), - -/***/ 212: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(213) - } - var Component = __webpack_require__(7)( - /* script */ - __webpack_require__(215), - /* template */ - __webpack_require__(216), - /* styles */ - injectStyle, - /* scopeId */ - null, - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/showcase/compositing.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] compositing.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-1420fc1d", Component.options) - } else { - hotAPI.reload("data-v-1420fc1d", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 213: -/***/ (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__(214); - 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)("14ff2e37", 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-1420fc1d\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./compositing.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-1420fc1d\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./compositing.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(); }); - } - -/***/ }), - -/***/ 214: -/***/ (function(module, exports, __webpack_require__) { - - exports = module.exports = __webpack_require__(4)(); - // imports - - - // module - exports.push([module.id, "\n.wrapper {\n align-items: center; \n opacity: 0.8;\n}\n.itemWrapper {\n flex:1;\n border-top-right-radius: 80;\n border-bottom-right-radius: 80;\n border-top-width: 10;\n border-top-color: red;\n border-style: dashed;\n align-items: center;\n background-color: white;\n}\n.nameWrapper {\n background-color:rgba(255,0,0,0.5);\n border-radius: 30;\n overflow: visible;\n border-color: black;\n border-width: 10;\n}\n.item {\n margin-top: 120px; \n background-color: #CCCCCC;\n align-items: center;\n}\n.itemName {\n font-size:28;\n color:#333333;\n line-height:42;\n text-align:left;\n margin-top: 24;\n}\n.itemPhoto {\n margin-top: 18;\n width: 220;\n height: 220;\n margin-bottom: 18;\n border-radius: 30;\n overflow: hidden;\n background-color: blue;\n}\n.itemDesc {\n font-size:24;\n margin:12;\n color:#999999;\n line-height:36;\n text-align:left;\n}\n", ""]); - - // exports - - -/***/ }), - -/***/ 215: -/***/ (function(module, exports) { - - "use strict"; - - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - - module.exports = { - data: {}, - methods: {} - }; - -/***/ }), - -/***/ 216: -/***/ (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('div', { - staticClass: "item", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - attrs: { - "compositing": "true" - } - }, [_c('div', { - staticClass: "itemWrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('div', { - staticClass: "nameWrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "itemName", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Thomas Carlyle")])]), _vm._v(" "), _c('image', { - staticClass: "itemPhoto", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - attrs: { - "src": "https://gw.alicdn.com/tps/TB1Jl1CPFXXXXcJXXXXXXXXXXXX-370-370.jpg" - } - }), _vm._v(" "), _c('div', { - staticClass: "descWrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "itemDesc", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Genius only means hard-working all one\\'s life")])])])]), _vm._v(" "), _c('div', { - staticClass: "item", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - attrs: { - "compositing": "false" - } - }, [_c('div', { - staticClass: "itemWrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('div', { - staticClass: "nameWrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "itemName", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Thomas Carlyle")])]), _vm._v(" "), _c('image', { - staticClass: "itemPhoto", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)), - attrs: { - "src": "https://gw.alicdn.com/tps/TB1Jl1CPFXXXXcJXXXXXXXXXXXX-370-370.jpg" - } - }), _vm._v(" "), _c('div', { - staticClass: "descWrapper", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_c('text', { - staticClass: "itemDesc", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle(undefined)) - }, [_vm._v("Genius only means hard-working all one\\'s life")])])])])]) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-1420fc1d", 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/showcase/gesture.js ---------------------------------------------------------------------- diff --git a/android/playground/app/src/main/assets/vue-web/vue/showcase/gesture.js b/android/playground/app/src/main/assets/vue-web/vue/showcase/gesture.js deleted file mode 100644 index 29a0f1f..0000000 --- a/android/playground/app/src/main/assets/vue-web/vue/showcase/gesture.js +++ /dev/null @@ -1,649 +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__(217) - 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 - } - } - - -/***/ }), - -/***/ 217: -/***/ (function(module, exports, __webpack_require__) { - - var disposed = false - function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(218) - } - var Component = __webpack_require__(7)( - /* script */ - __webpack_require__(220), - /* template */ - __webpack_require__(221), - /* styles */ - injectStyle, - /* scopeId */ - "data-v-980be43c", - /* moduleIdentifier (server only) */ - null - ) - Component.options.__file = "/Users/Hanks/Codes/work/incubator-weex/examples/vue/showcase/gesture.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] gesture.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-980be43c", Component.options) - } else { - hotAPI.reload("data-v-980be43c", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) - })()} - - module.exports = Component.exports - - -/***/ }), - -/***/ 218: -/***/ (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__(219); - 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)("25472be0", 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-980be43c\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./gesture.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-980be43c\",\"scoped\":true,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./gesture.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(); }); - } - -/***/ }), - -/***/ 219: -/***/ (function(module, exports, __webpack_require__) { - - exports = module.exports = __webpack_require__(4)(); - // imports - - - // module - exports.push([module.id, "\n.ct[data-v-980be43c] {\n position: absolute;\n width: 750px;\n height: 1000px;\n background-color: #f7f7f7;\n}\n", ""]); - - // exports - - -/***/ }), - -/***/ 220: -/***/ (function(module, exports) { - - 'use strict'; - - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - - module.exports = { - data: function data() { - return { - text: 'no press.', - top: '0px', - left: '0px', - flag: false - }; - }, - methods: { - handlePress: function handlePress(e) { - this.text = '->longpress(' + e.touch.pageX + ',' + e.touch.pageY + ')id:' + e.touch.identifier; - }, - handleSwipe: function handleSwipe(e) { - this.text += '->swipe(' + e.touch.pageX + ',' + e.touch.pageY + ')id:' + e.touch.identifier; - }, - handlePanStart: function handlePanStart(e) { - this.flag = false; - this.text = '->panstart(' + e.touch.pageX + ',' + e.touch.pageY + ')id:' + e.touch.identifier; - }, - handlePanMove: function handlePanMove(e) { - if (this.flag) { - return; - } - this.flag = true; - this.text += '->panmove(' + e.touch.pageX + ',' + e.touch.pageY + ')id:' + e.touch.identifier; - }, - handlePanEnd: function handlePanEnd(e) { - this.text += '->panend(' + e.touch.pageX + ',' + e.touch.pageY + ')id:' + e.touch.identifier; - } - } - }; - -/***/ }), - -/***/ 221: -/***/ (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('div', { - staticClass: "ct", - staticStyle: _vm.$processStyle(undefined), - style: (_vm.$processStyle({ - top: _vm.top, - left: _vm.left - })), - on: { - "longpress": _vm.handlePress, - "swipe": _vm.handleSwipe, - "panstart": _vm.handlePanStart, - "panmove": _vm.handlePanMove, - "panend": _vm.handlePanEnd - } - }, [_c('text', [_vm._v(_vm._s(_vm.text))])])]) - },staticRenderFns: []} - module.exports.render._withStripped = true - if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api").rerender("data-v-980be43c", module.exports) - } - } - -/***/ }) - -/******/ }); \ No newline at end of file
