1.0.3 • Published 8 months ago

jx-vue3-toast v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

介绍

基于vue3.0的toast弹窗组件

组件使用

安装

npm i jx-vue3-toast --save

初始化

import Toast from 'jx-vue3-toast';
Vue.use(Toast);

使用

 <script setup>
 import { getCurrentInstance } from 'vue'
 const { proxy } = getCurrentInstance()  
  //  弹窗提示 , 2秒后自动关闭
  proxy.$toast({title: '提交中,请稍候', duration: 2000})  // duration默认2000
  // 加载中,默认title:加载中
  proxy.$showLoading({title: '加载中'})
  // 取消加载 
  proxy.$hideLoading()
 
 </script>