This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ElDialog } from 'element-plus' | |
| /** | |
| * 解决 ElDialog 不显示时仍然渲染内容的问题 | |
| */ | |
| const PerfDialog = defineComponent( | |
| (props, ctx) => { | |
| const render = shallowRef(props.modelValue) | |
| const onClosed = async () => { | |
| await nextTick() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const createInheritedComposable = <F extends (...args: any[]) => any>(fn: F): F => { | |
| const key = Symbol('inherited-composable-' + Date.now()) | |
| return ((...args: any[]) => { | |
| let r: any = inject(key, key) | |
| if (r === key) { | |
| r = fn(...args) | |
| provide(key, r) | |
| } | |
| return r | |
| }) as F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script lang="ts"> | |
| const modules: Record<string, { default: string }> = import.meta.glob( | |
| '@/assets/svg/*.svg', | |
| { | |
| eager: true, | |
| query: 'raw', | |
| }, | |
| ); | |
| const svgElMap = Object.fromEntries( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { SlotsType, VNode } from 'vue' | |
| import { Comment, Fragment } from 'vue' | |
| const isEmpty = (nodes: VNode[] | undefined): boolean => { | |
| if (!nodes?.length) return true | |
| return nodes.every((v) => { | |
| return ( | |
| v.type === Comment || | |
| (v.type === Fragment && isEmpty(v.children as VNode[])) || | |
| // @ts-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| java.lang.Throwable | |
| at example.ExampleKt.main(Example.kt:11) | |
| at example.ExampleKt.main(Example.kt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2025-09-17 11:16:02.703 [info] [main] Log level: Info | |
| 2025-09-17 11:16:02.703 [info] [main] Validating found git in: "C:\Program Files\Git\cmd\git.exe" | |
| 2025-09-17 11:16:02.703 [info] [main] Validating found git in: "C:\Program Files (x86)\Git\cmd\git.exe" | |
| 2025-09-17 11:16:02.703 [info] [main] Validating found git in: "C:\Program Files\Git\cmd\git.exe" | |
| 2025-09-17 11:16:02.703 [info] [main] Validating found git in: "C:\Users\lisonge\AppData\Local\Programs\Git\cmd\git.exe" | |
| 2025-09-17 11:16:05.675 [info] [main] Log level: Info | |
| 2025-09-17 11:16:05.675 [info] [main] Validating found git in: "C:\Program Files\Git\cmd\git.exe" | |
| 2025-09-17 11:16:05.675 [info] [main] Validating found git in: "C:\Program Files (x86)\Git\cmd\git.exe" | |
| 2025-09-17 11:16:05.676 [info] [main] Validating found git in: "C:\Program Files\Git\cmd\git.exe" | |
| 2025-09-17 11:16:05.676 [info] [main] Validating found git in: "C:\Users\lisonge\AppData\Local\Programs\Git\cmd\git.exe" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export {}; | |
| import { shallowRef, onScopeDispose } from 'vue'; | |
| async function* timer(delay: number) { | |
| let breaked = false; | |
| const stop = () => (breaked = true); | |
| for (let i = 1, st = performance.now(), et = st, errorMs = 0; ; i++) { | |
| await new Promise((r) => setTimeout(r, delay - errorMs)); | |
| yield stop; | |
| if (breaked) return; | |
| et = performance.now(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { isEqual } from 'lodash-es' | |
| import { customRef, computed, type ShallowRef } from 'vue' | |
| export const useEqualRef = <T>(initValue: T): ShallowRef<T> => { | |
| return customRef((track, trigger) => { | |
| let value = initValue | |
| return { | |
| get() { | |
| track() | |
| return value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.aspectRatio | |
| import androidx.compose.foundation.layout.fillMaxHeight |
NewerOlder