├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── src
├── VueRouterLoading.vue
└── main.js
└── vue.config.js
/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true,
5 | },
6 | extends: ['plugin:vue/essential', 'plugin:vue/strongly-recommended', 'plugin:vue/recommended', '@vue/prettier'],
7 | rules: {
8 | 'vue/html-self-closing': [
9 | 'warn',
10 | {
11 | html: {
12 | void: 'always',
13 | normal: 'always',
14 | component: 'always',
15 | },
16 | svg: 'always',
17 | math: 'always',
18 | },
19 | ],
20 | 'vue/component-name-in-template-casing': [
21 | 'warn',
22 | 'PascalCase',
23 | {
24 | registeredComponentsOnly: false,
25 | ignores: [],
26 | },
27 | ],
28 | 'vue/order-in-components': ['warn', {
29 | 'order': [
30 | 'el',
31 | 'name',
32 | 'key',
33 | 'parent',
34 | 'functional',
35 | ['delimiters', 'comments'],
36 | ['components', 'directives', 'filters'],
37 | 'extends',
38 | 'mixins',
39 | ['provide', 'inject'],
40 | 'ROUTER_GUARDS',
41 | 'layout',
42 | 'middleware',
43 | 'validate',
44 | 'scrollToTop',
45 | 'transition',
46 | 'loading',
47 | 'inheritAttrs',
48 | 'model',
49 | ['props', 'propsData'],
50 | 'emits',
51 | 'setup',
52 | 'asyncData',
53 | 'data',
54 | 'fetch',
55 | 'head',
56 | 'computed',
57 | 'watch',
58 | 'watchQuery',
59 | 'LIFECYCLE_HOOKS',
60 | 'methods',
61 | ['template', 'render'],
62 | 'renderError'
63 | ]
64 | }]
65 | },
66 | parserOptions: {
67 | parser: '@babel/eslint-parser',
68 | },
69 | }
70 |
--------------------------------------------------------------------------------
/.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 |
2 | # Vue Router Loading
3 |
4 | Easy to use and highly customizable Vue Router Loading.
5 |
6 | ### Getting started
7 |
8 | 1. Install the package:
9 | ```shell
10 | npm install vue-router-loading
11 | ```
12 |
13 | 2. Import component in App.vue:
14 | ```javascript
15 | import VueRouterLoading from 'vue-router-loading'
16 | ```
17 |
18 | 3. Put component in template
19 | ```html
20 |
21 | ```
22 |
23 | ### ✅ Customize
24 |
25 | You can customize loading bar with props.
26 |
27 | ⚙ color:
28 | default: #41b883
29 |
30 | ⚙ height:
31 | default: 2px
32 |
33 | ⚙ position:
34 | default: top
35 | options: top, bottom
36 |
37 | ⚙ rtl:
38 | default: false
39 |
40 | ⚙ endLineMode:
41 | default: shadow
42 | options: shadow, circle
43 |
44 | ⚙ shadowColor:
45 | default: #41b883
46 |
47 | ⚙ shadowOpacity:
48 | default: 0.9
49 |
50 | ⚙ circleColor:
51 | default: #41b883
52 |
53 | ⚙ showOverly:
54 | default: true
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-router-loading",
3 | "version": "1.1.15",
4 | "private": false,
5 | "author": "Ahmad Karimzade",
6 | "description": "Vue Router Loading Progress Bar",
7 | "homepage": "https://github.com/ahmadkzx/vue-router-loading#readme",
8 | "main": "./dist/vue-router-loading.common.js",
9 | "scripts": {
10 | "lint": "eslint --ext .vue src/ --fix",
11 | "build": "vue-cli-service build --target lib --name vue-router-loading ./src/main.js"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "git+https://github.com/ahmadkzx/vue-router-loading.git"
16 | },
17 | "files": [
18 | "dist/*"
19 | ],
20 | "keywords": [
21 | "vue",
22 | "vue-router"
23 | ],
24 | "dependencies": {
25 | "@babel/eslint-parser": "^7.17.0",
26 | "@vue/eslint-config-prettier": "^7.0.0",
27 | "core-js": "^3.6.5",
28 | "eslint": "^8.11.0",
29 | "eslint-plugin-prettier": "^4.0.0",
30 | "eslint-plugin-vue": "^8.5.0",
31 | "vue": "^2.6.11"
32 | },
33 | "devDependencies": {
34 | "@vue/cli-plugin-babel": "~4.5.0",
35 | "@vue/cli-service": "~4.5.0",
36 | "node-sass": "^4.12.0",
37 | "sass-loader": "^8.0.2",
38 | "vue-template-compiler": "^2.6.11"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/VueRouterLoading.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
20 |
25 |
26 |
27 |
28 |
29 |
30 |
153 |
154 |
264 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import VueRouterLoadingComponent from './VueRouterLoading.vue'
2 | export default VueRouterLoadingComponent
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | css: {
3 | extract: false
4 | }
5 | }
--------------------------------------------------------------------------------