We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5cb59f commit f63bccdCopy full SHA for f63bccd
src/views/bpm/oa/leave/detail.vue
@@ -2,14 +2,16 @@
2
<ContentWrap>
3
<!-- 详情 -->
4
<Descriptions :schema="allSchemas.detailSchema" :data="formData" />
5
+ <el-button @click="routerReturn" type="primary">返回</el-button>
6
</ContentWrap>
7
</template>
8
9
<script setup lang="ts">
10
// 业务相关的 import
11
import * as LeaveApi from '@/api/bpm/leave'
12
import { allSchemas } from '@/views/bpm/oa/leave/leave.data'
-
13
+import { useRouter } from 'vue-router'
14
+const router = useRouter()
15
const { query } = useRoute() // 查询参数
16
const message = useMessage() // 消息弹窗
17
@@ -22,6 +24,10 @@ const formData = ref({
22
24
reason: undefined
23
25
})
26
27
+const routerReturn = () => {
28
+ router.back()
29
+}
30
+
31
onMounted(() => {
32
id.value = query.id
33
if (!id.value) {
0 commit comments