createBSP.vue 990 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <el-dialog :title="title" :visible.sync="dialogVisible" width="400px" id="createBSP">
  3. <div>请输入创建的业务空间名:</div>
  4. <el-input :placeholder="`请输入业务空间名称`" v-model="roomName"></el-input>
  5. <span slot="footer" class="dialog-footer">
  6. <el-button size="small" @click="dialogVisible=false">取 消</el-button>
  7. <el-button size="small" type="primary" @click="confirm">确 定</el-button>
  8. </span>
  9. </el-dialog>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. title: '提示',
  16. dialogVisible: false,
  17. roomName: '',
  18. };
  19. },
  20. methods: {
  21. // 显示弹窗
  22. showDialog(val) {
  23. this.roomName = val;
  24. this.dialogVisible = true;
  25. },
  26. // 确认
  27. confirm() {
  28. if (this.roomName == '') {
  29. this.$message.warning("请填写空间名称");
  30. return
  31. }
  32. this.$emit('createRoom', this.roomName);
  33. this.dialogVisible = false;
  34. }
  35. },
  36. };
  37. </script>