feat: ✨ 增加返回顶部功能
This commit is contained in:
1
src/assets/icons/backtop.svg
Normal file
1
src/assets/icons/backtop.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M2.88 18.054a35.9 35.9 0 0 1 8.531-16.32.8.8 0 0 1 1.178 0q.25.27.413.455a35.9 35.9 0 0 1 8.118 15.865c-2.141.451-4.34.747-6.584.874l-2.089 4.178a.5.5 0 0 1-.894 0l-2.089-4.178a44 44 0 0 1-6.584-.874m6.698-1.123 1.157.066L12 19.527l1.265-2.53 1.157-.066a42 42 0 0 0 4.227-.454A33.9 33.9 0 0 0 12 4.09a33.9 33.9 0 0 0-6.649 12.387q2.093.334 4.227.454M12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>
|
||||||
|
After Width: | Height: | Size: 533 B |
@@ -28,6 +28,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<AppMain />
|
<AppMain />
|
||||||
<Settings v-if="defaultSettings.showSettings" />
|
<Settings v-if="defaultSettings.showSettings" />
|
||||||
|
<!-- 返回顶部 -->
|
||||||
|
<el-backtop target=".main-container">
|
||||||
|
<svg-icon icon-class="backtop" color="#000000" size="24px" />
|
||||||
|
</el-backtop>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -39,6 +43,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<AppMain />
|
<AppMain />
|
||||||
<Settings v-if="defaultSettings.showSettings" />
|
<Settings v-if="defaultSettings.showSettings" />
|
||||||
|
<!-- 返回顶部 -->
|
||||||
|
<el-backtop target=".main-container">
|
||||||
|
<svg-icon icon-class="backtop" color="#000000" size="24px" />
|
||||||
|
</el-backtop>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@use "./reset";
|
@use "./reset";
|
||||||
|
|
||||||
.app-container {
|
.app-container {
|
||||||
padding: 10px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container {
|
.search-container {
|
||||||
|
|||||||
4
src/typings/auto-imports.d.ts
vendored
4
src/typings/auto-imports.d.ts
vendored
@@ -325,12 +325,14 @@ declare module "vue" {
|
|||||||
interface GlobalComponents {}
|
interface GlobalComponents {}
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
readonly EffectScope: UnwrapRef<(typeof import("vue"))["EffectScope"]>;
|
readonly EffectScope: UnwrapRef<(typeof import("vue"))["EffectScope"]>;
|
||||||
|
readonly ElForm: UnwrapRef<(typeof import("element-plus/es"))["ElForm"]>;
|
||||||
readonly ElMessage: UnwrapRef<
|
readonly ElMessage: UnwrapRef<
|
||||||
(typeof import("element-plus/es"))["ElMessage"]
|
(typeof import("element-plus/es"))["ElMessage"]
|
||||||
>;
|
>;
|
||||||
readonly ElMessageBox: UnwrapRef<
|
readonly ElMessageBox: UnwrapRef<
|
||||||
(typeof import("element-plus/es"))["ElMessageBox"]
|
(typeof import("element-plus/es"))["ElMessageBox"]
|
||||||
>;
|
>;
|
||||||
|
readonly ElTree: UnwrapRef<(typeof import("element-plus/es"))["ElTree"]>;
|
||||||
readonly acceptHMRUpdate: UnwrapRef<
|
readonly acceptHMRUpdate: UnwrapRef<
|
||||||
(typeof import("pinia"))["acceptHMRUpdate"]
|
(typeof import("pinia"))["acceptHMRUpdate"]
|
||||||
>;
|
>;
|
||||||
@@ -1053,12 +1055,14 @@ declare module "@vue/runtime-core" {
|
|||||||
interface GlobalComponents {}
|
interface GlobalComponents {}
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
readonly EffectScope: UnwrapRef<(typeof import("vue"))["EffectScope"]>;
|
readonly EffectScope: UnwrapRef<(typeof import("vue"))["EffectScope"]>;
|
||||||
|
readonly ElForm: UnwrapRef<(typeof import("element-plus/es"))["ElForm"]>;
|
||||||
readonly ElMessage: UnwrapRef<
|
readonly ElMessage: UnwrapRef<
|
||||||
(typeof import("element-plus/es"))["ElMessage"]
|
(typeof import("element-plus/es"))["ElMessage"]
|
||||||
>;
|
>;
|
||||||
readonly ElMessageBox: UnwrapRef<
|
readonly ElMessageBox: UnwrapRef<
|
||||||
(typeof import("element-plus/es"))["ElMessageBox"]
|
(typeof import("element-plus/es"))["ElMessageBox"]
|
||||||
>;
|
>;
|
||||||
|
readonly ElTree: UnwrapRef<(typeof import("element-plus/es"))["ElTree"]>;
|
||||||
readonly acceptHMRUpdate: UnwrapRef<
|
readonly acceptHMRUpdate: UnwrapRef<
|
||||||
(typeof import("pinia"))["acceptHMRUpdate"]
|
(typeof import("pinia"))["acceptHMRUpdate"]
|
||||||
>;
|
>;
|
||||||
|
|||||||
8
src/typings/components.d.ts
vendored
8
src/typings/components.d.ts
vendored
@@ -14,6 +14,7 @@ declare module "vue" {
|
|||||||
DeptTree: (typeof import("./../views/system/user/components/dept-tree.vue"))["default"];
|
DeptTree: (typeof import("./../views/system/user/components/dept-tree.vue"))["default"];
|
||||||
Dictionary: (typeof import("./../components/Dictionary/index.vue"))["default"];
|
Dictionary: (typeof import("./../components/Dictionary/index.vue"))["default"];
|
||||||
DictItem: (typeof import("./../views/system/dict/components/dict-item.vue"))["default"];
|
DictItem: (typeof import("./../views/system/dict/components/dict-item.vue"))["default"];
|
||||||
|
ElBacktop: (typeof import("element-plus/es"))["ElBacktop"];
|
||||||
ElBreadcrumb: (typeof import("element-plus/es"))["ElBreadcrumb"];
|
ElBreadcrumb: (typeof import("element-plus/es"))["ElBreadcrumb"];
|
||||||
ElBreadcrumbItem: (typeof import("element-plus/es"))["ElBreadcrumbItem"];
|
ElBreadcrumbItem: (typeof import("element-plus/es"))["ElBreadcrumbItem"];
|
||||||
ElButton: (typeof import("element-plus/es"))["ElButton"];
|
ElButton: (typeof import("element-plus/es"))["ElButton"];
|
||||||
@@ -52,12 +53,16 @@ declare module "vue" {
|
|||||||
ElSwitch: (typeof import("element-plus/es"))["ElSwitch"];
|
ElSwitch: (typeof import("element-plus/es"))["ElSwitch"];
|
||||||
ElTable: (typeof import("element-plus/es"))["ElTable"];
|
ElTable: (typeof import("element-plus/es"))["ElTable"];
|
||||||
ElTableColumn: (typeof import("element-plus/es"))["ElTableColumn"];
|
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"];
|
ElTag: (typeof import("element-plus/es"))["ElTag"];
|
||||||
|
ElText: (typeof import("element-plus/es"))["ElText"];
|
||||||
ElTooltip: (typeof import("element-plus/es"))["ElTooltip"];
|
ElTooltip: (typeof import("element-plus/es"))["ElTooltip"];
|
||||||
ElTree: (typeof import("element-plus/es"))["ElTree"];
|
ElTree: (typeof import("element-plus/es"))["ElTree"];
|
||||||
ElTreeSelect: (typeof import("element-plus/es"))["ElTreeSelect"];
|
ElTreeSelect: (typeof import("element-plus/es"))["ElTreeSelect"];
|
||||||
ElUpload: (typeof import("element-plus/es"))["ElUpload"];
|
ElUpload: (typeof import("element-plus/es"))["ElUpload"];
|
||||||
ElWatermark: (typeof import("element-plus/es"))["ElWatermark"];
|
ElWatermark: (typeof import("element-plus/es"))["ElWatermark"];
|
||||||
|
Form: (typeof import("./../components/PageModal/Form.vue"))["default"];
|
||||||
FunnelChart: (typeof import("./../views/dashboard/components/FunnelChart.vue"))["default"];
|
FunnelChart: (typeof import("./../views/dashboard/components/FunnelChart.vue"))["default"];
|
||||||
GithubCorner: (typeof import("./../components/GithubCorner/index.vue"))["default"];
|
GithubCorner: (typeof import("./../components/GithubCorner/index.vue"))["default"];
|
||||||
Hamburger: (typeof import("./../components/Hamburger/index.vue"))["default"];
|
Hamburger: (typeof import("./../components/Hamburger/index.vue"))["default"];
|
||||||
@@ -69,10 +74,11 @@ declare module "vue" {
|
|||||||
IEpDownload: (typeof import("~icons/ep/download"))["default"];
|
IEpDownload: (typeof import("~icons/ep/download"))["default"];
|
||||||
IEpEdit: (typeof import("~icons/ep/edit"))["default"];
|
IEpEdit: (typeof import("~icons/ep/edit"))["default"];
|
||||||
IEpPlus: (typeof import("~icons/ep/plus"))["default"];
|
IEpPlus: (typeof import("~icons/ep/plus"))["default"];
|
||||||
|
IEpPosition: (typeof import("~icons/ep/position"))["default"];
|
||||||
|
IEpQuestionFilled: (typeof import("~icons/ep/question-filled"))["default"];
|
||||||
IEpRefresh: (typeof import("~icons/ep/refresh"))["default"];
|
IEpRefresh: (typeof import("~icons/ep/refresh"))["default"];
|
||||||
IEpRefreshLeft: (typeof import("~icons/ep/refresh-left"))["default"];
|
IEpRefreshLeft: (typeof import("~icons/ep/refresh-left"))["default"];
|
||||||
IEpSearch: (typeof import("~icons/ep/search"))["default"];
|
IEpSearch: (typeof import("~icons/ep/search"))["default"];
|
||||||
IEpSetting: (typeof import("~icons/ep/setting"))["default"];
|
|
||||||
IEpTop: (typeof import("~icons/ep/top"))["default"];
|
IEpTop: (typeof import("~icons/ep/top"))["default"];
|
||||||
IEpUploadFilled: (typeof import("~icons/ep/upload-filled"))["default"];
|
IEpUploadFilled: (typeof import("~icons/ep/upload-filled"))["default"];
|
||||||
LangSelect: (typeof import("./../components/LangSelect/index.vue"))["default"];
|
LangSelect: (typeof import("./../components/LangSelect/index.vue"))["default"];
|
||||||
|
|||||||
Reference in New Issue
Block a user