mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-15 03:06:25 +08:00
docs: [switch] fix type error (#19704)
This commit is contained in:
@ -20,7 +20,7 @@ const value2 = ref(false)
|
|||||||
const loading1 = ref(false)
|
const loading1 = ref(false)
|
||||||
const loading2 = ref(false)
|
const loading2 = ref(false)
|
||||||
|
|
||||||
const beforeChange1 = () => {
|
const beforeChange1 = (): Promise<boolean> => {
|
||||||
loading1.value = true
|
loading1.value = true
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -31,7 +31,7 @@ const beforeChange1 = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const beforeChange2 = () => {
|
const beforeChange2 = (): Promise<boolean> => {
|
||||||
loading2.value = true
|
loading2.value = true
|
||||||
return new Promise((_, reject) => {
|
return new Promise((_, reject) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Reference in New Issue
Block a user