mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-04-23 00:38:34 +08:00
chore: fix lint && typecheck
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
export type { ECOption } from './types';
|
||||
|
||||
import { BarChart, LineChart, PieChart, RadarChart } from "echarts/charts";
|
||||
import { BarChart, LineChart, PieChart, RadarChart } from 'echarts/charts';
|
||||
import {
|
||||
DatasetComponent,
|
||||
GridComponent,
|
||||
@@ -8,12 +6,15 @@ import {
|
||||
TitleComponent,
|
||||
ToolboxComponent,
|
||||
TooltipComponent,
|
||||
TransformComponent
|
||||
} from "echarts/components";
|
||||
import * as echarts from "echarts/core";
|
||||
import { LabelLayout, LegacyGridContainLabel, UniversalTransition } from "echarts/features";
|
||||
import { CanvasRenderer } from "echarts/renderers";
|
||||
|
||||
TransformComponent,
|
||||
} from 'echarts/components';
|
||||
import * as echarts from 'echarts/core';
|
||||
import {
|
||||
LabelLayout,
|
||||
LegacyGridContainLabel,
|
||||
UniversalTransition,
|
||||
} from 'echarts/features';
|
||||
import { CanvasRenderer } from 'echarts/renderers';
|
||||
|
||||
echarts.use([
|
||||
TitleComponent,
|
||||
@@ -32,5 +33,6 @@ echarts.use([
|
||||
LegendComponent,
|
||||
ToolboxComponent,
|
||||
]);
|
||||
export type { ECOption } from './types';
|
||||
|
||||
export default echarts;
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
## 导出
|
||||
|
||||
| 导出 | 类型 | 说明 |
|
||||
|------|------|------|
|
||||
| `Motion` | 组件 | 动画组件 |
|
||||
| `MotionGroup` | 组件 | 动画组组件 |
|
||||
| `MotionDirective` | 指令 | 动画指令 |
|
||||
| `MotionPlugin` | 插件 | Vue 插件 |
|
||||
| 导出 | 类型 | 说明 |
|
||||
| ----------------- | ---- | ---------- |
|
||||
| `Motion` | 组件 | 动画组件 |
|
||||
| `MotionGroup` | 组件 | 动画组组件 |
|
||||
| `MotionDirective` | 指令 | 动画指令 |
|
||||
| `MotionPlugin` | 插件 | Vue 插件 |
|
||||
|
||||
## 使用
|
||||
|
||||
@@ -23,4 +23,4 @@ app.use(MotionPlugin);
|
||||
|
||||
```ts
|
||||
import type { MotionOptions, MotionVariants } from '@vben/plugins/motion';
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { VbenPluginsOptions } from "./types";
|
||||
import type { VbenPluginsOptions } from './types';
|
||||
|
||||
let globalPluginsOptions: VbenPluginsOptions | null = null;
|
||||
let globalPluginsOptions: null | VbenPluginsOptions = null;
|
||||
|
||||
export function providePluginsOptions(options: VbenPluginsOptions) {
|
||||
if (!globalPluginsOptions) {
|
||||
@@ -11,15 +11,18 @@ export function providePluginsOptions(options: VbenPluginsOptions) {
|
||||
globalPluginsOptions = {
|
||||
...globalPluginsOptions,
|
||||
...options,
|
||||
form: globalPluginsOptions.form && options.form
|
||||
? { ...globalPluginsOptions.form, ...options.form }
|
||||
: globalPluginsOptions.form || options.form,
|
||||
modal: globalPluginsOptions.modal && options.modal
|
||||
? { ...globalPluginsOptions.modal, ...options.modal }
|
||||
: globalPluginsOptions.modal || options.modal,
|
||||
message: globalPluginsOptions.message && options.message
|
||||
? { ...globalPluginsOptions.message, ...options.message }
|
||||
: globalPluginsOptions.message || options.message,
|
||||
form:
|
||||
globalPluginsOptions.form && options.form
|
||||
? { ...globalPluginsOptions.form, ...options.form }
|
||||
: globalPluginsOptions.form || options.form,
|
||||
modal:
|
||||
globalPluginsOptions.modal && options.modal
|
||||
? { ...globalPluginsOptions.modal, ...options.modal }
|
||||
: globalPluginsOptions.modal || options.modal,
|
||||
message:
|
||||
globalPluginsOptions.message && options.message
|
||||
? { ...globalPluginsOptions.message, ...options.message }
|
||||
: globalPluginsOptions.message || options.message,
|
||||
components: {
|
||||
...globalPluginsOptions.components,
|
||||
...options.components,
|
||||
|
||||
@@ -4,20 +4,24 @@
|
||||
|
||||
## 导出
|
||||
|
||||
| 导出 | 类型 | 说明 |
|
||||
|------|------|------|
|
||||
| `setupVbenVxeTable` | 函数 | 初始化配置函数 |
|
||||
| `useVbenVxeGrid` | 函数 | 表格组合式函数 |
|
||||
| `VbenVxeGrid` | 组件 | 表格组件 |
|
||||
| `VxeTableGridColumns` | 类型 | 表格列类型 |
|
||||
| `VxeTableGridOptions` | 类型 | 表格配置类型 |
|
||||
| `VxeGridProps` | 类型 | 表格 Props |
|
||||
| `VxeGridListeners` | 类型 | 表格事件类型 |
|
||||
| 导出 | 类型 | 说明 |
|
||||
| --------------------- | ---- | -------------- |
|
||||
| `setupVbenVxeTable` | 函数 | 初始化配置函数 |
|
||||
| `useVbenVxeGrid` | 函数 | 表格组合式函数 |
|
||||
| `VbenVxeGrid` | 组件 | 表格组件 |
|
||||
| `VxeTableGridColumns` | 类型 | 表格列类型 |
|
||||
| `VxeTableGridOptions` | 类型 | 表格配置类型 |
|
||||
| `VxeGridProps` | 类型 | 表格 Props |
|
||||
| `VxeGridListeners` | 类型 | 表格事件类型 |
|
||||
|
||||
## 使用
|
||||
|
||||
```ts
|
||||
import { setupVbenVxeTable, useVbenVxeGrid, VbenVxeGrid } from '@vben/plugins/vxe-table';
|
||||
import {
|
||||
setupVbenVxeTable,
|
||||
useVbenVxeGrid,
|
||||
VbenVxeGrid,
|
||||
} from '@vben/plugins/vxe-table';
|
||||
```
|
||||
|
||||
## 初始化
|
||||
@@ -39,5 +43,8 @@ setupVbenVxeTable({
|
||||
## 类型
|
||||
|
||||
```ts
|
||||
import type { VxeTableGridOptions, VxeGridProps } from '@vben/plugins/vxe-table';
|
||||
```
|
||||
import type {
|
||||
VxeTableGridOptions,
|
||||
VxeGridProps,
|
||||
} from '@vben/plugins/vxe-table';
|
||||
```
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { SetupVxeTable } from "./types";
|
||||
import type { SetupVxeTable } from './types';
|
||||
|
||||
import { defineComponent, watch } from "vue";
|
||||
import { defineComponent, watch } from 'vue';
|
||||
|
||||
import { usePreferences } from "@vben/preferences";
|
||||
|
||||
import { injectPluginsOptions } from "../plugins-context";
|
||||
import { usePreferences } from '@vben/preferences';
|
||||
|
||||
import {
|
||||
VxeButton,
|
||||
@@ -19,13 +17,20 @@ import {
|
||||
VxeSelect,
|
||||
VxeTooltip,
|
||||
VxeUI,
|
||||
VxeUpload
|
||||
} from "vxe-pc-ui";
|
||||
import enUS from "vxe-pc-ui/lib/language/en-US"; // 导入默认的语言
|
||||
import zhCN from "vxe-pc-ui/lib/language/zh-CN";
|
||||
import { VxeColgroup, VxeColumn, VxeGrid, VxeTable, VxeToolbar } from "vxe-table";
|
||||
VxeUpload,
|
||||
} from 'vxe-pc-ui';
|
||||
import enUS from 'vxe-pc-ui/lib/language/en-US'; // 导入默认的语言
|
||||
import zhCN from 'vxe-pc-ui/lib/language/zh-CN';
|
||||
import {
|
||||
VxeColgroup,
|
||||
VxeColumn,
|
||||
VxeGrid,
|
||||
VxeTable,
|
||||
VxeToolbar,
|
||||
} from 'vxe-table';
|
||||
|
||||
import { extendsDefaultFormatter } from "./extends"; // 是否加载过
|
||||
import { injectPluginsOptions } from '../plugins-context';
|
||||
import { extendsDefaultFormatter } from './extends'; // 是否加载过
|
||||
|
||||
// 是否加载过
|
||||
let isInit = false;
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import type {
|
||||
VxeGridListeners,
|
||||
VxeGridProps as VxeTableGridProps,
|
||||
VxeGridPropTypes,
|
||||
VxeUIExport
|
||||
} from "vxe-table";
|
||||
VxeGridProps as VxeTableGridProps,
|
||||
VxeUIExport,
|
||||
} from 'vxe-table';
|
||||
|
||||
import type { Ref } from "vue";
|
||||
import type { Ref } from 'vue';
|
||||
|
||||
import type { ClassType, DeepPartial } from "@vben/types";
|
||||
import type { ClassType, DeepPartial } from '@vben/types';
|
||||
|
||||
import type { BaseFormComponentType, VbenFormProps } from "@vben-core/form-ui";
|
||||
import { useVbenForm } from "@vben-core/form-ui";
|
||||
import type { BaseFormComponentType, VbenFormProps } from '@vben-core/form-ui';
|
||||
|
||||
import type { VxeGridApi } from "./api";
|
||||
import type { VxeGridApi } from './api';
|
||||
|
||||
import { useVbenForm } from '@vben-core/form-ui';
|
||||
|
||||
export interface VxePaginationInfo {
|
||||
currentPage: number;
|
||||
|
||||
@@ -331,7 +331,7 @@ async function init() {
|
||||
watch(
|
||||
formOptions,
|
||||
() => {
|
||||
formApi.setState((prev) => {
|
||||
formApi.setState((prev: Record<string, any>) => {
|
||||
const finalFormOptions: VbenFormProps = mergeWithArrayOverride(
|
||||
{},
|
||||
formOptions.value,
|
||||
|
||||
Reference in New Issue
Block a user