Skip to content

Commit

Permalink
prepare 5.10.15
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliang-wt committed Jan 30, 2023
1 parent 45e4246 commit 1c90de3
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 12 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## v6.x.x

##6.3.15(2023-1-30)
* **修改:** 更新Blazor控件库到最新版本
* **修改:** 修复Layui模式下的一些js错误
* **修改:** 修复Layui模式下TextBox的Change-Func和Done-Func无效的问题

##6.3.14(2023-1-13)
* **修改:** 修复多租户情况下上传和导入可能出现的异常
* **修改:** 修复Layui模式下Tree和Combobox的bug
Expand Down Expand Up @@ -141,6 +146,11 @@

## v5.x.x

##5.10.15(2023-1-30)
* **修改:** 更新Blazor控件库到最新版本
* **修改:** 修复Layui模式下的一些js错误
* **修改:** 修复Layui模式下TextBox的Change-Func和Done-Func无效的问题

##5.10.14(2023-1-13)
* **修改:** 修复多租户情况下上传和导入可能出现的异常
* **修改:** 修复Layui模式下Tree和Combobox的bug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BootstrapBlazor" Version="7.0.0" />
<PackageReference Include="BootstrapBlazor.Chart" Version="7.0.0" />
<PackageReference Include="BootstrapBlazor" Version="7.2.4" />
<PackageReference Include="BootstrapBlazor.Chart" Version="7.0.1" />
<PackageReference Include="BootstrapBlazor.SummerNote" Version="7.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"IsFilePublic": true,
"ErrorHandler": "/_Framework/Error",
"Languages": "zh,en",
"BlazorMode": "server", // server or wasm
"BlazorMode": "wasm", // server or wasm
"CorsOptions": {
"EnableAll": true //所有方法是否默认跨域
},
Expand Down
11 changes: 10 additions & 1 deletion demo/WalkingTec.Mvvm.Demo/Views/City/Create.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.Name" />
<wt:textbox field="Entity.Name" change-func="abc" done-func="abc2"/>
<wt:textbox field="Entity.Test" />
<wt:tree field="Entity.ParentId" item-url="/City/GetAllCities" show-toolbar="false"/>
</wt:row>
Expand All @@ -13,3 +13,12 @@
<wt:closebutton />
</wt:row>
</wt:form>
<script>
function abc(data){
console.log("change"+data);
}
function abc2(data) {
console.log("done" + data);
}
</script>
6 changes: 4 additions & 2 deletions demo/WalkingTec.Mvvm.Demo/Views/School/Create.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<wt:upload field="Entity.FileId" />
<wt:multiupload field="Entity.Photos" upload-type="ImageFile" preview-width="128" />
<wt:multiupload field="Entity.Files" upload-type="AllFiles" />
<wt:datetime field="Entity.Duration" format="HH:mm:ss" type="Time" default-value="1:1:1" />
<wt:datetime field="Entity.Duration" format="HH:mm:ss" type="Time" default-value="1:1:1" done-func="aaa"/>
<wt:ueditor field="Entity.Remark" height="300" upload-group-name="test" upload-subdir="bbb" id="abc"/>
</wt:row>
<wt:row align="AlignEnum.Right">
Expand All @@ -31,5 +31,7 @@
alert("test不提交");
return false;
}
function aaa(a,b,c){
alert(a);
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public override (string path, string handlerInfo) Upload(string fileName, long f
ext = ext.ToLower();
if (imagetypes.Contains(ext))
{
md.ContentType = "image/" + ext;
md.ContentType = "image/jpg";
}
OssClient client = new OssClient(groupInfo.ServerUrl, groupInfo.Key, groupInfo.Secret);
var result = client.PutObject(groupInfo.GroupLocation, fullPath, data,md);
Expand Down
21 changes: 17 additions & 4 deletions src/WalkingTec.Mvvm.TagHelpers.LayUI/Form/TextBoxTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ public class TextBoxTagHelper : BaseFieldTag


/// <summary>
/// 改变选择时触发的js函数,func(data)格式;
/// 文本时触发的js函数,func(data)格式;
/// <para>
/// data.Text得到选中文本;
/// data得到文本;
/// </para>
/// </summary>
public string ChangeFunc { get; set; }
/// <summary>
/// 文本修改后焦点离开时触发的js函数,func(data)格式;
/// <para>
/// data.Value得到被选中的值;
/// data得到文本;
/// </para>
/// </summary>
public string ChangeFunc { get; set; }
public string DoneFunc { get; set; }


public bool IsPassword { get; set; }
Expand All @@ -38,6 +42,15 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
output.Attributes.Add("type", type);
output.Attributes.Add("name", Field.Name);
output.Attributes.Add("wtm-name", Field.Name);
if(string.IsNullOrEmpty(ChangeFunc) == false)
{
output.Attributes.Add("oninput", $"{FormatFuncName(ChangeFunc, false)}(this.value)");
}
if (string.IsNullOrEmpty(DoneFunc) == false)
{
output.Attributes.Add("onchange", $"{FormatFuncName(DoneFunc, false)}(this.value)");
}

if (string.IsNullOrEmpty(Field?.Model?.ToString()) == false)
{
DefaultValue = null;
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>5.10.14</VersionPrefix>
<VersionPrefix>5.10.15</VersionPrefix>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down

0 comments on commit 1c90de3

Please sign in to comment.