mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🐛 fix push is not defined
This commit is contained in:
@@ -39,6 +39,7 @@ import showSnackbar from "../func/snackbar.js";
|
|||||||
|
|
||||||
type ToChannelProps = { gid?: string; curType?: string; modelValue: boolean };
|
type ToChannelProps = { gid?: string; curType?: string; modelValue: boolean };
|
||||||
type ToChannelEmits = (e: "update:modelValue", v: boolean) => void;
|
type ToChannelEmits = (e: "update:modelValue", v: boolean) => void;
|
||||||
|
const router = useRouter();
|
||||||
const props = withDefaults(defineProps<ToChannelProps>(), { modelValue: false });
|
const props = withDefaults(defineProps<ToChannelProps>(), { modelValue: false });
|
||||||
const emits = defineEmits<ToChannelEmits>();
|
const emits = defineEmits<ToChannelEmits>();
|
||||||
const { recentNewsType } = storeToRefs(useAppStore());
|
const { recentNewsType } = storeToRefs(useAppStore());
|
||||||
@@ -61,7 +62,7 @@ async function toChannel(item: ToChannelItem): Promise<void> {
|
|||||||
link = link.replace("{type}", "notice");
|
link = link.replace("{type}", "notice");
|
||||||
recentNewsType.value = "notice";
|
recentNewsType.value = "notice";
|
||||||
}
|
}
|
||||||
await useRouter().push(link);
|
await router.push(link);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user