2022-10-13
ElementUI控件el-tree方法renderContent的使用

renderContent并不会影响代码中既定tree数据层结构渲染加载;

这里的作用是根据tree的特定level调整其样式:

el-tree

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<el-tree

:render-content="renderContent"

:data="treedata"

default-expand-all

:show-checkbox="showcheckbox"

highlight-current

node-key="itemId"

:expand-on-click-node="false"

@node-click="handleNodeClick"

:props="ItemProps"

v-loading="ISload"

ref="tree"

@check-change="itemCheckChange"

style="margin-top: 1em;"

></el-tree>
阅读更多

2022-10-13
ElementUI栅格系统布局与偏移

以下内容参照 官方文档

1
2
3
4
5
6
7
8
9
10
11
12
<el-row>

<el-col
:xs="{ span: 24, offset: 0 }"
:sm="{ span: 12, offset: 0 }"
:md="{ span: 12, offset: 0 }"
:lg="{ span: 12, offset: 0 }"
:xl="{ span: 12, offset: 0 }"
:xxl="{ span: 12, offset: 0 }"
>
</el-col>
</el-row>
阅读更多

2022-10-13
Winform中如何调用JSON格式接口进行GET/POST

1.创建一个winform桌面程序的项目(.NET Framework)

2.然后创建一个通用方法的类库:Common

3.在类库中添加接口发送与请求的通用方法:HttpHelper.cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public class HttpHelper
{
/// <summary>
/// 调用api返回json
/// </summary>
/// <param name="url">api地址</param>
/// <param name="jsonstr">接收参数</param>
/// <param name="type">类型</param>
/// <returns></returns>
public static string HttpApi(string url, string jsonstr, string type)
{
Encoding encoding = Encoding.UTF8;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);//webrequest请求api地址
request.Accept = "*/*";
request.ContentType = "application/json";
request.Method = type.ToUpper().ToString();//get或者post


byte[] buffer = encoding.GetBytes(jsonstr);
request.ContentLength = buffer.Length;
request.GetRequestStream().Write(buffer, 0, buffer.Length);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
{
return reader.ReadToEnd();
}
}
}
阅读更多

2022-10-13
标签添加自动换行的属性

word-wrap:break-word;

white-space: pre-wrap;

white-space: -moz-pre-wrap;

white-space: -pre-wrap;

white-space:-o-pre-wrap;

word-wrap: break-word;

阅读更多

2022-10-13
wangeditor自带的样式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* table 样式 */
table {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
}
table td,
table th {
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
padding: 3px 5px;
}
table th {
border-bottom: 2px solid #ccc;
text-align: center;
}

/* blockquote 样式 */
blockquote {
display: block;
border-left: 8px solid #d0e5f2;
padding: 5px 10px;
margin: 10px 0;
line-height: 1.4;
font-size: 100%;
background-color: #f1f1f1;
}

/* code 样式 */
code {
display: inline-block;
*display: inline;
*zoom: 1;
background-color: #f1f1f1;
border-radius: 3px;
padding: 3px 5px;
margin: 0 3px;
}
pre code {
display: block;
}

/* ul ol 样式 */
ul, ol {
margin: 10px 0 10px 20px;
}
阅读更多
浏览 |

© 2023 南疆 with help from Hexo and Twitter Bootstrap. Theme by Freemind.

container-narrow -->