Skip to content

Commit 36b34eb

Browse files
committed
feat: 新增ImagePicker、Sku组件
1 parent 07b48d7 commit 36b34eb

23 files changed

+2415
-661
lines changed

template/admin/component/form/fields/imagepicker/imagepicker.go

Lines changed: 771 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package sku
2+
3+
type Item struct {
4+
Title string `json:"title,omitempty"` // 列标题
5+
DataIndex string `json:"dataIndex,omitempty"` // 列索引
6+
Width interface{} `json:"width,omitempty"` // 列宽
7+
Fixed interface{} `json:"fixed,omitempty"` // (IE 下无效)列是否固定,可选 true (等效于 left) left rightr
8+
Editable interface{} `json:"editable,omitempty"`
9+
ValueEnum interface{} `json:"valueEnum,omitempty"`
10+
ValueType string `json:"valueType,omitempty"`
11+
FieldProps interface{} `json:"fieldProps,omitempty"`
12+
}
13+
14+
func NewItem() *Item {
15+
return &Item{}
16+
}
17+
18+
func (p *Item) SetTitle(title string) *Item {
19+
p.Title = title
20+
return p
21+
}
22+
23+
func (p *Item) SetDataIndex(dataIndex string) *Item {
24+
p.DataIndex = dataIndex
25+
return p
26+
}
27+
28+
func (p *Item) SetWidth(width interface{}) *Item {
29+
p.Width = width
30+
return p
31+
}
32+
33+
func (p *Item) SetFixed(fixed interface{}) *Item {
34+
p.Fixed = fixed
35+
return p
36+
}
37+
38+
func (p *Item) SetEditable(editable interface{}) *Item {
39+
p.Editable = editable
40+
return p
41+
}
42+
43+
func (p *Item) SetValueEnum(valueEnum interface{}) *Item {
44+
p.ValueEnum = valueEnum
45+
return p
46+
}
47+
48+
func (p *Item) SetValueType(valueType string) *Item {
49+
p.ValueType = valueType
50+
return p
51+
}
52+
53+
func (p *Item) SetFieldProps(pieldProps interface{}) *Item {
54+
p.FieldProps = pieldProps
55+
return p
56+
}

0 commit comments

Comments
 (0)