mirror of
https://gitee.com/newgateway/vtj.git
synced 2026-07-03 08:58:36 +08:00
27 lines
528 B
TypeScript
27 lines
528 B
TypeScript
import { createAdapter } from '@vtj/renderer';
|
|
import { ElNotification, ElLoading } from 'element-plus';
|
|
|
|
export function loading() {
|
|
return ElLoading.service({
|
|
lock: true,
|
|
text: 'Loading',
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
});
|
|
}
|
|
|
|
export function notify(
|
|
message: string,
|
|
title: string = '',
|
|
type: 'success' | 'warning' | 'error' | 'info' = 'warning'
|
|
) {
|
|
ElNotification({
|
|
title,
|
|
message,
|
|
type
|
|
});
|
|
}
|
|
|
|
export * from '@vtj/renderer';
|
|
|
|
export const adapter = createAdapter({ loading, notify });
|