39 lines
880 B
Vue
39 lines
880 B
Vue
<script setup lang="ts">
|
|
import back from '@/static/image/pet-parameters/back.png'
|
|
|
|
const props = withDefaults(defineProps<{
|
|
titleName: string
|
|
progress: number
|
|
}>(), {
|
|
titleName: '返回',
|
|
progress: 0,
|
|
})
|
|
|
|
const emits = defineEmits<{
|
|
previous: [void]
|
|
}>()
|
|
|
|
function handleBack() {
|
|
emits('previous')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<view class="m-4 flex items-center">
|
|
<image :src="back" class="w-[6px] h-[10px]" @click="handleBack" />
|
|
<text class="text-[12px] font-pingfangsc ml-1" @click="handleBack">
|
|
{{ props.titleName }}
|
|
</text>
|
|
<view class="flex-1 h-[6px] bg-[#E7E7E7] ml-3 rounded relative">
|
|
<view class="absolute h-[6px] bg-[#0052D9] rounded" :style="{ width: `${props.progress}%` }" />
|
|
</view>
|
|
<text class="text-[12px] font-pingfangsc ml-3">
|
|
{{ props.progress }}%
|
|
</text>
|
|
</view>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|