diff --git a/components.d.ts b/components.d.ts index 2f10b66..c5aef78 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,6 +8,8 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + AsyncError: typeof import('./src/components/async-error/index.vue')['default'] + AsyncLoading: typeof import('./src/components/async-loading/index.vue')['default'] AudioMessage: typeof import('./src/components/talk/message/AudioMessage.vue')['default'] Avatar: typeof import('./src/components/base/Avatar.vue')['default'] AvatarCropper: typeof import('./src/components/base/AvatarCropper.vue')['default'] diff --git a/src/components/async-error/index.vue b/src/components/async-error/index.vue new file mode 100644 index 0000000..a23dd6d --- /dev/null +++ b/src/components/async-error/index.vue @@ -0,0 +1,79 @@ + + + + + + diff --git a/src/components/async-loading/index.vue b/src/components/async-loading/index.vue new file mode 100644 index 0000000..5bb623b --- /dev/null +++ b/src/components/async-loading/index.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/components/talk/message/FileMessage.vue b/src/components/talk/message/FileMessage.vue index 6735c14..0d121c3 100644 --- a/src/components/talk/message/FileMessage.vue +++ b/src/components/talk/message/FileMessage.vue @@ -55,7 +55,7 @@ const getFileTypeIMG = computed(() => { default: objT.finishedImg = filePaperOther objT.blankImg = filePaperOtherBlank - objT.progressColor = '#747474' + objT.progressColor = '#46299d' } return objT }) @@ -132,7 +132,7 @@ const downloadAndOpenFile = () => { :height="95" :src="getFileTypeIMG.blankImg" > - { :strokeWidth="3" :size="20" > +
+ +
@@ -288,4 +291,20 @@ const downloadAndOpenFile = () => { width: 40rpx !important; height: 40rpx !important; } + +.upload-failed { + position: absolute; + top: 120rpx; + right: 52rpx; + transform: translate(-50%, -50%); + z-index: 1; + width: 40rpx; + height: 40rpx; + display: flex; + align-items: center; + justify-content: center; + color: #ff4d4f; + background: #ff4d4f; + border-radius: 50%; +} diff --git a/src/components/talk/message/ImageMessage.vue b/src/components/talk/message/ImageMessage.vue index 8a84a27..9f6a226 100644 --- a/src/components/talk/message/ImageMessage.vue +++ b/src/components/talk/message/ImageMessage.vue @@ -12,40 +12,40 @@ const img = computed(() => { // console.log(props.extra); let info = { width: 0, - height: 0 + height: 0, } if (props.extra.url.includes('blob:http://')) { info = { width: props.extra.width, - height: props.extra.height + height: props.extra.height, } - }else { + } else { info = getImageInfo(props.extra.url) } if (info.width == 0 || info.height == 0) { return { width: 450, - height: 298 + height: 298, } } - if(info.width<300){ + if (info.width < 300) { return { width: 300, - height: info.height / (info.width / 300) + height: info.height / (info.width / 300), } } if (info.width < 350) { return { width: info.width, - height: info.height + height: info.height, } } return { width: 350, - height: info.height / (info.width / 350) + height: info.height / (info.width / 350), } }) @@ -54,13 +54,30 @@ const img = computed(() => { class="im-message-image" :class="{ left: data.float === 'left', - right: data.float === 'right' + right: data.float === 'right', }" > -
- - -
+
+
+ + +
+ +
+
+
diff --git a/src/components/talk/message/VideoMessage.vue b/src/components/talk/message/VideoMessage.vue index a4dc217..a11ffcf 100644 --- a/src/components/talk/message/VideoMessage.vue +++ b/src/components/talk/message/VideoMessage.vue @@ -1,8 +1,8 @@