mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-18 10:18:14 +08:00
⚡️ emits 真好用x
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
<div class="config-right">
|
||||
<TcAppBadge />
|
||||
<TcUserBadge />
|
||||
<TcUserBadge @loadOuter="loadHandle" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -412,6 +412,17 @@ function submitDevMode(): void {
|
||||
? showSnackbar({ text: "已关闭 dev 模式!" })
|
||||
: showSnackbar({ text: "已开启 dev 模式!" });
|
||||
}
|
||||
|
||||
// 通过子组件的事件来控制 loading
|
||||
function loadHandle(params: TGApp.Component.Loading.EmitParams): void {
|
||||
loading.value = params.show;
|
||||
if (params.title) {
|
||||
loadingTitle.value = params.title;
|
||||
}
|
||||
if (params.text) {
|
||||
loadingSub.value = params.text;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.config-box {
|
||||
|
||||
Reference in New Issue
Block a user