Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into warmflow

This commit is contained in:
dap 2025-01-10 16:39:14 +08:00
commit e57df4e522
3 changed files with 11 additions and 7 deletions

View File

@ -4,7 +4,7 @@ import type { ZodTypeAny } from 'zod';
import type { Component, HtmlHTMLAttributes, Ref } from 'vue';
import type { VbenButtonProps } from '@vben-core/shadcn-ui';
import type { ClassType, Nullable } from '@vben-core/typings';
import type { ClassType, MaybeComputedRef, Nullable } from '@vben-core/typings';
import type { FormApi } from './form-api';
@ -316,7 +316,7 @@ export interface FormRenderProps<
export interface ActionButtonOptions extends VbenButtonProps {
[key: string]: any;
content?: string;
content?: MaybeComputedRef<string>;
show?: boolean;
}

View File

@ -1,9 +1,12 @@
<script lang="ts" setup>
import type { MenuRecordRaw } from '@vben/types';
import type { SetupContext } from 'vue';
import type { MenuRecordRaw } from '@vben/types';
import { computed, useSlots, watch } from 'vue';
import { useRefresh } from '@vben/hooks';
import { $t } from '@vben/locales';
import { $t, i18n } from '@vben/locales';
import {
preferences,
updatePreferences,
@ -11,9 +14,9 @@ import {
} from '@vben/preferences';
import { useLockStore } from '@vben/stores';
import { cloneDeep, mapTree } from '@vben/utils';
import { VbenAdminLayout } from '@vben-core/layout-ui';
import { VbenBackTop, VbenLogo } from '@vben-core/shadcn-ui';
import { computed, useSlots, watch } from 'vue';
import { Breadcrumb, CheckUpdates, Preferences } from '../widgets';
import { LayoutContent, LayoutContentSpinner } from './content';
@ -160,7 +163,8 @@ watch(
);
//
watch(() => preferences.app.locale, refresh, { flush: 'post' });
// i18n.global.localepreference.app.localewatchpreference.app.locale
watch(i18n.global.locale, refresh, { flush: 'post' });
const slots: SetupContext['slots'] = useSlots();
const headerSlots = computed(() => {

View File

@ -92,7 +92,7 @@ const [Form, formApi] = useTableForm({
},
showCollapseButton: true,
submitButtonOptions: {
content: $t('common.query'),
content: computed(() => $t('common.search')),
},
// enter
submitOnEnter: true,