This commit is contained in:
Liang Ding 2023-03-02 18:42:19 +08:00
parent afc792b476
commit 68ef3770a9
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
6 changed files with 69 additions and 26 deletions

View file

@ -18,18 +18,18 @@ package av
type Cell interface {
// Resolve 根据参数解析单元格的值。
Resolve(input interface{}) string
// Value 返回单元格的值。
Value() string
}
type CellBlock struct {
Value string `json:"value"`
ID string `json:"id"`
}
func NewCellBlock(blockID string) *CellBlock {
return &CellBlock{Value: blockID}
return &CellBlock{ID: blockID}
}
func (c *CellBlock) Resolve(blockID interface{}) string {
return blockID.(string)
func (c *CellBlock) Value() string {
return c.ID
}