add.vue 942 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div>
  3. <el-button size="small" type="primary" icon="el-icon-plus" @click="drawer = true">新 建</el-button>
  4. <el-drawer
  5. title="创建角色"
  6. :visible.sync="drawer"
  7. append-to-body
  8. size="80%"
  9. direction="rtl">
  10. <div class="drawer__panel">
  11. <roleContentTemp :data="{roleid:'0'}" @onSuccess="onSuccess">
  12. <el-button slot="cancel" size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
  13. </roleContentTemp>
  14. </div>
  15. </el-drawer>
  16. </div>
  17. </template>
  18. <script>
  19. import roleContentTemp from './roleContent.vue'
  20. export default {
  21. data () {
  22. return{
  23. dialogFormVisible:false,
  24. drawer:false,
  25. form:{
  26. "roleid":0,
  27. "rolename":"",
  28. "remarks":""
  29. }
  30. }
  31. },
  32. components:{
  33. roleContentTemp
  34. },
  35. methods:{
  36. onSuccess () {
  37. this.$emit('onSuccess')
  38. }
  39. }
  40. }
  41. </script>
  42. <style>
  43. </style>