feat: 🚀 sass导入更新
This commit is contained in:
23
src/auto-import.d.ts
vendored
23
src/auto-import.d.ts
vendored
@@ -1,6 +1,7 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
@@ -37,6 +38,7 @@ declare global {
|
||||
const onServerPrefetch: typeof import("vue")["onServerPrefetch"];
|
||||
const onUnmounted: typeof import("vue")["onUnmounted"];
|
||||
const onUpdated: typeof import("vue")["onUpdated"];
|
||||
const onWatcherCleanup: typeof import("vue")["onWatcherCleanup"];
|
||||
const provide: typeof import("vue")["provide"];
|
||||
const reactive: typeof import("vue")["reactive"];
|
||||
const readonly: typeof import("vue")["readonly"];
|
||||
@@ -54,10 +56,13 @@ declare global {
|
||||
const useAttrs: typeof import("vue")["useAttrs"];
|
||||
const useCssModule: typeof import("vue")["useCssModule"];
|
||||
const useCssVars: typeof import("vue")["useCssVars"];
|
||||
const useId: typeof import("vue")["useId"];
|
||||
const useLink: typeof import("vue-router")["useLink"];
|
||||
const useModel: typeof import("vue")["useModel"];
|
||||
const useRoute: typeof import("vue-router")["useRoute"];
|
||||
const useRouter: typeof import("vue-router")["useRouter"];
|
||||
const useSlots: typeof import("vue")["useSlots"];
|
||||
const useTemplateRef: typeof import("vue")["useTemplateRef"];
|
||||
const watch: typeof import("vue")["watch"];
|
||||
const watchEffect: typeof import("vue")["watchEffect"];
|
||||
const watchPostEffect: typeof import("vue")["watchPostEffect"];
|
||||
@@ -66,5 +71,21 @@ declare global {
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from "vue";
|
||||
export type {
|
||||
Component,
|
||||
ComponentPublicInstance,
|
||||
ComputedRef,
|
||||
DirectiveBinding,
|
||||
ExtractDefaultPropTypes,
|
||||
ExtractPropTypes,
|
||||
ExtractPublicPropTypes,
|
||||
InjectionKey,
|
||||
PropType,
|
||||
Ref,
|
||||
MaybeRef,
|
||||
MaybeRefOrGetter,
|
||||
VNode,
|
||||
WritableComputedRef
|
||||
} from "vue";
|
||||
import("vue");
|
||||
}
|
||||
|
||||
19
src/components.d.ts
vendored
19
src/components.d.ts
vendored
@@ -7,6 +7,11 @@ export {}
|
||||
|
||||
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"];
|
||||
DetailsSearch: typeof import("./components/DetailsSearch/index.vue")["default"];
|
||||
ElAside: typeof import("element-plus/es")["ElAside"];
|
||||
ElAutocomplete: typeof import("element-plus/es")["ElAutocomplete"];
|
||||
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
|
||||
@@ -41,6 +46,12 @@ declare module "vue" {
|
||||
ElTabs: typeof import("element-plus/es")["ElTabs"];
|
||||
ElTag: typeof import("element-plus/es")["ElTag"];
|
||||
ElTooltip: typeof import("element-plus/es")["ElTooltip"];
|
||||
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
|
||||
Form: typeof import("./components/Form/index.vue")["default"];
|
||||
FormItem: typeof import("./components/Form/components/FormItem.vue")["default"];
|
||||
FormTable: typeof import("./components/FormTable/index.vue")["default"];
|
||||
Grid: typeof import("./components/Grid/index.vue")["default"];
|
||||
GridItem: typeof import("./components/Grid/components/GridItem.vue")["default"];
|
||||
IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"];
|
||||
IEpCircleClose: typeof import("~icons/ep/circle-close")["default"];
|
||||
IEpFolderDelete: typeof import("~icons/ep/folder-delete")["default"];
|
||||
@@ -49,7 +60,15 @@ declare module "vue" {
|
||||
IEpRemove: typeof import("~icons/ep/remove")["default"];
|
||||
IEpSearch: typeof import("~icons/ep/search")["default"];
|
||||
IEpSwitchButton: typeof import("~icons/ep/switch-button")["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"];
|
||||
PermissionButton: typeof import("./components/PermissionButton/index.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"];
|
||||
TableColumn: typeof import("./components/ProTable/components/TableColumn.vue")["default"];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,5 +16,5 @@ const router = useRouter();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -16,5 +16,5 @@ const router = useRouter();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -16,5 +16,5 @@ const router = useRouter();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -119,5 +119,5 @@ const resetForm = (formEl: FormInstance | undefined) => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -83,5 +83,5 @@ const resetForm = (formEl: FormInstance | undefined) => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
// @import "./index.scss";
|
||||
// @use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -99,7 +99,7 @@ import { ElTable, ElTableColumn } from "element-plus";
|
||||
import { QuestionFilled } from "@element-plus/icons-vue";
|
||||
const props = defineProps<{
|
||||
columns: any;
|
||||
rowStyle?: (params: any) => void;
|
||||
rowStyle?: any;
|
||||
isStatus?: boolean;
|
||||
tableData?: any;
|
||||
height?: number;
|
||||
|
||||
@@ -147,5 +147,5 @@ defineExpose({
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
<script setup lang="ts" name="Loading"></script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { BreakPoint, Responsive } from "@/components/Grid/interface";
|
||||
import { TableColumnCtx } from "element-plus/es/components/table/src/table-column/defaults";
|
||||
import { ProTableProps } from "@/components/ProTable/index.vue";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import { DefaultRow } from "element-plus/es/components/table/src/table/defaults";
|
||||
|
||||
export interface EnumProps {
|
||||
label?: string; // 选项框显示的文字
|
||||
@@ -53,20 +54,21 @@ export type FieldNamesProps = {
|
||||
children?: string;
|
||||
};
|
||||
|
||||
export type RenderScope<T> = {
|
||||
export type RenderScope<T extends DefaultRow> = {
|
||||
row: T;
|
||||
$index: number;
|
||||
column: TableColumnCtx<T>;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export type HeaderRenderScope<T> = {
|
||||
export type HeaderRenderScope<T extends DefaultRow> = {
|
||||
$index: number;
|
||||
column: TableColumnCtx<T>;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export interface ColumnProps<T = any> extends Partial<Omit<TableColumnCtx<T>, "children" | "renderCell" | "renderHeader">> {
|
||||
export interface ColumnProps<T extends DefaultRow = any>
|
||||
extends Partial<Omit<TableColumnCtx<T>, "children" | "renderCell" | "renderHeader">> {
|
||||
tag?: boolean; // 是否是标签展示
|
||||
isShow?: boolean; // 是否显示在表格当中
|
||||
search?: SearchProps | undefined; // 搜索项配置
|
||||
|
||||
@@ -225,5 +225,5 @@ const handleEmitClear = (item: any) => {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scope>
|
||||
@import "../index.scss";
|
||||
@use "../index.scss";
|
||||
</style>
|
||||
|
||||
@@ -309,5 +309,5 @@ const handleFormReset = () => {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scope>
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
21
src/env.d.ts
vendored
Normal file
21
src/env.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// src/env.d.ts
|
||||
// import type { ComponentCustomOptions } from "vue";
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
// 声明常用的 Element Plus 组件
|
||||
"el-option": any;
|
||||
"el-radio": any;
|
||||
"el-checkbox": any;
|
||||
"el-button": any;
|
||||
"el-table-column": any;
|
||||
"el-table": any;
|
||||
"el-tag": any;
|
||||
// 可以继续添加其他需要的组件
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 确保模块被识别
|
||||
export {};
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* @description 精度处理
|
||||
* @param data 数据源
|
||||
* @param type Decimal方法
|
||||
* @param typeData mul | div| add | sub 方法参数 的数据
|
||||
* @return returnData {number}
|
||||
* */
|
||||
import { Decimal } from "decimal.js";
|
||||
export const useDecimal = (data: number, type?: "mul" | "div" | "add" | "sub", typeData?: number) => {
|
||||
let returnData = type && typeData ? new Decimal(data)[type](typeData).toNumber() : new Decimal(data).toNumber();
|
||||
return returnData;
|
||||
};
|
||||
@@ -55,5 +55,5 @@ const activeMenu = computed(() => (route.meta.activeMenu ? route.meta.activeMenu
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -96,5 +96,5 @@ const changeSubMenu = (item: Menu.MenuOptions) => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -60,5 +60,5 @@ const handleClickMenu = (subItem: Menu.MenuOptions) => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -50,7 +50,7 @@ const activeMenu = computed(() => (route.meta.activeMenu ? route.meta.activeMenu
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
.el-container .el-aside .aside-box .el-scrollbar {
|
||||
background-color: #161616 !important;
|
||||
}
|
||||
|
||||
@@ -71,5 +71,5 @@ watch(
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -100,5 +100,5 @@ const closeAllTab = () => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "../index.scss";
|
||||
@use "../index.scss";
|
||||
</style>
|
||||
|
||||
@@ -127,5 +127,5 @@ const tabRemove = (fullPath: TabPaneName) => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
@@ -43,5 +43,5 @@ getOrgs();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
@use "./index.scss";
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user