├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ └── VuePaginationComponent.vue └── main.js └── vue.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | vue-pagination-component 💫 2 | ======================== 3 | A simple and customizable Vue.js pagination component. 4 | 5 | --- 6 | - Try: [**DEMO**](https://xmehdi01.github.io/vue-pagination-component/) 7 | - Install: [**NPM**](https://www.npmjs.com/package/@xmehdi01/vue-pagination-component) 8 | - Source code: [**Github**](https://github.com/xmehdi01/vue-pagination-component) 9 | 10 | --- 11 | 12 | Installation ⚙️ 13 | ------------ 14 | 15 | `npm i @xmehdi01/vue-pagination-component` 16 | 17 | Component using 🚀 18 | ----- 19 | ```html 20 | 30 | 31 | 49 | ``` 50 | 51 | ## License 📝 52 | This component is licensed under the MIT License. -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@xmehdi01/vue-pagination-component", 3 | "main": "dist/VuePaginationComponent.common.js", 4 | "files": [ 5 | "dist/*", 6 | "*.js", 7 | "*.json" 8 | ], 9 | "version": "0.1.3", 10 | "private": false, 11 | "description": "A simple and customizable Vue.js pagination component.", 12 | "keywords": [ 13 | "vue", 14 | "pagination", 15 | "component" 16 | ], 17 | "author": "xmehdi01", 18 | "license": "MIT", 19 | "scripts": { 20 | "serve": "vue-cli-service serve", 21 | "build": "vue-cli-service build --target lib --name VuePaginationComponent ./src/components/VuePaginationComponent.vue", 22 | "lint": "vue-cli-service lint" 23 | }, 24 | "dependencies": { 25 | "core-js": "^3.8.3", 26 | "vue": "^2.6.14" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.12.16", 30 | "@babel/eslint-parser": "^7.12.16", 31 | "@vue/cli-plugin-babel": "~5.0.0", 32 | "@vue/cli-plugin-eslint": "~5.0.0", 33 | "@vue/cli-service": "~5.0.0", 34 | "eslint": "^7.32.0", 35 | "eslint-plugin-vue": "^8.0.3", 36 | "vue-template-compiler": "^2.6.14" 37 | }, 38 | "eslintConfig": { 39 | "root": true, 40 | "env": { 41 | "node": true 42 | }, 43 | "extends": [ 44 | "plugin:vue/essential", 45 | "eslint:recommended" 46 | ], 47 | "parserOptions": { 48 | "parser": "@babel/eslint-parser" 49 | }, 50 | "rules": {} 51 | }, 52 | "browserslist": [ 53 | "> 1%", 54 | "last 2 versions", 55 | "not dead" 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taher-el-mehdi/vue-pagination-component/f8910a0042a85b104c90ba002dda2d1fdd964ca3/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 58 | 78 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taher-el-mehdi/vue-pagination-component/f8910a0042a85b104c90ba002dda2d1fdd964ca3/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/VuePaginationComponent.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 98 | 99 | 153 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | Vue.config.productionTip = false 5 | 6 | new Vue({ 7 | render: h => h(App), 8 | }).$mount('#app') 9 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require("@vue/cli-service"); 2 | module.exports = defineConfig({ 3 | publicPath: "/vue-pagination-component", 4 | transpileDependencies: true, 5 | configureWebpack: { 6 | resolve: { 7 | alias: { 8 | "vue-pagination-component": "dist/VuePaginationComponent.common.js", 9 | }, 10 | }, 11 | }, 12 | }); 13 | --------------------------------------------------------------------------------