From f85fd8739b282dad64a696703df916e226863b49 Mon Sep 17 00:00:00 2001 From: GreatZP Date: Tue, 16 Jan 2024 18:19:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dform=E6=8C=89=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=89=93=E5=8C=85symbol=E9=80=A0=E6=88=90inject=20tok?= =?UTF-8?q?en=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98=20(#1785)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复form按模块打包symbol造成inject token不一致问题 * fix: 修复form按模块打包symbol造成inject token不一致问题 * chore: update package.json --- .../devui/form/src/components/form-item/form-item-types.ts | 4 ++-- packages/devui-vue/devui/form/src/form-types.ts | 4 ++-- packages/devui-vue/package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/devui-vue/devui/form/src/components/form-item/form-item-types.ts b/packages/devui-vue/devui/form/src/components/form-item/form-item-types.ts index 4e340cccac..fcb1d898ce 100644 --- a/packages/devui-vue/devui/form/src/components/form-item/form-item-types.ts +++ b/packages/devui-vue/devui/form/src/components/form-item/form-item-types.ts @@ -107,5 +107,5 @@ export interface UseFormItemRule { _rules: ComputedRef; } -export const FORM_ITEM_TOKEN: InjectionKey = Symbol('dFormItem'); -export const LABEL_DATA: InjectionKey = Symbol('labelData'); +export const FORM_ITEM_TOKEN = 'dFormItem'; +export const LABEL_DATA = 'dFormLabelData'; diff --git a/packages/devui-vue/devui/form/src/form-types.ts b/packages/devui-vue/devui/form/src/form-types.ts index ddd8a9d105..5e87bd5de7 100644 --- a/packages/devui-vue/devui/form/src/form-types.ts +++ b/packages/devui-vue/devui/form/src/form-types.ts @@ -101,9 +101,9 @@ export interface FormContext extends FormProps { removeItemContext: (field: FormItemContext) => void; } -export const FORM_TOKEN: InjectionKey = Symbol('dForm'); +export const FORM_TOKEN = 'dForm'; -export const STYLE_TOKEN: InjectionKey = Symbol('dForm'); +export const STYLE_TOKEN = 'dFormStyle'; export interface DValidateResult { errors: E; diff --git a/packages/devui-vue/package.json b/packages/devui-vue/package.json index 79505c520e..16ee8734b3 100644 --- a/packages/devui-vue/package.json +++ b/packages/devui-vue/package.json @@ -1,6 +1,6 @@ { "name": "vue-devui", - "version": "1.6.2", + "version": "1.6.3", "license": "MIT", "description": "DevUI components based on Vite and Vue3", "keywords": [