Compare commits
5 Commits
851bfe149c
...
017289c694
| Author | SHA1 | Date | |
|---|---|---|---|
| 017289c694 | |||
| 28d26fb894 | |||
|
|
03f49a5b48 | ||
|
|
4b14ea4f08 | ||
| 0b39a9507b |
@@ -5,15 +5,10 @@
|
|||||||
overflow-x: hidden; // ✅ 防止横向撑开
|
overflow-x: hidden; // ✅ 防止横向撑开
|
||||||
|
|
||||||
.chat-ai {
|
.chat-ai {
|
||||||
margin: 6px 12px;
|
margin: 6px 0;
|
||||||
padding: 0 12px;
|
padding: 0 20px; // 消息内容的内边距 左右20px
|
||||||
max-width: 100%; // ✅ 限制最大宽度
|
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
background: rgba(255, 255, 255, 0.4);
|
max-width: 100%; // ✅ 限制最大宽度
|
||||||
box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 4px 20px 20px 20px;
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: #ffffff;
|
|
||||||
overflow: hidden; // ✅ 超出内容被切掉
|
overflow: hidden; // ✅ 超出内容被切掉
|
||||||
word-wrap: break-word; // ✅ 长单词自动换行
|
word-wrap: break-word; // ✅ 长单词自动换行
|
||||||
word-break: break-all; // ✅ 强制换行
|
word-break: break-all; // ✅ 强制换行
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="chat-mine">
|
<view class="chat-mine bg-17294E">
|
||||||
<text>{{ text }}</text>
|
<text>{{ text }}</text>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
.chat-mine {
|
.chat-mine {
|
||||||
margin: 6px 12px;
|
margin: 6px 20px;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
|
border-radius: 15px;
|
||||||
background-color: #00a6ff;
|
|
||||||
box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 20px 4px 20px 20px;
|
|
||||||
border: 1px solid;
|
|
||||||
border-color: #ffffff;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
.chat-other {
|
.chat-other {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 6px 0;
|
margin: 6px 0;
|
||||||
padding: 0 12px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
max-width: 100%; // ✅ 限制最大宽度
|
max-width: 100%; // ✅ 限制最大宽度
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
padding-bottom: 12px;
|
padding: 8px 16px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-tips-item {
|
.more-tips-item {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin: 4px;
|
margin: 0 4px;
|
||||||
box-shadow: 0 2px 5px 0px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 5px 0px rgba(0, 0, 0, 0.1);
|
||||||
background-color: $uni-bg-color;
|
background-color: $uni-bg-color;
|
||||||
padding: 2px 12px;
|
padding: 2px 12px;
|
||||||
|
|||||||
@@ -1,17 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<ModuleTitle :title="recommendTheme.themeName" />
|
<ModuleTitle :title="recommendTheme.themeName" />
|
||||||
<view class="container-scroll">
|
|
||||||
|
<view class="container-scroll font-size-0 scroll-x whitescape-nowrap">
|
||||||
<view
|
<view
|
||||||
|
class="card-item bg-white inline-block rounded-20 mr-8"
|
||||||
v-for="(item, index) in recommendTheme.recommendPostsList"
|
v-for="(item, index) in recommendTheme.recommendPostsList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@click="sendReply(item)"
|
||||||
>
|
>
|
||||||
<view class="mk-card-item" @click="sendReply(item)">
|
<view class="m-4 relative">
|
||||||
<image class="card-img" :src="item.coverPhoto" mode="aspectFill" />
|
<image
|
||||||
|
class="card-img rounded-16 relative z-10"
|
||||||
|
:src="item.coverPhoto"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
|
||||||
<view class="overlay-gradient">
|
<view class="shadow absolute rounded-16"></view>
|
||||||
<text class="overlay-text">{{ item.topic }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
class="card-text color-171717 font-size-14 line-height-20 border-box"
|
||||||
|
>
|
||||||
|
{{ item.topic }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,53 +1,27 @@
|
|||||||
.container {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container-scroll {
|
.container-scroll {
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
overflow-x: auto;
|
|
||||||
margin: 4px 0 6px;
|
margin: 4px 0 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mk-card-item {
|
.card-item {
|
||||||
flex-shrink: 0; /* 关键:防止 flex 布局压缩子元素宽度 */
|
width: 128px;
|
||||||
width: 142px;
|
height: 164px;
|
||||||
height: 126px;
|
}
|
||||||
border-radius: 10px;
|
|
||||||
overflow: hidden;
|
.card-img {
|
||||||
margin-right: 8px;
|
height: 120px;
|
||||||
position: relative;
|
width: 120px;
|
||||||
|
}
|
||||||
.card-img {
|
|
||||||
width: 100%;
|
.shadow {
|
||||||
height: 100%;
|
background-color: #e5e8ee;
|
||||||
display: block;
|
height: 96px;
|
||||||
}
|
width: 96px;
|
||||||
|
bottom: -4px;
|
||||||
/* 渐变背景层 */
|
left: 50%;
|
||||||
.overlay-gradient {
|
transform: translateX(-50%);
|
||||||
position: absolute;
|
z-index: 1;
|
||||||
bottom: 0;
|
}
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
.card-text {
|
||||||
height: 50px; /* 渐变层高度,可调 */
|
padding: 4px 8px 8px;
|
||||||
background: linear-gradient(
|
|
||||||
to bottom,
|
|
||||||
rgba(0, 0, 0, 0.001) 0%,
|
|
||||||
rgba(0, 0, 0, 0.5) 100%
|
|
||||||
);
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end; /* 文字贴近底部 */
|
|
||||||
padding: 0 8px 6px; /* 内边距让文字与边缘保持距离 */
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 渐变层上的文字 */
|
|
||||||
.overlay-text {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: $uni-font-size-sm;
|
|
||||||
text-align: left;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
// 字体-size
|
// 字体-size
|
||||||
|
.font-size-0 {
|
||||||
|
font-size: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.font-size-12 {
|
.font-size-12 {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,3 +17,5 @@
|
|||||||
@import "./scroll.scss";
|
@import "./scroll.scss";
|
||||||
@import "./overflow.scss";
|
@import "./overflow.scss";
|
||||||
@import "./width.scss";
|
@import "./width.scss";
|
||||||
|
@import "./z-index.scss";
|
||||||
|
@import "./white-scape.scss";
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
// 外边距-bottom
|
// 外边距-bottom
|
||||||
|
.m-4 {
|
||||||
|
margin: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mr-8 {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.mb-10 {
|
.mb-10 {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
// 内边距
|
// 内边距
|
||||||
|
.p-8 {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.p-12 {
|
.p-12 {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,14 @@
|
|||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rounded-16 {
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rounded-20 {
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.rounded-full {
|
.rounded-full {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|||||||
3
src/static/scss/white-scape.scss
Normal file
3
src/static/scss/white-scape.scss
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.whitescape-nowrap {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
15
src/static/scss/z-index.scss
Normal file
15
src/static/scss/z-index.scss
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
.z-0 {
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.z-10 {
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.z-20 {
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.z-30 {
|
||||||
|
z-index: 30;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user