我想使用倾斜材质创建文件上传。
我想使用this。
我要更改的一件事是名称 Selected File(s)(他们选择的文件),他们提供了此[labelText]
属性来更改文本,但实际上只是更改了标签文本。
这是我测试过的代码:
<mat-file-upload
[labelText]="'Test'"
[showUploadButton]="true">
</mat-file-upload>
是否可以更改选定文件的文本?
答案 0 :(得分:0)
在使用n "The letter reads as follows:"
show letter open
n "%(player_name)s--"
n "You are formally invited to a masquerade party on the night of All Hallow's Eve, October 31, 1923. Enclosed in this box, you will find a mask for your use. You have also been assigned a codename, for the sake of discretion."
n "You may use it or not."
if player_name == "Gabriel":
$ code_name="Loki"
$ mask="raven"
if player_name == "Ume":
$ code_name="Shiva"
$ mask="mouse"
if player_name == "Umetaro":
$ code_name="Shiva"
$ mask="mouse"
if player_name == "Priti":
$ code_name="Aphrodite"
$ mask="sparrow"
if player_name == "Kai":
$ code_name="Mercury"
$ mask="racoon"
if player_name == "Kahi":
$ code_name="Kokopelli"
$ mask="frog"
if player_name == "Alexis":
$ code_name="Hera"
$ mask="cat"
if player_name == "%(player_name)s":
$ code_name="Lachesis"
$ mask="python"
n "The code name enclosed is %(code_name)s; when you open the box, a beautifully-carved wood-and-gemstone %(mask)s mask is there. It fits you perfectly."
组件的component.html上,您需要将mat-file-upload
输入绑定绑定到名为labelText
的新属性。
labelText
在您的component.ts上,您需要使用<mat-file-upload
[labelText]="labelText"
[showUploadButton]="true">
</mat-file-upload>
labelText
我已经通过here进行了演示。