.'\n );\n }\n }\n el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n }\n\n var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n if (styleBinding) {\n el.styleBinding = styleBinding;\n }\n}\n\nfunction genData$2 (el) {\n var data = '';\n if (el.staticStyle) {\n data += \"staticStyle:\" + (el.staticStyle) + \",\";\n }\n if (el.styleBinding) {\n data += \"style:(\" + (el.styleBinding) + \"),\";\n }\n return data\n}\n\nvar style$1 = {\n staticKeys: ['staticStyle'],\n transformNode: transformNode$1,\n genData: genData$2\n};\n\nvar modules$1 = [\n klass$1,\n style$1\n];\n\n/* */\n\nfunction text (el, dir) {\n if (dir.value) {\n addProp(el, 'textContent', (\"_s(\" + (dir.value) + \")\"));\n }\n}\n\n/* */\n\nfunction html (el, dir) {\n if (dir.value) {\n addProp(el, 'innerHTML', (\"_s(\" + (dir.value) + \")\"));\n }\n}\n\nvar directives$1 = {\n model: model,\n text: text,\n html: html\n};\n\n/* */\n\nvar baseOptions = {\n expectHTML: true,\n modules: modules$1,\n directives: directives$1,\n isPreTag: isPreTag,\n isUnaryTag: isUnaryTag,\n mustUseProp: mustUseProp,\n canBeLeftOpenTag: canBeLeftOpenTag,\n isReservedTag: isReservedTag,\n getTagNamespace: getTagNamespace,\n staticKeys: genStaticKeys(modules$1)\n};\n\nvar ref$1 = createCompiler(baseOptions);\nvar compileToFunctions = ref$1.compileToFunctions;\n\n/* */\n\nvar idToTemplate = cached(function (id) {\n var el = query(id);\n return el && el.innerHTML\n});\n\nvar mount = Vue$3.prototype.$mount;\nVue$3.prototype.$mount = function (\n el,\n hydrating\n) {\n el = el && query(el);\n\n /* istanbul ignore if */\n if (el === document.body || el === document.documentElement) {\n \"production\" !== 'production' && warn(\n \"Do not mount Vue to or - mount to normal elements instead.\"\n );\n return this\n }\n\n var options = this.$options;\n // resolve template/el and convert to render function\n if (!options.render) {\n var template = options.template;\n if (template) {\n if (typeof template === 'string') {\n if (template.charAt(0) === '#') {\n template = idToTemplate(template);\n /* istanbul ignore if */\n if (false) {\n warn(\n (\"Template element not found or is empty: \" + (options.template)),\n this\n );\n }\n }\n } else if (template.nodeType) {\n template = template.innerHTML;\n } else {\n if (false) {\n warn('invalid template option:' + template, this);\n }\n return this\n }\n } else if (el) {\n template = getOuterHTML(el);\n }\n if (template) {\n /* istanbul ignore if */\n if (false) {\n mark('compile');\n }\n\n var ref = compileToFunctions(template, {\n shouldDecodeNewlines: shouldDecodeNewlines,\n delimiters: options.delimiters\n }, this);\n var render = ref.render;\n var staticRenderFns = ref.staticRenderFns;\n options.render = render;\n options.staticRenderFns = staticRenderFns;\n\n /* istanbul ignore if */\n if (false) {\n mark('compile end');\n measure(((this._name) + \" compile\"), 'compile', 'compile end');\n }\n }\n }\n return mount.call(this, el, hydrating)\n};\n\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML (el) {\n if (el.outerHTML) {\n return el.outerHTML\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML\n }\n}\n\nVue$3.compile = compileToFunctions;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Vue$3);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(25)))\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_loading_vue__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_loading_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__components_loading_vue__);\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/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'app',\n components: {\n vueLoading: __WEBPACK_IMPORTED_MODULE_0__components_loading_vue___default.a\n }\n});\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__svg__ = __webpack_require__(8);\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'vue-loading',\n props: {\n type: {\n type: String,\n default: 'beat'\n },\n color: {\n type: String,\n default: '#5ac1dd'\n },\n size: { default: function _default() {\n return { width: '30px', height: '30px' };\n } }\n },\n computed: {\n svg: function svg() {\n return __WEBPACK_IMPORTED_MODULE_0__svg__[this.type];\n },\n loadingStyle: function loadingStyle() {\n return { fill: this.color, width: this.size.width, height: this.size.height };\n }\n }\n});\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_vue__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__App_vue__);\n\n\n\nnew __WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */]({\n el: '#app',\n render: function render(h) {\n return h(__WEBPACK_IMPORTED_MODULE_1__App_vue___default.a);\n }\n});\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__loading_balls_svg__ = __webpack_require__(11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__loading_balls_svg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__loading_balls_svg__);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"balls\", function() { return __WEBPACK_IMPORTED_MODULE_0__loading_balls_svg___default.a; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__loading_bars_svg__ = __webpack_require__(13);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__loading_bars_svg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__loading_bars_svg__);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"bars\", function() { return __WEBPACK_IMPORTED_MODULE_1__loading_bars_svg___default.a; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__loading_beat_svg__ = __webpack_require__(14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__loading_beat_svg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__loading_beat_svg__);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"beat\", function() { return __WEBPACK_IMPORTED_MODULE_2__loading_beat_svg___default.a; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__loading_bubbles_svg__ = __webpack_require__(15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__loading_bubbles_svg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__loading_bubbles_svg__);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"bubbles\", function() { return __WEBPACK_IMPORTED_MODULE_3__loading_bubbles_svg___default.a; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__loading_cylon_svg__ = __webpack_require__(16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__loading_cylon_svg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__loading_cylon_svg__);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"cylon\", function() { return __WEBPACK_IMPORTED_MODULE_4__loading_cylon_svg___default.a; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__loading_spin_svg__ = __webpack_require__(17);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__loading_spin_svg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__loading_spin_svg__);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"spin\", function() { return __WEBPACK_IMPORTED_MODULE_5__loading_spin_svg___default.a; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__loading_spining_dubbles_svg__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__loading_spining_dubbles_svg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__loading_spining_dubbles_svg__);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"spiningDubbles\", function() { return __WEBPACK_IMPORTED_MODULE_6__loading_spining_dubbles_svg___default.a; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__loading_bars_cylon_svg__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__loading_bars_cylon_svg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__loading_bars_cylon_svg__);\n/* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, \"barsCylon\", function() { return __WEBPACK_IMPORTED_MODULE_7__loading_bars_cylon_svg___default.a; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)();\n// imports\n\n\n// module\nexports.push([module.i, \".vue-loading[data-v-09ed86b6]{margin:auto}\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(0)();\n// imports\n\n\n// module\nexports.push([module.i, \"#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;width:800px;margin:100px auto;display:flex;justify-content:space-around;flex-wrap:wrap}.item{width:200px}h1,h2{font-weight:400}ul{list-style-type:none;padding:0}li{display:inline-block;margin:0 10px}a{color:#42b983}\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n \"\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n\"\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n\"\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \"\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\n/* styles */\n__webpack_require__(22)\n\nvar Component = __webpack_require__(1)(\n /* script */\n __webpack_require__(6),\n /* template */\n __webpack_require__(20),\n /* scopeId */\n \"data-v-09ed86b6\",\n /* cssModules */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-loading\",\n style: (_vm.loadingStyle),\n domProps: {\n \"innerHTML\": _vm._s(_vm.svg)\n }\n })\n},staticRenderFns: []}\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n attrs: {\n \"id\": \"app\"\n }\n }, [_c('div', {\n staticClass: \"balls item\"\n }, [_c('h2', [_vm._v(\"balls\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"balls\",\n \"color\": \"#FF4949\",\n \"size\": {\n width: '40px',\n height: '40px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"bars item\"\n }, [_c('h2', [_vm._v(\"bars\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"bars\",\n \"color\": \"#20A0FF\",\n \"size\": {\n width: '30px',\n height: '30px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"beat item\"\n }, [_c('h2', [_vm._v(\"beat\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"beat\",\n \"color\": \"#F7BA2A\",\n \"size\": {\n width: '30px',\n height: '30px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"bubbles item\"\n }, [_c('h2', [_vm._v(\"bubbles\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"bubbles\",\n \"color\": \"#efad4c\",\n \"size\": {\n width: '40px',\n height: '40px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"cylon item\"\n }, [_c('h2', [_vm._v(\"cylon\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"cylon\",\n \"color\": \"#5ab95c\",\n \"size\": {\n width: '40px',\n height: '40px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"spin item\"\n }, [_c('h2', [_vm._v(\"spin\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"spin\",\n \"color\": \"black\",\n \"size\": {\n width: '50px',\n height: '50px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"spiningDubbles item\"\n }, [_c('h2', [_vm._v(\"spiningDubbles\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"spiningDubbles\",\n \"color\": \"#5ac1dd\",\n \"size\": {\n width: '60px',\n height: '60px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"barsCylon item\"\n }, [_c('h2', [_vm._v(\"barsCylon\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"barsCylon\",\n \"color\": \"#457e86\",\n \"size\": {\n width: '40px',\n height: '40px'\n }\n }\n })], 1)])\n},staticRenderFns: []}\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a \n\n\n\n// WEBPACK FOOTER //\n// App.vue?1399c420","
\r\n
\r\n \r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// loading.vue?54e9d0dc","import Vue from 'vue'\nimport App from './App.vue'\n\nnew Vue({\n el: '#app',\n render: h => h(App)\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".vue-loading[data-v-09ed86b6]{margin:auto}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader?minimize!./~/vue-loader/lib/style-compiler?{\"id\":\"data-v-09ed86b6\",\"scoped\":true,\"hasInlineConfig\":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/loading.vue\n// module id = 9\n// module chunks = 0","exports = module.exports = require(\"../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;width:800px;margin:100px auto;display:flex;justify-content:space-around;flex-wrap:wrap}.item{width:200px}h1,h2{font-weight:400}ul{list-style-type:none;padding:0}li{display:inline-block;margin:0 10px}a{color:#42b983}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader?minimize!./~/vue-loader/lib/style-compiler?{\"id\":\"data-v-26a0bf1e\",\"scoped\":false,\"hasInlineConfig\":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue\n// module id = 10\n// module chunks = 0","module.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-balls.svg\n// module id = 11\n// module chunks = 0","module.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-bars-cylon.svg\n// module id = 12\n// module chunks = 0","module.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-bars.svg\n// module id = 13\n// module chunks = 0","module.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-beat.svg\n// module id = 14\n// module chunks = 0","module.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-bubbles.svg\n// module id = 15\n// module chunks = 0","module.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-cylon.svg\n// module id = 16\n// module chunks = 0","module.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-spin.svg\n// module id = 17\n// module chunks = 0","module.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-spining-dubbles.svg\n// module id = 18\n// module chunks = 0","\n/* styles */\nrequire(\"!!vue-style-loader!css-loader?minimize!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"id\\\":\\\"data-v-09ed86b6\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./loading.vue\")\n\nvar Component = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")(\n /* script */\n require(\"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./loading.vue\"),\n /* template */\n require(\"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-09ed86b6\\\"}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./loading.vue\"),\n /* scopeId */\n \"data-v-09ed86b6\",\n /* cssModules */\n null\n)\n\nmodule.exports = Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/loading.vue\n// module id = 19\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-loading\",\n style: (_vm.loadingStyle),\n domProps: {\n \"innerHTML\": _vm._s(_vm.svg)\n }\n })\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler?{\"id\":\"data-v-09ed86b6\"}!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/loading.vue\n// module id = 20\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n attrs: {\n \"id\": \"app\"\n }\n }, [_c('div', {\n staticClass: \"balls item\"\n }, [_c('h2', [_vm._v(\"balls\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"balls\",\n \"color\": \"#FF4949\",\n \"size\": {\n width: '40px',\n height: '40px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"bars item\"\n }, [_c('h2', [_vm._v(\"bars\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"bars\",\n \"color\": \"#20A0FF\",\n \"size\": {\n width: '30px',\n height: '30px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"beat item\"\n }, [_c('h2', [_vm._v(\"beat\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"beat\",\n \"color\": \"#F7BA2A\",\n \"size\": {\n width: '30px',\n height: '30px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"bubbles item\"\n }, [_c('h2', [_vm._v(\"bubbles\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"bubbles\",\n \"color\": \"#efad4c\",\n \"size\": {\n width: '40px',\n height: '40px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"cylon item\"\n }, [_c('h2', [_vm._v(\"cylon\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"cylon\",\n \"color\": \"#5ab95c\",\n \"size\": {\n width: '40px',\n height: '40px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"spin item\"\n }, [_c('h2', [_vm._v(\"spin\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"spin\",\n \"color\": \"black\",\n \"size\": {\n width: '50px',\n height: '50px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"spiningDubbles item\"\n }, [_c('h2', [_vm._v(\"spiningDubbles\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"spiningDubbles\",\n \"color\": \"#5ac1dd\",\n \"size\": {\n width: '60px',\n height: '60px'\n }\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"barsCylon item\"\n }, [_c('h2', [_vm._v(\"barsCylon\")]), _vm._v(\" \"), _c('vue-loading', {\n attrs: {\n \"type\": \"barsCylon\",\n \"color\": \"#457e86\",\n \"size\": {\n width: '40px',\n height: '40px'\n }\n }\n })], 1)])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler?{\"id\":\"data-v-26a0bf1e\"}!./~/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue\n// module id = 21\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// loading.vue?54e9d0dc","/**\r\n * Vue-loading-template\r\n * @author jkchao\r\n */\r\n\r\nimport vueLoading from './components/loading.vue'\r\n\r\n// 导出模块\r\nexport default vueLoading\r\n\r\n//global 情况下 自动安装\r\nif (typeof window !== 'undefined' && window.Vue) {\r\n window.Vue.component('vue-loading', vueLoading)\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".vue-loading[data-v-09ed86b6]{margin:auto}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader?minimize!./~/vue-loader/lib/style-compiler?{\"id\":\"data-v-09ed86b6\",\"scoped\":true,\"hasInlineConfig\":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/loading.vue\n// module id = 4\n// module chunks = 0","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader/lib/css-base.js\n// module id = 5\n// module chunks = 0","module.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-balls.svg\n// module id = 6\n// module chunks = 0","module.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-bars-cylon.svg\n// module id = 7\n// module chunks = 0","module.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-bars.svg\n// module id = 8\n// module chunks = 0","module.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-beat.svg\n// module id = 9\n// module chunks = 0","module.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-bubbles.svg\n// module id = 10\n// module chunks = 0","module.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-cylon.svg\n// module id = 11\n// module chunks = 0","module.exports = \"
\\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-spin.svg\n// module id = 12\n// module chunks = 0","module.exports = \"\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg/loading-spining-dubbles.svg\n// module id = 13\n// module chunks = 0","// this module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n scopeId,\n cssModules\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n // inject cssModules\n if (cssModules) {\n var computed = Object.create(options.computed || null)\n Object.keys(cssModules).forEach(function (key) {\n var module = cssModules[key]\n computed[key] = function () { return module }\n })\n options.computed = computed\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/component-normalizer.js\n// module id = 14\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-loading\",\n style: (_vm.loadingStyle),\n domProps: {\n \"innerHTML\": _vm._s(_vm.svg)\n }\n })\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler?{\"id\":\"data-v-09ed86b6\"}!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/loading.vue\n// module id = 15\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a
+
diff --git a/src/components/loading.vue b/src/components/loading.vue
deleted file mode 100644
index d5f9ec5..0000000
--- a/src/components/loading.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
deleted file mode 100644
index 6ea7218..0000000
--- a/src/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * Vue-loading-template
- * @author jkchao
- */
-
-import vueLoading from './components/loading.vue'
-
-// 导出模块
-export default vueLoading
-
-//global 情况下 自动安装
-if (typeof window !== 'undefined' && window.Vue) {
- window.Vue.component('vue-loading', vueLoading)
-}
diff --git a/src/index.ts b/src/index.ts
new file mode 100644
index 0000000..ae14b2e
--- /dev/null
+++ b/src/index.ts
@@ -0,0 +1,40 @@
+/**
+ * Vue-loading-template
+ * @author jkchao
+ */
+
+import Vue from 'vue'
+
+import VueLoading from '@/components/Loading.vue'
+import { VueLoadingOptions } from '../typings'
+
+interface Props {
+ type: { default: string },
+ color: { default: string },
+ size: { default: () => any },
+ [ key: string ]: any
+}
+
+const install = (
+ vue: typeof Vue,
+ options?: VueLoadingOptions
+) => {
+
+ if (options) {
+ const componentProps = new VueLoading().$options.props as Props
+
+ componentProps.type.default = options.type || 'balls'
+ componentProps.color.default = options.color || '#5ac1dd'
+ componentProps.size.default = () => options.size || { width: '30px', height: '30px' }
+ }
+
+
+ vue.component('vue-loading', VueLoading)
+
+}
+
+
+// 导出模块
+export { VueLoading }
+
+export default { install }
diff --git a/src/main.js b/src/main.ts
similarity index 53%
rename from src/main.js
rename to src/main.ts
index 385fcfe..3c4f435 100644
--- a/src/main.js
+++ b/src/main.ts
@@ -1,7 +1,10 @@
import Vue from 'vue'
import App from './App.vue'
+import vueLoading from './index'
+
+Vue.use(vueLoading)
+
new Vue({
- el: '#app',
render: h => h(App)
-})
+}).$mount('#app')
diff --git a/src/svg/index.js b/src/svg/index.ts
similarity index 86%
rename from src/svg/index.js
rename to src/svg/index.ts
index 2054c19..3c31ce7 100644
--- a/src/svg/index.js
+++ b/src/svg/index.ts
@@ -12,4 +12,4 @@ export { default as spin } from './loading-spin.svg'
export { default as spiningDubbles } from './loading-spining-dubbles.svg'
-export { default as barsCylon } from './loading-bars-cylon.svg'
\ No newline at end of file
+export { default as barsCylon } from './loading-bars-cylon.svg'
diff --git a/src/typings/shims-vue.d.ts b/src/typings/shims-vue.d.ts
new file mode 100644
index 0000000..8f6f410
--- /dev/null
+++ b/src/typings/shims-vue.d.ts
@@ -0,0 +1,4 @@
+declare module '*.vue' {
+ import Vue from 'vue';
+ export default Vue;
+}
diff --git a/src/typings/shims.tsx.d.ts b/src/typings/shims.tsx.d.ts
new file mode 100644
index 0000000..c656c68
--- /dev/null
+++ b/src/typings/shims.tsx.d.ts
@@ -0,0 +1,13 @@
+import Vue, { VNode } from 'vue'
+
+declare global {
+ namespace JSX {
+ // tslint:disable no-empty-interface
+ interface Element extends VNode {}
+ // tslint:disable no-empty-interface
+ interface ElementClass extends Vue {}
+ interface IntrinsicElements {
+ [elem: string]: any
+ }
+ }
+}
diff --git a/src/typings/utils.d.ts b/src/typings/utils.d.ts
new file mode 100644
index 0000000..3b5f18d
--- /dev/null
+++ b/src/typings/utils.d.ts
@@ -0,0 +1,2 @@
+
+declare module '*.svg'
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..1e47fb6
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,64 @@
+{
+ "include": [
+ "src/**/*.ts",
+ "src/**/*.tsx",
+ "src/**/*.vue",
+ ],
+ "exclude": [
+ "node_modules"
+ ],
+ "compilerOptions": {
+ "baseUrl": ".",
+ "paths": {
+ "@/*": [
+ "src/*"
+ ]
+ },
+ // types option has been previously configured
+ "types": [
+ // add node as an option
+ "node"
+ ],
+ // typeRoots option has been previously configured
+ "typeRoots": [
+ // add path to @types
+ "node_modules/@types"
+ ],
+ "strictPropertyInitialization": false,
+ // 以严格模式解析
+ "strict": true,
+ // 在.tsx文件里支持JSX
+ "jsx": "preserve",
+ // 使用的JSX工厂函数
+ "jsxFactory": "h",
+ // 允许从没有设置默认导出的模块中默认导入
+ "allowSyntheticDefaultImports": true,
+ // 启用装饰器
+ "experimentalDecorators": true,
+ //
+ "emitDecoratorMetadata": true,
+ // 允许编译javascript文件
+ "allowJs": true,
+ // 采用的模块系统
+ "module": "esnext",
+ // 编译输出目标 ES 版本
+ "target": "esnext",
+ // 如何处理模块
+ "moduleResolution": "node",
+ // 在表达式和声明上有隐含的any类型时报错
+ "noImplicitAny": true,
+ // 导入辅助函数
+ "importHelpers": true,
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "es5",
+ "es6",
+ "es7",
+ "es2015.promise",
+ "scripthost"
+ ],
+ "sourceMap": true,
+ "pretty": true
+ }
+}
diff --git a/tslint.json b/tslint.json
new file mode 100644
index 0000000..0a0cd15
--- /dev/null
+++ b/tslint.json
@@ -0,0 +1,246 @@
+{
+ "defaultSeverity": "error",
+ "extends": [
+ "tslint:recommended"
+ ],
+ "linterOptions": {
+ "exclude": [
+ "node_modules/**"
+ ]
+ },
+ "jsRules": {},
+ "rules": {
+ // 允许使用 console
+ "no-console": false,
+
+ // 代码块的内容不能为空,禁止空代码块
+ "no-empty": true,
+
+ // 单引号
+ "quotemark": false,
+
+ // 不加分号
+ "semicolon": [
+ true,
+ "never"
+ ],
+
+ // 如果一个变量声明后不再被修改,那么应使用 const 来声明该变量
+ "prefer-const": true,
+
+ // 设置成员对象的访问权限(public,private,protect)
+ "member-access": true,
+
+ // 设置修饰符顺序
+ "member-ordering": [
+ true,
+ {
+ "order": [
+ "private-static-field",
+ "private-static-method",
+ "protected-static-field",
+ "protected-static-method",
+ "public-static-field",
+ "public-static-method",
+ "private-instance-field",
+ "protected-instance-field",
+ "public-instance-field",
+ "private-constructor",
+ "protected-constructor",
+ "public-constructor",
+ "private-instance-method",
+ "protected-instance-method",
+ "public-instance-method"
+ ]
+ }
+ ],
+
+ // 不允许空接口
+ "no-empty-interface": false,
+
+ // 不允许修改方法输入参数
+ "no-parameter-reassignment": true,
+
+ // 如果for循环中没有使用索引,建议是使用for-of
+ "prefer-for-of": false,
+
+ // 不允许没有Promise的情况下使用await
+ "await-promise": true,
+
+ // if/for/do/while强制使用大括号 同行除外
+ "curly": [
+ true,
+ "ignore-same-line"
+ ],
+
+ // f使用for in语句时,强制进行hasOwnProperty检查
+ "forin": true,
+
+ // 不允许使用arguments.callee,
+ "no-arg": true,
+
+ // 不允许使用特殊运算符 &, &=, |, |=, ^, ^=, <<, <<=, >>, >>=, >>>, >>>=, ~
+ "no-bitwise": true,
+
+ // do while/for/if/while 语句中将会对例如if(a=b)进行检查
+ "no-conditional-assignment": true,
+
+ // no-eval
+ "no-eval": true,
+
+ // 不允许使用 var
+ "no-var-keyword": true,
+
+ // 不允许 debugger
+ "no-debugger": true,
+
+ // 不允许super() 两次使用在构造函数中
+ "no-duplicate-super": true,
+
+ // 只允许在模板字符串中使用${
+ "no-invalid-template-strings": true,
+
+
+ // 不允许使用null,使用undefined代替null,指代空指针对象
+ // "no-null-keyword": true,
+
+ // 不允许 array 中有空元素
+ "no-sparse-arrays": true,
+
+ // 不允许throw一个字符串
+ "no-string-throw": true,
+
+ // 不允许在finally语句中使用return/continue/break/throw
+ "no-unsafe-finally": true,
+
+ // 不允许使用未使用的表达式
+ "no-unused-expression": false,
+
+ // 在使用前必须声明
+ "no-use-before-declare": true,
+
+ // parseInt时,必须输入radix精度参数
+ "radix": true,
+
+ // 不允许自动类型转换,如果已设置不允许使用关键字var该设置无效
+ "restrict-plus-operands": true,
+
+ // 必须使用恒等号,进行等于比较
+ "triple-equals": true,
+
+ // 只允许使用isNaN方法检查数字是否有效
+ "use-isnan": true,
+
+ // 每行开始以4个空格符开始
+ "indent": [true, "spaces", 2],
+
+ // 禁止在一个文件内,多次引用同一module
+ "no-duplicate-imports": true,
+
+ // 建议使用T[]方式声明一个数组对象
+ "array-type": [true, "array"],
+
+ // 类名以大驼峰格式命名
+ "class-name": true,
+
+ // 定义注释格式
+ "comment-format": [true, "check-space"],
+
+ // import关键字后加空格
+ "import-spacing": true,
+
+ // interface必须以I开头
+ "interface-name": false,
+
+ // 注释基于jsdoc风格
+ "jsdoc-format": true,
+
+ // 调用构造函数时需要用括号
+ "new-parens": true,
+
+ // 不允许有空行
+ "no-consecutive-blank-lines": [true,2],
+
+ "whitespace": [
+ true,
+ "check-branch",
+ // "check-decl",
+ "check-module",
+ "check-separator",
+ "check-rest-spread",
+ "check-type",
+ "check-type-operator"
+ // "check-preblock"
+ ],
+
+ // 不允许空格结尾
+ "no-trailing-whitespace": true,
+
+ // 不允许没有必要的初始化
+ "no-unnecessary-initializer": true,
+
+ // 定义变量命名规则
+ "variable-name": [
+ true,
+ "check-format",
+ "allow-leading-underscore",
+ "allow-trailing-underscore",
+ "allow-pascal-case",
+ "ban-keywords"
+ ],
+
+ // 句尾逗号
+ "trailing-comma": [
+ true,
+ {
+ "multiline": "never",
+ "singleline": "never"
+ }
+ ],
+
+ "max-classes-per-file": false,
+
+
+ // 不允许case段落中在没有使用breack的情况下,在新启一段case逻辑
+ "no-switch-case-fall-through": true,
+
+ "no-angle-bracket-type-assertion": false,
+
+ "one-line": [
+ true,
+ "check-open-brace"
+ ],
+
+ // 可以对象字面量断言
+ "no-object-literal-type-assertion": false,
+
+ // function paren 前需要有空格
+ "space-before-function-paren": true,
+
+ // 可以导入子包
+ "no-submodule-imports": false,
+
+ // 可以覆盖变量命名
+ "no-shadowed-variable": false,
+
+ // 导入包时,不需要按字母排序
+ "ordered-imports": false,
+
+ "object-literal-key-quotes": false,
+
+ "object-literal-sort-keys": false,
+
+ // 允许带一个参数的箭头函数省去括号
+ "arrow-parens": [
+ true,
+ "ban-single-arg-parens"
+ ],
+
+ // 对齐方式
+ "align": false,
+
+ // 允许使用 namespace
+ "no-namespace": false
+ },
+ "rulesDirectory": []
+}
\ No newline at end of file
diff --git a/typings/index.d.ts b/typings/index.d.ts
new file mode 100644
index 0000000..47d5018
--- /dev/null
+++ b/typings/index.d.ts
@@ -0,0 +1,26 @@
+import Vue from 'vue'
+
+type LoadingType = 'balls' | 'bars' | 'beat' | 'bubbles' | 'cylon' | 'spin' | 'spiningDubbles' | 'barsCylon'
+
+interface VueLoadingOptions {
+ // loading type
+ type?: LoadingType
+
+ // loading color
+ color?: string
+
+ // loading size
+ size?: { width: string, height: string }
+}
+
+declare function install(vue: typeof Vue, options?: VueLoadingOptions): void
+
+declare class VueLoading extends Vue {}
+
+declare const _default: {
+ install: typeof install
+}
+
+export { VueLoading, LoadingType, VueLoadingOptions }
+
+export default _default
diff --git a/vue.config.js b/vue.config.js
new file mode 100644
index 0000000..a4572c2
--- /dev/null
+++ b/vue.config.js
@@ -0,0 +1,18 @@
+module.exports = {
+ baseUrl: process.env.NODE_ENV === 'production'
+ ? '/vue-loading/'
+ : '/',
+ chainWebpack: config => {
+ const svgRule = config.module.rule('svg')
+
+ svgRule.uses.clear()
+
+ svgRule
+ .use('raw-loader')
+ .loader('raw-loader')
+ },
+
+ css: {
+ extract: false
+ }
+}
\ No newline at end of file
diff --git a/webpack.config.js b/webpack.config.js
deleted file mode 100644
index f21fffc..0000000
--- a/webpack.config.js
+++ /dev/null
@@ -1,86 +0,0 @@
-var path = require('path')
-var webpack = require('webpack')
-
-module.exports = {
- entry: './src/index.js',
- output: {
- path: path.resolve(__dirname, './dist'),
- publicPath: '/dist/',
- filename: 'vue-loading.min.js',
- library: 'vue-loading',
- libraryTarget: 'umd',
- umdNamedDefine: true
- },
- module: {
- rules: [
- {
- test: /\.vue$/,
- loader: 'vue-loader',
- options: {
- loaders: {
- }
- // other vue-loader options go here
- }
- },
- {
- test: /\.js$/,
- loader: 'babel-loader',
- exclude: /node_modules/
- },
- {
- test: /\.(png|jpg|gif)$/,
- loader: 'file-loader',
- options: {
- name: '[name].[ext]?[hash]'
- }
- },
- {
- test: /\.svg$/,
- loader: 'raw-loader'
- },
- ]
- },
- resolve: {
- alias: {
- 'vue$': 'vue/dist/vue.esm.js'
- }
- },
- externals: {
- vue: {
- root: 'Vue',
- commonjs: 'vue',
- commonjs2: 'vue',
- amd: 'vue'
- }
- },
- devServer: {
- historyApiFallback: true,
- noInfo: true
- },
- performance: {
- hints: false
- },
- devtool: '#eval-source-map'
-}
-
-if (process.env.NODE_ENV === 'production') {
- module.exports.devtool = '#source-map'
- // http://vue-loader.vuejs.org/en/workflow/production.html
- module.exports.plugins = (module.exports.plugins || []).concat([
- new webpack.DefinePlugin({
- 'process.env': {
- NODE_ENV: '"production"'
- }
- }),
- new webpack.optimize.UglifyJsPlugin({
- sourceMap: true,
- compress: {
- warnings: false
- }
- }),
- new webpack.LoaderOptionsPlugin({
- minimize: true
- })
- ])
-}
-