Loading&预警提示层js插件

Loading

Default

notice.showLoading();
setTimeout(() => {
    notice.hideLoading()
},3000)

Set Type (dots)

notice.showLoading({
    type: 'dots'  // default:'line'
});
setTimeout(() => {
    notice.hideLoading()
},3000)

Set Type (dots_zoom)

notice.showLoading({
    type: 'dots_zoom'  // default:'line'
});
setTimeout(() => {
    notice.hideLoading()
},3000)

Set Type (dots_spin)

notice.showLoading({
    type: 'dots_spin'  // default:'line'
});
setTimeout(() => {
    notice.hideLoading()
},3000)

Set Type (cube_flip)

notice.showLoading({
    type: 'cube_flip'  // default:'line'
});
setTimeout(() => {
    notice.hideLoading()
},3000)

Set Type (cube_zoom)

notice.showLoading({
    type: 'cube_zoom'  // default:'line'
});
setTimeout(() => {
    notice.hideLoading()
},3000)

Set Text

notice.showLoading({
    title: 'Loading'
});
setTimeout(() => {
    notice.hideLoading()
},3000)

Set Font Size

notice.showLoading({
    title: 'Loading',
    fontSize: 20,
});
setTimeout(() => {
    notice.hideLoading()
},3000)

Set Color

notice.showLoading({
    title: 'Loading',
    color: '#333',
    backgroundColor: 'rgba(255,255,255,.6)'
});
setTimeout(() => {
    notice.hideLoading()
},3000)

Toast

Default

notice.showToast({
    text: 'This is a message.'  // It must be filled in, otherwise it will not be displayed
});

Set Type (success)

notice.showToast({
    text: 'This is a success message.',
    type: 'success'
});

Set Type (error)

notice.showToast({
    text: 'This is a error message.',
    type: 'error'
});

Set Type (info)

notice.showToast({
    text: 'This is a info message.',
    type: 'info'
});

Set Type (warning)

notice.showToast({
    text: 'This is a warning message.',
    type: 'warning'
});

Set ShowClose

notice.showToast({
    text: 'This is a message.',
    type: 'success',
    showClose: true,   // default false
});

Set AutoClose

notice.showToast({
    text: 'This is a message.',
    type: 'success',
    showClose: true,
    autoClose: false,   // default true
});