Forráskód Böngészése

fix: #7140 (#7153)

* chore: add yaml eslint validate

* chore: update deps

* fix: unused ts lint

* fix: 弹窗只能点击一次 #7140

* chore: update actions/checkout v6

* chore: update node version v22.22.0
xingyu 4 hónapja
szülő
commit
7680b33b99

+ 1 - 1
.github/actions/setup-node/action.yml

@@ -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'

+ 1 - 1
.github/workflows/build.yml

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

+ 1 - 1
.github/workflows/changeset-version.yml

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

+ 3 - 3
.github/workflows/ci.yml

@@ -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
 

+ 1 - 1
.github/workflows/codeql.yml

@@ -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

+ 5 - 5
.github/workflows/deploy.yml

@@ -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
 

+ 3 - 3
.github/workflows/release-tag.yml

@@ -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
 

+ 1 - 1
.node-version

@@ -1 +1 @@
-22.1.0
+22.22.0

+ 2 - 1
.vscode/settings.json

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

+ 1 - 1
package.json

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

+ 1 - 0
packages/@core/ui-kit/form-ui/src/form-render/form.vue

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

+ 3 - 7
packages/@core/ui-kit/layout-ui/src/components/layout-content.vue

@@ -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>

+ 4 - 2
packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue

@@ -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,
       }"

+ 3 - 1
packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue

@@ -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,

+ 6 - 2
packages/@core/ui-kit/popup-ui/src/modal/modal.vue

@@ -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(

+ 1 - 0
packages/@core/ui-kit/popup-ui/src/modal/use-modal.ts

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

+ 7 - 3
packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue

@@ -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,

+ 3 - 2
packages/@core/ui-kit/tabs-ui/src/tabs-view.vue

@@ -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"

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 223 - 216
pnpm-lock.yaml


+ 12 - 12
pnpm-workspace.yaml

@@ -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

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott