refactor(module: drawer): Change the Height and Width of the Drawer to the string type to support the percentage argument (#4120)
* # * Drawer Width和Height 修改为string类型
This commit is contained in:
Родитель
a69d169947
Коммит
8692221e7b
|
@ -171,7 +171,7 @@ namespace AntDesign
|
|||
/// </para>
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public int Width { get; set; } = 256;
|
||||
public string Width { get; set; } = "256";
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
|
@ -182,7 +182,7 @@ namespace AntDesign
|
|||
/// </para>
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public int Height { get; set; } = 256;
|
||||
public string Height { get; set; } = "256";
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace AntDesign
|
|||
bool closable = true,
|
||||
bool maskClosable = true,
|
||||
string title = null,
|
||||
int width = 256,
|
||||
string width = "256",
|
||||
bool mask = true,
|
||||
string placement = "right") where TComponent : FeedbackComponent<TComponentOptions, TResult>
|
||||
{
|
||||
|
|
|
@ -37,9 +37,9 @@ namespace AntDesign
|
|||
|
||||
public string WrapClassName { get; set; }
|
||||
|
||||
public int Width { get; set; } = 256;
|
||||
public string Width { get; set; } = "256";
|
||||
|
||||
public int Height { get; set; } = 256;
|
||||
public string Height { get; set; } = "256";
|
||||
|
||||
public int ZIndex { get; set; } = 1000;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
var options = new DrawerOptions()
|
||||
{
|
||||
Title = "Component",
|
||||
Width = 350,
|
||||
Width = "350",
|
||||
};
|
||||
|
||||
var drawerRef = await DrawerService.CreateAsync<DrawerTemplateDemo, string, string>(options, value);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
//fast dialog mode
|
||||
private async Task OpenFastDialogMode()
|
||||
{
|
||||
var result = await DrawerService.CreateDialogAsync<DrawerTemplateDemo, string, string>(value, title: "Component", width: 350);
|
||||
var result = await DrawerService.CreateDialogAsync<DrawerTemplateDemo, string, string>(value, title: "Component", width: "350");
|
||||
|
||||
if (result != null)
|
||||
value = result;
|
||||
|
@ -33,7 +33,7 @@
|
|||
var options = new DrawerOptions()
|
||||
{
|
||||
Title = "Component",
|
||||
Width = 350,
|
||||
Width = "350",
|
||||
};
|
||||
|
||||
var result = await DrawerService.CreateDialogAsync<DrawerTemplateDemo, string, string>(options, value);
|
||||
|
@ -48,7 +48,7 @@
|
|||
var options = new DrawerOptions()
|
||||
{
|
||||
Title = "Component",
|
||||
Width = 350,
|
||||
Width = "350",
|
||||
};
|
||||
|
||||
var drawerRef = await DrawerService.CreateAsync<DrawerTemplateDemo, string, string>(options, value);
|
||||
|
@ -76,7 +76,7 @@
|
|||
var options = new DrawerOptions()
|
||||
{
|
||||
Title = "Drawer",
|
||||
Width = 350,
|
||||
Width = "350",
|
||||
Content = content,
|
||||
};
|
||||
|
||||
|
|
|
@ -14,29 +14,29 @@
|
|||
|
||||
bool visible1 = false;
|
||||
bool visible2 = false;
|
||||
int wdFirstLayer = 520;
|
||||
string wdFirstLayer = "520";
|
||||
|
||||
void open()
|
||||
{
|
||||
this.visible1 = true;
|
||||
}
|
||||
void open()
|
||||
{
|
||||
this.visible1 = true;
|
||||
}
|
||||
|
||||
void ShowDrawer()
|
||||
{
|
||||
void ShowDrawer()
|
||||
{
|
||||
|
||||
this.visible2 = true;
|
||||
wdFirstLayer += 260;
|
||||
}
|
||||
this.visible2 = true;
|
||||
wdFirstLayer = $"{int.Parse(wdFirstLayer) + 260}";
|
||||
}
|
||||
|
||||
void close()
|
||||
{
|
||||
this.visible1 = false;
|
||||
}
|
||||
void close()
|
||||
{
|
||||
this.visible1 = false;
|
||||
}
|
||||
|
||||
void CloseDrawer()
|
||||
{
|
||||
wdFirstLayer -= 260;
|
||||
this.visible2 = false;
|
||||
}
|
||||
void CloseDrawer()
|
||||
{
|
||||
wdFirstLayer = $"{int.Parse(wdFirstLayer) - 260}";
|
||||
this.visible2 = false;
|
||||
}
|
||||
|
||||
}
|
Загрузка…
Ссылка в новой задаче