Skip to content

Commit eb2e421

Browse files
committed
refactor: 更新文档
1 parent d6cb8fe commit eb2e421

File tree

4 files changed

+0
-162
lines changed

4 files changed

+0
-162
lines changed

src/BootstrapBlazor.Server/Components/Samples/MindMaps.razor

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,3 @@
5757
</DemoBlock>
5858

5959
<AttributeTable Items="@GetAttributes()"></AttributeTable>
60-
61-
<AttributeTable Title="@Localizer["NodeDataText"]" Items="@GetNodeDataAttributes()"></AttributeTable>

src/BootstrapBlazor.Server/Components/Samples/MindMaps.razor.cs

Lines changed: 0 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -110,38 +110,6 @@ private AttributeItem[] GetAttributes() =>
110110
DefaultValue = " — "
111111
},
112112
new()
113-
{
114-
Name = "ShowUI",
115-
Description = Localizer["ShowUI"],
116-
Type = "bool",
117-
ValueList = " — ",
118-
DefaultValue = "true"
119-
},
120-
new()
121-
{
122-
Name = "StyleCss",
123-
Description = Localizer["StyleCss"],
124-
Type = "string",
125-
ValueList = " — ",
126-
DefaultValue = "empty"
127-
},
128-
new()
129-
{
130-
Name = "OnReceive",
131-
Description = Localizer["OnReceive"],
132-
Type = "Func<string?, Task>",
133-
ValueList = " — ",
134-
DefaultValue = " — "
135-
},
136-
new()
137-
{
138-
Name = "OnError",
139-
Description = Localizer["OnError"],
140-
Type = "Func<string, Task>",
141-
ValueList = " — ",
142-
DefaultValue = " — "
143-
},
144-
new()
145113
{
146114
Name = "Export",
147115
Description = Localizer["Export"],
@@ -174,100 +142,4 @@ private AttributeItem[] GetAttributes() =>
174142
DefaultValue = " — "
175143
}
176144
];
177-
178-
/// <summary>
179-
/// NodeData
180-
/// </summary>
181-
/// <returns></returns>
182-
private List<AttributeItem> GetNodeDataAttributes() =>
183-
[
184-
new()
185-
{
186-
Name = "Text",
187-
Description = Localizer["NodeTextText"],
188-
Type = "string",
189-
ValueList = " — ",
190-
DefaultValue = "empty"
191-
},
192-
new()
193-
{
194-
Name = "Image",
195-
Description = Localizer["NodeImageText"],
196-
Type = "string",
197-
ValueList = " — ",
198-
DefaultValue = "empty"
199-
},
200-
new()
201-
{
202-
Name = "ImageTitle",
203-
Description = Localizer["NodeImageTitleText"],
204-
Type = "string",
205-
ValueList = " — ",
206-
DefaultValue = "empty"
207-
},
208-
new()
209-
{
210-
Name = "ImageSize",
211-
Description = Localizer["NodeImageSizeText"],
212-
Type = "ImageSize",
213-
ValueList = " — ",
214-
DefaultValue = "empty"
215-
},
216-
new()
217-
{
218-
Name = "Icon",
219-
Description = Localizer["NodeIconText"],
220-
Type = "List<string>",
221-
ValueList = " — ",
222-
DefaultValue = "empty"
223-
},
224-
new()
225-
{
226-
Name = "Tag",
227-
Description = Localizer["NodeTagText"],
228-
Type = "List<string>",
229-
ValueList = " — ",
230-
DefaultValue = "empty"
231-
},
232-
new()
233-
{
234-
Name = "Hyperlink",
235-
Description = Localizer["NodeHyperlinkText"],
236-
Type = "string",
237-
ValueList = " — ",
238-
DefaultValue = "empty"
239-
},
240-
new()
241-
{
242-
Name = "HyperlinkTitle",
243-
Description = Localizer["NodeHyperlinkTitleText"],
244-
Type = "string",
245-
ValueList = " — ",
246-
DefaultValue = "empty"
247-
},
248-
new()
249-
{
250-
Name = "Note",
251-
Description = Localizer["NodeNoteText"],
252-
Type = "string",
253-
ValueList = " — ",
254-
DefaultValue = "empty"
255-
},
256-
new()
257-
{
258-
Name = "Generalization",
259-
Description = Localizer["NodeGeneralizationText"],
260-
Type = "Generalization",
261-
ValueList = " — ",
262-
DefaultValue = "empty"
263-
},
264-
new()
265-
{
266-
Name = "Expand",
267-
Description = Localizer["NodeExpandText"],
268-
Type = "bool",
269-
ValueList = " — ",
270-
DefaultValue = "false"
271-
}
272-
];
273145
}

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6322,27 +6322,11 @@
63226322
"Scale1ButtonText": "ZoomOut",
63236323
"Scale2ButtonText": "ZoomIn",
63246324
"CustomButtonText": "Custom",
6325-
"NodeDataText": "NodeData",
63266325
"Data": "Data",
6327-
"ShowUI": "Show default UI",
6328-
"StyleCss": "Custom CSS",
6329-
"OnReceive": "Data received callback method",
6330-
"OnError": "Error callback method",
63316326
"Export": "Download as file",
63326327
"GetData": "Get data",
63336328
"SetData": "Import data",
63346329
"Reset": "Reset",
6335-
"NodeTextText": "Node text",
6336-
"NodeImageText": "Image",
6337-
"NodeImageTitleText": "Image text",
6338-
"NodeImageSizeText": "Image Size",
6339-
"NodeIconText": "Icon",
6340-
"NodeTagText": "Tag",
6341-
"NodeHyperlinkText": "Link",
6342-
"NodeHyperlinkTitleText": "Link Text",
6343-
"NodeNoteText": "Note Content",
6344-
"NodeGeneralizationText": "Generalization",
6345-
"NodeExpandText": "Node is expanded",
63466330
"SetTheme": "switch themes",
63476331
"SetLayout": "switch layout",
63486332
"MindMapExtensionDesc": "<p>Because <code>MindMap</code> encapsulates many <b>api</b> methods, the component library cannot fully encapsulate them, so extension methods are provided. For example, if you need a combination button to use the component, you can call your own <code>Javascript</code> through your own code to control <code>MindMap</code></p><ul><li>The custom button calls the component instance method <code>MindMap.Execute(\"clickCustom\", \"args1\")</code>, assuming the parameter is <code>args1</code></li><li>Your own <code>Javascript</code> is responsible for handling the <code>clickCustom</code> event</li><li><code>this</code> in the <code>clickCustom</code> method is the current <code>MindMap</code> instance, and you can call any of its methods to develop your own business</li></ul><p>The complete example is as follows:</p>"

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6322,27 +6322,11 @@
63226322
"Scale1ButtonText": "缩小",
63236323
"Scale2ButtonText": "放大",
63246324
"CustomButtonText": "自定义",
6325-
"NodeDataText": "节点数据",
63266325
"Data": "初始数据",
6327-
"ShowUI": "显示内置UI",
6328-
"StyleCss": "自定义CSS",
6329-
"OnReceive": "收到数据回调方法",
6330-
"OnError": "错误回调方法",
63316326
"Export": "下载为文件",
63326327
"GetData": "获取数据",
63336328
"SetData": "导入数据",
63346329
"Reset": "复位",
6335-
"NodeTextText": "节点文本",
6336-
"NodeImageText": "图片",
6337-
"NodeImageTitleText": "图片文本",
6338-
"NodeImageSizeText": "图片尺寸",
6339-
"NodeIconText": "图标",
6340-
"NodeTagText": "标签",
6341-
"NodeHyperlinkText": "链接",
6342-
"NodeHyperlinkTitleText": "链接文本",
6343-
"NodeNoteText": "备注内容",
6344-
"NodeGeneralizationText": "概要",
6345-
"NodeExpandText": "节点是否展开",
63466330
"SetTheme": "切换主题",
63476331
"SetLayout": "切换布局",
63486332
"MindMapExtensionDesc": "<p>由于 <code>MindMap</code> 封装的 <b>api</b> 方法比较多,组件库无法完全封装,所以提供了扩展方法。例如使用组件需要一个组合按钮,可以通过自己的代码调用自己的 <code>Javascript</code> 来控制 <code>MindMap</code></p><ul><li>自定义按钮调用组件实例方法 <code>MindMap.Execute(\"clickCustom\", \"args1\")</code>,假设参数为 <code>args1</code></li><li>自己实现 <code>Javascript</code> 负责处理 <code>clickCustom</code> 事件</li><li><code>clickCustom</code> 方法内 <code>this</code> 即为 <code>MindMap</code> 当前实例,可以调用其任意方法进行自己业务开发</li></ul><p>完整示例如下:</p>"

0 commit comments

Comments
 (0)