mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
fix(docs): [watermark] adjusting the text color in dark mode (#14871)
This commit is contained in:
parent
74bfbefc28
commit
92df6df5b6
@ -1,5 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, watch } from 'vue'
|
||||
import { isDark } from '~/composables/dark'
|
||||
|
||||
const font = reactive({
|
||||
color: 'rgba(0, 0, 0, .15)',
|
||||
})
|
||||
|
||||
watch(
|
||||
isDark,
|
||||
() => {
|
||||
font.color = isDark.value
|
||||
? 'rgba(255, 255, 255, .15)'
|
||||
: 'rgba(0, 0, 0, .15)'
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-watermark>
|
||||
<el-watermark :font="font">
|
||||
<div style="height: 500px" />
|
||||
</el-watermark>
|
||||
</template>
|
||||
|
@ -1,5 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, watch } from 'vue'
|
||||
import { isDark } from '~/composables/dark'
|
||||
|
||||
const font = reactive({
|
||||
color: 'rgba(0, 0, 0, .15)',
|
||||
})
|
||||
|
||||
watch(
|
||||
isDark,
|
||||
() => {
|
||||
font.color = isDark.value
|
||||
? 'rgba(255, 255, 255, .15)'
|
||||
: 'rgba(0, 0, 0, .15)'
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<template>
|
||||
<el-watermark :content="['Element+', 'Element Plus']">
|
||||
<el-watermark :font="font" :content="['Element+', 'Element Plus']">
|
||||
<div style="height: 500px" />
|
||||
</el-watermark>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user