Skip to content

Commit

Permalink
fix: 修复form按模块打包symbol造成inject token不一致问题 (#1785)
Browse files Browse the repository at this point in the history
* fix: 修复form按模块打包symbol造成inject token不一致问题

* fix: 修复form按模块打包symbol造成inject token不一致问题

* chore: update package.json
  • Loading branch information
GreatZPP authored Jan 16, 2024
1 parent 092a6ca commit f85fd87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ export interface UseFormItemRule {
_rules: ComputedRef<FormRuleItem[]>;
}

export const FORM_ITEM_TOKEN: InjectionKey<FormItemContext> = Symbol('dFormItem');
export const LABEL_DATA: InjectionKey<LabelData> = Symbol('labelData');
export const FORM_ITEM_TOKEN = 'dFormItem';
export const LABEL_DATA = 'dFormLabelData';
4 changes: 2 additions & 2 deletions packages/devui-vue/devui/form/src/form-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ export interface FormContext extends FormProps {
removeItemContext: (field: FormItemContext) => void;
}

export const FORM_TOKEN: InjectionKey<FormContext> = Symbol('dForm');
export const FORM_TOKEN = 'dForm';

export const STYLE_TOKEN: InjectionKey<StyleType> = Symbol('dForm');
export const STYLE_TOKEN = 'dFormStyle';

export interface DValidateResult<E = never, F = never> {
errors: E;
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit f85fd87

Please sign in to comment.