App.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <div id="app">
  3. <!-- 客服 -->
  4. <div v-if="changeChild == 10">
  5. <chat v-on:value ='value'/>
  6. </div>
  7. <div v-if="changeChild == 100">
  8. <ledgeBase v-on:value ="value"/>
  9. </div>
  10. <div v-if="changeChild == 1000">
  11. <leaveMsg v-on:value ='value'/>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. import chat from './components/chat'
  17. import leaveMsg from './components/leaveMsg'
  18. import ledgeBase from './components/ledgeBase'
  19. export default {
  20. name: 'App',
  21. components: {
  22. chat,
  23. leaveMsg,
  24. ledgeBase
  25. },
  26. data(){
  27. return{
  28. changeChild:10 //默认10,子组件传过来的值 100为留言知识库,1000为发起留言
  29. }
  30. },
  31. methods:{
  32. value(val){
  33. this.changeChild = val;
  34. console.log(this.changeChild)
  35. }
  36. },
  37. mounted(){
  38. }
  39. }
  40. </script>
  41. <style>
  42. #app {
  43. /* background: #EFEFEF; */
  44. width: 100%;
  45. /* margin: 10% 20% */
  46. }
  47. body{
  48. margin: 0;
  49. padding: 0;
  50. width: 100%;
  51. height: 100%;
  52. }
  53. .el-input__inner,.el-textarea__inner{
  54. padding:0 9px;
  55. color: #333333;
  56. }
  57. /* input::-webkit-input-placeholder{
  58. color: #333333;
  59. } */
  60. .el-upload--picture-card{
  61. width: 50px;
  62. height: 50px;
  63. line-height: 50px;
  64. border:1px solid rgba(221,221,221,1);
  65. border-radius: 5px;
  66. background:rgba(255,255,255,1);
  67. }
  68. /* .el-upload--picture-card i {
  69. line-height: none!important;
  70. } */
  71. [class*=" el-icon-"], [class^=el-icon-]{
  72. line-height: 0;
  73. }
  74. .el-upload-list--picture-card .el-upload-list__item{
  75. width: 50px;
  76. height: 50px;;
  77. margin: 0 20px 0 0;
  78. border: 0;
  79. border-radius : 5px;
  80. }
  81. .el-card__body{
  82. padding: 0;
  83. }
  84. .el-textarea .el-textarea__inner{
  85. resize: none;
  86. }
  87. .levMsg .el-input__inner, .el-textarea__inner{
  88. padding: 10px 0 0 10px;
  89. height: 120px;
  90. }
  91. .el-popover{
  92. height: 200px;
  93. overflow: auto;
  94. }
  95. .leaveMsg .el-textarea .el-textarea__inner{
  96. height: 80px!important;
  97. }
  98. /* 滚动条 */
  99. /* 兼容版滚动条 */
  100. .scroll::-webkit-scrollbar {
  101. border: .02rem solid #FFF;
  102. }
  103. .scroll::-webkit-scrollbar {
  104. width: 0rem;
  105. height: .04rem;
  106. }
  107. .scroll::-webkit-scrollbar-button {
  108. width: 0px;
  109. height: 0px;
  110. }
  111. .scroll::-webkit-scrollbar-thumb {
  112. border-radius: .1rem;
  113. box-shadow: inset 0 0 0 .04rem #aaa;
  114. border: .02rem solid transparent;
  115. }
  116. .scroll::-webkit-scrollbar-track {
  117. display: block;
  118. background: rgba(0, 0, 0, 0.1);
  119. }
  120. .el-dialog{
  121. margin-top: 0!important;
  122. position: absolute;
  123. left: 50%;
  124. top: 50%;
  125. transform: translate(-50%,-50%);
  126. margin: 0;
  127. max-height:600px;
  128. }
  129. .el-dialog img{
  130. max-height: 500px;
  131. }
  132. input::-webkit-outer-spin-button,
  133. input::-webkit-inner-spin-button {
  134. -webkit-appearance: none;
  135. }
  136. input[type="number"]{
  137. -moz-appearance:textfield;
  138. }
  139. .chatting .el-upload-list{
  140. display: none;
  141. }
  142. /* 手风琴样式 */
  143. .el-collapse{
  144. margin: 10px;
  145. border: 1px solid rgba(223,223,223,1);
  146. border-radius: 5px;
  147. }
  148. div.el-collapse-item__header{
  149. border:0;
  150. /* height: 40px; */
  151. /* line-height: 40px; */
  152. padding-left: 15px;
  153. color: #5EA0F7;
  154. font-size: 14px;
  155. }
  156. .el-collapse-item:nth-child(odd), .el-collapse-item:nth-child(odd) div.el-collapse-item__header{
  157. background: #F6F6F6!important;
  158. }
  159. .el-collapse-item__wrap{
  160. border: 0;
  161. padding-left: 15px;
  162. }
  163. .el-collapse-item:last-child{
  164. margin-bottom: 0;
  165. }
  166. </style>