<script setup>
import PopupLayout from "@/layouts/PopupLayout.vue";
import ctxRef from "@/utils/ctx_ref.js"
import Context from "./createNonStandardPopup.js"
import PostForm from "@/components/form/PostForm.vue";
import TInputText from "@/components/ui/TInputText.vue";
import CodeLabel from "@/components/common/CodeLabel.vue";
import SubmitButton from "@/components/form/SubmitButton.vue";
import DefinitionTable from "@/components/common/DefinitionTable.vue";

const ctx = ctxRef(new Context())

</script>

<template>
	<PopupLayout>
		<header>添加非标报头</header>
		<PostForm action="$" @success="ctx.success">
			<input type="hidden" name="headerPolicyId" :value="ctx.headerPolicyId"/>
			<DefinitionTable>
				<tbody>
				<tr>
					<td class="title">报头名称<em>（Name）</em></td>
					<td>
						<TInputText type="text" name="name" maxlength="100" class="w-full" autofocus v-model="ctx.headerName"/>
						<p class="comment">比如<CodeLabel>hello_world</CodeLabel>。</p>
					</td>
				</tr>
				</tbody>
			</DefinitionTable>
			<SubmitButton></SubmitButton>
		</PostForm>

	</PopupLayout>
</template>

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