Add project ID field to dependency configuration

This commit is contained in:
CPTProgrammer 2026-07-14 18:15:17 +08:00
parent c265b2405b
commit f2f5db5c17
No known key found for this signature in database

View File

@ -655,6 +655,7 @@ function ConfigModalForm({
<InputNumber
style={{ width: "100%" }}
placeholder="数字 ID"
controls={false}
/>
</ValidatedFormItem>
@ -718,6 +719,19 @@ function ConfigModalForm({
style={{ display: "flex", marginBottom: 8 }}
align="baseline"
>
<Form.Item
{...rest}
name={[name, "projectID"]}
rules={[{ required: true, message: "必填" }]}
style={{ marginBottom: 0 }}
normalize={(v) => v != null ? String(v) : undefined}
>
<InputNumber
placeholder="ID"
style={{ width: 100 }}
controls={false}
/>
</Form.Item>
<Form.Item
{...rest}
name={[name, "slug"]}
@ -726,7 +740,7 @@ function ConfigModalForm({
>
<Input
placeholder="Slug"
style={{ width: 160 }}
style={{ width: 120 }}
/>
</Form.Item>
<Form.Item
@ -749,7 +763,7 @@ function ConfigModalForm({
<Button
type="dashed"
onClick={() =>
add({ slug: "", type: "requiredDependency" })
add({ projectID: "", slug: "", type: "requiredDependency" })
}
icon={<PlusOutlined />}
block