Commit 3347be3d by Sixong.Zhu

style

parent eca55214
<template>
<div class="msg-detail file-message d-flex" @dblclick="openFile">
<div class="file-message-info">
<div
class="text-nowrap text-truncate file-message-name"
class="file-message-info"
:class="{ 'd-flex align-items-center': !messageBody.msg.size }"
>
<div
class="file-message-name"
:title="messageBody.msg.name"
:class="{ 'text-truncate': messageBody.msg.size }"
>
{{ messageBody.msg.name }}
</div>
<div class="text-hint">
<div class="text-hint" v-if="messageBody.msg.size">
{{ format(messageBody.msg.size) }}
</div>
</div>
......
......@@ -108,32 +108,32 @@
</template>
<script lang="ts">
import { Component, Inject, Prop, Vue } from "vue-property-decorator";
import * as dto from "../model";
import chat from "./../xim";
import {
import { Component, Inject, Prop, Vue } from "vue-property-decorator";
import * as dto from "../model";
import chat from "./../xim";
import {
isAudio,
isImage,
isVideo,
MAX_FILE_SIZE,
MAX_IMAGE_SIZE,
} from "./message-item/file-controller";
import WhoReadList from "./who-read-list.vue";
import avatar from "@/customer-service/components/avatar.vue";
import { chatStore, ChatStore } from "@/customer-service/store/model";
import ximInstance from "../xim/xim";
import { dbController } from "../database";
import ImageMessage from "./message-item/image-message.vue";
import FileMessage from "./message-item/file-message.vue";
import AudioMessage from "./message-item/audio-message.vue";
import VideoMessage from "./message-item/video-message.vue";
import TextMessage from "./message-item/text-message.vue";
import WithdrawMessage from "./message-item/withdraw-message.vue";
import xim from "./../xim";
const twoMinutes = 2 * 60 * 1000;
const messageMapping = new Map<dto.MessageType, string>([
} from "./message-item/file-controller";
import WhoReadList from "./who-read-list.vue";
import avatar from "@/customer-service/components/avatar.vue";
import { chatStore, ChatStore } from "@/customer-service/store/model";
import ximInstance from "../xim/xim";
import { dbController } from "../database";
import ImageMessage from "./message-item/image-message.vue";
import FileMessage from "./message-item/file-message.vue";
import AudioMessage from "./message-item/audio-message.vue";
import VideoMessage from "./message-item/video-message.vue";
import TextMessage from "./message-item/text-message.vue";
import WithdrawMessage from "./message-item/withdraw-message.vue";
import xim from "./../xim";
const twoMinutes = 2 * 60 * 1000;
const messageMapping = new Map<dto.MessageType, string>([
[dto.MessageType.Image, "image-message"],
[dto.MessageType.File, "file-message"],
[dto.MessageType.Video, "video-message"],
......@@ -141,9 +141,9 @@ const messageMapping = new Map<dto.MessageType, string>([
[dto.MessageType.Text, "text-message"],
[dto.MessageType.Withdraw, "withdraw-message"],
[dto.MessageType.GeneralOrderMsg, "text-message"],
]);
]);
@Component({
@Component({
components: {
WhoReadList,
avatar,
......@@ -154,8 +154,8 @@ const messageMapping = new Map<dto.MessageType, string>([
TextMessage,
WithdrawMessage,
},
})
export default class Message extends Vue {
})
export default class Message extends Vue {
@chatStore.State(ChatStore.STATE_CHAT_CURRENT_USER_UID)
private readonly chatMyId!: ChatStore.STATE_CHAT_CURRENT_USER_UID;
......@@ -386,11 +386,11 @@ export default class Message extends Vue {
private closeKeywordPopover() {
document.body.click();
}
}
}
</script>
<style lang="less" scoped>
.message-con {
.message-con {
padding-bottom: 20px;
margin-right: 15px;
position: relative;
......@@ -431,6 +431,10 @@ export default class Message extends Vue {
display: inline-block;
}
}
/deep/ .file-message-info {
text-align: initial;
}
}
&.offset-bottom {
......@@ -442,9 +446,9 @@ export default class Message extends Vue {
font-size: 16px;
margin-right: 10px;
}
}
}
.msg-name {
.msg-name {
font-size: 14px;
color: #888;
text-align: right;
......@@ -453,16 +457,16 @@ export default class Message extends Vue {
&.algin-left {
text-align: left;
}
}
}
.msg-content {
.msg-content {
text-align: right;
&.algin-left {
text-align: left;
}
}
}
.msg-detail {
.msg-detail {
margin-top: 10px;
font-size: 14px;
line-height: 20px;
......@@ -473,9 +477,9 @@ export default class Message extends Vue {
/deep/ img {
max-width: 300px;
}
}
}
.download-icon {
.download-icon {
cursor: pointer;
text-decoration: none;
margin-left: 15px;
......@@ -485,21 +489,21 @@ export default class Message extends Vue {
color: #fff;
font-size: 14px;
}
}
}
.no-selection {
.no-selection {
user-select: none;
}
}
.pointer {
.pointer {
cursor: pointer;
}
}
.all {
.all {
color: #4389f8;
}
}
.match-keyword {
.match-keyword {
background-color: #fff3e0;
border-radius: 13px;
padding: 3px 8px;
......@@ -525,9 +529,9 @@ export default class Message extends Vue {
i {
margin-right: 5px;
}
}
}
.keyword-action {
.keyword-action {
list-style: none;
li {
......@@ -540,11 +544,11 @@ export default class Message extends Vue {
background-color: #f5f6fa;
}
}
}
}
</style>
<style lang="less">
.match-keyword-popover {
.match-keyword-popover {
padding: 0;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment