refactor: 将各个界面的notfound提示提取为单独的组件NotFoundResult
All checks were successful
deploy to server / build-and-deploy (push) Successful in 2m56s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 2m56s
This commit is contained in:
33
app/components/shared/NotFoundResult.vue
Normal file
33
app/components/shared/NotFoundResult.vue
Normal file
@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<el-result icon="warning" :title="title" :sub-title="subTitle">
|
||||
<template #extra>
|
||||
<el-button type="primary" @click="onBack">
|
||||
{{ backText || $t('back') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
subTitle: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
backText: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
onBack: {
|
||||
type: Function as () => unknown,
|
||||
required: false,
|
||||
default: undefined,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user