forked from github/dataease
refactor(图表): 变更文本样式
This commit is contained in:
parent
a55e431610
commit
028d89e5fe
@ -126,9 +126,9 @@ onBeforeUnmount(() => {
|
|||||||
const varStyle = computed(() => [
|
const varStyle = computed(() => [
|
||||||
{
|
{
|
||||||
'--scroll-speed': `${
|
'--scroll-speed': `${
|
||||||
element.value.style.scrollSpeed === 0 || !text.value
|
element.value.style.scrollSpeed === 0 || !textOut.value
|
||||||
? 0
|
? 0
|
||||||
: (text.value.clientWidth * 100) /
|
: (textOut.value.clientWidth * 100) /
|
||||||
canvasStyleData.value.scale /
|
canvasStyleData.value.scale /
|
||||||
element.value.style.scrollSpeed
|
element.value.style.scrollSpeed
|
||||||
}s`,
|
}s`,
|
||||||
@ -168,6 +168,7 @@ onMounted(() => {
|
|||||||
ref="textOut"
|
ref="textOut"
|
||||||
@keydown="handleKeydown"
|
@keydown="handleKeydown"
|
||||||
@keyup="handleKeyup"
|
@keyup="handleKeyup"
|
||||||
|
@dblclick="setEdit"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
ref="text"
|
ref="text"
|
||||||
@ -175,7 +176,6 @@ onMounted(() => {
|
|||||||
:class="{ 'can-edit': canEdit, 'marquee-txt': marqueeTxt }"
|
:class="{ 'can-edit': canEdit, 'marquee-txt': marqueeTxt }"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
:style="textStyle"
|
:style="textStyle"
|
||||||
@dblclick="setEdit"
|
|
||||||
@paste="clearStyle"
|
@paste="clearStyle"
|
||||||
@mousedown="handleMousedown"
|
@mousedown="handleMousedown"
|
||||||
@blur="handleBlur"
|
@blur="handleBlur"
|
||||||
@ -184,8 +184,8 @@ onMounted(() => {
|
|||||||
{{ element['propValue'] }}
|
{{ element['propValue'] }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="v-text preview" :style="varStyle">
|
<div v-else class="v-text preview" ref="textOut" :style="varStyle">
|
||||||
<div class="marquee-txt" :style="textStyle">{{ element['propValue'] }}</div>
|
<div class="marquee-txt" :style="textStyle" ref="text">{{ element['propValue'] }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user