| | |
| | | <div class="userName" v-if="userInfo.name">{{ userInfo.name }}</div> |
| | | <div v-if="token"><div class="layout hover" @click="layoutBtn">退出</div></div> |
| | | <div v-else><div class="layout hover" @click="goLogin">登录</div></div> |
| | | <div @click="openFormulaDialog">公式</div> |
| | | </div> |
| | | </div> |
| | | <div class="contentBox"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 语音阅读组件 --> |
| | | <!-- <div class="voice-reader"> |
| | | <voiceReader /> |
| | | </div> --> |
| | | </div> |
| | | <!-- 教学组件 --> |
| | | <div class="toolBox"> |
| | |
| | | <wrongQuestion /> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="公式编辑" |
| | | align-center |
| | | v-model="formulaDialog" |
| | | class="myDialogs" |
| | | > |
| | | <div class="wendabox"> |
| | | <formula /> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 答题器 --> |
| | | <examination |
| | | ref="examinationRef" |
| | |
| | | :type="examinationData.type" |
| | | :infoType="examinationData.infoType" |
| | | /> |
| | | <!-- 计算器 --> |
| | | <el-dialog title="计算器" align-center v-model="calculatorVisble" width="550" style="height:548px"> |
| | | <calculator /> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | import { useRouter, useRoute } from 'vue-router' |
| | | import useClipboard from 'vue-clipboard3' |
| | | import examination from '../examination/index.vue' |
| | | import calculator from '../components/calculator.vue' |
| | | const { toClipboard } = useClipboard() |
| | | const MG: any = inject('MG') |
| | | const toolClass = inject('toolClass') |
| | |
| | | import moment from 'moment' |
| | | import dictionary from '@/views/components/dictionary.vue' |
| | | import newWord from '@/views/components/newWord.vue' |
| | | import formula from '@/views/components/formula.vue' |
| | | import wrongQuestion from '@/views/components/wrongQuestion.vue' |
| | | import voiceReader from '@/views/components/voiceReader.vue' |
| | | import { ElMessage, ElMessageBox, valueEquals } from 'element-plus' |
| | | import logo from '@/assets/images/header/logo.png' |
| | | import mulu from '@/assets/images/menu/mulu.png' |
| | |
| | | const siweiVisble = ref(false) |
| | | const modelToolVisble = ref(false) |
| | | const shengciVisble = ref(false) |
| | | const calculatorVisble = ref(false) |
| | | const activeTool = ref(0) |
| | | const toolState = reactive({ |
| | | open: true |
| | |
| | | case '生词卡片': |
| | | resourceUrl.value = bookConfig.value.resourceUrl |
| | | shengciVisble.value = true |
| | | break |
| | | case '计算器': |
| | | calculatorVisble.value = true |
| | | break |
| | | } |
| | | } else { |
| | | ElMessageBox.confirm('请先登录!', { |
| | |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const formulaDialog = ref(false) |
| | | const openFormulaDialog = () => { |
| | | formulaDialog.value = true |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | |
| | | width: 100%; |
| | | } |
| | | } |
| | | .voice-reader { |
| | | position:absolute; |
| | | bottom:30px; |
| | | left:50px; |
| | | } |
| | | </style> |