vue-dialog-service
v1.0.6
Published
dialog-service used element dialog
Downloads
4
Readme
dialog-service
A Vue.js plugin
Install dependencies
# install dependencies
yarn add vue-dialog-service -D
edit your entry.js(main.js):
import DialogService from "vue-dialog-service";
Vue.use(DialogService);
Use
<template>
<div class="hello">
<el-button @click="openModal">测试按钮</el-button>
</div>
</template>
<script>
import exampleDialog from "./exampleDialog";
export default {
name: "HelloWorld",
data() {
return {
msg: "Welcome to Your Vue.js App",
dialog: null
};
},
methods: {
openModal() {
this.dialog.open();
}
},
mounted() {
this.dialog = this.$Dialog(exampleDialog, {
destroyedOnClose: false,
title: "dialogTitle",
visible: false,
width: "70%",
data: 123
});
}
};
</script>