guhongwei 4 years ago
parent
commit
030b2d21ca
1 changed files with 25 additions and 2 deletions
  1. 25 2
      src/views/achieveLive/detail/chatData.vue

+ 25 - 2
src/views/achieveLive/detail/chatData.vue

@@ -20,8 +20,17 @@
                 <el-input v-model="text"></el-input>
                 <el-input v-model="text"></el-input>
               </el-col>
               </el-col>
               <el-col :span="10" class="btn">
               <el-col :span="10" class="btn">
-                <el-button type="primary" size="mini" @click="sendMessage">发送</el-button>
-                <el-button type="primary" size="mini">快捷发言</el-button>
+                <el-col :span="12">
+                  <el-button type="primary" size="mini" @click="sendMessage">发送</el-button>
+                </el-col>
+                <el-col :span="12">
+                  <el-popover placement="top" trigger="click">
+                    <el-col :span="24">
+                      <p class="text" v-for="(item, index) in textList" :key="index" @click="textBtn(item.name)">{{ item.name }}</p>
+                    </el-col>
+                    <el-button slot="reference" type="primary" size="mini">快捷发言</el-button>
+                  </el-popover>
+                </el-col>
               </el-col>
               </el-col>
             </el-col>
             </el-col>
           </el-tab-pane>
           </el-tab-pane>
@@ -49,6 +58,7 @@ export default {
       list: [],
       list: [],
       // 发言内容
       // 发言内容
       text: '',
       text: '',
+      textList: [{ name: '欢迎欢迎' }, { name: '科技创新' }, { name: '大咖云集' }],
     };
     };
   },
   },
   async created() {
   async created() {
@@ -85,6 +95,10 @@ export default {
         this.$set(this, 'text', '');
         this.$set(this, 'text', '');
       } else this.$message.error('请输入信息后发送');
       } else this.$message.error('请输入信息后发送');
     },
     },
+    textBtn(text) {
+      this.$set(this, `text`, text);
+      this.sendMessage();
+    },
     channel() {
     channel() {
       if (!this.id) {
       if (!this.id) {
         console.warn('未获取到展会信息,无法进行订阅');
         console.warn('未获取到展会信息,无法进行订阅');
@@ -164,4 +178,13 @@ export default {
     margin: 0 0 10px 0;
     margin: 0 0 10px 0;
   }
   }
 }
 }
+.text {
+  text-align: center;
+  padding: 5px 0;
+  border-bottom: 1px dashed #ccc;
+}
+.text:hover {
+  cursor: pointer;
+  color: #409eff;
+}
 </style>
 </style>