Add the following code to the main.js file (importing the iView Spin component to expose global public methods) :
iviewthe SpinComponent address:www.iviewui.com/components/…
import { Spin } from iview;
Vue.prototype.$Spin= Spin; /** * @todo loading method, this. ShowSpinLoading (message); * @ param load message prompt words * / Vue. Prototype. ShowSpinLoading =function (message){
this.$Spin.show({
render: (h) => {
return h('div', [
h('Icon', {
'class': 'demo-spin-icon-load',
props: {
type: 'ios-loop-strong',
size: 50
}
}),
h('div', {
style: {
fontSize: '20px', }, },message) ]) } }); } /** * @todo to hide the loading method by calling this.hidespinloading (); */ Vue.prototype.hideSpinLoading =function (){
this.$Spin.hide();
}
Copy the code
The last:Install 18.03.0 + rancher1.6.17 dockerContainer virtualization deployment, welcome to leave a comment