v1.0.7
This commit is contained in:
兔子
2023-04-12 17:07:16 +08:00
parent 09c82c311b
commit c699bc7d0c
4 changed files with 335 additions and 31 deletions

View File

@@ -41,14 +41,14 @@ func (this *LangModel) Value(key any, args ...any) (result any) {
text := cast.ToString(key)
// 解析语言包
lang := cast.ToStringMap(JsonDecode(bytes.Result))
lang := cast.ToStringMap(JsonDecode(bytes.Text))
// 获取语言
result = lang[text]
// 如果没有找到语言通过javascript风格获取
if IsEmpty(result) {
item, err := JsonGet(bytes.Result, text)
item, err := JsonGet(bytes.Text, text)
if err == nil {
result = item
}