Skip to content

Commit

Permalink
fix: missing key modules
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Jun 24, 2024
1 parent 312dade commit 0f6da07
Show file tree
Hide file tree
Showing 71 changed files with 230 additions and 218 deletions.
13 changes: 8 additions & 5 deletions scripts/gen-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,18 @@ function processFile(filePath, moduleName) {
return { importLine, exportLine };
} else if (
filePath.endsWith('.ts') &&
!['components', 'layouts', 'views'].includes(moduleName) &&
// !['components', 'layouts', 'views'].includes(moduleName) &&
fileName !== INDEX_COMP_NAME
) {
let compName = fileName.replace('.ts', '');
compName += compName === 'export' ? '_' : '';

const importLine = `import ${compName} from '${relPath.replace('.ts', '')}';`;
let importLine;
if (compName.startsWith('use')) {
importLine = `import ${compName} from '${relPath.replace('.ts', '')}';`;
} else {
importLine = `import * as ${compName} from '${relPath.replace('.ts', '')}';`;
}
const exportLine = `${compName} as ${compName},`;
return { importLine, exportLine };
}
Expand Down Expand Up @@ -141,9 +146,7 @@ function genRootIndex() {
`export * from './src/utils';`,
`export * from './src/constants';`,
`export * from './src/layouts/content';`,
`export * from './src/components/form';`,
`export { default as useSpider } from './src/components/spider/spider';`,
`export { ClSpiderDetail } from './src/views';`,
`export * from './src/components/useForm';`,
`export { installer as default } from './src/package';`,
`export { default as useRequest } from './src/services/request';`,
];
Expand Down
15 changes: 0 additions & 15 deletions src/components/button/button.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/date/DateTimeRangePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ interface RangeItemOption extends SelectOption {
}
type RangeItemKey = 'custom' | string;
type RangeItemValue = RangeItemValueFunc | DateRange;
type RangeItemValueFunc = () => DateRange;
type RangePickerType = 'daterange' | 'datetimerange';
interface RangePickerProps {
Expand Down
2 changes: 0 additions & 2 deletions src/components/date/RangePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ interface RangeItemOption extends SelectOption {
}
type RangeItemKey = 'custom' | string;
type RangeItemValue = RangeItemValueFunc | DateRange;
type RangeItemValueFunc = () => DateRange;
type RangePickerType = 'daterange' | 'datetimerange';
interface RangePickerProps {
Expand Down
6 changes: 0 additions & 6 deletions src/components/date/date.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import {
RangeItemKey,
RangeItemOption,
RangeItemValue,
} from '@/components/date/RangePicker.vue';

export const getRangeItemOption = (
label: string,
key: RangeItemKey,
Expand Down
1 change: 0 additions & 1 deletion src/components/ds/DataSourceConnectType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
DATA_SOURCE_CONNECT_TYPE_HOSTS,
} from '@/constants/ds';
import { useI18n } from 'vue-i18n';
import { TagProps } from '@/components/tag/tag';
const props = defineProps<{
dataSource?: DataSource;
Expand Down
1 change: 0 additions & 1 deletion src/components/ds/DataSourceStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
DATA_SOURCE_STATUS_ONLINE,
} from '@/constants/ds';
import { useI18n } from 'vue-i18n';
import { TagProps } from '@/components/tag/tag';
const props = withDefaults(
defineProps<{
Expand Down
1 change: 0 additions & 1 deletion src/components/ds/DataSourceType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
DATA_SOURCE_TYPE_KAFKA,
} from '@/constants/ds';
import { useI18n } from 'vue-i18n';
import { TagProps } from '@/components/tag/tag';
const props = defineProps<{
dataSource?: DataSource;
Expand Down
6 changes: 3 additions & 3 deletions src/components/ds/useDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ const t = translate;
// form component data
const formComponentData = getDefaultFormComponentData<DataSource>();

export const useDataSource: any = (store: Store<RootStoreState>) => {
export const useDataSource = (store: Store<RootStoreState>) => {
// store
const ns = 'ds' as ListStoreNamespace;
const { ds: state } = store.state as RootStoreState;

// form rules
const formRules = readonly<FormRules>({});
const formRules: FormRules = {};

// type options
const typeOptions = readonly<SelectOption[]>([
Expand Down Expand Up @@ -77,7 +77,7 @@ export const useDataSource: any = (store: Store<RootStoreState>) => {
);

await store.dispatch(`${ns}/changePassword`, { id, password: value });
await ElMessage.success(t('common.message.success.save'));
ElMessage.success(t('common.message.success.save'));
};

// on connect type change
Expand Down
23 changes: 2 additions & 21 deletions src/components/filter/FilterCondition.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
<script setup lang="ts">
import { conditionTypesOptions } from '@/components/filter/filter';
defineOptions({ name: 'ClFilterCondition' });
import { conditionTypesOptions } from '@/components/filter/filter';
import { computed } from 'vue';
import {
FILTER_OP_CONTAINS,
FILTER_OP_EQUAL,
FILTER_OP_GREATER_THAN,
FILTER_OP_GREATER_THAN_EQUAL,
FILTER_OP_LESS_THAN,
FILTER_OP_LESS_THAN_EQUAL,
FILTER_OP_NOT_CONTAINS,
FILTER_OP_NOT_EQUAL,
FILTER_OP_NOT_SET,
FILTER_OP_REGEX,
} from '@/constants/filter';
import { plainClone } from '@/utils/object';
interface FilterConditionData {
key?: string;
op?: string;
value?: any;
}
import { FILTER_OP_NOT_SET } from '@/constants/filter';
const props = defineProps<{
condition?: FilterConditionData;
Expand Down
50 changes: 50 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ import ContextMenuList from './context-menu/ContextMenuList.vue';
import DateRangePicker from './date/DateRangePicker.vue';
import DateTimeRangePicker from './date/DateTimeRangePicker.vue';
import RangePicker from './date/RangePicker.vue';
import * as date from './date/date';
import ConfirmDialog from './dialog/ConfirmDialog.vue';
import CreateEditDialog from './dialog/CreateEditDialog.vue';
import Dialog from './dialog/Dialog.vue';
import DraggableItem from './drag/DraggableItem.vue';
import DraggableList from './drag/DraggableList.vue';
import * as drag from './drag/drag';
import CreateEditDataSourceDialog from './ds/CreateEditDataSourceDialog.vue';
import DataSourceConnectType from './ds/DataSourceConnectType.vue';
import DataSourceForm from './ds/DataSourceForm.vue';
import DataSourceStatus from './ds/DataSourceStatus.vue';
import DataSourceType from './ds/DataSourceType.vue';
import useDataSource from './ds/useDataSource';
import Empty from './empty/Empty.vue';
import ImgEmpty from './empty/ImgEmpty.vue';
import CreateEditEnvironmentDialog from './environment/CreateEditEnvironmentDialog.vue';
import EnvironmentForm from './environment/EnvironmentForm.vue';
import useEnvironment from './environment/useEnvironment';
import ExportForm from './export/ExportForm.vue';
import FileActions from './file/FileActions.vue';
import FileEditor from './file/FileEditor.vue';
Expand All @@ -38,13 +42,18 @@ import FileEditorSettingsDialog from './file/FileEditorSettingsDialog.vue';
import FileTab from './file/FileTab.vue';
import FileUpload from './file/FileUpload.vue';
import UploadFilesDialog from './file/UploadFilesDialog.vue';
import * as file from './file/file';
import * as fileEditorDropZone from './file/fileEditorDropZone';
import FilterCondition from './filter/FilterCondition.vue';
import FilterConditionList from './filter/FilterConditionList.vue';
import FilterInput from './filter/FilterInput.vue';
import FilterSelect from './filter/FilterSelect.vue';
import * as filter from './filter/filter';
import Form from './form/Form.vue';
import FormItem from './form/FormItem.vue';
import FormTableField from './form/FormTableField.vue';
import * as formTable from './form/formTable';
import useForm from './form/useForm';
import CreateEditGitDialog from './git/CreateEditGitDialog.vue';
import CreateGitBranchDialog from './git/CreateGitBranchDialog.vue';
import CreateGitSpiderDialog from './git/CreateGitSpiderDialog.vue';
Expand All @@ -53,9 +62,11 @@ import GitFileStatus from './git/GitFileStatus.vue';
import GitForm from './git/GitForm.vue';
import GitStatus from './git/GitStatus.vue';
import UploadGitFilesDialog from './git/UploadGitFilesDialog.vue';
import useGit from './git/useGit';
import AtomMaterialIcon from './icon/AtomMaterialIcon.vue';
import Icon from './icon/Icon.vue';
import MenuItemIcon from './icon/MenuItemIcon.vue';
import * as icon from './icon/icon';
import InputList from './input/InputList.vue';
import DetailTabList from './list/DetailTabList.vue';
import NavActionBack from './nav/NavActionBack.vue';
Expand All @@ -76,26 +87,32 @@ import NodeForm from './node/NodeForm.vue';
import NodeRunners from './node/NodeRunners.vue';
import NodeStatus from './node/NodeStatus.vue';
import NodeType from './node/NodeType.vue';
import useNode from './node/useNode';
import CreateEditNotificationDialog from './notification/CreateEditNotificationDialog.vue';
import NotificationForm from './notification/NotificationForm.vue';
import * as notification from './notification/notification';
import CreateEditProjectDialog from './project/CreateEditProjectDialog.vue';
import ProjectForm from './project/ProjectForm.vue';
import useProject from './project/useProject';
import ResultCell from './result/ResultCell.vue';
import ResultCellDialog from './result/ResultCellDialog.vue';
import ResultDedupFieldsDialog from './result/ResultDedupFieldsDialog.vue';
import CreateEditScheduleDialog from './schedule/CreateEditScheduleDialog.vue';
import ScheduleCron from './schedule/ScheduleCron.vue';
import ScheduleForm from './schedule/ScheduleForm.vue';
import useSchedule from './schedule/useSchedule';
import CreateEditSpiderDialog from './spider/CreateEditSpiderDialog.vue';
import RunSpiderDialog from './spider/RunSpiderDialog.vue';
import SpiderForm from './spider/SpiderForm.vue';
import SpiderStat from './spider/SpiderStat.vue';
import SpiderTag from './spider/SpiderTag.vue';
import SpiderType from './spider/SpiderType.vue';
import UploadSpiderFilesDialog from './spider/UploadSpiderFilesDialog.vue';
import useSpider from './spider/useSpider';
import Switch from './switch/Switch.vue';
import ActionTab from './tab/ActionTab.vue';
import Tab from './tab/Tab.vue';
import * as tab from './tab/tab';
import Table from './table/Table.vue';
import TableActions from './table/TableActions.vue';
import TableCell from './table/TableCell.vue';
Expand All @@ -105,6 +122,12 @@ import TableHeaderAction from './table/TableHeaderAction.vue';
import TableHeaderDialog from './table/TableHeaderDialog.vue';
import TableHeaderDialogFilter from './table/TableHeaderDialogFilter.vue';
import TableHeaderDialogSort from './table/TableHeaderDialogSort.vue';
import * as action from './table/action';
import * as column from './table/column';
import * as data from './table/data';
import * as header from './table/header';
import * as pagination from './table/pagination';
import * as store from './table/store';
import CheckTag from './tag/CheckTag.vue';
import CheckTagGroup from './tag/CheckTagGroup.vue';
import LinkTag from './tag/LinkTag.vue';
Expand All @@ -116,13 +139,15 @@ import TaskMode from './task/TaskMode.vue';
import TaskPriority from './task/TaskPriority.vue';
import TaskResults from './task/TaskResults.vue';
import TaskStatus from './task/TaskStatus.vue';
import useTask from './task/useTask';
import Duration from './time/Duration.vue';
import Time from './time/Time.vue';
import Transfer from './transfer/Transfer.vue';
import TransferPanel from './transfer/TransferPanel.vue';
import CreateEditUserDialog from './user/CreateEditUserDialog.vue';
import UserForm from './user/UserForm.vue';
import UserRole from './user/UserRole.vue';
import useUser from './user/useUser';

export {
Button as ClButton,
Expand All @@ -138,20 +163,24 @@ export {
DateRangePicker as ClDateRangePicker,
DateTimeRangePicker as ClDateTimeRangePicker,
RangePicker as ClRangePicker,
date as date,
ConfirmDialog as ClConfirmDialog,
CreateEditDialog as ClCreateEditDialog,
Dialog as ClDialog,
DraggableItem as ClDraggableItem,
DraggableList as ClDraggableList,
drag as drag,
CreateEditDataSourceDialog as ClCreateEditDataSourceDialog,
DataSourceConnectType as ClDataSourceConnectType,
DataSourceForm as ClDataSourceForm,
DataSourceStatus as ClDataSourceStatus,
DataSourceType as ClDataSourceType,
useDataSource as useDataSource,
Empty as ClEmpty,
ImgEmpty as ClImgEmpty,
CreateEditEnvironmentDialog as ClCreateEditEnvironmentDialog,
EnvironmentForm as ClEnvironmentForm,
useEnvironment as useEnvironment,
ExportForm as ClExportForm,
FileActions as ClFileActions,
FileEditor as ClFileEditor,
Expand All @@ -165,13 +194,18 @@ export {
FileTab as ClFileTab,
FileUpload as ClFileUpload,
UploadFilesDialog as ClUploadFilesDialog,
file as file,
fileEditorDropZone as fileEditorDropZone,
FilterCondition as ClFilterCondition,
FilterConditionList as ClFilterConditionList,
FilterInput as ClFilterInput,
FilterSelect as ClFilterSelect,
filter as filter,
Form as ClForm,
FormItem as ClFormItem,
FormTableField as ClFormTableField,
formTable as formTable,
useForm as useForm,
CreateEditGitDialog as ClCreateEditGitDialog,
CreateGitBranchDialog as ClCreateGitBranchDialog,
CreateGitSpiderDialog as ClCreateGitSpiderDialog,
Expand All @@ -180,9 +214,11 @@ export {
GitForm as ClGitForm,
GitStatus as ClGitStatus,
UploadGitFilesDialog as ClUploadGitFilesDialog,
useGit as useGit,
AtomMaterialIcon as ClAtomMaterialIcon,
Icon as ClIcon,
MenuItemIcon as ClMenuItemIcon,
icon as icon,
InputList as ClInputList,
DetailTabList as ClDetailTabList,
NavActionBack as ClNavActionBack,
Expand All @@ -203,26 +239,32 @@ export {
NodeRunners as ClNodeRunners,
NodeStatus as ClNodeStatus,
NodeType as ClNodeType,
useNode as useNode,
CreateEditNotificationDialog as ClCreateEditNotificationDialog,
NotificationForm as ClNotificationForm,
notification as notification,
CreateEditProjectDialog as ClCreateEditProjectDialog,
ProjectForm as ClProjectForm,
useProject as useProject,
ResultCell as ClResultCell,
ResultCellDialog as ClResultCellDialog,
ResultDedupFieldsDialog as ClResultDedupFieldsDialog,
CreateEditScheduleDialog as ClCreateEditScheduleDialog,
ScheduleCron as ClScheduleCron,
ScheduleForm as ClScheduleForm,
useSchedule as useSchedule,
CreateEditSpiderDialog as ClCreateEditSpiderDialog,
RunSpiderDialog as ClRunSpiderDialog,
SpiderForm as ClSpiderForm,
SpiderStat as ClSpiderStat,
SpiderTag as ClSpiderTag,
SpiderType as ClSpiderType,
UploadSpiderFilesDialog as ClUploadSpiderFilesDialog,
useSpider as useSpider,
Switch as ClSwitch,
ActionTab as ClActionTab,
Tab as ClTab,
tab as tab,
Table as ClTable,
TableActions as ClTableActions,
TableCell as ClTableCell,
Expand All @@ -232,6 +274,12 @@ export {
TableHeaderDialog as ClTableHeaderDialog,
TableHeaderDialogFilter as ClTableHeaderDialogFilter,
TableHeaderDialogSort as ClTableHeaderDialogSort,
action as action,
column as column,
data as data,
header as header,
pagination as pagination,
store as store,
CheckTag as ClCheckTag,
CheckTagGroup as ClCheckTagGroup,
LinkTag as ClLinkTag,
Expand All @@ -243,11 +291,13 @@ export {
TaskPriority as ClTaskPriority,
TaskResults as ClTaskResults,
TaskStatus as ClTaskStatus,
useTask as useTask,
Duration as ClDuration,
Time as ClTime,
Transfer as ClTransfer,
TransferPanel as ClTransferPanel,
CreateEditUserDialog as ClCreateEditUserDialog,
UserForm as ClUserForm,
UserRole as ClUserRole,
useUser as useUser,
};
2 changes: 1 addition & 1 deletion src/components/node/CreateEditNodeDialog.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
defineOptions({ name: 'ClCreateEditNodeDialog' });
import { useStore } from 'vuex';
import useNode from '@/components/node/node';
import useNode from '@/components/node/useNode';
// store
const store = useStore();
Expand Down
Loading

0 comments on commit 0f6da07

Please sign in to comment.