Browse Source

解决edge浏览器免责声明显示异常问题。

songjie/feature-20250628160649-上线前优化
宋杰 15 hours ago
parent
commit
e77ca33753
  1. 161
      src/views/AiEmotion.vue
  2. 4
      vite.config.js

161
src/views/AiEmotion.vue

@ -294,7 +294,7 @@ const displayDate = computed(() => {
if (!currentStock.value?.apiData) return "";
const lastData = currentStock.value.apiData.GSWDJ?.at(-1);
if (!lastData || !lastData[0]) return "";
const dateStr = lastData[0];
// YYYY-MM-DD YYYY/MM/DD
const dateMatch = dateStr.match(/(\d{4})[\-\/](\d{1,2})[\-\/](\d{1,2})/);
@ -303,7 +303,7 @@ const displayDate = computed(() => {
// DD/MM/YYYY
return `更新时间:${day.padStart(2, '0')}/${month.padStart(2, '0')}/${year}`;
}
//
return dateStr;
});
@ -1179,7 +1179,7 @@ const scrollToBottom = async () => {
console.log('用户正在手动滚动,跳过自动滚动');
return;
}
const container = userInputDisplayRef.value;
if (!container) return;
await nextTick();
@ -1192,12 +1192,12 @@ const scrollToBottom = async () => {
//
const handleUserScroll = () => {
isUserScrolling.value = true;
//
if (scrollTimeout.value) {
clearTimeout(scrollTimeout.value);
}
// 2
scrollTimeout.value = setTimeout(() => {
isUserScrolling.value = false;
@ -1415,7 +1415,7 @@ onMounted(async () => {
//
window.addEventListener('resize', globalResizeHandler);
window.aiEmotionGlobalResizeHandler = globalResizeHandler;
//
const container = userInputDisplayRef.value;
if (container) {
@ -1495,7 +1495,7 @@ onUnmounted(() => {
window.removeEventListener('resize', window.aiEmotionGlobalResizeHandler);
window.aiEmotionGlobalResizeHandler = null;
}
//
const container = userInputDisplayRef.value;
if (container) {
@ -1503,7 +1503,7 @@ onUnmounted(() => {
container.removeEventListener('touchmove', handleTouchMove);
container.removeEventListener('scroll', handleUserScroll);
}
//
if (scrollTimeout.value) {
clearTimeout(scrollTimeout.value);
@ -1522,12 +1522,10 @@ defineExpose({
</script>
<style scoped>
.disclaimer-item {
p {
color: #ffffff !important;
font-size: 20px;
font-weight: bold;
}
.disclaimer-item p {
color: #ffffff !important;
font-size: 20px;
font-weight: bold;
}
.container {
@ -1709,8 +1707,6 @@ defineExpose({
padding-left: 15px;
position: relative;
&:last-child {
margin-bottom: 0;
}
@ -2011,6 +2007,7 @@ defineExpose({
transition: all 0.3s ease;
/* 添加平滑过渡效果 */
}
.class04 {
background-image: url('@/assets/img/AiEmotion/bk00000.png');
/* 使用导入的背景图片 */
@ -2585,68 +2582,66 @@ defineExpose({
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, #00d4ff, #0099ff, #00d4ff);
opacity: 0.8;
}
.conclusion-item::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, #00d4ff, #0099ff, #00d4ff);
opacity: 0.8;
}
.conclusion-item:last-child {
margin-bottom: 0;
}
.conclusion-item .conclusion-title {
color: #FFD700;
font-size: 22px;
font-weight: bold;
margin: 0 0 15px 0;
text-align: center;
letter-spacing: 2px;
}
&:last-child {
margin-bottom: 0;
}
.conclusion-item .conclusion-title::after {
content: '';
position: absolute;
bottom: -5px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 2px;
background: linear-gradient(90deg, transparent, #00d4ff, transparent);
}
.conclusion-title {
color: #FFD700;
font-size: 22px;
font-weight: bold;
margin: 0 0 15px 0;
text-align: center;
letter-spacing: 2px;
&::after {
content: '';
position: absolute;
bottom: -5px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 2px;
background: linear-gradient(90deg, transparent, #00d4ff, transparent);
}
}
.conclusion-item .conclusion-text {
color: #ffffff;
font-size: 20px;
line-height: 1.8;
margin: 0 0 12px 0;
text-align: left;
word-wrap: break-word;
padding-left: 15px;
position: relative;
}
.conclusion-text {
color: #ffffff;
font-size: 20px;
line-height: 1.8;
margin: 0 0 12px 0;
text-align: left;
word-wrap: break-word;
padding-left: 15px;
position: relative;
&::before {
content: '▶';
position: absolute;
left: 0;
top: 0;
color: #00d4ff;
font-size: 12px;
opacity: 0.7;
}
.conclusion-item .conclusion-text::before {
content: '▶';
position: absolute;
left: 0;
top: 0;
color: #00d4ff;
font-size: 12px;
opacity: 0.7;
}
&:last-child {
margin-bottom: 0;
}
}
.conclusion-item .conclusion-text:last-child {
margin-bottom: 0;
}
}
@ -2656,13 +2651,13 @@ defineExpose({
border-radius: 12px;
background: rgba(255, 255, 255, 0.05);
border: 1px dashed rgba(153, 153, 153, 0.3);
}
p {
color: #999999;
font-size: 16px;
margin: 0;
font-style: italic;
}
.conclusion-placeholder p {
color: #999999;
font-size: 16px;
margin: 0;
font-style: italic;
}
.disclaimer-item {
@ -2670,13 +2665,13 @@ defineExpose({
padding: 20px;
border-top: 1px solid rgba(153, 153, 153, 0.2);
text-align: center;
}
p {
color: #ffffff !important;
font-size: 16px;
margin: 0;
letter-spacing: 1px;
}
.disclaimer-item p {
color: #ffffff !important;
font-size: 16px;
margin: 0;
letter-spacing: 1px;
}
}

4
vite.config.js

@ -38,10 +38,6 @@ export default defineConfig(({ command, mode }) => {
preprocessorOptions: {
scss: {
charset: false, // 避免出现: build时的 @charset 必须在第一行的警告
additionalData: `
@import "@/styles/mixin.scss";
@import "@/styles/variables.scss";
`,
},
},
},

Loading…
Cancel
Save