v-page 2.0.9 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -20
- package/dist/v-page.js +217 -2
- package/dist/v-page.umd.cjs +2 -0
- package/package.json +66 -65
- package/types/index.d.ts +81 -0
- package/.babelrc +0 -6
- package/.circleci/config.yml +0 -40
- package/.editorconfig +0 -9
- package/dist/v-page.js.map +0 -1
- package/src/Page.js +0 -214
- package/src/index.js +0 -32
- package/src/language.js +0 -34
- package/src/page.sass +0 -116
- package/tests/unit/setup.js +0 -8
- package/tests/unit/v-page.spec.js +0 -49
- package/webpack.config.js +0 -118
package/dist/v-page.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///v-page.js","webpack:///webpack/bootstrap 63e6ceb82cfdaa9ad29f","webpack:///./src/index.js","webpack:///./src/Page.js","webpack:///./src/page.sass?9c3c","webpack:///./src/page.sass","webpack:///./node_modules/_css-loader@0.28.11@css-loader/lib/css-base.js","webpack:///./node_modules/_vue-style-loader@3.1.2@vue-style-loader/lib/addStylesClient.js","webpack:///./node_modules/_vue-style-loader@3.1.2@vue-style-loader/lib/listToStyles.js","webpack:///./src/language.js"],"names":["root","factory","exports","module","define","amd","self","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","value","Page","undefined","_Page","_Page2","obj","default","Plugin","install","Vue","options","arguments","length","keys","props","language","align","info","border","pageNumber","first","last","pageSizeMenu","component","_toConsumableArray","arr","Array","isArray","arr2","from","_extends","assign","target","source","key","_language","_language2","type","Number","totalRow","Boolean","String","disabled","data","pageSize","lastPageSize","current","pageNumberSize","i18n","languages","cn","computed","totalPage","Math","ceil","pageNumbers","half","floor","start","apply","map","val","index","filter","pageInfo","replace","classes","v-pagination--no-border","v-pagination--right","v-pagination--center","v-pagination--disabled","isFirst","isLast","watch","goPage","render","h","_this","items","push","class","pageLength","attrs","on","change","e","srcElement","genItem","num","text","href","click","previous","active","next","v-pagination","methods","pNum","respond","$emit","reload","mounted","content","locals","cssWithMappingToString","item","useSourceMap","cssMapping","btoa","sourceMapping","toComment","concat","sources","sourceRoot","join","sourceMap","unescape","encodeURIComponent","JSON","stringify","list","toString","mediaQuery","alreadyImportedModules","id","addStylesToDom","styles","domStyle","stylesInDom","refs","j","parts","addStyle","createStyleElement","styleElement","document","createElement","head","appendChild","update","remove","querySelector","ssrIdKey","isProduction","noop","parentNode","removeChild","isOldIE","styleIndex","singletonCounter","singletonElement","applyToSingletonTag","bind","applyToTag","newObj","css","media","styleSheet","cssText","replaceText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild","hasDocument","DEBUG","Error","listToStyles","getElementsByTagName","navigator","test","userAgent","toLowerCase","parentId","_isProduction","_options","newList","mayRemove","textStore","replacement","newStyles","part","en","de","jp"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,OAAA,WAAAH,GACA,gBAAAC,SACAA,QAAA,MAAAD,IAEAD,EAAA,MAAAC,KACC,mBAAAK,WAAAC,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAR,OAGA,IAAAC,GAAAQ,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAX,WAUA,OANAM,GAAAE,GAAAI,KAAAX,EAAAD,QAAAC,IAAAD,QAAAO,GAGAN,EAAAU,GAAA,EAGAV,EAAAD,QAvBA,GAAAS,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAf,EAAAgB,EAAAC,GACAV,EAAAW,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB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C,MAAO,SACPwE,SAAU,IACVE,KAAM,IACNzE,KAAM","file":"v-page.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"vPage\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"vPage\"] = factory();\n\telse\n\t\troot[\"vPage\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"vPage\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"vPage\"] = factory();\n\telse\n\t\troot[\"vPage\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Page = undefined;\n\nvar _Page = __webpack_require__(1);\n\nvar _Page2 = _interopRequireDefault(_Page);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Plugin = {\n install: function install(Vue) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (Object.keys(options).length) {\n var props = _Page2.default.props;\n var language = options.language,\n align = options.align,\n info = options.info,\n border = options.border,\n pageNumber = options.pageNumber,\n first = options.first,\n last = options.last,\n pageSizeMenu = options.pageSizeMenu;\n\n\n if (language) props.language.default = language;\n if (align) props.align.default = align;\n if (typeof info === 'boolean') props.info.default = info;\n if (typeof border === 'boolean') props.border.default = border;\n if (typeof pageNumber === 'boolean') props.pageNumber.default = pageNumber;\n if (typeof first === 'boolean') props.first.default = first;\n if (typeof last === 'boolean') props.last.default = last;\n if (typeof pageSizeMenu !== 'undefined') props.pageSizeMenu.default = pageSizeMenu;\n }\n Vue.component(_Page2.default.name, _Page2.default);\n }\n};\n\nexports.Page = _Page2.default;\nexports.default = Plugin;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n__webpack_require__(2);\n\nvar _language = __webpack_require__(7);\n\nvar _language2 = _interopRequireDefault(_language);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar FIRST = 1;\n\nexports.default = {\n name: 'v-page',\n props: {\n value: {\n type: Number,\n default: 0\n },\n totalRow: {\n type: Number,\n default: 0\n },\n /**\r\n * page size list\r\n * false: close page size menu bar\r\n * array: custom page sizes menu\r\n */\n pageSizeMenu: {\n type: [Boolean, Array],\n default: function _default() {\n return [10, 20, 50, 100];\n }\n },\n language: {\n type: String,\n default: 'cn'\n },\n /**\r\n * pagination alignment direction\r\n * 'left'\r\n * 'center'\r\n * 'right'(default)\r\n */\n align: {\n type: String,\n default: 'right'\n },\n disabled: {\n type: Boolean,\n default: false\n },\n border: {\n type: Boolean,\n default: true\n },\n info: {\n type: Boolean,\n default: true\n },\n pageNumber: {\n type: Boolean,\n default: true\n },\n /**\r\n * first page button\r\n */\n first: {\n type: Boolean,\n default: true\n },\n /**\r\n * last page button\r\n */\n last: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n pageSize: this.pageSizeMenu === false ? 10 : this.pageSizeMenu[0],\n lastPageSize: -1,\n current: 0,\n pageNumberSize: 5,\n i18n: _language2.default[this.language] || _language2.default.cn\n };\n },\n\n computed: {\n totalPage: function totalPage() {\n return Math.ceil(this.totalRow / this.pageSize);\n },\n pageNumbers: function pageNumbers() {\n var current = this.current,\n pageNumberSize = this.pageNumberSize,\n totalPage = this.totalPage;\n\n var half = Math.floor(pageNumberSize / 2);\n var start = current - half;\n return Array.apply(null, { length: pageNumberSize }).map(function (val, index) {\n return start + index;\n }).filter(function (val) {\n return val > 0 && val <= totalPage;\n });\n },\n pageInfo: function pageInfo() {\n return this.i18n.pageInfo.replace('#pageNumber#', this.current).replace('#totalPage#', this.totalPage).replace('#totalRow#', this.totalRow);\n },\n classes: function classes() {\n return {\n 'v-pagination--no-border': !this.border,\n 'v-pagination--right': this.align === 'right',\n 'v-pagination--center': this.align === 'center',\n 'v-pagination--disabled': this.disabled\n };\n },\n isFirst: function isFirst() {\n return this.current === FIRST;\n },\n isLast: function isLast() {\n return this.current === this.totalPage;\n }\n },\n watch: {\n value: function value(val) {\n if (typeof val === 'number' && val > 0) this.goPage(val, false);\n }\n },\n render: function render(h) {\n var _this = this;\n\n var items = [];\n // page length list\n if (Array.isArray(this.pageSizeMenu) && this.pageSizeMenu.length) {\n items.push(h('li', { class: 'v-pagination__list' }, [h('a', [h('span', this.i18n.pageLength), h('select', {\n attrs: { disabled: this.disabled },\n on: {\n change: function change(e) {\n if (e.srcElement && e.srcElement.value) {\n _this.pageSize = Number(e.srcElement.value);\n }\n _this.goPage();\n }\n }\n }, this.pageSizeMenu.map(function (val) {\n return h('option', { attrs: { value: val } }, val);\n }))])]));\n }\n // page info\n if (this.info) {\n items.push(h('li', { class: 'v-pagination__info' }, [h('a', this.pageInfo)]));\n }\n /**\r\n * page number generator\r\n * @param classes\r\n * @param num\r\n * @param text\r\n * @return VNode\r\n */\n var genItem = function genItem(classes, num, text) {\n return h('li', { class: classes }, [h('a', {\n attrs: { href: 'javascript:void(0)' },\n on: { click: function click() {\n return _this.goPage(num);\n } }\n }, text)]);\n };\n // first\n if (this.first) {\n items.push(genItem({ disabled: this.isFirst }, FIRST, this.i18n.first));\n }\n // previous\n items.push(genItem({ disabled: this.isFirst }, this.current - 1, this.i18n.previous));\n // page numbers\n if (this.pageNumber) {\n items.push.apply(items, _toConsumableArray(this.pageNumbers.map(function (val) {\n return genItem({\n active: val === _this.current\n }, val, val);\n })));\n }\n // next\n items.push(genItem({ disabled: this.isLast }, this.current + 1, this.i18n.next));\n // last\n if (this.last) {\n items.push(genItem({ disabled: this.isLast }, this.totalPage, this.i18n.last));\n }\n return h('div', {\n class: _extends({\n 'v-pagination': true\n }, this.classes)\n }, [h('ul', items)]);\n },\n\n methods: {\n goPage: function goPage() {\n var pNum = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : FIRST;\n var respond = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (this.disabled) return;\n if (typeof pNum !== 'number') return;\n var num = pNum < FIRST ? FIRST : pNum;\n if (pNum > this.totalPage && this.totalPage > 0) num = this.totalPage;\n\n // exit when duplicate operation\n if (num === this.current && this.pageSize === this.lastPageSize) return;\n\n this.current = num;\n // update v-model value\n if (respond) this.$emit('input', this.current);\n this.lastPageSize = this.pageSize;\n this.change();\n },\n reload: function reload() {\n this.change();\n },\n change: function change() {\n this.$emit('page-change', {\n pageNumber: this.current,\n pageSize: Number(this.pageSize)\n });\n }\n },\n mounted: function mounted() {\n this.goPage(this.value ? this.value : FIRST);\n }\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(3);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(5)(\"f316fa44\", content, true, {});\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(4)(false);\n// imports\n\n\n// module\nexports.push([module.i, \"div.v-pagination{margin:0;display:block}div.v-pagination.v-pagination--right{text-align:right}div.v-pagination.v-pagination--center{text-align:center}div.v-pagination.v-pagination--disabled li a{color:#999;cursor:default}div.v-pagination.v-pagination--disabled li a:hover{color:#999;background-color:#fff;box-shadow:none;z-index:auto}div.v-pagination.v-pagination--disabled li.active a{background-color:#f6f6f6}div.v-pagination>ul{display:inline-block;list-style:none;margin:0;padding:0;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);-ms-box-shadow:0 1px 2px rgba(0,0,0,.05);-o-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}div.v-pagination>ul>li{text-align:center;margin:0;display:inline}div.v-pagination>ul>li>a{margin:0 0 0 -1px;position:relative;border:1px solid #dee2e6;padding:6px 12px;line-height:1.43;box-shadow:none;background-color:#fff;font-size:14px;display:inline-block;text-decoration:none;color:#333;-webkit-transition:all .5s cubic-bezier(.175,.885,.32,1);-moz-transition:all .5s cubic-bezier(.175,.885,.32,1);-ms-transition:all .5s cubic-bezier(.175,.885,.32,1);-o-transition:all .5s cubic-bezier(.175,.885,.32,1);transition:all .5s cubic-bezier(.175,.885,.32,1)}div.v-pagination>ul>li>a:hover{z-index:2;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);-moz-box-shadow:0 0 8px rgba(0,0,0,.2);-ms-box-shadow:0 0 8px rgba(0,0,0,.2);-o-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2)}div.v-pagination>ul>li.disabled>a,div.v-pagination>ul>li.v-pagination__info>a,div.v-pagination>ul>li.v-pagination__list>a{color:#999;cursor:default}div.v-pagination>ul>li.disabled>a:hover,div.v-pagination>ul>li.v-pagination__info>a:hover,div.v-pagination>ul>li.v-pagination__list>a:hover{color:#999;background-color:#fff;box-shadow:none;z-index:auto}div.v-pagination>ul>li.active>a{cursor:default;color:#999;background-color:#eee}div.v-pagination>ul>li.active>a:hover{box-shadow:none;z-index:auto}div.v-pagination>ul>li:first-child>a{border-left-width:1px;-webkit-border-bottom-left-radius:2px;-moz-border-bottom-left-radius:2px;-ms-border-bottom-left-radius:2px;-o-border-bottom-left-radius:2px;border-bottom-left-radius:2px;-webkit-border-top-left-radius:2px;-moz-border-top-left-radius:2px;-ms-border-top-left-radius:2px;-o-border-top-left-radius:2px;border-top-left-radius:2px}div.v-pagination>ul>li:last-child>a{-webkit-border-top-right-radius:2px;-moz-border-top-right-radius:2px;-ms-border-top-right-radius:2px;-o-border-top-right-radius:2px;border-top-right-radius:2px;-webkit-border-bottom-right-radius:2px;-moz-border-bottom-right-radius:2px;-ms-border-bottom-right-radius:2px;-o-border-bottom-right-radius:2px;border-bottom-right-radius:2px}div.v-pagination>ul>li.v-pagination__list select{margin-left:5px;width:auto!important;font-size:12px;padding:0;border:1px solid #ccc;color:#333;outline:0}div.v-pagination>ul>li.v-pagination__list select:hover{-webkit-box-shadow:0 0 2px rgba(0,0,0,.2);-moz-box-shadow:0 0 2px rgba(0,0,0,.2);-ms-box-shadow:0 0 2px rgba(0,0,0,.2);-o-box-shadow:0 0 2px rgba(0,0,0,.2);box-shadow:0 0 2px rgba(0,0,0,.2)}div.v-pagination>ul>li.v-pagination__list select[disabled]{color:#999}div.v-pagination.v-pagination--no-border>ul{box-shadow:none}div.v-pagination.v-pagination--no-border>ul>li:not(.active):not(.disabled):not(.v-pagination__info):not(.v-pagination__list) a:hover{box-shadow:none;z-index:auto;background-color:#ddd}div.v-pagination.v-pagination--no-border>ul>li.active a{background-color:#f6f6f6;color:#aaa}div.v-pagination.v-pagination--no-border>ul>li>a{border:0}div.v-pagination.v-pagination--no-border>ul>li>a:hover{z-index:auto}\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\nvar listToStyles = __webpack_require__(6)\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nmodule.exports = function (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nmodule.exports = function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = {\n cn: {\n pageLength: '每页记录数 ',\n pageInfo: '当前显示第 #pageNumber# / #totalPage# 页(共#totalRow#条记录)',\n first: '首页',\n previous: '«',\n next: '»',\n last: '尾页'\n },\n en: {\n pageLength: 'Page length ',\n pageInfo: 'Current #pageNumber# / #totalPage# (total #totalRow# records)',\n first: 'First',\n previous: '«',\n next: '»',\n last: 'Last'\n },\n de: {\n pageLength: 'Seitenlänge ',\n pageInfo: 'Aktuell #pageNumber# / #totalPage# (gesamt #totalRow# Aufzeichnungen)',\n first: 'Zuerst',\n previous: '«',\n next: '»',\n last: 'Letzte'\n },\n jp: {\n pageLength: 'ページごとの記録数',\n pageInfo: '現在の第 #pageNumber# / #totalPage# ページ(全部で #totalRow# 条の記録)',\n first: 'トップページ',\n previous: '«',\n next: '»',\n last: '尾のページ'\n }\n};\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// v-page.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 63e6ceb82cfdaa9ad29f","import Page from './Page'\r\n\r\nconst Plugin = {\r\n install (Vue, options = {}) {\r\n if (Object.keys(options).length) {\r\n const props = Page.props\r\n const {\r\n language,\r\n align,\r\n info,\r\n border,\r\n pageNumber,\r\n first,\r\n last,\r\n pageSizeMenu\r\n } = options\r\n\r\n if (language) props.language.default = language\r\n if (align) props.align.default = align\r\n if (typeof info === 'boolean') props.info.default = info\r\n if (typeof border === 'boolean') props.border.default = border\r\n if (typeof pageNumber === 'boolean') props.pageNumber.default = pageNumber\r\n if (typeof first === 'boolean') props.first.default = first\r\n if (typeof last === 'boolean') props.last.default = last\r\n if (typeof pageSizeMenu !== 'undefined') props.pageSizeMenu.default = pageSizeMenu\r\n }\r\n Vue.component(Page.name, Page)\r\n }\r\n}\r\n\r\nexport { Page }\r\nexport default Plugin\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import './page.sass'\r\nimport languages from './language'\r\n\r\nconst FIRST = 1\r\n\r\nexport default {\r\n name: 'v-page',\r\n props: {\r\n value: {\r\n type: Number,\r\n default: 0\r\n },\r\n totalRow: {\r\n type: Number,\r\n default: 0\r\n },\r\n /**\r\n * page size list\r\n * false: close page size menu bar\r\n * array: custom page sizes menu\r\n */\r\n pageSizeMenu: {\r\n type: [Boolean, Array],\r\n default: function () {\r\n return [10, 20, 50, 100]\r\n }\r\n },\r\n language: {\r\n type: String,\r\n default: 'cn'\r\n },\r\n /**\r\n * pagination alignment direction\r\n * 'left'\r\n * 'center'\r\n * 'right'(default)\r\n */\r\n align: {\r\n type: String,\r\n default: 'right'\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n border: {\r\n type: Boolean,\r\n default: true\r\n },\r\n info: {\r\n type: Boolean,\r\n default: true\r\n },\r\n pageNumber: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * first page button\r\n */\r\n first: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * last page button\r\n */\r\n last: {\r\n type: Boolean,\r\n default: true\r\n }\r\n },\r\n data () {\r\n return {\r\n pageSize: this.pageSizeMenu === false ? 10 : this.pageSizeMenu[0],\r\n lastPageSize: -1,\r\n current: 0,\r\n pageNumberSize: 5,\r\n i18n: languages[this.language] || languages.cn\r\n }\r\n },\r\n computed: {\r\n totalPage () {\r\n return Math.ceil(this.totalRow / this.pageSize)\r\n },\r\n pageNumbers () {\r\n const { current, pageNumberSize, totalPage } = this\r\n const half = Math.floor(pageNumberSize / 2)\r\n const start = current - half\r\n return Array.apply(null, { length: pageNumberSize })\r\n .map((val, index) => start + index)\r\n .filter(val => val > 0 && val <= totalPage)\r\n },\r\n pageInfo () {\r\n return this.i18n.pageInfo\r\n .replace('#pageNumber#', this.current)\r\n .replace('#totalPage#', this.totalPage)\r\n .replace('#totalRow#', this.totalRow)\r\n },\r\n classes () {\r\n return {\r\n 'v-pagination--no-border': !this.border,\r\n 'v-pagination--right': this.align === 'right',\r\n 'v-pagination--center': this.align === 'center',\r\n 'v-pagination--disabled': this.disabled\r\n }\r\n },\r\n isFirst () {\r\n return this.current === FIRST\r\n },\r\n isLast () {\r\n return this.current === this.totalPage\r\n }\r\n },\r\n watch: {\r\n value (val) {\r\n if (typeof val === 'number' && val > 0) this.goPage(val, false)\r\n }\r\n },\r\n render (h) {\r\n const items = []\r\n // page length list\r\n if (Array.isArray(this.pageSizeMenu) && this.pageSizeMenu.length) {\r\n items.push(h('li', { class: 'v-pagination__list' }, [h('a', [\r\n h('span', this.i18n.pageLength),\r\n h('select', {\r\n attrs: { disabled: this.disabled },\r\n on: {\r\n change: e => {\r\n if (e.srcElement && e.srcElement.value) {\r\n this.pageSize = Number(e.srcElement.value)\r\n }\r\n this.goPage()\r\n }\r\n }\r\n }, this.pageSizeMenu.map(val => {\r\n return h('option', { attrs: { value: val } }, val)\r\n }))\r\n ])]))\r\n }\r\n // page info\r\n if (this.info) {\r\n items.push(h('li', { class: 'v-pagination__info' }, [h('a', this.pageInfo)]))\r\n }\r\n /**\r\n * page number generator\r\n * @param classes\r\n * @param num\r\n * @param text\r\n * @return VNode\r\n */\r\n const genItem = (classes, num, text) => {\r\n return h('li', { class: classes }, [\r\n h('a', {\r\n attrs: { href: 'javascript:void(0)' },\r\n on: { click: () => this.goPage(num) }\r\n }, text)\r\n ])\r\n }\r\n // first\r\n if (this.first) {\r\n items.push(genItem({ disabled: this.isFirst }, FIRST, this.i18n.first))\r\n }\r\n // previous\r\n items.push(genItem({ disabled: this.isFirst }, this.current - 1, this.i18n.previous))\r\n // page numbers\r\n if (this.pageNumber) {\r\n items.push(...this.pageNumbers.map(val => genItem({\r\n active: val === this.current\r\n }, val, val)))\r\n }\r\n // next\r\n items.push(genItem({ disabled: this.isLast }, this.current + 1, this.i18n.next))\r\n // last\r\n if (this.last) {\r\n items.push(genItem({ disabled: this.isLast }, this.totalPage, this.i18n.last))\r\n }\r\n return h('div', {\r\n class: {\r\n 'v-pagination': true,\r\n ...this.classes\r\n }\r\n }, [h('ul', items)])\r\n },\r\n methods: {\r\n goPage (pNum = FIRST, respond = true) {\r\n if (this.disabled) return\r\n if (typeof pNum !== 'number') return\r\n let num = pNum < FIRST ? FIRST : pNum\r\n if (pNum > this.totalPage && this.totalPage > 0) num = this.totalPage\r\n\r\n // exit when duplicate operation\r\n if (num === this.current && this.pageSize === this.lastPageSize) return\r\n\r\n this.current = num\r\n // update v-model value\r\n if (respond) this.$emit('input', this.current)\r\n this.lastPageSize = this.pageSize\r\n this.change()\r\n },\r\n reload () {\r\n this.change()\r\n },\r\n change () {\r\n this.$emit('page-change', {\r\n pageNumber: this.current,\r\n pageSize: Number(this.pageSize)\r\n })\r\n }\r\n },\r\n mounted () {\r\n this.goPage(this.value ? this.value : FIRST)\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/Page.js","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../node_modules/_css-loader@0.28.11@css-loader/index.js!../node_modules/_sass-loader@6.0.7@sass-loader/lib/loader.js?indentedSyntax!./page.sass\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../node_modules/_vue-style-loader@3.1.2@vue-style-loader/lib/addStylesClient.js\")(\"f316fa44\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/page.sass\n// module id = 2\n// module chunks = 0","exports = module.exports = require(\"../node_modules/_css-loader@0.28.11@css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"div.v-pagination{margin:0;display:block}div.v-pagination.v-pagination--right{text-align:right}div.v-pagination.v-pagination--center{text-align:center}div.v-pagination.v-pagination--disabled li a{color:#999;cursor:default}div.v-pagination.v-pagination--disabled li a:hover{color:#999;background-color:#fff;box-shadow:none;z-index:auto}div.v-pagination.v-pagination--disabled li.active a{background-color:#f6f6f6}div.v-pagination>ul{display:inline-block;list-style:none;margin:0;padding:0;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);-ms-box-shadow:0 1px 2px rgba(0,0,0,.05);-o-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}div.v-pagination>ul>li{text-align:center;margin:0;display:inline}div.v-pagination>ul>li>a{margin:0 0 0 -1px;position:relative;border:1px solid #dee2e6;padding:6px 12px;line-height:1.43;box-shadow:none;background-color:#fff;font-size:14px;display:inline-block;text-decoration:none;color:#333;-webkit-transition:all .5s cubic-bezier(.175,.885,.32,1);-moz-transition:all .5s cubic-bezier(.175,.885,.32,1);-ms-transition:all .5s cubic-bezier(.175,.885,.32,1);-o-transition:all .5s cubic-bezier(.175,.885,.32,1);transition:all .5s cubic-bezier(.175,.885,.32,1)}div.v-pagination>ul>li>a:hover{z-index:2;-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);-moz-box-shadow:0 0 8px rgba(0,0,0,.2);-ms-box-shadow:0 0 8px rgba(0,0,0,.2);-o-box-shadow:0 0 8px rgba(0,0,0,.2);box-shadow:0 0 8px rgba(0,0,0,.2)}div.v-pagination>ul>li.disabled>a,div.v-pagination>ul>li.v-pagination__info>a,div.v-pagination>ul>li.v-pagination__list>a{color:#999;cursor:default}div.v-pagination>ul>li.disabled>a:hover,div.v-pagination>ul>li.v-pagination__info>a:hover,div.v-pagination>ul>li.v-pagination__list>a:hover{color:#999;background-color:#fff;box-shadow:none;z-index:auto}div.v-pagination>ul>li.active>a{cursor:default;color:#999;background-color:#eee}div.v-pagination>ul>li.active>a:hover{box-shadow:none;z-index:auto}div.v-pagination>ul>li:first-child>a{border-left-width:1px;-webkit-border-bottom-left-radius:2px;-moz-border-bottom-left-radius:2px;-ms-border-bottom-left-radius:2px;-o-border-bottom-left-radius:2px;border-bottom-left-radius:2px;-webkit-border-top-left-radius:2px;-moz-border-top-left-radius:2px;-ms-border-top-left-radius:2px;-o-border-top-left-radius:2px;border-top-left-radius:2px}div.v-pagination>ul>li:last-child>a{-webkit-border-top-right-radius:2px;-moz-border-top-right-radius:2px;-ms-border-top-right-radius:2px;-o-border-top-right-radius:2px;border-top-right-radius:2px;-webkit-border-bottom-right-radius:2px;-moz-border-bottom-right-radius:2px;-ms-border-bottom-right-radius:2px;-o-border-bottom-right-radius:2px;border-bottom-right-radius:2px}div.v-pagination>ul>li.v-pagination__list select{margin-left:5px;width:auto!important;font-size:12px;padding:0;border:1px solid #ccc;color:#333;outline:0}div.v-pagination>ul>li.v-pagination__list select:hover{-webkit-box-shadow:0 0 2px rgba(0,0,0,.2);-moz-box-shadow:0 0 2px rgba(0,0,0,.2);-ms-box-shadow:0 0 2px rgba(0,0,0,.2);-o-box-shadow:0 0 2px rgba(0,0,0,.2);box-shadow:0 0 2px rgba(0,0,0,.2)}div.v-pagination>ul>li.v-pagination__list select[disabled]{color:#999}div.v-pagination.v-pagination--no-border>ul{box-shadow:none}div.v-pagination.v-pagination--no-border>ul>li:not(.active):not(.disabled):not(.v-pagination__info):not(.v-pagination__list) a:hover{box-shadow:none;z-index:auto;background-color:#ddd}div.v-pagination.v-pagination--no-border>ul>li.active a{background-color:#f6f6f6;color:#aaa}div.v-pagination.v-pagination--no-border>ul>li>a{border:0}div.v-pagination.v-pagination--no-border>ul>li>a:hover{z-index:auto}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/_css-loader@0.28.11@css-loader!./node_modules/_sass-loader@6.0.7@sass-loader/lib/loader.js?indentedSyntax!./src/page.sass\n// module id = 3\n// module chunks = 0","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/_css-loader@0.28.11@css-loader/lib/css-base.js\n// module id = 4\n// module chunks = 0","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\nvar listToStyles = require('./listToStyles')\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nmodule.exports = function (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/_vue-style-loader@3.1.2@vue-style-loader/lib/addStylesClient.js\n// module id = 5\n// module chunks = 0","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nmodule.exports = function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/_vue-style-loader@3.1.2@vue-style-loader/lib/listToStyles.js\n// module id = 6\n// module chunks = 0","export default {\r\n cn: {\r\n pageLength: '每页记录数 ',\r\n pageInfo: '当前显示第 #pageNumber# / #totalPage# 页(共#totalRow#条记录)',\r\n first: '首页',\r\n previous: '«',\r\n next: '»',\r\n last: '尾页'\r\n },\r\n en: {\r\n pageLength: 'Page length ',\r\n pageInfo: 'Current #pageNumber# / #totalPage# (total #totalRow# records)',\r\n first: 'First',\r\n previous: '«',\r\n next: '»',\r\n last: 'Last'\r\n },\r\n de: {\r\n pageLength: 'Seitenlänge ',\r\n pageInfo: 'Aktuell #pageNumber# / #totalPage# (gesamt #totalRow# Aufzeichnungen)',\r\n first: 'Zuerst',\r\n previous: '«',\r\n next: '»',\r\n last: 'Letzte'\r\n },\r\n jp: {\r\n pageLength: 'ページごとの記録数',\r\n pageInfo: '現在の第 #pageNumber# / #totalPage# ページ(全部で #totalRow# 条の記録)',\r\n first: 'トップページ',\r\n previous: '«',\r\n next: '»',\r\n last: '尾のページ'\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/language.js"],"sourceRoot":""}
|
package/src/Page.js
DELETED
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import './page.sass'
|
|
2
|
-
import languages from './language'
|
|
3
|
-
|
|
4
|
-
const FIRST = 1
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
name: 'v-page',
|
|
8
|
-
props: {
|
|
9
|
-
value: {
|
|
10
|
-
type: Number,
|
|
11
|
-
default: 0
|
|
12
|
-
},
|
|
13
|
-
totalRow: {
|
|
14
|
-
type: Number,
|
|
15
|
-
default: 0
|
|
16
|
-
},
|
|
17
|
-
/**
|
|
18
|
-
* page size list
|
|
19
|
-
* false: close page size menu bar
|
|
20
|
-
* array: custom page sizes menu
|
|
21
|
-
*/
|
|
22
|
-
pageSizeMenu: {
|
|
23
|
-
type: [Boolean, Array],
|
|
24
|
-
default: function () {
|
|
25
|
-
return [10, 20, 50, 100]
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
language: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: 'cn'
|
|
31
|
-
},
|
|
32
|
-
/**
|
|
33
|
-
* pagination alignment direction
|
|
34
|
-
* 'left'
|
|
35
|
-
* 'center'
|
|
36
|
-
* 'right'(default)
|
|
37
|
-
*/
|
|
38
|
-
align: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: 'right'
|
|
41
|
-
},
|
|
42
|
-
disabled: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false
|
|
45
|
-
},
|
|
46
|
-
border: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: true
|
|
49
|
-
},
|
|
50
|
-
info: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: true
|
|
53
|
-
},
|
|
54
|
-
pageNumber: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: true
|
|
57
|
-
},
|
|
58
|
-
/**
|
|
59
|
-
* first page button
|
|
60
|
-
*/
|
|
61
|
-
first: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: true
|
|
64
|
-
},
|
|
65
|
-
/**
|
|
66
|
-
* last page button
|
|
67
|
-
*/
|
|
68
|
-
last: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: true
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
data () {
|
|
74
|
-
return {
|
|
75
|
-
pageSize: this.pageSizeMenu === false ? 10 : this.pageSizeMenu[0],
|
|
76
|
-
lastPageSize: -1,
|
|
77
|
-
current: 0,
|
|
78
|
-
pageNumberSize: 5,
|
|
79
|
-
i18n: languages[this.language] || languages.cn
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
computed: {
|
|
83
|
-
totalPage () {
|
|
84
|
-
return Math.ceil(this.totalRow / this.pageSize)
|
|
85
|
-
},
|
|
86
|
-
pageNumbers () {
|
|
87
|
-
const { current, pageNumberSize, totalPage } = this
|
|
88
|
-
const half = Math.floor(pageNumberSize / 2)
|
|
89
|
-
const start = current - half
|
|
90
|
-
return Array.apply(null, { length: pageNumberSize })
|
|
91
|
-
.map((val, index) => start + index)
|
|
92
|
-
.filter(val => val > 0 && val <= totalPage)
|
|
93
|
-
},
|
|
94
|
-
pageInfo () {
|
|
95
|
-
return this.i18n.pageInfo
|
|
96
|
-
.replace('#pageNumber#', this.current)
|
|
97
|
-
.replace('#totalPage#', this.totalPage)
|
|
98
|
-
.replace('#totalRow#', this.totalRow)
|
|
99
|
-
},
|
|
100
|
-
classes () {
|
|
101
|
-
return {
|
|
102
|
-
'v-pagination--no-border': !this.border,
|
|
103
|
-
'v-pagination--right': this.align === 'right',
|
|
104
|
-
'v-pagination--center': this.align === 'center',
|
|
105
|
-
'v-pagination--disabled': this.disabled
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
isFirst () {
|
|
109
|
-
return this.current === FIRST
|
|
110
|
-
},
|
|
111
|
-
isLast () {
|
|
112
|
-
return this.current === this.totalPage
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
watch: {
|
|
116
|
-
value (val) {
|
|
117
|
-
if (typeof val === 'number' && val > 0) this.goPage(val, false)
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
render (h) {
|
|
121
|
-
const items = []
|
|
122
|
-
// page length list
|
|
123
|
-
if (Array.isArray(this.pageSizeMenu) && this.pageSizeMenu.length) {
|
|
124
|
-
items.push(h('li', { class: 'v-pagination__list' }, [h('a', [
|
|
125
|
-
h('span', this.i18n.pageLength),
|
|
126
|
-
h('select', {
|
|
127
|
-
attrs: { disabled: this.disabled },
|
|
128
|
-
on: {
|
|
129
|
-
change: e => {
|
|
130
|
-
if (e.srcElement && e.srcElement.value) {
|
|
131
|
-
this.pageSize = Number(e.srcElement.value)
|
|
132
|
-
}
|
|
133
|
-
this.goPage()
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}, this.pageSizeMenu.map(val => {
|
|
137
|
-
return h('option', { attrs: { value: val } }, val)
|
|
138
|
-
}))
|
|
139
|
-
])]))
|
|
140
|
-
}
|
|
141
|
-
// page info
|
|
142
|
-
if (this.info) {
|
|
143
|
-
items.push(h('li', { class: 'v-pagination__info' }, [h('a', this.pageInfo)]))
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* page number generator
|
|
147
|
-
* @param classes
|
|
148
|
-
* @param num
|
|
149
|
-
* @param text
|
|
150
|
-
* @return VNode
|
|
151
|
-
*/
|
|
152
|
-
const genItem = (classes, num, text) => {
|
|
153
|
-
return h('li', { class: classes }, [
|
|
154
|
-
h('a', {
|
|
155
|
-
attrs: { href: 'javascript:void(0)' },
|
|
156
|
-
on: { click: () => this.goPage(num) }
|
|
157
|
-
}, text)
|
|
158
|
-
])
|
|
159
|
-
}
|
|
160
|
-
// first
|
|
161
|
-
if (this.first) {
|
|
162
|
-
items.push(genItem({ disabled: this.isFirst }, FIRST, this.i18n.first))
|
|
163
|
-
}
|
|
164
|
-
// previous
|
|
165
|
-
items.push(genItem({ disabled: this.isFirst }, this.current - 1, this.i18n.previous))
|
|
166
|
-
// page numbers
|
|
167
|
-
if (this.pageNumber) {
|
|
168
|
-
items.push(...this.pageNumbers.map(val => genItem({
|
|
169
|
-
active: val === this.current
|
|
170
|
-
}, val, val)))
|
|
171
|
-
}
|
|
172
|
-
// next
|
|
173
|
-
items.push(genItem({ disabled: this.isLast }, this.current + 1, this.i18n.next))
|
|
174
|
-
// last
|
|
175
|
-
if (this.last) {
|
|
176
|
-
items.push(genItem({ disabled: this.isLast }, this.totalPage, this.i18n.last))
|
|
177
|
-
}
|
|
178
|
-
return h('div', {
|
|
179
|
-
class: {
|
|
180
|
-
'v-pagination': true,
|
|
181
|
-
...this.classes
|
|
182
|
-
}
|
|
183
|
-
}, [h('ul', items)])
|
|
184
|
-
},
|
|
185
|
-
methods: {
|
|
186
|
-
goPage (pNum = FIRST, respond = true) {
|
|
187
|
-
if (this.disabled) return
|
|
188
|
-
if (typeof pNum !== 'number') return
|
|
189
|
-
let num = pNum < FIRST ? FIRST : pNum
|
|
190
|
-
if (pNum > this.totalPage && this.totalPage > 0) num = this.totalPage
|
|
191
|
-
|
|
192
|
-
// exit when duplicate operation
|
|
193
|
-
if (num === this.current && this.pageSize === this.lastPageSize) return
|
|
194
|
-
|
|
195
|
-
this.current = num
|
|
196
|
-
// update v-model value
|
|
197
|
-
if (respond) this.$emit('input', this.current)
|
|
198
|
-
this.lastPageSize = this.pageSize
|
|
199
|
-
this.change()
|
|
200
|
-
},
|
|
201
|
-
reload () {
|
|
202
|
-
this.change()
|
|
203
|
-
},
|
|
204
|
-
change () {
|
|
205
|
-
this.$emit('page-change', {
|
|
206
|
-
pageNumber: this.current,
|
|
207
|
-
pageSize: Number(this.pageSize)
|
|
208
|
-
})
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
mounted () {
|
|
212
|
-
this.goPage(this.value ? this.value : FIRST)
|
|
213
|
-
}
|
|
214
|
-
}
|
package/src/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import Page from './Page'
|
|
2
|
-
|
|
3
|
-
const Plugin = {
|
|
4
|
-
install (Vue, options = {}) {
|
|
5
|
-
if (Object.keys(options).length) {
|
|
6
|
-
const props = Page.props
|
|
7
|
-
const {
|
|
8
|
-
language,
|
|
9
|
-
align,
|
|
10
|
-
info,
|
|
11
|
-
border,
|
|
12
|
-
pageNumber,
|
|
13
|
-
first,
|
|
14
|
-
last,
|
|
15
|
-
pageSizeMenu
|
|
16
|
-
} = options
|
|
17
|
-
|
|
18
|
-
if (language) props.language.default = language
|
|
19
|
-
if (align) props.align.default = align
|
|
20
|
-
if (typeof info === 'boolean') props.info.default = info
|
|
21
|
-
if (typeof border === 'boolean') props.border.default = border
|
|
22
|
-
if (typeof pageNumber === 'boolean') props.pageNumber.default = pageNumber
|
|
23
|
-
if (typeof first === 'boolean') props.first.default = first
|
|
24
|
-
if (typeof last === 'boolean') props.last.default = last
|
|
25
|
-
if (typeof pageSizeMenu !== 'undefined') props.pageSizeMenu.default = pageSizeMenu
|
|
26
|
-
}
|
|
27
|
-
Vue.component(Page.name, Page)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { Page }
|
|
32
|
-
export default Plugin
|
package/src/language.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
cn: {
|
|
3
|
-
pageLength: '每页记录数 ',
|
|
4
|
-
pageInfo: '当前显示第 #pageNumber# / #totalPage# 页(共#totalRow#条记录)',
|
|
5
|
-
first: '首页',
|
|
6
|
-
previous: '«',
|
|
7
|
-
next: '»',
|
|
8
|
-
last: '尾页'
|
|
9
|
-
},
|
|
10
|
-
en: {
|
|
11
|
-
pageLength: 'Page length ',
|
|
12
|
-
pageInfo: 'Current #pageNumber# / #totalPage# (total #totalRow# records)',
|
|
13
|
-
first: 'First',
|
|
14
|
-
previous: '«',
|
|
15
|
-
next: '»',
|
|
16
|
-
last: 'Last'
|
|
17
|
-
},
|
|
18
|
-
de: {
|
|
19
|
-
pageLength: 'Seitenlänge ',
|
|
20
|
-
pageInfo: 'Aktuell #pageNumber# / #totalPage# (gesamt #totalRow# Aufzeichnungen)',
|
|
21
|
-
first: 'Zuerst',
|
|
22
|
-
previous: '«',
|
|
23
|
-
next: '»',
|
|
24
|
-
last: 'Letzte'
|
|
25
|
-
},
|
|
26
|
-
jp: {
|
|
27
|
-
pageLength: 'ページごとの記録数',
|
|
28
|
-
pageInfo: '現在の第 #pageNumber# / #totalPage# ページ(全部で #totalRow# 条の記録)',
|
|
29
|
-
first: 'トップページ',
|
|
30
|
-
previous: '«',
|
|
31
|
-
next: '»',
|
|
32
|
-
last: '尾のページ'
|
|
33
|
-
}
|
|
34
|
-
}
|
package/src/page.sass
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
$borderRadius: 2px
|
|
2
|
-
|
|
3
|
-
@mixin disabled
|
|
4
|
-
color: #999
|
|
5
|
-
cursor: default
|
|
6
|
-
&:hover
|
|
7
|
-
color: #999
|
|
8
|
-
background-color: white
|
|
9
|
-
box-shadow: none
|
|
10
|
-
z-index: auto
|
|
11
|
-
|
|
12
|
-
@mixin vendor-prefix($name, $value)
|
|
13
|
-
@each $vendor in ('-webkit-', '-moz-', '-ms-', '-o-', '')
|
|
14
|
-
#{$vendor}#{$name}: #{$value}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
div.v-pagination
|
|
18
|
-
margin: 0
|
|
19
|
-
display: block
|
|
20
|
-
|
|
21
|
-
&.v-pagination--right
|
|
22
|
-
text-align: right
|
|
23
|
-
&.v-pagination--center
|
|
24
|
-
text-align: center
|
|
25
|
-
&.v-pagination--disabled
|
|
26
|
-
li
|
|
27
|
-
a
|
|
28
|
-
@include disabled
|
|
29
|
-
&.active a
|
|
30
|
-
background-color: #f6f6f6
|
|
31
|
-
|
|
32
|
-
& > ul
|
|
33
|
-
display: inline-block
|
|
34
|
-
list-style: none
|
|
35
|
-
margin: 0
|
|
36
|
-
padding: 0
|
|
37
|
-
@include vendor-prefix('box-shadow', 0 1px 2px rgba(0, 0, 0, 0.05))
|
|
38
|
-
|
|
39
|
-
& > li
|
|
40
|
-
text-align: center
|
|
41
|
-
margin: 0
|
|
42
|
-
display: inline
|
|
43
|
-
|
|
44
|
-
& > a
|
|
45
|
-
margin: 0 0 0 -1px
|
|
46
|
-
position: relative
|
|
47
|
-
border: 1px solid #DEE2E6
|
|
48
|
-
padding: 6px 12px
|
|
49
|
-
line-height: 1.43
|
|
50
|
-
box-shadow: none
|
|
51
|
-
background-color: white
|
|
52
|
-
font-size: 14px
|
|
53
|
-
display: inline-block
|
|
54
|
-
text-decoration: none
|
|
55
|
-
color: #333
|
|
56
|
-
@include vendor-prefix('transition', all .5s cubic-bezier(.175, .885, .32, 1))
|
|
57
|
-
|
|
58
|
-
&:hover
|
|
59
|
-
z-index: 2
|
|
60
|
-
@include vendor-prefix('box-shadow', 0 0 8px rgba(0, 0, 0, 0.2))
|
|
61
|
-
|
|
62
|
-
&.disabled > a,
|
|
63
|
-
&.v-pagination__list > a,
|
|
64
|
-
&.v-pagination__info > a
|
|
65
|
-
@include disabled
|
|
66
|
-
|
|
67
|
-
&.active > a
|
|
68
|
-
cursor: default
|
|
69
|
-
color: #999
|
|
70
|
-
background-color: #eee
|
|
71
|
-
&:hover
|
|
72
|
-
box-shadow: none
|
|
73
|
-
z-index: auto
|
|
74
|
-
|
|
75
|
-
&:first-child > a
|
|
76
|
-
border-left-width: 1px
|
|
77
|
-
@include vendor-prefix('border-bottom-left-radius', $borderRadius)
|
|
78
|
-
@include vendor-prefix('border-top-left-radius', $borderRadius)
|
|
79
|
-
|
|
80
|
-
&:last-child > a
|
|
81
|
-
@include vendor-prefix('border-top-right-radius', $borderRadius)
|
|
82
|
-
@include vendor-prefix('border-bottom-right-radius', $borderRadius)
|
|
83
|
-
|
|
84
|
-
&.v-pagination__list
|
|
85
|
-
select
|
|
86
|
-
margin-left: 5px
|
|
87
|
-
width: auto !important
|
|
88
|
-
font-size: 12px
|
|
89
|
-
padding: 0
|
|
90
|
-
border: 1px solid #ccc
|
|
91
|
-
color: #333
|
|
92
|
-
outline: 0
|
|
93
|
-
&:hover
|
|
94
|
-
@include vendor-prefix('box-shadow', 0 0 2px rgba(0, 0, 0, 0.2))
|
|
95
|
-
|
|
96
|
-
&[disabled]
|
|
97
|
-
color: #999
|
|
98
|
-
|
|
99
|
-
&.v-pagination--no-border
|
|
100
|
-
& > ul
|
|
101
|
-
box-shadow: none
|
|
102
|
-
|
|
103
|
-
& > li
|
|
104
|
-
&:not(.active):not(.disabled):not(.v-pagination__info):not(.v-pagination__list) a:hover
|
|
105
|
-
box-shadow: none
|
|
106
|
-
z-index: auto
|
|
107
|
-
background-color: #ddd
|
|
108
|
-
|
|
109
|
-
&.active a
|
|
110
|
-
background-color: #f6f6f6
|
|
111
|
-
color: #aaa
|
|
112
|
-
|
|
113
|
-
& > a
|
|
114
|
-
border: 0
|
|
115
|
-
&:hover
|
|
116
|
-
z-index: auto
|
package/tests/unit/setup.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
require('jsdom-global')();
|
|
2
|
-
/**
|
|
3
|
-
* this line code is to fix 'TypeError: Super expression must either be null or a function' issues
|
|
4
|
-
* @link https://github.com/vuejs/vue-test-utils/issues/936
|
|
5
|
-
*/
|
|
6
|
-
window.Date = Date;
|
|
7
|
-
|
|
8
|
-
//global.expect = require('chai').expect;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { shallowMount } from '@vue/test-utils'
|
|
2
|
-
import page from '@/Page'
|
|
3
|
-
|
|
4
|
-
const expect = require('chai').expect
|
|
5
|
-
|
|
6
|
-
describe('v-page', function () {
|
|
7
|
-
describe('page-numbers', function () {
|
|
8
|
-
it('the page numbers should be [2,3,4,5,6] in page 4', function () {
|
|
9
|
-
const env = {
|
|
10
|
-
totalPage: 10,
|
|
11
|
-
pageNumberSize: 5,
|
|
12
|
-
current: 4
|
|
13
|
-
}
|
|
14
|
-
const values = page.computed.pageNumbers.call(env)
|
|
15
|
-
expect(values.sort().join('')).to.equal([2, 3, 4, 5, 6].sort().join(''))
|
|
16
|
-
})
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
describe('dom operation test, click page number 5 item', () => {
|
|
20
|
-
const wapper = shallowMount(page, {
|
|
21
|
-
propsData: {
|
|
22
|
-
value: 3,
|
|
23
|
-
totalRow: 100
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
it('after click, the page 5 <li> item class name should be "active"', () => {
|
|
28
|
-
wapper.findAll('a').at(8).trigger('click')
|
|
29
|
-
// console.log(wapper.html());
|
|
30
|
-
// expect(wapper.props('totalRow')).to.equal(100);
|
|
31
|
-
// expect(wapper.is('div')).equal(true);
|
|
32
|
-
expect(wapper.findAll('li').at(6).classes('active')).to.equal(true)
|
|
33
|
-
})
|
|
34
|
-
it('the current page data should be 5', () => {
|
|
35
|
-
expect(wapper.vm.current).to.equal(5)
|
|
36
|
-
})
|
|
37
|
-
it('the page numbers should be [3,4,5,6,7]', () => {
|
|
38
|
-
expect(wapper.vm.pageNumbers.sort().join('')).to.equal([3, 4, 5, 6, 7].sort().join(''))
|
|
39
|
-
})
|
|
40
|
-
it('the current page should be 1 when change page size in list', () => {
|
|
41
|
-
// 设置下拉列表选择第三个项目(每页50条)
|
|
42
|
-
wapper.find('select').findAll('option').at(2).setSelected()
|
|
43
|
-
expect(wapper.vm.current).to.equal(1)
|
|
44
|
-
})
|
|
45
|
-
it('after page size change, the total pages should be 2', () => {
|
|
46
|
-
expect(wapper.vm.totalPage).to.equal(2)
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
})
|