This repository was archived by the owner on Oct 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" plugin" >
3
+ <ElBacktop
4
+ style =" left : 40px ;"
5
+ :visibility-height =" backtopVisibilityHeight"
6
+ />
3
7
<aside id =" aside" >
4
- <PagePluginsInfoCard1 :brief =" pluginBrief" />
8
+ <PagePluginsInfoCard1
9
+ ref =" infoCard1"
10
+ :brief =" pluginBrief"
11
+ />
5
12
<PagePluginsInfoCard2
13
+ ref =" infoCard2"
6
14
:brief =" pluginBrief"
7
15
:data =" pluginData"
8
16
@view-all =" viewAllRelease"
85
93
<script setup lang="ts">
86
94
import {ComputedRef } from " vue" ;
87
95
import {PluginData , PluginDataBrief } from " ~/types/plugins" ;
96
+ import {PagePluginsInfoCard1 , PagePluginsInfoCard2 } from " #components" ;
88
97
89
98
// ----------------------------------------------------------------------------
90
99
// basic constants
91
100
// ----------------------------------------------------------------------------
92
101
const {t} = useI18n ();
93
102
const id = useRoute ().params .id as string ;
94
103
104
+ // ----------------------------------------------------------------------------
105
+ // component refs
106
+ // ----------------------------------------------------------------------------
107
+ const infoCard1 = ref <InstanceType <typeof PagePluginsInfoCard1 > | null >(null );
108
+ const infoCard2 = ref <InstanceType <typeof PagePluginsInfoCard2 > | null >(null );
109
+ const backtopVisibilityHeight = ref (0 );
110
+
111
+ onMounted (() => {
112
+ backtopVisibilityHeight .value = (infoCard1 .value ! .$el .clientHeight + infoCard2 .value ! .$el .clientHeight ) / 2 ;
113
+ });
95
114
// ----------------------------------------------------------------------------
96
115
// votes store
97
116
// ----------------------------------------------------------------------------
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" plugins" >
3
+ <ElBacktop style =" left : 40px ;" />
3
4
<div
4
5
id =" plugins-search"
5
6
class =" box"
You can’t perform that action at this time.
0 commit comments