UNPKG

@insaic/neon

Version:

A Mobile UI Components built on Vue

407 lines (354 loc) 12.2 kB
module.exports = /******/ (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, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // 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 = 279); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file. // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. module.exports = function normalizeComponent ( rawScriptExports, compiledTemplate, functionalTemplate, injectStyles, scopeId, moduleIdentifier /* server only */ ) { var esModule var scriptExports = rawScriptExports = rawScriptExports || {} // ES6 modules interop var type = typeof rawScriptExports.default if (type === 'object' || type === 'function') { esModule = rawScriptExports scriptExports = rawScriptExports.default } // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (compiledTemplate) { options.render = compiledTemplate.render options.staticRenderFns = compiledTemplate.staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = injectStyles } if (hook) { var functional = options.functional var existing = functional ? options.render : options.beforeCreate if (!functional) { // inject component registration as beforeCreate hook options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } else { // 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 options.render = function renderWithStyleInjection (h, context) { hook.call(context) return existing(h, context) } } } return { esModule: esModule, exports: scriptExports, options: options } } /***/ }), /***/ 138: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ name: 'sq-stepper', props: { max: { type: [Number, String] }, min: { type: [Number, String] }, value: { type: [Number, String], default: 0 }, step: { type: [Number, String], default: 1 }, readonlyInput: { type: Boolean, default: false } }, computed: { cutClasses: function cutClasses() { return [{ 'sq-stepper-cut-disabled': this.isCutDisabled }]; }, inputClasses: function inputClasses() { return { 'sq-stepper-input-disabled': this.readonlyInput }; }, addClasses: function addClasses() { return [{ 'sq-stepper-add-disabled': this.isAddDisabled }]; } }, data: function data() { return { currentVal: this.value, isInputDisabled: false, isCutDisabled: false, isAddDisabled: false }; }, methods: { $_cut: function $_cut() { if (this.isCutDisabled) return; var result = this.currentVal - +this.step; this.currentVal = result; this.$emit('input', result); if (this.min !== void 0 && result - +this.step < +this.min) { this.isCutDisabled = true; } if (this.isAddDisabled && this.max !== void 0 && result < +this.max) { this.isAddDisabled = false; } }, $_add: function $_add() { if (this.isAddDisabled) return; var result = this.currentVal + +this.step; this.currentVal = result; this.$emit('input', result); if (this.max !== void 0 && result + +this.step > +this.max) { this.isAddDisabled = true; } if (this.isCutDisabled && this.min !== void 0 && result > +this.min) { this.isCutDisabled = false; } }, $_onInput: function $_onInput(event) { var val = +event.target.value; if (this.min !== void 0) { if (val <= +this.min) { this.currentVal = +this.min; this.$emit('input', +this.min); this.isCutDisabled = true; return; } } if (this.max !== void 0) { if (val >= +this.max) { this.currentVal = +this.max; this.$emit('input', +this.max); this.isAddDisabled = true; return; } } this.currentVal = val; this.$emit('input', val); this.isAddDisabled && (this.isAddDisabled = false); this.isCutDisabled && (this.isCutDisabled = false); } }, watch: { currentVal: { handler: function handler(val, oldVal) { if (oldVal === void 0 && val !== void 0) { if (this.max !== void 0 && +val >= +this.max) { this.isAddDisabled = true; } if (this.min !== void 0 && +val <= +this.min) { this.isCutDisabled = true; } } }, immediate: true } } }); /***/ }), /***/ 279: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_index_vue__ = __webpack_require__(280); __WEBPACK_IMPORTED_MODULE_0__src_index_vue__["a" /* default */].install = function (Vue) { Vue.component(__WEBPACK_IMPORTED_MODULE_0__src_index_vue__["a" /* default */].name, __WEBPACK_IMPORTED_MODULE_0__src_index_vue__["a" /* default */]); }; /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__src_index_vue__["a" /* default */]); /***/ }), /***/ 280: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(138); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e7e0298_hasScoped_false_transformToRequire_video_src_poster_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_index_vue__ = __webpack_require__(282); function injectStyle (ssrContext) { __webpack_require__(281) } var normalizeComponent = __webpack_require__(0) /* script */ /* template */ /* template functional */ var __vue_template_functional__ = false /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = null /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_index_vue__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e7e0298_hasScoped_false_transformToRequire_video_src_poster_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_index_vue__["a" /* default */], __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) /* harmony default export */ __webpack_exports__["a"] = (Component.exports); /***/ }), /***/ 281: /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ 282: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sq-stepper"},[_c('div',{staticClass:"sq-stepper-wrap"},[_c('span',{staticClass:"sq-stepper-left",class:_vm.cutClasses,on:{"click":_vm.$_cut}},[_c('i',{staticClass:"sq-icon sq-icon-jian"})]),_vm._v(" "),_c('input',{directives:[{name:"model",rawName:"v-model.number",value:(_vm.currentVal),expression:"currentVal",modifiers:{"number":true}}],staticClass:"sq-stepper-input",class:_vm.inputClasses,attrs:{"type":"text","pattern":"[0-9]*","readonly":_vm.readonlyInput,"disabled":_vm.isInputDisabled},domProps:{"value":(_vm.currentVal)},on:{"input":[function($event){if($event.target.composing){ return; }_vm.currentVal=_vm._n($event.target.value)},_vm.$_onInput],"blur":function($event){_vm.$forceUpdate()}}}),_vm._v(" "),_c('span',{staticClass:"sq-stepper-right",class:_vm.addClasses,on:{"click":_vm.$_add}},[_c('i',{staticClass:"sq-icon sq-icon-jia"})])])])} var staticRenderFns = [] var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ __webpack_exports__["a"] = (esExports); /***/ }) /******/ });