Vue Splash是一个精美的Vue.js插件,可在您的应用程序徽标完全加载之前启动您的应用程序徽标。
# NPM
$ npm i vue-splash --save
1.导入并注册Vue Splash。
import Vue from 'vue';
import VueSplash from 'vue-splash';
Vue.use(VueSplash);
2.将Vue Splash组件添加到模板。
<template>
<vue-splash
:show="true"
:logo="logo"
title="Your App Name"
color="#00bfa5"
:size="180"
:fixed="true"
/>
</template>
export default {
name: "YourVueComponent",
computed: {
logo() {
return YourLogo;
}
}
}
3.所有默认 props 。
show: {
type: Boolean,
default: true,
},
logo: {
type: String,
default: "https://svgshare.com/i/NRE.svg",
},
title: {
type: String,
default: "",
},
customText: {
type: String,
default: "",
},
color: {
type: String,
default: "#00bfa5",
},
size: {
type: [Number, String],
default: 180,
},
fixed: {
type: Boolean,
default: true,
},