1.0.1 • Published 1 year ago

hxz-light-toast v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

hxz-light-toast

vue3轻量级提示插件

安装插件

npm install hxz-light-toast --save

引用插件

import { createApp } from 'vue'
import App from './App.vue'
import hxzLightToast from 'hxz-light-toast';
import 'hxz-light-toast/dist/index.css';

const app = createApp(App)
app.use(hxzLightToast)
app.mount('#app')

this语法使用

this.$toast.show('我爱模板网 www.5imoban.net', 'info', 2000)

setup语法糖下使用

import { getCurrentInstance } from 'vue'
const instance = getCurrentInstance()

instance.proxy.$toast.show('我爱模板网 www.5imoban.net', 'info', 2000)

参数

参数名默认值类型解释
str''String提示语
type'info'String提示类型:info、success、warning、error
time2000Number多少秒后关闭
1.0.1

1 year ago

1.0.0

1 year ago