fix(lint): pnpm format lint warning (#7080)

This commit is contained in:
ppxb
2026-01-10 14:06:03 +08:00
committed by GitHub
parent 24d20ca9ee
commit 51bca25345
9 changed files with 22 additions and 24 deletions

View File

@@ -3,6 +3,8 @@
* 可用于 vben-form、vben-modal、vben-drawer 等组件使用, * 可用于 vben-form、vben-modal、vben-drawer 等组件使用,
*/ */
/* eslint-disable vue/one-component-per-file */
import type { import type {
UploadChangeParam, UploadChangeParam,
UploadFile, UploadFile,

View File

@@ -29,9 +29,8 @@ describe('useSortable', () => {
await initializeSortable(); await initializeSortable();
// Import sortablejs to access the mocked create function // Import sortablejs to access the mocked create function
const Sortable = await import( const Sortable =
'sortablejs/modular/sortable.complete.esm.js' await import('sortablejs/modular/sortable.complete.esm.js');
);
// Verify that Sortable.create was called with the correct parameters // Verify that Sortable.create was called with the correct parameters
expect(Sortable.default.create).toHaveBeenCalledTimes(1); expect(Sortable.default.create).toHaveBeenCalledTimes(1);

View File

@@ -63,8 +63,9 @@ class PreferenceManager {
/** /**
* 初始化偏好设置 * 初始化偏好设置
* @param namespace - 命名空间,用于隔离不同应用的配置 * @param options - 初始化配置
* @param overrides - 要覆盖的偏好设 * @param options.namespace - 命名空间,用于隔离不同应用的配
* @param options.overrides - 要覆盖的偏好设置
*/ */
initPreferences = async ({ namespace, overrides }: InitialOptions) => { initPreferences = async ({ namespace, overrides }: InitialOptions) => {
// 防止重复初始化 // 防止重复初始化

View File

@@ -350,9 +350,9 @@ export interface ActionButtonOptions extends VbenButtonProps {
export interface VbenFormProps< export interface VbenFormProps<
T extends BaseFormComponentType = BaseFormComponentType, T extends BaseFormComponentType = BaseFormComponentType,
> extends Omit< > extends Omit<
FormRenderProps<T>, FormRenderProps<T>,
'componentBindEventMap' | 'componentMap' | 'form' 'componentBindEventMap' | 'componentMap' | 'form'
> { > {
/** /**
* 操作按钮是否反转(提交按钮前置) * 操作按钮是否反转(提交按钮前置)
*/ */

View File

@@ -27,8 +27,10 @@ export type CustomRenderType = (() => Component | string) | string;
export type ValueType = boolean | number | string; export type ValueType = boolean | number | string;
export interface VbenButtonGroupProps export interface VbenButtonGroupProps extends Pick<
extends Pick<VbenButtonProps, 'disabled'> { VbenButtonProps,
'disabled'
> {
/** 单选模式下允许清除选中 */ /** 单选模式下允许清除选中 */
allowClear?: boolean; allowClear?: boolean;
/** 值改变前的回调 */ /** 值改变前的回调 */

View File

@@ -54,8 +54,7 @@ export interface PointSelectionCaptchaCardProps {
width?: number | string; width?: number | string;
} }
export interface PointSelectionCaptchaProps export interface PointSelectionCaptchaProps extends PointSelectionCaptchaCardProps {
extends PointSelectionCaptchaCardProps {
/** /**
* 是否展示确定按钮 * 是否展示确定按钮
* @default false * @default false

View File

@@ -3,6 +3,8 @@
* 可用于 vben-form、vben-modal、vben-drawer 等组件使用, * 可用于 vben-form、vben-modal、vben-drawer 等组件使用,
*/ */
/* eslint-disable vue/one-component-per-file */
import type { import type {
UploadChangeParam, UploadChangeParam,
UploadFile, UploadFile,

View File

@@ -157,9 +157,7 @@ const routes: RouteRecordRaw[] = [
name: 'HideChildrenInMenuDemo', name: 'HideChildrenInMenuDemo',
path: '', path: '',
component: () => component: () =>
import( import('#/views/demos/features/hide-menu-children/parent.vue'),
'#/views/demos/features/hide-menu-children/parent.vue'
),
meta: { meta: {
// hideInMenu: true, // hideInMenu: true,
title: $t('demos.features.hideChildrenInMenu'), title: $t('demos.features.hideChildrenInMenu'),
@@ -169,9 +167,7 @@ const routes: RouteRecordRaw[] = [
name: 'HideChildrenInMenuChildrenDemo', name: 'HideChildrenInMenuChildrenDemo',
path: '/demos/features/hide-menu-children/children', path: '/demos/features/hide-menu-children/children',
component: () => component: () =>
import( import('#/views/demos/features/hide-menu-children/children.vue'),
'#/views/demos/features/hide-menu-children/children.vue'
),
meta: { meta: {
activePath: '/demos/features/hide-menu-children', activePath: '/demos/features/hide-menu-children',
title: $t('demos.features.hideChildrenInMenu'), title: $t('demos.features.hideChildrenInMenu'),
@@ -247,9 +243,7 @@ const routes: RouteRecordRaw[] = [
name: 'RequestParamsSerializerDemo', name: 'RequestParamsSerializerDemo',
path: '/demos/features/request-params-serializer', path: '/demos/features/request-params-serializer',
component: () => component: () =>
import( import('#/views/demos/features/request-params-serializer/index.vue'),
'#/views/demos/features/request-params-serializer/index.vue'
),
meta: { meta: {
icon: 'lucide:git-pull-request-arrow', icon: 'lucide:git-pull-request-arrow',
title: $t('demos.features.requestParamsSerializer'), title: $t('demos.features.requestParamsSerializer'),

View File

@@ -43,15 +43,14 @@ const contextMenus = () => {
}, },
]; ];
}; };
</script> </script>
<template> <template>
<Page title="Context Menu 上下文菜单"> <Page title="Context Menu 上下文菜单">
<Card title="基本使用"> <Card title="基本使用">
<div>一共四个菜单刷新关闭当前关闭其他关闭所有</div> <div>一共四个菜单刷新关闭当前关闭其他关闭所有</div>
<br/> <br />
<br/> <br />
<VbenContextMenu :menus="contextMenus" :modal="true" item-class="pr-6"> <VbenContextMenu :menus="contextMenus" :modal="true" item-class="pr-6">
<Button> 右键点击我打开上下文菜单(有隐藏项) </Button> <Button> 右键点击我打开上下文菜单(有隐藏项) </Button>
</VbenContextMenu> </VbenContextMenu>