JSFiddle - React, Tailwind, and code Playground
by mizobata
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="open2">Click to open the Message Box</el-button>
</template>
</div>
SCSS
@import url("//unpkg.com/[email protected]/lib/theme-chalk/index.css");
.el-message-box__btns {
display:flex;
flex-direction: row-reverse;
}
.el-message-box__btns .el-button {
margin-left: 10px;
}
Babel + JSX
var Main = {
methods: {
open2() {
this.$confirm('This will permanently delete the file. Continue?', 'Warning', {
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: 'Delete completed'
});
}).catch(() => {
this.$message({
type: 'info',
message: 'Delete canceled'
});
});
}
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')