JSFiddle - React, Tailwind, and code Playground
by linus
HTML
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/[email protected]/lib/index.js"></script>
<div id="app">
<template>
<el-button type="text" @click="open">Click to open the Message Box</el-button>
</template>
</div>
SCSS
@import url("//unpkg.com/[email protected]/lib/theme-default/index.css");
Babel + JSX
var Main = {
methods: {
open() {
var al = this.$alert('This is a message', 'Title', {
confirmButtonText: 'OK',
callback: action => {
var msg = this.$message({
type: 'info',
message: `action: ${ action }`
});
msg.close();
console.log(msg);
}
});
}
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')