vue 对话框 插件
Vue对话框加载 (vue-dialog-loading)
A light vue dialog plugin with loading animation and image preview.
带有加载动画和图像预览的light vue对话框插件。
安装 (Install)
npm install --save vue-dialog-loading
快速开始 (Quick Start)
main.js
main.js
import Dialog from 'vue-dialog-loading'
Vue.use(Dialog, {
dialogBtnColor: '#0f0'
})
your vue file
您的vue文件
this.$dialog({
title: 'title',
content: 'some information',
btns: [{
label: 'OK',
color: '#09f',
},
{
label: 'Cancel',
color: '#444',
ghost: true,
callback: () => {
window.alert('onOk callback')
},
}],
})
this.$loading.show({delay:0}) //delay 0ms, default is 300ms
this.$loading.hide()
//preview image, support double touch to scale 2.0 and touch drag
this.$ImagePreview.show(imgUrl)
翻译自: https://vuejsexamples.com/a-light-vue-dialog-plugin-with-loading-animation/
vue 对话框 插件