igaloly / vue-preloaders Goto Github PK
View Code? Open in Web Editor NEWStable, Flexible and Fully Customizable Vue and Nuxt preloaders library
Stable, Flexible and Fully Customizable Vue and Nuxt preloaders library
I think your library is awesome! Can you guys add support for Typescript? Thanks!
Hello @igaloly! ๐
Thank you very much for your work and for this amazing plugin.
I was trying to use it for the first time with Gridsome but I have the following error when building gridsome build
:
However, when I use gridsome develop
it works perfectly. I think this is due to SSR support but I have not figured out a way to put it working. https://gridsome.org/docs/assets-scripts/#without-ssr-support
I have the following code on main.js
:
import VuePreloaders from 'vue-preloaders'
export default function(Vue, { router, head, isClient }) {
Vue.component('Layout', DefaultLayout)
Vue.use(VuePreloaders)
}
And the following code on layouts/Default.vue
:
mounted() {
const close = this.$preloaders.open({
component: Preloader,
cssStyle: {
position: 'fixed'
},
overlayStyle: {
background:
'radial-gradient(circle, rgba(74,74,74,1) 0%, rgba(61,61,61,1) 100%)',
opacity: 1
}
})
setTimeout(close, 2000)
}
Thank you very much!
Hello, I wanted to preface with how seemingly simple this implementation looks when reviewing the documentation but I just do not know what I am doing wrong here.
The flow of my application is more or less as such:
It sounds easy but I just can't figure this out.
npm install vue-preloaders --save
nuxt.config.js
export default {
plugins: ['~/plugins/preloaders.js']
}
nuxt.config.js
build: {
transpile: ['vue-preloaders'],
},
nuxt.config.js
css: [
'vue-preloaders/dist/vue-preloaders.css',
],
// NOTE: Here I am follow the Nuxt Plugins documentation:
import Vue from 'vue'
import VuePreloaders from 'vue-preloaders'
// NOTE: Here I am importing the custom preloader
import Squares from '../layouts/preloader'
Vue.use(VuePreloaders, {
loaders: {
squareLoader: {
container: '#app',
component: Squares,
overlayStyle: { backgroundColor: '#121212' },
},
},
})
I am trying to put this problem into words the best that I can. I think I am over-complicating this issue. Any help would be very much appreciated.
Kind regards,
Matthew
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.