Merge remote-tracking branch 'origin/feature/v1.2灵机空间-内容上传审核_rxd' into test

This commit is contained in:
rd
2025-08-13 15:40:01 +08:00
2 changed files with 2 additions and 12 deletions

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="highlight-textarea-container"> <div class="highlight-textarea-container">
<a-textarea <a-textarea
ref="textareaRef"
v-model="inputValue" v-model="inputValue"
placeholder="请输入作品描述" placeholder="请输入作品描述"
:disabled="disabled" :disabled="disabled"
@ -15,7 +14,6 @@
/> />
<div <div
ref="highlightRef"
class="textarea-highlight" class="textarea-highlight"
:class="{ focus: focus }" :class="{ focus: focus }"
:style="{ visibility: inputValue ? 'visible' : 'hidden' }" :style="{ visibility: inputValue ? 'visible' : 'hidden' }"
@ -49,10 +47,6 @@ const emit = defineEmits<{
(e: 'update:modelValue', value: string): void; (e: 'update:modelValue', value: string): void;
}>(); }>();
// 内部状态管理
// 修复highlightRef类型定义
const textareaRef = ref<HTMLTextAreaElement | null>(null);
const highlightRef = ref<HTMLTextAreaElement | null>(null);
const inputValue = ref(props.modelValue || ''); const inputValue = ref(props.modelValue || '');
const scrollTop = ref(0); const scrollTop = ref(0);
const focus = ref(false); const focus = ref(false);

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="highlight-textarea-container"> <div class="highlight-textarea-container">
<a-textarea <a-textarea
ref="textareaRef"
v-model="inputValue" v-model="inputValue"
placeholder="请输入作品描述" placeholder="请输入作品描述"
:disabled="disabled" :disabled="disabled"
@ -15,7 +14,6 @@
/> />
<div <div
ref="highlightRef"
class="textarea-highlight" class="textarea-highlight"
:class="{ focus: focus }" :class="{ focus: focus }"
:style="{ visibility: inputValue ? 'visible' : 'hidden' }" :style="{ visibility: inputValue ? 'visible' : 'hidden' }"
@ -50,9 +48,6 @@ const emit = defineEmits<{
}>(); }>();
// 内部状态管理 // 内部状态管理
// 修复highlightRef类型定义
const textareaRef = ref<HTMLTextAreaElement | null>(null);
const highlightRef = ref<HTMLTextAreaElement | null>(null);
const inputValue = ref(props.modelValue || ''); const inputValue = ref(props.modelValue || '');
const scrollTop = ref(0); const scrollTop = ref(0);
const focus = ref(false); const focus = ref(false);
@ -157,6 +152,7 @@ const handleTextareaScroll = (e: Event) => {
resize: vertical; resize: vertical;
white-space: pre-wrap; white-space: pre-wrap;
word-wrap: break-word; word-wrap: break-word;
z-index: inherit;
} }
.textarea-highlight { .textarea-highlight {
@include textarea-style; @include textarea-style;
@ -186,7 +182,7 @@ const handleTextareaScroll = (e: Event) => {
caret-color: #211f24 !important; caret-color: #211f24 !important;
@include textarea-padding; @include textarea-padding;
// -webkit-text-fill-color: transparent !important; // -webkit-text-fill-color: transparent !important;
overflow-y: auto; overflow-y: auto;
} }
.arco-textarea-word-limit { .arco-textarea-word-limit {