13 lines
228 B
Plaintext
13 lines
228 B
Plaintext
|
|
<h3>父组件传递过来的参数:@Text</h3>
|
||
|
|
|
||
|
|
@code {
|
||
|
|
//显示的文本
|
||
|
|
[Parameter]
|
||
|
|
public string? Text{ get; set; }
|
||
|
|
|
||
|
|
protected override void OnParametersSet()
|
||
|
|
{
|
||
|
|
Text = Text ?? "test";
|
||
|
|
}
|
||
|
|
}
|