From 708819f1a7172e77baebce90ecbedbeb34e545d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Thu, 22 Aug 2024 22:35:54 +0800 Subject: [PATCH] =?UTF-8?q?preset-attributify=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E7=94=A8b?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index-page.vue | 3 +-- src/types/shims/unocss.ts | 16 ++++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/pages/index-page.vue b/src/pages/index-page.vue index baa455f..51fbee2 100644 --- a/src/pages/index-page.vue +++ b/src/pages/index-page.vue @@ -19,7 +19,7 @@ import type { FunctionalComponent } from 'vue'; // https://cn.vuejs.org/guide/extras/render-function#typing-functional-components const FComponent: FunctionalComponent<{ prop: string }> = (props, context) => ( <> -
+
This is a functional component with prop: {JSON.stringify(props)}
@@ -33,7 +33,6 @@ const FComponent: FunctionalComponent<{ prop: string }> = (props, context) => (
  • TS Enum Util
  • Some Page
  • 中文-页面.page.vue
  • -
  • Markdown Page
  • diff --git a/src/types/shims/unocss.ts b/src/types/shims/unocss.ts index 50665fd..3ef0f36 100644 --- a/src/types/shims/unocss.ts +++ b/src/types/shims/unocss.ts @@ -1,15 +1,19 @@ // 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 BasicAttributesFix = import('@unocss/preset-attributify').BasicAttributes | 'b'; -type AttributifyNames = - | `${Prefix}${BasicAttributesFix}` - | `${Prefix}${PseudoPrefix}:${BasicAttributes}`; +// type AttributifyNames = +// | `${Prefix}${BasicAttributesFix}` +// | `${Prefix}${PseudoPrefix}:${BasicAttributes}`; + +// declare module '@vue/runtime-dom' { +// interface HTMLAttributes extends Partial> {} +// } declare module '@vue/runtime-dom' { - interface HTMLAttributes extends Partial> {} + interface HTMLAttributes + extends Partial> {} } export {};