更新内容:
一款基于 Vue2 的干净简洁的指令式对话框组件,它包含了 Modal、Alert、Mask 和 Toast 等功能形态
// include and install in main.js import Vue from 'vue' import vDialog from 'v-dialogs' Vue.use(vDialog) // in everywhere // Modal import UserProfile from './UserProfile.vue' this.$dlg.modal(UserProfile, { width: 400, height: 300, title: 'User Profile', params: { userId: 1, userName: 'Terry Zeng' }, callback: data => { this.$dlg.alert(`Received message: ${data}`) } }) // Alert this.$dlg.alert('message', callback, options) // Mask const key = this.$dlg.mask('Data loading, please hold on a moment...') // do some stuff job().then(resp => { // close mark layer when job done this.$dlg.close(key) }) // Toast this.$dlg.taost('message', callback, options)
![]() | 1 deathscythe 2019-10-28 14:23:44 +08:00 不觉得放大窗口的按钮跟关闭按钮不水平对齐么? |
![]() | 2 Terry05 OP @deathscythe 最大化的图标通常都会在中轴位置偏上,可以观察一下 Windows 窗口最大化的图标 |