1.1.3 • Published 5 years ago

vue-sample-swalert v1.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

vue-simple-swalert

swalert组件,适用于uni-app。

说明

项目说明 样式引用项目 wepy-simple-toast

使用

安装组件

  npm i vue-sample-swalert

引入

// main.js 全局引入
import swalert from 'vue-simple-swalert';
Vue.component('swalert',swalert);

// template
<template>
  <view>
  
    //这里是你的页面内容...
    <swalert ref="swalert"/> //注意 ref
  </view>
</template>

<script>

export default {
  //
  methods: { 
	  // args1 => title ,标题内容
	  // args2 => Object , 可以定义对象
	  this.$openSwalert("title", { showIcon: true , ... })
  }
 }
</script>

调用方法

	// 全局方法
	this.$openSwalert(title, options);
	this.$successSwalert(title, options);
	this.$errorSwalert(title, options);
	this.$hideSwalert(title, options);
	
  1. options 参数当前只有 showIcon,showCloseBar,showClose,showBtn,showConfirm等等可用
1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago