feat: 增加返回顶部功能

This commit is contained in:
cshaptx4869
2024-05-30 09:55:03 +08:00
parent 7835a3d208
commit a75a0cae89
5 changed files with 21 additions and 2 deletions

View 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

View File

@@ -28,6 +28,10 @@
</div>
<AppMain />
<Settings v-if="defaultSettings.showSettings" />
<!-- 返回顶部 -->
<el-backtop target=".main-container">
<svg-icon icon-class="backtop" color="#000000" size="24px" />
</el-backtop>
</div>
</div>
@@ -39,6 +43,10 @@
</div>
<AppMain />
<Settings v-if="defaultSettings.showSettings" />
<!-- 返回顶部 -->
<el-backtop target=".main-container">
<svg-icon icon-class="backtop" color="#000000" size="24px" />
</el-backtop>
</div>
</div>
</template>

View File

@@ -1,7 +1,7 @@
@use "./reset";
.app-container {
padding: 10px;
padding: 15px;
}
.search-container {

View File

@@ -325,12 +325,14 @@ declare module "vue" {
interface GlobalComponents {}
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 acceptHMRUpdate: UnwrapRef<
(typeof import("pinia"))["acceptHMRUpdate"]
>;
@@ -1053,12 +1055,14 @@ declare module "@vue/runtime-core" {
interface GlobalComponents {}
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 acceptHMRUpdate: UnwrapRef<
(typeof import("pinia"))["acceptHMRUpdate"]
>;

View File

@@ -14,6 +14,7 @@ declare module "vue" {
DeptTree: (typeof import("./../views/system/user/components/dept-tree.vue"))["default"];
Dictionary: (typeof import("./../components/Dictionary/index.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"];
ElBreadcrumbItem: (typeof import("element-plus/es"))["ElBreadcrumbItem"];
ElButton: (typeof import("element-plus/es"))["ElButton"];
@@ -52,12 +53,16 @@ declare module "vue" {
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"];
ElText: (typeof import("element-plus/es"))["ElText"];
ElTooltip: (typeof import("element-plus/es"))["ElTooltip"];
ElTree: (typeof import("element-plus/es"))["ElTree"];
ElTreeSelect: (typeof import("element-plus/es"))["ElTreeSelect"];
ElUpload: (typeof import("element-plus/es"))["ElUpload"];
ElWatermark: (typeof import("element-plus/es"))["ElWatermark"];
Form: (typeof import("./../components/PageModal/Form.vue"))["default"];
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"];
@@ -69,10 +74,11 @@ declare module "vue" {
IEpDownload: (typeof import("~icons/ep/download"))["default"];
IEpEdit: (typeof import("~icons/ep/edit"))["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"];
IEpRefreshLeft: (typeof import("~icons/ep/refresh-left"))["default"];
IEpSearch: (typeof import("~icons/ep/search"))["default"];
IEpSetting: (typeof import("~icons/ep/setting"))["default"];
IEpTop: (typeof import("~icons/ep/top"))["default"];
IEpUploadFilled: (typeof import("~icons/ep/upload-filled"))["default"];
LangSelect: (typeof import("./../components/LangSelect/index.vue"))["default"];