Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
有来技术
mall-admin
提交
fc17f083
M
mall-admin
项目概览
有来技术
/
mall-admin
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mall-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fc17f083
编写于
6月 17, 2023
作者:
H
haoxr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore:
🔨
配置自动导入自定义组件
上级
0675ba9b
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
1624 addition
and
36 deletion
+1624
-36
auto-imports.d.ts
auto-imports.d.ts
+1582
-0
src/types/auto-imports.d.ts
src/types/auto-imports.d.ts
+0
-6
src/types/components.d.ts
src/types/components.d.ts
+16
-0
src/views/dashboard/index.vue
src/views/dashboard/index.vue
+7
-13
vite.config.ts
vite.config.ts
+19
-17
未找到文件。
auto-imports.d.ts
0 → 100644
浏览文件 @
fc17f083
此差异已折叠。
点击以展开。
src/types/auto-imports.d.ts
浏览文件 @
fc17f083
...
...
@@ -5,10 +5,8 @@
export
{}
declare
global
{
const
EffectScope
:
typeof
import
(
"
vue
"
)[
"
EffectScope
"
];
const
ElForm
:
typeof
import
(
"
element-plus/es
"
)[
"
ElForm
"
];
const
ElMessage
:
typeof
import
(
"
element-plus/es
"
)[
"
ElMessage
"
];
const
ElMessageBox
:
typeof
import
(
"
element-plus/es
"
)[
"
ElMessageBox
"
];
const
ElTree
:
typeof
import
(
"
element-plus/es
"
)[
"
ElTree
"
];
const
asyncComputed
:
typeof
import
(
"
@vueuse/core
"
)[
"
asyncComputed
"
];
const
autoResetRef
:
typeof
import
(
"
@vueuse/core
"
)[
"
autoResetRef
"
];
const
computed
:
typeof
import
(
"
vue
"
)[
"
computed
"
];
...
...
@@ -297,14 +295,12 @@ import { UnwrapRef } from "vue";
declare
module
"
vue
"
{
interface
ComponentCustomProperties
{
readonly
EffectScope
:
UnwrapRef
<
typeof
import
(
"
vue
"
)[
"
EffectScope
"
]
>
;
readonly
ElForm
:
UnwrapRef
<
typeof
import
(
"
element-plus/es
"
)[
"
ElForm
"
]
>
;
readonly
ElMessage
:
UnwrapRef
<
typeof
import
(
"
element-plus/es
"
)[
"
ElMessage
"
]
>
;
readonly
ElMessageBox
:
UnwrapRef
<
typeof
import
(
"
element-plus/es
"
)[
"
ElMessageBox
"
]
>
;
readonly
ElTree
:
UnwrapRef
<
typeof
import
(
"
element-plus/es
"
)[
"
ElTree
"
]
>
;
readonly
asyncComputed
:
UnwrapRef
<
typeof
import
(
"
@vueuse/core
"
)[
"
asyncComputed
"
]
>
;
...
...
@@ -943,14 +939,12 @@ declare module "vue" {
declare
module
"
@vue/runtime-core
"
{
interface
ComponentCustomProperties
{
readonly
EffectScope
:
UnwrapRef
<
typeof
import
(
"
vue
"
)[
"
EffectScope
"
]
>
;
readonly
ElForm
:
UnwrapRef
<
typeof
import
(
"
element-plus/es
"
)[
"
ElForm
"
]
>
;
readonly
ElMessage
:
UnwrapRef
<
typeof
import
(
"
element-plus/es
"
)[
"
ElMessage
"
]
>
;
readonly
ElMessageBox
:
UnwrapRef
<
typeof
import
(
"
element-plus/es
"
)[
"
ElMessageBox
"
]
>
;
readonly
ElTree
:
UnwrapRef
<
typeof
import
(
"
element-plus/es
"
)[
"
ElTree
"
]
>
;
readonly
asyncComputed
:
UnwrapRef
<
typeof
import
(
"
@vueuse/core
"
)[
"
asyncComputed
"
]
>
;
...
...
src/types/components.d.ts
浏览文件 @
fc17f083
...
...
@@ -9,6 +9,8 @@ export {};
declare
module
"
@vue/runtime-core
"
{
export
interface
GlobalComponents
{
AppMain
:
typeof
import
(
"
./../layout/components/AppMain.vue
"
)[
"
default
"
];
BarChart
:
typeof
import
(
"
./../views/dashboard/components/BarChart.vue
"
)[
"
default
"
];
Breadcrumb
:
typeof
import
(
"
./../components/Breadcrumb/index.vue
"
)[
"
default
"
];
ElAlert
:
typeof
import
(
"
element-plus/es
"
)[
"
ElAlert
"
];
ElBreadcrumb
:
typeof
import
(
"
element-plus/es
"
)[
"
ElBreadcrumb
"
];
...
...
@@ -46,9 +48,11 @@ declare module "@vue/runtime-core" {
ElTree
:
typeof
import
(
"
element-plus/es
"
)[
"
ElTree
"
];
ElTreeSelect
:
typeof
import
(
"
element-plus/es
"
)[
"
ElTreeSelect
"
];
ElUpload
:
typeof
import
(
"
element-plus/es
"
)[
"
ElUpload
"
];
FunnelChart
:
typeof
import
(
"
./../views/dashboard/components/FunnelChart.vue
"
)[
"
default
"
];
GithubCorner
:
typeof
import
(
"
./../components/GithubCorner/index.vue
"
)[
"
default
"
];
Hamburger
:
typeof
import
(
"
./../components/Hamburger/index.vue
"
)[
"
default
"
];
IconSelect
:
typeof
import
(
"
./../components/IconSelect/index.vue
"
)[
"
default
"
];
IEpArrowDown
:
typeof
import
(
"
~icons/ep/arrow-down
"
)[
"
default
"
];
IEpCaretBottom
:
typeof
import
(
"
~icons/ep/caret-bottom
"
)[
"
default
"
];
IEpCaretTop
:
typeof
import
(
"
~icons/ep/caret-top
"
)[
"
default
"
];
IEpClose
:
typeof
import
(
"
~icons/ep/close
"
)[
"
default
"
];
...
...
@@ -62,18 +66,30 @@ declare module "@vue/runtime-core" {
IEpRefreshLeft
:
typeof
import
(
"
~icons/ep/refresh-left
"
)[
"
default
"
];
IEpSearch
:
typeof
import
(
"
~icons/ep/search
"
)[
"
default
"
];
IEpSetting
:
typeof
import
(
"
~icons/ep/setting
"
)[
"
default
"
];
IEpSortDown
:
typeof
import
(
"
~icons/ep/sort-down
"
)[
"
default
"
];
IEpSortUp
:
typeof
import
(
"
~icons/ep/sort-up
"
)[
"
default
"
];
IEpTop
:
typeof
import
(
"
~icons/ep/top
"
)[
"
default
"
];
IEpUploadFilled
:
typeof
import
(
"
~icons/ep/upload-filled
"
)[
"
default
"
];
LangSelect
:
typeof
import
(
"
./../components/LangSelect/index.vue
"
)[
"
default
"
];
Link
:
typeof
import
(
"
./../layout/components/Sidebar/Link.vue
"
)[
"
default
"
];
Logo
:
typeof
import
(
"
./../layout/components/Sidebar/Logo.vue
"
)[
"
default
"
];
MultiUpload
:
typeof
import
(
"
./../components/Upload/MultiUpload.vue
"
)[
"
default
"
];
Navbar
:
typeof
import
(
"
./../layout/components/Navbar.vue
"
)[
"
default
"
];
Pagination
:
typeof
import
(
"
./../components/Pagination/index.vue
"
)[
"
default
"
];
PieChart
:
typeof
import
(
"
./../views/dashboard/components/PieChart.vue
"
)[
"
default
"
];
RadarChart
:
typeof
import
(
"
./../views/dashboard/components/RadarChart.vue
"
)[
"
default
"
];
RightPanel
:
typeof
import
(
"
./../components/RightPanel/index.vue
"
)[
"
default
"
];
RouterLink
:
typeof
import
(
"
vue-router
"
)[
"
RouterLink
"
];
RouterView
:
typeof
import
(
"
vue-router
"
)[
"
RouterView
"
];
ScrollPane
:
typeof
import
(
"
./../layout/components/TagsView/ScrollPane.vue
"
)[
"
default
"
];
Settings
:
typeof
import
(
"
./../layout/components/Settings/index.vue
"
)[
"
default
"
];
Sidebar
:
typeof
import
(
"
./../layout/components/Sidebar/index.vue
"
)[
"
default
"
];
SidebarItem
:
typeof
import
(
"
./../layout/components/Sidebar/SidebarItem.vue
"
)[
"
default
"
];
SingleUpload
:
typeof
import
(
"
./../components/Upload/SingleUpload.vue
"
)[
"
default
"
];
SizeSelect
:
typeof
import
(
"
./../components/SizeSelect/index.vue
"
)[
"
default
"
];
SvgIcon
:
typeof
import
(
"
./../components/SvgIcon/index.vue
"
)[
"
default
"
];
TagInput
:
typeof
import
(
"
./../components/TagInput/index.vue
"
)[
"
default
"
];
TagsView
:
typeof
import
(
"
./../layout/components/TagsView/index.vue
"
)[
"
default
"
];
WangEditor
:
typeof
import
(
"
./../components/WangEditor/index.vue
"
)[
"
default
"
];
}
export
interface
ComponentCustomProperties
{
...
...
src/views/dashboard/index.vue
浏览文件 @
fc17f083
...
...
@@ -8,12 +8,6 @@ defineOptions({
import
{
useUserStore
}
from
"
@/store/modules/user
"
;
import
{
useTransition
,
TransitionPresets
}
from
"
@vueuse/core
"
;
import
GithubCorner
from
"
@/components/GithubCorner/index.vue
"
;
import
SvgIcon
from
"
@/components/SvgIcon/index.vue
"
;
import
BarChart
from
"
./components/BarChart.vue
"
;
import
PieChart
from
"
./components/PieChart.vue
"
;
import
RadarChart
from
"
./components/RadarChart.vue
"
;
const
userStore
=
useUserStore
();
const
date
:
Date
=
new
Date
();
...
...
@@ -90,26 +84,26 @@ orderCount.value = 2000;
{{
greetings
}}
</div>
<div
class=
"space-x-2 flex items-center"
>
<div
class=
"space-x-2 flex items-center
justify-end
"
>
<el-link
target=
"_blank"
type=
"danger"
href=
"https://blog.csdn.net/u013737132/article/details/130191394"
>
官方0到1教程
</el-link
>
💥官方从零到一文档
</el-link
>
<el-divider
direction=
"vertical"
/>
<el-link
target=
"_blank"
type=
"success"
href=
"https://gitee.com/youlaiorg
/vue3-element-admin
"
>
Gitee
源码
</el-link
href=
"https://gitee.com/youlaiorg"
>
Gitee
</el-link
>
<el-divider
direction=
"vertical"
/>
<el-link
target=
"_blank"
type=
"primary"
href=
"https://github.com/youlaitech
/vue3-element-admin
"
>
GitHub
源码
href=
"https://github.com/youlaitech"
>
GitHub
</el-link>
</div>
</div>
...
...
@@ -160,7 +154,7 @@ orderCount.value = 2000;
</div>
<div
class=
"flex flex-col space-y-3"
>
<div
class=
"text-[var(--el-text-color-secondary)]"
>
收入金额
</div>
<div
class=
"text-lg"
>
<div
class=
"text-lg
text-right
"
>
{{
Math
.
round
(
amountOutput
)
}}
</div>
</div>
...
...
vite.config.ts
浏览文件 @
fc17f083
...
...
@@ -53,39 +53,41 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
},
plugins
:
[
vue
(),
UnoCSS
({
/* options */
}),
UnoCSS
({}),
AutoImport
({
// 自动导入 Vue 相关函数,如:ref, reactive, toRef 等
imports
:
[
"
vue
"
,
"
@vueuse/core
"
],
eslintrc
:
{
enabled
:
false
,
// Default `false`
filepath
:
"
./.eslintrc-auto-import.json
"
,
// Default `./.eslintrc-auto-import.json`
globalsPropValue
:
true
,
// Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
enabled
:
false
,
filepath
:
"
./.eslintrc-auto-import.json
"
,
globalsPropValue
:
true
,
},
resolvers
:
[
// 自动导入 Element Plus 相关函数,如:ElMessage, ElMessageBox... (带样式)
ElementPlusResolver
(),
// 自动导入图标组件
IconsResolver
({}),
],
vueTemplate
:
true
,
// 是否在 vue 模板中自动导入
dts
:
false
,
// 关闭自动生成
//dts: path.resolve(pathSrc, "types", "auto-imports.d.ts"), // 自动导入组件类型声明文件位置,默认根目录
vueTemplate
:
true
,
// 配置文件生成位置(false:关闭自动生成)
dts
:
false
,
// dts: "src/types/auto-imports.d.ts",
}),
Components
({
resolvers
:
[
// 自动注册图标组件
IconsResolver
({
enabledCollections
:
[
"
ep
"
],
//@iconify-json/ep 是 Element Plus 的图标库
}),
// 自动导入 Element Plus 组件
ElementPlusResolver
(),
// 自动导入图标组件
IconsResolver
({
// @iconify-json/ep 是 Element Plus 的图标库
enabledCollections
:
[
"
ep
"
],
}),
],
dts
:
false
,
// 关闭自动生成
// dts: path.resolve(pathSrc, "types", "components.d.ts"), // 自动导入组件类型声明文件位置,默认根目录
// 指定自定义组件位置(默认:src/components)
dirs
:
[
"
src/**/components
"
],
// 配置文件位置(false:关闭自动生成)
dts
:
false
,
// dts: "src/types/components.d.ts",
}),
Icons
({
...
...
@@ -100,7 +102,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
symbolId
:
"
icon-[dir]-[name]
"
,
}),
],
// 预加载项目必需的组件
optimizeDeps
:
{
include
:
[
"
vue
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录