Ver Fonte

修改学生登录拔尖侧边栏与小可位置固定

11wqe1 há 16 horas atrás
pai
commit
369d1ec9bc
2 ficheiros alterados com 15 adições e 6 exclusões
  1. 2 2
      src/components/sidebarL2.vue
  2. 13 4
      src/views/HomeView.vue

+ 2 - 2
src/components/sidebarL2.vue

@@ -37,7 +37,7 @@ import { myMixin } from "@/mixins/mixin.js"
                 return function(val){
                     let data = []
                     val.forEach(e =>{
-                        if (e.toolId === 'futureClass' && this.cocoNoteType == 'coconote' && this.roleUser.type != 2) {
+                        if (e.toolId === 'futureClass') {
                             data.push(e)
                         }
                     })
@@ -47,7 +47,7 @@ import { myMixin } from "@/mixins/mixin.js"
                         }
                     })
                     val.forEach( e =>{
-                        if (e.toolId == 'project') {
+                        if (e.toolId == 'project' && this.cocoNoteType == 'coconote' && this.roleUser.type != 2) {
                             data.push(e)
                         }
                     })

+ 13 - 4
src/views/HomeView.vue

@@ -160,7 +160,7 @@
 		<el-drawer class="dra" :visible.sync="xiaokeDia" width="100%" direction="rtl" :size="Full_Screen ? '  100%' : '30%'">
 			<div slot="title" style="display: flex; align-items: center;">
 				<img style="cursor: pointer;width: 24px;margin-left: 15px;" :src="!Full_Screen ? fullScreen : nofullScreen"
-					@click="Full_Screen = !Full_Screen" alt="">
+					@click="closeXK" alt="">
 			</div>
 			
 			<div style="height: calc(100% - 4px);">
@@ -253,6 +253,8 @@ export default {
 						// 更新元素的位置
 						el.style.left = `${event.clientX - offsetX}px`;
 						el.style.top = `${event.clientY - offsetY}px`;
+						vnode.context.position.x = event.clientX - offsetX
+						vnode.context.position.y = event.clientY - offsetY
 					}
 				};
 
@@ -286,9 +288,12 @@ export default {
 			fullScreen:require('../assets/img/fullScreen.png'),
 			nofullScreen:require('../assets/img/nofullScreen.png'),
 			position: {
-				x: window.innerWidth - 170, // 屏幕宽度减去元素宽度
+				// x: window.innerWidth - 170, // 屏幕宽度减去元素宽度
+				// y: window.innerHeight - 180, // 屏幕高度减去元素高度
+				x: 80, // 屏幕宽度减去元素宽度
 				y: window.innerHeight - 180, // 屏幕高度减去元素高度
 			}, // 初始位置
+			positionCopy:{},
 			AppJSon: [],
 			imgA: require("../assets/img/drgB.png"),
 			loading: false,
@@ -362,9 +367,13 @@ export default {
 		}),
 		openxiaoKe(){
 			console.log('666');
-
+			this.positionCopy = JSON.parse(JSON.stringify(this.position))
 			this.xiaokeDia = true;
-			
+		},
+		closeXK(){
+			this.Full_Screen = false
+			this.position = JSON.parse(JSON.stringify(this.positionCopy))
+
 		},
 		setHovered(val) {
 			if (val) {