0.0.7 • Published 1 year ago
v-message-zk v0.0.7
vue3
npm install v-message-zk -S
import useMessage from 'v-message-zk';
createApp(App).use(useMessage).mount('#app') //global
useMessage('hello world')
useMessage.success('hello world')
useMessage.warning('hello world')
useMessage.error('hello world')
useMessage('hello world', {
/**
* Duration of stay
*/
duration?: number; //3000ms
/**
* Message Type
*/
type?: 'info' | 'success' | 'warning' | 'error'; //info
/**
* Message close callback
*/
onClose?: () => void;
/**
* Distance from the top of the window
*/
top?: number; //50
/**
* Message div maxWidth
*/
maxWidth?: number; //window width / 2
})