Usage Guide

Add Simplert from CDN (Not supported again from v1.1.0)

Just add this script link, replace latest with spesific version you want, ex : 0.5.1
1
<script src="https://unpkg.com/[email protected]/dist/simplert.bundle.js"></script>
Copied!

Import from node_modules

You need run npm install vue2-simplert --save first, then import simplert to your component like
1
import Simplert from 'vue2-simplert'
2
require('vue2-simplert/dist/simplert.css')
Copied!

Refer Simplert to components

1
<script>
2
export default {
3
components: { Simplert }
4
};
5
</script>
Copied!

Template

1
<simplert :useRadius="true"
2
:useIcon="true"
3
ref="simplert">
4
</simplert>
Copied!

Open Simplert

1
let obj = {
2
title: 'Custom Function',
3
message: 'Click close to trigger custom function',
4
type: 'info',
5
onClose: this.onClose
6
}
7
this.$refs.simplert.openSimplert(obj)
Copied!
vue2-simplert
Copyright © 2017 by Irfan Maulana
Last modified 3yr ago