add.vue 1001 B

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