This commit is contained in:
dap
2026-02-03 10:15:43 +08:00
20 changed files with 79 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ runs:
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: 'pnpm'

View File

@@ -30,7 +30,7 @@ jobs:
- windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

View File

@@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

View File

@@ -28,7 +28,7 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@@ -67,7 +67,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@@ -90,7 +90,7 @@ jobs:
- windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

View File

@@ -57,7 +57,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@@ -129,7 +129,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

View File

@@ -19,15 +19,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
node-version: [22]
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
# - name: Checkout code
# uses: actions/checkout@v4
# uses: actions/checkout@v6
# with:
# fetch-depth: 0

View File

@@ -1 +1 @@
22.1.0
22.22.0

View File

@@ -181,7 +181,8 @@
"markdown",
"json",
"jsonc",
"json5"
"json5",
"yaml"
],
"tailwindCSS.experimental.classRegex": [

View File

@@ -95,5 +95,5 @@
"node": ">=20.19.0",
"pnpm": ">=10.0.0"
},
"packageManager": "pnpm@10.28.1"
"packageManager": "pnpm@10.28.2"
}

View File

@@ -6,12 +6,30 @@ import type {
import { computed, ref, watch } from 'vue';
import { isBoolean, isFunction } from '@vben-core/shared/utils';
import { get, isBoolean, isFunction } from '@vben-core/shared/utils';
import { useFormValues } from 'vee-validate';
import { injectRenderFormProps } from './context';
/**
* 解析Nested Objects对应的字段值
* @param values 表单值
* @param fieldName 字段名
*/
function resolveValueByFieldName(
values: Record<string, any>,
fieldName: string,
) {
// vee-validate[] 表示禁用嵌套
if (fieldName.startsWith('[') && fieldName.endsWith(']')) {
const rawKey = fieldName.slice(1, -1);
return values[rawKey];
}
return get(values, fieldName);
}
export default function useDependencies(
getDependencies: () => FormItemDependencies | undefined,
) {
@@ -37,7 +55,7 @@ export default function useDependencies(
// 该字段可能会被多个字段触发
const triggerFields = getDependencies()?.triggerFields ?? [];
return triggerFields.map((dep) => {
return values.value[dep];
return resolveValueByFieldName(values.value, dep);
});
});

View File

@@ -53,6 +53,7 @@ const wrapperClass = computed(() => {
provideFormRenderProps(props);
// @ts-expect-error unused
const { isCalculated, keepFormItemIndex, wrapperRef } = useExpandable(props);
const shapes = computed(() => {

View File

@@ -26,8 +26,8 @@ interface Props {
const props = withDefaults(defineProps<Props>(), {});
const { contentElement: _contentElement, overlayStyle } =
useLayoutContentStyle();
// @ts-expect-error unused
const { contentElement, overlayStyle } = useLayoutContentStyle();
const style = computed((): CSSProperties => {
const {
@@ -56,11 +56,7 @@ const style = computed((): CSSProperties => {
</script>
<template>
<main
ref="_contentElement"
:style="style"
class="relative bg-background-deep"
>
<main ref="contentElement" :style="style" class="relative bg-background-deep">
<Slot :style="overlayStyle">
<slot name="overlay"></slot>
</Slot>

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { CSSProperties } from 'vue';
import { computed, useSlots, watchEffect } from 'vue';
import { computed, shallowRef, useSlots, watchEffect } from 'vue';
import { VbenScrollbar } from '@vben-core/shadcn-ui';
@@ -114,7 +114,8 @@ const extraVisible = defineModel<boolean>('extraVisible');
const isLocked = useScrollLock(document.body);
const slots = useSlots();
// const asideRef = shallowRef<HTMLDivElement | null>();
// @ts-expect-error unused
const asideRef = shallowRef<HTMLDivElement | null>();
const hiddenSideStyle = computed((): CSSProperties => calcMenuWidthStyle(true));
@@ -290,6 +291,7 @@ function handleMouseleave() {
/>
<div
v-if="isSidebarMixed"
ref="asideRef"
:class="{
'border-l': extraVisible,
}"

View File

@@ -54,7 +54,8 @@ const components = globalShareState.getComponents();
const id = useId();
provide('DISMISSABLE_DRAWER_ID', id);
// const wrapperRef = ref<HTMLElement>();
// @ts-expect-error unused
const wrapperRef = ref<HTMLElement>();
const { $t } = useSimpleLocale();
const { isMobile } = useIsMobile();
@@ -281,6 +282,7 @@ const getForceMount = computed(() => {
</VisuallyHidden>
</template>
<div
ref="wrapperRef"
:class="
cn('relative flex-1 overflow-y-auto p-3', contentClass, {
'pointer-events-none': showLoading || submitting,

View File

@@ -50,10 +50,12 @@ const props = withDefaults(defineProps<Props>(), {
const components = globalShareState.getComponents();
const contentRef = ref();
// const wrapperRef = ref<HTMLElement>();
// @ts-expect-error unused
const wrapperRef = ref<HTMLElement>();
const dialogRef = ref();
const headerRef = ref();
// const footerRef = ref();
// @ts-expect-error unused
const footerRef = ref();
const id = useId();
@@ -306,6 +308,7 @@ function handleClosed() {
</VisuallyHidden>
</DialogHeader>
<div
ref="wrapperRef"
:class="
cn('relative min-h-40 flex-1 overflow-y-auto p-3', contentClass, {
'pointer-events-none': showLoading || submitting,
@@ -325,6 +328,7 @@ function handleClosed() {
</VbenIconButton>
<DialogFooter
ref="footerRef"
v-if="showFooter"
:class="
cn(

View File

@@ -97,6 +97,7 @@ export function useVbenModal<TParentModalProps extends ModalProps = ModalProps>(
mergedOptions.onClosed = () => {
onClosed?.();
if (mergedOptions.destroyOnClose) {
injectData.consumed = false;
injectData.reCreateModal?.();
}
};

View File

@@ -3,7 +3,7 @@ import type { TabDefinition } from '@vben-core/typings';
import type { TabConfig, TabsProps } from '../../types';
import { computed } from 'vue';
import { computed, ref } from 'vue';
import { Pin, X } from '@vben-core/icons';
import { VbenContextMenu, VbenIcon } from '@vben-core/shadcn-ui';
@@ -28,8 +28,10 @@ const emit = defineEmits<{
}>();
const active = defineModel<string>('active');
// const contentRef = ref();
// const tabRef = ref();
// @ts-expect-error unused
const contentRef = ref();
// @ts-expect-error unused
const tabRef = ref();
const style = computed(() => {
const { gap } = props;
@@ -73,6 +75,7 @@ function onMouseDown(e: MouseEvent, tab: TabConfig) {
<template>
<div
ref="contentRef"
:class="contentClass"
:style="style"
class="tabs-chrome !flex h-full w-max overflow-y-hidden pr-6"
@@ -81,6 +84,7 @@ function onMouseDown(e: MouseEvent, tab: TabConfig) {
<div
v-for="(tab, i) in tabsView"
:key="tab.key"
ref="tabRef"
:class="[
{
'is-active': tab.key === active,

View File

@@ -29,7 +29,8 @@ const forward = useForwardPropsEmits(props, emit);
const {
handleScrollAt,
handleWheel,
scrollbarRef: _scrollbarRef,
// @ts-expect-error unused
scrollbarRef,
scrollDirection,
scrollIsAtLeft,
scrollIsAtRight,
@@ -69,7 +70,7 @@ useTabsDrag(props, emit);
class="size-full flex-1 overflow-hidden"
>
<VbenScrollbar
ref="_scrollbarRef"
ref="scrollbarRef"
:shadow-bottom="false"
:shadow-top="false"
class="h-full"

View File

@@ -33,7 +33,7 @@ catalog:
'@ctrl/tinycolor': ^4.2.0
'@eslint/js': ^9.39.2
'@faker-js/faker': ^9.9.0
'@iconify/json': ^2.2.431
'@iconify/json': ^2.2.432
'@iconify/tailwind': ^1.2.0
'@iconify/vue': ^5.0.0
'@intlify/core-base': ^11.2.8
@@ -46,7 +46,7 @@ catalog:
'@stylistic/stylelint-plugin': ^4.0.1
'@tailwindcss/nesting': 0.0.0-insiders.565cd3e
'@tailwindcss/typography': ^0.5.19
'@tanstack/vue-query': ^5.92.8
'@tanstack/vue-query': ^5.92.9
'@tanstack/vue-store': ^0.8.0
'@types/archiver': ^6.0.4
'@types/eslint': ^9.6.1
@@ -60,8 +60,8 @@ catalog:
'@types/qrcode': ^1.5.6
'@types/qs': ^6.14.0
'@types/sortablejs': ^1.15.9
'@typescript-eslint/eslint-plugin': ^8.53.1
'@typescript-eslint/parser': ^8.53.1
'@typescript-eslint/eslint-plugin': ^8.54.0
'@typescript-eslint/parser': ^8.54.0
'@vee-validate/zod': ^4.15.1
'@vite-pwa/vitepress': ^1.1.0
'@vitejs/plugin-vue': ^6.0.3
@@ -74,18 +74,18 @@ catalog:
ant-design-vue: ^4.2.6
archiver: ^7.0.1
autoprefixer: ^10.4.23
axios: ^1.13.2
axios: ^1.13.4
axios-mock-adapter: ^2.1.0
cac: ^6.7.14
chalk: ^5.6.2
cheerio: ^1.1.2
cheerio: ^1.2.0
circular-dependency-scanner: ^2.3.0
class-variance-authority: ^0.7.1
clsx: ^2.1.1
commitlint-plugin-function-rules: ^4.3.1
consola: ^3.4.2
cross-env: ^10.1.0
cspell: ^9.6.0
cspell: ^9.6.2
cssnano: ^7.1.2
cz-git: ^1.12.0
czg: ^1.12.0
@@ -98,7 +98,7 @@ catalog:
es-toolkit: ^1.44.0
esbuild: ^0.25.12
eslint: ^9.39.2
eslint-config-turbo: ^2.7.5
eslint-config-turbo: ^2.7.6
eslint-plugin-command: ^3.4.0
eslint-plugin-eslint-comments: ^3.2.0
eslint-plugin-import-x: ^4.16.1
@@ -127,7 +127,7 @@ catalog:
json-bigint: ^1.0.0
jsonc-eslint-parser: ^2.4.2
jsonwebtoken: ^9.0.3
lefthook: ^2.0.15
lefthook: ^2.0.16
lodash.clonedeep: ^4.5.0
lucide-vue-next: ^0.553.0
medium-zoom: ^1.1.0
@@ -153,7 +153,7 @@ catalog:
reka-ui: ^2.7.0
resolve.exports: ^2.0.3
rimraf: ^6.1.2
rollup: ^4.56.0
rollup: ^4.57.0
rollup-plugin-visualizer: ^5.14.0
sass: ^1.97.3
secure-ls: ^2.0.0
@@ -194,8 +194,8 @@ catalog:
vue-json-viewer: ^3.0.4
vue-router: ^4.6.4
vue-tippy: ^6.7.1
vue-tsc: ^3.2.3
vxe-pc-ui: ^4.12.10
vue-tsc: ^3.2.4
vxe-pc-ui: ^4.12.16
vxe-table: ^4.17.46
watermark-js-plus: ^1.6.3
yaml-eslint-parser: ^1.3.2