<template>
  <ArticleShow 
    :resource-id="articleId"
    :task-id="taskId"
    :show-back-button="true"
    back-button-text="返回"
    @back="handleBack"
  />
</template>

<script setup lang="ts">
import { computed } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { ArticleShow } from './components';

defineOptions({
  name: 'ArticleShowView'
});

const router = useRouter();
const route = useRoute();

const articleId = computed(() => route.query.articleId as string || '');
const taskId = computed(() => route.query.taskId as string || '');

// 返回上一页
function handleBack() {
  router.back();
}
</script>

<style lang="scss" scoped>
</style>
