/// <summary> /// 显示 Loading 状态 /// </summary> /// <param name="container"></param> /// <param name="action">在 Loading 状态期间要做的事</param> /// <param name="text"></param> /// <returns></returns> public static async Task WithLoadingAsync(this IContainerComponent container, Func <Task> action, string text) { EnsureComponentStatus(container); container.LoadingService.Show(new LoadingOption() { Text = text, Target = container.Container }); try { await action(); } finally { container.Close(); } }
protected void CloseLoading() { menu.Close(); }
protected void CloseLoading() { card.Close(); }
protected void CloseLoading() { table.Close(); }
protected void CloseLoading() { table.Close(LoadingService); }