conversation.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="main">
  3. <view class="cu-chat">
  4. <view class="cu-item self">
  5. <view class="main">
  6. <view class="content bg-green shadow">
  7. <text>喵喵喵!喵喵喵!喵喵喵!喵喵!喵喵!!喵!喵喵喵!</text>
  8. </view>
  9. </view>
  10. <view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
  11. </view>
  12. <view class="cu-item">
  13. <view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
  14. <view class="main">
  15. <view class="content shadow">
  16. <text>喵喵喵!喵喵喵!</text>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="cu-item self">
  21. <view class="main">
  22. <image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" class="radius" mode="widthFix"></image>
  23. </view>
  24. <view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
  25. </view>
  26. <view class="cu-item self">
  27. <view class="main">
  28. <view class="action text-bold text-grey">
  29. 3"
  30. </view>
  31. <view class="content shadow">
  32. <text class="cuIcon-sound text-xxl padding-right-xl"> </text>
  33. </view>
  34. </view>
  35. <view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
  36. </view>
  37. <view class="cu-item">
  38. <view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
  39. <view class="main">
  40. <view class="content shadow">
  41. xxxxxxs
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view :class="InputBottom!=0?'cu-bar foot input cur':'cu-bar foot input'" :style="'bottom:'+InputBottom+'px'">
  47. <view class="action" @click="sendvoice">
  48. <text class="cuIcon-sound text-grey"></text>
  49. </view>
  50. <input v-if="!isvoice" class="solid-bottom" @focus="InputFocus" @blur="InputBlur" :disabled="isinput" :adjust-position="false"
  51. :focus="false" maxlength="300" :placeholder="textinput" cursor-spacing="10"></input>
  52. <button class="flex-sub" style="font-size: 30rpx; height: 64rpx;padding: 0;" v-else>按住发送语音</button>
  53. <view class="action" style="margin-right: 20rpx;">
  54. <text class="cuIcon-picfill text-grey"></text>
  55. </view>
  56. <button class="cu-btn bg-green shadow">发送</button>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. components: {
  63. },
  64. onLoad() {
  65. },
  66. mounted() {
  67. },
  68. data() {
  69. return {
  70. keyword: "",
  71. InputBottom: 0,
  72. isvoice: false,
  73. textinput: "请输入",
  74. isinput: false
  75. }
  76. },
  77. methods: {
  78. InputFocus(e) {
  79. this.InputBottom = e.detail.height
  80. },
  81. InputBlur(e) {
  82. this.InputBottom = 0
  83. },
  84. sendvoice() {
  85. this.isvoice = !this.isvoice
  86. }
  87. }
  88. };
  89. </script>
  90. <style lang="scss">
  91. page {
  92. padding-bottom: 100rpx;
  93. }
  94. </style>