| | |
| | | <!-- 菜单 --> |
| | | <div class="menuBox"> |
| | | <div |
| | | :class="['menuItem', activeMenu == item.name ? 'active' : '']" |
| | | v-for="(item, index) in menuData" |
| | | :key="index" |
| | | @click="menuItemClick(item.name)" |
| | | > |
| | | <div :class="['menuItem', activeMenu == item.name ? 'active' : '']" v-if="item.isShow"> |
| | | <div class="menuIcon imgBox"> |
| | | <img :src="item.icon" /> |
| | | </div> |
| | | <div class="name">{{ item.name }}</div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="reload hover" @click="reload()">刷新</div> --> |
| | | <!-- 设置 --> |
| | |
| | | </div> |
| | | <div class="menuList"> |
| | | <ul class="menu"> |
| | | <li |
| | | v-for="item in teachToolsMenuData" |
| | | :key="item.key" |
| | | :class="item.name === activeTool ? 'activeItem hover' : 'menuItem hover'" |
| | | :style="!toolState.open ? 'padding:10px 15px' : ''" |
| | | @click="selectTeachTools(item)" |
| | | > |
| | | <li v-for="item in teachToolsMenuData" :key="item.key"> |
| | | <div :class="item.name === activeTool ? 'activeItem hover' : 'menuItem hover'" :style="!toolState.open ? 'padding:10px 15px' : ''" v-if="item.isShow" @click="selectTeachTools(item)"> |
| | | <img :src="item.icon" alt="" /> |
| | | <span v-if="toolState.open">{{ item.name }}</span> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | |
| | | @mouseover="floatOverHander(item)" |
| | | @mouseout="floatOutHander(item)" |
| | | > |
| | | <div v-if="item.isShow"> |
| | | <el-popover |
| | | placement="right" |
| | | width="120" |
| | |
| | | /> |
| | | <div class="text">{{ item.name }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div |
| | |
| | | } |
| | | } |
| | | ) |
| | | |
| | | let menuData = [] //菜单 |
| | | let teachToolsMenuData = [] //右侧学习组件 |
| | | let floatingToolBox = [] //中间悬浮组件 |
| | | //获取当前书籍所需组件 |
| | | const getTextbookComponents = () => {} |
| | | const getTextbookComponents = () => { |
| | | menuData = [] |
| | | teachToolsMenuData = [] |
| | | floatingToolBox = [] |
| | | menuData = [ |
| | | { |
| | | name: '目录', |
| | | icon: mulu, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('1E16353F') > -1 |
| | | }, |
| | | { |
| | | name: '笔记', |
| | | icon: biji, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('A3298FCF') > -1 |
| | | }, |
| | | { |
| | | name: '资源', |
| | | icon: ziyuan, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('A04689E6') > -1 |
| | | }, |
| | | { |
| | | name: '知识图谱', |
| | | icon: zhishitupu, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('6BE6A3DC') > -1 |
| | | }, |
| | | { |
| | | name: '截图', |
| | | icon: jietu, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('CB0EACEC') > -1 |
| | | }, |
| | | { |
| | | name: '书签', |
| | | icon: biaoqian, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('CF2E1400') > -1 |
| | | } |
| | | ]; |
| | | teachToolsMenuData = [ |
| | | { |
| | | name: 'AI智能问答', |
| | | icon: aIzhinengwenda, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('E30C0843') > -1 |
| | | }, |
| | | { |
| | | name: '词典', |
| | | icon: cidian, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('83FB80FD') > -1 |
| | | }, |
| | | { |
| | | name: '生字卡片', |
| | | icon: shengzikapian, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('38D32EE3') > -1 |
| | | }, |
| | | { |
| | | name: '互动问答', |
| | | icon: hudongwenda, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('31F123A4') > -1 |
| | | }, |
| | | { |
| | | name: '思维导图', |
| | | icon: siweidaotu, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('94FF5E48') > -1 |
| | | }, |
| | | { |
| | | name: 'GGB函数工具', |
| | | icon: GGB, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('43C805B2') > -1 |
| | | }, |
| | | { |
| | | name: '几何工具', |
| | | icon: jihe, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('FFFED2EF') > -1 |
| | | }, |
| | | { |
| | | name: 'Python', |
| | | icon: python, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('1D48E00E') > -1 |
| | | }, |
| | | { |
| | | name: 'C++', |
| | | icon: cjiajia, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('8E953BF7') > -1 |
| | | }, |
| | | { |
| | | name: 'Javascript', |
| | | icon: javascript, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('25AC6CC2') > -1 |
| | | }, |
| | | { |
| | | name: '模型工具', |
| | | icon: moxinggongju, |
| | | isShow: bookConfig.value.textbookComponents.indexOf('366F6CF3') > -1 |
| | | } |
| | | ]; |
| | | floatingToolBox = [ |
| | | { |
| | | icon: huabi, |
| | | activeIcon: huabi1, |
| | | name: '画笔', |
| | | isShow: bookConfig.value.textbookComponents.indexOf('800109C0') > -1 |
| | | }, |
| | | { |
| | | activeIcon: baiban1, |
| | | icon: baiban, |
| | | name: '白板', |
| | | isShow: false |
| | | }, |
| | | { |
| | | activeIcon: biaozhu1, |
| | | icon: biaozhu, |
| | | name: '标记', |
| | | isShow: bookConfig.value.textbookComponents.indexOf('2E613A8F') > -1 |
| | | }, |
| | | { |
| | | activeIcon: biaoqian1, |
| | | icon: biaoqianw, |
| | | name: '书签', |
| | | isShow: bookConfig.value.textbookComponents.indexOf('D2D30448') > -1 |
| | | }, |
| | | { |
| | | activeIcon: jieping1, |
| | | icon: jieping, |
| | | name: '截屏', |
| | | isShow: bookConfig.value.textbookComponents.indexOf('86F0A1B8') > -1 |
| | | } |
| | | ] |
| | | } |
| | | |
| | | //获取目录 |
| | | const catalogueData = ref([]) |
| | |
| | | searchShow.value = true |
| | | } |
| | | } |
| | | // 菜单 |
| | | const menuData = reactive([ |
| | | { |
| | | name: '目录', |
| | | icon: mulu |
| | | }, |
| | | { |
| | | name: '笔记', |
| | | icon: biji |
| | | }, |
| | | { |
| | | name: '资源', |
| | | icon: ziyuan |
| | | }, |
| | | { |
| | | name: '知识图谱', |
| | | icon: zhishitupu |
| | | }, |
| | | { |
| | | name: '截图', |
| | | icon: jietu |
| | | }, |
| | | { |
| | | name: '书签', |
| | | icon: biaoqian |
| | | } |
| | | ]) |
| | | |
| | | // 选中菜单 |
| | | const activeMenu = ref('目录') |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // 右侧工具 |
| | | const teachToolsMenuData = reactive([ |
| | | { |
| | | name: 'AI智能问答', |
| | | icon: aIzhinengwenda |
| | | }, |
| | | { |
| | | name: '词典', |
| | | icon: cidian |
| | | }, |
| | | { |
| | | name: '生字卡片', |
| | | icon: shengzikapian |
| | | }, |
| | | { |
| | | name: '互动问答', |
| | | icon: hudongwenda |
| | | }, |
| | | { |
| | | name: '思维导图', |
| | | icon: siweidaotu |
| | | }, |
| | | { |
| | | name: 'GGB函数工具', |
| | | icon: GGB |
| | | }, |
| | | { |
| | | name: '几何工具', |
| | | icon: jihe |
| | | }, |
| | | { |
| | | name: 'Python', |
| | | icon: python |
| | | }, |
| | | { |
| | | name: 'C++', |
| | | icon: cjiajia |
| | | }, |
| | | { |
| | | name: 'Javascript', |
| | | icon: javascript |
| | | }, |
| | | { |
| | | name: '模型工具', |
| | | icon: moxinggongju |
| | | } |
| | | ]) |
| | | const baiduVisible = ref(false) |
| | | const wendaVisible = ref(false) |
| | | const cidianVisible = ref(false) |
| | |
| | | } |
| | | |
| | | //画布悬浮操作 |
| | | const floatingToolBox = reactive([ |
| | | { |
| | | icon: huabi, |
| | | activeIcon: huabi1, |
| | | name: '画笔' |
| | | }, |
| | | { |
| | | activeIcon: baiban1, |
| | | icon: baiban, |
| | | name: '白板' |
| | | }, |
| | | { |
| | | activeIcon: biaozhu1, |
| | | icon: biaozhu, |
| | | name: '标记' |
| | | }, |
| | | { |
| | | activeIcon: biaoqian1, |
| | | icon: biaoqianw, |
| | | name: '书签' |
| | | }, |
| | | { |
| | | activeIcon: jieping1, |
| | | icon: jieping, |
| | | name: '截屏' |
| | | } |
| | | ]) |
| | | |
| | | let canvas = null |
| | | const floatingToolData = reactive({ |
| | | activeToolData: '', //选中工具 |
| | |
| | | } |
| | | .menu { |
| | | padding-top: 20px; |
| | | li { |
| | | li > div { |
| | | // height: 50px; |
| | | padding: 10px 36px; |
| | | font-size: 16px; |