36 lines
600 B
Vue
36 lines
600 B
Vue
<template>
|
|
<view class="chat-other">
|
|
<text>{{ text }}</text>
|
|
<slot></slot>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { defineProps } from "vue";
|
|
defineProps({
|
|
text: {
|
|
type: String,
|
|
default: ''
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.chat-other {
|
|
width: 100%;
|
|
margin: 6px 0;
|
|
padding: 0 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-width: 100%; // ✅ 限制最大宽度
|
|
overflow-x: hidden; // ✅ 防止横向撑开
|
|
|
|
text {
|
|
font-family: PingFang SC, PingFang SC;
|
|
font-weight: 400;
|
|
font-size: 14px;
|
|
color: #333333;
|
|
}
|
|
|
|
}
|
|
</style> |