赞
踩
1,框架DJANGO,VUE
2,前端VUE代码
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>聊天窗口</title>
- {% load static %}
- <script src="{% static '/vue/vue.js'%}"></script>
- </head>
- <style>
- *{margin:0;padding:0}
- .head1{
- width: 600px;
- height: 1000px;
- position: absolute;
- left:50%; top:50%;
- transform:translate(-50%,-50%);
- margin-top: 200px;
- /* border: 6px solid rgb(148, 241, 26);
- border-radius: 2px;
- border-color: rgb(187, 248, 248); */
- }
- .head2{
- width: 600px;
- height: 400px;
- border: 6px solid red;
- border-color: rgb(187, 248, 248);
- }
- .head3{
- width: 600px;
- height: 200px;
- border-color: aqua;
- border: 6px solid rgb(245, 164, 42);
- }
- .chatlog{
- width: 600px;
- height: 400px;
- }
- </style>
- <body>
- <div id="go" class="head1">
- <h1>留言窗口</h1>
- <div class="head2">
- <textarea id="chat-log" class='chatlog' v-model="textareacontent" cols="100" rows="20" v-on:keyup.enter="search"></textarea><br>
- </div>
- <div class="head3">
- <button class="button1" @click="sendinfo">点击发送</button>
- <div>
- <input v-model="content" type="text" placeholder="此处聊天" >
- </div>
- </div>
- </div>
- <script type="text/javascript">
- Vue.config.productionTip=false
- new Vue ({
- el:'#go',
- data:{
- name:'声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/327511推荐阅读
相关标签
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。