footerComp.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. const comFooter = {
  2. name: 'comFooter',
  3. data() {
  4. return {
  5. phone: '0755-3365-6365',
  6. centerDialogVisible: false
  7. }
  8. },
  9. template:
  10. `
  11. <div>
  12. <div class="footer-phone">
  13. <div class="phone-title">监督电话</div>
  14. <div class="phone" @click="centerDialogVisible = true">
  15. {{ phone }}
  16. </div>
  17. </div>
  18. <el-dialog
  19. :visible.sync="centerDialogVisible"
  20. width="18%"
  21. center>
  22. <span>确定拨打该电话吗</span>
  23. <span slot="footer" class="dialog-footer">
  24. <el-button @click="centerDialogVisible = false">取 消</el-button>
  25. <el-button class="confirm" @click="telPhone">确 定</el-button>
  26. </span>
  27. </el-dialog>
  28. </div>
  29. `,
  30. methods: {
  31. telPhone() {
  32. this.centerDialogVisible = false;
  33. window.location.href = `tel:${this.phone}`;
  34. }
  35. }
  36. }