1.0.11 • Published 4 years ago

vue-mg-modal-dialog v1.0.11

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

vue-mg-modal-dialog

npm npm

Installation

npm i vue-mg-modal-dialog

Usage

app.js

import ModalDialog from 'vue-mg-modal-dialog'
Vue.component('ModalDialog', ModalDialog)

Example:

<template>
  <section class="container">
    <button class="btn btn-primary" @click="show=true">モーダル表示</button>
    <modal-dialog :show="show" @close="show=false">
        <template v-slot:header>
          <div>ダイアログ</div>
        </template>
        <template v-slot:body>
          <div>内容</div>
        </template>
        <template v-slot:footer>
          <button class="btn btn-primary" @click="onStore">OK</button>
          <button class="btn btn-secondary" @click="show=false">キャンセル</button>
        </template>
    </modal-dialog>
  </section>
</template>

<style lang="scss" scoped>
</style>

<script>
import ModalDialog from '../src/vue-mg-modal-dialog'
export default {
  data() {
    return {
      show: false,
    }
  },
    methods: {
      onStore: function () {
        alert('OKが押下されました。')
      }
    },
  components: {
    ModalDialog,
  },  
}
</script>

License

MIT

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago