Skip to content

Commit 45332a6

Browse files
SkyBird233MingcongBai
authored andcommitted
chore: simplify code of previous commit
1 parent b55b991 commit 45332a6

File tree

2 files changed

+8
-28
lines changed

2 files changed

+8
-28
lines changed

src/pages/download/components/DownloadButton.vue

+4-13
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,17 @@ const onClick = () => {
6565
};
6666
</script>
6767
68-
<script>
69-
export default {
70-
data() {
71-
return { isVisible: false }
72-
}
73-
}
74-
</script>
75-
7668
<template>
7769
<div>
7870
<el-popover
7971
:disabled="popoverData === undefined || dialogState"
8072
:placement="popoverData?.placement"
8173
:hide-after="0"
8274
trigger="hover"
83-
:content="popoverData?.content"
84-
ref="whatsThisArchPopup"
85-
manual
86-
v-model="isVisible">
87-
<div @click="$refs.whatsThisArchPopup.hide()">{{ popoverData?.content }}</div>
75+
ref="whatsThisArchPopup">
76+
<div @click="$refs.whatsThisArchPopup.hide()">{{
77+
popoverData?.content
78+
}}</div>
8879
<template #reference>
8980
<button
9081
:disabled="disabled"

src/pages/download/components/DownloadButtonGroup.vue

+4-15
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,14 @@ const props = defineProps({
1212
const expand = ref(false);
1313
</script>
1414

15-
<script>
16-
export default {
17-
data() {
18-
return { isVisible: false }
19-
}
20-
}
21-
</script>
22-
2315
<template>
2416
<div class="flex flex-col gap-1">
2517
<div class="leading-none">
2618
<span v-if="title" class="text-[10pt] font-[450]">{{ title }}</span>
27-
<el-popover
28-
placement="top"
29-
width="233"
30-
ref="whatsThisArchLevelPopup"
31-
manual
32-
v-model="isVisible">
33-
<div @click="$refs.whatsThisArchLevelPopup.hide()">{{ description }}</div>
19+
<el-popover placement="top" width="233" ref="whatsThisArchLevelPopup">
20+
<div @click="$refs.whatsThisArchLevelPopup.hide()"
21+
>{{ description }}
22+
</div>
3423
<template #reference>
3524
<span class="text-[8pt] font-[450]">(这是什么?)</span>
3625
</template>

0 commit comments

Comments
 (0)