更新
All checks were successful
CI / cache-and-install (push) Successful in 1m26s

This commit is contained in:
严浩
2024-08-22 19:24:36 +08:00
parent 7e1637ccce
commit 2a78b2db01
14 changed files with 136 additions and 88 deletions

11
src/types/shims/global.ts Normal file
View File

@ -0,0 +1,11 @@
declare global {
const $__DEV__: boolean;
}
declare module 'vue' {
export interface ComponentCustomProperties {
$__DEV__: boolean;
}
}
export {};

20
src/types/shims/router.ts Normal file
View File

@ -0,0 +1,20 @@
import 'vue-router';
// declare module 'vue-router' {
// interface RouteMeta {
// // fromList?: RouteLocationNormalized[]
// }
// interface Router {
// stack: {
// // list: RouteLocationNormalizedLoaded[]
// // currentStackIndex: number
// }
// }
// interface RouteLocationNormalizedGeneric {
// // from: RouteLocationNormalizedLoaded
// // stackIndex: number
// }
// }
export {};

15
src/types/shims/unocss.ts Normal file
View File

@ -0,0 +1,15 @@
// https://unocss.dev/presets/attributify#vue-3
import type { BasicAttributes, PseudoPrefix } from '@unocss/preset-attributify';
// https://github.com/unocss/unocss/pull/4095
type BasicAttributesFix = BasicAttributes | 'b';
type AttributifyNames<Prefix extends string = ''> =
| `${Prefix}${BasicAttributesFix}`
| `${Prefix}${PseudoPrefix}:${BasicAttributes}`;
declare module '@vue/runtime-dom' {
interface HTMLAttributes extends Partial<Record<AttributifyNames, string | boolean>> {}
}
export {};