Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
992a07bd
Z
zendata
项目概览
易企天创
/
zendata
11 个月 前同步成功
通知
17
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zendata
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
GitCode(gitcode.net)2024年7月9日维护升级公告
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
992a07bd
编写于
11月 17, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix a issue
上级
f364d13d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
4 deletion
+29
-4
src/model/definition.go
src/model/definition.go
+1
-0
src/service/list.go
src/service/list.go
+3
-2
src/utils/const/const.go
src/utils/const/const.go
+1
-0
src/utils/string/string.go
src/utils/string/string.go
+5
-1
ui/src/components/FieldRefer.vue
ui/src/components/FieldRefer.vue
+1
-1
users/zentao/customer.yaml
users/zentao/customer.yaml
+18
-0
未找到文件。
src/model/definition.go
浏览文件 @
992a07bd
...
...
@@ -100,6 +100,7 @@ type DefInfo struct {
Title
string
`yaml:"title"`
Desc
string
`yaml:"desc"`
Fields
interface
{}
`yaml:"fields,omitempty"`
// is yaml
Range
string
`yaml:"range,omitempty"`
// is config
Ranges
interface
{}
`yaml:"ranges,omitempty"`
// is ranges
Instances
interface
{}
`yaml:"instances,omitempty"`
// is instances
...
...
src/service/list.go
浏览文件 @
992a07bd
...
...
@@ -73,8 +73,7 @@ func LoadRes(resType string) (res map[string][]model.ResFile, nameWidth, titleWi
}
}
if
resType
==
""
||
resType
==
item
.
ResType
||
(
resType
==
"yaml"
&&
fileExt
==
".yaml"
){
if
resType
==
""
||
resType
==
item
.
ResType
{
arr
=
append
(
arr
,
item
)
}
}
...
...
@@ -236,6 +235,8 @@ func GetYamlResType(def model.DefInfo) string {
return
constant
.
ResTypeRanges
}
else
if
def
.
Instances
!=
nil
{
return
constant
.
ResTypeInstances
}
else
if
def
.
Fields
!=
nil
{
return
constant
.
ResTypeYaml
}
return
""
...
...
src/utils/const/const.go
浏览文件 @
992a07bd
...
...
@@ -71,6 +71,7 @@ var (
ResTypeConfig
=
"config"
ResTypeRanges
=
"ranges"
ResTypeInstances
=
"instances"
ResTypeYaml
=
"yaml"
ResTypeExcel
=
"excel"
ResTypeText
=
"text"
ResTypes
=
[]
string
{
ResTypeConfig
,
ResTypeRanges
,
ResTypeInstances
,
ResTypeExcel
,
ResTypeText
}
...
...
src/utils/string/string.go
浏览文件 @
992a07bd
...
...
@@ -66,6 +66,10 @@ func BoolToPass(b bool) string {
}
}
func
FindInArrBool
(
str
string
,
arr
[]
string
)
bool
{
found
,
_
:=
FindInArr
(
str
,
arr
)
return
found
}
func
FindInArr
(
str
string
,
arr
[]
string
)
(
bool
,
int
)
{
for
index
,
s
:=
range
arr
{
if
str
==
s
{
...
...
@@ -240,4 +244,4 @@ func UrlEncode(str string) (ret string) {
ret
=
base64
.
URLEncoding
.
EncodeToString
([]
byte
(
str
))
return
}
\ No newline at end of file
}
ui/src/components/FieldRefer.vue
浏览文件 @
992a07bd
...
...
@@ -136,7 +136,7 @@ export default {
},
onReferChanged
(
value
)
{
console
.
log
(
"
onReferChanged
"
)
this
.
refer
.
file
=
value
this
.
refer
.
file
=
value
.
split
(
'
-
'
)[
0
]
if
(
this
.
refer
.
type
!=
'
yaml
'
&&
this
.
refer
.
type
!=
'
text
'
)
{
this
.
listDefFieldReferField
()
...
...
users/zentao/customer.yaml
0 → 100644
浏览文件 @
992a07bd
title
:
YAML类型
desc
:
author
:
version
:
1.0
fields
:
-
field
:
t1
range
:
a-z
postfix
:
"
\t
"
-
field
:
WC_SEX
range
:
sex.txt
#rand: true
postfix
:
"
\t
"
-
field
:
t2
range
:
1-9
postfix
:
"
\t
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录