fix: code lint warn
parent
e702e4aba0
commit
29aa44c540
|
@ -4,6 +4,8 @@ import type { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface
|
||||||
|
|
||||||
import type { AxiosResponse } from '@vben/request';
|
import type { AxiosResponse } from '@vben/request';
|
||||||
|
|
||||||
|
import type { UploadListType } from './typing';
|
||||||
|
|
||||||
import type { AxiosProgressEvent } from '#/api/infra/file';
|
import type { AxiosProgressEvent } from '#/api/infra/file';
|
||||||
|
|
||||||
import { ref, toRefs, watch } from 'vue';
|
import { ref, toRefs, watch } from 'vue';
|
||||||
|
@ -30,7 +32,7 @@ const props = withDefaults(
|
||||||
) => Promise<AxiosResponse<any>>;
|
) => Promise<AxiosResponse<any>>;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
helpText?: string;
|
helpText?: string;
|
||||||
listType?: ListType;
|
listType?: UploadListType;
|
||||||
// 最大数量的文件,Infinity不限制
|
// 最大数量的文件,Infinity不限制
|
||||||
maxNumber?: number;
|
maxNumber?: number;
|
||||||
// 文件最大多少MB
|
// 文件最大多少MB
|
||||||
|
@ -58,7 +60,6 @@ const props = withDefaults(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const emit = defineEmits(['change', 'update:value', 'delete']);
|
const emit = defineEmits(['change', 'update:value', 'delete']);
|
||||||
type ListType = 'picture' | 'picture-card' | 'text';
|
|
||||||
const { accept, helpText, maxNumber, maxSize } = toRefs(props);
|
const { accept, helpText, maxNumber, maxSize } = toRefs(props);
|
||||||
const isInnerOperate = ref<boolean>(false);
|
const isInnerOperate = ref<boolean>(false);
|
||||||
const { getStringAccept } = useUploadType({
|
const { getStringAccept } = useUploadType({
|
||||||
|
|
|
@ -4,3 +4,5 @@ export enum UploadResultStatus {
|
||||||
SUCCESS = 'success',
|
SUCCESS = 'success',
|
||||||
UPLOADING = 'uploading',
|
UPLOADING = 'uploading',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type UploadListType = 'picture' | 'picture-card' | 'text';
|
||||||
|
|
|
@ -7,8 +7,8 @@ import {
|
||||||
import { resetStaticRoutes } from '@vben/utils';
|
import { resetStaticRoutes } from '@vben/utils';
|
||||||
|
|
||||||
import { createRouterGuard } from './guard';
|
import { createRouterGuard } from './guard';
|
||||||
import { setupBaiduTongJi } from './tongji';
|
|
||||||
import { routes } from './routes';
|
import { routes } from './routes';
|
||||||
|
import { setupBaiduTongJi } from './tongji';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @zh_CN 创建vue-router实例
|
* @zh_CN 创建vue-router实例
|
||||||
|
|
|
@ -92,7 +92,8 @@ const coreRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
name: 'SocialLogin',
|
name: 'SocialLogin',
|
||||||
path: 'social-login',
|
path: 'social-login',
|
||||||
component: () => import('#/views/_core/authentication/social-login.vue'),
|
component: () =>
|
||||||
|
import('#/views/_core/authentication/social-login.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: $t('page.auth.login'),
|
title: $t('page.auth.login'),
|
||||||
},
|
},
|
||||||
|
@ -104,7 +105,7 @@ const coreRoutes: RouteRecordRaw[] = [
|
||||||
meta: {
|
meta: {
|
||||||
title: $t('page.auth.login'),
|
title: $t('page.auth.login'),
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -44,4 +44,4 @@ const componentKeys: string[] = Object.keys(
|
||||||
const path = v.replace('../../views/', '/');
|
const path = v.replace('../../views/', '/');
|
||||||
return path.endsWith('.vue') ? path.slice(0, -4) : path;
|
return path.endsWith('.vue') ? path.slice(0, -4) : path;
|
||||||
});
|
});
|
||||||
export { accessRoutes, coreRouteNames, routes, componentKeys };
|
export { accessRoutes, componentKeys, coreRouteNames, routes };
|
||||||
|
|
|
@ -13,4 +13,4 @@ const routes: RouteRecordRaw[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default routes;
|
export default routes;
|
||||||
|
|
|
@ -149,7 +149,7 @@ const todoItems = ref<WorkbenchTodoItem[]>([
|
||||||
content: `国内使用最广泛的快速开发平台,远超 10w+ 企业使用`,
|
content: `国内使用最广泛的快速开发平台,远超 10w+ 企业使用`,
|
||||||
date: '2024-07-10 11:15:00',
|
date: '2024-07-10 11:15:00',
|
||||||
title: '广泛企业认可',
|
title: '广泛企业认可',
|
||||||
}
|
},
|
||||||
]);
|
]);
|
||||||
const trendItems: WorkbenchTrendItem[] = [
|
const trendItems: WorkbenchTrendItem[] = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,11 +6,12 @@ import type {
|
||||||
import type { InfraCodegenApi } from '#/api/infra/codegen';
|
import type { InfraCodegenApi } from '#/api/infra/codegen';
|
||||||
import type { InfraDataSourceConfigApi } from '#/api/infra/data-source-config';
|
import type { InfraDataSourceConfigApi } from '#/api/infra/data-source-config';
|
||||||
|
|
||||||
import { DocAlert } from '#/components/doc-alert';
|
import { ref } from 'vue';
|
||||||
import ImportTable from './modules/import-table.vue';
|
import { useRouter } from 'vue-router';
|
||||||
import PreviewCode from './modules/preview-code.vue';
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Plus } from '@vben/icons';
|
import { Plus } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message } from 'ant-design-vue';
|
import { Button, message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
|
@ -21,12 +22,12 @@ import {
|
||||||
syncCodegenFromDB,
|
syncCodegenFromDB,
|
||||||
} from '#/api/infra/codegen';
|
} from '#/api/infra/codegen';
|
||||||
import { getDataSourceConfigList } from '#/api/infra/data-source-config';
|
import { getDataSourceConfigList } from '#/api/infra/data-source-config';
|
||||||
|
import { DocAlert } from '#/components/doc-alert';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
import { useGridColumns, useGridFormSchema } from './data';
|
import { useGridColumns, useGridFormSchema } from './data';
|
||||||
|
import ImportTable from './modules/import-table.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import PreviewCode from './modules/preview-code.vue';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const dataSourceConfigList = ref<InfraDataSourceConfigApi.DataSourceConfig[]>(
|
const dataSourceConfigList = ref<InfraDataSourceConfigApi.DataSourceConfig[]>(
|
||||||
|
@ -139,14 +140,14 @@ function onActionClick({
|
||||||
row,
|
row,
|
||||||
}: OnActionClickParams<InfraCodegenApi.CodegenTable>) {
|
}: OnActionClickParams<InfraCodegenApi.CodegenTable>) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'edit': {
|
|
||||||
onEdit(row);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'delete': {
|
case 'delete': {
|
||||||
onDelete(row);
|
onDelete(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'edit': {
|
||||||
|
onEdit(row);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'generate': {
|
case 'generate': {
|
||||||
onGenerate(row);
|
onGenerate(row);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -196,7 +196,7 @@ export function useGridColumns<T = InfraJobApi.Job>(
|
||||||
text: '暂停',
|
text: '暂停',
|
||||||
show: (row: any) =>
|
show: (row: any) =>
|
||||||
hasAccessByCodes(['infra:job:update']) &&
|
hasAccessByCodes(['infra:job:update']) &&
|
||||||
row.status == InfraJobStatusEnum.NORMAL,
|
row.status === InfraJobStatusEnum.NORMAL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: 'trigger',
|
code: 'trigger',
|
||||||
|
|
|
@ -19,7 +19,7 @@ defineProps<{
|
||||||
{{ redisData?.info?.redis_version }}
|
{{ redisData?.info?.redis_version }}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="运行模式">
|
<Descriptions.Item label="运行模式">
|
||||||
{{ redisData?.info?.redis_mode == 'standalone' ? '单机' : '集群' }}
|
{{ redisData?.info?.redis_mode === 'standalone' ? '单机' : '集群' }}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="端口">
|
<Descriptions.Item label="端口">
|
||||||
{{ redisData?.info?.tcp_port }}
|
{{ redisData?.info?.tcp_port }}
|
||||||
|
@ -44,7 +44,7 @@ defineProps<{
|
||||||
{{ redisData?.info?.maxmemory_human }}
|
{{ redisData?.info?.maxmemory_human }}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="AOF 是否开启">
|
<Descriptions.Item label="AOF 是否开启">
|
||||||
{{ redisData?.info?.aof_enabled == '0' ? '否' : '是' }}
|
{{ redisData?.info?.aof_enabled === '0' ? '否' : '是' }}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="RDB 是否成功">
|
<Descriptions.Item label="RDB 是否成功">
|
||||||
{{ redisData?.info?.rdb_last_bgsave_status }}
|
{{ redisData?.info?.rdb_last_bgsave_status }}
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { SystemNotifyTemplateApi } from '#/api/system/notify/template';
|
import type { SystemNotifyTemplateApi } from '#/api/system/notify/template';
|
||||||
|
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
@ -11,7 +14,6 @@ import {
|
||||||
updateNotifyTemplate,
|
updateNotifyTemplate,
|
||||||
} from '#/api/system/notify/template';
|
} from '#/api/system/notify/template';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { computed, ref } from 'vue';
|
|
||||||
|
|
||||||
import { useFormSchema } from '../data';
|
import { useFormSchema } from '../data';
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { SystemNotifyTemplateApi } from '#/api/system/notify/template';
|
import type { SystemNotifyTemplateApi } from '#/api/system/notify/template';
|
||||||
|
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { sendNotify } from '#/api/system/notify/template';
|
import { sendNotify } from '#/api/system/notify/template';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
import { useSendNotifyFormSchema } from '../data';
|
import { useSendNotifyFormSchema } from '../data';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue