vue-dialog-service

1.0.6 • Public • Published

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> 

Readme

Keywords

none

Package Sidebar

Install

npm i vue-dialog-service

Weekly Downloads

3

Version

1.0.6

License

ISC

Unpacked Size

12.2 kB

Total Files

6

Last publish

Collaborators

  • gemahu