[fix] 修复 导出python数据, DBool类型 格式问题 (#53)
parent
b791b4276d
commit
7c0579b4bb
|
|
@ -10,6 +10,11 @@ namespace Luban.Job.Cfg.DataVisitors
|
||||||
{
|
{
|
||||||
public static ToPythonLiteralVisitor Ins { get; } = new();
|
public static ToPythonLiteralVisitor Ins { get; } = new();
|
||||||
|
|
||||||
|
public override string Accept(DBool type)
|
||||||
|
{
|
||||||
|
return type.Value ? "True" : "False";
|
||||||
|
}
|
||||||
|
|
||||||
public override string Accept(DText type)
|
public override string Accept(DText type)
|
||||||
{
|
{
|
||||||
return $"{{\"{DText.KEY_NAME}\":\"{type.Key}\",\"{DText.TEXT_NAME}\":\"{DataUtil.EscapeString(type.TextOfCurrentAssembly)}\"}}";
|
return $"{{\"{DText.KEY_NAME}\":\"{type.Key}\",\"{DText.TEXT_NAME}\":\"{DataUtil.EscapeString(type.TextOfCurrentAssembly)}\"}}";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue