<script setup>
// 常用属性：
//   code - 代号

import Step from "primevue/step";
import {inject, onMounted, ref} from "vue";

const props = defineProps(["code"])

const numberValue = ref(0)

onMounted(() => {
	const stepView = inject("$stepView")
	if (stepView != null) {
		numberValue.value = stepView.exposed.addStep(props.code)
	}
})

</script>

<template>
	<Step :value="numberValue.toString()">
		<slot></slot>
	</Step>
</template>

<style scoped>
/**:deep(.p-step-number) {
	display: none;
}**/
</style>