mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [tour] make path responsive to window size (#22145)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, inject, toRef } from 'vue'
|
||||
import { useLockscreen } from '@element-plus/hooks'
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { maskProps } from './mask'
|
||||
import { tourKey } from './helper'
|
||||
|
||||
@@ -39,9 +40,11 @@ const roundInfo = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const { width: windowWidth, height: windowHeight } = useWindowSize()
|
||||
|
||||
const path = computed(() => {
|
||||
const width = window.innerWidth
|
||||
const height = window.innerHeight
|
||||
const width = windowWidth.value
|
||||
const height = windowHeight.value
|
||||
const info = roundInfo.value
|
||||
const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`
|
||||
const _radius = radius.value
|
||||
|
||||
Reference in New Issue
Block a user