UNPKG

vue-mobile-dropdown

Version:

vue2.0 移动端下拉框组件

1,093 lines (980 loc) 134 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else { var a = factory(); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; } })(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, { /******/ 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 = 3); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function(useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if(item[2]) { return "@media " + item[2] + "{" + content + "}"; } else { return content; } }).join(""); }; // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") modules = [[null, modules, ""]]; var alreadyImportedModules = {}; for(var i = 0; i < this.length; i++) { var id = this[i][0]; if(typeof id === "number") alreadyImportedModules[id] = true; } for(i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { if(mediaQuery && !item[2]) { item[2] = mediaQuery; } else if(mediaQuery) { item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; } /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_slide_panel__ = __webpack_require__(10); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_slide_panel___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue_slide_panel__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__font_iconfont_css__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__font_iconfont_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__font_iconfont_css__); // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ data() { return { isShow: false, options: [], rntValue: { value: '', key: '' } }; }, props: { background: { type: String, default: 'transparent' }, placeholder: { type: String, default: '请选择' }, multiple: { type: Boolean, default: false }, data: { type: Array, default: () => [] }, touchClose: { type: Boolean, default: true } }, components: { SlidePanel: __WEBPACK_IMPORTED_MODULE_0_vue_slide_panel___default.a }, mounted() { this.$nextTick(() => { this._initOptions(); }); }, methods: { show(key) { this.showDropdown(key); }, showDropdown(key) { this.isShow = true; this.$nextTick(() => { this.$refs.slidePanel.showSlide(); // 渲染选项 this.rntValue.key = key || ''; this._initOptions(); }); }, hide() { this.hideDropdown(); }, hideDropdown() { this.isShow = false; this.zIndex = -1; this.$emit('change', this.rntValue.value.trim(), this.multiple ? this.rntValue.key.split(' ') : this.rntValue.key); }, select(el) { let tmp = []; this.rntValue = { value: '', key: '' }; this.options.map(e => { if (e.check === undefined) { this.$set(e, 'check', false); } if (e === el) { this.multiple ? el.check = !el.check : el.check = true; } else if (!this.multiple) { e.check = false; } if (e.check) { tmp.push(e); } }); if (this.multiple) { tmp.map(e => { this.rntValue.value += e.value + ' '; this.rntValue.key += e.key + ' '; }); } else { this.rntValue = el; setTimeout(() => { this.hide(); }, 200); } }, _initOptions() { Object.assign(this.options, this.data); if (this.rntValue.key) { let selectedList = this.rntValue.key.split(' '); this.options.map(el => { this.$set(el, 'check', false); if (selectedList.indexOf(el.key) > -1) { el.check = true; } }); } } } }); /***/ }), /* 2 */ /***/ (function(module, exports) { module.exports = "data:application/vnd.ms-fontobject;base64,NBwAAIwbAAABAAIAAAAAAAIABQMA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AACwATAHIAAwABBAkAAAAqAIUAAwABBAkAAQAQAK8AAwABBAkAAgAOAL8AAwABBAkAAwAQAM0AAwABBAkABAAQAN0AAwABBAkABQAWAO0AAwABBAkABgAQAQMAAwABBAkACgBWARMAAwABBAkACwAmAWkKQ3JlYXRlZCBieSBpY29uZm9udAppY29uZm9udFJlZ3VsYXJpY29uZm9udGljb25mb250VmVyc2lvbiAxLjBpY29uZm9udEdlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAAoAQwByAGUAYQB0AGUAZAAgAGIAeQAgAGkAYwBvAG4AZgBvAG4AdAAKAGkAYwBvAG4AZgBvAG4AdABSAGUAZwB1AGwAYQByAGkAYwBvAG4AZgBvAG4AdABpAGMAbwBuAGYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAREBEgETARQBFQEWARcAB2dvdXh1YW4GY2FpZGFuCWNoZW5nZ29uZwdjaGVuZ2ZhB2RpbmdkYW4IZmVueGlhbmcFZ291d3UGZ3VhbmJpB2ppYW50b3UHamlhbmdsaQdqaW5nc2hpB3FpYXF1YW4Ea2VmdQhzaGFpeHVhbgdzaGFuY2h1BnNob3V5ZQZzb3VzdW8Ed29kZQZ4aWFveGkHeWFvcWluZwd6aGlkaW5nAAA=" /***/ }), /* 3 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dropdown_vue__ = __webpack_require__(4); /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__dropdown_vue__["a" /* default */]); /***/ }), /* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_dropdown_vue__ = __webpack_require__(1); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_577e8c6a_hasScoped_true_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_dropdown_vue__ = __webpack_require__(19); var disposed = false function injectStyle (ssrContext) { if (disposed) return __webpack_require__(5) } var normalizeComponent = __webpack_require__(9) /* script */ /* template */ /* template functional */ var __vue_template_functional__ = false /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = "data-v-577e8c6a" /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_dropdown_vue__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_577e8c6a_hasScoped_true_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_dropdown_vue__["a" /* default */], __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) Component.options.__file = "src/dropdown.vue" /* hot reload */ if (false) {(function () { var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api") hotAPI.install(require("vue"), false) if (!hotAPI.compatible) return module.hot.accept() if (!module.hot.data) { hotAPI.createRecord("data-v-577e8c6a", Component.options) } else { hotAPI.reload("data-v-577e8c6a", Component.options) } module.hot.dispose(function (data) { disposed = true }) })()} /* harmony default export */ __webpack_exports__["a"] = (Component.exports); /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(6); if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add the styles to the DOM var update = __webpack_require__(7)("770cda38", content, false, {}); // Hot Module Replacement if(false) { // When the styles change, update the <style> tags if(!content.locals) { module.hot.accept("!!../node_modules/_css-loader@0.28.11@css-loader/index.js?sourceMap!../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-577e8c6a\",\"scoped\":true,\"hasInlineConfig\":false}!../node_modules/_stylus-loader@2.5.1@stylus-loader/index.js!../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=styles&index=0!./dropdown.vue", function() { var newContent = require("!!../node_modules/_css-loader@0.28.11@css-loader/index.js?sourceMap!../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-577e8c6a\",\"scoped\":true,\"hasInlineConfig\":false}!../node_modules/_stylus-loader@2.5.1@stylus-loader/index.js!../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=styles&index=0!./dropdown.vue"); if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; update(newContent); }); } // When the module is disposed, remove the <style> tags module.hot.dispose(function() { update(); }); } /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(0)(true); // imports // module exports.push([module.i, "\n.my-dropdown .slide-header[data-v-577e8c6a] {\n padding-left: 20px;\n position: relative;\n font-size: 16px;\n}\n.my-dropdown .slide-header .close-icon[data-v-577e8c6a] {\n position: absolute;\n right: 20px;\n top: 50%;\n transform: translateY(-50%);\n}\n.my-dropdown .dp-item-list .dp-item[data-v-577e8c6a] {\n padding: 11px 15px;\n border-top: 1px solid #dedede;\n display: flex;\n display: -webkit-flex;\n box-sizing: border-box;\n flex-direction: row;\n align-items: ceter;\n justify-content: space-between;\n font-size: 12px;\n}\n.my-dropdown .dp-item-list .dp-item .text[data-v-577e8c6a] {\n font-size: 16px;\n height: 16px;\n line-height: 16px;\n}\n.my-dropdown .dp-item-list .dp-item .check[data-v-577e8c6a] {\n font-size: 12px;\n color: #409d31;\n}\n.slide-enter-active[data-v-577e8c6a],\n.slide-leave-active[data-v-577e8c6a] {\n transition: all 0.3s;\n}\n.slide-enter[data-v-577e8c6a],\n.slide-leave-to[data-v-577e8c6a] {\n transform: translate3d(0, 100%, 0);\n}\n", "", {"version":3,"sources":["/Users/wangzhengrui/npm/vue-mobile-dropdown/src/src/dropdown.vue","/Users/wangzhengrui/npm/vue-mobile-dropdown/src/dropdown.vue","/Users/wangzhengrui/npm/vue-mobile-dropdown/src/src/mixin.styl"],"names":[],"mappings":";AA2IE;EACE,mBAAA;EACA,mBAAA;EACA,gBAAA;CC1IH;AD2IG;EACE,mBAAA;EACA,YAAA;EACA,SAAA;EACA,4BAAA;CCzIL;AD2IG;EACE,mBAAA;EACA,8BAAA;EExHJ,cAAA;EACA,sBAAA;EACA,uBAAA;EACA,oBAAA;EACA,mBAAA;EACA,+BAAA;EFqHI,gBAAA;CCpIL;ADqIK;EACE,gBAAA;EACA,aAAA;EACA,kBAAA;CCnIP;ADoIK;EACE,gBAAA;EACA,eAAA;CClIP;ADoID;;EACE,qBAAA;CCjID;ADkID;;EACE,mCAAA;CC/HD","file":"dropdown.vue","sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// @import '~./font/iconfont.css'\n@import '~./mixin'\n.my-dropdown\n .slide-header\n padding-left: 20px\n position: relative\n font-size: 16px\n .close-icon\n position: absolute\n right: 20px\n top: 50%\n transform: translateY(-50%)\n .dp-item-list\n .dp-item\n padding: 11px 15px\n border-top: 1px solid #dedede\n flex(row, ceter, space-between)\n font-size: 12px\n .text\n font-size: 16px\n height: 16px\n line-height: 16px\n .check\n font-size: 12px\n color: rgb(64, 157, 49)\n\n.slide-enter-active, .slide-leave-active\n transition: all 0.3s\n.slide-enter, .slide-leave-to\n transform: translate3d(0, 100%, 0)\n",".my-dropdown .slide-header {\n padding-left: 20px;\n position: relative;\n font-size: 16px;\n}\n.my-dropdown .slide-header .close-icon {\n position: absolute;\n right: 20px;\n top: 50%;\n transform: translateY(-50%);\n}\n.my-dropdown .dp-item-list .dp-item {\n padding: 11px 15px;\n border-top: 1px solid #dedede;\n display: flex;\n display: -webkit-flex;\n box-sizing: border-box;\n flex-direction: row;\n align-items: ceter;\n justify-content: space-between;\n font-size: 12px;\n}\n.my-dropdown .dp-item-list .dp-item .text {\n font-size: 16px;\n height: 16px;\n line-height: 16px;\n}\n.my-dropdown .dp-item-list .dp-item .check {\n font-size: 12px;\n color: #409d31;\n}\n.slide-enter-active,\n.slide-leave-active {\n transition: all 0.3s;\n}\n.slide-enter,\n.slide-leave-to {\n transform: translate3d(0, 100%, 0);\n}\n","// 背景图片\nbg-image($url)\n background-image: url($url + \"@2x.png\")\n @media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio: 3)\n background-image: url($url + \"@3x.png\")\n\n// 不换行\nno-wrap()\n text-overflow: ellipsis\n overflow: hidden\n white-space: nowrap\n\n// 扩展点击区域\nextend-click()\n position: relative\n &:before\n content: ''\n position: absolute\n top: -10px\n left: -10px\n right: -10px\n bottom: -10px\n\nround($round)\n border-radius: $round\n -moz-border-radius: $round\n -ms-border-radius: $round\n -webkit-border-radius: $round\n -o-border-radius: $round\n\nflex($direction, $align, $justify)\n display: flex\n display: -webkit-flex\n box-sizing: border-box\n flex-direction: $direction\n align-items: $align\n justify-content: $justify\n\ngradient($position1, $position2, $color1, $color2)\n background: -webkit-linear-gradient($position1 $position2, $color1 , $color2); /* Safari 5.1 - 6.0 */\n background: -o-linear-gradient($position1 $position2, $color1, $color2); /* Opera 11.1 - 12.0 */\n background: -moz-linear-gradient($position1 $position2, $color1, $color2); /* Firefox 3.6 - 15 */\n background: linear-gradient(to $position1 $position2, $color1 , $color2); /* 标准的语法 */\n"],"sourceRoot":""}]); // exports /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra Modified by Evan You @yyx990803 */ var hasDocument = typeof document !== 'undefined' if (typeof DEBUG !== 'undefined' && DEBUG) { if (!hasDocument) { throw new Error( 'vue-style-loader cannot be used in a non-browser environment. ' + "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." ) } } var listToStyles = __webpack_require__(8) /* type StyleObject = { id: number; parts: Array<StyleObjectPart> } type StyleObjectPart = { css: string; media: string; sourceMap: ?string } */ var stylesInDom = {/* [id: number]: { id: number, refs: number, parts: Array<(obj?: StyleObjectPart) => void> } */} var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) var singletonElement = null var singletonCounter = 0 var isProduction = false var noop = function () {} var options = null var ssrIdKey = 'data-vue-ssr-id' // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) module.exports = function (parentId, list, _isProduction, _options) { isProduction = _isProduction options = _options || {} var styles = listToStyles(parentId, list) addStylesToDom(styles) return function update (newList) { var mayRemove = [] for (var i = 0; i < styles.length; i++) { var item = styles[i] var domStyle = stylesInDom[item.id] domStyle.refs-- mayRemove.push(domStyle) } if (newList) { styles = listToStyles(parentId, newList) addStylesToDom(styles) } else { styles = [] } for (var i = 0; i < mayRemove.length; i++) { var domStyle = mayRemove[i] if (domStyle.refs === 0) { for (var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j]() } delete stylesInDom[domStyle.id] } } } } function addStylesToDom (styles /* Array<StyleObject> */) { for (var i = 0; i < styles.length; i++) { var item = styles[i] var domStyle = stylesInDom[item.id] if (domStyle) { domStyle.refs++ for (var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]) } for (; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j])) } if (domStyle.parts.length > item.parts.length) { domStyle.parts.length = item.parts.length } } else { var parts = [] for (var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j])) } stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } } } } function createStyleElement () { var styleElement = document.createElement('style') styleElement.type = 'text/css' head.appendChild(styleElement) return styleElement } function addStyle (obj /* StyleObjectPart */) { var update, remove var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]') if (styleElement) { if (isProduction) { // has SSR styles and in production mode. // simply do nothing. return noop } else { // has SSR styles but in dev mode. // for some reason Chrome can't handle source map in server-rendered // style tags - source maps in <style> only works if the style tag is // created and inserted dynamically. So we remove the server rendered // styles and inject new ones. styleElement.parentNode.removeChild(styleElement) } } if (isOldIE) { // use singleton mode for IE9. var styleIndex = singletonCounter++ styleElement = singletonElement || (singletonElement = createStyleElement()) update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) } else { // use multi-style-tag mode in all other cases styleElement = createStyleElement() update = applyToTag.bind(null, styleElement) remove = function () { styleElement.parentNode.removeChild(styleElement) } } update(obj) return function updateStyle (newObj /* StyleObjectPart */) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { return } update(obj = newObj) } else { remove() } } } var replaceText = (function () { var textStore = [] return function (index, replacement) { textStore[index] = replacement return textStore.filter(Boolean).join('\n') } })() function applyToSingletonTag (styleElement, index, remove, obj) { var css = remove ? '' : obj.css if (styleElement.styleSheet) { styleElement.styleSheet.cssText = replaceText(index, css) } else { var cssNode = document.createTextNode(css) var childNodes = styleElement.childNodes if (childNodes[index]) styleElement.removeChild(childNodes[index]) if (childNodes.length) { styleElement.insertBefore(cssNode, childNodes[index]) } else { styleElement.appendChild(cssNode) } } } function applyToTag (styleElement, obj) { var css = obj.css var media = obj.media var sourceMap = obj.sourceMap if (media) { styleElement.setAttribute('media', media) } if (options.ssrId) { styleElement.setAttribute(ssrIdKey, obj.id) } if (sourceMap) { // https://developer.chrome.com/devtools/docs/javascript-debugging // this makes source maps inside style tags work properly in Chrome css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' // http://stackoverflow.com/a/26603875 css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' } if (styleElement.styleSheet) { styleElement.styleSheet.cssText = css } else { while (styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild) } styleElement.appendChild(document.createTextNode(css)) } } /***/ }), /* 8 */ /***/ (function(module, exports) { /** * Translates the list format produced by css-loader into something * easier to manipulate. */ module.exports = function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: media, sourceMap: sourceMap } if (!newStyles[id]) { styles.push(newStyles[id] = { id: id, parts: [part] }) } else { newStyles[id].parts.push(part) } } return styles } /***/ }), /* 9 */ /***/ (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 } } /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { if(true) module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else { var a = factory(); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; } })(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, { /******/ 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 = 1); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ data() { return { screenHeight: 0, show: false, zIndex: -1 }; }, props: { maxHeight: { type: String, default: '0.5' }, background: { type: String, default: 'rgba(0,0,0,0.1)' }, // 可否点击mask关闭 autoClose: { type: Boolean, default: true } }, computed: { containerStyle() { return `height: ${this.screenHeight}px; z-index: ${this.zIndex};`; }, wrapperStyle() { return `height: ${this.screenHeight}px; z-index: ${this.zIndex};background: ${this.background}`; } }, mounted() { this.screenHeight = document.documentElement.clientHeight; }, methods: { showSlide() { this.show = true; this.zIndex = 9; this._setHeight(); }, hideSlide() { if (this.autoClose) { this.show = false; this.zIndex = -1; this.$emit('hide'); } }, _setHeight() { this.$nextTick(() => { let slideHeight = this.$refs.slideMain.clientHeight; if (slideHeight > this.screenHeight * parseFloat(this.maxHeight)) { this.$refs.slideMask.style.height = this.screenHeight - this.screenHeight * parseFloat(this.maxHeight) + 'px'; } else { this.$refs.slideMask.style.height = this.screenHeight - slideHeight + 'px'; } this.$refs.smMain.style.height = this.screenHeight - this.$refs.slideMask.clientHeight - this.$refs.slideHeader.clientHeight + 'px'; }); } } }); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__slide_panel_vue__ = __webpack_require__(2); /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__slide_panel_vue__["a" /* default */]); /***/ }), /* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_slide_panel_vue__ = __webpack_require__(0); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_3676579f_hasScoped_true_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_slide_panel_vue__ = __webpack_require__(9); var disposed = false function injectStyle (ssrContext) { if (disposed) return __webpack_require__(3) } var normalizeComponent = __webpack_require__(8) /* script */ /* template */ /* template functional */ var __vue_template_functional__ = false /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = "data-v-3676579f" /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_slide_panel_vue__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_3676579f_hasScoped_true_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_slide_panel_vue__["a" /* default */], __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) Component.options.__file = "src/slide-panel.vue" /* hot reload */ if (false) {(function () { var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api") hotAPI.install(require("vue"), false) if (!hotAPI.compatible) return module.hot.accept() if (!module.hot.data) { hotAPI.createRecord("data-v-3676579f", Component.options) } else { hotAPI.reload("data-v-3676579f", Component.options) } module.hot.dispose(function (data) { disposed = true }) })()} /* harmony default export */ __webpack_exports__["a"] = (Component.exports); /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(4); if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add the styles to the DOM var update = __webpack_require__(6)("f2ba7fda", content, false, {}); // Hot Module Replacement if(false) { // When the styles change, update the <style> tags if(!content.locals) { module.hot.accept("!!../node_modules/_css-loader@0.28.11@css-loader/index.js?sourceMap!../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-3676579f\",\"scoped\":true,\"hasInlineConfig\":false}!../node_modules/_stylus-loader@2.5.1@stylus-loader/index.js!../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=styles&index=0!./slide-panel.vue", function() { var newContent = require("!!../node_modules/_css-loader@0.28.11@css-loader/index.js?sourceMap!../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-3676579f\",\"scoped\":true,\"hasInlineConfig\":false}!../node_modules/_stylus-loader@2.5.1@stylus-loader/index.js!../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=styles&index=0!./slide-panel.vue"); if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; update(newContent); }); } // When the module is disposed, remove the <style> tags module.hot.dispose(function() { update(); }); } /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(5)(true); // imports // module exports.push([module.i, "\n.slide-container[data-v-3676579f] {\n position: fixed;\n top: 0;\n z-index: -1;\n width: 100%;\n overflow: hidden;\n}\n.slide-container .slide-wrapper[data-v-3676579f] {\n width: 100%;\n}\n.slide-container .slide-wrapper .slide-main[data-v-3676579f] {\n background-color: #fff;\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n position: relative;\n box-shadow: 1px -1px 20px 0px #ababab;\n}\n.slide-container .slide-wrapper .slide-main .sm-header[data-v-3676579f] {\n font-size: 14px;\n height: 40px;\n line-height: 40px;\n color: #666;\n}\n.slide-container .slide-wrapper .slide-main .sm-main[data-v-3676579f] {\n overflow: auto;\n}\n.slide-enter-active[data-v-3676579f],\n.slide-leave-active[data-v-3676579f] {\n transition: all 0.3s;\n}\n.slide-enter[data-v-3676579f],\n.slide-leave-to[data-v-3676579f] {\n transform: translate3d(0, 100%, 0);\n}\n", "", {"version":3,"sources":["/Users/wangzhengrui/npm/vue-slide-panel/src/src/slide-panel.vue","/Users/wangzhengrui/npm/vue-slide-panel/src/slide-panel.vue"],"names":[],"mappings":";AAmFA;EACE,gBAAA;EACA,OAAA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;CClFD;ADmFC;EACE,YAAA;CCjFH;ADkFG;EACE,uBAAA;EACA,6BAAA;EACA,8BAAA;EACA,mBAAA;EACA,sCAAA;CChFL;ADiFK;EACE,gBAAA;EACA,aAAA;EACA,kBAAA;EACA,YAAA;CC/EP;ADgFK;EACE,eAAA;CC9EP;ADgFD;;EACE,qBAAA;CC7ED;AD8ED;;EACE,mCAAA;CC3ED","file":"slide-panel.vue","sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.slide-container\n position: fixed\n top: 0\n z-index: -1\n width: 100%\n overflow: hidden\n .slide-wrapper\n width: 100%\n .slide-main\n background-color: #fff\n border-top-left-radius: 16px\n border-top-right-radius: 16px\n position: relative\n box-shadow: 1px -1px 20px 0px #ababab\n .sm-header\n font-size: 14px\n height: 40px\n line-height: 40px\n color: #666\n .sm-main\n overflow: auto\n\n.slide-enter-active, .slide-leave-active\n transition: all 0.3s\n.slide-enter, .slide-leave-to\n transform: translate3d(0, 100%, 0)\n",".slide-container {\n position: fixed;\n top: 0;\n z-index: -1;\n width: 100%;\n overflow: hidden;\n}\n.slide-container .slide-wrapper {\n width: 100%;\n}\n.slide-container .slide-wrapper .slide-main {\n background-color: #fff;\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n position: relative;\n box-shadow: 1px -1px 20px 0px #ababab;\n}\n.slide-container .slide-wrapper .slide-main .sm-header {\n font-size: 14px;\n height: 40px;\n line-height: 40px;\n color: #666;\n}\n.slide-container .slide-wrapper .slide-main .sm-main {\n overflow: auto;\n}\n.slide-enter-active,\n.slide-leave-active {\n transition: all 0.3s;\n}\n.slide-enter,\n.slide-leave-to {\n transform: translate3d(0, 100%, 0);\n}\n"],"sourceRoot":""}]); // exports /***/ }), /* 5 */ /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function(useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if(item[2]) { return "@media " + item[2] + "{" + content + "}"; } else { return content; } }).join(""); }; // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") modules = [[null, modules, ""]]; var alreadyImportedModules = {}; for(var i = 0; i < this.length; i++) { var id = this[i][0]; if(typeof id === "number") alreadyImportedModules[id] = true; } for(i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bun