项目微调
引入按需自动导入插件,避免开发人员显示导入vue的函数
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
defineOptions({
|
||||
name: "App",
|
||||
});
|
||||
import { onMounted, reactive, computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { getBrowserLang } from "@/utils";
|
||||
import { useTheme } from "@/hooks/useTheme";
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, defineExpose } from "vue";
|
||||
const dialogVisible = ref<Boolean>(false);
|
||||
const dialogTitle = ref<string>("");
|
||||
const openDialog = (title: string) => {
|
||||
|
||||
@@ -333,7 +333,7 @@ defineExpose({
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .custom-table-header .el-table__header-wrapper .el-table__header{
|
||||
:deep(.custom-table-header .el-table__header-wrapper .el-table__header){
|
||||
background-color: red !important; /* 修改为你想要的颜色 */
|
||||
}
|
||||
</style>
|
||||
@@ -3,14 +3,6 @@
|
||||
<div class="pie" ref="chartsRef"></div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
defineProps,
|
||||
defineExpose,
|
||||
watch,
|
||||
onUnmounted,
|
||||
} from "vue";
|
||||
import * as echarts from "echarts";
|
||||
const chartsRef = ref();
|
||||
const props = defineProps({
|
||||
|
||||
1780
frontend/src/types/auto-imports.d.ts
vendored
Normal file
1780
frontend/src/types/auto-imports.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
74
frontend/src/types/components.d.ts
vendored
Normal file
74
frontend/src/types/components.d.ts
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
403: typeof import('../components/ErrorMessage/403.vue')['default']
|
||||
404: typeof import('../components/ErrorMessage/404.vue')['default']
|
||||
500: typeof import('../components/ErrorMessage/500.vue')['default']
|
||||
ColSetting: typeof import('../components/ProTable/components/ColSetting.vue')['default']
|
||||
Default: typeof import('../components/echarts/pie/default.vue')['default']
|
||||
Dialog: typeof import('../components/Dialog/index.vue')['default']
|
||||
ElAside: typeof import('element-plus/es')['ElAside']
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||
ElFooter: typeof import('element-plus/es')['ElFooter']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElMain: typeof import('element-plus/es')['ElMain']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSegmented: typeof import('element-plus/es')['ElSegmented']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
|
||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTree: typeof import('element-plus/es')['ElTree']
|
||||
Grid: typeof import('../components/Grid/index.vue')['default']
|
||||
GridItem: typeof import('../components/Grid/components/GridItem.vue')['default']
|
||||
ImportExcel: typeof import('../components/ImportExcel/index.vue')['default']
|
||||
Loading: typeof import('../components/Loading/index.vue')['default']
|
||||
Pagination: typeof import('../components/ProTable/components/Pagination.vue')['default']
|
||||
ProTable: typeof import('../components/ProTable/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SearchForm: typeof import('../components/SearchForm/index.vue')['default']
|
||||
SearchFormItem: typeof import('../components/SearchForm/components/SearchFormItem.vue')['default']
|
||||
SvgIcon: typeof import('../components/staticExtend/SvgIcon/src/SvgIcon.vue')['default']
|
||||
SwitchDark: typeof import('../components/SwitchDark/index.vue')['default']
|
||||
TableColumn: typeof import('../components/ProTable/components/TableColumn.vue')['default']
|
||||
}
|
||||
}
|
||||
@@ -1,41 +1,11 @@
|
||||
/* Menu */
|
||||
declare namespace Menu {
|
||||
interface MenuOptions {
|
||||
path: string;
|
||||
name: string;
|
||||
component?: string | (() => Promise<unknown>);
|
||||
redirect?: string;
|
||||
meta: MetaProps;
|
||||
children?: MenuOptions[];
|
||||
}
|
||||
interface MetaProps {
|
||||
icon: string;
|
||||
title: string;
|
||||
activeMenu?: string;
|
||||
isLink?: string;
|
||||
isHide: boolean;
|
||||
isFull: boolean;
|
||||
isAffix: boolean;
|
||||
isKeepAlive: boolean;
|
||||
}
|
||||
|
||||
declare module "*.vue" {
|
||||
import { DefineComponent } from "vue";
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
/* FileType */
|
||||
declare namespace File {
|
||||
type ImageMimeType =
|
||||
| "image/apng"
|
||||
| "image/bmp"
|
||||
| "image/gif"
|
||||
| "image/jpeg"
|
||||
| "image/pjpeg"
|
||||
| "image/png"
|
||||
| "image/svg+xml"
|
||||
| "image/tiff"
|
||||
| "image/webp"
|
||||
| "image/x-icon";
|
||||
|
||||
type ExcelMimeType = "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
}
|
||||
|
||||
/* Vite */
|
||||
declare type Recordable<T = any> = Record<string, T>;
|
||||
39
frontend/src/types/global.d.ts
vendored
Normal file
39
frontend/src/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/* Menu */
|
||||
declare namespace Menu {
|
||||
interface MenuOptions {
|
||||
path: string;
|
||||
name: string;
|
||||
component?: string | (() => Promise<unknown>);
|
||||
redirect?: string;
|
||||
meta: MetaProps;
|
||||
children?: MenuOptions[];
|
||||
}
|
||||
interface MetaProps {
|
||||
icon: string;
|
||||
title: string;
|
||||
activeMenu?: string;
|
||||
isLink?: string;
|
||||
isHide: boolean;
|
||||
isFull: boolean;
|
||||
isAffix: boolean;
|
||||
isKeepAlive: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/* FileType */
|
||||
declare namespace File {
|
||||
type ImageMimeType =
|
||||
| "image/apng"
|
||||
| "image/bmp"
|
||||
| "image/gif"
|
||||
| "image/jpeg"
|
||||
| "image/pjpeg"
|
||||
| "image/png"
|
||||
| "image/svg+xml"
|
||||
| "image/tiff"
|
||||
| "image/webp"
|
||||
| "image/x-icon";
|
||||
|
||||
type ExcelMimeType = "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
}
|
||||
|
||||
@@ -127,22 +127,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="useProTable">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { User } from "@/api/interface";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
import { useDownload } from "@/hooks/useDownload";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import ImportExcel from "@/components/ImportExcel/index.vue";
|
||||
import {
|
||||
CirclePlus,
|
||||
Delete,
|
||||
EditPen,
|
||||
Download,
|
||||
Upload,
|
||||
View,
|
||||
Refresh,
|
||||
Search,
|
||||
} from "@element-plus/icons-vue";
|
||||
import { getPlanList } from "@/api/plan/planList";
|
||||
@@ -544,9 +534,6 @@ defineExpose({ changeActiveTabs });
|
||||
width: 150px !important;
|
||||
}
|
||||
}
|
||||
// ::v-deep .el-select {
|
||||
// width: 150px !important;
|
||||
// }
|
||||
|
||||
.el-form {
|
||||
width: 100%;
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, defineExpose, watch } from "vue";
|
||||
import { Menu,Platform} from "@element-plus/icons-vue";
|
||||
const emit = defineEmits(["jump"]);
|
||||
const data: any = ref([]);
|
||||
|
||||
@@ -30,10 +30,9 @@
|
||||
</div> -->
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useAuthStore } from "@/stores/modules/auth.ts";
|
||||
import { useAuthStore } from "@/stores/modules/auth";
|
||||
import model from "./tabs/model.vue";
|
||||
import dashboard from "./tabs/dashboard.vue";
|
||||
const authStore = useAuthStore();
|
||||
|
||||
@@ -83,14 +83,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, watch } from "vue";
|
||||
import { getStaticTreeData } from "@/api/plan/static";
|
||||
import pie from "@/components/echarts/pie/default.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import tree from "../components/tree.vue";
|
||||
import Table from "../components/table.vue";
|
||||
import { data } from "@/api/plan/static.json";
|
||||
import { Refresh, Search } from "@element-plus/icons-vue";
|
||||
const treeRef = ref();
|
||||
const form: any = ref({
|
||||
activeTabs: 0, //功能选择
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useAuthStore } from "@/stores/modules/auth.ts";
|
||||
import { useAuthStore } from "@/stores/modules/auth";
|
||||
const authStore = useAuthStore();
|
||||
const activeIndex = ref("1-1");
|
||||
const router = useRouter();
|
||||
@@ -234,7 +233,7 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-sub-menu__title {
|
||||
:deep(.el-sub-menu__title) {
|
||||
border-bottom: 0 !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { HOME_URL } from "@/config";
|
||||
import { getTimeState } from "@/utils";
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
<script setup lang="ts" name="login">
|
||||
import LoginForm from "./components/LoginForm.vue";
|
||||
import SwitchDark from "@/components/SwitchDark/index.vue";
|
||||
const title = import.meta.env.VITE_GLOB_APP_TITLE;
|
||||
</script>
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div>检测脚本</div>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import {ref,onMounted} from 'vue';
|
||||
onMounted(()=>{
|
||||
console.log()
|
||||
})
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div class="detection"></div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
onMounted(() => {
|
||||
console.log();
|
||||
});
|
||||
|
||||
@@ -105,7 +105,6 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref,reactive,onMounted, defineExpose } from "vue";
|
||||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||
|
||||
interface RuleForm {
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="useProTable">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { User } from "@/api/interface";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
@@ -452,7 +451,8 @@ onMounted(() => {
|
||||
width: 100%;
|
||||
height: calc(100vh - 165px);
|
||||
}
|
||||
::v-deep .el-select {
|
||||
|
||||
:deep(.el-select) {
|
||||
width: 150px !important;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user