@@ -84,10 +84,14 @@ const onSubmit = form.handleSubmit(async (values) => {
8484 submitting .value = false
8585})
8686
87+ const downloadLink = ref (' ' )
88+ const downloadFilename = ref (' ' )
8789const msg = ref (' ' )
8890const currentClubData = ref (null )
8991const clubUpdating = ref (false )
9092async function updateClub() {
93+ downloadLink .value = ' '
94+ downloadFilename .value = ' '
9195 if (! props .club ) {
9296 msg .value = ' 请先选择一个社团'
9397 currentClubData .value = undefined
@@ -112,8 +116,6 @@ async function updateClub() {
112116 clubUpdating .value = false
113117}
114118
115- const downloadLink = ref (' ' )
116- const downloadFilename = ref (' ' )
117119const dlink: Ref <HTMLElement | null > = ref (null )
118120const downloading = ref (false )
119121async function download() {
@@ -133,8 +135,6 @@ async function download() {
133135 dlink .value .click ()
134136 downloading .value = false
135137 }
136- downloadLink .value = ' '
137- downloadFilename .value = ' '
138138}
139139
140140watch (
@@ -184,6 +184,10 @@ await updateClub()
184184 <div v-else class =" mt-2" >
185185 {{ msg }}
186186 </div >
187- <a ref =" dlink" :href =" downloadLink" :download =" downloadFilename" class =" hidden" >Download</a >
187+ <a
188+ ref =" dlink" :href =" downloadLink" :download =" downloadFilename" class =" hidden"
189+ >Download</a >
190+ <!-- @click="downloadLink = '';
191+ downloadFilename = ''" -->
188192 </Card >
189193</template >
0 commit comments