表情点击其他区域隐藏

pull/23/head
taoshihan1991 4 years ago
parent 7106eab177
commit 7e694beabf

@ -66,7 +66,7 @@ html {
} }
.visitorFaceBox{ .visitorFaceBox{
position: absolute; position: absolute;
bottom: 86px; bottom: 105px;
} }
.kefuFaceBox{ .kefuFaceBox{
position: absolute; position: absolute;

@ -12,7 +12,7 @@
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="/static/css/common.css?v=0.2.2" /> <link rel="stylesheet" href="/static/css/common.css?v=0.2.3" />
<style> <style>
body { body {
background: #fff; background: #fff;
@ -78,5 +78,5 @@
var KEFU_ID='{{.KEFU_ID}}'; var KEFU_ID='{{.KEFU_ID}}';
var REFER='{{.Refer}}'; var REFER='{{.Refer}}';
</script> </script>
<script src="/static/js/chat-page.js?v=0.2.2"></script> <script src="/static/js/chat-page.js?v=0.2.3"></script>
</html> </html>

@ -236,13 +236,14 @@ new Vue({
$.each(faceTitles, function (index, item) { $.each(faceTitles, function (index, item) {
_this.face.push({"name":item,"path":faces[item]}); _this.face.push({"name":item,"path":faces[item]});
}); });
$(".faceBtn").click(function(){ $(".faceBtn").click(function(e){
var status=$('.faceBox').css("display"); var status=$('.faceBox').css("display");
if(status=="block"){ if(status=="block"){
$('.faceBox').hide(); $('.faceBox').hide();
}else{ }else{
$('.faceBox').show(); $('.faceBox').show();
} }
return false;
}); });
}); });
}, },
@ -268,6 +269,8 @@ new Vue({
$('body').click(function(){ $('body').click(function(){
clearTimeout(titleTimer); clearTimeout(titleTimer);
document.title = originTitle; document.title = originTitle;
$('.faceBox').hide();
}); });
}, },
//表情点击事件 //表情点击事件

Loading…
Cancel
Save