(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["uni"] = factory(); else root["uni"] = factory(); })((typeof self !== 'undefined' ? self : this), function() { return /******/ (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] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = 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; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "fae3"); /******/ }) /************************************************************************/ /******/ ({ /***/ "0741": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9a72"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "08c9": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "0950": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "0998": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4509"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "0c7c": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; }); /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules). // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + 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 = shadowMode ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functioal component in vue file var originalRender = options.render options.render = function renderWithStyleInjection (h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } } /***/ }), /***/ "0dba": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "0f55": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("eaa4"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "1047": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "1082": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7050de7c-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/image/index.vue?vue&type=template&id=5c570748& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('uni-image',_vm._g({},_vm.$listeners),[_c('div',{ref:"content",style:(_vm.modeStyle)}),_c('img',{attrs:{"src":_vm.realImagePath}}),(_vm.mode === 'widthFix')?_c('v-uni-resize-sensor',{ref:"sensor",on:{"resize":_vm._resize}}):_vm._e()],1)} var staticRenderFns = [] // CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=template&id=5c570748& // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/image/index.vue?vue&type=script&lang=js& function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } // // // // // // // // // // // // /* harmony default export */ var imagevue_type_script_lang_js_ = ({ name: 'Image', props: { src: { type: String, default: '' }, mode: { type: String, default: 'scaleToFill' }, // TODO 懒加载 lazyLoad: { type: [Boolean, String], default: false } }, data: function data() { return { originalWidth: 0, originalHeight: 0, availHeight: '', sizeFixed: false }; }, computed: { ratio: function ratio() { return this.originalWidth && this.originalHeight ? this.originalWidth / this.originalHeight : 0; }, realImagePath: function realImagePath() { return this.src && this.$getRealPath(this.src); }, modeStyle: function modeStyle() { var size = 'auto'; var position = ''; var repeat = 'no-repeat'; switch (this.mode) { case 'aspectFit': size = 'contain'; position = 'center center'; break; case 'aspectFill': size = 'cover'; position = 'center center'; break; case 'widthFix': size = '100% 100%'; break; case 'top': position = 'center top'; break; case 'bottom': position = 'center bottom'; break; case 'center': position = 'center center'; break; case 'left': position = 'left center'; break; case 'right': position = 'right center'; break; case 'top left': position = 'left top'; break; case 'top right': position = 'right top'; break; case 'bottom left': position = 'left bottom'; break; case 'bottom right': position = 'right bottom'; break; default: size = '100% 100%'; position = '0% 0%'; break; } return "background-position:".concat(position, ";background-size:").concat(size, ";background-repeat:").concat(repeat, ";"); } }, watch: { src: function src(newValue, oldValue) { this._loadImage(); }, mode: function mode(newValue, oldValue) { if (oldValue === 'widthFix') { this.$el.style.height = this.availHeight; this.sizeFixed = false; } if (newValue === 'widthFix' && this.ratio) { this._fixSize(); } } }, mounted: function mounted() { this.availHeight = this.$el.style.height || ''; this._loadImage(); }, methods: { _resize: function _resize() { if (this.mode === 'widthFix' && !this.sizeFixed) { this._fixSize(); } }, _fixSize: function _fixSize() { var elWidth = this._getWidth(); if (elWidth) { var height = elWidth / this.ratio; // fix: 解决 Chrome 浏览器上某些情况下导致 1px 缝隙的问题 if ((typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) && navigator.vendor === 'Google Inc.' && height > 10) { height = Math.round(height / 2) * 2; } this.$el.style.height = height + 'px'; this.sizeFixed = true; } }, _loadImage: function _loadImage() { this.$refs.content.style.backgroundImage = this.src ? "url(".concat(this.realImagePath, ")") : 'none'; var _self = this; var img = new Image(); img.onload = function ($event) { _self.originalWidth = this.width; _self.originalHeight = this.height; if (_self.mode === 'widthFix') { _self._fixSize(); } _self.$trigger('load', $event, { width: this.width, height: this.height }); }; img.onerror = function ($event) { _self.$trigger('error', $event, { errMsg: "GET ".concat(_self.src, " 404 (Not Found)") }); }; img.src = this.realImagePath; }, _getWidth: function _getWidth() { var computedStyle = window.getComputedStyle(this.$el); var borderWidth = (parseFloat(computedStyle.borderLeftWidth, 10) || 0) + (parseFloat(computedStyle.borderRightWidth, 10) || 0); var paddingWidth = (parseFloat(computedStyle.paddingLeft, 10) || 0) + (parseFloat(computedStyle.paddingRight, 10) || 0); return this.$el.offsetWidth - borderWidth - paddingWidth; } } }); // CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_imagevue_type_script_lang_js_ = (imagevue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/image/index.vue?vue&type=style&index=0&lang=css& var imagevue_type_style_index_0_lang_css_ = __webpack_require__("db18"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/image/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_imagevue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var components_image = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "1360": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "1442": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initEvent; }); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a20d"); function initEvent(Vue) { Vue.prototype.$handleViewEvent = function ($vueEvent, options) { var cid = this._$id; var nid = $vueEvent.currentTarget.getAttribute('_i'); if (!nid) { return console.error("[".concat(cid, "] nid not found")); } var $event = this.$handleEvent($vueEvent); // 移除无效属性 delete $event._processed; delete $event.mp; delete $event.preventDefault; delete $event.stopPropagation; UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_0__[/* WEBVIEW_UI_EVENT */ "f"], { data: $event, options: { cid: cid, nid: nid } }); }; } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("501c"))) /***/ }), /***/ "17fd": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7050de7c-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/navigator/index.vue?vue&type=template&id=d8d61df6& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hoverClass && _vm.hoverClass !== 'none')?_c('uni-navigator',_vm._g({class:[_vm.hovering ? _vm.hoverClass : ''],on:{"touchstart":_vm._hoverTouchStart,"touchend":_vm._hoverTouchEnd,"touchcancel":_vm._hoverTouchCancel,"click":_vm._onClick}},_vm.$listeners),[_vm._t("default")],2):_c('uni-navigator',_vm._g({on:{"click":_vm._onClick}},_vm.$listeners),[_vm._t("default")],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=template&id=d8d61df6& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__("8af1"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/navigator/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // var OPEN_TYPES = ['navigate', 'redirect', 'switchTab', 'reLaunch', 'navigateBack']; /* harmony default export */ var navigatorvue_type_script_lang_js_ = ({ name: 'Navigator', mixins: [mixins["b" /* hover */]], props: { hoverClass: { type: String, default: 'navigator-hover' }, url: { type: String, default: '' }, openType: { type: String, default: 'navigate', validator: function validator(value) { return ~OPEN_TYPES.indexOf(value); } }, delta: { type: Number, default: 1 }, hoverStartTime: { type: Number, default: 20 }, hoverStayTime: { type: Number, default: 600 } }, methods: { _onClick: function _onClick($event) { if (this.openType !== 'navigateBack' && !this.url) { console.error(" should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab"); return; } switch (this.openType) { case 'navigate': uni.navigateTo({ url: this.url }); break; case 'redirect': uni.redirectTo({ url: this.url }); break; case 'switchTab': uni.switchTab({ url: this.url }); break; case 'reLaunch': uni.reLaunch({ url: this.url }); break; case 'navigateBack': uni.navigateBack({ delta: this.delta }); break; default: break; } } } }); // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_navigatorvue_type_script_lang_js_ = (navigatorvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/navigator/index.vue?vue&type=style&index=0&lang=css& var navigatorvue_type_style_index_0_lang_css_ = __webpack_require__("f7fd"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_navigatorvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var components_navigator = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "1922": /***/ (function(module, exports) { function webpackEmptyContext(req) { var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; } webpackEmptyContext.keys = function() { return []; }; webpackEmptyContext.resolve = webpackEmptyContext; module.exports = webpackEmptyContext; webpackEmptyContext.id = "1922"; /***/ }), /***/ "1955": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js var touchtrack = __webpack_require__("ba15"); // EXTERNAL MODULE: ./src/core/view/mixins/scroller/index.js + 2 modules var scroller = __webpack_require__("8aec"); // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Friction.js var Friction = __webpack_require__("5363"); // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Spring.js var Spring = __webpack_require__("72b3"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/picker-view-column/index.vue?vue&type=script&lang=js& /* harmony default export */ var picker_view_columnvue_type_script_lang_js_ = ({ name: 'PickerViewColumn', mixins: [touchtrack["a" /* default */], scroller["a" /* default */]], data: function data() { return { scope: "picker-view-column-".concat(Date.now()), inited: false, indicatorStyle: '', indicatorClass: '', indicatorHeight: 34, maskStyle: '', maskClass: '', current: this.$parent.getItemValue(this), length: 0 }; }, computed: { height: function height() { return this.$parent.height; }, maskSize: function maskSize() { return (this.height - this.indicatorHeight) / 2; } }, watch: { indicatorHeight: function indicatorHeight(val) { this._setItemHeight(val); if (this.inited) { this.update(); } }, current: function current(val) { this.$parent.setItemValue(this, val); }, length: function length(val) { if (this.inited) { this.update(val); } } }, created: function created() { var $parent = this.$parent; this.indicatorStyle = $parent.indicatorStyle; this.indicatorClass = $parent.indicatorClass; this.maskStyle = $parent.maskStyle; this.maskClass = $parent.maskClass; // this.__pageRerender = this._pageRerender.bind(this) }, mounted: function mounted() { var _this = this; this.touchtrack(this.$refs.main, '_handleTrack', true); this.setCurrent(this.current); this.$nextTick(function () { _this.init(); _this.update(); }); }, methods: { _setItemHeight: function _setItemHeight(height) { var style = document.createElement('style'); style.innerText = ".uni-picker-view-content.".concat(this.scope, ">*{height: ").concat(height, "px;overflow: hidden;}"); document.head.appendChild(style); }, _handleTrack: function _handleTrack(e) { if (this._scroller) { switch (e.detail.state) { case 'start': this._handleTouchStart(e); break; case 'move': this._handleTouchMove(e); break; case 'end': case 'cancel': this._handleTouchEnd(e); } } }, _handleTap: function _handleTap(e) { if (e.target !== e.currentTarget && !this._scroller.isScrolling()) { var t = e.touches && e.touches[0] && e.touches[0].clientY; var n = typeof t === 'number' ? t : e.detail.y - document.body.scrollTop; var i = this.$el.getBoundingClientRect(); var r = n - i.top - this._height / 2; var o = this.indicatorHeight / 2; if (!(Math.abs(r) <= o)) { var a = Math.ceil((Math.abs(r) - o) / this.indicatorHeight); var s = r < 0 ? -a : a; this.current += s; this._scroller.scrollTo(this.current * this.indicatorHeight); } } }, setCurrent: function setCurrent(current) { if (current !== this.current) { this.current = current; if (this.inited) { this.update(); } } }, init: function init() { var _this2 = this; this.initScroller(this.$refs.content, { enableY: true, enableX: false, enableSnap: true, itemSize: this.indicatorHeight, friction: new Friction["a" /* Friction */](0.0001), spring: new Spring["a" /* Spring */](2, 90, 20), onSnap: function onSnap(index) { if (!isNaN(index) && index !== _this2.current) { _this2.current = index; } } }); this.inited = true; }, update: function update() { var _this3 = this; this.$nextTick(function () { var index = Math.max(_this3.length - 1, 0); var current = Math.min(_this3.current, index); _this3._scroller.update(current * _this3.indicatorHeight, undefined, _this3.indicatorHeight); }); }, _resize: function _resize(_ref) { var height = _ref.height; this.indicatorHeight = height; } }, render: function render(createElement) { this.length = this.$slots.default && this.$slots.default.length || 0; return createElement('uni-picker-view-column', { on: { tap: this._handleTap } }, [createElement('div', { ref: 'main', staticClass: 'uni-picker-view-group' }, [createElement('div', { ref: 'mask', staticClass: 'uni-picker-view-mask', class: this.maskClass, style: "background-size: 100% ".concat(this.maskSize, "px;").concat(this.maskStyle) }), createElement('div', { ref: 'indicator', staticClass: 'uni-picker-view-indicator', class: this.indicatorClass, style: this.indicatorStyle }, [createElement('v-uni-resize-sensor', { attrs: { initial: true }, on: { resize: this._resize } })]), createElement('div', { ref: 'content', staticClass: 'uni-picker-view-content', class: this.scope, style: "padding: ".concat(this.maskSize, "px 0;") }, [this.$slots.default])])]); } }); // CONCATENATED MODULE: ./src/core/view/components/picker-view-column/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_picker_view_columnvue_type_script_lang_js_ = (picker_view_columnvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/picker-view-column/index.vue?vue&type=style&index=0&lang=css& var picker_view_columnvue_type_style_index_0_lang_css_ = __webpack_require__("edfa"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/picker-view-column/index.vue var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_picker_view_columnvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var picker_view_column = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "1b6f": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f2b3"); /* harmony default export */ __webpack_exports__["a"] = ({ // 取消id的定义,某些组件(canvas)内不在props内定义id // props: { // id: { // type: String, // default: '' // } // }, mounted: function mounted() { var _this = this; this._toggleListeners('subscribe', this.id); // 初始化监听 this.$watch('id', function (newId, oldId) { // watch id _this._toggleListeners('unsubscribe', oldId, true); _this._toggleListeners('subscribe', newId, true); }); }, beforeDestroy: function beforeDestroy() { // 销毁时移除 this._toggleListeners('unsubscribe', this.id); }, methods: { _toggleListeners: function _toggleListeners(type, id, watch) { if (watch && !id) { // id被置空 return; } if (!Object(uni_shared__WEBPACK_IMPORTED_MODULE_0__[/* isFn */ "c"])(this._handleSubscribe)) { return; } // 纠正VUniVideo等组件命名为Video UniViewJSBridge[type](this.$page.id + '-' + this.$options.name.replace(/VUni([A-Z])/, '$1').toLowerCase() + '-' + id, this._handleSubscribe); } } }); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("501c"))) /***/ }), /***/ "1c64": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9613"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "1e88": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindowOffset; }); function getWindowOffset() { return { top: 0, bottom: 0 }; } /***/ }), /***/ "1efd": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./packages/uni-app-plus/dist/view.runtime.esm.js var view_runtime_esm = __webpack_require__("675f"); // CONCATENATED MODULE: ./src/core/helpers/get-real-route.js function getRealRoute(fromRoute, toRoute) { if (!toRoute) { toRoute = fromRoute; if (toRoute.indexOf('/') === 0) { return toRoute; } var pages = getCurrentPages(); if (pages.length) { fromRoute = pages[pages.length - 1].$page.route; } else { fromRoute = ''; } } else { if (toRoute.indexOf('/') === 0) { return toRoute; } } if (toRoute.indexOf('./') === 0) { return getRealRoute(fromRoute, toRoute.substr(2)); } var toRouteArray = toRoute.split('/'); var toRouteLength = toRouteArray.length; var i = 0; for (; i < toRouteLength && toRouteArray[i] === '..'; i++) {// noop } toRouteArray.splice(0, i); toRoute = toRouteArray.join('/'); var fromRouteArray = fromRoute.length > 0 ? fromRoute.split('/') : []; fromRouteArray.splice(fromRouteArray.length - i - 1, i + 1); return '/' + fromRouteArray.concat(toRouteArray).join('/'); } // CONCATENATED MODULE: ./src/platforms/app-plus/helpers/get-real-path.js var SCHEME_RE = /^([a-z-]+:)?\/\//i; var DATA_RE = /^data:.*,.*/; function addBase(filePath) { return filePath; } function getRealPath(filePath) { if (filePath.indexOf('/') === 0) { if (filePath.indexOf('//') === 0) { filePath = 'https:' + filePath; } else { return addBase(filePath.substr(1)); } } // 网络资源或base64 if (SCHEME_RE.test(filePath) || DATA_RE.test(filePath) || filePath.indexOf('blob:') === 0) { return filePath; } var pages = getCurrentPages(); if (pages.length) { return addBase(getRealRoute(pages[pages.length - 1].$page.route, filePath).substr(1)); } return filePath; } // EXTERNAL MODULE: ./src/core/view/plugins/events.js + 1 modules var events = __webpack_require__("d4b6"); // CONCATENATED MODULE: ./src/core/view/mixins/base.js /* harmony default export */ var base = ({ methods: { $getRealPath: function $getRealPath(src) { return getRealPath(src); }, $trigger: function $trigger(name, $event, detail) { this.$emit(name, events["b" /* processEvent */].call(this, name, $event, detail, this.$el, this.$el)); } } }); // CONCATENATED MODULE: ./src/core/view/mixins/animation.js function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function converPx(value) { if (/\d+[ur]px$/i.test(value)) { value.replace(/\d+[ur]px$/i, function (text) { return "".concat(uni.upx2px(parseFloat(text)), "px"); }); // eslint-disable-next-line no-useless-escape } else if (/^-?[\d\.]+$/.test(value)) { return "".concat(value, "px"); } return value || ''; } function converType(type) { return type.replace(/[A-Z]/g, function (text) { return "-".concat(text.toLowerCase()); }).replace('webkit', '-webkit'); } function getStyle(action) { var animateTypes1 = ['matrix', 'matrix3d', 'scale', 'scale3d', 'rotate3d', 'skew', 'translate', 'translate3d']; var animateTypes2 = ['scaleX', 'scaleY', 'scaleZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'skewX', 'skewY', 'translateX', 'translateY', 'translateZ']; var animateTypes3 = ['opacity', 'backgroundColor']; var animateTypes4 = ['width', 'height', 'left', 'right', 'top', 'bottom']; var animates = action.animates; var option = action.option; var transition = option.transition; var style = {}; var transform = []; animates.forEach(function (animate) { var type = animate.type; var args = _toConsumableArray(animate.args); if (animateTypes1.concat(animateTypes2).includes(type)) { if (type.startsWith('rotate') || type.startsWith('skew')) { args = args.map(function (value) { return parseFloat(value) + 'deg'; }); } else if (type.startsWith('translate')) { args = args.map(converPx); } if (animateTypes2.indexOf(type)) { args.length = 1; } transform.push("".concat(type, "(").concat(args.join(','), ")")); } else if (animateTypes3.concat(animateTypes4).includes(args[0])) { type = args[0]; var value = args[1]; style[type] = animateTypes4.includes(type) ? converPx(value) : value; } }); style.transform = style.webkitTransform = transform.join(' '); style.transition = style.webkitTransition = Object.keys(style).map(function (type) { return "".concat(converType(type), " ").concat(transition.duration, "ms ").concat(transition.timingFunction, " ").concat(transition.delay, "ms"); }).join(','); style.transformOrigin = style.webkitTransformOrigin = option.transformOrigin; return style; } function startAnimation(context) { var animation = context.animation; if (!animation || !animation.actions || !animation.actions.length) { return; } var index = 0; var actions = animation.actions; var length = animation.actions.length; function animate() { var action = actions[index]; var transition = action.option.transition; var style = getStyle(action); Object.keys(style).forEach(function (key) { context.$el.style[key] = style[key]; }); index += 1; if (index < length) { setTimeout(animate, transition.duration + transition.delay); } } animate(); } /* harmony default export */ var animation = ({ props: ['animation'], watch: { animation: function animation() { startAnimation(this); } }, mounted: function mounted() { startAnimation(this); } }); // CONCATENATED MODULE: ./src/core/view/components/index.js var requireComponents = [// baseComponents __webpack_require__("5408"), __webpack_require__("1922")]; requireComponents.forEach(function (components, index) { components.keys().forEach(function (fileName) { // 获取组件配置 var componentModule = components(fileName); var componentConfig = componentModule.default || componentModule; componentConfig.mixins = componentConfig.mixins ? [].concat(base, componentConfig.mixins) : [base]; componentConfig.mixins.push(animation); componentConfig.name = 'VUni' + componentConfig.name; componentConfig.isReserved = true; // 全局注册组件 view_runtime_esm["a" /* default */].component(componentConfig.name, componentConfig); }); }); /***/ }), /***/ "24aa": /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || new Function("return this")(); } catch (e) { // This works if the window reference is available if (typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /***/ "250d": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7050de7c-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/input/index.vue?vue&type=template&id=21a5c886& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('uni-input',_vm._g({on:{"change":function($event){$event.stopPropagation();}}},_vm.$listeners),[_c('div',{ref:"wrapper",staticClass:"uni-input-wrapper"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(!(_vm.composing || _vm.inputValue.length)),expression:"!(composing || inputValue.length)"}],ref:"placeholder",staticClass:"uni-input-placeholder",class:_vm.placeholderClass,style:(_vm.placeholderStyle)},[_vm._v(_vm._s(_vm.placeholder))]),((_vm.inputType)==='checkbox')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"uni-input-input",attrs:{"disabled":_vm.disabled,"maxlength":_vm.maxlength,"step":_vm.step,"autocomplete":"off","type":"checkbox"},domProps:{"checked":Array.isArray(_vm.inputValue)?_vm._i(_vm.inputValue,null)>-1:(_vm.inputValue)},on:{"focus":_vm._onFocus,"blur":_vm._onBlur,"input":function($event){$event.stopPropagation();return _vm._onInput($event)},"compositionstart":_vm._onComposition,"compositionend":_vm._onComposition,"keyup":function($event){$event.stopPropagation();return _vm._onKeyup($event)},"change":function($event){var $$a=_vm.inputValue,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.inputValue=$$a.concat([$$v]))}else{$$i>-1&&(_vm.inputValue=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.inputValue=$$c}}}}):((_vm.inputType)==='radio')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"uni-input-input",attrs:{"disabled":_vm.disabled,"maxlength":_vm.maxlength,"step":_vm.step,"autocomplete":"off","type":"radio"},domProps:{"checked":_vm._q(_vm.inputValue,null)},on:{"focus":_vm._onFocus,"blur":_vm._onBlur,"input":function($event){$event.stopPropagation();return _vm._onInput($event)},"compositionstart":_vm._onComposition,"compositionend":_vm._onComposition,"keyup":function($event){$event.stopPropagation();return _vm._onKeyup($event)},"change":function($event){_vm.inputValue=null}}}):_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],ref:"input",staticClass:"uni-input-input",attrs:{"disabled":_vm.disabled,"maxlength":_vm.maxlength,"step":_vm.step,"autocomplete":"off","type":_vm.inputType},domProps:{"value":(_vm.inputValue)},on:{"focus":_vm._onFocus,"blur":_vm._onBlur,"input":[function($event){if($event.target.composing){ return; }_vm.inputValue=$event.target.value},function($event){$event.stopPropagation();return _vm._onInput($event)}],"compositionstart":_vm._onComposition,"compositionend":_vm._onComposition,"keyup":function($event){$event.stopPropagation();return _vm._onKeyup($event)}}})])])} var staticRenderFns = [] // CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=template&id=21a5c886& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__("8af1"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/input/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // var INPUT_TYPES = ['text', 'number', 'idcard', 'digit', 'password']; var NUMBER_TYPES = ['number', 'digit']; /* harmony default export */ var inputvue_type_script_lang_js_ = ({ name: 'Input', mixins: [mixins["a" /* emitter */]], model: { prop: 'value', event: 'update:value' }, props: { name: { type: String, default: '' }, value: { type: [String, Number], default: '' }, type: { type: String, default: 'text' }, password: { type: [Boolean, String], default: false }, placeholder: { type: String, default: '' }, placeholderStyle: { type: String, default: '' }, placeholderClass: { type: String, default: '' }, disabled: { type: [Boolean, String], default: false }, maxlength: { type: [Number, String], default: 140 }, focus: { type: [Boolean, String], default: false }, confirmType: { type: String, default: 'done' } }, data: function data() { return { inputValue: this.value + '', composing: false, wrapperHeight: 0, cachedValue: '' }; }, computed: { inputType: function inputType() { var type = ''; switch (this.type) { case 'text': this.confirmType === 'search' && (type = 'search'); break; case 'idcard': // TODO 可能要根据不同平台进行区分处理 type = 'text'; break; case 'digit': type = 'number'; break; default: type = ~INPUT_TYPES.indexOf(this.type) ? this.type : 'text'; break; } return this.password ? 'password' : type; }, step: function step() { // 处理部分设备中无法输入小数点的问题 return ~NUMBER_TYPES.indexOf(this.type) ? '0.000000000000000001' : ''; } }, watch: { focus: function focus(value) { value && this._focusInput(); }, value: function value(_value) { this.inputValue = _value + ''; }, inputValue: function inputValue(value) { this.$emit('update:value', value); }, maxlength: function maxlength(value) { var realValue = this.inputValue.slice(0, parseInt(value, 10)); realValue !== this.inputValue && (this.inputValue = realValue); } }, created: function created() { this.$dispatch('Form', 'uni-form-group-update', { type: 'add', vm: this }); }, mounted: function mounted() { if (this.confirmType === 'search') { var formElem = document.createElement('form'); formElem.action = ''; formElem.onsubmit = function () { return false; }; formElem.className = 'uni-input-form'; formElem.appendChild(this.$refs.input); this.$refs.wrapper.appendChild(formElem); } var $vm = this; while ($vm) { var scopeId = $vm.$options._scopeId; if (scopeId) { this.$refs.placeholder.setAttribute(scopeId, ''); } $vm = $vm.$parent; } this.focus && this._focusInput(); }, beforeDestroy: function beforeDestroy() { this.$dispatch('Form', 'uni-form-group-update', { type: 'remove', vm: this }); }, methods: { _onKeyup: function _onKeyup($event) { if ($event.keyCode === 13) { this.$trigger('confirm', $event, { value: $event.target.value }); } }, _onInput: function _onInput($event) { if (this.composing) { return; } // 处理部分输入法可以输入其它字符的情况 if (~NUMBER_TYPES.indexOf(this.type)) { if (this.$refs.input.validity && !this.$refs.input.validity.valid) { $event.target.value = this.cachedValue; this.inputValue = $event.target.value; // 输入非法字符不触发 input 事件 return; } else { this.cachedValue = this.inputValue; } } // type="number" 不支持 maxlength 属性,因此需要主动限制长度。 if (this.inputType === 'number') { var maxlength = parseInt(this.maxlength, 10); if (maxlength > 0 && $event.target.value.length > maxlength) { $event.target.value = $event.target.value.slice(0, maxlength); this.inputValue = $event.target.value; // 字符长度超出范围不触发 input 事件 return; } } this.$trigger('input', $event, { value: this.inputValue }); }, _onFocus: function _onFocus($event) { this.$trigger('focus', $event, { value: $event.target.value }); }, _onBlur: function _onBlur($event) { this.$trigger('blur', $event, { value: $event.target.value }); }, _focusInput: function _focusInput() { var _this = this; setTimeout(function () { _this.$refs.input.focus(); }, 350); }, _blurInput: function _blurInput() { var _this2 = this; setTimeout(function () { _this2.$refs.input.blur(); }, 350); }, _onComposition: function _onComposition($event) { if ($event.type === 'compositionstart') { this.composing = true; } else { this.composing = false; } }, _resetFormData: function _resetFormData() { this.inputValue = ''; }, _getFormData: function _getFormData() { return this.name ? { value: this.inputValue, key: this.name } : {}; } } }); // CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/input/index.vue?vue&type=style&index=0&lang=css& var inputvue_type_style_index_0_lang_css_ = __webpack_require__("0f55"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/input/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_inputvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var input = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "25ce": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7050de7c-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=6fa043c2& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('uni-checkbox-group',_vm._g({},_vm.$listeners),[_vm._t("default")],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=6fa043c2& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__("8af1"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js& // // // // // // /* harmony default export */ var checkbox_groupvue_type_script_lang_js_ = ({ name: 'CheckboxGroup', mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], props: { name: { type: String, default: '' } }, data: function data() { return { checkboxList: [] }; }, listeners: { '@checkbox-change': '_changeHandler', '@checkbox-group-update': '_checkboxGroupUpdateHandler' }, created: function created() { this.$dispatch('Form', 'uni-form-group-update', { type: 'add', vm: this }); }, beforeDestroy: function beforeDestroy() { this.$dispatch('Form', 'uni-form-group-update', { type: 'remove', vm: this }); }, methods: { _changeHandler: function _changeHandler($event) { var value = []; this.checkboxList.forEach(function (vm) { if (vm.checkboxChecked) { value.push(vm.value); } }); this.$trigger('change', $event, { value: value }); }, _checkboxGroupUpdateHandler: function _checkboxGroupUpdateHandler($event) { if ($event.type === 'add') { this.checkboxList.push($event.vm); } else { var index = this.checkboxList.indexOf($event.vm); this.checkboxList.splice(index, 1); } }, _getFormData: function _getFormData() { var data = {}; if (this.name !== '') { var value = []; this.checkboxList.forEach(function (vm) { if (vm.checkboxChecked) { value.push(vm.value); } }); data['value'] = value; data['key'] = this.name; } return data; } } }); // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_checkbox_groupvue_type_script_lang_js_ = (checkbox_groupvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=style&index=0&lang=css& var checkbox_groupvue_type_style_index_0_lang_css_ = __webpack_require__("0998"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_checkbox_groupvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var checkbox_group = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "27ab": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js& function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } /* harmony default export */ var picker_viewvue_type_script_lang_js_ = ({ name: 'PickerView', props: { value: { type: Array, default: function _default() { return []; }, validator: function validator(val) { return Array.isArray(val) && val.filter(function (val) { return typeof val === 'number'; }).length === val.length; } }, indicatorStyle: { type: String, default: '' }, indicatorClass: { type: String, default: '' }, maskStyle: { type: String, default: '' }, maskClass: { type: String, default: '' } }, data: function data() { return { valueSync: _toConsumableArray(this.value), height: 34, items: [], changeSource: '' }; }, watch: { value: function value(val) { var _this = this; this.valueSync.length = val.length; val.forEach(function (val, index) { if (val !== _this.valueSync[index]) { _this.$set(_this.valueSync, index, val); } }); }, valueSync: { deep: true, handler: function handler(val, oldVal) { if (this.changeSource === '') { this._valueChanged(val); } else { this.changeSource = ''; // 避免外部直接对此值进行修改 var value = val.map(function (val) { return val; }); this.$emit('update:value', value); this.$trigger('change', {}, { value: value }); } } } }, methods: { getItemIndex: function getItemIndex(vnode) { return this.items.indexOf(vnode); }, getItemValue: function getItemValue(vm) { return this.valueSync[this.getItemIndex(vm.$vnode)] || 0; }, setItemValue: function setItemValue(vm, val) { var index = this.getItemIndex(vm.$vnode); var oldVal = this.valueSync[index]; if (oldVal !== val) { this.changeSource = 'touch'; this.$set(this.valueSync, index, val); } }, _valueChanged: function _valueChanged(val) { this.items.forEach(function (item, index) { item.componentInstance.setCurrent(val[index] || 0); }); }, _resize: function _resize(_ref) { var height = _ref.height; this.height = height; } }, render: function render(createElement) { var items = []; if (this.$slots.default) { this.$slots.default.forEach(function (vnode) { if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-picker-view-column') { items.push(vnode); } }); } this.items = items; return createElement('uni-picker-view', { on: this.$listeners }, [createElement('v-uni-resize-sensor', { attrs: { initial: true }, on: { resize: this._resize } }), createElement('div', { ref: 'wrapper', 'class': 'uni-picker-view-wrapper' }, items)]); } }); // CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_picker_viewvue_type_script_lang_js_ = (picker_viewvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=style&index=0&lang=css& var picker_viewvue_type_style_index_0_lang_css_ = __webpack_require__("6062"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_picker_viewvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var picker_view = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "2bbe": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7050de7c-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/view/index.vue?vue&type=template&id=164058a7& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hoverClass && _vm.hoverClass !== 'none')?_c('uni-view',_vm._g({class:[_vm.hovering?_vm.hoverClass:''],on:{"touchstart":_vm._hoverTouchStart,"touchend":_vm._hoverTouchEnd,"touchcancel":_vm._hoverTouchCancel}},_vm.$listeners),[_vm._t("default")],2):_c('uni-view',_vm._g({},_vm.$listeners),[_vm._t("default")],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=template&id=164058a7& // EXTERNAL MODULE: ./src/core/view/mixins/hover.js var hover = __webpack_require__("83a6"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/view/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var viewvue_type_script_lang_js_ = ({ name: 'View', mixins: [hover["a" /* default */]], listeners: { 'label-click': 'clickHandler' } }); // CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_viewvue_type_script_lang_js_ = (viewvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/view/index.vue?vue&type=style&index=0&lang=css& var viewvue_type_style_index_0_lang_css_ = __webpack_require__("e865"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/view/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_viewvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var view = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "33ed": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* unused harmony export disableScroll */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pageScrollTo; }); /* unused harmony export createScrollListener */ /* harmony import */ var uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5bb5"); function disableScroll(evt) { evt.preventDefault(); } function pageScrollTo(_ref) { var scrollTop = _ref.scrollTop, duration = _ref.duration; var documentElement = document.documentElement; var clientHeight = documentElement.clientHeight, scrollHeight = documentElement.scrollHeight; scrollTop = Math.min(scrollTop, scrollHeight - clientHeight); if (duration === 0) { // 部分浏览器(比如微信)中 scrollTop 的值需要通过 document.body 来控制 documentElement.scrollTop = document.body.scrollTop = scrollTop; return; } if (window.scrollY === scrollTop) { return; } function scrollTo(duration) { if (duration <= 0) { window.scrollTo(0, scrollTop); return; } var distaince = scrollTop - window.scrollY; requestAnimationFrame(function () { window.scrollTo(0, window.scrollY + distaince / duration * 10); scrollTo(duration - 10); }); } scrollTo(duration); // TODO 暂不使用 transform 会导致 fixed 元素不可见 // const body = document.body // const bodyStyle = body.style // // function webkitTransitionEnd() { // bodyStyle.webkitTransition = '' // bodyStyle.webkitTransform = '' // documentElement.scrollTop = scrollTop // body.removeEventListener('webkitTransitionEnd', webkitTransitionEnd) // } // // body.addEventListener('webkitTransitionEnd', webkitTransitionEnd) // bodyStyle.webkitTransition = `-webkit-transform ${duration}ms ease-out` // bodyStyle.webkitTransform = `translateY(${documentElement.scrollTop}px) translateZ(0)` } function createScrollListener(pageId, _ref2) { var enablePageScroll = _ref2.enablePageScroll, enablePageReachBottom = _ref2.enablePageReachBottom, onReachBottomDistance = _ref2.onReachBottomDistance, enableTransparentTitleNView = _ref2.enableTransparentTitleNView; var ticking = false; var hasReachBottom = false; var onReachBottom = true; function isReachBottom() { var _document$documentEle = document.documentElement, clientHeight = _document$documentEle.clientHeight, scrollHeight = _document$documentEle.scrollHeight; var scrollY = window.scrollY; var isBottom = scrollY > 0 && scrollHeight > clientHeight && scrollY + clientHeight + onReachBottomDistance >= scrollHeight; if (isBottom && !hasReachBottom) { hasReachBottom = true; return true; } if (!isBottom && hasReachBottom) { hasReachBottom = false; } return false; } function trigger() { var pages = getCurrentPages(); if (!pages.length || pages[pages.length - 1].$page.id !== pageId) { return; } // publish var scrollTop = window.pageYOffset; if (enablePageScroll) { // 向 Service 发送 onPageScroll 事件 Object(uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__[/* publishHandler */ "a"])('onPageScroll', { scrollTop: scrollTop }, pageId); } if (enableTransparentTitleNView) { UniViewJSBridge.emit('onPageScroll', { scrollTop: scrollTop }); } if (enablePageReachBottom && onReachBottom && isReachBottom()) { Object(uni_platform_view_bridge__WEBPACK_IMPORTED_MODULE_0__[/* publishHandler */ "a"])('onReachBottom', {}, pageId); onReachBottom = false; setTimeout(function () { onReachBottom = true; }, 350); } ticking = false; } return function onScroll() { if (!ticking) { requestAnimationFrame(trigger); } ticking = true; }; } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("501c"))) /***/ }), /***/ "3e5d": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initData; }); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a20d"); /* harmony import */ var _vdom_sync__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("9d20"); /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9856"); var _handleData; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var vd; var handleData = (_handleData = {}, _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_0__[/* PAGE_CREATE */ "c"], function onPageCreate(data) { var _data = _slicedToArray(data, 1), pageId = _data[0]; __uniConfig.id = pageId; vd = new _vdom_sync__WEBPACK_IMPORTED_MODULE_1__[/* VDomSync */ "a"](pageId); }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_0__[/* MOUNTED_DATA */ "b"], function onMounted(data) { vd.addVData.apply(vd, data); }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_0__[/* UPDATED_DATA */ "e"], function onUpdated(data) { vd.updateVData.apply(vd, data); }), _defineProperty(_handleData, _constants__WEBPACK_IMPORTED_MODULE_0__[/* PAGE_CREATED */ "d"], function onPageCreated(data) { var _data2 = _slicedToArray(data, 1), pagePath = _data2[0]; Object(_page__WEBPACK_IMPORTED_MODULE_2__[/* createPage */ "a"])(pagePath, { mpType: 'page', pageId: vd.pageId, pagePath: pagePath }).$mount('#app'); }), _handleData); function vdSync(_ref) { var data = _ref.data, options = _ref.options; data.forEach(function (data) { handleData[data[0]](data[1]); }); vd.flush(); } function initData(Vue) { UniViewJSBridge.subscribe('vdSync', vdSync); Object.defineProperty(Vue.prototype, '_$vd', { get: function get() { return !this.$options.isReserved && vd; } }); Vue.mixin({ beforeCreate: function beforeCreate() { if (this.$options.mpType) { this.mpType = this.$options.mpType; } if (this._$vd) { this._$vd.initVm(this); console.log("[".concat(this._$id, "] beforeCreate ") + Date.now()); } else { console.log("[null] beforeCreate " + Date.now()); } } }); } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("501c"))) /***/ }), /***/ "3e8c": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/resize-sensor/index.vue?vue&type=script&lang=js& /* harmony default export */ var resize_sensorvue_type_script_lang_js_ = ({ name: 'ResizeSensor', props: { initial: { type: [Boolean, String], default: false } }, data: function data() { return { size: { width: -1, height: -1 } }; }, watch: { size: { deep: true, handler: function handler(size) { this.$emit('resize', Object.assign({}, size)); } } }, mounted: function mounted() { if (this.initial === true) { this.$nextTick(this.update); } if (this.$el.offsetParent !== this.$el.parentNode) { this.$el.parentNode.style.position = 'relative'; } if (!('AnimationEvent' in window)) { this.reset(); } }, methods: { reset: function reset() { var expand = this.$el.firstChild; var shrink = this.$el.lastChild; expand.scrollLeft = 100000; expand.scrollTop = 100000; shrink.scrollLeft = 100000; shrink.scrollTop = 100000; }, update: function update() { this.size.width = this.$el.offsetWidth; this.size.height = this.$el.offsetHeight; this.reset(); } }, render: function render(create) { return create('uni-resize-sensor', { on: { '~animationstart': this.update } }, [create('div', { on: { scroll: this.update } }, [create('div')]), create('div', { on: { scroll: this.update } }, [create('div')])]); } }); // CONCATENATED MODULE: ./src/core/view/components/resize-sensor/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_resize_sensorvue_type_script_lang_js_ = (resize_sensorvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/resize-sensor/index.vue?vue&type=style&index=0&lang=css& var resize_sensorvue_type_style_index_0_lang_css_ = __webpack_require__("64d0"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/resize-sensor/index.vue var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_resize_sensorvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var resize_sensor = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "4509": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "4656": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "4871": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "488c": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "4da7": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/text/index.vue?vue&type=script&lang=js& var SPACE_UNICODE = { 'ensp': "\u2002", 'emsp': "\u2003", 'nbsp': "\xA0" }; /* harmony default export */ var textvue_type_script_lang_js_ = ({ name: 'Text', props: { selectable: { type: [Boolean, String], default: false }, space: { type: String, default: '' }, decode: { type: [Boolean, String], default: false } }, methods: { _decodeHtml: function _decodeHtml(htmlString) { if (this.space && SPACE_UNICODE[this.space]) { htmlString = htmlString.replace(/ /g, SPACE_UNICODE[this.space]); } if (this.decode) { htmlString = htmlString.replace(/ /g, SPACE_UNICODE.nbsp).replace(/ /g, SPACE_UNICODE.ensp).replace(/ /g, SPACE_UNICODE.emsp).replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'"); } return htmlString; } }, render: function render(createElement) { var _this = this; var nodeList = []; this.$slots.default && this.$slots.default.forEach(function (vnode) { if (vnode.text) { // 处理可能出现的多余的转义字符 var nodeText = vnode.text.replace(/\\n/g, '\n'); var texts = nodeText.split('\n'); texts.forEach(function (text, index) { nodeList.push(_this._decodeHtml(text)); if (index !== texts.length - 1) { nodeList.push(createElement('br')); } }); } else { if (vnode.componentOptions && vnode.componentOptions.tag !== 'v-uni-text') { console.warn(' 组件内只支持嵌套 ,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异。'); } nodeList.push(vnode); } }); return createElement('uni-text', { on: this.$listeners, attrs: { selectable: !!this.selectable } }, [createElement('span', {}, nodeList)]); } }); // CONCATENATED MODULE: ./src/core/view/components/text/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_textvue_type_script_lang_js_ = (textvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/text/index.vue?vue&type=style&index=0&lang=css& var textvue_type_style_index_0_lang_css_ = __webpack_require__("c8ed"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/text/index.vue var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_textvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var components_text = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "4f1c": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7050de7c-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/switch/index.vue?vue&type=template&id=4b47fc1e& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('uni-switch',_vm._g({on:{"click":_vm._onClick}},_vm.$listeners),[_c('div',{staticClass:"uni-switch-wrapper"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.type === 'switch'),expression:"type === 'switch'"}],staticClass:"uni-switch-input",class:[_vm.switchChecked ? 'uni-switch-input-checked' : ''],style:({backgroundColor: _vm.switchChecked ? _vm.color : '#DFDFDF',borderColor:_vm.switchChecked ? _vm.color : '#DFDFDF'})}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.type === 'checkbox'),expression:"type === 'checkbox'"}],staticClass:"uni-checkbox-input",class:[_vm.switchChecked ? 'uni-checkbox-input-checked' : ''],style:({color: _vm.color})})])])} var staticRenderFns = [] // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=template&id=4b47fc1e& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__("8af1"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/switch/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // /* harmony default export */ var switchvue_type_script_lang_js_ = ({ name: 'Switch', mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], props: { name: { type: String, default: '' }, checked: { type: [Boolean, String], default: false }, type: { type: String, default: 'switch' }, id: { type: String, default: '' }, disabled: { type: [Boolean, String], default: false }, color: { type: String, default: '#007aff' } }, data: function data() { return { switchChecked: this.checked }; }, watch: { checked: function checked(val) { this.switchChecked = val; } }, created: function created() { this.$dispatch('Form', 'uni-form-group-update', { type: 'add', vm: this }); }, beforeDestroy: function beforeDestroy() { this.$dispatch('Form', 'uni-form-group-update', { type: 'remove', vm: this }); }, listeners: { 'label-click': '_onClick', '@label-click': '_onClick' }, methods: { _onClick: function _onClick($event) { if (this.disabled) { return; } this.switchChecked = !this.switchChecked; this.$trigger('change', $event, { value: this.switchChecked }); }, _resetFormData: function _resetFormData() { this.switchChecked = false; }, _getFormData: function _getFormData() { var data = {}; if (this.name !== '') { data['value'] = this.switchChecked; data['key'] = this.name; } return data; } } }); // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_switchvue_type_script_lang_js_ = (switchvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/switch/index.vue?vue&type=style&index=0&lang=css& var switchvue_type_style_index_0_lang_css_ = __webpack_require__("a5ec"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/switch/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_switchvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var components_switch = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "501c": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./packages/uni-app-plus/dist/view.runtime.esm.js var view_runtime_esm = __webpack_require__("675f"); // EXTERNAL MODULE: ./src/shared/index.js + 4 modules var shared = __webpack_require__("f2b3"); // EXTERNAL MODULE: ./src/core/helpers/index.js var helpers = __webpack_require__("85b6"); // CONCATENATED MODULE: ./src/core/helpers/constants.js var NAVBAR_HEIGHT = 44; var TABBAR_HEIGHT = 50; // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/scroll.js var subscribe_scroll = __webpack_require__("33ed"); // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/api/request-component-info.js var request_component_info = __webpack_require__("6bdf"); // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/api/request-component-observer.js var request_component_observer = __webpack_require__("5dc1"); // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/api/index.js /* harmony default export */ var api = ({ requestComponentInfo: request_component_info["a" /* requestComponentInfo */], requestComponentObserver: request_component_observer["b" /* requestComponentObserver */], destroyComponentObserver: request_component_observer["a" /* destroyComponentObserver */] }); // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/index.js var passiveOptions = shared["e" /* supportsPassive */] ? { passive: false } : false; function updateCssVar(vm) { if (uni.canIUse('css.var')) { var pageVm = vm.$parent.$parent; var windowTop = pageVm.showNavigationBar && pageVm.navigationBar.type !== 'transparent' && pageVm.navigationBar.type !== 'float' ? NAVBAR_HEIGHT + 'px' : '0px'; var windowBottom = getApp().$children[0].showTabBar ? TABBAR_HEIGHT + 'px' : '0px'; var style = document.documentElement.style; style.setProperty('--window-top', windowTop); style.setProperty('--window-bottom', windowBottom); console.debug("".concat(vm.$page.route, "[").concat(vm.$page.id, "]\uFF1A--window-top=").concat(windowTop)); console.debug("".concat(vm.$page.route, "[").concat(vm.$page.id, "]\uFF1A--window-bottom=").concat(windowBottom)); } } function initSubscribe(subscribe) { Object.keys(api).forEach(function (name) { subscribe(name, api[name]); }); subscribe('pageScrollTo', subscribe_scroll["a" /* pageScrollTo */]); if (false) { var disableScrollListener, scrollListener; } } // EXTERNAL MODULE: ./src/platforms/app-plus/view/bridge.js var bridge = __webpack_require__("5bb5"); // CONCATENATED MODULE: ./src/core/view/bridge/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "on", function() { return on; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "off", function() { return off; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "once", function() { return once; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "emit", function() { return emit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribe", function() { return bridge_subscribe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unsubscribe", function() { return unsubscribe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeHandler", function() { return subscribeHandler; }); /* concated harmony reexport publishHandler */__webpack_require__.d(__webpack_exports__, "publishHandler", function() { return bridge["a" /* publishHandler */]; }); var Emitter = new view_runtime_esm["a" /* default */](); var on = Emitter.$on.bind(Emitter); var off = Emitter.$off.bind(Emitter); var once = Emitter.$once.bind(Emitter); var emit = Emitter.$emit.bind(Emitter); function bridge_subscribe(event, callback) { return on('service.' + event, callback); } function unsubscribe(event, callback) { return off('service.' + event, callback); } function subscribeHandler(event, args, pageId) { emit('service.' + event, args, pageId); } initSubscribe(bridge_subscribe); /***/ }), /***/ "5129": /***/ (function(module, exports) { module.exports = ['uni-app', 'uni-tabbar', 'uni-page', 'uni-page-head', 'uni-page-wrapper', 'uni-page-body', 'uni-page-refresh', 'uni-actionsheet', 'uni-modal', 'uni-picker', 'uni-toast', 'uni-resize-sensor', 'uni-ad', 'uni-audio', 'uni-button', 'uni-camera', 'uni-canvas', 'uni-checkbox', 'uni-checkbox-group', 'uni-cover-image', 'uni-cover-view', 'uni-form', 'uni-functional-page-navigator', 'uni-icon', 'uni-image', 'uni-input', 'uni-label', 'uni-live-player', 'uni-live-pusher', 'uni-map', 'uni-movable-area', 'uni-movable-view', 'uni-navigator', 'uni-official-account', 'uni-open-data', 'uni-picker', 'uni-picker-view', 'uni-picker-view-column', 'uni-progress', 'uni-radio', 'uni-radio-group', 'uni-rich-text', 'uni-scroll-view', 'uni-slider', 'uni-swiper', 'uni-swiper-item', 'uni-switch', 'uni-text', 'uni-textarea', 'uni-video', 'uni-view', 'uni-web-view']; /***/ }), /***/ "5363": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Friction; }); function Friction(e) { this._drag = e; this._dragLog = Math.log(e); this._x = 0; this._v = 0; this._startTime = 0; } Friction.prototype.set = function (e, t) { this._x = e; this._v = t; this._startTime = new Date().getTime(); }; Friction.prototype.setVelocityByEnd = function (e) { this._v = (e - this._x) * this._dragLog / (Math.pow(this._drag, 100) - 1); }; Friction.prototype.x = function (e) { if (e === undefined) { e = (new Date().getTime() - this._startTime) / 1e3; } var t; t = e === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e); this._dt = e; return this._x + this._v * t / this._dragLog - this._v / this._dragLog; }; Friction.prototype.dx = function (e) { if (e === undefined) { e = (new Date().getTime() - this._startTime) / 1e3; } var t; t = e === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, e); this._dt = e; return this._v * t; }; Friction.prototype.done = function () { return Math.abs(this.dx()) < 3; }; Friction.prototype.reconfigure = function (e) { var t = this.x(); var n = this.dx(); this._drag = e; this._dragLog = Math.log(e); this.set(t, n); }; Friction.prototype.configuration = function () { var e = this; return [{ label: 'Friction', read: function read() { return e._drag; }, write: function write(t) { e.reconfigure(t); }, min: 0.001, max: 0.1, step: 0.001 }]; }; /***/ }), /***/ "5408": /***/ (function(module, exports, __webpack_require__) { var map = { "./button/index.vue": "d3bd", "./canvas/index.vue": "bacd", "./checkbox-group/index.vue": "25ce", "./checkbox/index.vue": "7bb3", "./form/index.vue": "b34d", "./icon/index.vue": "9a8b", "./image/index.vue": "1082", "./input/index.vue": "250d", "./label/index.vue": "70f4", "./movable-area/index.vue": "c61c", "./movable-view/index.vue": "8842", "./navigator/index.vue": "17fd", "./picker-view-column/index.vue": "1955", "./picker-view/index.vue": "27ab", "./picker/index.vue": "c35d", "./progress/index.vue": "9b1f", "./radio-group/index.vue": "d5ec", "./radio/index.vue": "6491", "./resize-sensor/index.vue": "3e8c", "./rich-text/index.vue": "b705", "./scroll-view/index.vue": "f1ef", "./slider/index.vue": "9f96", "./swiper-item/index.vue": "9213", "./swiper/index.vue": "5513", "./switch/index.vue": "4f1c", "./text/index.vue": "4da7", "./textarea/index.vue": "5768", "./view/index.vue": "2bbe" }; function webpackContext(req) { var id = webpackContextResolve(req); return __webpack_require__(id); } function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) { // check for number or string var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; } return id; } webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "5408"; /***/ }), /***/ "5513": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js var touchtrack = __webpack_require__("ba15"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/swiper/index.vue?vue&type=script&lang=js& // /* harmony default export */ var swipervue_type_script_lang_js_ = ({ name: 'Swiper', mixins: [touchtrack["a" /* default */]], props: { indicatorDots: { type: [Boolean, String], default: false }, vertical: { type: [Boolean, String], default: false }, autoplay: { type: [Boolean, String], default: false }, circular: { type: [Boolean, String], default: false }, interval: { type: [Number, String], default: 5e3 }, duration: { type: [Number, String], default: 500 }, current: { type: [Number, String], default: 0 }, indicatorColor: { type: String, default: '' }, indicatorActiveColor: { type: String, default: '' }, previousMargin: { type: String, default: '' }, nextMargin: { type: String, default: '' }, currentItemId: { type: String, default: '' }, skipHiddenItemLayout: { type: [Boolean, String], default: false }, displayMultipleItems: { type: [Number, String], default: 1 } }, data: function data() { return { currentSync: Math.round(this.current) || 0, currentItemIdSync: this.currentItemId || '', userTracking: false, currentChangeSource: '', items: [] }; }, computed: { intervalNumber: function intervalNumber() { var interval = Number(this.interval); return isNaN(interval) ? 5e3 : interval; }, durationNumber: function durationNumber() { var duration = Number(this.duration); return isNaN(duration) ? 500 : duration; }, displayMultipleItemsNumber: function displayMultipleItemsNumber() { var displayMultipleItems = Math.round(this.displayMultipleItems); return isNaN(displayMultipleItems) ? 1 : displayMultipleItems; }, slidesStyle: function slidesStyle() { var style = {}; if (this.nextMargin || this.previousMargin) { style = this.vertical ? { left: 0, right: 0, top: this._upx2px(this.previousMargin), bottom: this._upx2px(this.nextMargin) } : { top: 0, bottom: 0, left: this._upx2px(this.previousMargin), right: this._upx2px(this.nextMargin) }; } return style; }, slideFrameStyle: function slideFrameStyle() { var value = Math.abs(100 / this.displayMultipleItemsNumber) + '%'; return { width: this.vertical ? '100%' : value, height: !this.vertical ? '100%' : value }; }, circularEnabled: function circularEnabled() { return this.circular && this.items.length > this.displayMultipleItemsNumber; } }, watch: { vertical: function vertical() { this._resetLayout(); }, circular: function circular() { this._resetLayout(); }, intervalNumber: function intervalNumber(val) { if (this._timer) { this._cancelSchedule(); this._scheduleAutoplay(); } }, current: function current(val) { this._currentCheck(); }, currentSync: function currentSync(val) { this._currentChanged(val); this.$emit('update:current', val); }, currentItemId: function currentItemId(val) { this._currentCheck(); }, currentItemIdSync: function currentItemIdSync(val) { this.$emit('update:currentItemId', val); }, displayMultipleItemsNumber: function displayMultipleItemsNumber() { this._resetLayout(); } }, created: function created() { this._invalid = true; this._viewportPosition = 0; this._viewportMoveRatio = 1; this._animating = null; this._requestedAnimation = false; this._userDirectionChecked = false; this._contentTrackViewport = 0; this._contentTrackSpeed = 0; this._contentTrackT = 0; }, mounted: function mounted() { var _this = this; this._currentCheck(); this.touchtrack(this.$refs.slidesWrapper, '_handleContentTrack', true); this._resetLayout(); this.$watch(function () { return _this.autoplay && !_this.userTracking; }, this._inintAutoplay); this._inintAutoplay(this.autoplay && !this.userTracking); this.$watch('items.length', this._resetLayout); }, beforeDestroy: function beforeDestroy() { this._cancelSchedule(); }, methods: { _inintAutoplay: function _inintAutoplay(enable) { if (enable) { this._scheduleAutoplay(); } else { this._cancelSchedule(); } }, /** * 页面变更检查和同步 */ _currentCheck: function _currentCheck() { var current = -1; if (this.currentItemId) { for (var i = 0, items = this.items; i < items.length; i++) { var componentInstance = items[i].componentInstance; if (componentInstance && componentInstance.itemId === this.currentItemId) { current = i; break; } } } if (current < 0) { current = Math.round(this.current) || 0; } current = current < 0 ? 0 : current; if (this.currentSync !== current) { this.currentChangeSource = ''; this.currentSync = current; } }, _itemReady: function _itemReady(vnode, callback) { if (vnode.componentInstance && vnode.componentInstance._isMounted) { callback(); } else { vnode._callbacks = vnode._callbacks || []; vnode._callbacks.push(callback); } }, /** * 当前页面变更 */ _currentChanged: function _currentChanged(current) { var _this2 = this; var source = this.currentChangeSource; this.currentChangeSource = ''; if (!source) { this._animateViewport(current, '', 0); } var item = this.items[current]; if (item) { this._itemReady(item, function () { var currentItemId = _this2.currentItemIdSync = item.componentInstance.itemId || ''; _this2.$trigger('change', {}, { current: _this2.currentSync, currentItemId: currentItemId, source: source }); }); } }, /** * 自动播放 */ _scheduleAutoplay: function _scheduleAutoplay() { var self = this; this._cancelSchedule(); function timer() { self._timer = null; self.currentChangeSource = 'autoplay'; if (self.circularEnabled) { self.currentSync = self._normalizeCurrentValue(self.currentSync + 1); } else { self.currentSync = self.currentSync + self.displayMultipleItemsNumber < self.items.length ? self.currentSync + 1 : 0; } self._animateViewport(self.currentSync, 'autoplay', self.circularEnabled ? 1 : 0); self._timer = setTimeout(timer, self.intervalNumber); } if (!(!this._isMounted || this._invalid || this.items.length <= this.displayMultipleItemsNumber)) { this._timer = setTimeout(timer, this.intervalNumber); } }, /** * 清除定时器 */ _cancelSchedule: function _cancelSchedule() { if (this._timer) { clearTimeout(this._timer); this._timer = null; } }, /** * 检查当前页值 */ _normalizeCurrentValue: function _normalizeCurrentValue(current) { var length = this.items.length; if (!length) { return -1; } var index = (Math.round(current) % length + length) % length; if (this.circularEnabled) { if (length <= this.displayMultipleItemsNumber) { return 0; } } else if (index > length - this.displayMultipleItemsNumber) { return length - this.displayMultipleItemsNumber; } return index; }, _upx2px: function _upx2px(val) { if (/\d+[ur]px$/i.test(val)) { val.replace(/\d+[ur]px$/i, function (text) { return "".concat(uni.upx2px(parseFloat(text)), "px"); }); } return val || ''; }, /** * 重新布局 */ _resetLayout: function _resetLayout() { if (this._isMounted) { this._cancelSchedule(); this._endViewportAnimation(); var items = this.items; for (var i = 0; i < items.length; i++) { this._updateItemPos(i, i); } this._viewportMoveRatio = 1; if (this.displayMultipleItemsNumber === 1 && items.length) { var itemRect = items[0].componentInstance.$el.getBoundingClientRect(); var slideFrameRect = this.$refs.slideFrame.getBoundingClientRect(); this._viewportMoveRatio = itemRect.width / slideFrameRect.width; if (!(this._viewportMoveRatio > 0 && this._viewportMoveRatio < 1)) { this._viewportMoveRatio = 1; } } var position = this._viewportPosition; this._viewportPosition = -2; var current = this.currentSync; if (current >= 0) { this._invalid = false; if (this.userTracking) { this._updateViewport(position + current - this._contentTrackViewport); this._contentTrackViewport = current; } else { this._updateViewport(current); if (this.autoplay) { this._scheduleAutoplay(); } } } else { this._invalid = true; this._updateViewport(-this.displayMultipleItemsNumber - 1); } } }, _checkCircularLayout: function _checkCircularLayout(e) { if (!this._invalid) { for (var items = this.items, n = items.length, i = e + this.displayMultipleItemsNumber, r = 0; r < n; r++) { var item = items[r]; var _position = item._position; var s = Math.floor(e / n) * n + r; var l = s + n; var c = s - n; var u = Math.max(e - (s + 1), s - i, 0); var d = Math.max(e - (l + 1), l - i, 0); var h = Math.max(e - (c + 1), c - i, 0); var p = Math.min(u, d, h); var f = [s, l, c][[u, d, h].indexOf(p)]; if (_position !== f) { this._updateItemPos(r, f); } } } }, _updateItemPos: function _updateItemPos(current, position) { var x = this.vertical ? '0' : 100 * position + '%'; var y = this.vertical ? 100 * position + '%' : '0'; var transform = 'translate(' + x + ', ' + y + ') translateZ(0)'; var item = this.items[current]; this._itemReady(item, function () { var el = item.componentInstance.$el; el.style['-webkit-transform'] = transform; el.style.transform = transform; el._position = position; }); }, _updateViewport: function _updateViewport(index) { if (!(Math.floor(2 * this._viewportPosition) === Math.floor(2 * index) && Math.ceil(2 * this._viewportPosition) === Math.ceil(2 * index))) { if (this.circularEnabled) { this._checkCircularLayout(index); } } var x = this.vertical ? '0' : 100 * -index * this._viewportMoveRatio + '%'; var y = this.vertical ? 100 * -index * this._viewportMoveRatio + '%' : '0'; var transform = 'translate(' + x + ', ' + y + ') translateZ(0)'; var slideFrame = this.$refs.slideFrame; if (slideFrame) { slideFrame.style['-webkit-transform'] = transform; slideFrame.style.transform = transform; } this._viewportPosition = index; if (!this._transitionStart) { if (index % 1 === 0) { return; } this._transitionStart = index; } index -= Math.floor(this._transitionStart); if (index <= -(this.items.length - 1)) { index += this.items.length; } else if (index >= this.items.length) { index -= this.items.length; } index = this._transitionStart % 1 > 0.5 || this._transitionStart < 0 ? index - 1 : index; this.$trigger('transition', {}, { dx: this.vertical ? 0 : index * slideFrame.offsetWidth, dy: this.vertical ? index * slideFrame.offsetHeight : 0 }); }, _animateFrameFuncProto: function _animateFrameFuncProto() { var _this3 = this; if (!this._animating) { this._requestedAnimation = false; return; } var _animating = this._animating; var toPos = _animating.toPos; var acc = _animating.acc; var endTime = _animating.endTime; var source = _animating.source; var time = endTime - Date.now(); if (time <= 0) { this._updateViewport(toPos); this._animating = null; this._requestedAnimation = false; this._transitionStart = null; var item = this.items[this.currentSync]; if (item) { this._itemReady(item, function () { var currentItemId = item.componentInstance.itemId || ''; _this3.$trigger('animationfinish', {}, { current: _this3.currentSync, currentItemId: currentItemId, source: source }); }); } return; } var s = acc * time * time / 2; var l = toPos + s; this._updateViewport(l); requestAnimationFrame(this._animateFrameFuncProto.bind(this)); }, _animateViewport: function _animateViewport(current, source, n) { this._cancelViewportAnimation(); var duration = this.durationNumber; var length = this.items.length; var position = this._viewportPosition; if (this.circularEnabled) { if (n < 0) { for (; position < current;) { position += length; } for (; position - length > current;) { position -= length; } } else if (n > 0) { for (; position > current;) { position -= length; } for (; position + length < current;) { position += length; } } else { for (; position + length < current;) { position += length; } for (; position - length > current;) { position -= length; } if (position + length - current < current - position) { position += length; } } } this._animating = { toPos: current, acc: 2 * (position - current) / (duration * duration), endTime: Date.now() + duration, source: source }; if (!this._requestedAnimation) { this._requestedAnimation = true; requestAnimationFrame(this._animateFrameFuncProto.bind(this)); } }, _cancelViewportAnimation: function _cancelViewportAnimation() { this._animating = null; }, /** * 结束动画 */ _endViewportAnimation: function _endViewportAnimation() { if (this._animating) { this._updateViewport(this._animating.toPos); this._animating = null; } }, _handleTrackStart: function _handleTrackStart() { this._cancelSchedule(); this._contentTrackViewport = this._viewportPosition; this._contentTrackSpeed = 0; this._contentTrackT = Date.now(); this._cancelViewportAnimation(); }, _handleTrackMove: function _handleTrackMove(data) { var self = this; var contentTrackT = this._contentTrackT; this._contentTrackT = Date.now(); var length = this.items.length; var other = length - this.displayMultipleItemsNumber; function calc(val) { return 0.5 - 0.25 / (val + 0.5); } function move(oldVal, newVal) { var val = self._contentTrackViewport + oldVal; self._contentTrackSpeed = 0.6 * self._contentTrackSpeed + 0.4 * newVal; if (!self.circularEnabled) { if (val < 0 || val > other) { if (val < 0) { val = -calc(-val); } else { if (val > other) { val = other + calc(val - other); } } self._contentTrackSpeed = 0; } } self._updateViewport(val); } var time = this._contentTrackT - contentTrackT || 1; if (this.vertical) { move(-data.dy / this.$refs.slideFrame.offsetHeight, -data.ddy / time); } else { move(-data.dx / this.$refs.slideFrame.offsetWidth, -data.ddx / time); } }, _handleTrackEnd: function _handleTrackEnd(isCancel) { this.userTracking = false; var t = this._contentTrackSpeed / Math.abs(this._contentTrackSpeed); var n = 0; if (!isCancel && Math.abs(this._contentTrackSpeed) > 0.2) { n = 0.5 * t; } var current = this._normalizeCurrentValue(this._viewportPosition + n); if (isCancel) { this._updateViewport(this._contentTrackViewport); } else { this.currentChangeSource = 'touch'; this.currentSync = current; this._animateViewport(current, 'touch', n !== 0 ? n : current === 0 && this.circularEnabled && this._viewportPosition >= 1 ? 1 : 0); } }, _handleContentTrack: function _handleContentTrack(e) { if (!this._invalid) { if (e.detail.state === 'start') { this.userTracking = true; this._userDirectionChecked = false; return this._handleTrackStart(); } // fixed by xxxxxx if (e.detail.state === 'end') { return this._handleTrackEnd(false); } if (e.detail.state === 'cancel') { return this._handleTrackEnd(true); } if (this.userTracking) { if (!this._userDirectionChecked) { this._userDirectionChecked = true; var t = Math.abs(e.detail.dx); var n = Math.abs(e.detail.dy); if (t >= n && this.vertical) { this.userTracking = false; } else { if (t <= n && !this.vertical) { this.userTracking = false; } } if (!this.userTracking) { if (this.autoplay) { this._scheduleAutoplay(); } return; } } this._handleTrackMove(e.detail); return false; } } } }, render: function render(createElement) { var slidesDots = []; var swiperItems = []; if (this.$slots.default) { this.$slots.default.forEach(function (vnode) { if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-swiper-item') { swiperItems.push(vnode); } }); } for (var index = 0, length = swiperItems.length; index < length; index++) { var currentSync = this.currentSync; slidesDots.push(createElement('div', { class: { 'uni-swiper-dot': true, 'uni-swiper-dot-active': index < currentSync + this.displayMultipleItemsNumber && index >= currentSync || index < currentSync + this.displayMultipleItemsNumber - length }, style: { 'background': index === currentSync ? this.indicatorActiveColor : this.indicatorColor } })); } this.items = swiperItems; var slidesWrapperChild = [createElement('div', { ref: 'slides', style: this.slidesStyle, 'class': 'uni-swiper-slides' }, [createElement('div', { ref: 'slideFrame', class: 'uni-swiper-slide-frame', style: this.slideFrameStyle }, swiperItems)])]; if (this.indicatorDots) { slidesWrapperChild.push(createElement('div', { ref: 'slidesDots', 'class': ['uni-swiper-dots', this.vertical ? 'uni-swiper-dots-vertical' : 'uni-swiper-dots-horizontal'] }, slidesDots)); } return createElement('uni-swiper', [createElement('div', { ref: 'slidesWrapper', 'class': 'uni-swiper-wrapper', on: this.$listeners }, slidesWrapperChild)]); } }); // CONCATENATED MODULE: ./src/core/view/components/swiper/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_swipervue_type_script_lang_js_ = (swipervue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/swiper/index.vue?vue&type=style&index=0&lang=css& var swipervue_type_style_index_0_lang_css_ = __webpack_require__("1c64"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/swiper/index.vue var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_swipervue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var swiper = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "5676": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0950"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "5768": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7050de7c-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/textarea/index.vue?vue&type=template&id=2edd7458& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('uni-textarea',_vm._g({attrs:{"value":_vm._checkEmpty(_vm.value),"maxlength":_vm.maxlengthNumber,"placeholder":_vm._checkEmpty(_vm.placeholder),"disabled":_vm.disabled,"focus":_vm.focus,"auto-focus":_vm.autoFocus,"placeholder-class":_vm._checkEmpty(_vm.placeholderClass),"placeholder-style":_vm._checkEmpty(_vm.placeholderStyle),"auto-height":_vm.autoHeight,"cursor":_vm.cursorNumber,"selection-start":_vm.selectionStartNumber,"selection-end":_vm.selectionEndNumber},on:{"change":function($event){$event.stopPropagation();}}},_vm.$listeners),[_c('div',{staticClass:"uni-textarea-wrapper"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(!(_vm.composition||_vm.valueSync.length)),expression:"!(composition||valueSync.length)"}],ref:"placeholder",staticClass:"uni-textarea-placeholder",class:_vm.placeholderClass,style:(_vm.placeholderStyle)},[_vm._v(_vm._s(_vm.placeholder))]),_c('div',{staticClass:"uni-textarea-compute"},[_vm._l((_vm.valueCompute),function(item,index){return _c('div',{key:index},[_vm._v(_vm._s(item.trim() ? item : '.'))])}),_c('v-uni-resize-sensor',{ref:"sensor",on:{"resize":_vm._resize}})],2),_c('textarea',{directives:[{name:"model",rawName:"v-model",value:(_vm.valueSync),expression:"valueSync"}],ref:"textarea",staticClass:"uni-textarea-textarea",class:{'uni-textarea-textarea-ios': _vm.isIOS},attrs:{"disabled":_vm.disabled,"maxlength":_vm.maxlengthNumber,"autofocus":_vm.autoFocus},domProps:{"value":(_vm.valueSync)},on:{"compositionstart":_vm._compositionstart,"compositionend":_vm._compositionend,"input":[function($event){if($event.target.composing){ return; }_vm.valueSync=$event.target.value},function($event){$event.stopPropagation();return _vm._input($event)}],"focus":_vm._focus,"blur":_vm._blur,"&touchstart":function($event){return _vm._touchstart($event)}}})])])} var staticRenderFns = [] // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue?vue&type=template&id=2edd7458& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__("8af1"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/textarea/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var textareavue_type_script_lang_js_ = ({ name: 'Textarea', mixins: [mixins["a" /* emitter */]], model: { prop: 'value', event: 'update:value' }, props: { name: { type: String, default: '' }, value: { type: [String, Number], default: '' }, maxlength: { type: [Number, String], default: 140 }, placeholder: { type: String, default: '' }, disabled: { type: [Boolean, String], default: false }, focus: { type: [Boolean, String], default: false }, autoFocus: { type: [Boolean, String], default: false }, placeholderClass: { type: String, default: '' }, placeholderStyle: { type: String, default: '' }, autoHeight: { type: [Boolean, String], default: false }, cursor: { type: [Number, String], default: -1 }, selectionStart: { type: [Number, String], default: -1 }, selectionEnd: { type: [Number, String], default: -1 } }, data: function data() { return { valueSync: String(this.value), valueComposition: '', composition: false, focusSync: this.focus, height: 0, focusChangeSource: '', isIOS: String(navigator.platform).indexOf('iP') === 0 && String(navigator.vendor).indexOf('Apple') === 0 }; }, computed: { maxlengthNumber: function maxlengthNumber() { var maxlength = Number(this.maxlength); return isNaN(maxlength) ? 140 : maxlength; }, cursorNumber: function cursorNumber() { var cursor = Number(this.cursor); return isNaN(cursor) ? -1 : cursor; }, selectionStartNumber: function selectionStartNumber() { var selectionStart = Number(this.selectionStart); return isNaN(selectionStart) ? -1 : selectionStart; }, selectionEndNumber: function selectionEndNumber() { var selectionEnd = Number(this.selectionEnd); return isNaN(selectionEnd) ? -1 : selectionEnd; }, valueCompute: function valueCompute() { return (this.composition ? this.valueComposition : this.valueSync).split('\n'); } }, watch: { value: function value(val) { this.valueSync = String(val); }, valueSync: function valueSync(val) { if (val !== this._oldValue) { this._oldValue = val; this.$trigger('input', {}, { value: val, cursor: this.$refs.textarea.selectionEnd }); this.$emit('update:value', val); } }, focus: function focus(val) { if (val) { this.focusChangeSource = 'focus'; if (this.$refs.textarea) { this.$refs.textarea.focus(); } } else { if (this.$refs.textarea) { this.$refs.textarea.blur(); } } }, focusSync: function focusSync(val) { this.$emit('update:focus', val); this._checkSelection(); this._checkCursor(); }, cursorNumber: function cursorNumber() { this._checkCursor(); }, selectionStartNumber: function selectionStartNumber() { this._checkSelection(); }, selectionEndNumber: function selectionEndNumber() { this._checkSelection(); }, height: function height(_height) { var lineHeight = getComputedStyle(this.$el).lineHeight.replace('px', ''); var lineCount = Math.round(_height / lineHeight); this.$trigger('linechange', {}, { height: _height, heightRpx: 750 / window.innerWidth * _height, lineCount: lineCount }); if (this.autoHeight) { this.$el.style.height = this.height + 'px'; } } }, created: function created() { this.$dispatch('Form', 'uni-form-group-update', { type: 'add', vm: this }); }, mounted: function mounted() { this._oldValue = this.$refs.textarea.value = this.valueSync; this._resize({ height: this.$refs.sensor.$el.offsetHeight }); }, beforeDestroy: function beforeDestroy() { this.$dispatch('Form', 'uni-form-group-update', { type: 'remove', vm: this }); }, methods: { _focus: function _focus($event) { this.focusSync = true; this.$trigger('focus', $event, { value: this.valueSync }); }, _checkSelection: function _checkSelection() { if (this.focusSync && !this.focusChangeSource && this.selectionStartNumber > -1 && this.selectionEndNumber > -1) { this.$refs.textarea.selectionStart = this.selectionStartNumber; this.$refs.textarea.selectionEnd = this.selectionEndNumber; } }, _checkCursor: function _checkCursor() { if (this.focusSync && (this.focusChangeSource === 'focus' || !this.focusChangeSource && this.selectionStartNumber < 0 && this.selectionEndNumber < 0) && this.cursorNumber > -1) { this.$refs.textarea.selectionEnd = this.$refs.textarea.selectionStart = this.cursorNumber; } }, _blur: function _blur($event) { this.focusSync = false; this.$trigger('blur', $event, { value: this.valueSync, cursor: this.$refs.textarea.selectionEnd }); }, _compositionstart: function _compositionstart($event) { this.composition = true; }, _compositionend: function _compositionend($event) { this.composition = false; }, // 暂无完成按钮,此功能未实现 _confirm: function _confirm($event) { this.$trigger('confirm', $event, { value: this.valueSync }); }, _linechange: function _linechange($event) { this.$trigger('linechange', $event, { value: this.valueSync }); }, _touchstart: function _touchstart() { this.focusChangeSource = 'touch'; }, _resize: function _resize(_ref) { var height = _ref.height; this.height = height; }, _input: function _input($event) { if (this.composition) { this.valueComposition = $event.target.value; } }, _getFormData: function _getFormData() { return { value: this.valueSync, key: this.name }; }, _resetFormData: function _resetFormData() { this.valueSync = ''; }, _checkEmpty: function _checkEmpty(str) { return str || false; } } }); // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_textareavue_type_script_lang_js_ = (textareavue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/textarea/index.vue?vue&type=style&index=0&lang=css& var textareavue_type_style_index_0_lang_css_ = __webpack_require__("9400"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_textareavue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var components_textarea = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "599d": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // CONCATENATED MODULE: ./src/core/service/api/base/upx2px.js var EPS = 1e-4; var BASE_DEVICE_WIDTH = 750; var isIOS = false; var deviceWidth = 0; var deviceDPR = 0; function checkDeviceWidth() { var _uni$getSystemInfoSyn = uni.getSystemInfoSync(), platform = _uni$getSystemInfoSyn.platform, pixelRatio = _uni$getSystemInfoSyn.pixelRatio, windowWidth = _uni$getSystemInfoSyn.windowWidth; deviceWidth = windowWidth; deviceDPR = pixelRatio; isIOS = platform === 'ios'; } function upx2px(number, newDeviceWidth) { if (deviceWidth === 0) { checkDeviceWidth(); } number = Number(number); if (number === 0) { return 0; } var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth); if (result < 0) { result = -result; } result = Math.floor(result + EPS); if (result === 0) { if (deviceDPR === 1 || !isIOS) { return 1; } else { return 0.5; } } return number < 0 ? -result : result; } // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-window-offset.js var get_window_offset = __webpack_require__("1e88"); // EXTERNAL MODULE: ./node_modules/safe-area-insets/out/index.js var out = __webpack_require__("d8c8"); var out_default = /*#__PURE__*/__webpack_require__.n(out); // CONCATENATED MODULE: ./src/platforms/h5/service/api/device/get-system-info.js var ua = navigator.userAgent; /** * 是否安卓设备 */ var isAndroid = /android/i.test(ua); /** * 是否iOS设备 */ var get_system_info_isIOS = /iphone|ipad|ipod/i.test(ua); /** * 获取系统信息-同步 */ function getSystemInfoSync() { var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var screen = window.screen; var pixelRatio = window.devicePixelRatio; var screenWidth = screen.width; var screenHeight = screen.height; var language = navigator.language; var statusBarHeight = 0; var osname; var osversion; var model; if (get_system_info_isIOS) { osname = 'iOS'; var osversionFind = ua.match(/OS\s([\w_]+)\slike/); if (osversionFind) { osversion = osversionFind[1].replace(/_/g, '.'); } var modelFind = ua.match(/\(([a-zA-Z]+);/); if (modelFind) { model = modelFind[1]; } } else if (isAndroid) { osname = 'Android'; // eslint-disable-next-line no-useless-escape var _osversionFind = ua.match(/Android[\s/]([\w\.]+)[;\s]/); if (_osversionFind) { osversion = _osversionFind[1]; } var infoFind = ua.match(/\((.+?)\)/); var infos = infoFind ? infoFind[1].split(';') : ua.split(' '); // eslint-disable-next-line no-useless-escape var otherInfo = [/\bAndroid\b/i, /\bLinux\b/i, /\bU\b/i, /^\s?[a-z][a-z]$/i, /^\s?[a-z][a-z]-[a-z][a-z]$/i, /\bwv\b/i, /\/[\d\.,]+$/, /^\s?[\d\.,]+$/, /\bBrowser\b/i, /\bMobile\b/i]; for (var i = 0; i < infos.length; i++) { var info = infos[i]; if (info.indexOf('Build') > 0) { model = info.split('Build')[0].trim(); break; } var other = void 0; for (var o = 0; o < otherInfo.length; o++) { if (otherInfo[o].test(info)) { other = true; break; } } if (!other) { model = info.trim(); break; } } } else { osname = 'Other'; osversion = '0'; } var system = "".concat(osname, " ").concat(osversion); var platform = osname.toLocaleLowerCase(); var safeArea = { left: out_default.a.left, right: windowWidth - out_default.a.right, top: out_default.a.top, bottom: windowHeight - out_default.a.bottom, width: windowWidth - out_default.a.left - out_default.a.right, height: windowHeight - out_default.a.top - out_default.a.bottom }; var _getWindowOffset = Object(get_window_offset["a" /* default */])(), windowTop = _getWindowOffset.top, windowBottom = _getWindowOffset.bottom; windowHeight -= windowTop; windowHeight -= windowBottom; return { windowTop: windowTop, windowBottom: windowBottom, windowWidth: windowWidth, windowHeight: windowHeight, pixelRatio: pixelRatio, screenWidth: screenWidth, screenHeight: screenHeight, language: language, statusBarHeight: statusBarHeight, system: system, platform: platform, model: model, safeArea: safeArea }; } /** * 获取系统信息-异步 */ function getSystemInfo() { return getSystemInfoSync(); } // CONCATENATED MODULE: ./lib/app-plus/view-api.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return canIUse; }); /* concated harmony reexport upx2px */__webpack_require__.d(__webpack_exports__, "c", function() { return upx2px; }); /* concated harmony reexport getSystemInfoSync */__webpack_require__.d(__webpack_exports__, "b", function() { return getSystemInfoSync; }); function canIUse(schema) { if (schema === 'css.var') { return window.CSS && window.CSS.supports && window.CSS.supports('--a', 0); } return true; } /***/ }), /***/ "5ab3": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fcd8"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "5abe": /***/ (function(module, exports) { /** * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE. * * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document * */ (function() { 'use strict'; // Exit early if we're not running in a browser. if (typeof window !== 'object') { return; } // Exit early if all IntersectionObserver and IntersectionObserverEntry // features are natively supported. if ('IntersectionObserver' in window && 'IntersectionObserverEntry' in window && 'intersectionRatio' in window.IntersectionObserverEntry.prototype) { // Minimal polyfill for Edge 15's lack of `isIntersecting` // See: https://github.com/w3c/IntersectionObserver/issues/211 if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) { Object.defineProperty(window.IntersectionObserverEntry.prototype, 'isIntersecting', { get: function () { return this.intersectionRatio > 0; } }); } return; } /** * A local reference to the document. */ var document = window.document; /** * An IntersectionObserver registry. This registry exists to hold a strong * reference to IntersectionObserver instances currently observing a target * element. Without this registry, instances without another reference may be * garbage collected. */ var registry = []; /** * Creates the global IntersectionObserverEntry constructor. * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry * @param {Object} entry A dictionary of instance properties. * @constructor */ function IntersectionObserverEntry(entry) { this.time = entry.time; this.target = entry.target; this.rootBounds = entry.rootBounds; this.boundingClientRect = entry.boundingClientRect; this.intersectionRect = entry.intersectionRect || getEmptyRect(); this.isIntersecting = !!entry.intersectionRect; // Calculates the intersection ratio. var targetRect = this.boundingClientRect; var targetArea = targetRect.width * targetRect.height; var intersectionRect = this.intersectionRect; var intersectionArea = intersectionRect.width * intersectionRect.height; // Sets intersection ratio. if (targetArea) { // Round the intersection ratio to avoid floating point math issues: // https://github.com/w3c/IntersectionObserver/issues/324 this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4)); } else { // If area is zero and is intersecting, sets to 1, otherwise to 0 this.intersectionRatio = this.isIntersecting ? 1 : 0; } } /** * Creates the global IntersectionObserver constructor. * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface * @param {Function} callback The function to be invoked after intersection * changes have queued. The function is not invoked if the queue has * been emptied by calling the `takeRecords` method. * @param {Object=} opt_options Optional configuration options. * @constructor */ function IntersectionObserver(callback, opt_options) { var options = opt_options || {}; if (typeof callback != 'function') { throw new Error('callback must be a function'); } if (options.root && options.root.nodeType != 1) { throw new Error('root must be an Element'); } // Binds and throttles `this._checkForIntersections`. this._checkForIntersections = throttle( this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT); // Private properties. this._callback = callback; this._observationTargets = []; this._queuedEntries = []; this._rootMarginValues = this._parseRootMargin(options.rootMargin); // Public properties. this.thresholds = this._initThresholds(options.threshold); this.root = options.root || null; this.rootMargin = this._rootMarginValues.map(function(margin) { return margin.value + margin.unit; }).join(' '); } /** * The minimum interval within which the document will be checked for * intersection changes. */ IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100; /** * The frequency in which the polyfill polls for intersection changes. * this can be updated on a per instance basis and must be set prior to * calling `observe` on the first target. */ IntersectionObserver.prototype.POLL_INTERVAL = null; /** * Use a mutation observer on the root element * to detect intersection changes. */ IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true; /** * Starts observing a target element for intersection changes based on * the thresholds values. * @param {Element} target The DOM element to observe. */ IntersectionObserver.prototype.observe = function(target) { var isTargetAlreadyObserved = this._observationTargets.some(function(item) { return item.element == target; }); if (isTargetAlreadyObserved) { return; } if (!(target && target.nodeType == 1)) { throw new Error('target must be an Element'); } this._registerInstance(); this._observationTargets.push({element: target, entry: null}); this._monitorIntersections(); this._checkForIntersections(); }; /** * Stops observing a target element for intersection changes. * @param {Element} target The DOM element to observe. */ IntersectionObserver.prototype.unobserve = function(target) { this._observationTargets = this._observationTargets.filter(function(item) { return item.element != target; }); if (!this._observationTargets.length) { this._unmonitorIntersections(); this._unregisterInstance(); } }; /** * Stops observing all target elements for intersection changes. */ IntersectionObserver.prototype.disconnect = function() { this._observationTargets = []; this._unmonitorIntersections(); this._unregisterInstance(); }; /** * Returns any queue entries that have not yet been reported to the * callback and clears the queue. This can be used in conjunction with the * callback to obtain the absolute most up-to-date intersection information. * @return {Array} The currently queued entries. */ IntersectionObserver.prototype.takeRecords = function() { var records = this._queuedEntries.slice(); this._queuedEntries = []; return records; }; /** * Accepts the threshold value from the user configuration object and * returns a sorted array of unique threshold values. If a value is not * between 0 and 1 and error is thrown. * @private * @param {Array|number=} opt_threshold An optional threshold value or * a list of threshold values, defaulting to [0]. * @return {Array} A sorted list of unique and valid threshold values. */ IntersectionObserver.prototype._initThresholds = function(opt_threshold) { var threshold = opt_threshold || [0]; if (!Array.isArray(threshold)) threshold = [threshold]; return threshold.sort().filter(function(t, i, a) { if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) { throw new Error('threshold must be a number between 0 and 1 inclusively'); } return t !== a[i - 1]; }); }; /** * Accepts the rootMargin value from the user configuration object * and returns an array of the four margin values as an object containing * the value and unit properties. If any of the values are not properly * formatted or use a unit other than px or %, and error is thrown. * @private * @param {string=} opt_rootMargin An optional rootMargin value, * defaulting to '0px'. * @return {Array} An array of margin objects with the keys * value and unit. */ IntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) { var marginString = opt_rootMargin || '0px'; var margins = marginString.split(/\s+/).map(function(margin) { var parts = /^(-?\d*\.?\d+)(px|%)$/.exec(margin); if (!parts) { throw new Error('rootMargin must be specified in pixels or percent'); } return {value: parseFloat(parts[1]), unit: parts[2]}; }); // Handles shorthand. margins[1] = margins[1] || margins[0]; margins[2] = margins[2] || margins[0]; margins[3] = margins[3] || margins[1]; return margins; }; /** * Starts polling for intersection changes if the polling is not already * happening, and if the page's visibility state is visible. * @private */ IntersectionObserver.prototype._monitorIntersections = function() { if (!this._monitoringIntersections) { this._monitoringIntersections = true; // If a poll interval is set, use polling instead of listening to // resize and scroll events or DOM mutations. if (this.POLL_INTERVAL) { this._monitoringInterval = setInterval( this._checkForIntersections, this.POLL_INTERVAL); } else { addEvent(window, 'resize', this._checkForIntersections, true); addEvent(document, 'scroll', this._checkForIntersections, true); if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) { this._domObserver = new MutationObserver(this._checkForIntersections); this._domObserver.observe(document, { attributes: true, childList: true, characterData: true, subtree: true }); } } } }; /** * Stops polling for intersection changes. * @private */ IntersectionObserver.prototype._unmonitorIntersections = function() { if (this._monitoringIntersections) { this._monitoringIntersections = false; clearInterval(this._monitoringInterval); this._monitoringInterval = null; removeEvent(window, 'resize', this._checkForIntersections, true); removeEvent(document, 'scroll', this._checkForIntersections, true); if (this._domObserver) { this._domObserver.disconnect(); this._domObserver = null; } } }; /** * Scans each observation target for intersection changes and adds them * to the internal entries queue. If new entries are found, it * schedules the callback to be invoked. * @private */ IntersectionObserver.prototype._checkForIntersections = function() { var rootIsInDom = this._rootIsInDom(); var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect(); this._observationTargets.forEach(function(item) { var target = item.element; var targetRect = getBoundingClientRect(target); var rootContainsTarget = this._rootContainsTarget(target); var oldEntry = item.entry; var intersectionRect = rootIsInDom && rootContainsTarget && this._computeTargetAndRootIntersection(target, rootRect); var newEntry = item.entry = new IntersectionObserverEntry({ time: now(), target: target, boundingClientRect: targetRect, rootBounds: rootRect, intersectionRect: intersectionRect }); if (!oldEntry) { this._queuedEntries.push(newEntry); } else if (rootIsInDom && rootContainsTarget) { // If the new entry intersection ratio has crossed any of the // thresholds, add a new entry. if (this._hasCrossedThreshold(oldEntry, newEntry)) { this._queuedEntries.push(newEntry); } } else { // If the root is not in the DOM or target is not contained within // root but the previous entry for this target had an intersection, // add a new record indicating removal. if (oldEntry && oldEntry.isIntersecting) { this._queuedEntries.push(newEntry); } } }, this); if (this._queuedEntries.length) { this._callback(this.takeRecords(), this); } }; /** * Accepts a target and root rect computes the intersection between then * following the algorithm in the spec. * TODO(philipwalton): at this time clip-path is not considered. * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo * @param {Element} target The target DOM element * @param {Object} rootRect The bounding rect of the root after being * expanded by the rootMargin value. * @return {?Object} The final intersection rect object or undefined if no * intersection is found. * @private */ IntersectionObserver.prototype._computeTargetAndRootIntersection = function(target, rootRect) { // If the element isn't displayed, an intersection can't happen. if (window.getComputedStyle(target).display == 'none') return; var targetRect = getBoundingClientRect(target); var intersectionRect = targetRect; var parent = getParentNode(target); var atRoot = false; while (!atRoot) { var parentRect = null; var parentComputedStyle = parent.nodeType == 1 ? window.getComputedStyle(parent) : {}; // If the parent isn't displayed, an intersection can't happen. if (parentComputedStyle.display == 'none') return; if (parent == this.root || parent == document) { atRoot = true; parentRect = rootRect; } else { // If the element has a non-visible overflow, and it's not the // or element, update the intersection rect. // Note: and cannot be clipped to a rect that's not also // the document rect, so no need to compute a new intersection. if (parent != document.body && parent != document.documentElement && parentComputedStyle.overflow != 'visible') { parentRect = getBoundingClientRect(parent); } } // If either of the above conditionals set a new parentRect, // calculate new intersection data. if (parentRect) { intersectionRect = computeRectIntersection(parentRect, intersectionRect); if (!intersectionRect) break; } parent = getParentNode(parent); } return intersectionRect; }; /** * Returns the root rect after being expanded by the rootMargin value. * @return {Object} The expanded root rect. * @private */ IntersectionObserver.prototype._getRootRect = function() { var rootRect; if (this.root) { rootRect = getBoundingClientRect(this.root); } else { // Use / instead of window since scroll bars affect size. var html = document.documentElement; var body = document.body; rootRect = { top: 0, left: 0, right: html.clientWidth || body.clientWidth, width: html.clientWidth || body.clientWidth, bottom: html.clientHeight || body.clientHeight, height: html.clientHeight || body.clientHeight }; } return this._expandRectByRootMargin(rootRect); }; /** * Accepts a rect and expands it by the rootMargin value. * @param {Object} rect The rect object to expand. * @return {Object} The expanded rect. * @private */ IntersectionObserver.prototype._expandRectByRootMargin = function(rect) { var margins = this._rootMarginValues.map(function(margin, i) { return margin.unit == 'px' ? margin.value : margin.value * (i % 2 ? rect.width : rect.height) / 100; }); var newRect = { top: rect.top - margins[0], right: rect.right + margins[1], bottom: rect.bottom + margins[2], left: rect.left - margins[3] }; newRect.width = newRect.right - newRect.left; newRect.height = newRect.bottom - newRect.top; return newRect; }; /** * Accepts an old and new entry and returns true if at least one of the * threshold values has been crossed. * @param {?IntersectionObserverEntry} oldEntry The previous entry for a * particular target element or null if no previous entry exists. * @param {IntersectionObserverEntry} newEntry The current entry for a * particular target element. * @return {boolean} Returns true if a any threshold has been crossed. * @private */ IntersectionObserver.prototype._hasCrossedThreshold = function(oldEntry, newEntry) { // To make comparing easier, an entry that has a ratio of 0 // but does not actually intersect is given a value of -1 var oldRatio = oldEntry && oldEntry.isIntersecting ? oldEntry.intersectionRatio || 0 : -1; var newRatio = newEntry.isIntersecting ? newEntry.intersectionRatio || 0 : -1; // Ignore unchanged ratios if (oldRatio === newRatio) return; for (var i = 0; i < this.thresholds.length; i++) { var threshold = this.thresholds[i]; // Return true if an entry matches a threshold or if the new ratio // and the old ratio are on the opposite sides of a threshold. if (threshold == oldRatio || threshold == newRatio || threshold < oldRatio !== threshold < newRatio) { return true; } } }; /** * Returns whether or not the root element is an element and is in the DOM. * @return {boolean} True if the root element is an element and is in the DOM. * @private */ IntersectionObserver.prototype._rootIsInDom = function() { return !this.root || containsDeep(document, this.root); }; /** * Returns whether or not the target element is a child of root. * @param {Element} target The target element to check. * @return {boolean} True if the target element is a child of root. * @private */ IntersectionObserver.prototype._rootContainsTarget = function(target) { return containsDeep(this.root || document, target); }; /** * Adds the instance to the global IntersectionObserver registry if it isn't * already present. * @private */ IntersectionObserver.prototype._registerInstance = function() { if (registry.indexOf(this) < 0) { registry.push(this); } }; /** * Removes the instance from the global IntersectionObserver registry. * @private */ IntersectionObserver.prototype._unregisterInstance = function() { var index = registry.indexOf(this); if (index != -1) registry.splice(index, 1); }; /** * Returns the result of the performance.now() method or null in browsers * that don't support the API. * @return {number} The elapsed time since the page was requested. */ function now() { return window.performance && performance.now && performance.now(); } /** * Throttles a function and delays its execution, so it's only called at most * once within a given time period. * @param {Function} fn The function to throttle. * @param {number} timeout The amount of time that must pass before the * function can be called again. * @return {Function} The throttled function. */ function throttle(fn, timeout) { var timer = null; return function () { if (!timer) { timer = setTimeout(function() { fn(); timer = null; }, timeout); } }; } /** * Adds an event handler to a DOM node ensuring cross-browser compatibility. * @param {Node} node The DOM node to add the event handler to. * @param {string} event The event name. * @param {Function} fn The event handler to add. * @param {boolean} opt_useCapture Optionally adds the even to the capture * phase. Note: this only works in modern browsers. */ function addEvent(node, event, fn, opt_useCapture) { if (typeof node.addEventListener == 'function') { node.addEventListener(event, fn, opt_useCapture || false); } else if (typeof node.attachEvent == 'function') { node.attachEvent('on' + event, fn); } } /** * Removes a previously added event handler from a DOM node. * @param {Node} node The DOM node to remove the event handler from. * @param {string} event The event name. * @param {Function} fn The event handler to remove. * @param {boolean} opt_useCapture If the event handler was added with this * flag set to true, it should be set to true here in order to remove it. */ function removeEvent(node, event, fn, opt_useCapture) { if (typeof node.removeEventListener == 'function') { node.removeEventListener(event, fn, opt_useCapture || false); } else if (typeof node.detatchEvent == 'function') { node.detatchEvent('on' + event, fn); } } /** * Returns the intersection between two rect objects. * @param {Object} rect1 The first rect. * @param {Object} rect2 The second rect. * @return {?Object} The intersection rect or undefined if no intersection * is found. */ function computeRectIntersection(rect1, rect2) { var top = Math.max(rect1.top, rect2.top); var bottom = Math.min(rect1.bottom, rect2.bottom); var left = Math.max(rect1.left, rect2.left); var right = Math.min(rect1.right, rect2.right); var width = right - left; var height = bottom - top; return (width >= 0 && height >= 0) && { top: top, bottom: bottom, left: left, right: right, width: width, height: height }; } /** * Shims the native getBoundingClientRect for compatibility with older IE. * @param {Element} el The element whose bounding rect to get. * @return {Object} The (possibly shimmed) rect of the element. */ function getBoundingClientRect(el) { var rect; try { rect = el.getBoundingClientRect(); } catch (err) { // Ignore Windows 7 IE11 "Unspecified error" // https://github.com/w3c/IntersectionObserver/pull/205 } if (!rect) return getEmptyRect(); // Older IE if (!(rect.width && rect.height)) { rect = { top: rect.top, right: rect.right, bottom: rect.bottom, left: rect.left, width: rect.right - rect.left, height: rect.bottom - rect.top }; } return rect; } /** * Returns an empty rect object. An empty rect is returned when an element * is not in the DOM. * @return {Object} The empty rect. */ function getEmptyRect() { return { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }; } /** * Checks to see if a parent element contains a child element (including inside * shadow DOM). * @param {Node} parent The parent element. * @param {Node} child The child element. * @return {boolean} True if the parent node contains the child node. */ function containsDeep(parent, child) { var node = child; while (node) { if (node == parent) return true; node = getParentNode(node); } return false; } /** * Gets the parent node of an element or its host element if the parent node * is a shadow root. * @param {Node} node The node whose parent to get. * @return {Node|null} The parent node or null if no parent exists. */ function getParentNode(node) { var parent = node.parentNode; if (parent && parent.nodeType == 11 && parent.host) { // If the parent is a shadow root, return the host element. return parent.host; } if (parent && parent.assignedSlot) { // If the parent is distributed in a , return the parent of a slot. return parent.assignedSlot.parentNode; } return parent; } // Exposes the constructors globally. window.IntersectionObserver = IntersectionObserver; window.IntersectionObserverEntry = IntersectionObserverEntry; }()); /***/ }), /***/ "5bb5": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return publishHandler; }); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a20d"); function plusReady(callback) { if (!callback) { return; } if (window.plus) { return callback(); } document.addEventListener('plusready', callback); } function publishHandler(event) { var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; plusReady(function () { plus.webview.postMessageToUniNView({ type: 'subscribeHandler', args: { type: event, data: args, pageId: plus.webview.currentWebview().id } }, _constants__WEBPACK_IMPORTED_MODULE_0__[/* APP_SERVICE_ID */ "a"]); }); } /***/ }), /***/ "5dc1": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return requestComponentObserver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return destroyComponentObserver; }); /* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5abe"); /* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(intersection_observer__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("85b6"); function getRect(rect) { return { bottom: rect.bottom, height: rect.height, left: rect.left, right: rect.right, top: rect.top, width: rect.width }; } var intersectionObservers = {}; function requestComponentObserver(_ref, pageId) { var reqId = _ref.reqId, options = _ref.options; var pages = getCurrentPages(); var pageVm = pages.find(function (page) { return page.$page.id === pageId; }); if (!pageVm) { throw new Error("Not Found\uFF1APage[".concat(pageId, "]")); } var $el = pageVm.$el; var root = options.relativeToSelector ? $el.querySelector(options.relativeToSelector) : null; var intersectionObserver = intersectionObservers[reqId] = new IntersectionObserver(function (entries, observer) { entries.forEach(function (entrie) { UniViewJSBridge.publishHandler('onRequestComponentObserver', { reqId: reqId, res: { intersectionRatio: entrie.intersectionRatio, intersectionRect: getRect(entrie.intersectionRect), boundingClientRect: getRect(entrie.boundingClientRect), relativeRect: getRect(entrie.rootBounds), time: Date.now(), dataset: Object(uni_helpers_index__WEBPACK_IMPORTED_MODULE_1__[/* normalizeDataset */ "a"])(entrie.target.dataset || {}), id: entrie.target.id } }, pageVm.$page.id); }); }, { root: root, rootMargin: options.rootMargin, threshold: options.thresholds }); if (options.observeAll) { intersectionObserver.USE_MUTATION_OBSERVER = true; Array.prototype.map.call($el.querySelectorAll(options.selector), function (el) { intersectionObserver.observe(el); }); } else { intersectionObserver.USE_MUTATION_OBSERVER = false; intersectionObserver.observe($el.querySelector(options.selector)); } } function destroyComponentObserver(_ref2) { var reqId = _ref2.reqId; var intersectionObserver = intersectionObservers[reqId]; if (intersectionObserver) { intersectionObserver.disconnect(); UniViewJSBridge.publishHandler('onRequestComponentObserver', { reqId: reqId, reqEnd: true }); } } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("501c"))) /***/ }), /***/ "6062": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("748c"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "6144": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "61c2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./src/shared/index.js + 4 modules var shared = __webpack_require__("f2b3"); // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__("8af1"); // CONCATENATED MODULE: ./src/core/view/plugins/behaviors/form-field.js /** * uni://form-field */ function created() { this.$dispatch('Form', 'uni-form-group-update', { type: 'add', vm: this }); } function beforeDestroy() { this.$dispatch('Form', 'uni-form-group-update', { type: 'remove', vm: this }); } /* harmony default export */ var form_field = ({ name: 'uni://form-field', init: function init(options, vm) { if (!vm.constructor.options.props || !vm.constructor.options.props.name || !vm.constructor.options.props.value) { // 未初始化 props if (!vm.constructor.options.props) { vm.constructor.options.props = {}; } if (!vm.constructor.options.props.name) { vm.constructor.options.props.name = options.props.name = { type: String }; } if (!vm.constructor.options.props.value) { vm.constructor.options.props.value = options.props.value = { type: null }; } } if (!options.propsData) { options.propsData = {}; } var $vnode = vm.$vnode; if ($vnode && $vnode.data && $vnode.data.attrs) { if (Object(shared["b" /* hasOwn */])($vnode.data.attrs, 'name')) { options.propsData.name = $vnode.data.attrs.name; } if (Object(shared["b" /* hasOwn */])($vnode.data.attrs, 'value')) { options.propsData.value = $vnode.data.attrs.value; } } if (!vm.constructor.options.methods || !vm.constructor.options.methods._getFormData) { // 未初始化 methods if (!vm.constructor.options.methods) { vm.constructor.options.methods = {}; } if (!options.methods) { options.methods = {}; } var formMethods = { _getFormData: function _getFormData() { return this.name ? { key: this.name, value: this.value } : {}; }, _resetFormData: function _resetFormData() { this.value = ''; } }; Object.assign(vm.constructor.options.methods, formMethods); Object.assign(options.methods, formMethods); // add $dispatch Object.assign(vm.constructor.options.methods, mixins["a" /* emitter */].methods); Object.assign(options.methods, mixins["a" /* emitter */].methods); var createdHooks = options['created']; vm.constructor.options['created'] = options['created'] = createdHooks ? [].concat(created, createdHooks) : [created]; var beforeDestroyHooks = options['beforeDestroy']; vm.constructor.options['beforeDestroy'] = options['beforeDestroy'] = beforeDestroyHooks ? [].concat(beforeDestroy, beforeDestroyHooks) : [beforeDestroy]; } } }); // CONCATENATED MODULE: ./src/core/view/plugins/behaviors/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initBehaviors; }); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var behaviors = _defineProperty({}, form_field.name, form_field); function initBehaviors(options, vm) { options.behaviors.forEach(function (name) { var behavior = behaviors[name]; behavior && behavior.init(options, vm); }); } /***/ }), /***/ "634a": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge, global) {/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("675f"); /* harmony import */ var uni_core_view_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("a464"); /* harmony import */ var uni_core_view_index_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(uni_core_view_index_css__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var uni_platform_view_framework_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9856"); /* harmony import */ var uni_platform_view_framework_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("88ef"); /* harmony import */ var uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("7d0f"); /* harmony import */ var _view_api_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("599d"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["a"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["b"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["c"]; }); global.UniViewJSBridge = { publishHandler: UniViewJSBridge.publishHandler, subscribeHandler: UniViewJSBridge.subscribeHandler }; global.__registerConfig = uni_platform_view_framework_config__WEBPACK_IMPORTED_MODULE_3__[/* registerConfig */ "a"]; global.__registerPage = uni_platform_view_framework_page__WEBPACK_IMPORTED_MODULE_2__[/* definePage */ "b"]; global.Vue = vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]; vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].use(uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]); __webpack_require__("1efd"); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("501c"), __webpack_require__("24aa"))) /***/ }), /***/ "6428": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c99c"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "6491": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7050de7c-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio/index.vue?vue&type=template&id=84e2ee82& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('uni-radio',_vm._g({on:{"click":_vm._onClick}},_vm.$listeners),[_c('div',{staticClass:"uni-radio-wrapper"},[_c('div',{staticClass:"uni-radio-input",class:_vm.radioChecked ? 'uni-radio-input-checked' : '',style:(_vm.radioChecked ? _vm.checkedStyle : '')}),_vm._t("default")],2)])} var staticRenderFns = [] // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=template&id=84e2ee82& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__("8af1"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-service/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // /* harmony default export */ var radiovue_type_script_lang_js_ = ({ name: 'Radio', mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], props: { checked: { type: [Boolean, String], default: false }, id: { type: String, default: '' }, disabled: { type: [Boolean, String], default: false }, color: { type: String, default: '#007AFF' }, value: { type: String, default: '' } }, data: function data() { return { radioChecked: this.checked, radioValue: this.value }; }, computed: { checkedStyle: function checkedStyle() { return "background-color: ".concat(this.color, ";border-color: ").concat(this.color, ";"); } }, watch: { checked: function checked(val) { this.radioChecked = val; }, value: function value(val) { this.radioValue = val; } }, listeners: { 'label-click': '_onClick', '@label-click': '_onClick' }, created: function created() { this.$dispatch('RadioGroup', 'uni-radio-group-update', { type: 'add', vm: this }); this.$dispatch('Form', 'uni-form-group-update', { type: 'add', vm: this }); }, beforeDestroy: function beforeDestroy() { this.$dispatch('RadioGroup', 'uni-radio-group-update', { type: 'remove', vm: this }); this.$dispatch('Form', 'uni-form-group-update', { type: 'remove', vm: this }); }, methods: { _onClick: function _onClick($event) { if (this.disabled || this.radioChecked) { return; } this.radioChecked = true; this.$dispatch('RadioGroup', 'uni-radio-change', $event, this); }, _resetFormData: function _resetFormData() { this.radioChecked = this.min; } } }); // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/radio/index.vue?vue&type=style&index=0&lang=css& var radiovue_type_style_index_0_lang_css_ = __webpack_require__("c96e"); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("0c7c"); // CONCATENATED MODULE: ./src/core/view/components/radio/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( components_radiovue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var components_radio = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "64d0": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1047"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "675f": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/*! * Vue.js v2.6.10 * (c) 2014-2019 Evan You * Released under the MIT License. */ /* */ var emptyObject = Object.freeze({}); // These helpers produce better VM code in JS engines due to their // explicitness and function inlining. function isUndef (v) { return v === undefined || v === null } function isDef (v) { return v !== undefined && v !== null } function isTrue (v) { return v === true } function isFalse (v) { return v === false } /** * Check if value is primitive. */ function isPrimitive (value) { return ( typeof value === 'string' || typeof value === 'number' || // $flow-disable-line typeof value === 'symbol' || typeof value === 'boolean' ) } /** * Quick object check - this is primarily used to tell * Objects from primitive values when we know the value * is a JSON-compliant type. */ function isObject (obj) { return obj !== null && typeof obj === 'object' } /** * Get the raw type string of a value, e.g., [object Object]. */ var _toString = Object.prototype.toString; function toRawType (value) { return _toString.call(value).slice(8, -1) } /** * Strict object type check. Only returns true * for plain JavaScript objects. */ function isPlainObject (obj) { return _toString.call(obj) === '[object Object]' } function isRegExp (v) { return _toString.call(v) === '[object RegExp]' } /** * Check if val is a valid array index. */ function isValidArrayIndex (val) { var n = parseFloat(String(val)); return n >= 0 && Math.floor(n) === n && isFinite(val) } function isPromise (val) { return ( isDef(val) && typeof val.then === 'function' && typeof val.catch === 'function' ) } /** * Convert a value to a string that is actually rendered. */ function toString (val) { return val == null ? '' : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString) ? JSON.stringify(val, null, 2) : String(val) } /** * Convert an input value to a number for persistence. * If the conversion fails, return original string. */ function toNumber (val) { var n = parseFloat(val); return isNaN(n) ? val : n } /** * Make a map and return a function for checking if a key * is in that map. */ function makeMap ( str, expectsLowerCase ) { var map = Object.create(null); var list = str.split(','); for (var i = 0; i < list.length; i++) { map[list[i]] = true; } return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; } } /** * Check if a tag is a built-in tag. */ var isBuiltInTag = makeMap('slot,component', true); /** * Check if an attribute is a reserved attribute. */ var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); /** * Remove an item from an array. */ function remove (arr, item) { if (arr.length) { var index = arr.indexOf(item); if (index > -1) { return arr.splice(index, 1) } } } /** * Check whether an object has the property. */ var hasOwnProperty = Object.prototype.hasOwnProperty; function hasOwn (obj, key) { return hasOwnProperty.call(obj, key) } /** * Create a cached version of a pure function. */ function cached (fn) { var cache = Object.create(null); return (function cachedFn (str) { var hit = cache[str]; return hit || (cache[str] = fn(str)) }) } /** * Camelize a hyphen-delimited string. */ var camelizeRE = /-(\w)/g; var camelize = cached(function (str) { return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) }); /** * Capitalize a string. */ var capitalize = cached(function (str) { return str.charAt(0).toUpperCase() + str.slice(1) }); /** * Hyphenate a camelCase string. */ var hyphenateRE = /\B([A-Z])/g; var hyphenate = cached(function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase() }); /** * Simple bind polyfill for environments that do not support it, * e.g., PhantomJS 1.x. Technically, we don't need this anymore * since native bind is now performant enough in most browsers. * But removing it would mean breaking code that was able to run in * PhantomJS 1.x, so this must be kept for backward compatibility. */ /* istanbul ignore next */ function polyfillBind (fn, ctx) { function boundFn (a) { var l = arguments.length; return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx) } boundFn._length = fn.length; return boundFn } function nativeBind (fn, ctx) { return fn.bind(ctx) } var bind = Function.prototype.bind ? nativeBind : polyfillBind; /** * Convert an Array-like object to a real Array. */ function toArray (list, start) { start = start || 0; var i = list.length - start; var ret = new Array(i); while (i--) { ret[i] = list[i + start]; } return ret } /** * Mix properties into target object. */ function extend (to, _from) { for (var key in _from) { to[key] = _from[key]; } return to } /** * Merge an Array of Objects into a single Object. */ function toObject (arr) { var res = {}; for (var i = 0; i < arr.length; i++) { if (arr[i]) { extend(res, arr[i]); } } return res } /* eslint-disable no-unused-vars */ /** * Perform no operation. * Stubbing args to make Flow happy without leaving useless transpiled code * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/). */ function noop (a, b, c) {} /** * Always return false. */ var no = function (a, b, c) { return false; }; /* eslint-enable no-unused-vars */ /** * Return the same value. */ var identity = function (_) { return _; }; /** * Check if two values are loosely equal - that is, * if they are plain objects, do they have the same shape? */ function looseEqual (a, b) { if (a === b) { return true } var isObjectA = isObject(a); var isObjectB = isObject(b); if (isObjectA && isObjectB) { try { var isArrayA = Array.isArray(a); var isArrayB = Array.isArray(b); if (isArrayA && isArrayB) { return a.length === b.length && a.every(function (e, i) { return looseEqual(e, b[i]) }) } else if (a instanceof Date && b instanceof Date) { return a.getTime() === b.getTime() } else if (!isArrayA && !isArrayB) { var keysA = Object.keys(a); var keysB = Object.keys(b); return keysA.length === keysB.length && keysA.every(function (key) { return looseEqual(a[key], b[key]) }) } else { /* istanbul ignore next */ return false } } catch (e) { /* istanbul ignore next */ return false } } else if (!isObjectA && !isObjectB) { return String(a) === String(b) } else { return false } } /** * Return the first index at which a loosely equal value can be * found in the array (if value is a plain object, the array must * contain an object of the same shape), or -1 if it is not present. */ function looseIndexOf (arr, val) { for (var i = 0; i < arr.length; i++) { if (looseEqual(arr[i], val)) { return i } } return -1 } /** * Ensure a function is called only once. */ function once (fn) { var called = false; return function () { if (!called) { called = true; fn.apply(this, arguments); } } } var SSR_ATTR = 'data-server-rendered'; var ASSET_TYPES = [ 'component', 'directive', 'filter' ]; var LIFECYCLE_HOOKS = [ 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated', 'beforeDestroy', 'destroyed', 'activated', 'deactivated', 'errorCaptured', 'serverPrefetch' ]; /* */ var config = ({ /** * Option merge strategies (used in core/util/options) */ // $flow-disable-line optionMergeStrategies: Object.create(null), /** * Whether to suppress warnings. */ silent: false, /** * Show production mode tip message on boot? */ productionTip: "production" !== 'production', /** * Whether to enable devtools */ devtools: "production" !== 'production', /** * Whether to record perf */ performance: false, /** * Error handler for watcher errors */ errorHandler: null, /** * Warn handler for watcher warns */ warnHandler: null, /** * Ignore certain custom elements */ ignoredElements: [], /** * Custom user key aliases for v-on */ // $flow-disable-line keyCodes: Object.create(null), /** * Check if a tag is reserved so that it cannot be registered as a * component. This is platform-dependent and may be overwritten. */ isReservedTag: no, /** * Check if an attribute is reserved so that it cannot be used as a component * prop. This is platform-dependent and may be overwritten. */ isReservedAttr: no, /** * Check if a tag is an unknown element. * Platform-dependent. */ isUnknownElement: no, /** * Get the namespace of an element */ getTagNamespace: noop, /** * Parse the real tag name for the specific platform. */ parsePlatformTagName: identity, /** * Check if an attribute must be bound using property, e.g. value * Platform-dependent. */ mustUseProp: no, /** * Perform updates asynchronously. Intended to be used by Vue Test Utils * This will significantly reduce performance if set to false. */ async: true, /** * Exposed for legacy reasons */ _lifecycleHooks: LIFECYCLE_HOOKS }); /* */ /** * unicode letters used for parsing html tags, component names and property paths. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname * skipping \u10000-\uEFFFF due to it freezing up PhantomJS */ var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/; /** * Check if a string starts with $ or _ */ function isReserved (str) { var c = (str + '').charCodeAt(0); return c === 0x24 || c === 0x5F } /** * Define a property. */ function def (obj, key, val, enumerable) { Object.defineProperty(obj, key, { value: val, enumerable: !!enumerable, writable: true, configurable: true }); } /** * Parse simple path. */ var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]")); function parsePath (path) { if (bailRE.test(path)) { return } var segments = path.split('.'); return function (obj) { for (var i = 0; i < segments.length; i++) { if (!obj) { return } obj = obj[segments[i]]; } return obj } } /* */ // can we use __proto__? var hasProto = '__proto__' in {}; // Browser environment sniffing var inBrowser = typeof window !== 'undefined'; var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); var UA = inBrowser && window.navigator.userAgent.toLowerCase(); var isIE = UA && /msie|trident/.test(UA); var isIE9 = UA && UA.indexOf('msie 9.0') > 0; var isEdge = UA && UA.indexOf('edge/') > 0; var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; var isPhantomJS = UA && /phantomjs/.test(UA); var isFF = UA && UA.match(/firefox\/(\d+)/); // Firefox has a "watch" function on Object.prototype... var nativeWatch = ({}).watch; var supportsPassive = false; if (inBrowser) { try { var opts = {}; Object.defineProperty(opts, 'passive', ({ get: function get () { /* istanbul ignore next */ supportsPassive = true; } })); // https://github.com/facebook/flow/issues/285 window.addEventListener('test-passive', null, opts); } catch (e) {} } // this needs to be lazy-evaled because vue may be required before // vue-server-renderer can set VUE_ENV var _isServer; var isServerRendering = function () { if (_isServer === undefined) { /* istanbul ignore if */ if (!inBrowser && !inWeex && typeof global !== 'undefined') { // detect presence of vue-server-renderer and avoid // Webpack shimming the process _isServer = global['process'] && global['process'].env.VUE_ENV === 'server'; } else { _isServer = false; } } return _isServer }; // detect devtools var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; /* istanbul ignore next */ function isNative (Ctor) { return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) } var hasSymbol = typeof Symbol !== 'undefined' && isNative(Symbol) && typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); var _Set; /* istanbul ignore if */ // $flow-disable-line if (typeof Set !== 'undefined' && isNative(Set)) { // use native Set when available. _Set = Set; } else { // a non-standard Set polyfill that only works with primitive keys. _Set = /*@__PURE__*/(function () { function Set () { this.set = Object.create(null); } Set.prototype.has = function has (key) { return this.set[key] === true }; Set.prototype.add = function add (key) { this.set[key] = true; }; Set.prototype.clear = function clear () { this.set = Object.create(null); }; return Set; }()); } /* */ var warn = noop; var tip = noop; var generateComponentTrace = (noop); // work around flow check var formatComponentName = (noop); if (false) { var repeat, classify, classifyRE, hasConsole; } /* */ var uid = 0; /** * A dep is an observable that can have multiple * directives subscribing to it. */ var Dep = function Dep () { this.id = uid++; this.subs = []; }; Dep.prototype.addSub = function addSub (sub) { this.subs.push(sub); }; Dep.prototype.removeSub = function removeSub (sub) { remove(this.subs, sub); }; Dep.prototype.depend = function depend () { if (Dep.target) { Dep.target.addDep(this); } }; Dep.prototype.notify = function notify () { // stabilize the subscriber list first var subs = this.subs.slice(); if (false) {} for (var i = 0, l = subs.length; i < l; i++) { subs[i].update(); } }; // The current target watcher being evaluated. // This is globally unique because only one watcher // can be evaluated at a time. Dep.target = null; var targetStack = []; function pushTarget (target) { targetStack.push(target); Dep.target = target; } function popTarget () { targetStack.pop(); Dep.target = targetStack[targetStack.length - 1]; } /* */ var VNode = function VNode ( tag, data, children, text, elm, context, componentOptions, asyncFactory ) { this.tag = tag; this.data = data; this.children = children; this.text = text; this.elm = elm; this.ns = undefined; this.context = context; this.fnContext = undefined; this.fnOptions = undefined; this.fnScopeId = undefined; this.key = data && data.key; this.componentOptions = componentOptions; this.componentInstance = undefined; this.parent = undefined; this.raw = false; this.isStatic = false; this.isRootInsert = true; this.isComment = false; this.isCloned = false; this.isOnce = false; this.asyncFactory = asyncFactory; this.asyncMeta = undefined; this.isAsyncPlaceholder = false; }; var prototypeAccessors = { child: { configurable: true } }; // DEPRECATED: alias for componentInstance for backwards compat. /* istanbul ignore next */ prototypeAccessors.child.get = function () { return this.componentInstance }; Object.defineProperties( VNode.prototype, prototypeAccessors ); var createEmptyVNode = function (text) { if ( text === void 0 ) text = ''; var node = new VNode(); node.text = text; node.isComment = true; return node }; function createTextVNode (val) { return new VNode(undefined, undefined, undefined, String(val)) } // optimized shallow clone // used for static nodes and slot nodes because they may be reused across // multiple renders, cloning them avoids errors when DOM manipulations rely // on their elm reference. function cloneVNode (vnode) { var cloned = new VNode( vnode.tag, vnode.data, // #7975 // clone children array to avoid mutating original in case of cloning // a child. vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory ); cloned.ns = vnode.ns; cloned.isStatic = vnode.isStatic; cloned.key = vnode.key; cloned.isComment = vnode.isComment; cloned.fnContext = vnode.fnContext; cloned.fnOptions = vnode.fnOptions; cloned.fnScopeId = vnode.fnScopeId; cloned.asyncMeta = vnode.asyncMeta; cloned.isCloned = true; return cloned } /* * not type checking this file because flow doesn't play well with * dynamically accessing methods on Array prototype */ var arrayProto = Array.prototype; var arrayMethods = Object.create(arrayProto); var methodsToPatch = [ 'push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse' ]; /** * Intercept mutating methods and emit events */ methodsToPatch.forEach(function (method) { // cache original method var original = arrayProto[method]; def(arrayMethods, method, function mutator () { var args = [], len = arguments.length; while ( len-- ) args[ len ] = arguments[ len ]; var result = original.apply(this, args); var ob = this.__ob__; var inserted; switch (method) { case 'push': case 'unshift': inserted = args; break case 'splice': inserted = args.slice(2); break } if (inserted) { ob.observeArray(inserted); } // notify change ob.dep.notify(); return result }); }); /* */ var arrayKeys = Object.getOwnPropertyNames(arrayMethods); /** * In some cases we may want to disable observation inside a component's * update computation. */ var shouldObserve = true; function toggleObserving (value) { shouldObserve = value; } /** * Observer class that is attached to each observed * object. Once attached, the observer converts the target * object's property keys into getter/setters that * collect dependencies and dispatch updates. */ var Observer = function Observer (value) { this.value = value; this.dep = new Dep(); this.vmCount = 0; def(value, '__ob__', this); if (Array.isArray(value)) { if (hasProto) { protoAugment(value, arrayMethods); } else { copyAugment(value, arrayMethods, arrayKeys); } this.observeArray(value); } else { this.walk(value); } }; /** * Walk through all properties and convert them into * getter/setters. This method should only be called when * value type is Object. */ Observer.prototype.walk = function walk (obj) { var keys = Object.keys(obj); for (var i = 0; i < keys.length; i++) { defineReactive$$1(obj, keys[i]); } }; /** * Observe a list of Array items. */ Observer.prototype.observeArray = function observeArray (items) { for (var i = 0, l = items.length; i < l; i++) { observe(items[i]); } }; // helpers /** * Augment a target Object or Array by intercepting * the prototype chain using __proto__ */ function protoAugment (target, src) { /* eslint-disable no-proto */ target.__proto__ = src; /* eslint-enable no-proto */ } /** * Augment a target Object or Array by defining * hidden properties. */ /* istanbul ignore next */ function copyAugment (target, src, keys) { for (var i = 0, l = keys.length; i < l; i++) { var key = keys[i]; def(target, key, src[key]); } } /** * Attempt to create an observer instance for a value, * returns the new observer if successfully observed, * or the existing observer if the value already has one. */ function observe (value, asRootData) { if (!isObject(value) || value instanceof VNode) { return } var ob; if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { ob = value.__ob__; } else if ( shouldObserve && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue ) { ob = new Observer(value); } if (asRootData && ob) { ob.vmCount++; } return ob } /** * Define a reactive property on an Object. */ function defineReactive$$1 ( obj, key, val, customSetter, shallow ) { var dep = new Dep(); var property = Object.getOwnPropertyDescriptor(obj, key); if (property && property.configurable === false) { return } // cater for pre-defined getter/setters var getter = property && property.get; var setter = property && property.set; if ((!getter || setter) && arguments.length === 2) { val = obj[key]; } var childOb = !shallow && observe(val); Object.defineProperty(obj, key, { enumerable: true, configurable: true, get: function reactiveGetter () { var value = getter ? getter.call(obj) : val; if (Dep.target) { dep.depend(); if (childOb) { childOb.dep.depend(); if (Array.isArray(value)) { dependArray(value); } } } return value }, set: function reactiveSetter (newVal) { var value = getter ? getter.call(obj) : val; /* eslint-disable no-self-compare */ if (newVal === value || (newVal !== newVal && value !== value)) { return } /* eslint-enable no-self-compare */ if (false) {} // #7981: for accessor properties without setter if (getter && !setter) { return } if (setter) { setter.call(obj, newVal); } else { val = newVal; } childOb = !shallow && observe(newVal); dep.notify(); } }); } /** * Set a property on an object. Adds the new property and * triggers change notification if the property doesn't * already exist. */ function set (target, key, val) { if (false ) {} if (Array.isArray(target) && isValidArrayIndex(key)) { target.length = Math.max(target.length, key); target.splice(key, 1, val); return val } if (key in target && !(key in Object.prototype)) { target[key] = val; return val } var ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { false && false; return val } if (!ob) { target[key] = val; return val } defineReactive$$1(ob.value, key, val); ob.dep.notify(); return val } /** * Delete a property and trigger change if necessary. */ function del (target, key) { if (false ) {} if (Array.isArray(target) && isValidArrayIndex(key)) { target.splice(key, 1); return } var ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { false && false; return } if (!hasOwn(target, key)) { return } delete target[key]; if (!ob) { return } ob.dep.notify(); } /** * Collect dependencies on array elements when the array is touched, since * we cannot intercept array element access like property getters. */ function dependArray (value) { for (var e = (void 0), i = 0, l = value.length; i < l; i++) { e = value[i]; e && e.__ob__ && e.__ob__.dep.depend(); if (Array.isArray(e)) { dependArray(e); } } } /* */ /** * Option overwriting strategies are functions that handle * how to merge a parent option value and a child option * value into the final value. */ var strats = config.optionMergeStrategies; /** * Options with restrictions */ if (false) {} /** * Helper that recursively merges two data objects together. */ function mergeData (to, from) { if (!from) { return to } var key, toVal, fromVal; var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from); for (var i = 0; i < keys.length; i++) { key = keys[i]; // in case the object is already observed... if (key === '__ob__') { continue } toVal = to[key]; fromVal = from[key]; if (!hasOwn(to, key)) { set(to, key, fromVal); } else if ( toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal) ) { mergeData(toVal, fromVal); } } return to } /** * Data */ function mergeDataOrFn ( parentVal, childVal, vm ) { if (!vm) { // in a Vue.extend merge, both should be functions if (!childVal) { return parentVal } if (!parentVal) { return childVal } // when parentVal & childVal are both present, // we need to return a function that returns the // merged result of both functions... no need to // check if parentVal is a function here because // it has to be a function to pass previous merges. return function mergedDataFn () { return mergeData( typeof childVal === 'function' ? childVal.call(this, this) : childVal, typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal ) } } else { return function mergedInstanceDataFn () { // instance merge var instanceData = typeof childVal === 'function' ? childVal.call(vm, vm) : childVal; var defaultData = typeof parentVal === 'function' ? parentVal.call(vm, vm) : parentVal; if (instanceData) { return mergeData(instanceData, defaultData) } else { return defaultData } } } } strats.data = function ( parentVal, childVal, vm ) { if (!vm) { if (childVal && typeof childVal !== 'function') { false && false; return parentVal } return mergeDataOrFn(parentVal, childVal) } return mergeDataOrFn(parentVal, childVal, vm) }; /** * Hooks and props are merged as arrays. */ function mergeHook ( parentVal, childVal ) { var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal; return res ? dedupeHooks(res) : res } function dedupeHooks (hooks) { var res = []; for (var i = 0; i < hooks.length; i++) { if (res.indexOf(hooks[i]) === -1) { res.push(hooks[i]); } } return res } LIFECYCLE_HOOKS.forEach(function (hook) { strats[hook] = mergeHook; }); /** * Assets * * When a vm is present (instance creation), we need to do * a three-way merge between constructor options, instance * options and parent options. */ function mergeAssets ( parentVal, childVal, vm, key ) { var res = Object.create(parentVal || null); if (childVal) { false && false; return extend(res, childVal) } else { return res } } ASSET_TYPES.forEach(function (type) { strats[type + 's'] = mergeAssets; }); /** * Watchers. * * Watchers hashes should not overwrite one * another, so we merge them as arrays. */ strats.watch = function ( parentVal, childVal, vm, key ) { // work around Firefox's Object.prototype.watch... if (parentVal === nativeWatch) { parentVal = undefined; } if (childVal === nativeWatch) { childVal = undefined; } /* istanbul ignore if */ if (!childVal) { return Object.create(parentVal || null) } if (false) {} if (!parentVal) { return childVal } var ret = {}; extend(ret, parentVal); for (var key$1 in childVal) { var parent = ret[key$1]; var child = childVal[key$1]; if (parent && !Array.isArray(parent)) { parent = [parent]; } ret[key$1] = parent ? parent.concat(child) : Array.isArray(child) ? child : [child]; } return ret }; /** * Other object hashes. */ strats.props = strats.methods = strats.inject = strats.computed = function ( parentVal, childVal, vm, key ) { if (childVal && "production" !== 'production') { assertObjectType(key, childVal, vm); } if (!parentVal) { return childVal } var ret = Object.create(null); extend(ret, parentVal); if (childVal) { extend(ret, childVal); } return ret }; strats.provide = mergeDataOrFn; /** * Default strategy. */ var defaultStrat = function (parentVal, childVal) { return childVal === undefined ? parentVal : childVal }; /** * Validate component names */ function checkComponents (options) { for (var key in options.components) { validateComponentName(key); } } function validateComponentName (name) { if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) { warn( 'Invalid component name: "' + name + '". Component names ' + 'should conform to valid custom element name in html5 specification.' ); } if (isBuiltInTag(name) || config.isReservedTag(name)) { warn( 'Do not use built-in or reserved HTML elements as component ' + 'id: ' + name ); } } /** * Ensure all props option syntax are normalized into the * Object-based format. */ function normalizeProps (options, vm) { var props = options.props; if (!props) { return } var res = {}; var i, val, name; if (Array.isArray(props)) { i = props.length; while (i--) { val = props[i]; if (typeof val === 'string') { name = camelize(val); res[name] = { type: null }; } else if (false) {} } } else if (isPlainObject(props)) { for (var key in props) { val = props[key]; name = camelize(key); res[name] = isPlainObject(val) ? val : { type: val }; } } else if (false) {} options.props = res; } /** * Normalize all injections into Object-based format */ function normalizeInject (options, vm) { var inject = options.inject; if (!inject) { return } var normalized = options.inject = {}; if (Array.isArray(inject)) { for (var i = 0; i < inject.length; i++) { normalized[inject[i]] = { from: inject[i] }; } } else if (isPlainObject(inject)) { for (var key in inject) { var val = inject[key]; normalized[key] = isPlainObject(val) ? extend({ from: key }, val) : { from: val }; } } else if (false) {} } /** * Normalize raw function directives into object format. */ function normalizeDirectives (options) { var dirs = options.directives; if (dirs) { for (var key in dirs) { var def$$1 = dirs[key]; if (typeof def$$1 === 'function') { dirs[key] = { bind: def$$1, update: def$$1 }; } } } } function assertObjectType (name, value, vm) { if (!isPlainObject(value)) { warn( "Invalid value for option \"" + name + "\": expected an Object, " + "but got " + (toRawType(value)) + ".", vm ); } } /** * Merge two option objects into a new one. * Core utility used in both instantiation and inheritance. */ function mergeOptions ( parent, child, vm ) { if (false) {} if (typeof child === 'function') { child = child.options; } normalizeProps(child, vm); normalizeInject(child, vm); normalizeDirectives(child); // Apply extends and mixins on the child options, // but only if it is a raw options object that isn't // the result of another mergeOptions call. // Only merged options has the _base property. if (!child._base) { if (child.extends) { parent = mergeOptions(parent, child.extends, vm); } if (child.mixins) { for (var i = 0, l = child.mixins.length; i < l; i++) { parent = mergeOptions(parent, child.mixins[i], vm); } } } var options = {}; var key; for (key in parent) { mergeField(key); } for (key in child) { if (!hasOwn(parent, key)) { mergeField(key); } } function mergeField (key) { var strat = strats[key] || defaultStrat; options[key] = strat(parent[key], child[key], vm, key); } return options } /** * Resolve an asset. * This function is used because child instances need access * to assets defined in its ancestor chain. */ function resolveAsset ( options, type, id, warnMissing ) { /* istanbul ignore if */ if (typeof id !== 'string') { return } var assets = options[type]; // check local registration variations first if (hasOwn(assets, id)) { return assets[id] } var camelizedId = camelize(id); if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } var PascalCaseId = capitalize(camelizedId); if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } // fallback to prototype chain var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; if (false) {} return res } /* */ function validateProp ( key, propOptions, propsData, vm ) { var prop = propOptions[key]; var absent = !hasOwn(propsData, key); var value = propsData[key]; // boolean casting var booleanIndex = getTypeIndex(Boolean, prop.type); if (booleanIndex > -1) { if (absent && !hasOwn(prop, 'default')) { value = false; } else if (value === '' || value === hyphenate(key)) { // only cast empty string / same name to boolean if // boolean has higher priority var stringIndex = getTypeIndex(String, prop.type); if (stringIndex < 0 || booleanIndex < stringIndex) { value = true; } } } // check default value if (value === undefined) { value = getPropDefaultValue(vm, prop, key); // since the default value is a fresh copy, // make sure to observe it. var prevShouldObserve = shouldObserve; toggleObserving(true); observe(value); toggleObserving(prevShouldObserve); } if ( false ) {} return value } /** * Get the default value of a prop. */ function getPropDefaultValue (vm, prop, key) { // no default, return undefined if (!hasOwn(prop, 'default')) { return undefined } var def = prop.default; // warn against non-factory defaults for Object & Array if (false) {} // the raw prop value was also undefined from previous render, // return previous default value to avoid unnecessary watcher trigger if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined ) { return vm._props[key] } // call factory function for non-Function types // a value is Function if its prototype is function even across different execution context return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def } /** * Assert whether a prop is valid. */ function assertProp ( prop, name, value, vm, absent ) { if (prop.required && absent) { warn( 'Missing required prop: "' + name + '"', vm ); return } if (value == null && !prop.required) { return } var type = prop.type; var valid = !type || type === true; var expectedTypes = []; if (type) { if (!Array.isArray(type)) { type = [type]; } for (var i = 0; i < type.length && !valid; i++) { var assertedType = assertType(value, type[i]); expectedTypes.push(assertedType.expectedType || ''); valid = assertedType.valid; } } if (!valid) { warn( getInvalidTypeMessage(name, value, expectedTypes), vm ); return } var validator = prop.validator; if (validator) { if (!validator(value)) { warn( 'Invalid prop: custom validator check failed for prop "' + name + '".', vm ); } } } var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; function assertType (value, type) { var valid; var expectedType = getType(type); if (simpleCheckRE.test(expectedType)) { var t = typeof value; valid = t === expectedType.toLowerCase(); // for primitive wrapper objects if (!valid && t === 'object') { valid = value instanceof type; } } else if (expectedType === 'Object') { valid = isPlainObject(value); } else if (expectedType === 'Array') { valid = Array.isArray(value); } else { valid = value instanceof type; } return { valid: valid, expectedType: expectedType } } /** * Use function string name to check built-in types, * because a simple equality check will fail when running * across different vms / iframes. */ function getType (fn) { var match = fn && fn.toString().match(/^\s*function (\w+)/); return match ? match[1] : '' } function isSameType (a, b) { return getType(a) === getType(b) } function getTypeIndex (type, expectedTypes) { if (!Array.isArray(expectedTypes)) { return isSameType(expectedTypes, type) ? 0 : -1 } for (var i = 0, len = expectedTypes.length; i < len; i++) { if (isSameType(expectedTypes[i], type)) { return i } } return -1 } function getInvalidTypeMessage (name, value, expectedTypes) { var message = "Invalid prop: type check failed for prop \"" + name + "\"." + " Expected " + (expectedTypes.map(capitalize).join(', ')); var expectedType = expectedTypes[0]; var receivedType = toRawType(value); var expectedValue = styleValue(value, expectedType); var receivedValue = styleValue(value, receivedType); // check if we need to specify expected value if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { message += " with value " + expectedValue; } message += ", got " + receivedType + " "; // check if we need to specify received value if (isExplicable(receivedType)) { message += "with value " + receivedValue + "."; } return message } function styleValue (value, type) { if (type === 'String') { return ("\"" + value + "\"") } else if (type === 'Number') { return ("" + (Number(value))) } else { return ("" + value) } } function isExplicable (value) { var explicitTypes = ['string', 'number', 'boolean']; return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; }) } function isBoolean () { var args = [], len = arguments.length; while ( len-- ) args[ len ] = arguments[ len ]; return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; }) } /* */ function handleError (err, vm, info) { // Deactivate deps tracking while processing error handler to avoid possible infinite rendering. // See: https://github.com/vuejs/vuex/issues/1505 pushTarget(); try { if (vm) { var cur = vm; while ((cur = cur.$parent)) { var hooks = cur.$options.errorCaptured; if (hooks) { for (var i = 0; i < hooks.length; i++) { try { var capture = hooks[i].call(cur, err, vm, info) === false; if (capture) { return } } catch (e) { globalHandleError(e, cur, 'errorCaptured hook'); } } } } } globalHandleError(err, vm, info); } finally { popTarget(); } } function invokeWithErrorHandling ( handler, context, args, vm, info ) { var res; try { res = args ? handler.apply(context, args) : handler.call(context); if (res && !res._isVue && isPromise(res) && !res._handled) { res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); }); // issue #9511 // avoid catch triggering multiple times when nested calls res._handled = true; } } catch (e) { handleError(e, vm, info); } return res } function globalHandleError (err, vm, info) { if (config.errorHandler) { try { return config.errorHandler.call(null, err, vm, info) } catch (e) { // if the user intentionally throws the original error in the handler, // do not log it twice if (e !== err) { logError(e, null, 'config.errorHandler'); } } } logError(err, vm, info); } function logError (err, vm, info) { if (false) {} /* istanbul ignore else */ if ((inBrowser || inWeex) && typeof console !== 'undefined') { console.error(err); } else { throw err } } /* */ var isUsingMicroTask = false; var callbacks = []; var pending = false; function flushCallbacks () { pending = false; var copies = callbacks.slice(0); callbacks.length = 0; for (var i = 0; i < copies.length; i++) { copies[i](); } } // Here we have async deferring wrappers using microtasks. // In 2.5 we used (macro) tasks (in combination with microtasks). // However, it has subtle problems when state is changed right before repaint // (e.g. #6813, out-in transitions). // Also, using (macro) tasks in event handler would cause some weird behaviors // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109). // So we now use microtasks everywhere, again. // A major drawback of this tradeoff is that there are some scenarios // where microtasks have too high a priority and fire in between supposedly // sequential events (e.g. #4521, #6690, which have workarounds) // or even between bubbling of the same event (#6566). var timerFunc; // The nextTick behavior leverages the microtask queue, which can be accessed // via either native Promise.then or MutationObserver. // MutationObserver has wider support, however it is seriously bugged in // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It // completely stops working after triggering a few times... so, if native // Promise is available, we will use it: /* istanbul ignore next, $flow-disable-line */ if (typeof Promise !== 'undefined' && isNative(Promise)) { var p = Promise.resolve(); timerFunc = function () { p.then(flushCallbacks); // In problematic UIWebViews, Promise.then doesn't completely break, but // it can get stuck in a weird state where callbacks are pushed into the // microtask queue but the queue isn't being flushed, until the browser // needs to do some other work, e.g. handle a timer. Therefore we can // "force" the microtask queue to be flushed by adding an empty timer. if (isIOS) { setTimeout(noop); } }; isUsingMicroTask = true; } else if (!isIE && typeof MutationObserver !== 'undefined' && ( isNative(MutationObserver) || // PhantomJS and iOS 7.x MutationObserver.toString() === '[object MutationObserverConstructor]' )) { // Use MutationObserver where native Promise is not available, // e.g. PhantomJS, iOS7, Android 4.4 // (#6466 MutationObserver is unreliable in IE11) var counter = 1; var observer = new MutationObserver(flushCallbacks); var textNode = document.createTextNode(String(counter)); observer.observe(textNode, { characterData: true }); timerFunc = function () { counter = (counter + 1) % 2; textNode.data = String(counter); }; isUsingMicroTask = true; } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { // Fallback to setImmediate. // Technically it leverages the (macro) task queue, // but it is still a better choice than setTimeout. timerFunc = function () { setImmediate(flushCallbacks); }; } else { // Fallback to setTimeout. timerFunc = function () { setTimeout(flushCallbacks, 0); }; } function nextTick (cb, ctx) { var _resolve; callbacks.push(function () { if (cb) { try { cb.call(ctx); } catch (e) { handleError(e, ctx, 'nextTick'); } } else if (_resolve) { _resolve(ctx); } }); if (!pending) { pending = true; timerFunc(); } // $flow-disable-line if (!cb && typeof Promise !== 'undefined') { return new Promise(function (resolve) { _resolve = resolve; }) } } /* */ /* not type checking this file because flow doesn't play well with Proxy */ var initProxy; if (false) { var getHandler, hasHandler, isBuiltInModifier, hasProxy, warnReservedPrefix, warnNonPresent, allowedGlobals; } /* */ var seenObjects = new _Set(); /** * Recursively traverse an object to evoke all converted * getters, so that every nested property inside the object * is collected as a "deep" dependency. */ function traverse (val) { _traverse(val, seenObjects); seenObjects.clear(); } function _traverse (val, seen) { var i, keys; var isA = Array.isArray(val); if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { return } if (val.__ob__) { var depId = val.__ob__.dep.id; if (seen.has(depId)) { return } seen.add(depId); } if (isA) { i = val.length; while (i--) { _traverse(val[i], seen); } } else { keys = Object.keys(val); i = keys.length; while (i--) { _traverse(val[keys[i]], seen); } } } var mark; var measure; if (false) { var perf; } /* */ var normalizeEvent = cached(function (name) { var passive = name.charAt(0) === '&'; name = passive ? name.slice(1) : name; var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first name = once$$1 ? name.slice(1) : name; var capture = name.charAt(0) === '!'; name = capture ? name.slice(1) : name; return { name: name, once: once$$1, capture: capture, passive: passive } }); function createFnInvoker (fns, vm) { function invoker () { var arguments$1 = arguments; var fns = invoker.fns; if (Array.isArray(fns)) { var cloned = fns.slice(); for (var i = 0; i < cloned.length; i++) { invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler"); } } else { // return handler return value for single handlers return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler") } } invoker.fns = fns; return invoker } function updateListeners ( on, oldOn, add, remove$$1, createOnceHandler, vm ) { var name, def$$1, cur, old, event; for (name in on) { def$$1 = cur = on[name]; old = oldOn[name]; event = normalizeEvent(name); if (isUndef(cur)) { false && false; } else if (isUndef(old)) { if (isUndef(cur.fns)) { cur = on[name] = createFnInvoker(cur, vm); } if (isTrue(event.once)) { cur = on[name] = createOnceHandler(event.name, cur, event.capture); } add(event.name, cur, event.capture, event.passive, event.params); } else if (cur !== old) { old.fns = cur; on[name] = old; } } for (name in oldOn) { if (isUndef(on[name])) { event = normalizeEvent(name); remove$$1(event.name, oldOn[name], event.capture); } } } /* */ function mergeVNodeHook (def, hookKey, hook) { if (def instanceof VNode) { def = def.data.hook || (def.data.hook = {}); } var invoker; var oldHook = def[hookKey]; function wrappedHook () { hook.apply(this, arguments); // important: remove merged hook to ensure it's called only once // and prevent memory leak remove(invoker.fns, wrappedHook); } if (isUndef(oldHook)) { // no existing hook invoker = createFnInvoker([wrappedHook]); } else { /* istanbul ignore if */ if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { // already a merged invoker invoker = oldHook; invoker.fns.push(wrappedHook); } else { // existing plain hook invoker = createFnInvoker([oldHook, wrappedHook]); } } invoker.merged = true; def[hookKey] = invoker; } /* */ function extractPropsFromVNodeData ( data, Ctor, tag ) { // we are only extracting raw values here. // validation and default values are handled in the child // component itself. var propOptions = Ctor.options.props; if (isUndef(propOptions)) { return } var res = {}; var attrs = data.attrs; var props = data.props; if (isDef(attrs) || isDef(props)) { for (var key in propOptions) { var altKey = hyphenate(key); if (false) { var keyInLowerCase; } checkProp(res, props, key, altKey, true) || checkProp(res, attrs, key, altKey, false); } } return res } function checkProp ( res, hash, key, altKey, preserve ) { if (isDef(hash)) { if (hasOwn(hash, key)) { res[key] = hash[key]; if (!preserve) { delete hash[key]; } return true } else if (hasOwn(hash, altKey)) { res[key] = hash[altKey]; if (!preserve) { delete hash[altKey]; } return true } } return false } /* */ // The template compiler attempts to minimize the need for normalization by // statically analyzing the template at compile time. // // For plain HTML markup, normalization can be completely skipped because the // generated render function is guaranteed to return Array. There are // two cases where extra normalization is needed: // 1. When the children contains components - because a functional component // may return an Array instead of a single root. In this case, just a simple // normalization is needed - if any child is an Array, we flatten the whole // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep // because functional components already normalize their own children. function simpleNormalizeChildren (children) { for (var i = 0; i < children.length; i++) { if (Array.isArray(children[i])) { return Array.prototype.concat.apply([], children) } } return children } // 2. When the children contains constructs that always generated nested Arrays, // e.g.