-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (69 loc) · 2.79 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<html>
<head>
<meta charset="utf-8"/>
<title>尬聊</title>
<link rel="manifest" href="manifest.json">
<link rel="shortcut icon " type="images/x-icon" href="./favicon.ico">
<script src="https://cdn.bootcss.com/vue/2.4.4/vue.min.js"></script>
<script src="https://cdn.bootcss.com/element-ui/1.4.6/index.js"></script>
<script src="https://cdn.bootcss.com/paho-mqtt/1.0.2/mqttws31.min.js"></script>
<link href="https://cdn.bootcss.com/element-ui/1.4.6/theme-default/index.css" rel="stylesheet">
</head>
<body>
<style>
[v-cloak] {display: none}
::-webkit-scrollbar-track-piece {
background-color:#f8f8f8;
}
::-webkit-scrollbar {
width:9px;
height:9px;
}
::-webkit-scrollbar-thumb {
background-color:#dddddd;
background-clip:padding-box;
min-height:28px;
}
::-webkit-scrollbar-thumb:hover {
background-color:#bbb;
}
</style>
<div v-cloak>
<el-card style="height:93%" :style="{'height':bh}">
<div style="width:93%;position:absolute;bottom: 30px">
<el-input placeholder="输入内容 Enter键发送 输入 /name 名字 更换名字;/help显示帮助;/任何搜索条件 发送斗图表情" style="width:90%" v-model="tosend" @keyup.enter.native="send"></el-input>
</div>
<div id="chat" style="margin-bottom: 100px; overflow: auto;padding:3px" :style="{'height':ch}">
<div v-for="m in messages" style="margin-top: 1px">
<div v-if="m.type=='message'">
<div style="height:20px;width:80%">
<span style="font-size: 14px">{{m.name}}</span> <span style="font-size: 12px">{{m.time}}</span>
</div>
<el-tag type="primary" style="margin:2px">{{m.text}}</el-tag>
</div>
<div v-if="m.type=='alert'">
<el-alert
:title="m.alert"
:description="m.description"
>
</el-alert>
</div>
<div v-if="m.type=='huaji'">
<div style="height:20px;width:80%">
<span style="font-size: 14px">{{m.name}}</span> <span style="font-size: 12px">{{m.time}}</span>
</div>
<template i-if="m.url.indexOf('https')==0">
<img sytle="width:144px;height:144px" @load="imageLoaded" :src="m.url" >
</template>
<template v-else>
<img sytle="width:144px;height:144px" @load="imageLoaded" :src=" 'images/huaji/' + m.url" >
</template>
</div>
</div>
</div>
</el-card>
</div>
<script src="source.js">
</script>
</body>
</html>