Skip to content

qukezhi/el-dialog-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

element-ui dialog plugin

How to use?

First

import ElDialogContainer from 'el-dialog-container';
Vue.use(ElDialogContainer);

Second, create a new file "DialogDemo.Vue"

<template>
  <el-dialog-container title="弹框测试">
      <h1>测试弹框</h1>
  </el-dialog-container>
</template>

<script>
export default {
  props:{
    id: Number
  }
}
</script>

<style scoped>

</style>

Last

<template>
  <div class="home">
    <el-button type="primary" @click="onClick">测试</el-button>
  </div>
</template>

<script>
import DialogDemo from './DialogDemo.vue';

export default {
  methods:{
    onClick(){
      this.$dialog(DialogDemo, {id: 1 /* props here */}).then(r=>{}); // call dialog here
    }
  }
}
</script>

About

An element-ui dialog plugin, easy to use.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published