修复日志页面
This commit is contained in:
parent
bb67bcfa32
commit
a26a553fdb
@ -35,6 +35,12 @@
|
|||||||
/*word-wrap: break-word;*/
|
/*word-wrap: break-word;*/
|
||||||
/*word-break: normal;*/
|
/*word-break: normal;*/
|
||||||
}
|
}
|
||||||
|
pre {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
font-size: large;
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
#log-container{
|
#log-container{
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
background: #333;
|
background: #333;
|
||||||
@ -78,11 +84,14 @@
|
|||||||
<input type="text" class="input">
|
<input type="text" class="input">
|
||||||
<button id="sendMsg" class="btn">发送</button>
|
<button id="sendMsg" class="btn">发送</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="log-container" contenteditable="true">
|
|
||||||
<div id="msg">
|
|
||||||
|
|
||||||
</div>
|
<!-- <script id="msg" type="text/html" style='display:block'>-->
|
||||||
</div>
|
|
||||||
|
<!-- </script>-->
|
||||||
|
|
||||||
|
<div id="log-container" contenteditable="true">
|
||||||
|
<pre id="msg"></pre>
|
||||||
|
</div>
|
||||||
<div class="support"></div>
|
<div class="support"></div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -254,10 +263,13 @@
|
|||||||
if(msg&&msg.trim()&&!msg.endsWith('\n')){
|
if(msg&&msg.trim()&&!msg.endsWith('\n')){
|
||||||
msg+='\n';
|
msg+='\n';
|
||||||
}
|
}
|
||||||
msg = msg.replaceAll('\n','</br>');
|
// msg = msg.replaceAll('\n','</br>');
|
||||||
$("#log-container div").append(msg);
|
// $("#log-container #msg").append(msg);
|
||||||
|
|
||||||
|
$("#log-container #msg").text($("#log-container #msg").text()+msg);
|
||||||
// 滚动条滚动到最低部
|
// 滚动条滚动到最低部
|
||||||
$("#log-container").scrollTop($("#log-container div").height() - $("#log-container").height());
|
// $("#log-container").scrollTop($("#log-container div #msg").height() - $("#log-container").height());
|
||||||
|
$("#log-container").scrollTop($("#log-container pre").height() - $("#log-container").height());
|
||||||
}
|
}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
checkLoading();
|
checkLoading();
|
||||||
@ -279,7 +291,7 @@
|
|||||||
text: '确认',
|
text: '确认',
|
||||||
btnClass: 'btn-primary',
|
btnClass: 'btn-primary',
|
||||||
action: function() {
|
action: function() {
|
||||||
$("#log-container div").html('');
|
$("#log-container #msg").html('');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel: {
|
cancel: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user