1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import Vue from 'vue'
- import UITips from './Tips.vue'
- import UIAlert from './Alert.vue'
- import UIConfirm from './Confirm.vue'
- export const Tips = Vue.extend(UITips)
- export const Alert = Vue.extend(UIAlert)
- export const Confirm = Vue.extend(UIConfirm)
- export function $tips(data={}) {
- let instance = new Tips({
- data
- }).$mount()
- document.body.appendChild(instance.$el)
- Vue.nextTick(() => {
- instance.show = true
- })
- }
- export function $alert(data={}) {
- let instance = new Alert({
- data
- }).$mount()
- document.body.appendChild(instance.$el)
- Vue.nextTick(() => {
- instance.show = true
- })
- }
- export function $confirm(data={}) {
- let instance = new Confirm({
- data
- }).$mount()
- document.body.appendChild(instance.$el)
- Vue.nextTick(() => {
- instance.show = true
- })
- }
|