Commit 0d3d02e4 authored by 甘瑞文's avatar 甘瑞文

调整百分比

parent 3e7d1838
......@@ -15,7 +15,7 @@
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet">
<% } %>
</head>
<body>
<body style="background: #303133">
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
......
......@@ -67,9 +67,10 @@ export default {
paintTypes,
submitting: false,
backgroundStyle: {
background: `#FFF url(${this.img}) no-repeat`,
backgroundSize: 'contain',
backgroundPosition: 'center'
// background: `#FFF url(${this.img}) no-repeat`,
// backgroundSize: 'contain',
// backgroundPositionX: 'center',
// backgroundPositionY: 'top'
}
};
},
......@@ -166,9 +167,14 @@ export default {
}
}
.draw-board {
height: 100vh;
width: 100vw;
background: #f5f5f5;
width: 100%;
/* background: #f5f5f5; */
position: absolute;
top: 0;
bottom: 0;
// height: 100vh;
// width: 100vw;
// background: #f5f5f5;
}
.ans-commit {
font-size: 40px;
......
......@@ -33,6 +33,7 @@ export default {
align-items: center;
width: 100%;
height: 100%;
color: beige;
p{
font-size: 150px;
}
......
......@@ -3,9 +3,10 @@
<h1 v-if="step === 'counting'">{{countingText}}</h1>
<el-button
v-if="step === 'racing'"
type="primary"
:type="submitting ? 'default' : 'primary'"
@click="handleSubmit"
:class="submitting ? 'race' : 'race active'"
:disabled="submitting"
>
<i class="el-icon-thumb"></i>
</el-button>
......@@ -61,8 +62,8 @@ export default {
}
},
(data) => {
this.submitting = false
this.step = 'submitted'
this.submitting = true
// this.step = 'submitted'
console.log('回执', data);
});
},
......
<template>
<div class="board-container">
<div class="board-container" :style="styles">
<quick-response :eventId="eventId" :img="img" v-if="this.currentComponment === 'quick-response'"/>
<locker :eventId="eventId" v-if="this.currentComponment === 'locker'"/>
<select-question :eventId="eventId" :img="img" v-if="this.currentComponment === 'select-question'"/>
......@@ -25,7 +25,18 @@ export default {
DrawingBoard
},
data() {
let width = window.screen.availWidth;
console.log();
let height = width * 9 / 16;
if(height > window.screen.availHeight ){
height = window.screen.availHeight ;
width = height *16 / 9;
}
return {
styles: {
width: width +'px',
height: height +'px'
},
currentComponment: 'locker',
eventId: '0',
img: ''
......@@ -57,19 +68,21 @@ export default {
},
onMsg(msg) {
console.log('home onmsg: ', msg);
if (!msg || !msg.from || msg.from.indexOf('teacher') < 0 || !msg.payload) {
return
}
if (!msg.payload.eventId || !msg.payload.type || msg.payload.type < 0) {
if (!msg || !msg.from || msg.from.indexOf('teacher') < 0) {
return
}
if (msg.type === 'finish') {
if (msg.type === 'question-exit') {
this.currentComponment = 'locker'
return
}
if (msg.type !== 'question') {
return
}
if (!msg.payload || !msg.payload.eventId || !msg.payload.type || msg.payload.type < 0) {
return
}
this.eventId = msg.payload.eventId;
this.currentComponment = 'locker';
this.img = ''
......@@ -105,8 +118,8 @@ export default {
.board-container {
position: absolute;
left: 0;
right: 0;
// right: 0;
top: 0;
bottom: 0;
// bottom: 0;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment