feat: 登录也样式优化

This commit is contained in:
duanshuwen 2025-08-10 20:04:35 +08:00
parent e252f7d377
commit bae468d11f
2 changed files with 66 additions and 65 deletions

View File

@ -1,10 +1,7 @@
<template> <template>
<view class="container"> <view class="container">
<view class="chat-ai"> <view class="chat-ai">
<ChatMarkdown <ChatMarkdown :key="textKey" :text="processedText" />
:key="textKey"
:text="processedText"
></ChatMarkdown>
<slot name="content"></slot> <slot name="content"></slot>
</view> </view>
<slot name="footer"></slot> <slot name="footer"></slot>
@ -18,8 +15,8 @@
const props = defineProps({ const props = defineProps({
text: { text: {
type: String, type: String,
default: '' default: "",
} },
}); });
// key // key
@ -28,14 +25,14 @@
// //
const processedText = computed(() => { const processedText = computed(() => {
if (!props.text) { if (!props.text) {
return ''; return "";
} }
// //
const textStr = String(props.text); const textStr = String(props.text);
// //
if (textStr.includes('加载中') || textStr.includes('...')) { if (textStr.includes("加载中") || textStr.includes("...")) {
return textStr; return textStr;
} }
@ -43,12 +40,15 @@
}); });
// text // text
watch(() => props.text, (newText, oldText) => { watch(
() => props.text,
(newText, oldText) => {
if (newText !== oldText) { if (newText !== oldText) {
textKey.value++; textKey.value++;
} }
}, { immediate: true }); },
{ immediate: true }
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -67,7 +67,7 @@
box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.1); box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px 20px 20px 20px; border-radius: 4px 20px 20px 20px;
border: 1px solid; border: 1px solid;
border-color: #FFFFFF; border-color: #ffffff;
} }
} }
</style> </style>

View File

@ -22,6 +22,7 @@
.login-title { .login-title {
width: 137px; width: 137px;
height: 32px;
margin: 6px auto; margin: 6px auto;
} }