plus-paper-help.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div>
  3. <i class="el-icon-question pointer" @click="handleHelpOpen"></i>
  4. <el-dialog :visible.sync="helpVisible" append-to-body width="500px">
  5. <div class="fx-column">
  6. <div class="f12 f-999"><i class="el-icon-magic-stick mr5"></i>小提示</div>
  7. <div class="fx-column fx-cen-base mt30 pl60">
  8. <div class="fx-row fx-sta-cen">
  9. 可使用
  10. <el-image class="ml5 mr5" style="height:40px"
  11. :src="require('@/assets/images/evaluation/icon-key-tab.png')"></el-image>
  12. 打断输入,启用快速切换
  13. </div>
  14. <div class="fx-row fx-sta-cen mt10">
  15. 可使用
  16. <el-image class="ml5 mr5" style="height:40px"
  17. :src="require('@/assets/images/evaluation/icon-key-enter.png')"></el-image>
  18. 快速切换下一题
  19. </div>
  20. <div class="fx-row fx-sta-cen mt10">
  21. 可使用
  22. <el-image class="ml5 mr5" style="height:40px"
  23. :src="require('@/assets/images/evaluation/icon-key-backspace.png')"></el-image>
  24. 快速切换上一题
  25. </div>
  26. </div>
  27. <div class="fx-row fx-end-cen mt30">
  28. <el-button ref="btnConfirm" type="primary" @click="handleHelpClose()">知道了</el-button>
  29. </div>
  30. </div>
  31. </el-dialog>
  32. </div>
  33. </template>
  34. <script>
  35. import paperMixin from '../mx-paper-mixin'
  36. import consts from '@/common/mx-const'
  37. export default {
  38. mixins: [paperMixin],
  39. name: 'plus-paper-help',
  40. data() {
  41. return {
  42. helpVisible: false
  43. }
  44. },
  45. mounted() {
  46. const key = consts.keys.keyPaperShortcutNotified
  47. const notified = localStorage.getItem(key)
  48. if (!notified) {
  49. localStorage.setItem(key, "1")
  50. this.helpVisible = true
  51. }
  52. },
  53. methods: {
  54. handleHelpOpen() {
  55. this.helpVisible = true
  56. this.$nextTick(() => this.$refs.btnConfirm.$el.focus())
  57. },
  58. handleHelpClose() {
  59. this.helpVisible = false
  60. this.$nextTick(() => this.forceBlur())
  61. }
  62. }
  63. }
  64. </script>
  65. <style scoped>
  66. /deep/ .el-dialog__header {
  67. display: none;
  68. }
  69. </style>