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
-12
View File
@@ -1,12 +0,0 @@
export {};
declare global {
const $__DEV__: boolean;
}
/* declare module 'vue' {
export interface ComponentCustomProperties {
$__DEV__: boolean;
}
}
*/
+11
View File
@@ -0,0 +1,11 @@
declare global {
const $__DEV__: boolean;
}
declare module 'vue' {
export interface ComponentCustomProperties {
$__DEV__: boolean;
}
}
export {};
@@ -1,8 +1,5 @@
import 'vue-router';
// 为了确保这个文件被当作一个模块,添加至少一个 `export` 声明
export {};
// declare module 'vue-router' {
// interface RouteMeta {
// // fromList?: RouteLocationNormalized[]
@@ -19,3 +16,5 @@ export {};
// // stackIndex: number
// }
// }
export {};
+15
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 {};