Repository: biigpongsatorn/vue-element-loading Branch: master Commit: de2a7255e158 Files: 20 Total size: 30.6 KB Directory structure: gitextract_mxmxz0rs/ ├── .babelrc ├── .gitignore ├── LICENSE ├── README.md ├── bili.config.js ├── example/ │ ├── App.vue │ └── main.js ├── index.html ├── package.json ├── src/ │ ├── index.vue │ └── loaders/ │ ├── bar-fade-scale.vue │ ├── bar-fade.vue │ ├── index.js │ ├── line-down.vue │ ├── line-scale.vue │ ├── line-wave.vue │ ├── mini-spinner.vue │ ├── ring.vue │ └── spinner.vue └── webpack.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .babelrc ================================================ { "presets": [ ["@babel/env", { "modules": false }] ] } ================================================ FILE: .gitignore ================================================ .DS_Store node_modules/ dist/ lib/ npm-debug.log yarn-error.log .npmignore .editorconfig # Editor directories and files .idea *.suo *.ntvs* *.njsproj *.sln yarn.lock ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2018 Pongsatorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # ⛔️ DEPRECATED This repo has not been maintained

NPM version NPM downloads License Build Status

# vue-element-loading ⏳ Loading inside a container or full screen for Vue.js # 👀 Document & Demo Page - [Docs & Live demo](https://biigpongsatorn.github.io/#/vue-element-loading) - [Fully feature live demo](https://vue-element-loading.netlify.com/) # 💻 Install ```sh npm install --save vue-element-loading ``` or ```sh yarn add vue-element-loading ``` # 🖥 Install (Vue 3) ```sh npm install --save vue-element-loading@next ``` or ```sh yarn add vue-element-loading@next ``` # 🕹 Usage ```javascript import Vue from "vue"; import VueElementLoading from "vue-element-loading"; Vue.component("VueElementLoading", VueElementLoading); ``` or ```javascript import VueElementLoading from "vue-element-loading"; export default { components: { VueElementLoading } }; ``` # 🔎 Example ## Inside container ```html
This is my content.
``` ## Full screen ```html ``` ## Adjust Spinner Color Use the `color` parameter to set the color of the displayed spinner (does not affect custom spinner images). ```html
This is my content.
``` ## Set text Use the `text` parameter to set the text which will appear below loader. ```html
This is my content.
``` ## Set text style Use the `textStyle` parameter to set the style of text( you need to pass css-in-js way using camelCase exp. fontSize, backgroundColor etc). ```html
This is my content.
``` ## Adjust Spinner Size Use the `size` parameter to set the size of the displayed spinner (does not affect custom spinner images). ```html
This is my content.
``` ## Adjust Spinner Animation Speed Use the `duration` parameter to set the animation loop duration in seconds (does not affect custom spinner images). ```html
This is my content.
``` ## Customize loader ```html
``` # 🌀 Spinner [See full document here.](https://biigpongsatorn.github.io/#/vue-element-loading) # ⚙️ Props | Props | Type | Default | Description | | ---------------- | :--------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------- | | active | Boolean | - | Status for show/hide loading | | spinner | String | spinner | Spinner icon name: `spinner`, `mini-spinner`, `ring`, `line-wave`, `line-scale`, `line-down`, `bar-fade`, `bar-fade-scale` | | color | String | #000 | Color of spinner icon | | background-color | String | rgba(255, 255, 255, .9) | Background color of spinner icon (for overlay) | | size | String | "40" | The size to display the spinner in pixels (**NOTE:** this will not affect custom spinner images) | | duration | String | "0.6" | The duration of one 'loop' of the spinner animation, in seconds (**NOTE:** this will not affect custom spinner images) | | delay | Number \| String | 0 | The minimum appearing duration of loading in seconds | | is-full-screen | Boolean | false | Loader will overlay the full page | | text | String | - | Text will appear below loader | | text-style | Object | {} | Change style of the text below loader | # 🤝 Contributing 1. Fork this repository. 2. Create new branch with feature name. 3. Run `npm install` and `npm run dev`. 4. Create your feature. 5. Commit and set commit message with feature name. 6. Push your code to your fork repository. 7. Create pull request. 🙂 # ⭐️ Support If you like this project, You can support me with starring ⭐ this repository. # 📄 License [MIT](LICENSE) Developed with ❤️ and ☕️ ================================================ FILE: bili.config.js ================================================ const vue = require('rollup-plugin-vue'); module.exports = { banner: true, format: ['umd-min'], css: true, plugins: [ vue({ css: true }) ], outDir: 'lib' }; ================================================ FILE: example/App.vue ================================================ ================================================ FILE: example/main.js ================================================ import Vue from 'vue' import App from './App.vue' new Vue({ el: '#app', render: function (h) { return h(App) } }) ================================================ FILE: index.html ================================================ vue-element-loading
================================================ FILE: package.json ================================================ { "name": "vue-element-loading", "description": "Loading inside a container or full screen for Vue.js", "version": "2.0.2", "author": "biig_pongsatorn ", "license": "MIT", "main": "lib/vue-element-loading.min.js", "files": [ "lib" ], "repository": { "type": "git", "url": "git+https://github.com/biigpongsatorn/vue-element-loading.git" }, "scripts": { "dev": "cross-env NODE_ENV=development webpack-dev-server --mode development --open --hot", "build:lib": "rm -rf ./lib && bili src/index.vue", "build:example": "rm -rf ./dist && cross-env NODE_ENV=production webpack --mode production --progress --hide-modules", "prepublish": "npm run build:lib" }, "dependencies": { "vue": "^2.5.22" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ], "devDependencies": { "@babel/core": "^7.2.2", "@babel/preset-env": "^7.2.3", "babel-loader": "^8.0.5", "bili": "^3.4.2", "cross-env": "^5.2.0", "css-loader": "^2.1.0", "file-loader": "^3.0.1", "rollup-plugin-vue": "^4.6.1", "uglifyjs-webpack-plugin": "^2.1.1", "vue-loader": "^15.5.1", "vue-template-compiler": "^2.5.22", "webpack": "^4.28.4", "webpack-cli": "^3.2.1", "webpack-dev-server": ">=3.1.11" } } ================================================ FILE: src/index.vue ================================================ ================================================ FILE: src/loaders/bar-fade-scale.vue ================================================ ================================================ FILE: src/loaders/bar-fade.vue ================================================ ================================================ FILE: src/loaders/index.js ================================================ import Spinner from './spinner.vue' import Ring from './ring.vue' import MiniSpinner from './mini-spinner.vue' import LineWave from './line-wave.vue' import LineScale from './line-scale.vue' import LineDown from './line-down.vue' import BarFade from './bar-fade.vue' import BarFadeScale from './bar-fade-scale.vue' export default { Spinner, Ring, MiniSpinner, LineWave, LineScale, LineDown, BarFade, BarFadeScale } ================================================ FILE: src/loaders/line-down.vue ================================================ ================================================ FILE: src/loaders/line-scale.vue ================================================ ================================================ FILE: src/loaders/line-wave.vue ================================================ ================================================ FILE: src/loaders/mini-spinner.vue ================================================ ================================================ FILE: src/loaders/ring.vue ================================================ ================================================ FILE: src/loaders/spinner.vue ================================================ ================================================ FILE: webpack.config.js ================================================ const path = require('path'); const webpack = require('webpack'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); module.exports = { entry: './example/main.js', output: { path: path.resolve(__dirname, './dist'), publicPath: '/dist', filename: 'build.js' }, module: { rules: [ { test: /\.css$/, use: [ 'vue-style-loader', 'css-loader' ], }, { 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|svg)$/, loader: 'file-loader', options: { name: '[name].[ext]?[hash]' } } ] }, resolve: { alias: { 'vue$': 'vue/dist/vue.esm.js' }, extensions: ['*', '.js', '.vue', '.json'] }, optimization: { minimizer: [ new UglifyJsPlugin({ sourceMap: true, parallel: 4, uglifyOptions: { warnings: false, compress: { warnings: false }, }, }) ] }, plugins: [ new VueLoaderPlugin(), ], devServer: { historyApiFallback: true, noInfo: true, overlay: 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.LoaderOptionsPlugin({ minimize: true }) ]); }