Path Input

路径输入组件要求用户提供 Path,并提供有关路径自身的其他信息。

link:../../../../../src/test/java/org/springframework/shell/docs/UiComponentSnippets.java[role=include]

以下屏幕截图展示了路径输入组件的典型输出:

link:example$component-path-input-1.cast[role=include]

上下文对象是 PathInputContext。以下表格描述了它的上下文变量:

Table 1. PathInputContext Template Variables
Key Description

model

父上下文变量(请参阅 TextComponentContext Template Variables)。