Browse Source

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
dependabot/npm_and_yarn/vitest-4.0.18
xingyu 1 week ago
committed by GitHub
parent
commit
7680b33b99
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .github/actions/setup-node/action.yml
  2. 2
      .github/workflows/build.yml
  3. 2
      .github/workflows/changeset-version.yml
  4. 6
      .github/workflows/ci.yml
  5. 2
      .github/workflows/codeql.yml
  6. 10
      .github/workflows/deploy.yml
  7. 6
      .github/workflows/release-tag.yml
  8. 2
      .node-version
  9. 3
      .vscode/settings.json
  10. 2
      package.json
  11. 1
      packages/@core/ui-kit/form-ui/src/form-render/form.vue
  12. 10
      packages/@core/ui-kit/layout-ui/src/components/layout-content.vue
  13. 6
      packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue
  14. 4
      packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue
  15. 8
      packages/@core/ui-kit/popup-ui/src/modal/modal.vue
  16. 1
      packages/@core/ui-kit/popup-ui/src/modal/use-modal.ts
  17. 10
      packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue
  18. 5
      packages/@core/ui-kit/tabs-ui/src/tabs-view.vue
  19. 1051
      pnpm-lock.yaml
  20. 24
      pnpm-workspace.yaml

2
.github/actions/setup-node/action.yml

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

2
.github/workflows/build.yml

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

2
.github/workflows/changeset-version.yml

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

6
.github/workflows/ci.yml

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

2
.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 # 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: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

10
.github/workflows/deploy.yml

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

6
.github/workflows/release-tag.yml

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

2
.node-version

@ -1 +1 @@
22.1.0 22.22.0

3
.vscode/settings.json

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

2
package.json

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

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

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

10
packages/@core/ui-kit/layout-ui/src/components/layout-content.vue

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

6
packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue

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

4
packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue

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

8
packages/@core/ui-kit/popup-ui/src/modal/modal.vue

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

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

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

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

5
packages/@core/ui-kit/tabs-ui/src/tabs-view.vue

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

1051
pnpm-lock.yaml

File diff suppressed because it is too large

24
pnpm-workspace.yaml

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

Loading…
Cancel
Save